2009-12-19:
[12:01am] <inimino> what I have that's most similar to this is a DSL for manipulating parse trees after the fact to extract semantic information[12:02am] <inimino> the thing that this Lua stuff can do that that can't, is affect the parse as it is in progress[12:03am] <inimino> bbiab[12:03am] <ashb> thanks.[12:03am] <evilstreak> ta[12:49am] <ashb> inimino> using U+2212 is a bad idea, its too easily confused with - and em-dash[12:55am] <ashb> inimino> oh also would have been nice if you mentioned that productions names have to start with uppercase[12:57am] <ashb> Zs:[0x20,0x21[12:58am] <ashb> why is ! (0x21) in Zs - thats meant to be spaces[01:09am] <ashb> how do you include a literal space in a char range? U+0020 the only way?[01:24am] <inimino> ashb> yes, probably right about 2212[01:24am] <inimino> and I do need to document the upper-case thing[01:25am] <ashb> quite an annoying limitation [01:25am] <inimino> 0x21 isn't in the set, it's the first character that isn't[01:25am] <ashb> oh?[01:26am] <ashb> oh that isn't just a list of character that are then?[01:26am] <inimino> yeah, those are read in and interpreted in a particular way[01:26am] <ashb> ah k[01:26am] <inimino> yeah it's a list of ranges[01:27am] <ashb> ah [x,y) ranges[01:28am] <inimino> yes[01:28am] <inimino> I required the Uppercase rules to reserve anything lowercase for some kind of operators or semantic predicates or whatever that might be added later[01:29am] <ashb> what about a rule called Object [01:30am] <inimino> hehe, ah good point[01:31am] <ashb> so long as you do it as var Object = function i dont think its a problem[01:31am] <ashb> Array might be tho[01:31am] <inimino> originally I had every function prefixed with p_ but I think I lost that when I moved everything into the one enclosing function[01:32am] <ashb> RefTitle ? ["] ( [^] !( ["]? P_blankline ) )* ["] \ "'" ( [^] !( "'"? P_blankline ) )* "'" \ "(" ( [^] !( ")" P_blankline ) )* ")" \ ""[01:32am] <ashb> hmmm wahts wrong with that rule?[01:32am] <inimino> in the next version those functions are all going to be gone anyway[01:32am] <inimino> wow that's more complicated than any rule I think I've ever written[01:32am] <ashb> oh \[01:32am] <ashb> we stole it from elsewher [01:33am] <ashb> evilstreak> look at the RefTitle rule[01:33am] <inimino> I guess I tend to break things up more[01:34am] <evilstreak> heh, I just got it to report that snippet to me as the problem area[01:35am] <ryah is now known as ryah_away.[01:35am] <inimino> ( [^] ![01:35am] <inimino> whoops[01:35am] * inimino continues typing[01:35am] <inimino> ( [^] !( ["]? P_blankline ) )* looks weird[01:36am] <ashb> yeah. it might not be the most efficent way, but http://github.com/jgm/lunamark/blob/bd4be96fe01bd135e7222e7905ef802cab540dbe/lunamark/parser/markdown.lua[01:36am] <ashb> [01:36am] <inimino> that means any character at all so long as it's not followed by '"' followed by P_blankline[01:36am] <inimino> I guess that's what's intended?[01:36am] <inimino> hm[01:36am] <ashb> yeah probably[01:38am] <ashb> both "\" and "\\" cause an error[01:38am] <inimino> yeah, at the moment [ U+xxxx ] is really the only reliable escaping mechanism[01:39am] <ashb> either it should escape, or work but an error is odd[01:40am] <inimino> yes[01:40am] <inimino> I think the problem is that the parser doesn't accept "\" because it supports \-escapes[01:40am] <inimino> but the codegen doesn't support the \-escapes, so if it makes it past the parser it's interpreted literally[01:42am] <evilstreak> huh, RefTitle isn't used anywhere else[01:42am] <ashb> ah[01:42am] <evilstreak> commented out and we're moving on [01:43am] <ashb> NormalEndline ?[01:43am] <ashb> oops[01:43am] <ashb> mised a rule[01:43am] <evilstreak> oops[01:57am] <ashb> hmmm http://github.com/jgm/lunamark/blob/master/lunamark/parser/generic.lua#L39[01:57am] <ashb> thats an interesting set of rules[01:58am] <ashb> same number of opening and closing `s[02:02am] <ashb> inimino> can we have (ro) access to the git repo please?[02:03am] <ashb> we *really* need to add some better error handling[02:24am] <inimino> ashb> there isn't a git repo, but I can make you a tarball if you want[02:25am] <ashb> yeah, would be useful[02:25am] <ashb> inimino> there shouls always be a repo [02:25am] <inimino> the website is the repository [02:36am] <inimino> I do all my development on the server and it saves every revision of every file[02:36am] <inimino> but I need some better git compatibility[02:39am] <ashb> what set up gives that?[02:40am] <inimino> it's this> http://boshi.inimino.org/3box/nhttpd/[02:40am] <evilstreak> http://pastie.org/749540 [02:40am] <ashb> DAV?[02:40am] <evilstreak> any insight into pulling that error apart?[02:41am] <inimino> kind of like DAV, but without all the XML[02:41am] <ashb> that thus not slow [02:43am] <inimino> hm...[02:44am] <inimino> that's a little beyond do-it-all-in-my-head range I'm afraid[02:45am] <inimino> almost all those rules failed at pos 0[02:46am] <evilstreak> heh[02:48am] <inimino> P_sp and P_nonindentspace succeeded, nothing else succeeded there[02:49am] <inimino> there should be a 'start' option, if you pass a rule name in, it will make a parser using that as the start rule[02:49am] <inimino> you can use that to create tests that are a little smaller[02:49am] <evilstreak> handy[02:49am] <inimino> I mean to test individual rules[02:49am] <ashb> very[02:50am] <MisterN is now known as MrN_.[02:50am] <MrN_ is now known as MisterN.[02:51am] <inimino> hm...[02:51am] <evilstreak> another error, but a better one![02:52am] <ashb> once we've written this we can blog about how cool it is >_>[02:52am] <inimino> the proper error dissection stuff is going to take a while but I think there might be a quick fix I can do in a few minutes...[02:53am] <evilstreak> I applied a fix that gave use line number for when the initial parsing fails[02:53am] <evilstreak> (the parsing of the grammar, not using the generated grammar to parse something)[02:53am] <evilstreak> if you know what I'm rambling about[02:54am] <ashb> but. the generated grammar is built by generating a grammar [02:54am] <inimino> yeah I got you[02:54am] <inimino> if you have an editor like vim, you can do... what is it... *checks*[02:55am] <evilstreak> s/like//[02:55am] <inimino> g ^g[02:56am] <inimino> shows you the character you are on, very useful[02:56am] <ashb> ah[02:56am] <ashb> that is[02:57am] <ashb> can you go to a byte?[02:59am] <inimino> there is, I just don't remember that[02:59am] <inimino> it's g and something else[03:01am] <inimino> oh, well[03:01am] <inimino> gg to jump to the top of the file[03:01am] <inimino> enter the character you want and hit space[03:01am] <inimino> should work[03:08am] <evilstreak> inimino> how do I use the start option?[03:08am] <evilstreak> oh, opts[03:08am] <evilstreak> right[03:08am] <inimino> yeah[03:09am] <inimino> there's also a debug option[03:09am] <inimino> {start:'...';debug:true}[03:09am] <inimino> the only thing debug does is add a property that counts up on each position in the result table... but it saves you having to count them[03:11am] <inimino> the quick fix I was thinking of was to add the rule names there too but it's not so quick after all[03:17am] <nrstott> inimino, do you know about the "Boo" language?[03:17am] <nrstott> if you're interested in parsing, their parser is very interesting[03:17am] <inimino> hm, sounds vaguely familiar[03:18am] <inimino> nrstott> got a pointer to something about the parser?[03:20am] <nrstott> hm it appears the blog entry is down that talked about it the best[03:20am] <nrstott> but ti's available on google cache[03:20am] <nrstott> dont' know if this link will work for you[03:20am] <nrstott> http://74.125.47.132/search?q=cache:http://blogs.codehaus.org/people/bamboo/archives/001722_boo_ometa_and_extensible_parsing_i.html [03:20am] <nrstott> if you search for "boo, ometa and extensible parsing" you should find it[03:20am] <inimino> ok[03:21am] <nrstott> I'd love t osee some of the stuff Boo does in a more mainstream language.[03:22am] <inimino> hm, looks interesting[03:23am] <nrstott> Boo was already very flexible for langauge oriented programming before ometa. it has syntactic macros and a very abstracted and extensible compiler pipeline[03:23am] <nrstott> the only real limiation was the parser, and when the ometa stuff is done, that won't even be a limitation.[03:28am] <inimino> that looks pretty cool[03:34am] <nrstott> it'd be a great language if it would ever get ot 1.0[03:34am] <nrstott> the problem is everytime its nearing 1.0, the project lead decides that he needs to do just "one more thing" before getting there[03:34am] <nrstott> this Ometa was one of the recent things that "had to be done"[03:34am] <inimino> heh[03:34am] <nrstott> before that it was "the entire codebase has to be rewritten using boo"[03:35am] <nrstott> before that it was "it needs to run on the JVM too"[03:36am] <inimino> wow[03:37am] <inimino> JVM or CLI is already a level of abstraction away from the machine architecture[03:37am] <inimino> supporting both seems kind of crazy[03:38am] <nrstott> no kidding[03:38am] <nrstott> especially considering it has to support syntactic macros that may do differnet things on the different architectures[03:47am] <inimino> evilstreak> still around?[03:48am] <inimino> or ashb[03:49am] <ashb> i am[03:49am] <ashb> he's gone[03:49am] <inimino> ok[03:49am] <inimino> I added a little debugging aid, totally brute-force but probably better than nothing[03:50am] <ashb> cool[03:50am] <inimino> oh, I forget to export it...[03:52am] <inimino> http://boshi.inimino.org/3box/PEG/build/PEG_generator.js [03:52am] <inimino> rawFailDump(, )[03:53am] <inimino> output is like:[03:53am] <inimino> pos> 0[03:53am] <inimino> Document> false[03:53am] <inimino> P_spacechar> false[03:53am] <inimino> P_sp> true,0,[03:53am] <inimino> ...[04:02am] <ashb> okay either i've got a bug in hippo, spidermonkey really doens't like what we're doing or there's a loop somewhere[04:02am] <ashb> 11mins of CPU time[04:02am] <ashb> and its not yet generated[04:02am] <ashb> oh no i'm not sure where throught it[04:36am] <inimino> 11 minutes?[08:32am] <ryah_away is now known as ryah.[09:15am] <ryah is now known as ryah_away.[11:43am] <tlrobinson> ashb> firebug and webkit support something like that[11:43am] <tlrobinson> /@line thing[11:44am] <tlrobinson> its different syntax though[11:45am] <tlrobinson> http://pmuellr.blogspot.com/2009/06/debugger-friendly.html [11:46am] <tlrobinson> http://blog.getfirebug.com/2009/08/11/give-your-eval-a-name-with-sourceurl/ [2:26pm] <evilstreak> inimino> we misinterpreted the minus from the Lua grammar[2:27pm] <evilstreak> `A ? B - C` actually means "check that C doesn't match, and then use B"[2:29pm] <evilstreak> is there a way to do that with your parser?[2:31pm] <evilstreak> hmm, maybe just> A ? !( C ) B[3:39pm] <inimino> evilstreak> that explains the expression that I thought was odd before.[3:49pm] <ashb> inimino> fwif that parser we fucked up porting is probably in interesting regression[3:49pm] <ashb> i think it triggered a loop [3:49pm] <ashb> plus it took a long time to generate (longer due to the fact i just realised that JIT was off)[3:50pm] <inimino> ashb> let me see it, I'll add it to my wunderkammer[3:51pm] <ashb> http://dom.evilstreak.co.uk/hippo-oom-regression-20091219.tar.gz [3:51pm] <ashb> in there is a .peg and an input.md we attempted to run agains[3:54pm] <ashb> against[3:57pm] <inimino> alright, thanks[4:39pm] <ashb> ohahahaha. no wonder that took so damn long.[4:39pm] <ashb> it was a debug build [4:40pm] <ashb> and a GC-error detecting GC build at that> after *every* allocation spidermonkey does a full GC run[5:30pm] <inimino> oh, heh[7:27pm] <bentomas> is the log not logging properly? it says it has no data since the 16th...[7:27pm] <bentomas> http://chat.commonjs.org/mochabot/2009-12-18 [7:38pm] <ashb> bentomas> enomocahbot in here is why[7:45pm] <bentomas> what, mochabot thinks it can go on vacation? that jerk.[7:47pm] <bentomas> the_undefined> did you and kris talk about manipulating the fulfillment value across Promise "branches" at all?[7:59pm] <the_undefined> bentomas> branches?[8:02pm] <bentomas> the_undefined> nevermind, I don't think anyone else is concerned about this issue (I just wrote about it on the node mailing list) so I'm going to stop being a thorn in people's sides![8:02pm] <the_undefined> bentomas> you're not[8:02pm] <the_undefined> > )[8:02pm] <the_undefined> not to me at least[8:04pm] <the_undefined> bentomas> replying[8:13pm] <bentomas> the_undefined> sounds good![8:13pm] <the_undefined> bentomas> my message?[8:15pm] <the_undefined> bentomas> I really think PommonJs promises will end up behaving a lot like dojo promises and in fact will even be more powerful[8:15pm] <the_undefined> * CommonJS[8:16pm] <bentomas> the_undefined> I think you right. and I think my concern is more semantic than problematic in reality. like you said, if you are careful about not making any assumptions, then it shouldn't be an issue.[8:17pm] <the_undefined> bentomas> I think by default you'll usually end up with nested promises anyway. Branches will only occur when you conciously want them[8:18pm] <bentomas> yeah, but I think the current Promise API makes it so that branches just behave as a chain (using depth first traversal of the tree) so, I can't see why you would want them[8:21pm] <bentomas> the_undefined> I see this "branchable" version of promises as useful in two ways. 1) it enables us to have immutable promises that you can pass to untrusted code. and 2) (and this isn't in the current proposal at all, and is horribly inefficient) if the objects passed to the different branches are deep copies of each other, then you can have the different branches actually change the objects in different way[8:22pm] <the_undefined> bentomas> yes[8:22pm] <bentomas> the_undefined> so, I think this new API is going to be used in the exact same way as the old API. Which is okay, because I like the old API![8:22pm] <the_undefined> I actually don't dig the security argument for immutable promises, I'm much more afraid of unintentional side-effects people will introduce in their code[8:24pm] <bentomas> I hadn't thought about it like that, I agree with you[8:24pm] <the_undefined_> bentomas> anyway, lets see what ryan says[8:27pm] <bentomas> sounds good. I'm impatient to get this figured out because I want to switch Bomber to use the new API that is chosen, so I haven't really been working on Bomber much. but I'll just be patient![8:27pm] <the_undefined_> yeah, I want this sooner rather than later myself[8:27pm] <the_undefined_> already spend tons of time on it [8:29pm] <bentomas> no kidding[10:14pm] <ashb> inimino> would really like a way to 'tag' nodes as interesting in the returned tree[10:14pm] <ashb> this would be *much* easier if we could do that[10:15pm] <ashb> (i.e. store the interesting nodes by name as well as in the children or something[10:19pm] <felixge is now known as felixge_.[10:25pm] <felixge is now known as the_undefined.[10:28pm] <the_undefined is now known as felixge_.[10:30pm] <the_undefined is now known as felixge.[10:30pm] <felixge is now known as felixge_.[10:32pm] <felixge is now known as felixge_.[10:33pm] <felixge_ is now known as felixge.[11:09pm] <inimino> ashb> hm.[11:09pm] <inimino> example?[11:09pm] <ashb> http://pastie.org/750180 [11:10pm] <ashb> actually no[11:10pm] <ashb> refresh that[11:10pm] <ashb> first off some way of squashing nodes toegether in that might be good[11:11pm] <ashb> (withought mangaling the grammar to unreadability)[11:11pm] <ashb> secondly if i could name all those Inline nodes (assuming they were one by what ever means)[11:11pm] <ashb> then i wouldn't have to know that the 3rd child of an AtxHeading is the content etc[11:11pm] <ashb> i could refer to it by name[11:12pm] <inimino> yeah, there is some machinery for squashing nodes automatically but I don't think it's up to date[11:12pm] <inimino> you can do it manually though[11:12pm] <inimino> if you pass in a list of rule names in one of the options...[11:12pm] <inimino> hm...[11:12pm] <inimino> I think it's 'drop'[11:12pm] <ashb> ah.[11:13pm] <ashb> i wonder what sort of features treetop has[11:13pm] <ashb> cos it has some nice extensions[11:13pm] <inimino> then they won't appear in the output, or any of their children, at all[11:13pm] <inimino> so you probably want to do that for anything like P_spacechar, or anything else that's totally uninteresting like that[11:13pm] <ashb> yeah. not sure when its unintersting at the moment tho [11:14pm] <inimino> basically anything that only has a name because you wanted to use to it in more than one place, or because you wanted to split up a rule, instead of because you actually care about it[11:14pm] <ashb> ah[11:14pm] <ashb> http://treetop.rubyforge.org/semantic_interpretation.html [11:14pm] <ashb> the Labels section[11:15pm] <inimino> like if you have a rule like Newline or LB you want to drop it[11:17pm] <inimino> ah, I see what this is for[11:17pm] <inimino> yes, there's a DSL for dealing with trees, which will be the ideal way to do this[11:17pm] <ashb> it will drop its children tho?[11:18pm] <inimino> yes[11:18pm] <inimino> there used to be an 'elide' set also, which would replace an element with it's children, instead of that, I'm going to add an automatic elision rule which will probably do what you want in just about every case[11:19pm] <ashb> probably yeah. some markup in the grammar would be nice i think still[11:20pm] <inimino> how are you processing the nodes?[11:21pm] <ashb> a simple tree walker[11:21pm] <inimino> ok
Logs by date :