2009-10-20:
[8:47] <simono> hannesw_, fyi pythonistas regularly argue weither standardlib optparse or the 3rd party argparse are The Right Thing[8:47] <hannesw_> simono: and what do you think?[8:48] <simono> i like the stdlib .. and in helmang case i like the not-chaining variant[8:49] <simono> pythons argparse has the possibility to chain argument-resolution in the sense that depending on the 2nd argument a different parser can then evaluate the 3rd argument .. i never needed that. some discussion about limitations is documented here http://www.python.org/dev/peps/pep-0389/[9:19] <hannesw_> simono: what do you mean by stdlib?[9:20] <simono> standard library, sorry[9:20] <hannesw_> you mean python's?[9:20] <simono> yes[9:21] <hannesw_> which is optparse, or getopt? (sorry, I'm stupid)[9:21] <hannesw_> :)[9:21] <simono> optparse :) getopt is supersimple.. even i need more than that :)[9:22] <simono> what are the advantages of the chaining-method style? is it just a preference?[9:22] <hannesw_> ok, git it :)[9:22] <simono> or implementation difference as well?[9:22] <hannesw_> nothingk it's just the way narwhal does it[9:23] <hannesw_> i'm leaning to non-chaining as well[9:24] <simono> any thoughts on what will be supported and what not? i see -i and --init[9:25] <hannesw_> my idea is you pass a number of synonymous options (that may be -x short or --yyyy long variant)[9:26] <hannesw_> and then an option argument[9:26] <hannesw_> what do you think?[9:27] <simono> i just see nharwall calls that "bovid options"[9:27] <hannesw_> never get these puns[9:28] <simono> oh it's a pun? :)[9:28] <hannesw_> no idea, but i guess so :)[9:28] <hannesw_> where did you read that?[9:29] <simono> the post you linked to in opt parser email http://groups.google.com/group/narwhaljs/browse_frm/thread/ba640f65005fab57/81980eb64b4afa6a[9:30] <simono> i know we're talking about an *option* parser but we could support arguments as well, and pos argumetns[9:30] <hannesw_> hm, narwhal supports commands. which is like a sub-command to the main script[9:31] <hannesw_> for ordinary positional parameters, these are left in the system.args array when the parser is done, so there's not much we can simplify here[9:31] <simono> okay i was thinking that it's nice for the --help output do have some info about pos arguments[9:32] <hannesw_> right[9:32] * simono checking out narwhal commands[9:32] <hannesw_> in unrelated news: helma/jsdoc is learning to fly today: http://github.com/hns/helma-ng/commit/545ece3be2b700000bd66dba65b60f0be9d62d43[9:33] <hannesw_> it can recognize most export patterns now[9:33] <hannesw_> exports.foo = bar[9:33] <hannesw_> export("foo")[9:33] <hannesw_> var foo = exports.foo = bar[9:34] <hannesw_> so we'll have a nice, working jsdoc app by evening :)[9:35] <simono> hehe having sucha nice AST in rhino is an unfair advantage hemang has ;)[9:35] <hannesw_> true[9:36] <hannesw_> heck, it even recognizes let foo = exports.FOO = bar[9:39] <simono> :)[9:42] <simono> re optparser.. in conclusion i'm happy, but would add pos argument support[9:42] <simono> just to have everything in one place, documented, and optionally type-checked[9:42] <simono> and re: typechecked... plz don't copy all that from narwhal lol .number(),.integer(), .whole(), .natural(), .octal(), and .hex()[9:42] <hannesw_> you'll be happiest if you contribute that yourself! ;)[9:43] <simono> :) of course[9:43] <hannesw_> nope, I'm not going to implement things unless I need them (or can at least see people need them on a regular basis)[9:45] <simono> yes, i'm all in favor of do minimal thing that might be enough[9:45] <simono> when i need pos arguments, i'll send a patch :)[9:45] <hannesw_> great![10:08] <emilis_info> hmm[10:08] <emilis_info> what's the easiest way to save InputStream into a file (Helma NG)[10:15] <hannesw_> emilis_info:[10:16] <hannesw_> var file = require('file')[10:16] <hannesw_> file.write(stream.read())[10:16] <hannesw_> that should work, but I haven't tried.[10:35] <emilis_info> thanks[13:25] <simono> rino.optlevel=-1 not showing script stack.. is that rhino or helma?[15:06] <emilis_info> $#!+[15:09] <emilis_info> how do I convert a byte into BinaryString or something?[15:09] <emilis_info> or how do I write InputStream into a file?[15:10] <emilis_info> require("file").open(..., "wb") creates an object that does not accept anything I give it into write()[15:11] <emilis_info> I have a MSWord file in my InputStream. Now how do I save it... :-/[15:19] <emilis_info> doh... it seams I'll have to drop file.js and go for the Java classes[18:17] <zumbrunn> hannesw_: yt?[18:17] <zumbrunn> (regarding jline backspace behavior on macosx)[18:18] <zumbrunn> which doesn't seem to be playing nice[18:19] <hannesw_> zumbrunn: I'm here now[18:19] <hannesw_> so what does it do on macosx?[18:19] <zumbrunn> the delete key just doesn't do anything[18:20] <hannesw_> did it work before?[18:20] <zumbrunn> yes, sure[18:20] <hannesw_> hm, that's bad[18:20] <zumbrunn> I need that a lot ;-)[18:21] <hannesw_> yes. me too[18:21] <hannesw_> hm, ok, so this is a ubuntu-only bug i was trying to fix, or whatever[18:22] <hannesw_> ok, i'll try to make the fix linux-only, or whatever.[18:26] <hannesw_> zumbrunn: do you haven maven installed?[18:26] <hannesw_> if so, could you try building a clean jline git pull and see if it works ok on macosx?[18:26] <hannesw_> http://sourceforge.net/scm/?type=git&group_id=64033[18:27] <hannesw_> it should be:[18:27] <hannesw_> git pull git://jline.git.sourceforge.net/gitroot/jline/jline[18:27] <hannesw_> cd jline[18:27] <hannesw_> mvn package[18:28] <zumbrunn> wait a minute... or a few actually...[18:28] <zumbrunn> I have to go catch the funiulaire to go back up on my mountain :-)[18:29] <zumbrunn> will be up there in a bit and back online[18:29] <zumbrunn> if you will still be[18:29] <hannesw_> oh! ok :)[18:29] <zumbrunn> otherwise, we can work through it tomorrow[18:29] <hannesw_> no hurry[18:30] * hannesw_ is doing an image search for funiculaire[18:56] <hannesw_> hi zumbrunn[18:56] <hannesw_> you really have one of those? http://images.google.com/images?q=funiculaire&oe=utf-8&rls=org.mozilla:de:official&client=firefox-a&um=1&ie=UTF-8&sa=N&hl=en&tab=wi[18:57] <zumbrunn> yes :-)[18:57] <zumbrunn> well, nor my own personal one ;-)[18:58] <hannesw_> ok, that's what i meant :)[18:58] <hannesw_> err, not what i meant[18:58] <zumbrunn> http://funisolaire.ch/[18:58] <zumbrunn> lol[18:58] <hannesw_> do you have some time now?[18:59] <zumbrunn> just reading now what you wrote earlier...[18:59] <hannesw_> not much[18:59] <zumbrunn> got distracted there by someone else for a moment[18:59] <zumbrunn> and almost missed the funiculaire[18:59] <hannesw_> can you tell me what you get when you run the following:[18:59] <hannesw_> stty -g < /dev/tty[18:59] <hannesw_> and it was the last one?[19:00] <zumbrunn> yes it was![19:00] <zumbrunn> ok, I think I'll tackle that tomorrow morning[19:00] <hannesw_> oh wow, a night in the woods would't be too comfortable i guess :)[19:01] <zumbrunn> and build jline then[19:01] <zumbrunn> because I think dinner is on the table soon[19:01] <hannesw_> can you just run stty -g < /dev/tty for me quickly?[19:01] <hannesw_> (sorry)[19:01] <zumbrunn> np[19:01] <hannesw_> sorry, dinner is is more important :)[19:02] <zumbrunn> gfmt1:cflag=4b00:iflag=6b02:lflag=200005cb:oflag=3:discard=f:dsusp=19:eof=4:eol=ff:eol2=ff:erase=7f:intr=3:kill=15:lnext=16:min=1:quit=1c:reprint=12:start=11:status=14:stop=13:susp=1a:time=0:werase=17:ispeed=9600:ospeed=9600[19:02] <hannesw_> thanks! and bon appetit![19:02] <zumbrunn> :-)
In the channel now:
Logs by date: