Perl 6 - the future is here, just unevenly distributed

IRC log for #marpa, 2014-11-29

| Channels | #marpa index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:45 jeffreykegler joined #marpa
00:47 jeffreykegler Re asm.js -- it seems feasible to compile Libmarpa via asm.js, so that you'd have a JS Libmarpa, and that'd be a fast way there.
00:49 jeffreykegler One thing to watch is the scale.  Libmarpa is 15,000+ lines of C, and that's just the core library.  I don't know what happens to the size which it gets compiled to Javascript,
00:49 jeffreykegler or whether it's anything you'd really be able to actually use on the client.
00:50 jeffreykegler Libmarpa is very strictly C90 compliant, so in theory it should compile via asm.js
00:51 jeffreykegler Alongside this, I am pseudo-coding the Kollos interface, and I think rns is at least to some degree tracking in Lua ...
00:51 jeffreykegler a simillar thing could be done in JS to provide the upper layer.
00:53 hobbs emscripten is the actual compiler (at least the chief one), asm.js is the JS subset it targets
00:54 hobbs emscripten output runs everywhere and is still reasonably fast in most browsers, it just gets extra optimized in firefox :)
00:54 jeffreykegler hobbs: Good points
00:54 jeffreykegler hobbs: Any idea what it's like to try to run 15,000 lines of C through Emscipten?
00:55 jeffreykegler * Emscripten
00:56 hobbs should be feasible -- did you see the "Humble Mozilla Bundle" by any chance?
00:56 jeffreykegler No
00:57 hobbs basically, real games compiled with emscripten and run in the browser, good enough that people paid money for them
00:58 jeffreykegler Sound like asm.js scales just fine.
00:58 hobbs microperl has also been built with it; firefox's PDF renderer is an emscripten-compiled libpoppler, etc.
00:59 hobbs code size is a bit of a problem, but it runs well enough
00:59 jeffreykegler So this could be the fast way to a JS Libmarpa.
00:59 hobbs I think so.
01:00 jeffreykegler I myself plan to work the Lua track, and I hope as many people as possible help me, but ...
01:00 jeffreykegler it is always best to work on what enthuses you ...
01:01 hobbs I jumped into this whole conversation in the middle, I'm pretty much just throwing out facts
01:01 jeffreykegler facts are allowed, up to a point :-)
01:03 jeffreykegler I haven't tracked the JS enthusiasts carefully, but I think Aria is one, and hardmath123 is another.
01:03 Aria Yep. hardmath123 started Nearley. I worked on it some too.
01:03 jeffreykegler Jean-Damien has written an ECMAScript parser in Marpa, so in a certain sense he counts.
01:05 jeffreykegler And apparently these days if you make something relevant in JS terms, that gives it many times the audience that you have if you are discussing it in Perl terms --
01:05 jeffreykegler at least that is my impression.
01:06 hobbs it's interesting how asm.js works. One of the biggest bits is type inference. JS doesn't really have integers; all numeric variables are double-precision floating-point
01:06 jeffreykegler Same in Lua by the way
01:06 hobbs and yet it has bitwise operators that convert their operands to 32-bit integers, do the bitwise thing, and convert back to double
01:07 hobbs so if you sprinkle |0 throughout some JS code, it makes the values act as though they were really ints
01:07 jeffreykegler And I looked at its approach to trying to optimize down to native C speeds -- it is something that *could* work
01:08 hobbs the asm.js optimizer is able to see that a chain of expressions has |0s throughout, do the work using ints, and avoid ever converting the values to floating-point
01:09 jeffreykegler And in terms of what I was saying to Aria the other day, that in order to get the speed, you have to allow segment violations ...
01:10 Aria And yes, the node.js ecosystem is huge. And, I think, tends to adopt good tools.
01:10 jeffreykegler the way asm.js does it is the memory is one big unchecked array.  You cannot SIGSEGV, but you can have pointer errors within it.
01:10 Aria Also bad ones, but hey, big ecosystem.
01:10 jeffreykegler ... which has the same effect and means no garbage collection, and a minimum of bounds checking, after optimization.
01:11 Aria Yup.
01:11 jeffreykegler They talk about 2x native C speeds, and I believe their method could produce that -- and maybe eventually better.
01:12 jeffreykegler hobbs: I assume btw that you never heard from Randal S.
01:12 hobbs no I didn't
01:13 jeffreykegler Randal may have gotten caught up with other things -- I expect he'll be in touch when he's ready.
01:14 hobbs that's fine
01:14 Aria In theory, V8's optimizer should be able to find similar type hints and use them. In practice, it's more varied than asm.js
01:14 Aria But very fast in places.
01:15 jeffreykegler And it seems to be the case that JS optimization is the state of the art ...
01:15 jeffreykegler so much so that translating C to JS and then optimizing may some day make sense.
01:15 jeffreykegler Not that it's a bad idea today.
01:37 Aria Hehe. And this is where Gary Bernhardt's video starts to not be funny anymore.
01:37 Aria https://www.destroyallsoftware.com/ta​lks/the-birth-and-death-of-javascript
02:08 jeffreykegler Just watched the Bernhardt video --
02:09 jeffreykegler doesn't seem like a joke at all to me, (though it is quite funny in parts)
02:09 Aria Yeah. he plays it both straight and funny.
02:10 Aria (I'd seen him before, being funny. The context was jarringly delightful.)
02:10 jeffreykegler And I have seen far less likely scenarios come true.
02:10 Aria Yup.
02:11 jeffreykegler For example, if in 1970 you have told me that, when looking up my own code, I would search a world-wide network first, because looking on my local harddisk was too slow and bothersome,
02:11 jeffreykegler I do not think I would have believed you.
02:26 * Aria laughs.
02:26 Aria Oh, too true.
02:27 jeffreykegler Or when open source started, I supported Stallman because I thought he was right ...
02:27 jeffreykegler not because I though he had the slightest chance of succeeding.
02:28 jeffreykegler Or that, with all the folks out there working on operating systems in industry, universities, etc., etc, ...
02:28 jeffreykegler that all their research would be blow away by a teenager in Helsinki
02:29 jeffreykegler * blow away -> blown away
02:30 jeffreykegler Compared to that sort of stuff, Berhhardt's speculations do not seem particularly bold.
02:31 hobbs the world is a funny place
02:49 Aria Heh, yep.
04:20 jeffreykegler joined #marpa
04:21 jeffreykegler rns: I've written and uploaded to the Github repo docs on how the LUIF should do parse evaluation.
04:21 jeffreykegler I'm not sure if what I have uploaded is coherent, but I'm too tired to reread it at this point -- I'll do that over the next 48 hours.
04:22 jeffreykegler You might want to wait before looking at the new stuff, therefore.
05:16 ronsavage joined #marpa
10:02 lwa joined #marpa
15:03 koo6 joined #marpa
16:40 koo6 joined #marpa
18:48 ilbot3 joined #marpa
18:48 Topic for #marpa is now Start here: http://savage.net.au/Marpa.html - Pastebin: http://scsys.co.uk:8002/marpa - Jeffrey's Marpa site: http://jeffreykegler.github.io/Marpa-web-site/ - IRC log: http://irclog.perlgeek.de/marpa/today
19:12 flaviu joined #marpa
19:16 flaviu joined #marpa
19:24 flaviu joined #marpa
19:29 jeffreykegler joined #marpa
19:30 jeffreykegler re asm.js: Looks like scale is not a show-stopper -- apparently, as hobbs tells me, there are serious commercial apps ten times as big.
23:32 ronsavage And for this reason - http://irclog.perlgeek.de/​marpa/2014-11-29#i_9734831 - I'll probably stick with AJAX and server-based code :-)
23:34 ronsavage To preempt confusion, I should add that the above was a comment about AJAX 'v' JS.
23:43 koo5 by utter chance, any pythonistas with some rpc experience here? Im trying to find the right library to chop up my editor (and chop off the parser ;)
23:43 koo5 ronsavage, that things would be slow and bothersome in clientside js?

| Channels | #marpa index | Today | | Search | Google Search | Plain-Text | summary