News for hackers. Stuff that matters.
Re:Bringing Asm.js to Chakra and Microsoft Edge by Sephr on Thursday May 07, 2015 @05:21PM (#9508387)
> Actually, some people do [write asm.js code by hand]

Who?

Re:Bringing Asm.js to Chakra and Microsoft Edge by s-macke on Friday May 08, 2015 @04:27AM (#9510544)
I did for my emulator jor1k. Take a look:

https://github.com/s-macke/jor1k/blob/master/js/worker/or1k/...

Handwritten asm.js code. Around 10 hours or porting time.

Re:Bringing Asm.js to Chakra and Microsoft Edge by Sephr on Sunday May 10, 2015 @03:09AM (#9519152)
That's quite an impressive implementation! I didn't realize hand-written asm.js could be that readable.
Re:Bringing Asm.js to Chakra and Microsoft Edge by s-macke on Wednesday May 13, 2015 @03:36PM (#9541416)
Yes, more or less. Every operation must be written, that the type is obvious for the compiler. And you have one array, the heap with some special index rules. For example: (r[((ins >> 9) & 0x7C)>>2]|0 The >>2 and |0 is necessary.
Re:Bringing Asm.js to Chakra and Microsoft Edge by TazeTSchnitzel on Thursday May 07, 2015 @06:00PM (#9508625)
People wanting high performance. For example, Grant Galitz's IodineGBA had some portions in asm.js https://github.com/taisel/IodineGBA
Re:Bringing Asm.js to Chakra and Microsoft Edge by Sephr on Friday May 08, 2015 @02:53AM (#9510329)
No, it doesn't. Where in IodineGBA do you see any hand-written asm.js code?

Here's are some quotes from the author of that very library:

"asm.js requires a style of coding only compilers can output. A person writing actual asm.js code by hand would need to be insane as asm.js code required style of coding is horribly disorganized"[1]

"Unfortunately asm.js requires one giant array to put things on. No one in their right mind codes like that by hand."[2]

1: https://github.com/taisel/IodineGBA/issues/16#issuecomment-2... 2: https://github.com/taisel/IodineGBA/issues/16#issuecomment-2...

Re:Bringing Asm.js to Chakra and Microsoft Edge by TazeTSchnitzel on Friday May 08, 2015 @03:24PM (#9513642)
That's from 2013. There have been more recent discussions.