Perl 6 - the future is here, just unevenly distributed

IRC log for #marpa, 2014-10-01

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

All times shown according to UTC.

Time Nick Message
01:34 jeffreykegler joined #marpa
01:37 X-Scale joined #marpa
01:48 ilbot3 joined #marpa
01: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
02:54 flaviu1 joined #marpa
03:20 ronsavage joined #marpa
05:47 X-Scale joined #marpa
06:37 X-Scale joined #marpa
06:58 X-Scale` joined #marpa
07:38 lwa joined #marpa
11:28 rasta joined #marpa
14:40 rastap joined #marpa
14:53 lwa joined #marpa
15:15 hernan_ ok ronsavage !
15:15 hernan_ thanks again
15:32 jeffreykegler joined #marpa
16:14 lwa1 joined #marpa
16:54 jeffreykegler The observation has been made a few times that, in Marpa, Perl has something that no other language has.
16:54 jeffreykegler Interestingly, this observation seems to be made made by folks outside the Perl world.
16:55 jeffreykegler * made made -> made only
17:26 Aria Huh.
17:26 Aria It's true.
17:48 hernan_ which observation
17:48 hernan_ ?
17:49 jeffreykegler hernan_: http://irclog.perlgeek.de/marpa/2014-10-01#i_9441252
17:58 hernan604 cool
17:59 hernan604 im trying to learn in my freetime
17:59 jeffreykegler Great!
17:59 hernan604 i want to use marpa to parse a templating language
17:59 hernan604 but im having a hard time
18:00 hernan604 i need to learn the basics =))
18:00 jeffreykegler An existing templating language, or one you are creating?
18:01 hernan604 an existing one
18:01 hernan604 but and example of a simple one would be nice
18:01 jeffreykegler Does it have a public spec?
18:01 hernan604 has
18:01 hernan604 http://velocity.apache.org/engine/releases/velocity-1.4/specification-bnf.html
18:02 hernan604 and it looks like this when used https://velocity.apache.org/engine/releases/velocity-1.5/user-guide.html
18:08 jeffreykegler Anyone else have ideas for a place where hernan can start?  What's a good example/tutorial of a semi-line-by-line language?
18:08 hernan604 i have been able to parse simple things
18:09 hernan604 but there are scoped variables
18:09 hernan604 printing things based on conditions
18:09 hernan604 etc... you know better than me
18:09 hernan604 =))
18:10 jeffreykegler Scoping variables and interpreting conditions is often something best left to a level about the syntax/parsing
18:11 jeffreykegler That is, you identify variable and their uses in parsing, then diagnose issues after you have the parse tree.
18:12 jeffreykegler Of course, I'm assuming that's if you try to parse the whole document at once.
18:12 jeffreykegler If you're just parsing one line at a time, that's something else.
18:12 hernan604 must parse the whole thing
18:12 jeffreykegler At once, or line by line ?
18:13 hernan604 at once
18:13 hernan604 because its a template
18:13 hernan604 so its multiline
18:13 * hernan604 feels so dumb =))
18:15 jeffreykegler Actually I started out dumb in parsing back in the 1970's but
18:15 jeffreykegler everybody else forgot what they knew back then, so now I'm an expert. :-)
18:15 * Aria laughs.
18:16 jeffreykegler hernan: if it's any comfort, you've set yourself a fairly difficult problem.
18:17 hernan604 hahahah
18:17 hernan604 thanks =DD
18:17 jeffreykegler The lexing is the really hard part, and if I were tackling the problem ...
18:17 hernan604 im always at that dificult problems
18:18 jeffreykegler I'd first try to get the lexeme stream right, and then worry about the grammar.
18:18 hernan604 ok
18:18 hernan604 i think i need to learn the basics
18:18 jeffreykegler That is, I'd start with a dummy grammar, just something to hang the lexemes on.
18:19 hernan604 i have a problem,  have the tool to solve it. but im missing some essentials
18:19 jeffreykegler hernan: Unfortunately you picked a bad problem for learning the basics, but it plunges you at once into some of the more difficult aspects.
18:19 hernan604 i will do just that, dummy grammar
18:19 jeffreykegler That's why my main tutorial is a calculator.
18:20 hernan604 ok :))
18:20 jeffreykegler Starting with the lexemes is harder conceptually, because it's kind of a cycle ...
18:20 jeffreykegler You need to know the grammar/semantics to know what lexemes you want, but you're doing the lexemes first ...
18:21 jeffreykegler but nonetheless that's what I'd suggest.
18:21 hernan604 oki
18:21 jeffreykegler Also, try to subset the problem.
18:21 hernan604 thanks master!!
18:21 jeffreykegler Pick features to exclude on the first pass.
18:22 jeffreykegler Perhaps find a sample app codebase that only uses a subset of features, one as small as possible.
18:22 hernan604 yea or a dummy language
18:22 hernan604 when i overcome these minor details i will be able to see the big picture
18:22 jeffreykegler An advantage of Marpa is that it leads itself to an incremental approach, and you want to use that advantage.
18:22 hernan604 yup
18:23 jeffreykegler Will your work be open source?
18:24 hernan604 for now yes
18:24 jeffreykegler Great!  Good luck.
18:24 hernan604 thanks i will need it
20:06 flaviu1 joined #marpa
20:13 rns_ joined #marpa
20:16 rns_ re http://irclog.perlgeek.de/marpa/2014-10-01#i_9441593 — I did a quick and dirty script to parse some example velocity text at https://gist.github.com/rns/84c79eca7ac17e58fc19 — hope it'll help hennan604 to get started. BTW, the cited grammar looks incomplete (I had to add rules as specified in the comments).
20:17 rns_ left #marpa
20:17 rns_ joined #marpa
20:17 rns_ left #marpa
20:33 lwa joined #marpa
21:00 idiosyncrat joined #marpa
21:01 idiosyncrat rns: Thanks!
22:06 idiosyncrat joined #marpa
22:07 idiosyncrat hernan: rns adds a good point -- standards BNF is often "loose" -- pre-Marpa they could assume nobody would try to parse directly from the BNF.
22:21 hernan604 wow
22:22 hernan604 thank you again >)
22:35 ronsavage rns: That for that Verlocity-oriented gist. I'll add it to MarpaX::Demo::SampleGrammars (which is still pending).
22:48 hernan604 cus rns !

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