Public Messages
Welcome, guest! Please login or register for free to be able to join the javascript group and participate in the discussions.
-
mezod 2010-09-04 23:49
no idea of js
-
murtlest 2010-09-04 23:47
More readable code:
function byteArrayToString(bA){ var R=""; for(var i=0;i<bA.length; i++){ R+=String.fromCharCode(bA[i]); } return R; } -
murtlest 2010-09-04 23:46
This is what i ended up with:
function byteArrayToString(bA){var R="";for(var i=0;i<bA.length; i++)R+=String.fromCharCode(bA[i]);return R;} -
mezod 2010-09-04 23:46
they are helping another guy now
-
mezod 2010-09-04 23:45
nope
-
murtlest 2010-09-04 23:45
i skipped the map thing and looped over the array instead, i guess its some more characters of code but easier to understand
-
murtlest 2010-09-04 23:45
they havn't solved it yet though?
-
mezod 2010-09-04 23:44
i didnt understand anything
-
murtlest 2010-09-04 23:44
hehe
-
mezod 2010-09-04 23:42
[23:33:18] inimino )) No, because it'll get the array index as part of the returned string. [23:33:24] Sorella )) Chart? [23:33:45] AzaToth )) hmm [23:33:50] AzaToth )) true [23:33:55] Ø AzaToth is a bit off atm [23:34:22] inimino )) close enough :) [23:35:44] Ø Quit: (zemanel) (~zemanel@a95-95-82-162.cpe.netcabo.pt) (Remote host closed the connection) [23:36:01] AzaToth )) inimino: create ES5 parser and use that parser to parse the testcode file took 3.1s [23:36:25] AzaToth )) inimino: http://paste.debian.net/87824/ [23:36:33] Ø Join: (nmatrix9) (~nmatrix9@69.9.106.15) [23:36:45] Ø Quit: (Hounddog) (~IceChat7@122.169.139.141) (Ping timeout: 252 seconds) [23:36:53] Ø Join: (clutchski) (~matthew@cpe-72-225-215-177.nyc.res.rr.com) [23:37:00] Ø Join: (FalsAlarm) (~FalsAlarm@204-83-48-95 begin_of_the_skype_highlighting 204-83-48-95 end_of_the_skype_highlighting.regn.hsdb.sasknet.sk.ca) [23:38:12] Sorella )) jseval [104,101,108,108,111].map(String.fromCharCode).join(""); [23:38:13] buubot )) Sorella: h [23:38:25] Sorella )) weird [23:38:38] Sorella )) v8 [104,101,108,108,111].map(String.fromCharCode).join(""); [23:38:38] v8bot )) Sorella: h [23:38:47] inimino )) AzaToth ⋱ That's a lot faster than I'm used to in Firefox 3.6. [23:38:56] AzaToth )) jseval [104,101,108,108,111].map(function(i,o){return String.fromCharCode(o)}).join(""); [23:38:57] buubot )) AzaToth: No output. [23:39:05] AzaToth )) inimino: I see [23:39:17] Sorella )) it works on Chrome's console tho [23:39:20] Ø Quit: (mattikus) (~mattikus@ip24-250-73-154.br.br.cox.net) (Quit: Computer has gone to sleep.) [23:39:33] inimino )) js> [104,101,108,108,111].map(function(i,o){return String.fromCharCode(o)}).join("") [23:39:33] gbot2 )) inimino: " [23:40:06] temp01 )) it's function(o,i){ [23:40:20] AzaToth )) jseval [104,101,108,108,111].map(function(o,i){return String.fromCharCode(o)}).join(""); [23:40:21] buubot )) AzaToth: hello [23:40:33] inimino )) Indeed. [23:40:43] AzaToth )) hmm [23:40:48] Ø Join: (peepsalot) (~peeps@99-179-7-44 begin_of_the_skype_highlighting 99-179-7-44 end_of_the_skype_highlighting.lightspeed.austtx.sbcglobal.net) [23:41:07] AzaToth )) jseval [104,101,108,108,111].map(String.fromCharCode).join(""); [23:41:08] buubot )) AzaToth: h [23:41:13] AzaToth )) jseval [104,101,108,108,111].map(String.fromCharCode.prototype).join(""); [23:41:14] buubot )) AzaToth: ERROR: Error: TypeError: String.fromCharCode.prototype is not a function at line 1: (null) [23:41:18] AzaToth )) :-P [23:41:20] inimino )) js > jseval [23:41:21] Ø Join: (rsato) (~rsato@187.37.191.85) [23:41:28] AzaToth )) js > [104,101,108,108,111].map(String.fromCharCode).join(""); [23:41:32] Ø Quit: (allisterb) (~allisterb@186-45-12-17.dynamic.tstt.net.tt) (Ping timeout: 252 seconds) [23:41:37] inimino )) the problem with the direct map is that fromCharCode takes multiple arguments
-
murtlest 2010-09-04 23:41
my problem is solved, but always interesting to hear what the geeks say :)
-
murtlest 2010-09-04 23:40
hehe sure :D
-
mezod 2010-09-04 23:39
want the full log?
-
mezod 2010-09-04 23:39
hmm they are still discussing about this
-
murtlest 2010-09-04 23:35
and it was the nullbyte (0) character i was most interested in
-
mezod 2010-09-04 23:35
great :P
-
murtlest 2010-09-04 23:35
there was a if(char!=0) in it
-
murtlest 2010-09-04 23:35
i realised the moron i copied my script from had made a big mistake
-
murtlest 2010-09-04 23:35
seems to work
-
murtlest 2010-09-04 23:35
hehe
-
mezod 2010-09-04 23:34
try if it works first :P
-
murtlest 2010-09-04 23:34
didn't expect to get an answer here so quickly :D
-
murtlest 2010-09-04 23:34
wow
-
mezod 2010-09-04 23:32
[23:32:01] AzaToth )) i.e. Array.map(String.fromChartCode).join() might suffice
-
mezod 2010-09-04 23:31
[23:30:57] AzaToth )) mezod: use map + join + fromCharCode [23:31:04] AzaToth )) (not in that order) [23:31:11] mezod )) in which order? :P [23:31:31] AzaToth )) i.e. Array.map(function(){String.fromChartCode}).join()
