2009-12-20:
[12:49am] <ashb> array.reduce is great[12:57am] <Dantman> Wes-, You made a post to the list about low level components to create require or package systems[12:59am] <ashb> Dantman> recently or older?[12:59am] <Dantman> More recently[12:59am] <Dantman> Something in the packages thread posting an issue with the way we're going into a bunch of high-level stuff or whatnot[01:00am] <ashb> oh the one saying package manager should just be a module that is required?[01:00am] <Dantman> I think he listed some other components[01:01am] <tlrobinson_> file, http, zip[01:01am] <tlrobinson_> anything else?[01:01am] <Dantman> Some sort of sandboxing or something[01:01am] <tlrobinson_> hm[01:01am] <ashb> oh yes. that reminds me. the pckages spec shouldn't say what comopression format is used[01:01am] <Dantman> Well, context management... I dunno[01:01am] <ashb> thats more a catalog/redist issue thatn what we are dealing with now[01:02am] <ashb> (will send to list)[01:02am] <ashb> Dantman> what about it?[01:03am] <Dantman> I wanted a better idea of the components needed[01:04am] <Dantman> I'm getting tired of all the high-level stuff too, I'm trying to write up some access apis that implement the lowest level necessary to write any of the commonjs stuff in pure-js[01:04am] <ashb> oh> files, network, and if you want to do things nicer than eval, a version of eval that lets you control filename[01:04am] <ashb> is a bout all you need i think. its certainly the core[01:05am] <Dantman> I wrote a HTTP-Gateway that could be used to implement JSGI, a Node API, or any other Streaming http gateway interface you want...[01:05am] <Dantman> Well, spec[01:06am] <nrstott> is there some kidn of secret to running rhino under cygwin? It always tells me it can't find org.mozilla.javascript.console.Main[01:06am] <nrstott> ive made sure js.jar is in my classpath[01:06am] <ashb> i would very unheplfully suggest not running cygwin [01:07am] <Dantman> Why do you need to use cygwin? Java runs on Windows fine[01:07am] <ashb> sure but if you are in a cygwin shell its probably nice to be able to run it there too[01:08am] <Dantman> I suppose it might be a bit of a mess to do with cygwin's path mangling[01:09am] <ashb> inimino> I guess programmaticaly altering rules is out of the question isn't it?[01:10am] <Dantman> http://wiki.accessjs.org/wiki/HTTP-Gateway // Anything look missing?[01:11am] <ashb> yes your wheel needs to be rounder[01:11am] <ashb> actually i'm not quite sure what it is trying to be[01:16am] <nrstott> because I need to use it in cygwin, the simple answer[01:16am] <nrstott> im sure it does have something to do with cygwins path mangling[01:17am] <nrstott> even when i try to use regular windows java instead of cygwin java in cygwin, i can't run rhino[01:17am] <Dantman> Hmmm[01:17am] <Dantman> What ver do you have, how did you build?[01:18am] <nrstott> 1.6[01:18am] <nrstott> im assuming i got the cygwin one from a package, its been so long since i installed on this computer though i have no idea[01:18am] <inimino> ashb> not sure what you mean[01:18am] <nrstott> the windows one i just got the normal windows way[01:18am] <Dantman> Uck[01:18am] <ashb> inimino> a flag (at run time prefereably) to turn a rule on or off[01:18am] <ashb> sort of thing[01:18am] <Dantman> Download the actual release package at least[01:19am] <nrstott> yeah that's a good idea[01:19am] <inimino> ashb> oh, something like opts.drop, but at runtime, you mean?[01:19am] <inimino> or do you mean something else by 'on or off'?[01:20am] <ashb> _M*A*S*H_[01:20am] <ashb> some markdowns parse those inner *s as em, some dont[01:20am] <ashb> so i'd like an option to toggle it[01:20am] <ashb> i guess i can do it by looking at the tree[01:21am] <inimino> oh, I see[01:21am] <inimino> yeah, probably your best bet at the moment[01:50am] <Sembianc1 is now known as Sembiance.[02:39am] <MisterN_ is now known as MisterN.[08:57am] <tlrobinson_> wow i'm way behind on the packages thread[12:04pm] <MisterN> hmm for external dependencies, semver won't work[3:22pm] <ashb> no, it just has to be free form there[5:08pm] <zilenCe1 is now known as zilenCe.[5:09pm] <zilenCe is now known as cpojer.[5:31pm] <ashb> inimino> my grammar is TestCode ? "abc"[5:31pm] <ashb> thats it[5:31pm] <ashb> `TypeError> tbl[p] is undefined'[5:31pm] <ashb> when i try to parse "abc"[5:32pm] <ashb> what've i done?[5:32pm] <inimino> hm...[5:39pm] <ashb> http://pastie.org/750799 [5:39pm] <ashb> is what i'm saving to disk[5:40pm] <inimino> hm, I can't seem to reproduce, looking at your paste now[5:40pm] <ashb> ohh. its not the parser[5:40pm] <ashb> i'm not giving it the input i expect[5:40pm] <ashb> still - not the failure i'd expect [5:41pm] <ashb> turns ouy the input i was giving it was [object IO.Stream][5:41pm] <ashb> [5:41pm] <ashb> still - a bug?[5:42pm] <ashb> ah - its cos i wasn't giving it a string.[5:42pm] <ashb> it behaves oddly if oyu feed it an object[5:42pm] <inimino> hm[5:42pm] <inimino> oh[5:43pm] <inimino> I should add some sanity checks in the API[5:43pm] <ashb> yeah[5:49pm] <ashb> hmmmm i dont think there a way to port this rule[5:49pm] <ashb> for inline code fragments[5:49pm] <ashb> ```a`b```[5:51pm] <ashb> http://github.com/jgm/lunamark/blob/master/lunamark/parser/generic.lua#L39-41 [5:51pm] <ashb> not without some kind of backreference ability[5:57pm] <ashb> ondras> fwiw, the latest version has moduel.setExports, not require.setExports, but 1 and 4 still apply[6:02pm] <inimino> ashb> what's c()?[6:02pm] <inimino> lpeg.C?[6:03pm] <ashb> a capture[6:03pm] <? inimino scrolls up, I see now[6:05pm] <ashb> hmmm i wonder how i should go about supporting different dialects of markdown[6:05pm] <ashb> hrmm[6:06pm] <ondras> ashb> ah[6:07pm] <ondras> ohmygod, also s/tee/tea/[6:07pm] <ashb> oooh good idea[6:07pm] <? ashb goes to get some more[6:07pm] <ondras> *will read my posts one more time before sending them*[6:12pm] <inimino> ashb> ok, now I see what that's doing...[6:13pm] <inimino> ashb> so it allows any number of backticks so long as it's fewer than the string of backticks used as a delimiter, that's interesting[6:13pm] <ashb> yeah[6:13pm] <ashb> its powerful and still 'static'[6:15pm] <inimino> probably not context-free[6:15pm] <ashb> i'm thinking i might have to do inline level elements by regexp/some other means[6:16pm] <ashb> i'm getting the feeling that markdown is a littlbe bit too dynamic to be written as a PEG[6:17pm] <inimino> the ``` thing I think is not expressible as a pure PEG[6:18pm] <inimino> unless there's something I'm missing[6:18pm] <ashb> no i couldn't work it out either[6:18pm] <ashb> but a 'pure' peg is fairly boring. extensions are cool >_>[6:20pm] <MisterN> ashb> maybe you can do it with boost [6:20pm] <ashb> nah - this is something that would be very nice to have working on the browser too[6:22pm] <ashb> live preview of comments type thing etc.[6:22pm] <inimino> I would imagine there's a pretty low limit on the number of backticks that anyone actually uses[6:22pm] <ashb> probably not more than 4, yeah[6:22pm] <MisterN> ashb> hmm is there something like boost.spirit/boost.xpressive for pure JS?[6:22pm] <ashb> i was just looking for a elegant over engieerd solution [6:23pm] <ashb> MisterN> not structly, but thats what inimino has - a PEG parser generator[6:23pm] <MisterN> PEG stands for?[6:23pm] <inimino> parser expression grammar[6:23pm] <ashb> http://en.wikipedia.org/wiki/Parsing_expression_grammar [6:24pm] <inimino> http://inimino.org/~inimino/blog/peg_first_release [6:25pm] <MisterN> inimino> can you hack it to become powerful enough for a correct markdwon parser?[6:25pm] <ashb> part of the problem is markdown is quite horrible [6:25pm] <inimino> MisterN> eventually, sure[6:25pm] <MisterN> ashb> in fact, most of these "wiki languages" are[6:25pm] <inimino> yeah, it's definitely an ugly syntax[6:26pm] <MisterN> i hate textile[6:26pm] <MisterN> you know what i actually like best? bb-code [6:26pm] <MisterN> it's predictable...[6:26pm] <MisterN> and many many people know how to use it[6:27pm] <inimino> so I think an elegant declarative way of dealing with the ```-thing is to allow quantified variables ranging over a rule[6:27pm] <inimino> MisterN> BBCode is predictable but also ugly as plain text[6:27pm] <ashb> inimino> yeah that could work[6:28pm] <ashb> foo:SubRule or something similar?[6:28pm] <MisterN> inimino> ugly, maybe. but it doesn't drive me crazy. markdwon/textile/... do[6:29pm] <inimino> ashb> I am thinking of something like InTicks ? ?n. "`"{n} ( !("`"{n}) [^] )* "`"{n}[6:31pm] <ashb> oh like that[6:31pm] <ashb> inimino> oh btw, {x,} would be nice too[6:31pm] <ashb> since {x} is exactl x matches isn't it?[6:32pm] <ashb> yes[6:32pm] <inimino> yes[6:32pm] <inimino> yeah, I will add that back in[6:33pm] <ashb> inimino> matching a previous subrule is another thing i would like tho[6:33pm] <ashb> for the html tag rules[6:33pm] <ashb> http://github.com/jgm/lunamark/blob/master/lunamark/parser/generic.lua#L50-52 [6:33pm] <inimino> yeah, I am thinking of doing something similar for that[6:37pm] <inimino> so you would define a set[6:38pm] <inimino> balancedEls = { "div", ... }[6:39pm] <inimino> then use any element of that set in the rule[6:39pm] <inimino> BalancedHTMLElement ? ?el ? balancedEls. "<" el HTMLAttrs ">" HTMLContents "" el ">"[6:39pm] <inimino> something like that[6:40pm] <ashb> seems overly complex to me[6:41pm] <inimino> syntactically or otherwise?[6:42pm] <ashb> defining a set of tags - that is just a rule in of it self[6:42pm] <ashb> so why not just captrue a rule and say it must match that[6:42pm] <ashb> so its just the set part that seems ot[6:42pm] <inimino> hm, ok[6:43pm] <ashb> no?[6:43pm] <ashb> its your parser so feel free to tell me to STFU [6:43pm] <inimino> well, it's a subtly different semantic feeling at least[6:43pm] <inimino> the one case is basically a metalanguage for a set of related parse rules[6:43pm] <ashb> its also new syntax to learn and document[6:44pm] <inimino> but the semantics of parsing remains unchanged[6:44pm] <inimino> the other introduces a new parsing primitive[6:45pm] <inimino> I'll have to think about it for a while
Logs by date :