Perl 6 - the future is here, just unevenly distributed

IRC log for #marpa, 2016-03-15

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

All times shown according to UTC.

Time Nick Message
00:13 idiosyncrat_ joined #marpa
01:19 idiosyncrat__ joined #marpa
02:48 ilbot3 joined #marpa
02: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
05:43 ronsavage joined #marpa
07:04 koo7 joined #marpa
10:05 koo7 joined #marpa
12:56 kaare_ joined #marpa
13:30 ilbot3 joined #marpa
13:30 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
14:26 koo7 joined #marpa
16:05 idiosyncrat_ joined #marpa
18:43 ernimril joined #marpa
20:35 kaare_ joined #marpa
20:39 kaare__ joined #marpa
20:47 kaare__ joined #marpa
20:59 kaare__ joined #marpa
21:07 kaare__ joined #marpa
21:16 kaare__ joined #marpa
21:20 jdurand joined #marpa
21:21 jdurand FWI remains only the PODs to have my binary parser of Java .class files released! -;
21:23 ernimril jdurand, what project is that?
21:24 ernimril jdurand, I am currently using asm, but alternatives may be nice to have
21:24 jdurand an example of binary parsing with Marpa - applied on Java bytecode, i.e. the .class files
21:25 ernimril jdurand, ah, ok, not directly useful for me then.
21:26 jdurand asm allows modification AFAIK, this is just a parser. In fact it produces an AST of the bytecode, so doing the reverse, i;e. AST -> bytecode is nothing else but ultra easy
21:26 ernimril jdurand, my project is a java compiler (written in java). I am building a earley/marpa parser for the actual parsing, but adding all the other parts as well
21:27 jdurand ah ok, so you are parsing java source directly is that correct
21:27 ernimril correct
21:27 ernimril in case you want to look: https://github.com/robert-olofsson/parjac
21:28 ernimril I need to be able to load 3:rd party classes so I do need .class-parsing as weel
21:28 jdurand I had the parsing of Java source code in my projects as well - okay - would you be interested in a xml version of .class files ?
21:28 ernimril nope, that would not be nice for speed :-)
21:28 jdurand I looked to your github project - nice - please continue -;
21:29 ernimril my plan is to replace javac. I think I am well on my way, but I am not sure I can convince openjdk to change anytime soon... :-) oh well, if I can compile my own work faster that will be good for me
21:30 jdurand yes I understand - this is a great project
21:30 jdurand so; to resume, I used the Marpa::R2 perl interface to marpa library to parse the .class files, and produce an AST from it
21:31 ernimril I do need to read up the marpa paper/book though, the parser could be faster (even if it is pretty fast at this stage)
21:31 jdurand my ultimate goal would be to run .class files natively in perl, as if it was a jdk - your earlay parsing is writen by hand or using a 3rd party package
21:32 ernimril it is my own: https://github.com/robert-olofsson/parjac/blob/master/src/org/khelekore/parjac/parser/EarleyParser.java
21:32 jdurand ronsavage: Re http://irclog.perlgeek.de/marpa/2016-03-13#i_12178772 - indeed I am not sure that perl poeple relaized that, but when everybody claimed that Type::Tiny is very fast, then nobody seems to have done further
21:34 ronsavage joined #marpa
21:35 jdurand because it sound unbelieve to do OO with type checking isn't it ? So this why I wrote MarpaX::Java::ClassFile::Util::ProductionMode; the prod_isa() returns isa if $ENV{AUTHOR_TESTING}, nothing otherwise and... ouhh... I really gained a lot of time and and an unbelieve number of method calls - Devel::NYTProf was clear
21:36 jdurand ernimril: oh, impressive
21:36 jdurand ronsavage: I meant "without type checking"
21:37 jdurand ronsavage: in addition, I was really tired with all the OO overhead, even with Moo. So I wrote my /own/ ultra minimalist OO layer, whith support only the 'has' keyword, with nothing else bu the name of the attribute
21:38 jdurand Again speed is impressive... all in all my binary parser of .class files consist of more than 150 invidual modules, and runs as if it was writen in the old perl5 style - i;e. with no overhead
21:39 jdurand ernimril: apologized but I never used gradle
21:39 ernimril jdurand, can you read class files from inside jar files? that is the most common
21:40 jdurand ernimril: not yet, but as you know, if it only a matter of unzipping that - my module assumes that the input is a .class thingy - up to the layer above to unpack if necessary
21:40 ernimril jdurand, there is a reason I added "Building: "gradle build"" in the readme :-) there is also a compile.sh and run.sh, if you manually download the libs
21:42 jdurand oh... I looked to wikipedia, and realize they claim gradle combine the benfits of maven and ant - good, I use these two at my jobs; and not gradle!
21:43 jdurand ok, "apt-get -t unstable install gradle" is on the way
21:43 jdurand will give it it a try with your stuff in the coming days - promiised
21:45 jdurand ronsavage: for prod_isa(), this is https://github.com/jddurand/MarpaX-Java-ClassFile/blob/master/lib/MarpaX/Java/ClassFile/Util/ProductionMode.pm
21:45 ernimril jdurand, let me know how it goes and please realize that this is early work, lots of pieces missing. Compiling small classes work reasonable well
21:45 jdurand ronsavage: for my ultra minimalist OO, moo compatible, this is https://github.com/jddurand/MarpaX-Java-ClassFile/blob/master/lib/MarpaX/Java/ClassFile/Struct/_Base.pm
21:46 jdurand ernimril: ok
21:49 jdurand About my binary parser, I used a model with stack of grammar. The OO design made it that very pleasant, and I have a generic layer in which only $self exist. Every parser is a consumer of this parser "role", making them as ultra minimalist as https://github.com/jddurand/MarpaX-Java-ClassFile/blob/master/lib/MarpaX/Java/ClassFile/BNF/ConstantUtf8Info.pm for example
21:50 jdurand And this will be a post on blogs.perl.org - probably because I finished to write the POD of my... >150 modules in it...
21:51 jdurand AFK see you later
21:53 choroba joined #marpa
22:03 jdurand joined #marpa
22:04 jdurand Re http://irclog.perlgeek.de/marpa/2016-03-15#i_12190931 - I meant "as if it was a JRE"
22:05 jdurand After all, since now I have all the bytecode translated into a AST in perl, what would prevent to write an XS simulating (or perhaps generate on the fly OO-modules) .class files
22:07 jdurand and in fact I am quite tempted to write a "class2pl" that would translate .class to perl -; ok time to sleep lol - AFK
22:43 ronsavage jdurand: Thanx. Too minimalist for me, but intriguing I admit.
22:43 idiosyncrat_ joined #marpa
22:46 idiosyncrat_ https://twitter.com/OvidPerl/status/709837463074828288
22:47 idiosyncrat_ Ovid on twitter asks why not extend JSON to handle trailing commas and comments.
22:47 idiosyncrat_ Of course, using one of the several Marpa-driven JSON parsers, this is easy.
22:58 choroba I did it with my "calculator", it was easy indeed: https://github.com/choroba/marpa-enhanced-calculator/commit/8af497f3fccc63de70fba1f83c689e855bedc260

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