[00:00] mw_ has joined the channel
[00:03] nano` has joined the channel
[00:07] Astro has joined the channel
[00:07] pengwynn has joined the channel
[00:10] JimBastard: _
[00:10] JimBastard: | |
[00:10] JimBastard: | |_ _ __ ___ _ __ __ __ __ _ _ __
[00:10] JimBastard: | __|| '_ ` _ \ | '_ \ \ \ / / / _` || '__|
[00:10] JimBastard: | |_ | | | | | || |_) | \ V / | (_| || |
[00:10] JimBastard: \__||_| |_| |_|| .__/ \_/ \__,_||_|
[00:10] JimBastard: | |
[00:10] JimBastard: |_|
[00:10] JimBastard: you there?
[00:10] tmpvar: hi
[00:10] JimBastard: LOL
[00:11] JimBastard: ;-)
[00:11] JimBastard: ive been home sick all day im going a little crazy
[00:11] tmpvar: haha
[00:11] JimBastard: i didnt have anything to say i just felt like ascii spamming you
[00:11] JimBastard: carry on
[00:13] Dmitry1 has joined the channel
[00:13] tmpvar: eh, I'm raging
[00:14] tmpvar: java has left me raw and unwilling
[00:15] [[zz]] has joined the channel
[00:20] paul___ has joined the channel
[00:24] geojeff has joined the channel
[00:26] hpoydar has joined the channel
[00:26] joshbuddy has joined the channel
[00:27] jan247 has joined the channel
[00:28] technoweenie: ryah: http://twitter.com/DEVOPS_BORAT/status/20509190634
[00:30] ryah: technoweenie: you at the bar?
[00:30] technoweenie: no
[00:30] technoweenie: gotta go pick up the kid in a bit, or id go
[00:31] ryah: are they still there? do you know
[00:31] technoweenie: i dont know
[00:31] rauchg_ has joined the channel
[00:31] technoweenie: i wasnt aware people were meeting up in a bar
[00:31] ryah: oh nm
[00:31] ryah: i thought it was some github thing
[00:32] technoweenie: oh, they're doing designer-related crap all week
[00:32] teemow has joined the channel
[00:32] daleharvey has joined the channel
[00:32] technoweenie: the big designer drinkup thing was last night though
[00:33] ryah: mjr_: beer?
[00:33] mjr_: oh man, I just got done making other plans
[00:33] mjr_: window missed by like 10 minutes.
[00:33] ryah: bummer
[00:34] mjr_: I could probably do something this weekend though, if there are noders socializing.
[00:35] ryah: mikeal: you dont happen to be in sf?
[00:35] technoweenie: i'll be available for socializing in a couple weeks
[00:35] mikeal: no at the moment
[00:35] mikeal: i'm at my house in oakland
[00:35] daleharvey: anyone suggest a basic router?
[00:35] mikeal: considering a siesta
[00:37] mjr_: ryah: we need some speed benchmarks like this for node: http://www.youtube.com/watch?v=nCgQDjiotG0
[00:37] mjr_: high speed explosions and shit
[00:38] mikeal: ryah: why?
[00:38] softdrink has joined the channel
[00:40] ryah: mikeal: going for bber
[00:40] mikeal: where?
[00:41] Ned has joined the channel
[00:41] ryah: rickenbackers on 2nd and Mission
[00:43] mjr_: I gotta run. Happy beer-ing.
[00:43] mikeal: that place makes me depressed sometimes
[00:43] mikeal: you going with the github guys?
[00:45] pquerna: i've been planning on margaritas
[00:48] mw_ has joined the channel
[00:55] dnyy: hrm, is it possible to re-require a file once the script is running? i tried doing foo = require(’foo’) (after foo is already set to the foo library), but it didn’t seem to work.
[00:56] twoism has joined the channel
[01:04] daleharvey: lol, is this you they are talking about ryah? http://memegenerator.net/The-Most-Interesting-Man-in-the-World/ImageMacro/1927775/Ive-never-written-a-distributed-database-but-if-I-did-Id-do-it-in-C
[01:07] _announcer: Twitter: "Two things I have to Tsukuranai next week, while you accumulate the experience today. . . . Naa node.js want to develop with (Boso" [ja] -- Yohei Sasaki. http://twitter.com/yssk22/status/20513052616
[01:07] mikeal has joined the channel
[01:08] daleharvey has joined the channel
[01:09] _announcer: Twitter: "Python fun but also because people do, just to touch because it is node.js ... yeah, seems like Hana Kono work motivation." [ja] -- Yohei Sasaki. http://twitter.com/yssk22/status/20513208560
[01:10] tekky has joined the channel
[01:10] jamescarr_ has joined the channel
[01:11] jamescarr_: hey... I just did an npm install jade and it completed successfully, but require('jade') throws a module not found
[01:11] jamescarr_: any ideas?
[01:11] jamescarr_: hmmm
[01:12] jamescarr_: my node libraries has jade-0.3.0.js but no jade.js
[01:13] wattz: vening
[01:13] wattz: evening
[01:14] davidwalsh has joined the channel
[01:15] saikat has joined the channel
[01:17] tpryme: jamescarr_: How do you know it installed successfully?
[01:18] jamescarr_: I fixed it
[01:18] jamescarr_: somehow it only installed with the version
[01:18] jamescarr_: so there was node jade.js, just jade-0.3.0.js
[01:18] jamescarr_: just rm'd and reinstalled
[01:18] dnolen has joined the channel
[01:20] geojeff has joined the channel
[01:21] mw_ has joined the channel
[01:22] mw_ has joined the channel
[01:24] daleharvey: anyone suggest a templating engine?
[01:24] wattz: ejs
[01:24] jesusabdullah: mustache.js
[01:25] wattz: php
[01:25] jesusabdullah: aka ejs
[01:25] jesusabdullah: >:P
[01:25] wattz: haha
[01:25] wattz: php suck!
[01:25] jesusabdullah: daleharvey: ejs is cool if you want to embed your logic. mustache is cool if you want complete separation of logic from template.
[01:26] _announcer: Twitter: "OH: "Let's do it in node.js." "Or, let's just shoot ourselves in the face. That would also be novel and not solve any of our problems." !fb" -- J-Strizzle. http://twitter.com/jhstrauss/status/20514296974
[01:26] daleharvey: ok cheers, its insanely simple substitution I am doing, ejs looks good
[01:28] joshdulac has joined the channel
[01:33] brianmario has joined the channel
[01:37] charlesjolley- has joined the channel
[01:38] Yuffster has joined the channel
[01:39] _announcer: Twitter: "I favorited a YouTube video -- Node.js: JavaScript on the Server http://youtu.be/F6k8lTrAE2g?a" -- Shashi Kumar. http://twitter.com/shashisatya/status/20515183998
[01:55] danielzilla has joined the channel
[01:56] benburkert has joined the channel
[01:57] hpoydar has joined the channel
[02:00] dipser_ has joined the channel
[02:03] joshbuddy has joined the channel
[02:03] _announcer: Twitter: "Hacking it up with node.js and couchdb - Yesterday, while being super-productive in my main project, I... http://tumblr.com/xryf4z6fy" -- Luis Felipe Borjas. http://twitter.com/lfborjas/status/20516732548
[02:07] jamescarr_: quiet tonight
[02:08] jamescarr_: does express have some way of filtering fields submitted?
[02:09] technoweenie has joined the channel
[02:11] wattz: yo
[02:12] Tim_Smart has joined the channel
[02:13] Tobsn: its friday
[02:13] markwubben has joined the channel
[02:13] Tobsn: probably everyone is home
[02:14] wattz: so std::string breaks String::New() :(
[02:15] isaacs has joined the channel
[02:16] mw_ has joined the channel
[02:17] mikeal has joined the channel
[02:21] jamescarr: it used to be I would be out from 5pm till 4am Thursday through Saturday
[02:21] jamescarr: having kids changes that for 95% of weekends ;)
[02:21] meso has joined the channel
[02:23] tjgillies has joined the channel
[02:24] mattly has joined the channel
[02:24] benburkert has joined the channel
[02:27] wattz: jamescarr: i concur.
[02:28] wattz: taking a break from my mysql driver to work on something else nodelicious
[02:28] saikat has joined the channel
[02:31] daleharvey: is there really no nice way to reload the server during development, I dont mind if it just completely kills it, but this workflow of killing / restarting manually is killing me
[02:32] jamescarr: yes
[02:32] jamescarr: it does!
[02:32] jamescarr: Id like to just save and see it
[02:32] jamescarr: hmmm... maybe...
[02:32] jamescarr: maybe something that stops and starts on fs change using fs.watch?
[02:33] softdrink has joined the channel
[02:36] sh1m has joined the channel
[02:39] Aria has joined the channel
[02:42] wattz: jamescarr: i tried to do tht
[02:42] wattz: restarting the process is painful
[02:42] wattz: i ended up writing a bash script
[02:42] wattz: and it didn't really work
[02:45] skampler has joined the channel
[02:46] wattz: i wish v8 had implimented String replace
[02:46] jamescarr: it does?
[02:46] jamescarr: it does
[02:46] wattz: eh?
[02:47] wattz: don't see it in v8's source
[02:47] jamescarr: "foo".replace(/fo/, "ba") works
[02:47] jamescarr: in both node and chrome
[02:47] wattz: in C++.
[02:47] wattz: String::New("Hello World").replace("Hello", "poo");
[02:47] jamescarr: ah
[02:48] _announcer: Twitter: "Very impressed with everything I am reading about Node.js... http://bit.ly/dqOq3c" -- Tal Broda. http://twitter.com/talbroda/status/20519602612
[02:50] JimBastard has joined the channel
[02:51] jamescarr: interesting... in chrome if you type 'gith' [tab] you can search github
[02:51] JimBastard: elliottcable: what
[02:52] daleharvey: bah, bitten on the ass by async stuff now :(
[02:52] Tobsn: JimBastard, got the www-auth header figured out?
[02:52] shimondoodkin: jamescarr: it is not working
[02:52] JimBastard: Tobsn: i think that link was enough, i gotta add some auth to our rest api
[02:53] Tobsn: ah i see
[02:53] Tobsn: yeah its not hard
[02:53] Tobsn: i think somehow you can even had some hashing stuff but you'll see
[02:53] Tobsn: if you want i can build a simple www-auth.js on the weekend
[02:53] Tobsn: i did a lot with www-auth back in the day
[02:54] Tobsn: pretty offtopic - does someone know how the cables in bose headphones work? the one on my left piece just ripped out - so i separated the cable and try to get it back together but im not even getting any sound if i just hold them together... pretty weird.
[02:56] Tobsn: hmm well, im gonna get home
[02:56] Tobsn: brb
[02:56] JimBastard: Tobsn: no point setting up the auth unless you do it as middle ware or as part of a router
[02:58] knuckolls has joined the channel
[02:59] jamescarr: shimondoodkin, huh??
[02:59] shimondoodkin: never mind..
[02:59] jamescarr: maybe it's just when using the latest like I am?
[03:00] shimondoodkin: probably it is an autocomplete what you have
[03:01] jamescarr: not really... it says "Search Github:"
[03:01] saikat: anyone know of any algorithm that lets you calculate the checksum of a JS object but without regard to the order of properties in the object?
[03:01] saikat: so check({"x" : 90, "y" : 100}) == check({"y" : 100, "x" : 90})
[03:01] saikat: the naive way i was thinking of doing it was just alphabetizing the properties and then checksumming the JSON.stringify
[03:01] saikat: but i wonder if there is some more standard/better way of doing it
[03:02] shimondoodkin: maybe with === ?
[03:02] saikat: i want a checksum though
[03:02] saikat: not just deep comparison of objects
[03:03] saikat: because i don't want to send the entire object over the wire each time - basically i'm sending deltas made to the object
[03:03] saikat: and a checksum to make sure that something didn't get corrupted
[03:03] saikat: also, === wouldn't do deep comparison
[03:03] shimondoodkin: how lare is your object?
[03:03] saikat: they can get big
[03:03] saikat: up to 4 or 5 megs
[03:04] saikat: it's the JSON of teh project structure for projects people are saving using my tool
[03:04] saikat: and i'm going to be sending deltas on each action in the tool
[03:04] saikat: real-time and all that =)
[03:05] shimondoodkin: maybe my source might help
[03:05] shimondoodkin: http://github.com/shimondoodkin/nodejs-clone-extend/blob/master/merger.js
[03:07] teemow has joined the channel
[03:07] daleharvey: weird, having a problem sending the results when I using node-formidable
[03:07] daleharvey: http://pastebin.me/2d16852ab6cf09a41ebf446f5d871309
[03:07] saikat: hm, i'll tak a look, thanks shimondoodkin
[03:07] shimondoodkin: saikat:you might have to have two copies of your object and make a difference object
[03:08] saikat: shimondoodkin: well i have a copy of the object on the client and on the server
[03:08] saikat: the client makes changes to his copy
[03:08] saikat: sends the diffs (which i have)
[03:08] saikat: and then the server applies the diffs
[03:08] saikat: and ideally
[03:08] saikat: tells the client "acknowledged, here is the checksum after i applied the diffs"
[03:08] saikat: so the client knows nothing messed up
[03:09] shimondoodkin: so the client should have two copies, a wan that was sent last and the modified one
[03:09] saikat: since there is some processing that happens to the diff before it gets applied on the server to resolve conflicts from other clients trying to send diffs
[03:09] shimondoodkin: s/ wan/one
[03:09] saikat: shimondoodkin: that's fine, but i still need a way to send a checksum from the server to the client
[03:09] saikat: and i wouldn't need an entirely new copy on the client - just the checksum of the last modified
[03:10] shimondoodkin: can you make an event: onchange - see if in deed there ware changes
[03:11] shimondoodkin: saikat if ware then mark as modified or increase version
[03:11] shimondoodkin: in my code you can see how i do recurion (copy the extend function)
[03:12] saikat: yeah
[03:12] saikat: thing is
[03:12] saikat: i
[03:12] saikat: already have the code that finds the diffs
[03:12] saikat: that were made on the client
[03:12] saikat: and sends them
[03:12] saikat: i just need a way to verify they were applied correctly on the server
[03:12] shimondoodkin: ahh ok
[03:12] saikat: and to do that, i would ideally create a checksum of the object on the server
[03:13] saikat: and compare it to a checksum of the object on the client
[03:14] shimondoodkin: you can do serialize and crc32
[03:14] shimondoodkin: JSON.stringify and http://www.google.com/search?hl=en&q=crc32+javascript&aq=f&aqi=g1&aql=&oq=&gs_rfai=
[03:14] wattz: eh, is Boost the only good regex lib out there :(
[03:15] shimondoodkin: maybe http://www.pcre.org/
[03:15] saikat: shimondoodkin: i know - my point is i would like a way to take a checksum that doesn't care about the order of properties
[03:16] saikat: doing crc32(JSON.stringify({x : 100, y : 90})) !== crc32(JSON.stringify({y : 90, x : 100}))
[03:16] saikat: i was wondering if there is anything out there that would make that above statement equal
[03:16] saikat: other than my naive approach of simply
[03:16] dannycoates has joined the channel
[03:16] saikat: alphabetize all the properties before serializing
[03:18] shimondoodkin: yea then you have to sort it before that. i dont know aeorkiong example of that maybe somebody else knows...
[03:18] joshbuddy has joined the channel
[03:20] isaacs has joined the channel
[03:20] daleharvey: any nodeformidable users around?
[03:21] shimondoodkin: daleharvey: i found that node-formidable is buggy for me
[03:21] daleharvey: yeh finding that myself
[03:21] pkrumins: any node.js c++ guru in here?
[03:22] wattz: sup?
[03:22] wattz: pkrumins: how goes it
[03:22] wattz: i have been doing node c++ for 3 days straight now @_@
[03:22] wattz: lol
[03:22] pkrumins: oh sweet
[03:22] wattz: trying to find a smaller subsitute for boost regex lib
[03:22] pkrumins: try some cool C lib
[03:23] pkrumins: there are like a dozen small C libs.
[03:23] pkrumins: also don't forget V8 has a regex engine in it
[03:23] pkrumins: so you don't need any
[03:23] wattz: pkrumins: i was looking through the source, and doc on usage?
[03:24] pkrumins: no docs whatsoever
[03:24] wattz: pkrumins: put the start of my mysql node c++ driver up on github
[03:24] pkrumins: v8 is trial and error discovery
[03:24] wattz: im seeing that
[03:24] wattz: regex.h is the system C lib
[03:24] wattz: 4 functions, lol
[03:24] pkrumins: ha
[03:24] pkrumins: can you use it?
[03:24] wattz: i just need to match
[03:24] wattz: so yeah
[03:24] wattz: should be able to
[03:25] wattz: pkrumins: http://github.com/wess/Cargo
[03:25] wattz: not using the regex here
[03:25] wattz: for something else
[03:25] shimondoodkin: daleharvey: i decied to use multipart-js http://gist.github.com/512378
[03:26] wattz: pkrumins: have you used v8's regex?
[03:27] pkrumins: nope
[03:27] polotek has joined the channel
[03:27] shimondoodkin: daleharvey: i had no chance to test it for consistensy of integration with httputils, but it did worked when i did an it in an example
[03:27] pkrumins: i guess create a V8 regex object
[03:27] pkrumins: then call some functions
[03:27] daleharvey: shimondoodkin: cool, thanks for the tip
[03:28] wattz: lol
[03:28] jamescarr_: yeah, I really really wish we could get a better "live" development mode
[03:28] jamescarr_: so I dont have to keep restarting to see my changes
[03:28] isaacs: shimondoodkin: rly?
[03:29] isaacs: shimondoodkin: i thot node-formidable was like, way way better than mine
[03:30] daleharvey: I havent seemed to be able to find a way to have nodeformidable process multiple file uploads and send back a result when they are all finished
[03:31] isaacs: daleharvey: i see
[03:31] khug has joined the channel
[03:32] polotek: daleharvey: you should definitely let felixge know about that
[03:32] polotek: I think he's pretty committed to making node-formidable rock
[03:32] daleharvey: ok cool, will do
[03:32] shimondoodkin: jamescarr_: it restarts node for you.
[03:32] wattz: i guess i could use this
[03:32] wattz: http://code.google.com/p/v8/source/browse/trunk/src/jsregexp.h
[03:33] polotek: jamescarr_: restarting builds character
[03:33] shimondoodkin: isaacs: yes isaacs that so
[03:33] shimondoodkin: i saw it integrated in connect ind thouught how is that working
[03:34] hpoydar has joined the channel
[03:34] shimondoodkin: s/ ind/and
[03:34] _mythz has joined the channel
[03:35] shimondoodkin: maybe there is a good version of node-formidable
[03:35] _announcer: Twitter: "Express - node web #framework http://goo.gl/fb/ukleW #nodejs" -- Delicious Over 50. http://twitter.com/readelicious/status/20522652174
[03:36] isaacs: shimondoodkin: well, node-formidable is powering transload.it, so I know there's something like that working.
[03:37] isaacs: shimondoodkin: and it's WAY faster than multipart-js
[03:37] isaacs: shimondoodkin: but i'd really like to make multipart-js work properly, just not very high up on the priority list, sadly.
[03:37] isaacs: shimondoodkin: for me, it goes: npm, then node itself, then nave, then everything else.
[03:38] polotek: isaacs: I thought nave was "done" ;)
[03:38] hpoydar has joined the channel
[03:38] isaacs: polotek: it mostly is. tj came by and suggested a bunch of interesting things, and gave me a patch that started the fires going a bit more.
[03:38] isaacs: polotek: so, i guess, it "was"
[03:38] jesusabdullah: nave is kinda like virtualenv?
[03:38] polotek: it's no longer "stale"
[03:38] isaacs: jesusabdullah: yes.
[03:39] jesusabdullah: neat!
[03:39] isaacs: polotek: yep. all it takes is a patch to get the ball rolling sometimes :)
[03:39] isaacs: once npm with env-config is live, i'll update it to use that, maybe, too
[03:39] polotek: I need to start using nave actually. I've been rocking the bleeding edge for a while now
[03:39] polotek: git pull every day
[03:40] isaacs: polotek: yeah, i do that, too. i mostly use nave when someone says "hey, this doesn't work in 0.1.99" or somethign
[03:40] polotek: isaacs: yeah I know. but my bugs are mostly, "this doesn't compile... at all"
[03:40] isaacs: hehe
[03:41] polotek: I'm so bad at the build stuff
[03:42] Guest45279 has joined the channel
[03:43] paul___ has joined the channel
[03:46] brianmario has joined the channel
[03:46] shimondoodkin: about multipart-js:i have started to make mulipart-js to look more like a stream. http://github.com/shimondoodkin/multipart-js/blob/master/lib/parse.js
[03:47] joshdulac: sup everyone
[03:48] isaacs: shimondoodkin: i see.
[03:49] isaacs: shimondoodkin: so, i really would like to make it look like one of those "parsing writable stream that emits an event with a readable stream" things
[03:49] isaacs: shimondoodkin: like http
[03:49] isaacs: shimondoodkin: p.on("part", function (part) { sys.pump(part, stdout) }); sys.pump(stdin, p)
[03:51] shimondoodkin: yea i tried that , the stream like staff ware missing in the part variable althou it was exists in the parser
[03:51] shimondoodkin: the part should some how to inherent the event emiter
[03:51] _mythz has left the channel
[03:52] Tim_Smart has joined the channel
[03:53] Ned has joined the channel
[03:55] shimondoodkin: there awas a hidden benefit of using part.ondata.. i could easyly decide if i will write a file that time or i will append text to a variable
[03:57] cardona507 has joined the channel
[03:58] isaacs: shimondoodkin: well, the part should be a Stream, not just an EventEmitter.
[03:58] isaacs: shimondoodkin: that is, it should implement the same method/event interface as net.Stream
[03:59] isaacs: shimondoodkin: or fs.FileReadStream, or the "req" object that you get from an http server's "connect" event
[03:59] isaacs: etc
[03:59] twoism has joined the channel
[04:00] shimondoodkin: isaacs: from looking in the node lib modules if i remember well the stream is based on event emitter
[04:00] shimondoodkin: isaacs: and it creates some baffers
[04:00] isaacs: gotta run, dinner time.
[04:00] shimondoodkin: s/baffers/buffers
[04:01] Tim_Smart: I want one that creates waffles :/
[04:01] victorstan has joined the channel
[04:01] shimondoodkin: i have a morning time
[04:02] shimondoodkin: waffles are yummy
[04:05] shimondoodkin: ACTION eating some chocolate with air bubbles
[04:08] ashleydev has joined the channel
[04:10] airportyh has joined the channel
[04:14] nano` has joined the channel
[04:17] ezmobius has joined the channel
[04:17] mjr_ has joined the channel
[04:18] benburkert has joined the channel
[04:28] _announcer: Twitter: "Tagging Geddy v0.1.0. Yep, time for a release. #nodejs #node.js" -- Matthew Eernisse. http://twitter.com/mde/status/20526011093
[04:31] _announcer: Twitter: "created http://github.com/arthurblake/nodeJava a port of jabsorb for nodeJs!" -- Arthur Blake. http://twitter.com/arthurblake/status/20526210868
[04:32] khug has left the channel
[04:33] x_or has joined the channel
[04:33] _announcer: Twitter: "starting my first node.js based project :D" -- Aaron Barnes. http://twitter.com/spastk/status/20526339718
[04:33] robotarmy has joined the channel
[04:34] cardona507 has joined the channel
[04:34] _announcer: Twitter: "@voodootikigod is twitter in flame because announcement couchdb is rewrite in node.js. I LIKE VERY MUCH!" -- DevOps Borat. http://twitter.com/DEVOPS_BORAT/status/20526423900
[04:37] x_or has joined the channel
[04:39] aryounce has joined the channel
[04:40] polotek: wow ^
[04:41] aniero: wow, the node yaml parser is awful
[04:41] jesusabdullah: Yeah, it needs some work
[04:41] jesusabdullah: JSON parsing works alright though
[04:42] Dmitry1: Is there good node HTML parser?
[04:42] aniero: jesusabdullah: nyrgh. gonna have to hack this to get it to work right. it makes some bad assumptions about normally well-formed yaml, or at least well-formed-enough yaml that other systems can use it (java, ruby)
[04:43] jesusabdullah: aniero: You're stuck with yaml?
[04:43] jamescarr: if anything, the js1k entries make me realuze just how unworthy I am :)
[04:44] polotek: Dmitry1: there are a few
[04:44] polotek: try libxmljs
[04:44] polotek: there's also node-htmlparser
[04:44] Dmitry1: polotek: are they follow HTML5 parsing rules?
[04:44] jamescarr: no
[04:44] aniero: jesusabdullah: yes, i'm pulling some system config files from some servers
[04:44] Dmitry1: bugger :(
[04:45] polotek: http://github.com/aredridel/html5
[04:45] aniero: jesusabdullah: and we use those configs in ruby and java with no problems. just seems the yaml parser for node is overly brittle and has poor expectations of possible input
[04:45] aniero: jesusabdullah: but no worries. i can fork and fix it... next yak to shave, i guess!
[04:45] polotek: Dmitry1: I haven't actually used it but I know he's working pretty hard on it
[04:46] Dmitry1: polotek: Looking good. Thanks :)
[04:52] jamescarr_: hey guys... any suggestions for a quick and dirty jquery star voting plugin?
[04:54] _announcer: Twitter: "Node.js: JavaScript on the Server: I favorited a YouTube video: Google Tech Talk July 28, 2010 ABSTRACT Presente... http://bit.ly/a0PUPB" -- Shashi Kumar. http://twitter.com/shashisatya/status/20527579977
[04:57] jesusabdullah: aniero: Yeah, exactly. Actually, I think everyone would appreciate a moar betters yaml module for node.
[04:59] deepthawtz has joined the channel
[05:03] SamuraiJack has joined the channel
[05:07] benburkert has joined the channel
[05:08] benburkert has joined the channel
[05:08] Yuffster has joined the channel
[05:17] bpot has joined the channel
[05:25] aryounce: So I'm about to submit a one line patch
[05:25] aryounce: do I really have to go through this? http://nodejs.org/cla.html
[05:25] mjr_: you really do
[05:26] mjr_: it's a super easy web form though
[05:26] shreekavi has joined the channel
[05:26] aryounce: mjr_: This will be a first. What's the reason?
[05:26] mjr_: lawyers live in this world.
[05:26] mjr_: It's happening on more and more projects these days.
[05:26] aryounce: interesting
[05:27] mjr_: Thanks for working on a patch though.
[05:28] bradleymeck1 has joined the channel
[05:28] bradleymeck1: is there a way to have an http.Server fall back to act like a net.Server on error?
[05:29] aryounce: mjr_: No worries. It seems a bit much for submitting a typo fix
[05:30] mjr_: bradleymeck1: what would that mean?
[05:30] mjr_: and why do you want that?
[05:31] teemow has joined the channel
[05:31] bradleymeck1: i want to support the incredibly stupid flash socket policy.xml file, where instead of sending an http request like a sane spec, it sends "" in raw tcp
[05:32] aryounce: Alright, patch submitted
[05:32] aryounce: g'night
[05:33] mjr_: bradleymeck1: well, that sucks
[05:33] mjr_: Because node will drop the connection when the HTTP parser hits an error.
[05:33] mjr_: Do any other HTTP servers support this madness?
[05:34] bradleymeck1: apparently since its in use
[05:35] polotek: bradleymeck1: you can get the underlying tcp stream from http
[05:35] bradleymeck1: heck, a way to pass of a request to the http.Server from a net.Server would work too
[05:35] bradleymeck1: i can get it but parse failing will kill it
[05:36] mjr_: Yeah, you'd have to start with a net.server and somehow convert into an http server.
[05:36] polotek: yeah I was considering
[05:36] polotek: whether you could catch things on the net stream
[05:36] polotek: and keep them from going to the http parser
[05:36] mjr_: I was actually lobbying for some sort of parser error handling recently.
[05:36] polotek: if they look like the flash stuff
[05:37] bradleymeck1: yea, just no idea how to invoke the http parser manually
[05:37] polotek: bradleymeck1: but I actually like your idea better
[05:37] polotek: deal with the net stream
[05:37] polotek: and when you get incoming that looks like http
[05:37] polotek: "upgrade" it to http for that request
[05:37] polotek: and drop back down when it's done
[05:37] polotek: I have no idea how that would work
[05:37] polotek: :)
[05:38] polotek: bradleymeck1: honestly it sounds like the flash tcp is a special case though right?
[05:38] mjr_: bradleymeck1: can't you just run the policy serving thing on another port?
[05:38] polotek: mjr_: word, that was my next thought
[05:38] mjr_: like port 843 is for that, right?
[05:39] bradleymeck1: mjr_ i dont want to run as root, anywho, girl is sleepy i take my leave
[05:39] mjr_: This whole "privileged ports" thing is so quaint.
[05:40] mjr_: In this modern world of personal Unix machines and VPS.
[05:41] bryanl has joined the channel
[05:42] kriskowal has joined the channel
[05:44] saikat has joined the channel
[05:48] jamescarr_: ah I love floats
[05:48] polotek has left the channel
[05:48] jamescarr_: makes my text float away to the great beyond
[05:49] jamescarr_: F it... I'll just put this shit in a table for now
[05:49] kriskowal has joined the channel
[05:49] jamescarr_: let some designer make it look better
[05:49] mjr_: I love me some tables
[05:49] cardona507: tables... shudder
[05:49] mjr_: As soon as CSS has a way to evenly distribute horizontal space, I'll get rid of my tables.
[05:50] jesusabdullah: hah
[05:51] joshbuddy has joined the channel
[05:54] _announcer: Twitter: "Javascript Guru Needed to setup Node.js Web Server on EC2, PSD to HTML/CSS - oDesk http://ping.fm/6Lswg" -- cebu_photo_editing. http://twitter.com/cebu_photo_edit/status/20530840362
[05:56] brianmario has joined the channel
[06:00] _announcer: Twitter: "Javascript Guru Needed to setup Node.js Web Server on EC2, PSD to HTML/CSS - oDesk ---------------------------------- http://bit.ly/dlwaSq" -- cebu smartbro commun. http://twitter.com/cebu_smartbro/status/20531146517
[06:08] _announcer: Twitter: "Oh boy. This node.js thing is really taking off isn't it?" -- Micheil Smith. http://twitter.com/miksago/status/20531554309
[06:11] steadicat has joined the channel
[06:11] satori_ has joined the channel
[06:19] jamescarr has joined the channel
[06:20] benoitc has joined the channel
[06:22] benoitc has joined the channel
[06:25] benburkert has joined the channel
[06:27] aho has joined the channel
[06:32] shreekavi has left the channel
[06:33] shreekavi has joined the channel
[06:39] _announcer: Twitter: "I wonder if there's a node.js driver for mongodb that supports gridfs." -- Micheil Smith. http://twitter.com/miksago/status/20533046864
[06:41] jakehow has joined the channel
[06:42] _announcer: Twitter: ". @ Tricknotes Mr. LT. "Server Side JavaScript - node.js Introduction" # sapporojs" [ja] -- すずきゆうすけ. http://twitter.com/yuskesuzki/status/20533157817
[06:44] bronson has joined the channel
[06:58] _announcer: Twitter: "node.js + express, but interesting. take some time getting used to, Na" [ja] -- Yohei Sasaki. http://twitter.com/yssk22/status/20533885527
[06:58] admc has joined the channel
[07:03] benburkert has joined the channel
[07:06] meso_ has joined the channel
[07:09] jpld has joined the channel
[07:14] _announcer: Twitter: "Sassy Haiku (sass and haml in django) - So yesterday I wrote a template for a node.js app in haml, and... http://tumblr.com/xryf5qprf" -- Luis Felipe Borjas. http://twitter.com/lfborjas/status/20534629531
[07:16] jamescarr_ has joined the channel
[07:22] dgathright has joined the channel
[07:23] pdelgallego has joined the channel
[07:27] jetienne has joined the channel
[07:31] peutetre has joined the channel
[07:41] Egbert9e9 has joined the channel
[07:42] teemow has joined the channel
[07:42] zomgbie has joined the channel
[07:43] mscdex has joined the channel
[07:47] sveimac has joined the channel
[07:50] derferman has joined the channel
[07:55] tisba has joined the channel
[07:57] konobi: do any of the express-like frameworks support chained actions (controllers, routes, etc)
[07:57] V1 has joined the channel
[08:07] slaskis has joined the channel
[08:08] dnolen has joined the channel
[08:11] markwubben has joined the channel
[08:30] zomgbie has joined the channel
[08:36] _announcer: Twitter: "node.js certainly cool (I really like javascript) but I also love python * python would be a browser - would have written on it *" [ru] -- Peter Jah. http://twitter.com/Unnell/status/20538105888
[08:42] aho has joined the channel
[08:44] ako has joined the channel
[08:50] adelcambre has joined the channel
[08:50] _announcer: Twitter: "@ LocumRu case and you do not want to enter the hosting for node.js + redis? =) It would be interesting to experiment with them)" [ru] -- Peter Jah. http://twitter.com/Unnell/status/20538692161
[08:52] jamescarr_ has joined the channel
[08:54] _announcer: Twitter: "GoogleTalk vid w Ryan Dahl the creator of node.js than I found impressive - http://weyou.us/z/8u @node.js @javascript" -- Timothy Tocci. http://twitter.com/timothytocci/status/20538868358
[08:57] tmedema has joined the channel
[09:16] ctp has joined the channel
[09:20] astrolin has joined the channel
[09:23] SamuraiJack has joined the channel
[09:26] stagas: what does 'get' do? http://github.com/creationix/nstore/blob/master/lib/nstore.js#L485-488
[09:29] _announcer: Twitter: "@_tomash weekends are too f*n' short. I have to choose between hacking a proxy for s3 uploads in node.js and a classic "rails side-project"." -- Jacek Becela. http://twitter.com/jacek_becela/status/20540275222
[09:29] jetienne: stagas: it is a getter
[09:29] jetienne: if you do a +foo.bar
[09:30] jetienne: the getter for bar will be called, you intercept the reading of the var
[09:31] stagas: I see
[09:34] jetienne: ok we need this .profile/main() feature in node
[09:46] voxpelli has joined the channel
[09:51] jetienne: and i want a actual commonjs loader in my browse
[09:51] jetienne: santa please :)
[09:51] jamescarr_: awesome :)
[09:51] jamescarr_: check it out: http://is.gd/e7g6u
[09:51] jamescarr_: conways game of life using the canvas tag
[09:52] jamescarr_: (although my laptop gets hot when it runs )
[09:54] charlesjolley- has joined the channel
[09:59] jetienne: jamescarr_: run a demo somewhere
[09:59] jamescarr_: just check it out and open the html file... doesnt require a server
[10:00] jamescarr_: I should submit it to the 1kjs competition
[10:00] jamescarr_: (though I know it wont win)
[10:02] jetienne: http://js1k.com/demo/39 <- this one is doing rgb separatly
[10:02] astrolin has joined the channel
[10:02] jetienne: how to do that in canva ?
[10:03] stagas: how do you close the http request without responding anything, no headers etc? res.end() sends 'undefined'
[10:04] jetienne: stagas: client.connection.destroy() will close the connection
[10:05] konobi: where's the low level net stuff accessable from these days? (recvmsg, socketpair, etc)
[10:07] stride: doesn't .end('') work?
[10:07] stagas: jetienne: thanks, req.connection.destroy() did it
[10:07] stagas: stride: no it sent out 'undefined' also
[10:08] stagas: stride: probably 'undefined' is when it tries to send the headers
[10:08] stride: hm, ok
[10:09] stagas: but I wanted a one-way get request, I needed no acknowledgement from the client, so no reason to send back anything I guess
[10:10] n3v3le1 has joined the channel
[10:10] konobi: that's sort of against the http way of doing things... you should probably respond with something
[10:10] V1 has joined the channel
[10:11] konobi: like a 202 response or something
[10:12] konobi: or a 204 i suppose
[10:12] stagas: konobi: browsers can handle it, they don't throw errors if you don't respond anything, so why should I waste bandwidth and make the client slower
[10:13] jetienne: stagas: you do what you want. but not replying anything doesnt seem clean to me. and wasting bw seems not a good reason. just gut feeling
[10:13] jetienne: you do what you want
[10:14] konobi: oh noes a few bytes!
[10:14] stagas: it's a preference then :)
[10:15] konobi: you waste far far more in receiving extraneous client headers
[10:15] jetienne: not sure this is a worthy debate :)
[10:15] stagas: I'm only logging an action
[10:16] ewdafa has joined the channel
[10:33] rnewson has joined the channel
[10:37] fredsa: Is there a function in node that can replace the following?:
[10:37] fredsa: function file_exists(filename) {
[10:37] fredsa: try { var file = fs.statSync(filename); }
[10:37] fredsa: catch (e) { return false; }
[10:37] fredsa: return file instanceof fs.Stats? file.isFile() : false;
[10:37] fredsa: }
[10:38] zz_foca has joined the channel
[10:40] jamescarr_: why are you using sync?
[10:41] fredsa: cos it's easier
[10:41] loxs has joined the channel
[10:41] fredsa: imagine an async version if it makes you feel better :)
[10:42] maartenm has joined the channel
[10:42] maartenm: hello, I'm kind of confused.. how do I serve non-templated simple html files in express/node.js?
[10:42] maartenm: added a view "test.html" but I can't serve it, 'module 'html' not found'
[10:45] shreekavi has joined the channel
[10:47] mape: maartenm: try ejs
[10:47] mape: npm install ejs
[10:47] mape: set ejs as engine and rename to test.ejs
[10:48] maartenm: hmm, okay..
[10:48] loxs: is there some way to run a node.js application in "dev mode" so that it detects code changes and restarts itself?
[10:48] maartenm: don't you think it's odd that it cannot use nil engine?
[10:48] maartenm: loxs: google for "hot code node.js".. I saw someone with a short workaround
[10:48] maartenm: loxs: but not like Rails or anything
[10:49] maartenm: loxs: using express the views aren't cached though
[10:49] loxs: i'm not using express
[10:49] loxs: thanks
[10:50] maartenm: loxs: http://blog.romeda.org/2010/01/hot-code-loading-in-nodejs.html
[10:50] maartenm: haven't tried it.. one of the good things about nod eis that it starts nearly immediately
[10:52] maartenm: mape: no more errors..
[10:52] maartenm: but it doesn't render anything
[10:52] maartenm: oh wait
[10:52] maartenm: I left my layout.ejs empty
[10:52] maartenm: probably needs an injection point
[10:53] mape: yeah add <%- body %> in layout.ejs
[10:53] FransWillem has joined the channel
[10:53] maartenm: ok works
[10:54] maartenm: kind of annoying though if you want to serve some static page sused in othe rprojects
[10:55] loxs: what is the hottest "minimalistic" web framework for node.js?
[10:55] maartenm: but ejs is close to erb I think I'll like the syntax
[10:55] loxs: I mean, not express :)
[10:55] mape: I wand djangos template system in express
[10:55] maartenm: http://wiki.github.com/ry/node/modules
[10:56] mape: *want
[10:56] maartenm: loxs: have only tried Picard and Meryl
[10:56] maartenm: not sure if they're 'hot'.. I don't exactly consider express as bloatware either
[10:57] maartenm: since it starts in about 2 microseconds
[10:57] loxs: I'm not saying it's bloatware, but it's too big for me
[10:57] loxs: if I compare it with python, I don't want something like Djano, but rather something like flask
[10:57] maartenm: I always liked the name "picard"
[10:57] maartenm: yeah I know
[10:58] maartenm: Meryl's pretty big too
[10:58] loxs: and I'm not saying that Django is bloatware either :)
[10:58] _announcer: Twitter: "Thingler - real-time collaborative with all http://bit.ly/d7lRTD Node.js & CouchDB" [es] -- Justin Vincent. http://twitter.com/justinvincent/status/20543870853
[10:58] maartenm: I'd just pick the micro-framework with the most recent commits and the smallest base
[10:59] maartenm: maybe you can automate the git checkouts to come to a conclusion :)
[11:02] maartenm: the express documentation is pretty thin
[11:04] MrNibbles: why is the safari javascript engine so much faster at rendering my demo than the chrome engine
[11:04] MrNibbles: its really pissing me off
[11:04] MrNibbles: i cant work out why
[11:04] MrNibbles: the chrome engine is generally faster
[11:04] MrNibbles: im thinking its not the math, its the writing of the pixel data
[11:04] MrNibbles: http://www.webnibbles.co.uk/dropbox/js1k/ <-- soo much smoother in safari
[11:05] stagas: you were right about not returning anything on http, the browser thinks it may be broken and retries 5 times
[11:06] maartenm: MrNibbles: I get about 18fps on chrome mac
[11:06] MrNibbles: maartenm: try it in safari
[11:06] MrNibbles: you will get about 40 fps
[11:06] _announcer: Twitter: "text extraction library node.js transplant,, easy work?" [ja] -- Yohei Sasaki. http://twitter.com/yssk22/status/20544233419
[11:07] maartenm: source is kind of obfuscated so I'm not sure what's going on
[11:07] maartenm: 1k demo contest?
[11:07] MrNibbles: yeah
[11:07] MrNibbles: hang on ill upload the non obfuscated
[11:07] maartenm: maybe safari goes hardware
[11:07] MrNibbles: ok its up
[11:07] mscdex: MrNibbles: does Safari use the GPU or something extra fancy like that that would give a boost perhaps?
[11:08] MrNibbles: i did think perhaps that was the case, but i cant find any info about it online
[11:08] maartenm: tried setInterval instead of timeout?
[11:08] jetienne: safary goes hw on some stuff like 3D css
[11:08] maartenm: yeah only translate3d I think.. not this kind of stuff
[11:08] maartenm: too complex for gpu
[11:08] jetienne: http://www.satine.org/archives/2009/07/11/snow-stack-is-here/3
[11:08] maartenm: did you profile it using webkit inspector?
[11:09] MrNibbles: maartenm: setinterval will kill your browser :P
[11:09] mscdex: it's mentioned here: http://www.electronista.com/articles/10/06/08/ms.says.ie9.test.faster.than.safari.5.final/
[11:09] mscdex: "Apple is touting use of the GPU for the Windows version of its browser...."
[11:10] maartenm: MrNibbles: it will?
[11:10] mscdex: for Safari 5
[11:10] MrNibbles: that is very vague...
[11:10] MrNibbles: maartenm: yeah, calling the setTimeout each loop gives the browser a processing overhead
[11:11] MrNibbles: so its not rendering multiple frames should a frame render slip below the allowed timeout
[11:11] maartenm: does it go faster when rendering only a portion of cd?
[11:11] maartenm: ok kind of like vsync
[11:12] maartenm: I mean on chrome.. that would be a lowman's technique of finding out if it's the canvas part or the data
[11:13] mscdex: from apple's site: "With hardware acceleration, Safari can tap into graphics processing units to display computing-intensive graphics and animations, so standards like HTML5 and CSS3 can deliver rich, interactive media smoothly in the browser."
[11:13] mscdex: can't seem to find technical info though
[11:14] maartenm: I don't believe safari can optimize this
[11:14] maartenm: it would have to pre-interpret all the data points and bundle them to the gpu
[11:14] maartenm: transformations are a different matter
[11:15] maartenm: MrNibbles: my Safari doesn't animate at all btw..
[11:15] maartenm: safari 5 snow leopard
[11:15] MrNibbles: maartenm: ive just stuck debugging code in there
[11:15] MrNibbles: on that same version you guys are looking at
[11:15] maartenm: sorry
[11:15] MrNibbles: maartenm: no worries :)
[11:15] mscdex: heh chromium must not support css 3d transforms
[11:16] MrNibbles: its back :)
[11:16] maartenm: yeah much faster
[11:16] maartenm: pretty weird
[11:17] maartenm: MrNibbles: profile sare completely different
[11:18] MrNibbles: yep, just going to have a deeper dig in a sec, just realised ive left it till today to book a train ticket
[11:18] MrNibbles: so its going to be horribly expensive
[11:18] jetienne: chromium will do hw accel soon. they said they do on window already. pushed by ie9 pressure
[11:18] maartenm: it's not putImageData
[11:19] maartenm: something else in draw, seems like it's just control flow
[11:21] mscdex: jetienne: i'm using a very recent build of it on windows, and safari 5 is noticeably faster
[11:21] mscdex: unless it's not complete
[11:21] maartenm: MrNibbles: it's odd that chrome doesn't report the setTimeout in its profiler
[11:21] jetienne: mscdex: lets hope it will change. the key is that if chrome does it, ff+ie will do it too
[11:21] maartenm: MrNibbles: seems like its implementation is mor elow-level
[11:22] MrNibbles: maartenm: there are many things i find odd about the chome profiler!!
[11:22] maartenm: maybe it delegates setTimeout to some low-level thread scheduling and this causes slow-down in your case
[11:22] rsms has joined the channel
[11:22] maartenm: because of shared memory copying or something weird..
[11:25] _announcer: Twitter: "Node.js for MongoDb in action .... http://wong.to/3cs7g" -- Michael Baarz. http://twitter.com/mbaarz/status/20545019019
[11:25] MrNibbles: maartenm: perhaps... not sure how i can test for that!
[11:25] maartenm: MrNibbles: maybe it doesn't realize that aSin is static
[11:26] maartenm: and copies it every time for the thread scheduling
[11:26] maartenm: I might be totally off though
[11:27] sstreza has joined the channel
[11:27] MrNibbles: thats not a bad theory
[11:27] maartenm: maybe if you do var dummy = setTimeout it will do high-level
[11:30] MrNibbles: still the same..
[11:30] maartenm: yes, stupid theory
[11:32] skampler has joined the channel
[11:32] maartenm: ok if you click a while, it also reports setTimeout
[11:32] maartenm: it just falls under some threshold
[11:33] maartenm: so now profile slook the same aside from draw which does something more expensive in chrome
[11:33] femtoo has joined the channel
[11:35] maartenm: I found something.. butpastie's down
[11:36] maartenm: http://hpaste.org/fastcgi/hpaste.fcgi/view?id=28671#a28671
[11:36] maartenm: MrNibbles: if you compare the profiles for this, IsolateCode is a lot more expensive in Chrome
[11:36] daleharvey has joined the channel
[11:36] d0k has joined the channel
[11:38] MrNibbles: maartenm: nice work :)
[11:39] MrNibbles: so its where the data is being written out to the canvas
[11:39] maartenm: yeah maybe different pipelines
[11:39] maartenm: I don't know the api
[11:40] MrNibbles: im going to split that out again to see if its the data mulching there or if its just the pixel pushing to the canvas
[11:40] maartenm: maybe there are other blitting routines you can use instead of hard-copying the data?
[11:40] MrNibbles: yeah would be nice to have a buffer to flip
[11:40] MrNibbles: i dont think there is
[11:40] MrNibbles: this is my first decent bit of canvas work
[11:41] daleharvey: hmm, having problems saving an uploaded file
[11:41] daleharvey: http://pastebin.me/61ea6c708132922c97509ad73f8b1068
[11:41] daleharvey: the file get saved, but it isnt a valid png, the binary has some similiar data to the original, but looks like a character encoding issue or something
[11:42] MrNibbles: yep it looks like its just the pixel pushing to the canvas which is causing the slowdown
[11:42] daleharvey: the data is being sent as xhr.sendAsBinary(bin)
[11:45] tg has joined the channel
[11:46] MrNibbles: maartenm: thanks for your help! Ive gotta grab some lunch
[11:46] MrNibbles: ill puzzle it out :)
[11:46] maartenm: ok
[11:46] maartenm: good luck
[11:46] MrNibbles: thanks matey
[11:47] MrNibbles: ive stuck it up on http://jsdo.it/Nibbles/plasma if you want to fork it :)
[11:54] maartenm: mom on tel :) thanks
[11:54] konobi: daleharvey: have you checked for 'err' ?
[11:55] daleharvey: konobi: req.setEncoding("binary"); was the rather obvious fix :P, cheers though
[11:55] konobi: heh
[12:00] mscdex: daleharvey: a better idea is to just save it using buffers
[12:00] astrolin has joined the channel
[12:00] MattJ has joined the channel
[12:00] mscdex: since the "binary" encoding is deprecated
[12:01] mscdex: and if you're just transferring a file, you could probably just use sys.pump and make it even easier
[12:02] _announcer: Twitter: "Just updated node-profile, now with the ability to save to file as well as a patch from @bnoguchi. Check it out http://bit.ly/9PO1CJ #nodejs" -- Mathias Pettersson. http://twitter.com/mape/status/20546718104
[12:03] daleharvey: ok cool, cheers, ill take a look in a bit when the rest is working, just happy it works :p
[12:03] MrNibbles: maartenm: I DID IT :D
[12:03] maartenm: yeah?
[12:04] MrNibbles: if i build all of the pixel data seperately, and then write it back to the cavas as one chunk
[12:04] MrNibbles: its about 40% faster
[12:04] maartenm: show me? (mom still on tel)
[12:04] mscdex: lol
[12:04] _announcer: Twitter: "With more and more node.js Queue Callback and soaking things like interacting with. . . I think I like this were a function of type I ww" [ja] -- Yohei Sasaki. http://twitter.com/yssk22/status/20546839375
[12:05] maartenm: ok
[12:05] maartenm: I'm 30 btw
[12:05] maartenm: heh
[12:05] mscdex: :p
[12:05] maartenm: she's gone show me how you did it?
[12:05] maartenm: oh well nm
[12:05] maartenm: you just built an array
[12:05] maartenm: so safari is clever enough to bundle all pixel transactions as one operation?
[12:06] maartenm: or maybe it tri/double buffers by default whereas chrome doesn't
[12:06] MrNibbles: maartenm: http://www.webnibbles.co.uk/dropbox/js1k/
[12:06] maartenm: still slow on my chrome! :/
[12:06] mape: smooth
[12:07] MrNibbles: clear cache?
[12:07] mape: works perfect here
[12:07] MrNibbles: yay
[12:07] maartenm: yeah old version
[12:07] _announcer: Twitter: "early saturday mornings are best spent with node.js, mongodb, and coffee." -- Tristan Blease. http://twitter.com/thetristan/status/20546971699
[12:07] daleharvey: that looks cool
[12:07] mape: ah nice you can click it as well
[12:08] maartenm: MrNibbles: still a lot slower on my chrome
[12:08] mape: MrNibbles: can you make it so click on left side is prev and right is next?
[12:08] maartenm: mape: it's random
[12:08] mape: Hmm k
[12:08] mape: I don't see any difference on safari and chrome
[12:08] daleharvey: its reasonably fast on my chrome
[12:08] daleharvey: pretty slow on my firefox
[12:09] maartenm: MrNibbles: chrome 5.0.375.. I seem to be an anomaly
[12:09] mape: Yeah firefox doesn't work to well
[12:09] MrNibbles: yeah :)(
[12:09] MrNibbles: :(
[12:09] MrNibbles: if you put ti=0 into console
[12:09] MrNibbles: it will run with no pause for frame limiting
[12:10] maartenm: yeah no difference, it's below the 15ms anyway
[12:10] maartenm: I put javascript:ti=0; in url bar, no difference
[12:10] konobi: works fine in my chrome on OSX
[12:10] maartenm: strange.. I do have a lot of tabs open
[12:10] jetienne: Q9400 quad core and this is still slow:)
[12:10] maartenm: intel imac dual core btw
[12:11] jimt_ has joined the channel
[12:11] maartenm: speed isn't bad though, just 50% of what safari does
[12:11] daleharvey: wow
[12:12] daleharvey: http://js1k.com/demo/15
[12:12] jetienne: http://www.webnibbles.co.uk/dropbox/js1k/ <- this one is better
[12:12] maartenm: yeah seen that on reddit.. I don't think it's that impressive
[12:13] jetienne: MrNibbles: seriously, reduce the resolution and increase the zoom. you will gain in fps
[12:13] jetienne: http://www.css3.com/css-zoom/
[12:14] jetienne: tune the zoom to be fullscreen
[12:14] jetienne: daleharvey: so you do nodejs too ?
[12:14] maushu has joined the channel
[12:14] daleharvey: jetienne: just started playing with it last night
[12:15] jetienne: daleharvey: personnaly i love it. this means i can forget other serverside script languages :) php ruby python etc...
[12:15] jetienne: now c/c++ and js and this is it :)
[12:15] daleharvey: its fun, feels quite similiar to the erlang workflow
[12:16] davidc_ has joined the channel
[12:16] ThePub has joined the channel
[12:16] daleharvey: still a bit immature, restarting this server is pissing me right off
[12:16] maartenm: really?
[12:16] maartenm: I think erlang is completely different
[12:16] jetienne: daleharvey: yep this is young
[12:17] jetienne: but ryah, the author, keeps it clean and minimal
[12:17] jetienne: and v8 is doing marvel
[12:18] daleharvey: async functions dont feel a whole lot different from messages, the embedded web server part is very similiar though
[12:19] jetienne: i dunno about this. i do async for a long time, for me it is natural
[12:20] maartenm: but node is non-blocking because it's event queue based, erlang is non-blocking because it's just miniature processes that keep restarting themselves
[12:20] maartenm: maybe some async api's make it very similar though
[12:20] maartenm: haven't really used those yet
[12:20] jetienne: event loop for the win :)
[12:21] maartenm: I haven't used recursion once in node.js yet so I dopn't see the similarity with erlang yet
[12:21] jetienne: MrNibbles: insert random by default. it will cycle less
[12:21] jetienne: maartenm: erlang is way different in the number of people able to code it
[12:21] daleharvey: http.createServer(out).listen(port, ip); vs mochiweb_http:start([{loop, fun out/1}, {port, Port}, {ip, Ip}]).
[12:21] jetienne: maartenm: erlange is not used by many people. js is
[12:21] _announcer: Twitter: "The twitter oauth node.js Tameshitara how do I go to bed" [ja] -- Yohei Sasaki. http://twitter.com/yssk22/status/20547701147
[12:22] maartenm: yeah bu tmochiweb is a far-fetched example, it's an incredibly complex way to use erlang and looks different from th outside than the inside
[12:23] maartenm: also, error propagation in erlang and message passing between processes is much more powerful in erlang so I wouldn't compare them.. I personally prefer node.js too because it's easier to code in
[12:23] maartenm: and because I'm very comfortable with javascript closures because of client-side stuff like jquery
[12:23] Blackguard has joined the channel
[12:23] jetienne: js is far from being the best language ;) it is just the most used.
[12:24] daleharvey: I would compare them, they are different, but reasonably similiar
[12:24] maartenm: but erlang is definitely on another generational level in software; it's immensely powerful
[12:25] jetienne: js is used, and will be used in the future. this is due to its presence in all web browser. and as such js is more powerfull :)
[12:25] jetienne: erlang is a != story*
[12:25] maartenm: yeah I agree, I just don't think nod.js is erlang-like
[12:26] maartenm: maybe some of the async libs make it similar though but at its core it's completely different
[12:26] maartenm: loops don't exist in erlang.. globally scoped variables don't exist in erlang, it's completely different
[12:27] davidc_ has joined the channel
[12:27] maartenm: instead of looping processes just restart all the time with different parameters, like monads
[12:27] daleharvey: loops are just syntax, the scope is completely different, but the async nature is very similiar
[12:28] maartenm: I don't agree :) erlang's async is completely different in nature
[12:29] jetienne: in my view, it is all in "body count". how many people can do js, vs how many people can do erlang
[12:29] Guest79412 has joined the channel
[12:29] maartenm: yeah I do agree with that, I'm not saying it's better as a whole
[12:29] daleharvey: body count is about the least interesting metric there is
[12:29] maartenm: I think v8 is also a lot faster than the erlang vm will ever be
[12:29] jetienne: daleharvey: not when you try to hire people or when you try to handle maintained projects
[12:30] maartenm: but erlang will distribute a lot better and safer than node.js ever will, there is still a market for elrang projects
[12:30] jb55: how is the ffi like in erlang? Is it easy to make bindings for c,c++?
[12:30] maartenm: jb55: yes
[12:30] maartenm: it's nearly painless.. they're called "ports'
[12:30] daleharvey: or nifs
[12:30] teemow has joined the channel
[12:30] maartenm: erlang is usually used that way.. distributing center, with c/othe rlow level code at the ends
[12:31] daleharvey: http://erldocs.com/R14A/erts/erl_nif.html?i=1&search=nif
[12:31] maartenm: because it's horribly slow at maths, f.i..
[12:37] ThePub has joined the channel
[12:39] hpoydar has joined the channel
[12:43] stagas has joined the channel
[12:44] _announcer: Twitter: "Great intro video to Node.js, I'm itching to build something with it: http://yhoo.it/aTUPuw" -- Brian Stoner. http://twitter.com/bsstoner/status/20548889117
[12:45] olegp has joined the channel
[12:46] hpoydar has joined the channel
[12:55] nano` has joined the channel
[12:56] kkaefer has left the channel
[13:01] davidwalsh has joined the channel
[13:01] _announcer: Twitter: "node.js interesting because, after all what we can not decide what to configuration. . . After we came home from work tomorrow." [ja] -- Yohei Sasaki. http://twitter.com/yssk22/status/20549816614
[13:09] _announcer: Twitter: "@scottfmurphy the node.js, right? :)" -- Tristan Blease. http://twitter.com/thetristan/status/20550232667
[13:11] SamuraiJack has joined the channel
[13:14] EyePulp has joined the channel
[13:14] Guest48355 has joined the channel
[13:18] bradleymeck1 has joined the channel
[13:19] stagas has joined the channel
[13:20] maxsilver has joined the channel
[13:35] joshdulac has joined the channel
[13:42] bradleymeck1 has joined the channel
[13:42] mscdex: man, how i wish github had a way to easily ignore any commits in the fork queue that are not from the upstream repo
[13:47] knuckolls has joined the channel
[13:53] mau has joined the channel
[13:54] astrolin has joined the channel
[13:56] Blink7 has joined the channel
[14:00] _announcer: Twitter: "blogged my adventures trying Flash remoting with node.js http://j.mp/bJusdD #node #flash" -- Tim Whitlock. http://twitter.com/timwhitlock/status/20553345733
[14:02] _announcer: Twitter: "Alex Payne on node.js and scalability http://eschnou.com/entry/alex-payne-on-nodejs-and-scalability-62-24134.html" -- Laurent Eschenauer. http://twitter.com/eschnou/status/20553463542
[14:06] nrstott has joined the channel
[14:09] feroz_ has joined the channel
[14:13] jan247 has joined the channel
[14:14] Guest9816 has joined the channel
[14:14] mw_ has joined the channel
[14:15] caolanm has joined the channel
[14:15] caolanm: is there a couchdb library for node that supports streaming attachments?
[14:15] manveru: caolanm: cradle
[14:16] benoitc: caolanm: noddycouch
[14:16] caolanm: thanks, I'll take a look at these
[14:16] caolanm: I've been using node-couchdb so far
[14:18] caolanm: benoitc: noddycouch looks good, thanks
[14:22] ashleydev has joined the channel
[14:24] pengwynn has joined the channel
[14:29] rob__ has joined the channel
[14:33] ludde has joined the channel
[14:35] _announcer: Twitter: "@ Llun Node.js programming workshop is being moved to the next." [th] -- TAP. http://twitter.com/visibletrap/status/20555543359
[14:37] FransWillem has joined the channel
[14:38] FransWillem: loxs: Did you try RequestRouter ? It's got some flaws, but it's pretty damned minimal
[14:38] FransWillem: oh wait
[14:38] FransWillem: That text was from yesterday :S
[14:38] FransWillem: Sorry :p
[14:44] skampler_ has joined the channel
[14:44] joshdulac: how is everyone doing?
[14:47] FransWillem: wtf :o var Buffer=require("buffer").Buffer;
[14:47] FransWillem: err
[14:47] slaskis has joined the channel
[14:47] FransWillem: http://js1k.com/demo/15
[14:50] mscdex: now that's funny
[14:50] JimBastard has joined the channel
[14:50] mscdex: that example works in chrome, but not at all in safari
[14:50] JimBastard: _ _ .__ __. ______ _______ _______ __ _______.
[14:50] JimBastard: _| || |_ | \ | | / __ \ | \ | ____| | | / |
[14:50] JimBastard: |_ __ _|| \| | | | | | | .--. || |__ | | | (----`
[14:50] mscdex: sadf
[14:50] JimBastard: _| || |_ | . ` | | | | | | | | || __| .--. | | \ \
[14:50] JimBastard: |_ __ _|| |\ | | `--' | | '--' || |____ __ | `--' | .----) |
[14:50] mscdex: :-D
[14:50] JimBastard: |_||_| |__| \__| \______/ |_______/ |_______|(__) \______/ |_______/
[14:50] JimBastard: dick
[14:50] JimBastard: lol
[14:51] JimBastard: now how is everyone gonna see me say goodmorning in ascii
[14:51] JimBastard: nooooo
[14:51] JimBastard: ooo
[14:51] JimBastard: ooo
[14:51] JimBastard: o
[14:51] mscdex: i don't think anyone questions you affection for node.js
[14:51] mscdex: s/you/your
[14:51] JimBastard: lulz
[14:51] JimBastard: crap am i a fanboy?
[14:51] joshdulac: JimBastard: you are obsessed with ASCII art, haha
[14:51] joshdulac: all last night too =P
[14:52] JimBastard: i just love playing with http://asciimo.com/
[14:52] JimBastard: all javascript based
[14:52] JimBastard: works in node too
[14:52] joshdulac: JimBastard: I use to have a bookmark to a ascii gen that would take an image and convert it to colored ascii
[14:52] mscdex has joined the channel
[14:52] joshdulac: it was epic
[14:52] JimBastard: joshdulac: yeah ive seen a few of those services
[14:53] JimBastard: i gotta port the image => ascii functionality to node
[14:53] JimBastard: i have some code that does it already, but i think it uses canvas
[14:53] mscdex has joined the channel
[14:53] JimBastard: having issues mscdex ?
[14:53] mscdex: nope
[14:53] mscdex: upgrading virtualbox
[14:53] joshdulac: you could probably use processing.js or webgl
[14:55] Guest34062 has joined the channel
[14:56] JimBastard: [10:56] == #jquery-ot Cannot join channel (+b) - you are banned
[14:56] JimBastard: sigh
[14:56] nano`: HA
[14:57] JimBastard: http://i.imgur.com/V1WW5.gif
[14:57] JimBastard: okay breakfast then codings time. i think we are pushing broodmother today
[14:57] JimBastard: im gonna spin up another instance i think and just swap dns
[14:58] joshdulac: you got banned from jquery? haha why
[14:58] joshdulac: spam them with ascii art?
[15:00] JimBastard: no, they just decided they had had enough of me one day
[15:00] JimBastard: paul_irish said i was too much of a bastard
[15:04] jamescarr: JimBastard, hey, for your hosting... how can I configure my couchdb app and stuff?
[15:04] jamescarr: configure couch, upload design docs, install npm packages?
[15:07] JimBastard: jamescarr: npm packages have to be in your package.json as depends
[15:07] JimBastard: and as for couch, we are prob gonna give everyone their own couch database, either on our hardware or on couch.io
[15:08] JimBastard: we haven't sorted out all the exact details, but the idea is: if you want it, we support it (within reason of course)
[15:09] JimBastard: we might relax some of the security stuff for the beta too to allow users to have more control. this of course means we have to be somewhat selective of who we host
[15:11] pkrumins: anyone good with git? any ideas how to make git pull in a branch without it trying to perform a merge?
[15:11] JimBastard: git pull --rebase?
[15:11] pkrumins: --rebase!
[15:11] pkrumins: trying it
[15:12] JimBastard: that should like do a fast forward or something
[15:12] JimBastard: im only a white-belt in git-fu
[15:12] pkrumins: what's a fast forward?
[15:13] JimBastard: pkrumins: http://www.gitready.com/advanced/2009/02/11/pull-with-rebase.html ?
[15:13] JimBastard: committed 11 Feb 2009 Users of Git are hopefully aware that a git pull does a git fetch to pull down data from the specified remote, and then calls git merge to join the changes received with your current branch’s work. However, that may not always be the best case. You can also rebase the changes in, and that may end up being a lot cleaner. This can be done simply by tacking on the --rebase option when you pull, like so:
[15:13] jamescarr: my late night hackery ;)
[15:13] jamescarr: http://blog.james-carr.org/katas/gameoflife/demo.html
[15:14] jamescarr: cellular automation
[15:14] JimBastard: the game of life? ohh look you got a wife!
[15:14] jamescarr: lol
[15:15] JimBastard: i definitely remember the best part of that game was your friend getting a bad roll, being a garbage man, and then you swapped out his pink wife figure with another blue male figure when he was in the bathroom
[15:15] JimBastard: and going, lol you are a gay garbage man
[15:16] pkrumins: rebase isn't it
[15:16] JimBastard: hrmmm
[15:16] JimBastard: what are you trying to do pkrumins ? how would it not merge?
[15:16] JimBastard: do you want to stash your local changes?
[15:16] pkrumins: no sir
[15:16] pkrumins: here is what's happening
[15:17] pkrumins: at one point a new branch was created on a remote repository
[15:17] pkrumins: then i commited some more changes in my repository
[15:17] pkrumins: now i want to pull in that new remote branch
[15:17] JimBastard: git fetch ?
[15:17] pkrumins: fetch!
[15:17] pkrumins: trying it
[15:18] JimBastard: you want the branches to remain separate right?
[15:18] pkrumins: only at the moment
[15:18] JimBastard: im prob not the best person to be asking about this. #git and #github are pretty active
[15:18] pkrumins: but later i'll want to merge them too
[15:18] JimBastard: i usually have http://cheat.errtheblog.com/s/git open in a tab
[15:18] JimBastard: pretty decent reference
[15:19] pkrumins: thanks
[15:20] pkrumins: git fetch did it!
[15:20] JimBastard: yaaaa i halped
[15:20] _announcer: Twitter: "YouTube - Node.js: JavaScript on the Server http://bit.ly/ab5tmu" -- Joshva. http://twitter.com/joshva/status/20558530206
[15:20] JimBastard: :-)
[15:21] pkrumins: jimbo++
[15:21] pzich has joined the channel
[15:25] jpld has joined the channel
[15:26] jpld has joined the channel
[15:28] jamescarr: JimBastard, ah, no couchdb yet then?
[15:29] Aria has joined the channel
[15:30] V1 has joined the channel
[15:31] JimBastard: jamescarr: we have couchdb installed on the production server
[15:31] JimBastard: there is just little security right now
[15:32] JimBastard: broodmother requires couchdb to store drone information
[15:32] jamescarr: ah... so i could use it then if i dont mind the security?
[15:33] JimBastard: i just haven't looked into securing databases on couchdb yet
[15:33] jamescarr: got a toy app I;m working on for a friend's conference site, since you offered the free hosting might chuck it up on there for him to play with since I cant get together with him in person till next week
[15:34] JimBastard: yeah its all good
[15:34] JimBastard: just let me know
[15:34] JimBastard: im gonna add basic http auth to our rest api and try to deploy new version today
[15:34] jamescarr: cool... prob later today
[15:35] JimBastard: if you need someone reliable you should use a vps for now. we are still in alpha testing as of today, not even gone beta yet
[15:35] JimBastard: just warning ya :p
[15:35] jamescarr: u just need a github url right?
[15:35] JimBastard: but we havent had any downtime since our last deploy
[15:35] JimBastard: yep
[15:36] JimBastard: im looking at 30+ days of uptime right now
[15:36] JimBastard: and the last down was planned
[15:36] jamescarr: cool.. dont need reliable
[15:36] jamescarr: I plan on utilizing the hosting only till like mid next week
[15:36] jamescarr: /msg JimBastard http://github.com/jamescarr/strange-passions
[15:36] jamescarr: oops ;)
[15:37] jamescarr: not sure if the package.json will work... it might ;)
[15:37] jamescarr: create-views.js is what creates my db and uploads the design docs
[15:40] _announcer: Twitter: "@ KaizerWing next time that will go a programming workshop together with async server A ครับ their Node.js, Mongrel." [th] -- TAP. http://twitter.com/visibletrap/status/20559850277
[15:44] _announcer: Twitter: "via Del.icio.us : YouTube - Node.js: JavaScript on the Server: http://bit.ly/cR18JL #social #networking" -- Karen Kinnaman. http://twitter.com/KarenKinnaman/status/20560119866
[15:46] feroz_ has joined the channel
[15:47] ewdafa has joined the channel
[15:48] _announcer: Twitter: "@markimbriaco nice luck for new job. In Kazakhstan we say 'may camel never thirst'. Is Heroku hire you for event-base NoSQL? See node.js." -- DevOps Borat. http://twitter.com/DEVOPS_BORAT/status/20560395075
[15:48] x_or has joined the channel
[15:53] jkreeftmeijer has left the channel
[15:54] jtsnow_ has joined the channel
[15:55] maushu has joined the channel
[15:56] nodev has joined the channel
[15:57] Guest59319 has joined the channel
[16:00] aniero: is there a good guide for writing C extensions/bindings for node?
[16:01] FransWillem: aniero: Not really, and you need C++, not C, seeing as V8 is C++ only :)
[16:01] aniero: FransWillem: right, i'm assuming C as a subset of C++ at the moment
[16:02] FransWillem: aniero: Well, you'd need a good grasp of libev and V8 for starters :/
[16:02] aniero: hrm. :|
[16:02] Aria: Basics aren't /too/ hard.
[16:02] aniero: well, it's been *ages* since i've done any compiled programming
[16:03] aniero: so it'll be an adventure. also, hmm: http://nikhilm.bitbucket.org/articles/c_in_my_javascript/c_in_javascript_part_1.html
[16:03] _announcer: Twitter: "http://nodejs.org interesting" [th] -- Jman. http://twitter.com/junlapong/status/20561428781
[16:03] FransWillem: What are you trying to do ?
[16:04] mikeal has joined the channel
[16:05] aniero: FransWillem: thinking about yaml. either i fix tj's native JS one so it works better, or i write a wrapper for libyaml
[16:05] FransWillem: Hmmm, I'd go for fixing the native JS one
[16:05] aniero: mm. hand-written parser, GO
[16:05] aniero: but this has all of the generative rules, so... http://www.yaml.org/spec/1.2/spec.html
[16:06] FransWillem: Has the added benefit that if you ever want to switch to another JS stack, you don't have ti port a native library :p
[16:06] aniero: true, true
[16:06] FransWillem: aniero: Isn't there a EBNF or BNF for YAML that you could re-write for one of the JS Parser generators ?
[16:07] aniero: oh, i hadn't considered that. any recommended parser generators?
[16:07] cce: FransWillem: not really
[16:08] cce: FransWillem: well, the indentation makes it a bit difficult, but from my understanding it doesn't quite work with an EBNF
[16:08] FransWillem: There are quite a few around, but I haven't used any personally, sorry
[16:08] cce: ACTION thinks the best route would be to directly translate pyyaml's source code to Javascript.
[16:08] cce: it's actually quite clean code
[16:08] aniero: cce: someone did that before, but the project's vanished
[16:08] cce: aniero: I think someone started it, but I'm not sure they were translating from pyyaml
[16:08] aniero: i wonder how pyyaml is these days anyway, i recall back in the day there was an *awful* python yaml lib, but i can't remember which one it was!
[16:09] cce: oh, that was the version _I_ wrote like 9 years ago
[16:09] cce: xitology re-wrote it about 5 years ago
[16:09] aniero: cce: tj's got a yaml parser at http://github.com/visionmedia/js-yaml
[16:09] aniero: cce: haha, sorry :P
[16:09] cce: oh, I'm a horrible developer ;)
[16:09] cce: ACTION sighs.
[16:09] aniero: cce: well, it worked, but it was very very picky... :p
[16:10] cce: aniero: xitology wrote me one day ~5 years ago and said that he had an "alternative implementation" he was very nice, complemented the langauge but was noticbly silent on the implementation ;)
[16:10] cce: ACTION took mine down, and put his up ;)
[16:10] cce: .
[16:11] cce: aniero: so, I've not followed some of the js implementations,
[16:11] cce: although I'd love to see one!
[16:11] cce: ACTION thinks the best route is to just transcripbe pyyaml
[16:12] aniero: there's only one js implementation that i can find so far, aside from this mythical port of pyyaml which has seemed to have vanished (it's linked to from yaml.org, but it's a 404 and not googleable)
[16:12] cce: aniero: well, js-yaml doesn't say that he was copying liberally from pyyaml
[16:12] cce: Yea. It didn't get very far, unfortunately.
[16:12] cce: ACTION should remove it from yaml.org
[16:12] aniero: oh, i don't expect that he was. and it looks like it works fine for simple documents, but it's barfing on what would normally be considered idiomatic, if not strict, yaml files
[16:13] cce: FransWillem: anyway, the grammar for YAML is a bit too complicated for the parser generator -- according to xitology, you'd spend more time getting a parser generator to work than simply hand-coding the parser.
[16:13] JimBastard: json tends to parse well
[16:13] cce: JimBastard: well, yea...
[16:14] JimBastard: :-D
[16:14] cce: JimBastard: it's like enormously simpler than YAML, and exceptionally useful for that very purpose.
[16:14] aniero: yeah! but it doesn't make for good config files
[16:15] JimBastard: i like json config files
[16:15] cce: ACTION isn't getting into a JSON vs YAML debate here, I use them both. I think Crawford did an exceptionally cool thing with JSON.
[16:15] JimBastard: but i also like using JSON to represent my views
[16:15] JimBastard: http://github.com/hij1nx/JUP
[16:15] JimBastard: not everyone can jslint by touch
[16:15] JimBastard: and feel
[16:15] softdrink has joined the channel
[16:16] cce: aniero: anyway, xitology said it'd take ~2 weeks of his time to port pyyaml to javascript
[16:16] cce: but, he's quick and he doesn't have the 2 weeks ;(
[16:16] JimBastard: is pyyaml just a yaml parser?
[16:16] cce: aniero: so the parser.py and scanner.py (the only thign a parser generator would buy you) isn't that big.
[16:17] cce: aniero: the harder parts are loader, resolver, etc.
[16:17] aniero: cce: hmm, two weeks is a fair bit of time for a yak shave! :)
[16:17] cce: JimBastard: I don't know what you're asking
[16:17] fod has joined the channel
[16:17] JimBastard: http://github.com/visionmedia/js-yaml
[16:17] JimBastard: ?
[16:17] aniero: JimBastard: doesn't parse the yaml files i've got
[16:17] cce: aniero: so, the other implementation was started by ingy
[16:17] cce: aniero: you can ping him directly on IRC, to ask him what happened to it
[16:17] JimBastard: tj's parser dont work? aniero ?
[16:17] cce: (he's also in #yaml)
[16:18] aniero: JimBastard: nope..
[16:18] JimBastard: big surprise lol
[16:18] JimBastard: open up an issue
[16:18] cce: aniero: ingy ported pyyaml to perl, and started on javascript port, but I think he just ran out of time and since he didn't need it for his own purposes...
[16:19] cce: ACTION thinks that link from yaml.org (that is a 404) is ingy's work
[16:19] aniero: JimBastard: so i have a couple of options: mangle my input yaml so it works, fix his parser, or go all-out and get a completely solid implementation ported from pyyaml (or bindings on libyaml or the like)
[16:19] malkomalko has joined the channel
[16:19] JimBastard: aniero: just open up an issue showing where his parser is failing
[16:19] aniero: cce: and i only care about reading yaml, not writing it, so hopefully that would help
[16:19] JimBastard: he'll either fix it or abandon the project, thats how tj rolls
[16:19] cce: aniero: writing it isn't that hard
[16:20] aniero: haha, fair enough. and he's responsive on patches too, i fixed the ejs parser (even though it was replaced with a 1-pass parser two days later)
[16:20] cce: http://pyyaml.org/browser/pyyaml/trunk/lib/yaml/parser.py http://pyyaml.org/browser/pyyaml/trunk/lib/yaml/scanner.py
[16:21] aniero: cce: great, thanks! i assume there's a good solid set of test yml files to throw at it, too, in that repo?
[16:21] cce: so ~70k
[16:21] cce: aniero: yes
[16:22] aniero: cce: thanks!
[16:22] cce: aniero: and ingy _was_ doing a direct translation, so you may find is work useful (we can bug him for a snapshot of where he was at)
[16:22] cce: aniero: so, ingy said that one of the difficulties he hit was translating the regex expressions
[16:22] aniero: mm.
[16:22] cce: the javascript regex was just different enough from python regex to make it irritating.
[16:23] cce: and, the scanner uses lots of regex expressions
[16:23] _announcer: Twitter: "#Nodejs development discussion group http://bit.ly/aIZaDa" -- Devcomments.com. http://twitter.com/devcomments/status/20562725825
[16:24] cce: hmm, I don't see that many re's
[16:24] aniero: cce: switched to #yaml
[16:24] cce: aniero: ok -:)
[16:24] V1 has joined the channel
[16:25] amerine has joined the channel
[16:27] Yuffster has joined the channel
[16:27] joshbuddy has joined the channel
[16:28] steadicat has joined the channel
[16:30] tjgillies has joined the channel
[16:30] mape: Anyone recall the new page that allows you to post performance js cases?
[16:33] John9e9 has joined the channel
[16:33] femtoo has joined the channel
[16:36] FransWillem: Why on earth does JSON.parse not support the \x00 escape sequence?!
[16:36] nodev: try \u0000
[16:37] x_or has joined the channel
[16:38] FransWillem: I'm aware that \u is supported, but I was hoping to cut off some excess bandwidth by encoding anything <= 0xFF with \x...
[16:38] jbrantly1 has joined the channel
[16:39] _announcer: Twitter: "@botimer Rails is solidly standard web tech these days. Bleeding edge is node.js" -- Trek Glowacki. http://twitter.com/trek/status/20563773630
[16:40] _announcer: Twitter: "Node.js: #JavaScript on the Server http://j.mp/d6J1Tu #GoogleTechTalks #youtube" -- Daniel Kurdoghlian. http://twitter.com/derblub/status/20563856493
[16:42] softdrink has joined the channel
[16:46] cce: FransWillem: for exactly the same reason why JSON is easy to parse ;)
[16:46] cce: ACTION winks.
[16:48] jetienne has joined the channel
[16:49] rauchg_ has joined the channel
[16:49] bronson has joined the channel
[16:53] tisba has joined the channel
[16:55] JimBastard: hey elliottcable
[16:57] ditesh|cassini has joined the channel
[17:02] steadicat has joined the channel
[17:06] malkomalko has joined the channel
[17:11] rauchg_ has joined the channel
[17:12] joshbuddy has joined the channel
[17:12] joshdulac: hello josh =)
[17:14] _announcer: Twitter: "Real-time Web Traffic Visualization using none other than Node.js Nice! http://su.pr/2l2ccL" -- Ben Keating. http://twitter.com/flowpoke/status/20566059122
[17:17] stagas has joined the channel
[17:25] caolanm has joined the channel
[17:25] caolanm: can anyone point me to an example of using sys.pump to send data to a http clientRequest?
[17:26] caolanm: I'm currently doing: sys.pump(fs.createReadStream(filename), request, callback)
[17:26] caolanm: but I'm getting "Error: EBADF, Bad file descriptor"
[17:32] caolanm: hmm, perhaps the request is being closed before I'm able to write to it...
[17:32] caolanm: ACTION investigates
[17:32] rauchg_: caolanm: you write to a response :P
[17:33] astrolin_ has joined the channel
[17:33] caolanm: oh? ...even if I'm doing an upload?
[17:33] mjr_: you've got two readable things there
[17:33] mjr_: a createReadStream and a request.
[17:33] mjr_: You need one thing to read from and another to write to.
[17:34] caolanm: thats a http.ClientRequest not a http.ServerRequest btw
[17:34] caolanm: are they both only readable?
[17:37] mjr_: The server request is certainly readable.
[17:37] mjr_: So for an upload whatyour syntax does make sense. I'm not sure why it doesn't work.
[17:42] dnolen has joined the channel
[17:42] mikeal has joined the channel
[17:42] ashleydev has joined the channel
[17:51] caolanm: ok, so the data is making it to the server, and the sys.pump callback is called
[17:51] caolanm: sometime after that I get the bad file descriptor error
[17:51] caolanm: :\
[17:51] hansek has joined the channel
[17:52] caolanm: but its before the response event fires
[17:53] benburkert has joined the channel
[17:56] caolanm: however it looks like request.end is being called twice... and not by me
[17:57] caolanm: if you've just tuned in, welcome to "Debugging Live!" with caolanm
[17:57] caolanm: ACTION shuts up
[17:58] mape: Hmm someone really should do a write up on the profiler in node.js
[17:58] mape: I have no idea what 90% of the output refers to :/
[18:02] V1: the profiler in node or the profiler in V8 ;)?
[18:02] mape: The v8 one
[18:03] nodev has joined the channel
[18:04] mjr_: mape: you aren't the only one.
[18:04] mjr_: I've asked ryah about it before, and he's not sure what much of it is either.
[18:04] mjr_: We need a V8 expert to weigh in.
[18:05] dnolen has joined the channel
[18:06] jakehow has joined the channel
[18:06] mape: Can't seem to find any info on it either
[18:07] tsmith has joined the channel
[18:07] creationix has joined the channel
[18:08] mjr_: Like so many things in V8 and WebKit, I think hardly anybody knows about it, and those that do had to figure it out by reading the source.
[18:12] jetienne: some v8 devs read the ml
[18:14] tjgillies has joined the channel
[18:15] dgathright has joined the channel
[18:15] rnewson has joined the channel
[18:15] rnewson has joined the channel
[18:15] feroz_ has joined the channel
[18:18] rauchg_ has joined the channel
[18:18] mjr_: caolanm: http://groups.google.com/group/nodejs/browse_thread/thread/c33c0445f63b658e/5c4382ddd8b05f1e?lnk=gst&q=sys.pump+should+fire+callback+on+writeStream+close#5c4382ddd8b05f1e
[18:19] mjr_: oh wait, that's the other way around
[18:21] rwaldron_ has joined the channel
[18:28] V1: mape: you mean this documentation: http://code.google.com/p/v8/wiki/V8Profiler ?
[18:29] saikat has joined the channel
[18:29] mikeal has joined the channel
[18:30] mape: V1: yeah, but that doesn't help with anything, , Stub: CEntry, /usr/local/bin/node <- LazyCompile: fs:1, Builtin: A builtin from the snapshot
[18:30] sveisvei has joined the channel
[18:30] mape: wha?
[18:30] V1: no named functions?
[18:31] mape: Well can you do named functions when you use the prototype?
[18:31] V1: yes
[18:32] programble has joined the channel
[18:32] V1: foo.proto.bar = function bar(){}
[18:32] mape: Oh hmm yeah..
[18:34] V1: but allot of node's functions aren't named so it would explain why your flooded with
[18:35] volve has joined the channel
[18:35] mau has joined the channel
[18:36] creationix: did we ever decide is sys.inherits was private or public?
[18:36] creationix: s/is/if/
[18:36] mau2 has joined the channel
[18:36] ryan_gahl has joined the channel
[18:36] creationix: ryah: ^
[18:41] matt_c has joined the channel
[18:42] rauchg_: creationix: it should be, everyone is using it..
[18:42] creationix: yeah, but I'm wondering if I should promote it via howtonode.org
[18:42] ph^ has joined the channel
[18:42] creationix: I try to not use private APIs in examples
[18:42] x_or has joined the channel
[18:42] rauchg_: good point
[18:43] creationix: what does sys.inherits do anyway?
[18:43] danielzilla has joined the channel
[18:43] rauchg_: a shortcut to Object.create()
[18:43] creationix: I seem to remember it's written in C, but I could be wrong
[18:43] rauchg_: no it's not
[18:43] ashleydev has joined the channel
[18:43] creationix: well, sys.inherits seems to be for constructors, not objects
[18:44] creationix: Object.create works for prototypal inheritance
[18:44] rauchg_: iirc, it access the .prototype of what you pass to it
[18:45] creationix: hmm, so it's a high-level wrapper to make classical inheritance easy?
[18:45] creationix: that doesn't sound like something node should provide
[18:45] jetienne: http://www.alertdebugging.com/2009/04/29/building-a-better-javascript-profiler-with-webkit/
[18:47] caolanm: I have sys.pump sort of working most the time now... but if I attempt to upload the same file twice in a row in quick succession I get an error
[18:47] caolanm: waiting a while between uploads works fine
[18:47] nrstott: sys.inherits is fine for use in node, but it shouldn't be encouraged for use by packages imo
[18:48] nrstott: I think it should stay undocumented and be discouraged.
[18:49] creationix: nrstott: exactely
[18:49] markwubben has joined the channel
[18:50] creationix: node can write and use whatever helpers it wants internally
[18:51] khug has joined the channel
[18:51] creationix: so what is the recommended way to "subclass" an EventEmitter and add some custom stuff to the prototype?
[18:51] creationix: I usually just put the new stuff on the instance
[18:51] khug has left the channel
[18:51] creationix: but that's not going to scale if there are lots of instances
[18:52] nrstott: i use the narhwal package util.update to make event emitters
[18:52] nrstott: there are plnety of ways it could be done
[18:52] nrstott: underscore has a way that would maek it easy too
[18:52] nrstott: their .extend would work
[18:52] nrstott: pretty sure wu has a .extend too...
[18:52] creationix: so roll-your-own
[18:53] ryan_gahl: 11,00•12,00creationix11,00• what are you adding to eventEmitter?
[18:53] mikeal1 has joined the channel
[18:53] ryan_gahl: (my favorite subject)
[18:53] nrstott: well id recommend using one of the many pre-existing ways to accomplishing it that are packaged for node already :)
[18:53] creationix: ryan_gahl: I'm not, the question is for a howtonode article teaching about event emitters
[18:53] ryan_gahl: ah
[18:54] _announcer: Twitter: "Wishing everything was as simple as node.js and express. Can see myself using this in the future to quickly and cheaply prototype ideas." -- Tristan Blease. http://twitter.com/thetristan/status/20571731529
[18:54] ryan_gahl: overriding existing methods or just adding prototype members?
[18:54] creationix: nrstott: seems silly to require an external package to do something built in to node
[18:54] creationix: ryan_gahl: adding prototype members
[18:54] nrstott: creationix, didn't you just agree about not wanting to use sys.inherits? ;0
[18:54] creationix: nrstott: I did, but I'm not sure using an external package is better
[18:54] creationix: isn't it just like 2 lines of plain js?
[18:55] ryan_gahl: why not just require("your-custom-events-file"), which augments process.EventEmitter then?
[18:55] nrstott: creationix, an exteranl package is infintely better for those of us who use the same packages in browser and on server.
[18:55] creationix: true
[18:55] nrstott: thanks to Kris Zyps Transporter and Charles Jolleys Tiki, the # of us who are doing that is going to grow
[18:55] nrstott: and of course there are the few crazy people like me who use narwhal and node :)
[18:55] creationix: :)
[18:55] ryan_gahl: you mean ringo :)
[18:56] nrstott: i don't use ringo ;0
[18:56] nrstott: maybe one day
[18:56] nano` has joined the channel
[18:56] ryan_gahl: 11,00•12,00creationix11,00• ^
[18:57] creationix: ryan_gahl: just embed the 2-3 lines of js that does the same thing as sys,inherits in the module?
[18:57] pydroid has joined the channel
[18:58] isaacs has joined the channel
[18:58] ryan_gahl: oh, maybe i misunderstood
[18:58] caolanm: http://nodejs.org/api.html#readable-stream-22
[18:58] ryan_gahl: i'd just extend via process.EventEmitter.prototype.something = function() {...};
[18:58] caolanm: ^ that says there is an 'fd' event
[18:59] caolanm: from looking at the source it looks like its actually and 'open' event
[18:59] ryan_gahl: and load that file in via require
[19:00] isaacs: caolanm: looking at which source? line 308 of net.js is: self.emit('fd', fd)
[19:01] isaacs: caolanm: i think you might be confusing "unix streams" with file streams
[19:01] markwubben_ has joined the channel
[19:01] isaacs: they're not the same thing
[19:01] caolanm: isaacs: oh, I was looking at fs.ReadStream
[19:01] caolanm: yes, I was confusing them ;)
[19:02] isaacs: caolanm: does seem like an inconsistency in the API though
[19:02] isaacs: caolanm: semantically speaking, unix streams aren't "opened"
[19:02] caolanm: yes, makes sense
[19:02] siedrix has joined the channel
[19:03] caolanm: using streams is proving to be hard work :(
[19:03] isaacs: maybe for consistency's sake, FileReadStreams should have an "fd" event instead of "open"
[19:03] isaacs: caolanm: really? what are you doing with them that's hard?
[19:03] creationix: ryan_gahl: I don't want to change the original EventEmitter.prototype
[19:03] creationix: I want the custom functions only for a subset
[19:03] caolanm: isaacs: I'm trying to read from a file stream and write to a http client request
[19:04] caolanm: it works but doesn't seem to clean things up properly
[19:04] ryan_gahl: gotcha... thought you said something like "I usually extend the instances but in this case want to extend the prorotype"
[19:04] caolanm: so when I call it again it breaks
[19:04] isaacs: orly? like it doesn't close the file and whatnot?
[19:04] caolanm: not sure whats happening yet
[19:04] creationix: ryan_gahl: yeah, the new prototype, not the original
[19:04] isaacs: it's fairly new. i wouldnt' be surprised if there were some bugs here and there, but it should be mostly working.
[19:04] caolanm: but the next time around it calls fs.read with a bad fd
[19:05] creationix: I wish we would just stop using classical inheritance in JS, it's not a good fit for the language
[19:05] isaacs: caolanm: that's no good
[19:05] caolanm: unless I add a delay
[19:05] caolanm: so I suspect its not closing the file properly
[19:05] isaacs: could be
[19:05] caolanm: isaacs: gtg, will report back later...
[19:05] isaacs: sounds like some kind of race cond
[19:05] isaacs: suresure
[19:05] ryan_gahl: 11,00•12,00creationix11,00• meh, there's not really classical inheritance, just an abstraction... one which i find useful actually
[19:05] isaacs: ACTION plans to do this with npm, so is interested
[19:06] isaacs: creationix: there are some cases where it's handy to say "these things are of a certain type, and this type of thing is a subtype of this other type of thing"
[19:06] ashb: creationix: i disagree. its the wrong kind for some problems
[19:06] ryan_gahl: i use a hybridized version of protoype's inheritance scheme
[19:06] ashb: what isaacs said :)
[19:06] isaacs: creationix: and prototypes+constructors is how you do that. qv stream < eventemitter
[19:07] creationix: isaacs: but prototypal inheritance does that just fine too
[19:07] ryan_gahl: it's all prototyal inheritance :)
[19:07] creationix: the only difference is there are no constructors and this crazy indirection
[19:07] isaacs: creationix: classic inheritance IS prototypal inheritance.
[19:07] isaacs: creationix: it's just tha tyou have this special kind of object called a "class"
[19:08] creationix: well, then I mean we should stop using constructors
[19:08] isaacs: and the classes inherit from one another, and then "regular" objects inherit from a class.
[19:08] ashb: creationix: you what?
[19:08] ryan_gahl: 11,00•12,00creationix11,00• :(
[19:08] creationix: they just complicate things
[19:08] isaacs: but constructors are perfect for this sort of problem.
[19:08] creationix: no, they cause problems
[19:08] isaacs: like what?
[19:08] ashb: what woudl you use instead?
[19:08] tilgovi has joined the channel
[19:08] creationix: most "class" libraries have a "initialize" function on the prototype that is the real constructor, and the constructor function just calls that
[19:09] isaacs: well, most class libraries are shit.
[19:09] creationix: agreed, but stiil
[19:09] tsmith: If I understand correctly, creationx wants a CreationxEventEmiiter that is like the regular EventEmitter, but wants to keep the number of new functions created to a minimum (the previous approach being to add the function to the instances, resulting in +1 function for every instantiadted emitter).
[19:09] nrstott: creationix, I'm with you, forget the constructors
[19:09] isaacs: i mean, seriously. the language gives you "new" and "prototype". what else do you need?
[19:09] ashb: (new Class).init(). explicit bad. if you have to call it, then use the ctor to call it for you
[19:09] nrstott: Traitsjs is the best 'inheritance' module ive seen
[19:09] nrstott: http://traitsjs.org/
[19:09] creationix: isaacs: just because it's in the language doesn't mean you should use it
[19:09] isaacs: creationix: sure, but it's also fast, handy, and readable.
[19:09] isaacs: and those are great reasons.
[19:10] ashb: nrstott: ugh. getX. do not want.
[19:10] creationix: I can't tell you how much time I've spent trying to help confused people understand how constructors work
[19:10] isaacs: "i dont' have to write it myself" is just another benefit in the pile.
[19:10] nrstott: ashb, what? getX?
[19:10] creationix: they look like classical inheritance, but are really this strange hack
[19:10] ashb: nrstott: the style
[19:10] isaacs: creationix: see, that's just becuase you're pathologically helpful and way too caring.
[19:10] nrstott: ashb, where do you see getX style?
[19:10] ashb: in the example of traits.js
[19:10] isaacs: creationix: you should just throw the rhino book atthem and scream profanities.
[19:10] ashb: sorry it just jumped out at me and bit me in the face
[19:10] nrstott: ok their examples may not be something you like but the getX is irrelevant ;)
[19:10] isaacs: it's a heavy book, so when they're done ducking, you can be gone already.
[19:11] nrstott: their actual API is like Trait.create, Trait.compose....
[19:11] ryan_gahl: 11,00•12,00creationix11,00• it's so handy to be able to subclass easily and override base methods, etc - but then my mind is simply wired that way
[19:11] isaacs: ashb: +1
[19:11] creationix: ryan_gahl: and this is 10 times easier withhout constructors
[19:11] nrstott: ryan_gahl, it's easy enough to do that without using 'classical inheritance'
[19:12] ashb: nrstott: traits are a distinct entit to classes to my mind
[19:12] creationix: var MyClass = {some functions}; var myinstance = Object.create(MyClass)
[19:12] isaacs: ashb: if you put "getFoo" in JavaScript is very Doing It Wrong. if it's a getter, make it a getter. even worse is: function getFoo () { return this.foo }
[19:12] creationix: or MySubClass = Object.create(MyClass)
[19:12] ryan_gahl: lol, yes, but boilerplate shit == not on my list of likes
[19:12] nrstott: ashb, that may be true... im just asserting that traits fit much better in the JS world than classicla inheritance does
[19:12] nrstott: ryan_gahl, try using traits :)
[19:12] isaacs: creationix: but sometimes you actually *want* a constructor
[19:12] isaacs: creationix: also, then yo udon't get instanceof
[19:12] ashb: nrstott: perhaps. so long as Traits.js has a meta layer
[19:12] ryan_gahl: 11,00•12,00nrstott11,00• no, my way works
[19:12] creationix: instanceof is broken anyway
[19:12] ashb: (does this object do this trait? type operation)
[19:13] isaacs: creationix: broken how?
[19:13] nrstott: ryan_gahl, you're a node guy so you must care about benchmarks. You realize that the classical inheritance methods usually benchmark like crap compared to just prototypal inheritance? ;0
[19:13] creationix: well, it's worthless if the instances come from different contexts
[19:13] isaacs: creationix: also, Object.create(...) doesn't let me put the shared init logic in one place.
[19:13] ashb: nrstott: classical IS prototypal. what do you mean?
[19:13] ryan_gahl: 11,00•12,00nrstott11,00• you are making assumptions that I don't know what I'm doing
[19:13] polyrhythmic: ahh IRC colors
[19:13] creationix: isaacs: but you can have a init function
[19:13] creationix: and then you choose to call it or not
[19:13] creationix: not be forced to
[19:13] isaacs: creationix: that leaks implementation details.
[19:14] ashb: if you dont call it your object is broken so why wouldn't you call it?
[19:14] ryan_gahl: 11,00•12,00nrstott11,00• you use "blah", and I'll use "foo", end of debate :)
[19:14] isaacs: exactly ^
[19:14] nrstott: ryan_gahl, it's not a debate, it's mud-slinging ^^
[19:14] ryan_gahl: holy wars
[19:14] ryan_gahl: love em
[19:14] nrstott: also Traits has Mark Miller's support behind it
[19:14] creationix: I think if js didn't have constructors the language would be twice as mature by now
[19:14] ryan_gahl: whoaaaaaaa
[19:15] ryan_gahl: Mark Miller!
[19:15] ryan_gahl: ^^
[19:15] isaacs: lolz
[19:15] ashb: creationix: show me some code
[19:15] nrstott: well no form of classical inheritance will ever be in ECMAScript 5, but Traits may be ;0
[19:15] nrstott: that's waht that means
[19:15] creationix: ashb: what do you want to know how to do
[19:15] ashb: i don't quite get what you are actually envisaging
[19:15] ashb: creationix: just an example of wtf you mean by not using ctors
[19:15] isaacs: Mark Miller's a cool guy, and very smart. but saying "So and so endorses this" is not an argument for a coding style.
[19:15] ashb: ^^
[19:15] ryan_gahl: 11,00•12,00nrstott11,00• this imaginary classical inheritance you speak of has been in ECMAscript since day one
[19:15] nrstott: isaacs, saying "someone who is invovled in shaping ECMASCript 5 is behind this and has porposed making it a langauge feature" makes a difference
[19:16] ashb: smart people make mistakes too (not saying traits is a mistake, just it can happen)
[19:16] isaacs: nrstott: mark miller has proposed a lot of language features that are not in es5 and never will be.
[19:16] isaacs: nrstott: it's like like js has a bdfl or anything.
[19:16] creationix: ashb: so here is one of my "classes" http://github.com/creationix/world-db/blob/master/lib/world-db.js#L119
[19:17] creationix: if I create an object that inherits from this object it can be either a subclass or an instance
[19:17] isaacs: creationix: so, here's my beef: http://github.com/creationix/world-db/blob/master/lib/world-db.js#L152-153
[19:17] isaacs: creationix: that's 2 lines, when it could be just "new Tile()
[19:17] creationix: there is no difference in pure prototypal
[19:17] jakehow has joined the channel
[19:17] nrstott: isaacs, I'm just saying that it gives it more weight. How much is up to you to determine. To pretend it makes 0 difference is pedantic
[19:17] pterk has joined the channel
[19:17] ryan_gahl: hmm, why name the member functions on the left and right side of the colon? (OT perhaps, just curious)
[19:17] ashb: yeah - you've made the aloc and the ctor explicit (and therefore optional) steps.
[19:17] ryan_gahl: 11,00•12,00nrstott11,00• you're pedantic ^^
[19:17] isaacs: nrstott: mark miller has proposed a lot of wakadoo ideas. that saps a lot of weight from the "mark miller" argument.
[19:17] creationix: isaacs: yes, but here http://github.com/creationix/world-db/blob/master/lib/world-db.js#L61
[19:17] nrstott: ryan_gahl, no you ^^
[19:17] creationix: I don't want the constructor
[19:18] isaacs: nrstott: for that matter, same for crockford, or jresig, or ryah, or me, or creationix.
[19:18] creationix: constructors often have side-effects
[19:18] ashb: creationix: and that *still* works when there is a ctor, doesn't it?
[19:18] isaacs: nrstott: most javascripters are freaks and have freaky ideas.
[19:18] creationix: ashb: no, not the second link
[19:18] isaacs: nrstott: some are good, some are bad, but most are weird, and they all have to be examined based on the idea, not the creator.
[19:18] nrstott: isaacs, once again, crockford and resig opinions and positions have some value... it's not 0 :)
[19:18] ryan_gahl: 11,00•12,00creationix11,00• ctors are meant to have side effects... they create and init an object
[19:18] creationix: plus without constructors, it's simpler
[19:18] ashb: Object.create calls ctors? are you sure about that?
[19:18] creationix: ryan_gahl: exactly, sometimes you don't want side-effects
[19:18] isaacs: nrstott: right, they have "some value". but next to "this makes my code clumsy," that value is trivial.
[19:18] creationix: like when de-serializing an object
[19:18] isaacs: nrstott: like, pennies on teh dollar
[19:18] nrstott: if you tell me Crockford is interested in something, I'll probably give it more of a look than if you are just like "oh here's some library"
[19:19] ryan_gahl: 11,00•12,00creationix11,00• then don't put code in the constructor!
[19:19] creationix: ryan_gahl: if there is no code in the constructor, then why go through all the indirection of having one
[19:19] nrstott: isaacs, so you now agere it has some value, that's all im saying :)
[19:19] astrolin has joined the channel
[19:19] nrstott: i never said "Mark Miller likes this so its 100% for sure awesome"
[19:19] nrstott: ontop of Traitsjs being pretty darn useful, it also has some involvement from Mark Miller which is a bonus. That's my stance on it.
[19:20] ryan_gahl: 11,00•12,00creationix11,00• instanceof, for one... but perhaps you're case just needs Objects
[19:20] ryan_gahl: your*
[19:20] creationix: without sys.inherits, it's several lines of code or an external library to do basic inheritance with constructors
[19:20] ryan_gahl: i mean, you're generalizing based on a narrow focus
[19:20] ashb: creationix: Object.create does not call cotrs. At least not in Safari
[19:20] nrstott: ryan_gahl, is instanceof that valuable in your javascripting?
[19:20] ashb: nrstott: instanceof specifically no, something like it, yes
[19:21] creationix: ashb: Object.create has no side-effects, this is a good thing
[19:21] creationix: it's plain, simple, and explicit
[19:21] creationix: easy to understand and use
[19:21] ryan_gahl: at times... i mean go ahead dudes, just use hashmaps for everything, you're more than welcome... this is a moot moot moot discussion
[19:21] nrstott: I love Object.create
[19:21] ashb: function Foo() { alert("hi"); this.bar = "baz" }; Foo.prototype.flib = "1"; x = new Foo(); y = Object.create(Foo.prototype); y.flib
[19:21] ashb: creationix: i dont see why you can't put the init in the ctor in the example you pasted.
[19:21] isaacs: nrstott: almost no value. like a nickel next to a new car. that kind of value. value that i would happily throw away and not notice.
[19:21] ashb: Object.crete(Tile.prototype) would still work.
[19:22] isaacs: nrstott: all it is is a reason to check out Traits.
[19:22] isaacs: nrstott: it's not a reason to *like* traits.
[19:22] creationix: ashb: because don't want the init all the time
[19:22] nrstott: isaacs, I agree, there's no argument here
[19:22] ashb: creationix: Object.create for when you dont.
[19:22] nrstott: isaacs, it's not a reason to like traits. I like Traits because it's useful.
[19:22] isaacs: nrstott: certainly not a reason to *use* traits
[19:22] creationix: ashb: but then you get two different kinds of objects
[19:22] nrstott: also you can 'npm install traits' now :)
[19:22] ryan_gahl: toe-mah-toe
[19:22] creationix: one is instanceof Tile, the other is not
[19:22] isaacs: oh, neato :)
[19:22] ryan_gahl: toe-may-toe
[19:23] ashb: creationix: no you dont. x and y in my example are both instanceof Foo
[19:23] isaacs: creationix: foo = Object.create(Tile.prototype); foo instanceof Tile // true
[19:23] pterk: hi, against all expectations (not knowing c++) i've managed to get a small c++ module to build. However it does not work :-( Any tips would be appreciated: http://pastebin.com/xdLrvJtr
[19:23] isaacs: js> function A () {}; function B(){}; B.prototype = Object.create(A.prototype); b = new B; b instanceof A
[19:23] gbot2: isaacs: Error: TypeError: Object.create is not a function
[19:23] graouts has joined the channel
[19:24] isaacs: stupid gbot2
[19:24] graouts: Hi everyone
[19:24] graouts: is there a public issue tracker for Node.js?
[19:24] ryan_gahl: 11,00•12,00graouts11,00• yes, issacs
[19:24] graouts: I believe I've found a bug and would like to raise it in the most appropriate place
[19:24] ryan_gahl: isaacs*
[19:24] ryan_gahl: :P
[19:24] isaacs: js>Object.create=function(p){function f(){};f.prototype=p;return new f}; function A () {}; function B(){}; B.prototype = Object.create(A.prototype); b = new B; b instanceof A
[19:24] tsmith: http://gist.github.com/513097
[19:24] creationix: inline Object.create, fun
[19:24] ryan_gahl: tickets tab on git
[19:24] isaacs: js> Object.create=function(p){function f(){};f.prototype=p;return new f}; function A () {}; function B(){}; B.prototype = Object.create(A.prototype); b = new B; b instanceof A
[19:24] gbot2: isaacs: true
[19:24] ryan_gahl: hub
[19:25] isaacs: huzzah!
[19:25] graouts: alright!
[19:25] graouts: it's some nasty UTF-8 encoding issues it appears
[19:25] ryan_gahl: issues, rather
[19:25] ryan_gahl: http://github.com/ry/node/issues
[19:25] creationix: isaacs: ashb, fair enough, but still, I think prototypal is easier for beginners to understand and just as powerful
[19:25] isaacs: graouts: send to the mailing list with a patch that adds a failing test.
[19:25] mape: Fastest way to sum an array with numeric values? Just for loop it?
[19:25] graouts: isaacs: OK, writing a test case
[19:25] creationix: and duck typing is better than instance of
[19:25] isaacs: graouts: thanks :)
[19:25] ashb: js> [1,2].reduce( function(x,y) { return x+y} )
[19:25] gbot2: ashb: Error: TypeError: [1, 2].reduce is not a function
[19:25] graouts: no problem isaacs
[19:25] creationix: this is a loosly typed language after all
[19:26] tsmith: creationx, check out the gist I posted and see if that is along the lines of what you are thinking
[19:26] ryan_gahl: duck typing is better than instanceof when it is, but not when it's not
[19:26] isaacs: creationix: duck typing is better for interface testing. but sometimes is-a typing is handier.
[19:26] isaacs: creationix: instanceof is a higher-level typeof, and it's useful for much the same kind of situation.
[19:26] ashb: specificaly when you are dealing with native objects
[19:26] mape: ashb: thanks
[19:27] creationix: tsmith: close
[19:27] creationix: CreationXEventEmitter.prototype = EventEmitter is wrong though
[19:27] kuya: has mdc js wiki got broken? o_0
[19:27] ryan_gahl: you've got a square peg and you see all holes as square
[19:27] creationix: CreationXEventEmitter.prototype = Object.create(EventEmitter.prototype)
[19:28] mape: ashb: seems that is 2% slower then using a while(length--) though
[19:28] kuya: oh no
[19:28] ashb: mape: you care about 2%? ;)
[19:28] ashb: mape: for what length of input as well?
[19:28] mape: ashb: Yeah, it is a algorithm, "other who bought this also bought" kinda deal
[19:29] mape: so it runs a lot of times
[19:30] creationix: isaacs: ok, you have convinced me that constructors aren't utter bunk, but I still hole that they should not be taught first to beginners, especially if they come from a class based language
[19:30] creationix: s/hole/hold/
[19:30] isaacs: creationix: sure. but the real problem there is teaching class languages to beginners.
[19:31] stagas has joined the channel
[19:31] isaacs: creationix: they should learn C, and then JavaScript, and THEN java.
[19:31] creationix: well, we can't change the past ;)
[19:31] isaacs: so they can appreciate its awfulness
[19:31] tsmith: constructors in javascript are just regular functions - the capital starting name is just a convention to differentiate them
[19:31] isaacs: or just teach ruby and python in high schools.
[19:31] tsmith: it is the new keyword that gives them an empty execution context
[19:31] creationix: tsmith: I know, that's what I mean
[19:32] tsmith: it is hard to explain execution context to beginners, though, I agree
[19:32] ashb: Ctor.call(Object.create(Ctor.prototype))
[19:32] ashb: >_>
[19:33] isaacs: yeah, tsmith, i think ashb just ate your last comment and spit out an answer.
[19:33] isaacs: "new does this: ..."
[19:33] creationix: ashb: nice
[19:33] ashb: still have to grok execution contets, but you can explain new in other terms at least
[19:33] isaacs: riht
[19:33] isaacs: you stil have to explain call/apply, and Object.create
[19:33] creationix: ashb: took me a second to realize what that was, and then I was like "It's new!"
[19:34] ashb: ACTION might have spent far too long in the past trying to work out how to make JS do things it sohuldn't
[19:34] creationix: thanks for teaching me the Object.create(Foo.prototype) idea
[19:34] creationix: that makes constructors almost berable
[19:34] creationix: *bearable
[19:35] ashb: no worries.
[19:35] ashb: always happy to have an argument ;)
[19:35] creationix: it's a shame there is no instanceof for pure object chains
[19:35] creationix: seems it would be simpler to implement and understand
[19:35] ashb: i do agree that they are a pain when you get into inheritance
[19:35] creationix: a = {}; b = Object.create(a); b childof a
[19:36] jetienne has joined the channel
[19:36] ashb: there is something like that ...
[19:36] creationix: there is Object.getPrototypeOf, but it's only one level
[19:36] ashb: yeah i'm thinking of something similar (maybe made up)
[19:37] ashb: https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Object/isPrototypeOf ?
[19:37] ashb: a.isPrototypeOf( b )
[19:38] ARob has joined the channel
[19:38] creationix: ACTION wonders if V8 has that
[19:38] ashb: not sure. I thought it was ES5
[19:38] ashb: 15.2.4.6Object.prototype.isPrototypeOf (V)
[19:38] creationix: it does, sweet!
[19:38] ashb: so no reason it shouldn't other than its not been written yet
[19:39] ashb: i've discovered all sorts of neat tricks form reading source codes of JS engines
[19:40] ashb: and the spec too.
[19:40] creationix: I read parts of the spec, couldn't make it through the whole thing
[19:40] ashb: yeah its quite dry :)
[19:40] creationix: the language seems very condecending
[19:40] isaacs: dude, the es5 spec isn't dry!
[19:40] isaacs: that's exciting reading!
[19:41] creationix: it says, "you should do this and this is how you should implement it"
[19:41] creationix: but I guess a spec needs that
[19:41] isaacs: creationix: yeah, that's how language specs are
[19:41] isaacs: but it's such a fascinating language
[19:41] creationix: ASI!
[19:41] isaacs: please don't call it that. nothing gets inserted.
[19:41] creationix: I read that section several times in disbelief
[19:42] _announcer: Twitter: "looking forward to test #express framework for #nodejs in combination with mongoDb" -- Dominik Guzei. http://twitter.com/DominikGuzei/status/20574091686
[19:43] creationix: isaacs: but that is the title of the section 7.9 Automatic Semicolon Insertion
[19:43] creationix: I know that's probably not how it's actually implemented
[19:43] Gruni has joined the channel
[19:44] creationix: they clearly wanted us to think of it as and describe it as inserting
[19:45] mscdex: man, if only cisco ip phones had websockets :-D
[19:45] ashb: i've been bitten by ASI in ruby too
[19:45] _announcer: Twitter: "use #nodejs today on http://bit.ly/9XyKGv easy and cheap shell access!" -- Dominik Guzei. http://twitter.com/DominikGuzei/status/20574252220
[19:45] creationix: well, in ruby it's not as big a deal
[19:45] creationix: there are common cases on JS where you are required to have them
[19:46] ashb: no - its just cose i'm used to postfixed conditionals from perl
[19:46] creationix: even with a single statement per line
[19:46] ashb: do_some_op\n unless condition
[19:46] creationix: ahh
[19:46] ashb: where do_some_op is long
[19:46] ashb: (large number of chars)
[19:46] hansek has joined the channel
[19:46] isaacs: creationix: yeah, i know
[19:46] _announcer: Twitter: "@daagaak I'm slightly insane and attempting to implement some email libraries in node.js." -- Steve Streza. http://twitter.com/SteveStreza/status/20574313720
[19:47] creationix: isaacs: not saying it's right, but that's clearly what the spec says
[19:47] isaacs: creationix: suresure
[19:47] isaacs: creationix: that choice of terminology is not ideal.
[19:47] creationix: which is why I read that section so many times in disbelief
[19:47] creationix: and the algorithm is horrible too
[19:47] ashb: 'automatic statemtn termination'
[19:47] isaacs: well, the crazy bit is that, that's not even the best way to explain how to implement it.
[19:47] creationix: "if syntax error, back up, add semi, try again"
[19:48] ashb: isn't that excatly what ruby does too?
[19:48] ashb: oh no
[19:48] ashb: not evne close
[19:48] mscdex: not this discussion again
[19:48] ashb: ignore me
[19:48] _announcer: Twitter: "can't think of a better web app combination than #sproutcore and #nodejs - revolution on the web!" -- Dominik Guzei. http://twitter.com/DominikGuzei/status/20574391629
[19:48] isaacs: haha
[19:48] mscdex: :S
[19:48] ashb: mscdex: there are only like 3 discussions in the history of the world ;)
[19:48] creationix: mscdex: don't worry, I have no intention of defending semi's right now
[19:49] creationix: I just wish they were either 100% required or 100% not needed
[19:49] creationix: so there would be no debate
[19:49] creationix: or only needed to put several statements on a single line
[19:49] isaacs: creationix: i actually really like them the way that they are.
[19:49] mscdex: * Now talking on #semicolonchat
[19:49] creationix: hah
[19:49] isaacs: creationix: yeah, that last one.
[19:49] ashb: yeah - ambiguity = bad
[19:49] isaacs: creationix: they're only needed if you need to put multiple statements on the same line.
[19:50] ashb: the clasical return\n{stuff example. does ruby suffer from that too?
[19:50] mscdex: the only thing i have to say on the matter and for the record is i prefer semicolons
[19:50] isaacs: mscdex: that's good to know.
[19:50] ashb: actually again. stupid question.
[19:50] ryan_gahl: ACTION gets on mooter scooter and heads on down to mootville
[19:50] ashleydev has joined the channel
[19:50] isaacs: creationix: what would be good is if function calls and expressions didn't use the same syntax, and if array literals and property access didn't use the same syntax.
[19:50] creationix: isaacs: or your next line starts with ( or [
[19:50] creationix: that's the part I don't like
[19:50] mscdex: what kind of mileage do you get on a mooter scooter?
[19:50] isaacs: creationix: yeah ^
[19:51] creationix: mscdex: about 50mpg, it's a big scooter
[19:51] isaacs: creationix: i'd like to see ( actually be a syntax error if the line above isn't a function.
[19:51] isaacs: creationix: or [
[19:51] isaacs: if the line above isn't an object
[19:51] isaacs: so you'd *have* to start those lines with a ;
[19:51] mscdex: let's just use php where arrays start with: array(
[19:51] creationix: isaacs: so no (function(){}()) ?
[19:51] mscdex: :p
[19:51] isaacs: creationix: no. i do ;(function () {}}()
[19:52] isaacs: creationix: i learned the other day that this works, too, though: !function () {} ()
[19:52] mscdex: that's one funky smiley
[19:52] creationix: isaacs: ahh, I see what you're saying,
[19:52] isaacs: lunchtime. have fun folks!
[19:52] isaacs has left the channel
[19:52] ryan_gahl: I really like chocolate icecream, but i hear some people like vanilla, while even others enjoy preline
[19:52] mscdex: you better pray it's lean
[19:54] ryan_gahl: I really like chocolate icecream; some people like vanilla; others enjoy preline
[19:54] ashb: (oxford comma)++
[19:54] creationix: ryan_gahl: which is better, low fat or low sugar?
[19:55] mscdex: fat free and low sugar?
[19:55] creationix: and which will make you fat
[19:55] creationix: mscdex: but then it's nasty, why eat it?
[19:55] ashb: isn't sugar a type of fat as far as nutrition labels are concerned?
[19:55] mscdex: or fat free and splenda ice cream
[19:55] ashb: 'fats x, of which sugars y'?
[19:55] creationix: fake sugar won't make you fat, just cause cancer
[19:55] mscdex: that was sacchrin (sp?)
[19:56] ryan_gahl: my ice cream is high fat, high sugar, but then I work out later to burn the calories
[19:56] creationix: ryan_gahl: sounds good to me
[19:56] mscdex: heh
[19:56] creationix: though, low sugar is better than low fat because both are calories, but the fat will make you not hungry
[19:56] mscdex: i've tasted some varieties of fat free vanilla ice cream and some of them don't really taste any different
[19:56] ryan_gahl: to you
[19:57] [[zz]] has joined the channel
[19:57] ryan_gahl: ACTION hammers point home
[19:57] creationix: anyway, this is not the forum for me to teach nutrition
[19:57] creationix: :P
[19:57] mscdex: ACTION shakes a fist at ice cream
[19:57] creationix: we're all too busy coding to get fat anyway, I know I am
[19:57] mscdex: it's all ryan_gahl's fault
[19:58] creationix: ACTION wonders how many people in the room are younger than him
[19:58] ryan_gahl: 11,00•12,00mscdex11,00• node.js rules!
[19:58] ryan_gahl: 31 here, creationix
[19:58] mscdex: ryan_gahl: dude, i already know this. you're preaching to the choir.
[19:59] ryan_gahl: 11,00•12,00mscdex11,00• ^^
[20:00] creationix: everyone should know my age from my standard JSON object ;)
[20:00] mscdex: i'm writing a server in node that hosts cisco ip phone apps hehe
[20:00] creationix: mscdex: fun
[20:00] creationix: I wish iPads had websockets
[20:00] mscdex: i wish my phone had a color screen
[20:02] FransWillem: creationix: Hey, checked out the connect docs on my phone today during my journey, didn't get a chance to read it all, but it really fits in with how I imagined a proper node.js API :)
[20:03] FransWillem: creationix: Just a quick question, the request/response pair, are those the normal http.ServerRequest and http.ServerResponse pairs ?
[20:03] creationix: FransWillem: yep
[20:04] creationix: connect tries to stay as close to raw node as possible while making it possible to stack third-party layers
[20:04] FransWillem: :)
[20:04] FransWillem: Was expecting a lot of high-level stuff when I started reading, was pleasantly suprised to see it was so low-level :)
[20:05] FransWillem: Don't quite agree with the routing app, but then again, in it's current form that's damned easy to replace :)
[20:06] ryan_gahl: I like the router, nice and simple
[20:07] ryan_gahl: 11,00•12,00FransWillem11,00• curious, what's you disagree with?
[20:07] ryan_gahl: s/'s/
[20:07] mape: ryan_gahl: you do know that you are adding colors to nicks you write?
[20:08] mape: And that looks like shit for everyone not using the same theme you do?
[20:08] ryan_gahl: heh, nope - stupid inivsion plugin for mIRC
[20:08] ryan_gahl: sry
[20:08] mape: Just checking :)
[20:08] ryan_gahl: ...looking for 'disable colors' box
[20:08] creationix: FransWillem: yeah, if you don't like it, roll your own
[20:08] creationix: you get all the other features
[20:08] creationix: they are nicly decoupled
[20:09] mscdex: ACTION shakes a fist at mirc
[20:09] ryan_gahl: 11,00•12,00mape11,00• better?
[20:09] ryan_gahl: nope
[20:09] mape: nope
[20:09] mscdex: lol
[20:09] shimondoodkin: creationix: im 26
[20:09] sveisvei1 has joined the channel
[20:10] creationix: sounds like we're all about the same age within 10 years
[20:10] mape: homogeneous community
[20:10] mscdex: does crockford use node?
[20:10] creationix: he thinks node is cool, but I've never seen him here
[20:10] creationix: I got to meet him at txjs
[20:11] caolanm: when doing sys.pump the read stream sometimes emits 'end' multiple times
[20:11] sveisvei: he said he liked the experiment at least :P
[20:11] sveisvei: long time ago
[20:11] mscdex: the crockford files!
[20:11] bryanl has joined the channel
[20:11] creationix: sh1mmer: do you know if crockford still plays with node?
[20:11] ryan_gahl: •mape• test
[20:11] caolanm: ACTION wonders if this is related to: http://groups.google.com/group/nodejs/browse_thread/thread/c33c0445f63b658e/5c4382ddd8b05f1e?lnk=gst&q=sys.pump+should+fire+callback+on+writeStream+close#5c4382ddd8b05f1e
[20:11] mape: ryan_gahl: works, still adds wonky characters intead of using : but yeah, better
[20:12] ryan_gahl: looking for that option now too
[20:12] creationix:
[20:12] shimondoodkin: caolanm: it does stream.end
[20:12] mscdex: funky unicode box detected!
[20:12] mape: creationix: Think of the windows users!
[20:12] creationix: I wouldn't assume windows
[20:13] caolanm: shimondoodkin: but sometimes it gets called twice which is always followed by a bad file descriptor error
[20:13] creationix: howtonode gets about as many linux people as windows
[20:13] creationix: and very few using IE
[20:14] creationix: the largest by far is OSX + Chrome, must be a developer community
[20:14] ryan_gahl: mape: ?
[20:14] ryan_gahl: sweet
[20:14] mape: ryan_gahl: perfect
[20:15] creationix: ∞
[20:15] ryan_gahl: sry, feel lame for not knowing it wasn't just client side
[20:15] x_or: Anyone know how to use the new multipart module? It seems to be a very different interface than the old one, more abstracted, but now I am unsure how to wire into a regular http request.
[20:16] dgathright has joined the channel
[20:16] x_or: Or, can someone tell me a better way to handle uploads of large files in chunks? I like the interface for the old multipart, where data comes in in chunks.
[20:16] x_or: I'd prefer to avoid breaking up a multipart request on my own.
[20:17] nodev: request.on('data'
[20:17] shimondoodkin: see my account
[20:18] shimondoodkin: http://github.com/shimondoodkin/multipart-js
[20:18] shimondoodkin: also grab my version i have added functions for it to look like a stream
[20:19] x_or: Ah, OK. I was looking at isaacs version.
[20:19] creationix: x_or: have you seen the stuff felix uses?
[20:19] x_or: creationix: The Formidable library? Yeah, this looks like it could work.
[20:20] shimondoodkin: nodev: also look herehttp://github.com/shimondoodkin/nodejs-mongodb-app/blob/master/httputils.js
[20:20] creationix: x_or: I think it's the one he uses for transloadit, so it should be heavily tested
[20:20] x_or: Thanks guys.
[20:21] shimondoodkin: creationix: i found it buggy for me
[20:21] sveisvei1 has left the channel
[20:21] creationix: really, I have no clue, just my guesses
[20:21] shimondoodkin: nodev: i had no chance to test the integration with httputils.js
[20:22] shimondoodkin: also the temporary files probably an issue
[20:23] x_or: Good feedback. Thanks again, got to go. Will check into this more later.
[20:25] x_or: shimondoodkin: So, if I look quickly at your examples, what I should do is in my node app, when an upload request comes in, pull out the filename and content type, and then create a writer object, and then… Here I am stuck. I am unclear how to connect the http request object to the parser object. Am I being a dunce?
[20:25] [[zz]] has joined the channel
[20:25] x_or: I guess I need to review the examples in your code tree for stream, as you said.
[20:26] shimondoodkin: yes you can see the stream example
[20:26] x_or: This one I suppose: http://github.com/shimondoodkin/multipart-js/blob/master/example_stream2.js
[20:26] shimondoodkin: amore polished examle is the http utils
[20:26] shimondoodkin: stream2 is with log
[20:27] shimondoodkin: * small note : the examples might not work , i have developed on the test_strea.js
[20:27] x_or: Great, this is very helpful and much clearer.
[20:27] tekky has joined the channel
[20:28] x_or: OK, well, then if they don't I can give you feedback. The beauty of open source. :)
[20:28] x_or: Gotta run. Thanks again.
[20:29] matt_c has joined the channel
[20:30] x_or has joined the channel
[20:34] _announcer: Twitter: "nodejs + Comet + edit pub / sub - http://bit.ly/ae27Vs" [lv] -- matthew vermaak. http://twitter.com/matthewvermaak/status/20576598911
[20:36] tek has joined the channel
[20:38] bradleymeck1 has joined the channel
[20:38] joshdulac has joined the channel
[20:41] maushu has joined the channel
[20:42] tiboll has joined the channel
[20:42] _announcer: Twitter: "Anyone using node.js for anything larger-scale?" -- Dave Concannon. http://twitter.com/daveconcannon/status/20576961035
[20:42] ryan_gahl: pgriess: you got that one?
[20:43] ryan_gahl: n/m he's not here :)
[20:46] bradleymeck1: http://js1k.com/home , anyone going to enter?
[20:46] V1 has joined the channel
[20:49] tmpvar has joined the channel
[20:51] _announcer: Twitter: "No, but how cute your little guys node.js framework but at least it works when you can not fart error or qqchose ..." [fr] -- Thibaut LE LEVIER. http://twitter.com/tiboll/status/20577371616
[20:51] tekky has joined the channel
[20:51] maxsilver has joined the channel
[20:52] tiboll: lol there is a bot which translate every tweet about node.js? :p
[20:52] bradleymeck1: yep, we can fire up the bot to tweet back too if you want
[20:53] tiboll: that will be fine tkx ;)
[20:53] ryan_gahl: bradleymeck1: if (bradleymeck1.isOnline()) loginFrankie()
[20:54] _frankie has joined the channel
[20:55] tiboll: but may I try to talk about my problem here? does anyone try to use geddy with mongodb? geddy doesn't create my db and I haven't got any error when I run the "geddy create:db"
[20:55] EyePulp has joined the channel
[20:56] ryan_gahl: mde is the author - he hangs out here
[20:56] JimBastard has joined the channel
[20:56] bradleymeck1: sure, idk who would be best to help
[20:56] JimBastard: crap, so i bought sc2. ill see you guys next year
[20:56] JimBastard: i got two 10 day trials if anyone wants to play
[20:56] ryan_gahl: sc2?
[20:56] JimBastard: starcraft 2
[20:57] ryan_gahl: yikes
[20:57] _announcer: Twitter: "@jsjohnst Ideally I'd like to write a library for node.js which interfaces with POP and IMAP, but I'm starting with the easy one first. :)" -- Steve Streza. http://twitter.com/SteveStreza/status/20577683658
[20:57] JimBastard: i wont go full blown addict, sc2 is a drug best done in moderation
[20:59] ryan_gahl: just like crack
[20:59] tiboll: I've got my mongodb-native driver installed for node.js and I describe my Geddy db config as this.database = {adapter: 'mongodb', hostname : 'localhost', dbName: 'geddybytor', port: 27017};
[20:59] tiboll: and my mongodb is running well, I can connect on it using the mongo shell
[21:00] tiboll: did anyone know what I did wrong?
[21:00] _announcer: Twitter: "Shoutbox with Grasshopper and CouchDB - How To Node: http://bit.ly/b4gNzm <- more node.js goodness" -- Hernan Garcia. http://twitter.com/theprogrammer/status/20577815194
[21:00] ludde_ has joined the channel
[21:02] tiboll: If I use a sqlite db it works
[21:02] tiboll: but it didn't with mongo
[21:03] ryah: shoutbox with grasshopper
[21:03] ryah: cool
[21:06] _frankie has joined the channel
[21:06] creationix: yeah, grashopper is pretty neat
[21:06] creationix: *grasshopper
[21:07] pterk: I've made a module that builds and I can import it but as soon as I initialize it, it aborts void node::ObjectWrap::Wrap(v8::Handle): Assertion `handle->InternalFieldCount() > 0' failed. What am I likely to do wrong?
[21:07] tiboll: anyone? any idea to solve my problem?
[21:09] V1: tiboll are you sure its greddy and your mongodb driver?
[21:09] ryah: pterk: probably missing a "new" somewhere
[21:09] ryah: pterk: that's a bug though.
[21:10] softdrink has joined the channel
[21:11] creationix: tiboll: sorry, most of us haven't trued geddy yet. mscdex have you?
[21:11] creationix: *tried
[21:12] pterk: ryah: a bug in my code I asume ;-)
[21:12] _announcer: Twitter: "@ Germanmartinez that is what we see complex ... I would like to do things with node.js, but do not allow" [es] -- Alvaro Pereyra. http://twitter.com/Yaraher/status/20578388543
[21:13] CIA-77: node: 03Ryan Dahl 07eventsource * ra3298a3 10/ (lib/fs.js src/node_stat_watcher.cc src/node_stat_watcher.h): StatWatcher to use EventSource (+8 more commits...) - http://bit.ly/craEO1
[21:13] ryah: ^- rebase
[21:14] tiboll: V1: I'm not really sure about the name of the driver. seems like there is several mongodb drivers for node.js
[21:14] V1: tiboll: have you tested it without greddy?
[21:15] V1: geddy*
[21:15] isaacs has joined the channel
[21:16] tiboll: V1: Yes but the examples I find use "require" to get the mongo driver and I'm not sure about the way to name it in my geddy config
[21:16] konobi: ryah: how goes?
[21:16] ryah: konobi: yo
[21:16] konobi: ryah: had some fun with node at 4am =0)
[21:17] tiboll: creatonix: my I try with an other mvc framework for node.js? I just started to develope. Any advices?
[21:17] ryah: konobi: what's you make ? :)
[21:17] konobi: ryah: http://github.com/ry/node/issuesearch?state=open&q=stream#issue/231
[21:18] konobi: that might give a quick impression of what i was up to
[21:18] konobi: =0)
[21:20] _announcer: Twitter: "@SteveStreza if you want help, let me know. Always up for node.js and know both protocols intimately." -- Jeremy Johnstone. http://twitter.com/jsjohnst/status/20578766132
[21:23] zemanel has joined the channel
[21:25] tiboll: V1: I try with the sample code from http://wiki.github.com/christkv/node-mongodb-native/installation and it work
[21:27] V1 has left the channel
[21:27] V1 has joined the channel
[21:27] _announcer: Twitter: "driving myself CRAZY trying to get a node.js script running in a virtualbox to allow me to connect to it from my host OS. PLEASE HELP" -- Jason McLeod. http://twitter.com/jasonmcleod/status/20579102773
[21:27] V1: tiboll: So you got it working now?
[21:27] ezmobius has joined the channel
[21:27] ashb: process.binding('net')
[21:27] ashb: what's that about?
[21:28] ashb: new way of loading native/core components?
[21:28] ashb: (i haven't looked at node in about 6mo)
[21:29] ThePub has joined the channel
[21:30] bradleymeck1: its a way of loading the natives (not recommended if you can avoid)
[21:31] benburkert has joined the channel
[21:32] ryah: ashb: internal private api
[21:33] JimBastard: hey ashb , welcome back
[21:33] JimBastard: :-D
[21:33] JimBastard: check me out http://github.com/marak >.<
[21:34] bradleymeck1: http://js1k.com/home jim you in this?
[21:34] tk: hmm so GeekTools + Node == lame but... NerdTools (Geektool branch) supports HTML + Node == nifty :)
[21:34] JimBastard: bradleymeck1: i was thinking about it, but im a bit to busy
[21:34] JimBastard: bradleymeck1: id want to do something with injection and webservices versus a visual thing anyway
[21:34] bradleymeck1: cool cool, same but i got like 2 days
[21:35] JimBastard: so id prob lose
[21:35] JimBastard: how many chars in 1k?
[21:35] bradleymeck1: im going to try space invaders within 140char i hope
[21:35] bradleymeck1: 1000
[21:35] JimBastard: space invaders in a tweet?
[21:35] JimBastard: brutal
[21:35] bradleymeck1: eval transforms!
[21:35] JimBastard: ahaha jesus
[21:36] bradleymeck1: might be stuck at 250 right now
[21:36] ashb: hmmm should really make the markdown tests run under node and browsers
[21:36] JimBastard: i was wondering if the starcraft engine has any way to hook in live data streams
[21:36] JimBastard: prob not
[21:36] ashb: i doubt it
[21:36] JimBastard: it would be nice to manage my hosting app via starcraft interface
[21:36] JimBastard: click , drone down
[21:36] creationix: ashb: which markdown is yours?
[21:36] JimBastard: click, spawn drone
[21:36] JimBastard: could get confusing
[21:36] ashb: creationix: evilstreak's one
[21:37] creationix: thought so, just making sure
[21:37] ashb: creationix: the good one ^_^
[21:37] ashb: >_>
[21:38] creationix: bradleymeck1: yeah, 140 is tough
[21:38] ashb: people keep raising bugs without patches. even worse without failing tests. That's why I want to make it easier to run the test suite
[21:38] JimBastard: lolwut this mouse i just bought came with a usb 2 ps/2 adapter
[21:38] bradleymeck1: creationix anything decent in 140 is going to have to use eval
[21:38] JimBastard: for sure
[21:38] bradleymeck1: or like me, sneaky eval under setinterval
[21:38] JimBastard: you might have to build a char array, then pull char strings out to execute code
[21:39] creationix: bradleymeck1: especially if you allow unicode stuff and count them as single chars
[21:39] creationix: bradleymeck1: you're counting your decoder in the 140 right?
[21:40] bradleymeck1: yep
[21:40] creationix: yeah, that's the hard part
[21:41] creationix: how does setInterval help?
[21:41] bradleymeck1: its going to be chaining string concats in an array,and ensuring the , join is valid, setInterval(string) <- event loop w/ string eval
[21:41] creationix: ahh
[21:42] ThePub has joined the channel
[21:42] JimBastard: bradleymeck1: if you feel like teaming up id be willing to try and take your working code and try to shorten it though sheer brute force and magi
[21:43] creationix: is there an easy way to type lambdas on OSX
[21:43] JimBastard: i have no idea how i'd do it, but id try
[21:43] creationix: option + f is ƒ
[21:43] bpot has joined the channel
[21:43] ashb: i'm not seeing lambda specifically
[21:44] creationix: that's a shame, I'd love to alias "function" with a lambda
[21:44] ashleydev has joined the channel
[21:44] JimBastard: coffeescript?
[21:44] ashb: creationix: you say that. it was suggested on es-discuss
[21:44] creationix: I'm sure
[21:44] ashb: tho for spidermonkey's short function syntax
[21:44] ashb: |function(x) x * x|
[21:45] creationix: we discussed in coffeescript when I was working with that
[21:45] creationix: ashb: yeah, that's not bad, too bad only mozilla has it
[21:45] ashb: creationix: someone has to innovate
[21:45] JimBastard: yaaa we are hosting the nyc nodeknockout hq
[21:45] ashb: creationix: something like it might make it to ES-next
[21:46] ThePub has joined the channel
[21:46] JimBastard: we are definitely going to win the "most drunk" hq award
[21:46] creationix: ashb: the cool thing about server-side js means we get to use new language features the day they are implemented in node, not wait till 99.9% of browsers have upgraded
[21:46] ashb: yeah
[21:46] ashb: does v8 have [a,b]=[b,a] yet?
[21:46] ashb: and the other destructuings
[21:47] creationix: still, I think ES-next is a while off
[21:47] ashb: <3 them
[21:47] creationix: ashb: nope
[21:47] ThePub has joined the channel
[21:47] creationix: ashb: could that be done with a simple pre-processer?
[21:47] ashb: ah yeah v8 isn't doing anything non standard (or otherwise required to 'not break the web') is it?
[21:47] stagas_ has joined the channel
[21:47] creationix: ashb: V8 did grab a couple ideas from mozilla, but not much
[21:48] creationix: they want to follow JSC
[21:48] mikeal has joined the channel
[21:48] ThePub has joined the channel
[21:48] creationix: ashb: I assume you saw this page I started http://wiki.github.com/ry/node/ecma-5mozilla-features-implemented-in-v8
[21:48] ashb: creationix: long time ago, yeah
[21:49] creationix: other than the __foo__ methods it's pretty uch ES5 stuff
[21:49] ashb: might be worth distinguishing which are Moz specific and which are ES5 on that page
[21:49] ThePub has joined the channel
[21:49] creationix: ashb: do you think it matters enough?
[21:49] ashb: not if thats the case, no
[21:50] creationix: is get/set syntax ES5? I don't remember
[21:50] ashb: think so
[21:50] creationix: but not __defineGetter__
[21:50] ashb: no __wunderbars__ are
[21:51] creationix: ACTION opens my 252 page pdf
[21:51] creationix: I don't see __defineGetter__ in the spec
[21:52] ashb: yeah thats definately not in there
[21:53] creationix: anyway, I wonder if a simple preprocessor could implement destructuring
[21:53] bradleymeck has joined the channel
[21:53] creationix: or if it's too hard
[21:54] creationix: it would have to make temp variables for sure
[21:54] creationix: and make sure they don't clash
[21:55] siculars has joined the channel
[21:55] tmpvar has joined the channel
[21:57] joshdulac: lol you mentioned temp variables, and moments later tmpvar joins and leaves
[21:57] isaacs: ryah: you around?
[21:58] bradleymeck has left the channel
[22:00] _announcer: Twitter: "http://bit.ly/9OQU05 | Socket.IO = # HTML5 websocket / flash client-side & server-side NodeJS" [lv] -- François-G. Ribreau. http://twitter.com/FGRibreau/status/20580683242
[22:00] creationix: ashb: for each (let {name: n, family: { father: f } } in people) { ... }
[22:00] creationix: that's just cool
[22:00] ashb: <#
[22:00] ashb: for each is actually from the E4X spec
[22:00] ashb: creationix: but yes it really really is
[22:01] ashb: its one of the reasons i still use spidermonkey embeddings
[22:01] creationix: I'm talking about the destructuring part, but for each is neat too
[22:01] ashb: __iterator__ is cool too.
[22:01] ashb: behaves ery much like python
[22:01] ashb: for (let i in my_object)
[22:01] satori_: yield!
[22:01] ashb: calls __iterator__
[22:01] ashb: satori_: yeah that's there too
[22:01] omarkj has joined the channel
[22:02] joshbuddy has joined the channel
[22:02] isaacs: destructuring strikes me as being pleasingly earlangy
[22:02] isaacs: *erlangy
[22:02] isaacs: when you do deep stuff, especially
[22:02] ashb: never done erlang
[22:02] satori_: 'cuse me for sounding dumb, but what is 'destructuring'?
[22:02] isaacs: var { name: n, pets : { dog : { name:d }}} = {name:"bob", pets:{dog:{name:"fido"}}}
[22:02] isaacs: etc.
[22:03] isaacs: ashb: erlang has this very sophisticated pattern matching syntax.
[22:03] ashb: a = { prop: 'value'}; function( { prop: x } ) { alert(x) }
[22:03] creationix: satori_: it's a cool feature mozilla added to JavaScript https://developer.mozilla.org/en/new_in_javascript_1.7
[22:03] ashb: satori_: that would alert 'value'
[22:03] satori_: assign complex vars in one hit?
[22:03] ashb: var [a,b,c] = [1,2,3]
[22:04] satori_: kk. i get it. Kind python-like.
[22:04] ashb: probably inspired by python, yes
[22:04] isaacs: ashb: in erlang, you can actually set up "patterns" in a listen statement. it's a bit like using destructuring objects in a switch(){} statement
[22:04] ashb: isaacs: ah same as in haskel?
[22:04] creationix: isaacs: have you ever done haskel or ocaml?
[22:04] isaacs: ashb: prolly. i don't know haskel at alll
[22:04] creationix: yeah, they have awesome pattern matching
[22:05] isaacs: i've played with erlang here and there. it's neat, and it was really fun, but i'm no expert.
[22:05] creationix: haXe has it I seem to remember
[22:05] isaacs: mostly i stick to js, and delve into c/c++ as needed, or bash/php for some things
[22:05] isaacs: i like ugly languages.
[22:05] isaacs: all that "purity" and "cleanliness" just seems pretentious.
[22:06] isaacs: ;)
[22:06] satori_: lol
[22:06] creationix: ocaml is a lot more pratical than haskel
[22:06] creationix: and it faster than c++ sometimes
[22:06] isaacs: perl is the best. you can just let hte cat walk across the keyboard, and it's probably valid perl
[22:06] satori_: my cat writes better regex than me for syre.
[22:06] isaacs: i mean, it'll do *something*
[22:07] ashb: creationix: my head of department at uni invented ocaml
[22:07] ashb:
[22:07] isaacs: i used to use perl for a lot of oneliners, until i realized that sed was better for what i actually use it for
[22:07] creationix: ashb: super academic
[22:08] stride: isaacs: I'm pretty sure the cat approach is how many of the perl scripts here were done
[22:08] isaacs: seriously, though, anyone know why pretty languages, though objectively superior for all kinds of reasonable reasons, never seem to catch on like the ugly ones?
[22:08] technoweenie has joined the channel
[22:08] isaacs: js is kinda hideous. c is arguably much much worse.
[22:08] isaacs: and yet... we all keep using them.
[22:08] ashb: C++ is quite ugly too with all its <>
[22:08] SubStack: isaacs: sed really? you can just do perl -pe for that kind of stuff
[22:09] SubStack: or a whole host of other nifty switches
[22:09] ashb: perl -p -ie
[22:09] ashb: nom pie!
[22:09] ryan_gahl: isaacs: pretty and ugly are in your head
[22:09] ryan_gahl: i love js
[22:09] isaacs: ashb: right. C++ is like someone said, "you know what? macros in C are nice and all, but not NEARLY powerful/confusing enough. we need operators and templates."
[22:09] SubStack: delicious pie
[22:09] ashb: isaacs: i think thats exactly what happened
[22:09] isaacs: yeah, perl pie is tasty :)
[22:10] creationix: It's kinda sad that C++ is marketed as an easier C
[22:10] isaacs: i think the OOP thing was just a sales pitch to sneak in all those other insane features.
[22:10] isaacs: though, used wisely, operators adn templates are pretty nice
[22:10] ashb: C++0x fixes a nubmer of the issues with C++ templates i hear
[22:10] satori_: processors and software are so goddam complicated it amazes me that humans can build them at all sometimes.
[22:10] ashb: and GCC 4.5 fixes the errors
[22:10] ashb: by not displaying default tempalte params
[22:10] isaacs: satori_: well, we're not very good at it ;)
[22:11] ashb: which cuts the length of error messages by about 400%
[22:11] creationix: satori_: heh, the more I learn even HTTP I'm amazed the internet works at all
[22:11] SubStack: satori_: they can be, but they don't need to be a lot of the time
[22:11] ashb: creationix: it works by ignoring the spec ;)
[22:11] isaacs: ryan_gahl: totally agree. and i do too. but it's not a "pure" language by any means. definitely could've used another pass through the editing room.
[22:12] creationix: isaacs: maybe that's what mozills's JS is?
[22:12] isaacs: creationix, ashb: well, the thing is, there's not just like "one" http spec.
[22:12] joshdulac: isaacs: there's two =P
[22:12] isaacs: there's 2616, but that's just the start. there's also completely different specs for various other things that you have to be aware of.
[22:12] ashb: isaacs: it's better than the IRC 'spec'
[22:14] stride: hmm, just came around watching the google tech talk, anybody has some easy tutorial / reference / example on how to share a server socket between multiple instances of node?
[22:14] creationix: stride: yep
[22:14] creationix: stride: it's built into spark, I'll find the code
[22:14] stride: oh, great :) thanks
[22:15] creationix: stride: http://github.com/senchalabs/spark/blob/master/bin/spark#L329
[22:15] blakemizerany has joined the channel
[22:15] creationix: stride: if you make your app export the server in a module instead of calling listen explicitly, then you can just use spark
[22:15] blakemizerany has joined the channel
[22:15] dipser has joined the channel
[22:15] creationix: "spark -n 4" and it will spawn 4 child processes that share a port
[22:16] creationix: stride: also article about deploying with spark http://howtonode.org/deploying-node-with-spark
[22:18] creationix: stride: also multi-node is a way to do it internally in your app http://github.com/kriszyp/multi-node
[22:19] stride: wow. sometimes I really think node makes stuff too easy :) thank you very much
[22:20] creationix: :)
[22:20] dipser: what is the beste way to save big json objects to read, write and change them dynamically?
[22:20] creationix: dipser: what do you mean?
[22:20] dipser: what database should i use
[22:20] dipser: or just a plain file?
[22:20] creationix: like a key/value store?
[22:20] dipser: yes
[22:21] dipser: i read a little about mongodb
[22:21] creationix: depends on your needs, there is nStore, couch, redis
[22:21] dipser: but im not into it, so im asking which is the best
[22:21] creationix: it really depends on your needs
[22:21] tmpvar has joined the channel
[22:21] creationix: they are all pretty much the best in their unique strengths
[22:21] benburkert has joined the channel
[22:22] V1 has left the channel
[22:22] dipser: ok my needs are just reading and writing json objects on the fly
[22:22] dipser: nothing else
[22:22] dipser: while the server is running
[22:22] creationix: dipser: do you care about speed, durability
[22:22] creationix: simplicity
[22:23] dipser: nice to have ^^
[22:23] dipser: easy to get the data would be cool
[22:23] creationix: nStore is the easiest by far, it's in-process like sqlite. mongo inserts pretty fast, but it's not very durable with just one server, couch is very reliable, but a little slower than mongo
[22:23] isaacs: npm v0.1.23 released.
[22:23] isaacs: update command!
[22:23] creationix: redis and nstore are just key/value I think
[22:23] isaacs: npm update! it updates stuff!
[22:24] creationix: isaacs: :D
[22:24] isaacs: creationix: also, you can set configs with env vars
[22:24] creationix: dipser: couch and mongo have more advanced queries
[22:24] stride: heh, nice
[22:24] isaacs: creationix: so ivy's subshells can tell npm *exactly* how to work
[22:24] dipser: yea mongodb seems cool: http://www.mongodb.org/display/DOCS/SQL+to+Mongo+Mapping+Chart
[22:24] creationix: isaacs: one of these data I'll get around to integrating npm with my workflow
[22:24] creationix: then my packages will be up to date :P
[22:26] creationix: dipser: mongo was made for the problems ruby had
[22:26] _announcer: Twitter: "Tip for those using Mac OS X. Want to waste time, get P's life and frustrated? Try installing the VDM Node.JS # # melhorteriasidolerumlivro" [pt] -- lucabastos. http://twitter.com/lucabastos/status/20581978970
[22:26] creationix: it's powerful like a relational database, but returns super fast
[22:26] dipser: i like the json style
[22:26] creationix: but there is a cost
[22:26] creationix: dipser: most of them are JSON style
[22:26] dipser: ok didnt know
[22:26] dipser: good to know ;)
[22:26] creationix: except for SQL based relational databases
[22:27] creationix: dipser: mikeal had a good writeup somewhere explaining the tradeoffs
[22:27] mikeal: mongo was designed for analytics
[22:28] mikeal: so it's default is to "fire and forget", as in it doesn't return a response for writes
[22:28] creationix: dipser: if you just want something simple for storing and retrieving objects, I'd recommend nStore
[22:28] mikeal: and they aren't durable, they lose data and it's kind of expected
[22:28] mikeal: analytics are fuzzy anyway
[22:28] mikeal: but they have a big ad-hoc query API that is kinda like SQL
[22:28] stride: ruby had problems? nowai!
[22:28] mikeal: CouchDB is highly durable, highly concurrent
[22:28] isaacs: mikeal: yeah, mongo's arch is *superb* for any kind of "i have a bajillion pieces of data, and need to analyze them" type problems.
[22:29] mikeal: incremental map/reduce for queries, no adhoc quesries at all
[22:29] creationix: stride: well, performance issues with db queries that take a long time to come back, ruby is blocking
[22:29] dipser: i see
[22:29] mikeal: right, and for analytics you don't want to lock up your application process waiting on a response
[22:29] stride: creationix: I should have put a ";)" in there :)
[22:29] isaacs: mikeal: also, you should write a map/reduce for couchdb that does adhoc mongo-style ad-hoc queries.
[22:29] mikeal: that is way less of an issue with node cause you could just not assign a callback if you didn't want to wait :)
[22:29] mikeal: but in Ruby and Python it's a big deal
[22:29] creationix: dipser: http://github.com/creationix/nstore
[22:30] mikeal: isaacs: i could, but that would encourage people to maintain a schema in their data and that makes me cry
[22:30] creationix: dipser: but mikeal knows more about db's than I do
[22:30] mikeal: nstore is cool
[22:30] _announcer: Twitter: "Write an app in Seed storing data in CouchDB and communicating with Node.js server. Then you use all 3 major open-souce JS engines..." -- Michael Ekstrand. http://twitter.com/elehack/status/20582181512
[22:30] mikeal: if you just need a key/value store in your node process, nothing will be faster
[22:30] isaacs: mikeal: well, even if you don't assign a cb, it's still keeping a socket opne until it's done
[22:30] mikeal: what is Seed?
[22:31] mikeal: isaacs: yeah, but that's so cheap in node
[22:31] isaacs: mikeal: true that
[22:31] creationix: seed it the npm for SproutCore
[22:31] mikeal: it's comparable to clock cycles you use just waiting on the blocking socket.write call in Python
[22:31] creationix: hmm, but maybe that's not what it's about
[22:31] dipser: ok thank you mikeal and creatonix :)
[22:32] stride: http://live.gnome.org/Seed I guess
[22:32] isaacs: mikeal: cheap, maybe, but i mean, we're talking abouta case wher eyou have a site that's getting a ton of hits, and each one is pinging the analytics db
[22:32] isaacs: ACTION is still used to thinking about yahoo-scale...
[22:32] creationix: stride: I think you're right
[22:32] mikeal: also, you don't get that query API for free in mongo
[22:33] mikeal: you have to turn on indexing per-key
[22:33] mikeal: and when you do that is in the write path for documents
[22:33] mikeal: also, mongo has a global lock on the node during writes
[22:33] mikeal: so forget about concurrent updates to two databases being fast
[22:33] tiboll: hum my problem with geddy and mongodb is steel here... I thing I'm gonna try an other way. Any advice to create an MVC RESTfull webservice with node.js? which framework may I use?
[22:34] mikeal: express is the only other full stack
[22:34] mikeal: but doesn't provide an ORM
[22:34] isaacs: mikeal: i think that's because ORMs are dumb.
[22:34] mikeal: agreed
[22:34] mikeal: resourcer, a CouchDB api in node is looking nice tho
[22:35] mikeal: they are working on a full JSON-schema implementation
[22:35] creationix: tiboll: have you tried express or grasshopper?
[22:36] mikeal: is fab still being worked on?
[22:36] mikeal: last time i heard anything about it Streams were being defined
[22:36] mikeal: so i'm wondering how up to date it is
[22:36] creationix: mikeal: not sure, but he's coming to the meetup on Tuesday
[22:36] creationix: you should come down
[22:36] aconran has joined the channel
[22:36] mikeal: i may
[22:36] tiboll: I was just about to create a project with express
[22:36] mikeal: i might be down in Cupertino anyway
[22:36] isaacs: mikeal: i met jed finally just a week or two ago
[22:37] isaacs: mikeal: he said that fab is sort of on the back burner until he gets back to japan, iirc. he's sort of found some issues taht offended his esthetic sensibilities, and has to fix them.
[22:37] mikeal: tiboll: I just use request and CouchDB, the CouchDB REST api is a good enough API so i just use a good HTTP library with it http://github.com/mikeal/node-utils/tree/master/request/
[22:38] isaacs: ACTION does the same as mikeal, but except for the "request" bit.
[22:38] creationix: ORMs are useless unless they have validation
[22:38] isaacs: i just use node
[22:38] mikeal: node http client is quite verbose
[22:38] mikeal: it's annoying for simple things, that's why i always use request
[22:38] mikeal: unless i need to limit dependencies
[22:38] mikeal: creationix: resourcer does
[22:39] mikeal: also
[22:39] mikeal: if you can output JSON-schema for the validations
[22:39] marshall_law has joined the channel
[22:39] creationix: is there one that shares the validations with the browser?
[22:39] mikeal: you can stick that in a CouchDB validation function
[22:39] mikeal: and then have it validate in the DB as well as the application
[22:39] creationix: mikeal: like constraints in a realtional db?
[22:39] mikeal: yes and no
[22:40] mikeal: you can't enforce uniqueness, you can't enforce something that would require another query
[22:40] mikeal: but making sure that any field passes certain validations
[22:40] mikeal: that will work
[22:40] isaacs: mikeal: i guess that's not quite true. i have my own sort of custom npm-registry-client inside of npm
[22:40] creationix: mikeal: that's probably a good thing
[22:40] mikeal: yup
[22:41] isaacs: that reminds me, i need to write a spec for that...
[22:41] creationix: mikeal: so basically it can only enforce a schema
[22:41] mikeal: correct
[22:41] mikeal: isaacs: a spec for what?
[22:42] karboh has joined the channel
[22:42] mikeal: the catalog interface?
[22:42] isaacs: yeah
[22:42] mikeal: i talk with kris kowal about that the other night in LA
[22:42] tiboll: mikeal: I think I'm gonna stay on mongodb for this project. I already got the production server running it
[22:42] mikeal: er talked
[22:42] mikeal: he's happy that we're driving that
[22:42] isaacs: oh? what'd he have to say about it?
[22:42] isaacs: cool.
[22:42] mikeal: tiboll: do you have two slave backups?
[22:42] mikeal: cause that's their suggested default configuration
[22:43] mikeal: we also talked about how aweful the ECMA-Harmony modules specification is
[22:43] creationix: so harmony will get dropped likely?
[22:43] mikeal: Harmoney is just a collection of specs that arent' assigned to a version of ECMA
[22:43] creationix: oh, part of it, nevermind
[22:44] mikeal: so........
[22:44] mikeal: unless they drastically change direction
[22:44] mikeal: there will never be another version of javascript
[22:44] isaacs: hahah
[22:44] mikeal: seriously
[22:44] isaacs: i'm totally ok with there never being another major version of js
[22:44] mikeal: Brendan will implement it all in spidermonkey
[22:44] tiboll: mikeal: not yet. it's a production server but only for a short time project (in fact about a month) and with no budget for a big infrastructure
[22:44] mikeal: and nobody else will care
[22:44] mikeal: tiboll: ok, just be aware of the durability issues
[22:45] isaacs: it'd be nice to have a 5.1, 5.2 maybe, just clean up a few snags and bs, make "use strict" default in a few decades or something.
[22:45] mikeal: i would like to see things that aren't breaking changes to go in
[22:45] atmos: is there a suggested pure postgres driver around ?
[22:45] FransWillem has joined the channel
[22:45] mikeal: i actually had a real world use case for an ephemeron table the other day
[22:45] creationix: atmos: http://github.com/creationix/postgres-js
[22:45] atmos: ty
[22:45] mikeal: and i was like "wow, i'm eating my fuckin words right now"
[22:45] creationix: atmos: why?
[22:46] atmos: creationix: seeing how big of a pita it is to use on heroku
[22:46] creationix: atmos: I use it on heroku
[22:46] creationix: but it's not a perfect driver
[22:46] creationix: it will fall apart under high concurrency
[22:46] creationix: some race condition in the code
[22:47] atmos: don't think they're planning on installing the other stuff
[22:47] atmos: oh hrmm
[22:47] atmos: maybe i'll just do the mongohq integration
[22:47] atmos: thanks for the heads up
[22:47] creationix: atmos: do you have a real site or just experimenting?
[22:47] isaacs: creationix: why not http://github.com/ry/node_postgres?
[22:47] mikeal: does mongohq actually keep two slave replicas?
[22:47] creationix: isaacs: heroku doesn't allow native extensions
[22:47] mikeal: they fuckin better, they are the ones screaming that it's their suggested configuration
[22:47] isaacs: creationix: i see.
[22:48] creationix: atmos: I really want to just fix my driver
[22:48] creationix: so people can use it
[22:48] creationix: sometimes relational is better
[22:48] mikeal: sometimes it is
[22:49] mikeal: and when you use relational, you should use postgres, or drizzle
[22:49] creationix: heh, though I use my heroku database like a key/value store
[22:49] creationix: I can't stand mysql
[22:49] mikeal: so many people use postgres as a key/value store
[22:49] atmos: creationix: i have a little api driven app
[22:49] mikeal: i think it even has a mode you can set it in to
[22:49] mikeal: where it's optimized
[22:49] creationix: atmos: it's probably a simple race condition in my code, if you don't mind helping me find it, you can use postgres
[22:50] creationix: my sousaball.heroku.com site has never had any issues
[22:50] atmos: worth a shot, i'll give your a chance
[22:50] creationix: but it's not high traffic
[22:50] tilgovi has joined the channel
[22:50] atmos: this likely won't either
[22:51] creationix: atmos: my biggest complaint with postgres-js is that errors aren't matched with the query that triggered them
[22:51] creationix: and that isn't easy to fix, it requires a connection pool
[22:51] atmos: so they're about as useful as a lot of the stacktraces i see when programming node ;)
[22:51] creationix: postgres sends back error messages async and without any sort of id to tie it back to a query
[22:51] atmos: it's either a great one or cryptic as fuck
[22:51] mikeal: connection pooling it's that hard
[22:52] atmos: mikeal: add it !
[22:52] creationix: mikeal: how bad will it hurt performance?
[22:52] creationix: not bad right, I mean you probably shouldn't have 1000 concurrent queries anyway
[22:52] dgathright has joined the channel
[22:53] markwubben has joined the channel
[22:53] mikeal: some databases are better at concurrent requests than pipelined requests
[22:53] atmos: creationix: where's the test.js mentioned in the readme ?
[22:53] creationix: well, postgres by default is 100% async
[22:53] atmos: is the sousaball app opensource ?
[22:53] markwubben has joined the channel
[22:53] creationix: atmos: yeah, it's missing, just a sec
[22:53] creationix: atmos: sousaball is opensource, but the heroku version is older
[22:53] atmos: i'll just read the code in your other app
[22:54] creationix: atmos: http://github.com/creationix/sousaball/tree/4d4f66c7f07a5c2d2e38b5b555cec9dd1d5f4d88
[22:54] creationix: I think that's version I have running on heroku
[22:55] creationix: atmos: http://github.com/creationix/sousaball/blob/4d4f66c7f07a5c2d2e38b5b555cec9dd1d5f4d88/server.js is the listen shim
[22:55] creationix: atmos: and http://github.com/creationix/sousaball/blob/4d4f66c7f07a5c2d2e38b5b555cec9dd1d5f4d88/app.js#L9 for postgres
[22:56] _announcer: Twitter: "New npm version released, v0.1.23. http://github.com/isaacs/npm/#readme #nodejs new: "update" command, env-configs, and other goodies." -- Ⓘⓢⓐⓐⓒ. http://twitter.com/izs/status/20583476821
[22:57] creationix: isaacs: ok, fine, I'll try npm again
[22:57] SubStack: \o/
[22:58] frode has joined the channel
[23:01] panzi has joined the channel
[23:02] panzi: I write a brainfuck to javascript compiler in javascript (node.js), just for fun. brainfuck needs synchronous io. is it somehow possible to synchronously read from stdin in node.js?
[23:04] isaacs: panzi: synchronously from stdin, no.
[23:04] isaacs: panzi: but you can synchronously read from files.
[23:04] panzi: yes, but then I don't have an interactive brainf*ck shell
[23:05] SteveDekorte has joined the channel
[23:05] panzi: why this limitation? whats so hard on doing a count = read(0, buf, 1)?
[23:06] isaacs: panzi: actually, it might be possible, but it's not encouraged, supported, or good. check out src/node_stdio.cc for what's actually in the process.binding("stdio") object
[23:06] qschzt has joined the channel
[23:06] isaacs: panzi: if you do process.binding("stdio").openStdin() it opens up the file descriptor. i dunno if you can do fs.readSync on that
[23:06] panzi: I know that it isn't good for *real* applications, but I implement an esoteric language :)
[23:07] panzi: is there another good v8 based javascript engine for the shell?
[23:07] isaacs: panzi: why not just do process.binding("stdio").setRawMode() and read it one char at a time?
[23:07] isaacs: panzi: i mean, why do you NEED it to be sync?
[23:08] panzi: because the brainf*ck code I compile to javascript code is written synchronously
[23:08] tmpvars has joined the channel
[23:08] isaacs: can you not write it synchronously?
[23:08] panzi: what do you mean?
[23:08] isaacs: i mean, can you restructure your program such that it doesn't depend on synchronous IO?
[23:09] tmpvars: Ah man, this is not good for my social life
[23:09] astrolin has joined the channel
[23:09] panzi: if there would be support for javascript 1.7 (generator function (yield)) in v8 I would not need sync io but instead would just do a yield on read
[23:10] isaacs: panzi: why not just use callbacks?
[23:10] megan has joined the channel
[23:10] mikeal: yield isn't part of a formally approved js version
[23:10] isaacs: panzi: i mean, what's the output of your parser? jsut a JS function or something?
[23:10] mikeal: it's just in Mozilla's thing
[23:10] megan: Hi Isaacs
[23:10] mikeal: and BTW, it drastically complicates code you're reading
[23:11] isaacs: hi, megah!
[23:11] panzi: isaacs: its not "my" program. its arbitrary brainf*ck code which I compile to javascript code. brainf*ck is inherently sync. if I would automatic convert it to async I would need to convert each loop to a function call -> slow
[23:11] isaacs: megan!
[23:11] megan: lol megah
[23:11] isaacs: megan: it's from too much talking to ryah
[23:11] mikeal: right, so like….. stop using DSLs :)
[23:11] mikeal: haha
[23:11] megan: http://pastebin.org/455200 will someone please tell me why this code keeps trying to look for layout.ejs????
[23:11] isaacs: ACTION s/an$/ah/
[23:12] panzi: mikeal: I know its a mozilla thing and it simplifies code a LOT. I use it all the time in python. when I have to implement my own Iterable+Iterator classes in Java, thats complicated
[23:12] _announcer: Twitter: "Save yourself a headache, if your going to develop on windows for #nodejs use vmware player instead of virtualbox." -- Jason McLeod. http://twitter.com/jasonmcleod/status/20584292008
[23:12] mikeal: 1) it doesn't simplify code
[23:12] isaacs: panzi: i'm not convinced that loops would be too slow. if you're worried about speed, you should write a bf->C compiler instead.
[23:12] mikeal: 2) Python needs generators bad because function execution overhead is enormous. that isn't a problem in js
[23:13] mikeal: i used to be at Mozilla
[23:13] isaacs: panzi: plus, compiling synchronous bf code to async node js would be AWESOME.
[23:13] megan: Webkit!
[23:13] mikeal: i've dealt a lot with generators in javascript and they do nothing but make code more confusing to read
[23:13] isaacs: panzi: and what other reason IS there for doing anything with brainfuck?
[23:14] megan: nobody here an ejs expert???
[23:14] mikeal: you can functionally accomplish what generators do using a forEach style API
[23:14] isaacs: megan: you need a connect/express expert, i think.
[23:14] megan: ohhh
[23:14] mikeal: if you want to hold state then you just do it in the closure
[23:14] isaacs: megan: look for creationix or tjholowaychuk
[23:14] megan: I just want ejs to stop looking for layout.ejs
[23:14] megan: okay
[23:15] creationix: isaacs: I don't do express
[23:15] creationix: megan: just a sec, I'll try and see if I can help
[23:15] allengeorge has joined the channel
[23:15] megan: okay
[23:15] isaacs: creationix: right, but your'e Mr Connect
[23:15] isaacs: (or, Mr. C at least...)
[23:15] megan: what does connect do?
[23:16] isaacs: ACTION ... cue stupid answer...
[23:16] isaacs: IT CONNECTS STUFF!!!
[23:16] megan: like what??
[23:17] creationix: connect is 90% what express is
[23:17] panzi: isaacs: what other reason: I'm playing with optimizations. my complier converts all programs that have no input to a series of write instructions and nothing else :) and no I don't cheat, programs with input still work. its just const expression evaluation
[23:17] isaacs: megan: it's a middleware platform library thing, so you can attach different bits of functionality that modifies the requests and does stuff to it
[23:17] creationix: express is a layer on top making it friendlier
[23:18] isaacs: panzi: that doesn't mean that you can't do it asynchronously
[23:19] creationix: megan: http://expressjs.com/guide.html#View-Rendering
[23:20] creationix: layout: false is what you're looking for
[23:21] elliottkember has joined the channel
[23:21] megan: oh, so I can't just put layout false globally?
[23:21] [[zz]] has joined the channel
[23:22] megan: well that works
[23:22] megan: surprise!
[23:22] creationix: megan: not sure, you can just put a mostly blank layout file
[23:22] creationix: that just renders the contents
[23:22] megan: I suppose
[23:22] creationix: ask tjholowaychuk when he's online or file an issue against express
[23:22] creationix: he's online most the time, but not on IM or IRC
[23:23] creationix: he will respond to tickets and github comments usually pretty fast
[23:23] megan: okay
[23:24] isaacs: creationix: in my experience, tj is ridiculously fast at responding to gh messages, way more so than irc
[23:24] isaacs: even when not "online"
[23:24] megan: it must be his iphone
[23:24] creationix: isaacs: it's almost freaky, I work with him, and I won't be able to get ahold of him, but if I commit something he doesnt like I'll get a comment within seconds
[23:24] isaacs: yeah
[23:25] creationix: probably because I broke his tests and the CI server messaged him
[23:25] isaacs: git commit -am "tj, you around?"
[23:26] megan: bleh
[23:26] olegp_ has joined the channel
[23:27] creationix: wow, express is popular 1064 followers and $50 in pledgie donations
[23:27] megan: neat
[23:27] megan: I don't even follow it
[23:28] megan: or nodejs
[23:28] megan: I just lurk on it
[23:29] panzi: anyway, there are other javascript as a system scripting lang. impl. but I can't remember anyones name. does anyone know the name of such an project?
[23:29] creationix: megan: yeah, I just looked at the express code, if you can somehow set the global "viewOptions" you can set it there
[23:29] creationix: it gets mixed into the options passed every time it's called
[23:30] creationix: maybe with a set command?
[23:30] megan: app.set("viewOptions": {layout: false})??
[23:30] megan: like that?
[23:30] creationix: sure, try that
[23:30] megan: they told me to do it with a space in it ;P
[23:30] megan: not camel case
[23:31] megan: no :( it doesn't work
[23:31] megan: wait oops
[23:31] megan: typo
[23:32] creationix: megan: http://github.com/visionmedia/express/blob/master/lib/express/view.js#L162
[23:32] creationix: megan: right it's 'view options' in the settings
[23:33] megan: yeah... it just doesn't work for some reason
[23:34] daleharvey has joined the channel
[23:34] creationix: megan: app.set('view options', {layout: false}) ?
[23:34] siedrix has joined the channel
[23:34] megan: exactly
[23:34] creationix: hmm, then you'll have to trace the code to see why it's not working
[23:35] creationix: that should work
[23:35] creationix: unless maybe the space means something special
[23:35] megan: I wish there was a debug tool
[23:36] creationix: megan: console.debug!
[23:36] megan: how does that work?
[23:36] creationix: or better console.dir()
[23:36] creationix: just put it in places in the express code to see what values are
[23:37] creationix: console.dir({viewOptions:viewOptions,options:options)
[23:37] creationix: for example
[23:37] qschzt: megan, what do you do for a living?
[23:37] creationix: (with the missing } added)
[23:38] megan: .net
[23:38] megan: what do you do for a living?
[23:40] softdrink has joined the channel
[23:40] creationix: Connect
[23:40] creationix: :)
[23:45] megan: rawr
[23:49] mikeal has joined the channel
[23:49] mape: isaacs: anyone had issues with update?
[23:49] isaacs: mape: not yet ;)
[23:50] mape: well queue the first error!
[23:50] mape: isaacs: http://gist.github.com/513342
[23:51] isaacs: that's THAT's super odd.
[23:51] mape: Just wanna make you feel proud
[23:52] creationix: mape: did't you already have the latest of a bunch of those
[23:52] mape: jup
[23:52] mape: used to run npm ls installed | awk -F @ '{print $1}' | xargs sudo npm install before npm got the update
[23:53] mape: but that one breaks if I have something installed locally that isn't in the repo
[23:53] qschzt: ran npm update, eyes update broke
[23:53] jsilver has joined the channel
[23:54] isaacs: npm update broke my eyes!!
[23:54] qschzt: Cannot remove\n uninstall.js 109
[23:55] isaacs: aha, there is a bug. it's failing failfully if it can't update-dependents, rather than gracefully.
[23:56] Tobsn has joined the channel
[23:56] qschzt: it beautifully did most of them :)
[23:56] Tobsn: hi
[23:59] qschzt: isaacs, is there a way to mirror the master npm repo locally, adding my/our projects to our mirror?