[00:00] DTrejo: Tim_Smart: I think they are all afk, since it's saturday night [00:00] AAA_awright: Yep [00:00] Aria has joined the channel [00:00] Tim_Smart: DTrejo: Well I'm no expert on no.de ;) [00:00] creationix: AAA_awright: interesting there was a node example in there [00:01] prettyrobots has joined the channel [00:01] _announcer: Twitter: "Awesome nodejs app to make quick notes on any webpage and share it, no install, no nothing. http://markup.io" -- Daniel Aragao. http://twitter.com/dear_dr_dan/status/26887630144 [00:03] DTrejo has joined the channel [00:06] _announcer: Twitter: "Got excited about Node JS, thanks to @emerleite at @devinrio. Check out his new website nodecasts.org" -- Vinicius Pinto. http://twitter.com/viniciusweb/status/26887948956 [00:06] rauchg_: DTrejo: [00:06] rauchg_: i think they were having issues iwth submodules [00:07] rauchg_: ryan asked me to set up my demo at jsconf [00:07] rauchg_: and no.de threw up all over my submodules [00:07] micheil: rauchg_: btw, socket.io doesn't handle too terribly with massive amounts of data, unlike I've been told by folks. [00:07] rauchg_: micheil i told you, that was the case when we used json to encode buffers [00:07] micheil: heh [00:07] rauchg_: i've since refactored the encoding/decoding [00:07] micheil: yeah, just sayin' [00:07] rauchg_: :) [00:08] rauchg_: i need to check out [00:08] rauchg_: eventstream [00:08] micheil: rauchg_: using it in a new changelog app. [00:08] rauchg_: aweeesome [00:08] micheil: I've got a modified node-eventstream coupled to socket.io, coupled to a data source. [00:09] micheil: works quite nicely, but it has a few small issues [00:10] micheil: rauchg_: have you had a chance to look much into the socket.io side of thing as far as using node-websocket-server? [00:10] rauchg_: micheil: i want to push out 0.6 stable today/tomorrow [00:10] rauchg_: and then 0.7 will be [00:10] micheil: oh, nice [00:10] rauchg_: websocket-server [00:10] micheil: okay [00:11] micheil: rauchg_: well, looking through some code, it'd be an interesting idea to see socket.io use the connection manager as well/. [00:11] rauchg_: and a couple other minor things [00:11] rauchg_: yep i'll look into that as well [00:11] micheil: k [00:12] _announcer: Twitter: "@ Chillicoder I use it with Node.js but also works with Ruby, is pretty good to do things real time ..." [es] -- Loki Zavala. http://twitter.com/Siedrix/status/26888399005 [00:14] gerred: hmm anyone ever have an issue where they installed npm but still getting command not found? [00:14] agilandfast has joined the channel [00:15] _announcer: Twitter: "0. Delete f__king Windows Server; 1. Try ESXi; 2. Install Linux Deb; 3. Install Python, PHP, node.js, Apache etc; 4. Start working, idler!!" -- Nick. http://twitter.com/mafia_manager/status/26888596829 [00:16] DTrejo: rauchg_: thanks, I fixed the submodule bit, except now my server.js isn't working for some reason, even though it works locally. So I'm going to have to figure out what no.de is doing differently. [00:16] DTrejo: :| [00:17] TheEmpath has joined the channel [00:22] TheEmpath: hai everybody [00:23] aconbere has joined the channel [00:23] _announcer: Twitter: "Node.js model is: Single Threaded + Single Stack + Non-Blocking I/O + Event & Callback Based @creationix #svcc" -- Robert Schwentker. http://twitter.com/schwentker/status/26889136965 [00:23] _announcer: Twitter: "Node.js model is: NOT Multi-threaded + NOT Multiple stacks + NOT Slow @creationix #svcc" -- Robert Schwentker. http://twitter.com/schwentker/status/26889145903 [00:23] TheEmpath: im interested in having a philosophical discussion about event-driven queuing [00:23] _announcer: Twitter: "Node.js motivations: The world is moving real-time + Real-time require persistent connections + Threads really bad for real-time #svcc" -- Robert Schwentker. http://twitter.com/schwentker/status/26889151823 [00:23] _announcer: Twitter: "Node.js is Google’s Super fast V8 JavaScript engine + Highly Optimized libev & libeio C libs + Server Side JavaScript @creationix #svcc" -- Robert Schwentker. http://twitter.com/schwentker/status/26889157975 [00:24] pengwynn has joined the channel [00:24] _announcer: Twitter: "Node.js is an evented I/O framework for the V8 JavaScript engine, intended for writing scalable network programs #svcc" -- Robert Schwentker. http://twitter.com/schwentker/status/26889163331 [00:24] _announcer: Twitter: "@creationix Tim Caswell Intro to Node.js slides goo.gl/weHx #svcc" -- Robert Schwentker. http://twitter.com/schwentker/status/26889173409 [00:24] creationix: wow, I guess he liked my slides [00:24] TheEmpath: your name is nearly synonymous with node.js every time i look about [00:25] TheEmpath: so what im aiming for is an event queue that populates whenever a socket message is passed up to the server. the server can also fill up the event queue based on its own triggers [00:25] TheEmpath: from here, i need the event queue to clear out iteratively during a set interval [00:26] TheEmpath: this event queue clearing will send responses to sockets [00:26] TheEmpath: im unsure what the most efficient way of doing this is in node.js [00:27] TheEmpath: traditionally, we have a main loop that iterates indefinitely, listening for socket events and when they happen, we put them in the queu [00:27] TheEmpath: then during that same main loop iteration, the server may or may not put its own events in the queue [00:27] creationix: so node has that loop built-in [00:27] TheEmpath: then at the end of the loop, we go through the queue, and handle all the events [00:27] creationix: just add event listeners and push the items to the queue as you get them [00:27] TheEmpath: ahhh [00:27] TheEmpath: good [00:27] TheEmpath: that was the crux of my question [00:27] creationix: then set an interval and on each interval, loop over the queue and send them out [00:28] TheEmpath: any examples of this that you've come across? [00:29] creationix: TheEmpath: not that exact use case [00:29] aurynn: creationix, I'm just about at an alpha. [00:29] creationix: though I've seen lots of people use socket.io or faye for pubsub [00:30] gerred: faye is cool and easy. [00:30] gerred: so I've seen pretty much all server side examples of event listening...but I haven't seen many client side examples of sending these events. anyone have any good resources? [00:32] Tim_Smart: micheil: You got your joint packet issue over websockets sorted? [00:34] micheil: nup [00:35] JimBastard_: chapel: looks like many updates to jsdom [00:35] JimBastard_: http://github.com/tmpvar/jsdom/commits/master [00:35] DozyPieman has joined the channel [00:38] micheil: Tim_Smart: it was to do with the slicing of the buffers though [00:38] micheil: for some reason they keep overflowing [00:38] mikeal1 has joined the channel [00:38] Tim_Smart: micheil: I had to deal with data flowing into the next packet in node-redis.. Haven't seen that happen yet. [00:39] micheil: well, for some reason there's excess data, it's kinda odd [00:39] Tim_Smart: Right. [00:39] micheil: you know how I'm keeping that frame_length variable? [00:40] micheil: well, it turns out that for some reason all the buffers don't fit within it. even though it increments per index in the buffer [00:43] dmcquay has joined the channel [00:47] mikeal1 has joined the channel [00:49] agilandfast has joined the channel [00:49] Tim_Smart: micheil: I might do some quick bindings to http://www.kernel.org/doc/man-pages/online/pages/man3/memchr.3.html [00:49] Tim_Smart: But mind you, it is nice to keep things in ecmascript [00:50] CIA-77: node: 03Ryan Dahl 07master * rf23eb28 10/ (lib/child_process.js lib/sys.js): Fix style - http://bit.ly/cIjizS [00:50] CIA-77: node: 03Ryan Dahl 07master * r5dd08c6 10/ src/node.cc : Ugly fix for clang - http://bit.ly/ciPWx4 [00:50] CIA-77: node: 03Ryan Dahl 07master * ra601766 10/ src/node_crypto.cc : More clang fixes - http://bit.ly/9EjVHU [00:50] CIA-77: node: 03Ryan Dahl 07master * rfe74283 10/ (6 files in 2 dirs): Fix a few compiler warnings... - http://bit.ly/aPyOF7 [00:50] CIA-77: node: 03Ryan Dahl 07makefile * r2596e5e 10/ (Makefile tools/js2c.py): makefile - http://bit.ly/bLgJCP [00:50] CIA-77: node: 03Ryan Dahl 07makefile * r13d0dda 10/ Makefile : fix node_natives.h - http://bit.ly/bXtXfT [00:50] CIA-77: node: 03Ryan Dahl 07makefile * rc9df2b9 10/ Makefile : ... - http://bit.ly/9oqx0q [00:50] CIA-77: node: 03Ryan Dahl 07makefile * r2ee8463 10/ Makefile : deps compiling - http://bit.ly/dciWzl [00:50] CIA-77: node: 03Ryan Dahl 07makefile * r29e874b 10/ Makefile : Successful build - http://bit.ly/b1crLo [00:51] Tim_Smart: ryah: I'll have a look in more detail on that glib stuff, but I might have a few question :) [00:51] Tim_Smart: *questions [00:51] bpadalino: node builds with clang ? [00:51] _announcer: Twitter: "@tmpvar you seen this yet (done with node.js)? - http://markup.io/" -- Darren Hoyt. http://twitter.com/darrenhoyt/status/26891133851 [00:51] bpadalino: v8 builds with clang ? [00:51] v8bot: bpadalino: v8 is no longer supported (except in PM). Try v8: or v8> [00:52] Tim_Smart: bpadalino: v8 uses scons. [00:52] ryah: bpadalino: yes [00:52] bpadalino: no, i meant for a compiler .. i didn't realize it could be built using clang instead of gcc [00:52] Tim_Smart: Why clang? [00:53] ryah: bpadalino: export CC=clang; export CXX=clang++; ./configure; make [00:53] ryah: bpadalino: you need clang 2.8 [00:53] bpadalino: fancy [00:53] bpadalino: ryah: you're all over the new hotness it seems [00:53] charlenopires has joined the channel [00:54] bpadalino: interesting "fixes" you needed .. why the extra parens with the if? [00:54] ryah: just fixing warnings.. [00:54] TheEmpath: okay, so I declare my eventQueue as an array with two listeners for it called addApplicationEvent and executeApplicationEvenet. Then I put on a setInterval() for a call back that runs executionApplicationEvent every 100 milliseconds, which will shift the queue until the queue is empty :D [00:55] bpadalino: ah, warnings .. cool [00:55] TheEmpath: booyah, i figured it out methinks [00:55] bpadalino: ryah: does using clang as opposed to gcc change any of the execution speeds or memory utilizations - or are they pretty much comparable ? [00:55] TheEmpath: that allows for not only user-generate events, but server generated events to exist [00:56] ryah: bpadalino: comparable [00:56] ryah: compiles faster though [00:56] bpadalino: ryah: are you trying to use any of the static analysis capabilities associated with clang? [00:56] ryah: i use the nice error messages :) [00:57] Tim_Smart: ryah: What do you think about a memchr api for buffers? [00:57] TheEmpath: question about require()... every time I require() something, does it execute everything in it? [00:57] bpadalino: ryah: very cool - i'll stop pestering you about clang .. thanks [00:58] TheEmpath: like say i have a require('test') and in test is eventEmmitter.on('whatever', function() {...})... if i call up require('test') somewhere else, will it reestablish those listeners? [00:58] Tim_Smart: TheEmpath: No. [00:58] TheEmpath: :O [00:58] TheEmpath: thats amazing [00:58] Tim_Smart: It caches the exports, and it means all require()'s use the same reference, [00:58] _announcer: Twitter: "Still waiting for a really good #nodejs IDE." -- Daniel Erickson. http://twitter.com/TechWraith/status/26891609605 [00:58] ryah: Tim_Smart: *shrug* [00:59] TheEmpath: so only on "compile" time does the contents of the require() actually get ran, everything is an cache of the export [00:59] Tim_Smart: ryah: Well micheil is parsing websocket buffers for delimiters, but the protocol is so awesome that they don't tell you where to expect them. [00:59] JimBastard_: DTrejo: did you solve your no.de problem? [01:00] Tim_Smart: So you have to for loop over the entire buffer looking for a particular byte. [01:00] ryah: Tim_Smart: it'd be nice to rather have boyer-moore [01:00] DTrejo: JimBastard: not yet, I moved on [01:00] JimBastard_: if you need an instance i can spin up one for you [01:01] JimBastard_: ubuntu with everything [01:01] JimBastard_: i think im gonna come back later [01:01] ryah: Tim_Smart: also i think memchr is probably faster in js [01:01] Tim_Smart: ^^ Yeah I had that feeling too. But maybe not for large buffers... [01:02] DTrejo: JimBastard: oh that would be cool. When are you going to sleep? [01:02] JimBastard_: i dunno, later [01:02] DTrejo: I could always try to delpoy it to my other node instance, but I'm going to wait [01:02] JimBastard_: maybe 4 or 5 [01:02] DTrejo: ok, good [01:03] DTrejo: I'll let you know before then if I need it [01:03] DTrejo: thanks for the offer [01:03] JimBastard_: i think it will take like 3 minutes to spin up [01:06] aconbere has joined the channel [01:07] buu has joined the channel [01:07] buu: GET THEE GONE YE HOUSE OF SATAN. [01:07] halfhalo: But I _like_ satan! [01:08] SubStack: it's a buu! [01:08] ryah: Tim_Smart: yes, websocket sucks [01:08] buu: halfhalo: But do you like his house? [01:08] ryah: Tim_Smart: i don't understand why they're not using netstrings... [01:08] jagautier: what the easiest way to keep your node install up to date [01:08] halfhalo: Yeah! Well, maybe not the decor in the Living room, but besides that, yes! [01:08] SubStack: but you can build abstractions that don't suck on top of websockets, so it's all good [01:08] Tim_Smart: ryah: Yeah, they do have something that gives a length header, so you can fast-forward over the message body, but no browsers use it or something. [01:09] bpadalino: i had never heard of netstrings before .. djb invented them? [01:09] micheil: ryah: well, draft ietf-02 is looking far better. [01:10] micheil: it has like a proper message format [01:10] micheil: so, lengths, opcodes, frame types, etc. [01:10] micheil: ACTION was just demoing a node.js app to wynn..  [01:11] Tim_Smart: They should just keep it a raw TCP socket :p [01:14] micheil: Tim_Smart: they can't. [01:14] Tim_Smart: Yeah, because of security, SSL and stuff [01:14] micheil: as then you could use the browser's websocket client to hack & attack other servers remotely [01:14] micheil: as it is, there's even problems with messages that contain the word GET or POST in them [01:15] micheil: (I'm not kidding there, someone's saying that there's a security issue there) [01:16] _announcer: Twitter: "The first episode about #nodejs on http://nodecasts.org/ is very nice. Congratulations @emerleite" -- Daniel Passos. http://twitter.com/passos/status/26892972141 [01:17] SubStack: wtf @ that video [01:18] SubStack: it indents to 4 spaces [01:18] SubStack: and then they hit backspace twice [01:18] SubStack: configure your editor properly! [01:18] micheil: Tim_Smart: check this out: http://www.ietf.org/mail-archive/web/hybi/current/msg04365.html [01:19] SubStack: and anyways, 4 spaces rocks [01:20] SubStack: hot damn though, excellent accent [01:21] Tim_Smart: I'm a 2 space kinda guy. [01:21] stephenjudkins has joined the channel [01:21] jesusabdullah: four spaces good, two spaces bad! [01:22] SubStack: I like do 4 spaces with a hard 80 column limit so I don't write code that is too nested [01:22] jesusabdullah: Soft limit for me [01:22] Tim_Smart: I write code with 2 spaces indent. Period. [01:22] jesusabdullah: Some math expressions get really long [01:22] Tim_Smart: I write code. Period. [01:22] SubStack: getting over too far to the right is a good indicator that shit should be refactored [01:23] rex_fernando has joined the channel [01:23] creationix: SubStack: lol [01:25] creationix: man-u-el, awesome [01:25] SubStack: I know right? [01:29] yhahn has joined the channel [01:31] creationix: he's got some nice slides http://www.slideshare.net/emerleite/devinrio-2010-nodejs [01:32] creationix: I understand enough portuguese to read them too [01:34] Tim_Smart: It reminds of Borat for some reason. [01:35] creationix: look at slide 87! [01:35] MikhX has joined the channel [01:36] creationix: "Productivity of the programmer matters more than the performance of the technology…" [01:36] creationix: "…unless that process means creating a thread for every process" [01:36] creationix: (roughly translated [01:36] creationix: (slides 89-90) [01:37] TooTallNate: creationix: lol, kinda.... wtf? [01:37] dipser has joined the channel [01:37] SubStack: [citation needed] [01:38] creationix: these are really nice slides, I wish they were translated to english [01:38] creationix: he's really throrough [01:40] dipser: i have a newbe question... is node.js working the same way like this: http://jsfiddle.net/sGceh/ -- or is it running in parallel? so if i have a socket.io event and running a lot of code in it (we say for 5 secs), it wont block other users right? it just has to be in ONE event right? [01:40] creationix: lol, "Pattern to achieve high concurrency…" "Don't create threads!" [01:41] ysynopsis has joined the channel [01:41] creationix: dipser: right, node never blocks unless you're doing something purely cpu intensive [01:41] creationix: all I/O (network or file system) is non-blocking [01:42] dipser: but if i run a loop for 5 secs? [01:42] SubStack: and for cpu intensive stuff, just fire up some worker processes and glue them together with network rpc [01:42] SubStack: dipser: you don't write loops that way in javascript, you would set a timeout or an interval probably [01:43] dipser: i know [01:43] buu: dipser: Yes, it is single threaded so if you block it will block all users. [01:43] dipser: hm [01:44] SubStack: which comes up very rarely [01:44] dipser: so if i calculate something for 5 secs with a loop in a message event of socket.io it wont block right? [01:44] ryah: dipser: CPUs are fast. it's quite likely you do not have a task that takes 5 seconds [01:45] jagautier: hey im using npm to install mongoose and im gettin gthis error [01:45] jagautier: npm ERR! failed to fetch http://github.com/learnboost/mongoose/tree/0.0.2 [01:45] jagautier: ideas? [01:45] dipser: ryah maebe not 5 secs, but 1 sec and if there are a lot of users, it wouldnt be nice [01:45] ryah: dipser: i don't think you can fill up 1ms of cpu time [01:47] ryah: i mean, obviously you can contrive something - i just mean in a normal program [01:47] creationix: ryah: do you read portuguese? [01:47] dipser: ok i trust you [01:47] ryah: most tasks we have are not compute bound, is what i mean.. [01:48] SubStack: for (var i = 0; i < 1e8; i++); // takes like 2 seconds [01:48] SubStack: so if you're not doing that, you're fine [01:48] creationix: ryah: I know you lived in Chile once upon a time, so perhaps [01:48] creationix: (spanish is close) [01:48] ryah: creationix: uh, well - if forced to i suppose. chile doesn't speak portuguese [01:49] ryah: why? [01:49] creationix: ryah: I know, I don't speak it either, but I know enough spanish that I can read it [01:49] creationix: ryah: these slides are awesome http://www.slideshare.net/emerleite/devinrio-2010-nodejs [01:49] creationix: very complete and quite funny too [01:52] noonat has joined the channel [01:54] dipser: SubStack ok, im not doing that. just thought it might getting a little bit slow if i have a lot of loops plus calculations for something. i will see it if i have thousands of ppl using it ;) thx for taking the worry ;) [01:54] Nohryb has joined the channel [01:54] jesusabdullah: Is there a good way to write things to the screen without an implicit \n ? [01:54] jesusabdullah: I thought sys.puts did that, but it doesn't seem to be :/ [01:55] SubStack: sys.print [01:55] jesusabdullah: Bangin' :D [01:57] apage43 has left the channel [01:57] ryah: hm, i just had a though.. maybe we should run the GC as we hit select() in a different thread.. [01:58] creationix: ryah: that sounds interesting [01:58] creationix: mikeal: did you post your jsconf.eu slides? [02:00] ryah: as long as we're greedy reading from sockets and accepting connections - it's going to block - good time to do gc [02:01] creationix: how long does it block? [02:01] creationix: I wonder if disabling the gc checks from running elsewhere would speed things up [02:02] ryah: well - until data arrives, send buffers drain, or a timer times out [02:03] creationix: perhaps [02:03] creationix: you'd know better than me ;) [02:03] ryah: i mean, you can't know how long... [02:04] unomi has joined the channel [02:04] sh1mmer has joined the channel [02:05] _announcer: Twitter: "node.js drinking sessions: that is attracting attention across the United States and Europe, JavaScript リアルタイムウェブプラットフォーム of \ "node.js \": http://nodejs.org/ you have a hack, fun and drinks. .. http://bit.ly/duJrMf" [ja] -- ランダムニュース. http://twitter.com/1i_/status/26896676449 [02:05] creationix: drinking sessions huh? [02:06] creationix: what is he talking about, JavaScripters don't drink [02:06] ben_alman has joined the channel [02:07] bencc has left the channel [02:08] aliem has joined the channel [02:09] _announcer: Twitter: "[Pu] node.js drinking party: attention has been all over the United States and Europe, JavaScript リアルタイムウェブプラットフォーム of \ "node.js \": http://nodejs.org/ you are hacking, ... http://bit.ly/c3LJGw" [ja] -- ぷろもったー. http://twitter.com/promotter/status/26896954925 [02:09] TheEmpath: im drunk right now [02:09] TheEmpath: cooking steak [02:09] TheEmpath: event driven steak [02:09] creationix: does it signal an alarm when it's done [02:09] creationix: so you can do other stuff while it cooks [02:09] kgf: yeah, it's called the smoke alarm [02:10] ben_alman has joined the channel [02:11] jagautier: does anyone have an exmaple of defining a DBRef with mongoose? [02:11] _announcer: Twitter: "wow... @creationix answering at the nodebr list. high level #ftw #nodejs" -- Adriano Almeida. http://twitter.com/adrianoalmeida7/status/26897135883 [02:12] gf3 has joined the channel [02:13] gf3 has joined the channel [02:14] saikat has joined the channel [02:14] _announcer: Twitter: "@alexdong DC said they use Node.js a lot internally. And I have javascript the good part signature version. ;-)" -- Yue Tian a.k.a. Tin. http://twitter.com/diamondtin/status/26897379601 [02:16] sechrist: So I'm working on a website that has a crapload of clientside JS and I want to break it out into libs (sort of like how I would in node with exports) [02:16] sechrist: is there any tool that lets me have something like a require(), then when I "build" it merges them all in the right order? [02:16] sechrist: if not I can make one but I'm sure somebody has had to do this before [02:18] dbathurst has joined the channel [02:19] q_no|weekend has joined the channel [02:19] jacobolus has joined the channel [02:20] micheil: sechrist: you could try either of Require.js or LabJS [02:20] micheil: LabJS is more efficient, RequireJS is more commonjs [02:21] sechrist: if it's including it in the browser with another http request -- that's not how I want to do it [02:21] micheil: I'm also working on Jet.js every now and then which is a mix of both slightly. [02:21] micheil: require.js has a build tool at the end [02:21] micheil: or, better still, look at the dojo toolkit's packaging system [02:22] micheil: or the YUI packaging system [02:22] micheil: (I don't think YUI has a build process though) [02:22] chapel: JimBastard << yeah tmpvar has been active [02:24] boaz has joined the channel [02:24] _announcer: Twitter: "NewBookmark: WebSocket aim for the "real Web"! Node.js first shock and the Prosperous Future WebSocket - @ IT http://ow.ly/19nc1n" [ja] -- sugita takayuki. http://twitter.com/sugilog/status/26898178912 [02:27] maushu has joined the channel [02:28] ajsie has joined the channel [02:29] danielzilla has joined the channel [02:30] DTrejo: how does one check logs if you're running on a no.de machine? [02:30] DTrejo: JimBastard: would you know JimBastard ? [02:30] JimBastard_: DTrejo: i think logging is built in [02:30] JimBastard_: look around the dir structure [02:31] DTrejo: mmk [02:31] dbathurst has joined the channel [02:31] creationix: DTrejo: there is a command [02:32] creationix: in the special tools [02:32] creationix: I forget, but one of the commands when you ssh in [02:33] sudoer has joined the channel [02:34] _announcer: Twitter: "Trying to understand what is the NodeJs. I'm still floating ..." [pt] -- Marcelo Rodrigues. http://twitter.com/marcelomx/status/26898876840 [02:36] DTrejo: thanks creationix [02:36] creationix: DTrejo: did you find it? [02:37] DTrejo: yep [02:37] DTrejo: node-service-log [02:39] a_meteorite has joined the channel [02:41] spetrea-home has joined the channel [02:42] _announcer: Twitter: "Node.js own class extension and casual prototype using a" [ja] -- Sn0wNight. http://twitter.com/Sn0wNight/status/26899484189 [02:43] ryah: http://four.livejournal.com/1083171.html [02:46] creationix: so how can the gc work in another thread? [02:46] killfill has joined the channel [02:47] _announcer: Twitter: "Freelance HTML5 Job - HTML5 table updated in real-time from node.js http://bit.ly/c4d6MT" -- Freelance Jobs. http://twitter.com/work_freelance/status/26899845936 [02:47] _announcer: Twitter: "HTML5 table updated in real-time from node.js by helwyr http://bit.ly/bUTCUI #freelance" -- Your Freelance Jobs. http://twitter.com/UrFreelanceJobs/status/26899872951 [02:48] creationix: that's quite the patch for Erik to review 2000+ lines of new code [02:48] ryah: creationix: the other thread will be blocked [02:48] creationix: ahh, that might work [02:49] creationix: so just block a little extra to let the gc finish, and then you don't worry about sync issues [02:49] _announcer: Twitter: "HTML5 table updated in real-time from node.js by helwyr: - Create a table using HTML5, the user should be able to ... http://bit.ly/9ZwbjS" -- Global Tech Jobs. http://twitter.com/globaltechjobs/status/26899996125 [02:49] tapwater has joined the channel [02:50] prettyrobots has joined the channel [02:50] _announcer: Twitter: "http://2.gp/brve - HTML5 table updated in real-time from node.js by helwyr - Create a table using HTML5, the user shoul http://tiny.ly/ltSp" -- Easy Cash. http://twitter.com/EasyCash435/status/26900101114 [02:52] ryah: creationix: yeah [02:52] creationix: neat [02:52] creationix: though if I have a large number of objects and many small packets, won't that be really expensive? [02:52] Nohryb has joined the channel [02:53] creationix: or can you throttle how often and not do it every time [02:53] bengl has joined the channel [02:54] ryah: creationix: we'll have to see how it goes. [02:54] creationix: yeah, neat idea though [02:54] creationix: then a single node process can use multi-core better [02:55] ryah: it's in the kernel for the kqueue - so it's not using a core [02:55] ryah: it's unscheduled waiting for data [02:55] creationix: does the kernel space code not run on the same core as the process's user-space code? [02:56] creationix: oh, the wait [02:56] creationix: right [02:58] _announcer: Twitter: "Now hiring: HTML5 table updated in real-time from node.js by helwyr: - Create a table using HTML... http://bit.ly/9CUuWH #jobs #hiring #job" -- firefox. http://twitter.com/firefoxette/status/26900691266 [03:00] _announcer: Twitter: "I've been working a lot lately with Node.js and Socket.io" -- Daniel Salmerón. http://twitter.com/daniel_amselem/status/26900851044 [03:01] dipser_ has joined the channel [03:02] Gruni has joined the channel [03:02] rex_fernando has joined the channel [03:05] evanpro has joined the channel [03:07] emmanueloga has joined the channel [03:08] _announcer: Twitter: "Is bug-fixing time done? Can I keep playing with node.js in peace? kthxbye!" -- José Padilla. http://twitter.com/jpadilla_/status/26901502401 [03:09] steadicat has joined the channel [03:12] ryah: we should hack IdleNofication so that it doesn't run unless a certain number of objects have been created... [03:12] ryah: or something. [03:14] boaz_ has joined the channel [03:15] _announcer: Twitter: "Great Textmate Bundle for Node.JS http://github.com/drnic/javascript-node.tmbundle" -- José Padilla. http://twitter.com/jpadilla_/status/26901996989 [03:15] _announcer: Twitter: "HTML5 table updated in real-time from node.js http://bit.ly/bXhKk9 -Top #Freelance #projects" -- Freelance-Jobs-Now. http://twitter.com/allfreelance/status/26902008421 [03:16] dmcquay has joined the channel [03:18] rauchg__ has joined the channel [03:19] JimBastard_: how can that textmate bundle work? [03:19] JimBastard_: if it hasnt been updated this year [03:19] JimBastard_: i am confuseded [03:22] bpadalino: it just seems to be a lot of snippets [03:22] aurynn has joined the channel [03:22] gerred has joined the channel [03:22] creationix: it's just javascript [03:22] bpadalino: right, the grammar just uses js .. and there is a command to run through node [03:23] Tim_Smart: ryah: <3 http://github.com/Tim-Smart/node-gtk/commit/6ca817aa1c8684557e60a2dd947f88da4f139ef5 [03:23] Tim_Smart: Not sure if I [03:24] Tim_Smart: *I'm doing it well, but it works. [03:25] bpadalino: Tim_Smart: just curious, why make gtk bindings for node ? [03:26] Tim_Smart: bpadalino: Think node's evented nature, and GUI apps. [03:26] ryah: Tim_Smart: you need to do that thing i sent you [03:26] Tim_Smart: on('click', doThis) [03:26] Tim_Smart: ryah: Yeah ;( [03:26] ryah: http://github.com/Tim-Smart/node-gtk/blob/master/gtk.js#L5-7 <-- not acceptable [03:26] Tim_Smart: I know. [03:27] banjiewen has joined the channel [03:27] Tim_Smart: Kill me. [03:27] ryah: :) [03:27] Tim_Smart: The more I look at your example, the more I go wtf. [03:27] _announcer: Twitter: "So it looks like node.js builds on a DreamHost box pretty painlessly. (Don't you wish _your_ Saturday nights were this rad?)" -- Brennen Bearnes. http://twitter.com/brennen/status/26902930732 [03:27] bpadalino: Tim_Smart: do you like the idea of using gtk over the idea of using a set of http servers and the browser as the gui ? [03:28] Tim_Smart: bpadalino: Some things are just better as a native desktop app. [03:28] Tim_Smart: node shouldn't be just for making server ;) [03:28] Tim_Smart: *servers [03:29] bpadalino: hrm, not being a jerk or anything, have you got an example of what you think would be better ? [03:29] chewbranca has joined the channel [03:29] Tim_Smart: A webrowser. [03:29] Tim_Smart: Haha. [03:30] bpadalino: haha, gotcha :) [03:30] Tim_Smart: You can't implement a web-browser in a web browser :p [03:30] tilgovi has joined the channel [03:31] ryah: Tim_Smart: the gtk event loop sits on the glib event loop [03:31] ryah: (afaik) [03:31] JimBastard_: Tim_Smart: iframed [03:31] ryah: Tim_Smart: you need to make a special glib source for the libev [03:31] Tim_Smart: JimBastard_: You need a browser to start with, to make the iframe. [03:31] ryah: or actually opposite [03:31] Tim_Smart: ryah: OK. [03:32] ryah: you take apart all the glib sources into libev watchers [03:32] ryah: but that's already done for you in those files [03:32] ryah: you should probably be calling g_main_loop_run () [03:32] ryah: instead of gtk_main_iteration() [03:33] podman405 has joined the channel [03:33] Tim_Smart: ryah: Right, I'm all a bit new to this. [03:33] Tim_Smart: So that made half sense. [03:33] itissid has joined the channel [03:34] softdrink has joined the channel [03:34] ryah: Tim_Smart: look at how it's implemented: [03:34] ryah: http://www.google.com/codesearch/p?hl=en#ErvFMsc8kPE/pub/GNOME/sources/gtk%2B/2.6/gtk%2B-2.6.8.tar.bz2%7CRAV3v2DgMEE/gtk%2B-2.6.8/gtk/gtkmain.c&q=gtk_main_iteration%20lang:c&l=946 [03:34] ryah: (hopefully that link works...) [03:34] jagautier has joined the channel [03:34] jagautier: hey in express when doing a simple app that servs up some html i get this FATAL ERROR: CALL_AND_RETRY_0 Allocation failed - process out of memory [03:34] jagautier: any ideas? [03:35] Tim_Smart: ryah: It works :) [03:35] noonat has joined the channel [03:35] ryah: Tim_Smart: the point is - it just calls this: http://www.google.com/codesearch/p?hl=en#ErvFMsc8kPE/pub/GNOME/sources/gtk%2B/2.6/gtk%2B-2.6.8.tar.bz2%7CRAV3v2DgMEE/gtk%2B-2.6.8/gtk/gtkmain.c&q=gtk_main_iteration%20lang:c&l=974 [03:36] _announcer: Twitter: "node.js .... has become interesting! !" [ja] -- 小池 亮義. http://twitter.com/akiyoshi220/status/26903617679 [03:37] SubStack: it has? [03:37] ryah: Tim_Smart: http://software.schmorp.de/pkg/EV-Glib.html [03:37] boaz has joined the channel [03:38] ryah: Tim_Smart: http://cvs.schmorp.de/EV-Glib/Glib.xs?revision=1.8 [03:38] Tim_Smart: That looks familiar :p [03:43] ryah: the good thing is you don't need to understand it - just run it :) [03:43] ryah: it's a lot of random libev stuff [03:44] Tim_Smart: Yeah and libev is the bit confusing me I think [03:44] ryah: i mean - basically there are two event loops [03:44] ryah: and you want to intertwine them [03:44] Tim_Smart: Yup, I get that much. [03:44] ryah: node's event loop need to be the one driving - libev [03:45] Tim_Smart: Yes. [03:45] ryah: so you have to convert all glib things into libev things [03:45] ryah: then you don't need any setTimeout thing [03:45] _announcer: Twitter: "HTML5 table updated in real-time from node.js: HTML5 table updated in real-time from node.js http://bit.ly/bEEHRh" -- Clare Ascani. http://twitter.com/javascript_job_/status/26904243965 [03:45] ryah: no call to gtk_main() [03:46] Tim_Smart: And the increments / decrement the loop level automatically? [03:46] Tim_Smart: s/the/it/ [03:47] ryah: no, i don't hink so [03:47] Tim_Smart: Right. [03:47] noahcampbell has joined the channel [03:47] Tim_Smart: But that isn't a problem. [03:47] TheEmpath has joined the channel [03:48] prettyrobots has joined the channel [03:49] Tim_Smart: So "gMainLoop = Glib::MainLoop::create();" is you creating the glib loop right? Which replaces gtk_main_iteration()? [03:49] Tim_Smart: I though gtk has a loop of its own? [03:50] andrewfff has joined the channel [03:50] Tim_Smart: Ah, that is the loop... (The setTimeout) [03:51] Tim_Smart: I get it. [03:53] creationix: ohh, gtk sharing node's loop [03:54] creationix: Tim_Smart, ryah, this this could be used as a drop-in gtk http://gtk-osx.sourceforge.net/ [03:54] creationix: ? [03:54] Tim_Smart: Sure, you would just have to build your own version of the bindings. [03:55] _announcer: Twitter: "Well, node.js make a simple framework with!" [ja] -- 小池 亮義. http://twitter.com/akiyoshi220/status/26904951969 [03:55] creationix: think the binding would be a lot different? [03:56] jagautier: hey does jade need a /views/layout.jade file to work? [03:57] jagautier: i am getting a no such file or directory when using jade with express funny thing is im not tyring to render a jade template named that at all [03:57] bpadalino: i think so [03:57] Tim_Smart: creationix: I would have thought it would just reproduce the API of GTK. [03:57] creationix: jagautier: it's part of express [03:58] creationix: you have to specify no-layout if you don't want it wrapped [03:58] creationix: or write a layout file to wrap all templates [03:58] Tim_Smart: And your app treats it just like it would treat gtk. [03:58] creationix: Tim_Smart: I guess I don't understand the bindings then [03:58] creationix: I know you'd have to recompile them [03:58] creationix: but would the code change any? [03:59] jagautier: oh ok so i can just set layout : false and i should be good [04:00] jagautier: what is a layout used for though? [04:00] jagautier: or how would i define a layout [04:03] TheEmpath: the module IS the singleton! [04:03] TheEmpath: woooow [04:03] TheEmpath: its all starting to click [04:04] _announcer: Twitter: "FreelanceJob HTML5 table updated in real-time from node.js by helwyr: - Create a table using HTML5, the... http://bit.ly/c8jib5 VideoUpLoad" -- Anup Chowdhury. http://twitter.com/foloanup/status/26905624514 [04:04] _announcer: Twitter: "[IT-Work] HTML5 table updated in real-time from node.js by helwyr http://bit.ly/a7OTZj" -- Home Business Now. http://twitter.com/HomeBusinessNow/status/26905625393 [04:05] DTrejo: creationix: hey tim, I'm having a problem where the connect staticProvider does not respond to POST, is this intended? [04:05] creationix: DTrejo: yes [04:05] DTrejo: (or at least some servers get 404 when they post to my url) [04:05] creationix: why would you want it to respond to post? [04:05] DTrejo: yes, I would like to [04:06] creationix: but why [04:06] DTrejo: I probably have a misunderstanding about how HTTP works [04:06] DTrejo: I just want to serve a file [04:06] creationix: perhaps, but http is complicated, what are you trying to do [04:06] creationix: POST is for changing state on the server [04:07] creationix: GET is for downloading resources [04:07] DTrejo: oh, hmm [04:07] DTrejo: so I'm making an app that talks to twilio, and they post to an xml config file, which they use to figure out what to do next [04:07] Tim_Smart: YOu can thank PHP for screwing people up over that. [04:07] _announcer: Twitter: "Na node.js still interesting. javascript is interesting! # Awworkshop" [ja] -- 小池 亮義. http://twitter.com/akiyoshi220/status/26905844057 [04:08] DTrejo: (xml file hosted by my server, for example: twilly.no.de/controller.xml) [04:08] aurynn: HAH! [04:08] creationix: DTrejo: you'll just have to make a custom route that responds to the post [04:08] creationix: it can serve whatever it wants [04:08] DTrejo: ah ok [04:08] DTrejo: and use serveFile or something (I need to see if that function exists) [04:08] bpadalino: if it's a static page that doesn't require a route, paperboy seems to do a good job .. [04:09] creationix: yeah, node-router had a static handler like that [04:09] creationix: I actually preferred that method sometimes [04:09] creationix: paperboy or node-static [04:09] DTrejo: node-router is part of connect, correct? [04:09] creationix: DTrejo: parts of it are in connect [04:09] creationix: it got assimilated [04:09] DTrejo: ok, cool [04:09] DTrejo: thank you [04:10] bpadalino: resistance is futile [04:10] DTrejo: I now know more serving static files, and POST requests. [04:10] TheEmpath: the module is the singleton!!!!! i feel like this http://www.youtube.com/watch?v=sXasCjUTNpE&feature=player_embedded [04:10] aurynn: creationix, I just got prepared queries working. [04:11] creationix: aurynn: sweet [04:11] _announcer: Twitter: "#HTML5 table updated in real-time from node.js by helwyr: - Create a table using… http://goo.gl/fb/2hNXb More..." -- Kalpataru. http://twitter.com/freelanceservic/status/26906121461 [04:11] bpadalino: that looks painful [04:12] TheEmpath: lol [04:12] aurynn: that took for-freaking-ever. [04:15] _announcer: Twitter: "Fuck yeah. Just got postgres.js to do prepared queries on node.js. #sweet" -- ʍɐɥs uuʎɹnɐ. http://twitter.com/aurynn/status/26906342051 [04:15] grahampage has joined the channel [04:18] jagautier: how do you define a route in express to hande a form post./ [04:18] jagautier: ? [04:18] aurynn: Next, some cleanup [04:18] aurynn: Rather [04:19] aurynn: first, pushing to github [04:19] aurynn: *then* cleanup [04:19] LowValueTarget has joined the channel [04:20] bpadalino: jagautier: http://expressjs.com/guide.html#HTTP-Methods [04:20] jacobolus has joined the channel [04:20] TheEmpath: its all evented! [04:20] TheEmpath: my god, brilliant! [04:20] TheEmpath: the EVENT listeners are global! [04:20] jagautier: thanks [04:22] DTrejo: creationix: is there a good clean way to support serving a specific file? [04:22] creationix: not with the built-in connect code [04:22] creationix: you could rip the code out of static provider [04:22] creationix: just fs.readFile and res.end [04:22] creationix: if it's a small file, that works fine [04:23] DTrejo: ok, I'll just do that [04:23] DTrejo: thanks [04:23] _announcer: Twitter: "node.js as I read the official documents, in terms of performance seems to be good. What is it technology. What IS node.js? Dying?" [ja] -- 慎也. http://twitter.com/peperon299/status/26906903457 [04:24] aurynn: @peperon299 Dying? No, node.js isn't *BSD. ;) [04:32] jesusabdullah: Haha [04:34] DTrejo: creationix: you wrote good abstract code, so it's not easy to rip out :) [04:34] DTrejo: I'll be fine though [04:35] creationix: good luck [04:39] TheEmpath: i've done it! [04:39] TheEmpath: users connect and their activity is put in a queue which gets emptied every 100ms [04:40] creationix: awesome [04:40] TheEmpath: now that i have a global event queue.... i can do so much more [04:40] TheEmpath: users can interact not just with the server, but with each other and the server can interact with them asynchronously [04:41] TheEmpath: not = now [04:41] TheEmpath: this is the missing piece of the puzzle i've been working on for a week [04:42] TheEmpath: simple ass var application = require('application'); application.addEvent(source, event); [04:42] TheEmpath: source can be either a socket or some simulated user/AI [04:43] TheEmpath: event is {command: 'someAPI command', arguments: {var1: 1, var2: 2, etc}} [04:45] TheEmpath: all in 300 lines [04:45] TheEmpath: woooooooo so happy [04:49] Tim_Smart: ryah: ping [04:50] paulwe has joined the channel [04:52] dahankzter has joined the channel [04:56] JimBastard_ has joined the channel [05:01] TomSlick` has joined the channel [05:03] dgathright has joined the channel [05:05] jdalton has joined the channel [05:09] JimBastard_: reporting in from the nyu hackathon [05:09] JimBastard_: sitting next to DTrejo, its a javascript party [05:11] rex_fernando has joined the channel [05:14] steadicat has joined the channel [05:33] admc has joined the channel [05:43] unomi has joined the channel [05:44] ossareh has joined the channel [05:57] jesusabdullah: JimBastard_: What are you hackathoning on? [05:57] JimBastard_: nodejitsu [05:57] JimBastard_: lol [05:57] jesusabdullah: Hah :) [05:58] JimBastard_: its all nyu students working with nyc startup apis [05:58] jesusabdullah: Cool :) [05:58] JimBastard_: drop.io, hunch, twilio, foursquare, etc [05:58] jesusabdullah: Oh, foursquare's there? [05:58] SubStack: startup... apis? [05:58] JimBastard_: im helping with some node stuff [05:58] jesusabdullah: Is that shit worthwhile? [05:58] jesusabdullah: Foursquare, I mean [05:58] JimBastard_: i dont even own a cell phone [05:58] JimBastard_: so, lol [05:58] SubStack: same [05:59] jesusabdullah: Mine's a tracphone [05:59] SubStack: foursquare is the one with the mayors right? [05:59] jesusabdullah: so it hardly counts [05:59] jesusabdullah: Yeah [05:59] jesusabdullah: I feel like I'm a have-not now :P [05:59] SubStack: oh I guess I /own/ a phone [05:59] SubStack: doesn't work though [05:59] jesusabdullah: Just phone-like enough to claim ownership of *a* phone [05:59] industrial has left the channel [05:59] jesusabdullah: Mine's just phone-like enough to make me contact-able sans-blogoblag [06:01] SubStack: I tried to call somebody with a computer today [06:01] SubStack: didn't work so great [06:01] jesusabdullah: Aww :( [06:01] a_meteorite has joined the channel [06:02] jesusabdullah: Maybe you should get a phone, SubStack [06:02] jesusabdullah: Even though they kinda suck [06:02] gerred: yay hackathon [06:02] SubStack: yeah they suck too much [06:02] SubStack: also expensive [06:02] jesusabdullah: Just get a stupid one, and then don't give people your number [06:02] SubStack: I am saving money so I can eat [06:02] gerred: i'm sitting and reading through js: the good parts. :D [06:02] jesusabdullah: tracphones are okay if you hit the sweet spot use-wise [06:03] jesusabdullah: The maximum utility is at like 2 minutes a day or something, though [06:03] sanduz2 has joined the channel [06:03] SubStack: not 2 minutes / month then :/ [06:03] SubStack: phones are such bullshit generally, not just cellphones [06:03] SubStack: all that infrastructure just to carry voice [06:04] JimBastard_: i just dont like being called , its epic distracting [06:04] JimBastard_: i gotta write code [06:04] SubStack: that too [06:04] gerred: my biggest thing with javascript and node: i keep wanting to fall back to ruby/eventmachine. [06:04] JimBastard_: disregard social life, acquire node modules [06:04] SubStack: ick, eventmachine [06:04] gerred: ha why do you say that? [06:04] SubStack: I was messing with that for dnode-ruby [06:04] SubStack: and it was painful [06:05] jesusabdullah: one nice thing about cell phones is that you can turn them off [06:05] SubStack: since it's so inflexible with respect to the class pattern thing [06:05] SubStack: nothing like javascript functions and hashes [06:05] jesusabdullah: Hah [06:05] jesusabdullah: I did that with python classes going back <_< [06:06] SubStack: I had to use class variables to make it all work since the event machine interface sucks for custom runtime services [06:06] jesusabdullah: It's weird for me now, having classes and dicts being two completely different things [06:07] SubStack: that and eigenclasses [06:07] gerred: huh dnode is cool. [06:07] SubStack: maybe I just know too much about ruby internals [06:07] gerred: i'm just struggling with this whole idea of writing an entire app in node.js [06:07] SubStack: and not enough about ruby in actual practice [06:08] Validatorian has joined the channel [06:08] SubStack: gerred: meh, you can delegate work with a bunch of processes and glue them together with rpc [06:08] gerred: in reality I've been using it with faye. ;) [06:08] SubStack: and those pieces can be written in whatever, especially if you use dnode [06:09] Validatorian: anyone know of any implementations of full-text search using redis for node? [06:09] gerred: yeah, I have no real world use cases for that just yet. [06:09] gerred: beyond me just hacking at things. [06:09] SubStack: pub/sub with flat routes is a bit limited I think [06:09] gerred: i'd like a client who wants something that I can 'oh, node!' [06:09] gerred: it's fairly limiting. [06:10] jesusabdullah: eigenclasses? That's a cool idea [06:10] SubStack: it's nice to have event emitters push to remote clients [06:10] jesusabdullah: cool name anyway [06:10] SubStack: jesusabdullah: in practice it's terrible [06:10] jesusabdullah: "eigen_______" is always win [06:10] jesusabdullah: Yeah, it sounds like it could potentially get annoying [06:10] apage43 has joined the channel [06:10] SubStack: since in ruby scope is all fucked with respect to class and instance evals [06:10] jesusabdullah: depending on what you're doing, and how you like to think about things [06:10] a_meteorite has joined the channel [06:11] SubStack: so to expose variables from the current scope into the definitions you have to .send :define_method to the eigenclass [06:11] jesusabdullah: So, wait, does ruby have a thing actually called an eigenclass? [06:12] SubStack: which looks something like (class << obj; self; end).send :define_method, name { |*args| ... } [06:12] SubStack: jesusabdullah: yes [06:12] SubStack: each instance has a class and an eigenclass [06:13] SubStack: the eigenclass is pretty much the object's copy of the class it was instantiated from and it can be modified without updating any outstanding class refs [06:13] gerred: hm i should write a haml interpreter for geddy. [06:13] jesusabdullah: Oh, the weird object-level variables that are kinda like prototypes in javascript, but more different? [06:13] SubStack: yes, more different [06:13] SubStack: far more annoying for sure [06:13] davidascher has joined the channel [06:13] jesusabdullah: I remember reading about object variables and class variables and being like, 'lolwat' [06:14] SubStack: it's more akin to __proto__ in javascript [06:14] jesusabdullah: __proto__? I'm actually unfamiliar with that [06:14] SubStack: except that (__proto__)s point back to the same references among instances [06:15] dahankzter has joined the channel [06:16] SubStack: v8: (new Number).__proto__ == Number.prototype [06:16] v8bot: SubStack: true [06:16] SubStack: jesusabdullah: ^^ [06:16] dnyy has joined the channel [06:16] SubStack: something to do with attribute resolution or however they call it [06:17] jesusabdullah: v8: Number [06:17] v8bot: jesusabdullah: function Number() { [native code] } [06:17] gerred: hmm [06:17] aurynn has joined the channel [06:17] jesusabdullah: v8: Number() [06:17] v8bot: jesusabdullah: 0 [06:17] jesusabdullah: v8: Number(1) [06:17] v8bot: jesusabdullah: 1 [06:17] jesusabdullah: v8: Number(2) [06:17] v8bot: jesusabdullah: 2 [06:17] gerred: zshell isn't finding my npm binary [06:17] jesusabdullah: v8: Number.prototype [06:17] v8bot: jesusabdullah: {} [06:17] jesusabdullah: hrrm [06:17] SubStack: v8: Object.getOwnPropertyNames(Number.prototype) [06:17] v8bot: SubStack: ["toExponential", "toString", "toLocaleString", "toPrecision", "valueOf", "toJSON", "constructor", "toFixed"] [06:17] SubStack: secret unenumerables [06:18] jesusabdullah: Oh, __proto__ is for the instance, and .prototype is for the constructor? [06:18] jesusabdullah: Interesting. [06:19] SubStack: so a cool thing is you can do what eigenclasses do in javascript by copying the __proto__ [06:20] SubStack: it breaks instanceof and you can't monkey-patch the running instances globally anymore is all [06:20] derferman has joined the channel [06:20] jesusabdullah: Oh, like you can say, thingA.__proto__ = thingB.__proto__ ? [06:21] SubStack: well sure [06:21] SubStack: it's not something you want to go around doing a whole lot [06:21] SubStack: but it was useful for something in dnode [06:22] franksvalli has joined the channel [06:23] jesusabdullah: orly? D: [06:23] jesusabdullah: Sounds...dayngerous [06:23] SubStack: well you can just add attributes anyways with foo.x = 10 [06:24] jesusabdullah: Heh [06:24] SubStack: but it's nice shorthand if you don't want to bother with all that enumerability crap [06:24] jesusabdullah: Isn't that how you normally do things? [06:25] jesusabdullah: enumerability? <_> [06:25] SubStack: v8: Object.keys({ a : 1, b : 2, __proto__ : { c : 3 } }) [06:25] v8bot: SubStack: ["a", "b"] [06:25] SubStack: v8: { a : 1, b : 2, __proto__ : { c : 3 } }.c [06:25] v8bot: SubStack: SyntaxError: Unexpected token : [06:25] SubStack: wups [06:25] SubStack: v8: ({ a : 1, b : 2, __proto__ : { c : 3 } }.c) [06:25] v8bot: SubStack: 3 [06:25] eisd: jesusabdullah: Yes, the DontEnum attribute [06:25] SubStack: stupid ambiguous leading brace [06:26] TheEmpath has joined the channel [06:26] jesusabdullah: I'm actually unfamiliar with this attribute [06:26] eisd: `ref mdc Object defineProperty @ jesusabdullah [06:27] eisd: hmm...weird [06:27] eisd: oh, you got it on the other channel :) [06:27] jesusabdullah: mmhmm [06:27] jesusabdullah: Man [06:29] jesusabdullah: Interesting. Seems hackerly [06:29] SubStack: and how [06:30] Nohryb has joined the channel [06:30] jesusabdullah: I only program in a completely non-hack style [06:30] jesusabdullah: Completely on the up-and-up [06:31] SubStack: it will be your undoing! [06:31] SubStack: point: java [06:32] SubStack: all standards and no hack, architecture aerospace [06:32] MikhX has joined the channel [06:35] zooko has joined the channel [06:38] jesusabdullah: http://www.reddit.com/r/haskell/comments/dp3cq/haskell_interpreter_written_in_javascript/ [06:38] jesusabdullah: SubStack: ^^ [06:38] SubStack: saw that [06:39] JimBastard_: yeah i saw that too, too bad i dont know anything about haskell [06:39] JimBastard_: it seemed cool [06:40] TheEmpath: say i require a module, how can i test to see if it exports a specific command? var module = require('test'); var method = 'getMushrooms'; if(module exported a function called 'getMushrooms') [06:40] Tobsn has joined the channel [06:40] Tobsn: hey there [06:40] SubStack: well don't use 'module' because that masks other stuff but [06:41] Tobsn: anyone here working with quip and dispatch? i get a weird error from the example saying quip.filter() doesnt exists [06:41] davidascher: hmm, with expresso, how do I tell it to shut down the redis connection when it's done running tests? [06:41] SubStack: TheEmpath: if (typeof module.baz == 'function') [06:41] TheEmpath: ooo [06:41] jesusabdullah: I hardly know anything about haskell, but those guys are hip enough I wish I had the brain cells to comprehend wth they were doing ;) [06:42] Tobsn: haskel? good luck ;) [06:42] TheEmpath: i need to use the method var however [06:42] TheEmpath: method is a string [06:42] Me1000 has joined the channel [06:42] SubStack: haskell isn't hard to learn, it's hard to internalize [06:42] jesusabdullah: Tobsn: Indeed. I think I have hope, now that LYAH has a section on monads [06:42] TheEmpath: i need to use a string to see if a method exists [06:42] Tobsn: i looked at huskel once [06:42] jesusabdullah: SubStack: That almost feels right [06:42] Tobsn: as i also looked into erlang and scala [06:42] SubStack: but monads are just monoids in the category of endofunctors! [06:43] Tobsn: and tried forgot what i saw [06:43] jesusabdullah: XD [06:43] Tobsn: ;) [06:43] Tobsn: *to forget [06:43] jesusabdullah: There's some cool stuff in haskell. Some REALLY cool stuff. But sometimes it feels academic [06:44] jesusabdullah: internalizing it takes effort, because it requires thinking about programming in a fundamentally different way [06:44] SubStack: TheEmpath: just module[name] then [06:44] jesusabdullah: and a lot of times there's technical theory behind what you have to do [06:44] aubergine has joined the channel [06:44] jesusabdullah: or, rather, behind how something works [06:44] Tobsn: ah nevermind [06:45] Tobsn: quip.filter() doesnt exist anymore its just quip() now [06:45] Tobsn: i shall tell the github world. [06:49] LowValueTarget has joined the channel [06:51] mikeal1 has joined the channel [06:54] TheEmpath: is there an equivilent for array.shift but for objects? [06:54] muhqu has joined the channel [06:54] DTrejo has joined the channel [06:54] SubStack: TheEmpath: objects don't have a well-defined order, so no [06:55] TheEmpath: gotcha [06:55] SubStack: you could shift off a list from Object.keys though [06:57] mikeal1 has joined the channel [06:58] kjeldahl has joined the channel [07:01] xdamman has joined the channel [07:02] bpot has joined the channel [07:09] MikhX has joined the channel [07:11] Tobsn: haha nice, i like the new structure of socket.io [07:11] Tobsn: (havent look into it since 2 month) [07:12] Tim_Smart has joined the channel [07:18] dachary has joined the channel [07:30] Mikushi1 has joined the channel [07:31] Mikushi1: Hi there, i am having a bit of trouble with the httpClient, whatever URL i'm trying to call with it i get a HTTP 400 (Bad request), any idea what could be the cause? [07:32] kuya has joined the channel [07:32] Tobsn: something is broken [07:33] Mikushi1: Tobsn: yeah, i guessed that... I used the example from the Documentation, but i keep getting 400 [07:33] TheEmpath: how can i check the prototype name of an object? [07:33] Tobsn: something in the example is broken [07:38] dbathurst has joined the channel [07:40] sstephenson has joined the channel [07:41] MikhX has joined the channel [07:42] devkorcvince has joined the channel [07:47] alcuadrado has joined the channel [07:49] alcuadrado: does anyone know if keyboard's keys status is accesible without keypress or keydown events? [07:49] alcuadrado: as they lag my application [07:51] Nohryb has joined the channel [07:55] DTrejo: wow [07:55] DTrejo: alcuadrado: why are they lagging it? [07:56] DTrejo: are you using event delegations fanciness? [07:56] alcuadrado: take a look: http://aocs.patriciopalladino.com/ [07:56] alcuadrado: use arrows to control the headless player :p [07:56] alcuadrado: and it's a little laggy [07:57] alcuadrado: i suspect it's because of the interval between two onkeypress events [08:03] Tobsn: i think you have to keep going on keydown [08:04] Tobsn: just make another sequence in between... if the key is still down while reaching the last couple pixels it keeps going [08:05] alcuadrado: I was thinking about that [08:05] Anti-X has joined the channel [08:05] alcuadrado: the problem is that in firefox keydown is only fired once :s [08:05] Tobsn: either that or you do the opposite... if you lose the keydown you do a endsquence [08:05] Tobsn: oh [08:05] Tobsn: cant you hook into key release or something? [08:05] Tobsn: onkeyup? [08:05] Tobsn: oh yeah [08:06] Tobsn: there is a onkeyup [08:06] stephank has joined the channel [08:07] alcuadrado: maybe I should just use keyup and keydown [08:07] Tobsn: yep [08:07] alcuadrado: onkey down set an interval [08:07] alcuadrado: that moves the player [08:07] alcuadrado: anda on keyup remove it ) [08:07] alcuadrado: :) [08:08] devkorcvince has joined the channel [08:08] Anti-X: does onkeydown fire more often in other browsers? [08:08] Tobsn: hmm [08:08] Tobsn: Anti-X, you never know... events are pretty fucked up between browsers [08:08] Anti-X: quirksmode.org [08:08] alcuadrado: yeah, in webkit based ones [08:08] Tobsn: alcuadrado, idk if its good to work with intervals [08:09] alcuadrado: Tobsn, onkeydown is only fired once in firefox [08:09] Tobsn: hmm [08:09] Tobsn: wouldnt that block everything else? [08:09] alcuadrado: why do you think that? (i'm pretty new in js) [08:09] Anti-X: i remember making a beyond-fullscreen grid in canvas, and i was able to scroll using the arrow keys, but i can't remember anything about onkeydown firing too many times [08:09] Anti-X: it just moved [08:09] Tobsn: while(onkeydown) ? [08:09] Anti-X: no [08:10] Anti-X: let me find it [08:10] Tobsn: maybe something stupid simple like that [08:10] alcuadrado: anit-x, the problem in here is that the user must move in discrete 32pixel tiles [08:10] alcuadrado: so, every keydown must move only one tile [08:10] Tobsn: just make a grid of animations [08:10] alcuadrado: and you cannot move 2 tiles at the same time [08:11] alcuadrado: waht do you mean by grid? (not a native speaker in here :$) [08:11] Tobsn: so each frame is 3x3 grid size [08:11] Anti-X: oh never mind, it wasn't the keys that moved it, it was edge of screen [08:12] Anti-X: i'll paste the source [08:12] Anti-X: it uses timeouts [08:12] Anti-X: or interval [08:12] Anti-X: works fine [08:13] Anti-X: http://pastebin.com/P1j0t2kh [08:13] alcuadrado: great [08:14] Anti-X: also remember there are two different types of events [08:14] Anti-X: the old ones [08:14] Anti-X: onblabla [08:14] Anti-X: and the DOM ones [08:14] Anti-X: DOMKeyPress or something [08:15] itissid has joined the channel [08:15] Anti-X: they may behave differently and more to what you want [08:16] alcuadrado: oh, that seams to be pretty improtant, and I didn't know that [08:16] alcuadrado: where can I found more about that? quirksmode? [08:17] Anti-X: MDC may have something [08:18] Anti-X: it doesn't seem to be a key related DOM event though [08:18] Anti-X: except textInput [08:18] Anti-X: so never mind that [08:18] bpot has joined the channel [08:18] alcuadrado: yeah, quirksmode showed the same [08:19] alcuadrado: so I'll try de interval approach [08:24] JimBastard_ has joined the channel [08:25] JimBastard_: zzz reporting back in from the nyu hackathon [08:25] JimBastard_: zzzz [08:25] daglees has joined the channel [08:25] daglees has joined the channel [08:32] rra_ has joined the channel [08:32] HAITI: JimBastard: What are y'all hackin on? [08:33] astrolin has joined the channel [08:34] SamuraiJack has joined the channel [08:38] aubergine has joined the channel [08:39] adambeynon has joined the channel [08:41] JimBastard_: HAITI: connecting twilio dial tones to socket.io [08:41] fbits has joined the channel [08:42] stride: "so guys, who has the coolest webserver ringtone?" [08:43] stride: ACTION is reminded of that little c tool to make one of our servers beep randomly in the middle of the day [08:43] HAITI: voip phreaking? [08:43] HAITI: =) [08:45] JimBastard_: more like mapping the phone buttons to a game [08:45] codemanki has joined the channel [08:45] JimBastard_: they are doing like worms / gorrilaz i think [08:45] JimBastard_: i wanna see simon says [08:45] JimBastard_: where is mape lol [08:46] mytrile has joined the channel [08:54] hassox has joined the channel [08:59] hellp has joined the channel [09:03] jetienne has joined the channel [09:07] d0k has joined the channel [09:08] Nohryb has joined the channel [09:09] benburkert has joined the channel [09:10] mape: JimBastard_: ? [09:10] [[zz]] has joined the channel [09:10] JimBastard_: mape: you feel like building simon says lol. we got twilio and socket connected and working already [09:11] JimBastard_: you call this phone number, and then you hit keys on the phone [09:11] JimBastard_: and the tones get sent to socket.io [09:11] JimBastard_: :p [09:11] JimBastard_: at this hackathon [09:14] dachary has joined the channel [09:15] tyfighter has joined the channel [09:15] jetienne has joined the channel [09:20] olegp has joined the channel [09:29] temp01: can you run/compile the official node.js (from nodejs.org) on windows or do I need a special build? [09:31] chapel: special build temp01 [09:31] Tim_Smart: mape: http://github.com/Tim-Smart/node-gtk [09:31] Tim_Smart: Finally got the glib event loop embedded into ev :) [09:32] temp01: chapel: do you know which one is the most up-to-date/popular? [09:32] temp01: I'm finding many articles on google [09:32] Tim_Smart: No native windows support. [09:32] Tim_Smart: You need cygwin. [09:33] temp01: I have it [09:33] Tim_Smart: OK. There are instructions around for building on cygwin. [09:33] chapel: hmm [09:34] temp01: there's this http://node-js.prcn.co.cc/ and this http://codebetter.com/blogs/matthew.podwysocki/archive/2010/09/07/getting-started-with-node-js-on-windows.aspx [09:34] chapel: well there was something someone linked in here [09:34] temp01: and probably more [09:34] chapel: http://code.google.com/p/servicestack/wiki/NodeJsWindowsDownload [09:34] temp01: and that :/ [09:34] Tim_Smart: http://github.com/ry/node/wiki/Building-node.js-on-Cygwin-(Windows) [09:35] temp01: I'll check those out. thanks chapel and Tim_Smart [09:38] a_meteorite has joined the channel [09:39] a_meteorite has joined the channel [09:49] agnat has joined the channel [09:49] ossareh has joined the channel [09:51] antono has joined the channel [09:52] prettyrobots has joined the channel [09:57] xAFFEE has joined the channel [09:57] Nohryb has joined the channel [09:58] xAFFEE has left the channel [10:05] aliem has joined the channel [10:12] hsuh has joined the channel [10:12] delapouite has joined the channel [10:17] TomsB has joined the channel [10:17] agnat has joined the channel [10:21] MikhX has joined the channel [10:22] franck34: hi [10:22] franck34: how can i format HH:mm:ss a new Date().getTime() using node.js ? [10:22] franck34: is there a Format() shortcut ? [10:24] franck34: ho it's just js standard fnc [10:26] temp01: hm, how do you install/use npm on windows (using the 'compiled' nodejs download - no cygwin) [10:32] temp01: dead day :/ [10:33] MattJ has joined the channel [10:33] Nohryb has joined the channel [10:34] konobi: temp01: nodejs on windows is cygwin only [10:34] temp01: yeah but using the exe/dll download, I can't do "make" etc [10:35] AAA_awright: franck34: Yeah you are going to need to find a Date.prototype.format prototype [10:35] konobi: temp01: that's all doable using cygwin [10:35] temp01: I don't have it :/ [10:35] temp01: I thought I installed it for e-texteditor but apparently not on this PC [10:35] konobi: temp01: http://www.cygwin.com/ [10:36] temp01: alright [10:36] temp01: will npm's install.sh work fine with it? [10:37] konobi: should do [10:37] temp01: thanks [10:39] matjas has joined the channel [10:39] aubergine has joined the channel [10:40] JimBastard_ has joined the channel [10:40] admc has joined the channel [10:42] temp01: so would I have to install node using cygwin too (with make etc)? or can I somehow use cygwin's npm with the nodejs I have now? [10:42] stephank has joined the channel [10:47] franck34: mm [10:48] franck34: in a jsonp context, if i insert a longpoll script, and while the script is waiting for an answer, i insert a second script, will the second script be executed ? or does it need the first script to "finish" first ? [10:49] franck34: s/executed/launched [10:58] Anti-X: is there a way to get the path of the script from inside the script? [10:59] q_no|weekend has joined the channel [10:59] Anti-X: in node obviously [10:59] Tim_Smart: __filename? [11:00] bsstoner has joined the channel [11:00] Anti-X: rharhuummm [11:00] Anti-X: of course.. global objects... why didn't i look there [11:01] Anti-X: will it change for submodules and such? [11:01] Anti-X: actually that doesn't matter [11:01] Anti-X: nvm [11:03] Anti-X: and for the record, it does [11:09] amrnt has joined the channel [11:12] zorzar_ has joined the channel [11:28] v8bot has joined the channel [11:29] themcgruff has joined the channel [11:31] vhost- has joined the channel [11:32] kgf has joined the channel [11:43] vandenoever has joined the channel [11:44] vandenoever: how can i load an xml doc with jsdom? i've tried jsdom.createWindow().open(path); [11:45] aubergine has joined the channel [11:47] chapel: is it a remote doc vandenoever ? [11:47] vandenoever: chapel: no, local [11:47] chapel: http://blog.nodejitsu.com/jsdom-jquery-in-5-lines-on-nodejs [11:48] chapel: well Id use nodes file opening stuff [11:48] chapel: assign it to a variable [11:48] vandenoever: ok, i can do that [11:48] chapel: then load it in jsdom [11:48] vandenoever: chapel: for performance? [11:48] chapel: var window = jsdom.jsdom(body).createWindow(); [11:48] chapel: body being the xml doc [11:49] vandenoever: chapel: as a string? [11:49] chapel: well body won't be a string [11:49] chapel: its an object [11:49] chapel: idk [11:49] vandenoever: right, but where do i get it [11:49] chapel: get body? [11:49] vandenoever: i start from a path to a file [11:49] chapel: from your xml doc [11:50] vandenoever: which i do not have, that's the point, i want to make one [11:50] vandenoever: i want to get jsdom to parse a file into a dom for me [11:50] diorahman has joined the channel [11:50] chapel: hmm [11:51] chapel: parse data and use jsdom to make it xml/html? [11:52] vandenoever: no, the input is an xml file already [11:52] vandenoever: so i want to read an xml file into jsdom [11:53] chapel: http://nodejs.org/api.html#file-system-104 [11:53] vandenoever: chapel: right so that gets the xml into a string, but how to get the string parsed? [11:54] Nohryb has joined the channel [11:54] chapel: load it into jsdom using the line above [11:54] vandenoever: var window = jsdom.jsdom(body).createWindow(); ? [11:54] vandenoever: where is the xml string in that command? [11:55] chapel: body [11:56] vandenoever: ah ok, i'll try [11:58] Tobsn: http://github.com/remy/nodemon/issues/issue/6/ [11:58] Tobsn: you can all kneel down and thank me :P [12:00] vandenoever: oh http://github.com/tautologistics/node-htmlparser is required [12:00] chapel: heh [12:01] chapel: thats cool Tobsn [12:01] chapel: didn't know about nodemon [12:01] chapel: will have to use it [12:01] Tobsn: yep, its awesome [12:01] jashkenas has joined the channel [12:01] Tobsn: since he changed that just now [12:01] Tobsn: you just keep it running [12:01] chapel: what if I stop my app using ctrl+c? [12:01] Tobsn: if you do something wrong it shows your error in the console and you keep editing and saving without having to manually restart everytime [12:01] chapel: will making a change still restart it? [12:01] Tobsn: you run your app with nodemon app.js [12:01] Tobsn: instead of node app.js [12:01] Tobsn: its like a wrapper for node [12:02] chapel: hmm [12:02] chapel: yeah [12:02] Tobsn: so if you ctrlC it its dead [12:02] Tobsn: as node would be [12:02] chapel: well one of the apps Im working on, I don't always want it to run completely, its not a daemon, more like a script atm [12:02] Tobsn: 10 Oct 11:55:13 - [nodemon] app crashed - waiting for file change before starting... [12:02] Tobsn: 10 Oct 11:55:19 - [nodemon] restarting due to changes... [12:02] Tobsn: nice, it really works [12:02] Tobsn: chapel, hmm no idea... maybe you cant go around the bad part? [12:03] Tobsn: i guess you could just comment it out or put a if around it [12:04] chapel: well I guess it would just restart it when I make a change [12:04] Tobsn: ah thats nice [12:04] Tobsn: chapel, if its a script that just runs down it says it crashed at the end but if you do a file modification it will run it again [12:04] chapel: well yeah [12:04] temp01: how do you recognize htmlparser so that jsdom can recognize it? [12:04] chapel: Im not worried about errors, so much as nodemons basic functionality [12:05] Tobsn: hmm? [12:05] chapel: what do you mean temp01 ? [12:05] temp01: I "require"d htmlparser and jsdom but I still get the warning about downloading htmlparser [12:06] zomgbie has joined the channel [12:06] chapel: you dont need htmlparser inside of your script to run jsdom [12:06] chapel: do you have npm installed? [12:06] temp01: no [12:06] chapel: you should get it [12:06] chapel: its nice [12:06] temp01: I'm git cloning the stuff [12:07] chapel: ah, well npm solves the dependency issues [12:07] chapel: being that it will install the dependencies for you [12:07] temp01: yeah, I want to but I'll have to download cygwin and dependencies etc first [12:07] vandenoever: git submodules could solve the dependency problem too [12:08] temp01: can I do it now without cygwin :/ [12:09] astrolin has joined the channel [12:09] vandenoever: temp01: i'm reading the code, apparently HtmlToDom needs a parser as argument [12:11] chapel: so I found cradle, for couchdb, anyone have any experience with it? [12:12] vandenoever: ACTION wonders why jsdom requires a window, it's not part of the DOM spec [12:13] chapel: uhh, its because it renders it as if it were a browser [12:13] vandenoever: it renders? so it does textlayout? [12:14] chapel: idk the details [12:14] vandenoever: hmm, i like nodes speed, but also like rhinos availability of java runtime [12:15] vandenoever: would be nice to have the node callback model combined with rhino completeness [12:15] chapel: completeness? [12:16] zooko has joined the channel [12:16] Tobsn: having a horn and dont liking fire and such [12:16] Tobsn: ;) [12:16] vandenoever: chapel: a nice dom implementation [12:17] vandenoever: chapel: jsdom feels weird to me [12:17] chapel: well its only a matter of time before that is fully integrated [12:17] Tobsn: vandenoever, with node.js you can just sit and wait for it [12:17] Tobsn: it always comes pretty quickly [12:17] chapel: node.js is barely a year old [12:17] chapel: and jsdom works pretty good imo [12:17] chapel: outside of some complex jquery selectors [12:18] vandenoever: yes, it's certainly impressive, perhaps i should try a bit more [12:18] Tobsn: do it, its worth it [12:18] temp01: jsdom needs a documentation :/ [12:18] vandenoever: thing is: i do not deal with html but regular xml and dont need a window [12:18] Tobsn: and if you cant find what you need just code it... [12:18] vandenoever: it feels weird to have one [12:18] Tobsn: since its javascript its easy to convert from other languages [12:19] temp01: vandenoever: did you see the example? [12:19] Chris64 has joined the channel [12:19] Chris64: hi all [12:19] temp01: vandenoever: http://github.com/tmpvar/jsdom/blob/master/example/node-xml/run.js [12:20] chapel: hey Chris64 [12:23] vandenoever: temp01: ah, no html stuff and no window, i'll try that [12:23] Nohryb has joined the channel [12:24] kriszyp has joined the channel [12:27] kjy112 has joined the channel [12:27] charlenopires has joined the channel [12:34] jstemmer has joined the channel [12:35] vandenoever: hmm, parsing a document "" gives an error: [12:35] vandenoever: Element: name must immediatly follow "<" [12:35] Tobsn: well its wrong [12:36] vandenoever: oh? seems valid xml to me [12:36] Tobsn: nope [12:36] Tobsn: html DTD says a has to close [12:36] Tobsn: open & close [12:36] vandenoever: Tobsn: i'm talking about xml not html [12:36] Tobsn: even ankers have to have [12:36] Tobsn: oh [12:36] Tobsn: [12:36] Tobsn: maybe? [12:37] Tobsn: i never understood why people do the / right after the text [12:37] Tobsn: i always write
for example [12:37] vandenoever: well, it's matter of taste, all is allowed [12:37] chapel: well thats xhtml [12:37] vandenoever:
does work btw [12:38] Tobsn: but the space would separate the tag name from the ending character [12:38] Tobsn: what parser are you using? [12:38] vandenoever: is also not parsed [12:38] Tobsn: maybe youre parsing xml with a json parser :P [12:38] Tobsn: you sure youre not feeding it a dtd? [12:38] vandenoever: require("node-xml").SaxParser [12:39] vandenoever: yes, like i said, if i change text to "" it validates [12:39] ooooPsss has joined the channel [12:39] Tobsn: how about [12:40] Tobsn: and <b></b> [12:43] vandenoever: Tobsn: both ok [12:44] Tobsn: <b /> ? [12:44] vandenoever: Tobsn: no [12:44] Tobsn: lol [12:44] Tobsn: <abc /> ? [12:44] vandenoever: that's ok [12:44] vandenoever: i think we have a bug ... [12:44] Tobsn: <ab /> [12:44] vandenoever: also fine [12:44] Tobsn: i guess its the single character non closing tags yep ;) [12:45] vandenoever: even <ab/> [12:45] vandenoever: is ok [12:45] Tobsn: but <x/> [12:45] Tobsn: fails right? [12:45] Tobsn: as does <x /> [12:45] vandenoever: yep [12:45] Tobsn: there ya go [12:45] Tobsn: submit an issue [12:46] Tobsn: ;) [12:46] vandenoever: or a fix, i'll look into it [12:47] vandenoever: the spalling error should help: 'immediatly' [12:47] rnewson has joined the channel [12:48] Tobsn: /djohack [12:48] Tobsn: //hack to allow for elements with single character names to be recognized [12:48] Tobsn: if (iE - iB != 1 ) { [12:48] Tobsn: if(SAXStrings.indexOfNonWhitespace(this.m_xml, iB, iDE) != iB) { [12:48] Tobsn: return this._setErr(XMLP.ERR_ELM_NAME); [12:48] Tobsn: } [12:48] Tobsn: } [12:48] Tobsn: i think youre using an old version [12:48] vandenoever: yeah, just reading that [12:48] Tobsn: http://github.com/robrighter/node-xml/blob/master/lib/node-xml.js#L500 [12:48] herbySk has joined the channel [12:48] Chris64: is fs.writeFile() a performance problem? atm I've no idea how to detect the end of my work to close the log file handler that's why it seems to be a good solution. what do you think?` [12:48] vandenoever: Tobsn: no, pulled from github [12:48] Tobsn: mistery solved. [12:48] Tobsn: maybe its not in the master [12:48] Tobsn: look into the code on your server [12:49] Tobsn: does it have that code in there? [12:49] vandenoever: i'm working on a laptop, not server, using node for scripting [12:49] Tobsn: either way [12:49] Tobsn: look into the code you use from github [12:49] Tobsn: and check if those lines are in there or not [12:49] vandenoever: i have only one node-xml.js and it is fresh from github [12:49] vandenoever: these lines are in there [12:50] Tobsn: ha [12:50] Tobsn: nice. [12:50] Tobsn: well than go and fuck up djohack [12:50] Tobsn: that fucking whore. [12:50] Tobsn: :P [12:51] Blackguard has joined the channel [12:51] Tobsn: its in the original commit [12:53] vandenoever: yeah, been in there from day 0 [12:53] Tobsn: you can try djohack@gmail.com [12:53] Tobsn: the email address exists [12:53] vandenoever: seriously? [12:54] Tobsn: well the address exists [12:54] Tobsn: i dont know if thats him [12:54] vandenoever: i think mailing Rob Righter makes more sense [12:54] Tobsn: yep [12:54] Tobsn: but i thought you might want to insult that guy or something [12:54] Tobsn: thats what i would do [12:54] Tobsn: :P [12:55] vandenoever: no, that's not my style [12:55] sechrist: So in browsers, is the only way to get true asynchronous javascript loading(for JSONP) through iframes used as a sort of thread? [12:55] sechrist: since webworkers aren't widespread yet [12:55] Tobsn: so youre more a cutting the breaks guy? [12:55] Tobsn: sechrist, what exactly do you want to do asynchronous? [12:55] vandenoever: Tobsn: :-) no, i'm just grateful for the code people put up [12:55] Tobsn: but he fucked it up [12:56] Tobsn: he has to die [12:56] Tobsn: at least [12:56] Tobsn: ;) [12:56] sechrist: Tobsn: a crapload of jsonp requests in the browser and maintain the javascript running in the main app [12:56] sechrist: since jsonp is just a script appended to the document [12:56] sechrist: the problem is they download async but execute sync [12:56] sechrist: (or that's my understanding) [12:56] sechrist: so my theory is.. if I distribute it to iframes [12:56] sechrist: and then the iframes call method in parent window [12:56] sechrist: it's all asyncy [12:56] Tobsn: i never really understood jsonp btw. [12:57] sechrist: jsonp is just <script src="http://apiserver.com/apicall?params&callback=lol"> [12:57] sechrist: and the return is JSON crapped in a function call [12:57] sechrist: blah({json here}); [12:57] sechrist: it's ran just a JS include [12:57] Tobsn: oooh [12:57] Tobsn: yeah right [12:57] Tobsn: i remember [12:58] Tobsn: they execute in sync? [12:58] sechrist: yeah browsers have to do that [12:58] sechrist: for dependency reasons [12:58] Tobsn: shouldnt they after download be still in the same async scope? [12:58] sechrist: they download async yeah but execute sync [12:58] Tobsn: well kinda makes sense [12:58] sechrist: so like if the middle one blocks [12:58] sechrist: the whole execution blocks [12:59] Tobsn: i think there is no way around that [12:59] Tobsn: at least not browser side [12:59] sechrist: iframes no? [12:59] Tobsn: hmm [12:59] sechrist: iframes are completely different javascript scope afaik [12:59] Tobsn: you mean generating iframes and filling it with html/jsonp? [12:59] Tobsn: depends if you want to use the outcome of the jsonp [12:59] sechrist: well generating iframes with code in them to eval and call callbacks in the parent frame [12:59] Tobsn: *depends on [13:00] Tobsn: that might work [13:00] sechrist: https://gist.github.com/01bb4fdf61763776d602 [13:00] sechrist: that's the workerframe I hacked up [13:00] sechrist: it's pretty lulz [13:01] sechrist: damn IE7 doesn't have JSON.parse apparently? [13:01] Tobsn: thats what you want to write into the iframe? [13:01] Tobsn: yeah .parse is not available everywhere [13:01] sechrist: well I'm executing javascript in the iframes [13:02] sechrist: and I want to do be able to do it with the same frame with different code [13:02] sechrist: so I eval the code I want to run [13:02] sechrist: updated gist with the caller code btw [13:02] Tobsn: wtf is that block of code? [13:02] sechrist: it's super hackish and kind of a mindfsck but I think it's the only way to do it [13:02] sechrist: jquery madness [13:03] Tobsn: btw. i think you can actually write stuff into an iframe [13:03] Tobsn: without a source [13:04] Tobsn: add a function that goes to the manager that tells it when the worker is done [13:04] sechrist: oooh [13:04] sechrist: well I have that [13:04] Tobsn: erm [13:04] Tobsn: s/goes/signals [13:04] sechrist: I have a callback when the iframe loads and when the workload finishes [13:04] sechrist: since the iframe has to be loaded for me to inject crap into it [13:04] Tobsn: i saw that [13:04] Tobsn: but i dont see a finish [13:05] sechrist: updated [13:05] sechrist: it's lulz but works [13:05] sechrist: that essentially gives me a function in the parent window that forks out to the iframe for the api call [13:05] sechrist: i'm doing it retardedly but if I need to i'll make something to spawn a pool or something [13:06] Tobsn: erm wait [13:06] xla has joined the channel [13:06] Tobsn: you want to mass submit shit over embed.ly? [13:06] Tobsn: lol? [13:06] sechrist: yes [13:06] sechrist: I have permission to as well [13:07] sechrist: it's necessary for friendshuffle.com [13:07] mikew3c has joined the channel [13:07] Tobsn: i dont know if friendshuffle.com is necessary [13:07] Tobsn: ;) [13:08] sechrist: :) [13:08] sechrist: I originally had a distributed thing grabbing the crap embedly gives me [13:08] sechrist: but I'd rather ddos embedly with clientside code [13:08] sudoer has joined the channel [13:10] sechrist: the distributed thing was actually pretty clever. I had vpses when like 20 IPs each and I had a queue system making sure specific hostnames only have one connection open from a specific IP at a time [13:10] sechrist: since a lot of webservers have simultaneous connection limits [13:10] sechrist: big node app [13:12] deoxxa: > by signing in with twitter, you will follow @FriendShuffle [13:12] deoxxa: that's not underhanded or anything! [13:12] sechrist: there will be a checkbox [13:12] sechrist: not my decision initially [13:13] Tobsn: lol [13:13] Tobsn: sechrist, youre doing it wrong [13:13] Tobsn: stop that project [13:13] Tobsn: will never get big [13:13] sechrist: there's more to it than what's up now [13:13] sechrist: and we've already been covered by mashable, rrw, and a ton of other articles [13:14] Tobsn: mashable covers a twitter connected shitter [13:14] Tobsn: thats nothing special ;) [13:14] sechrist: true [13:14] Tobsn: mashable really gets shitty since the last 6 month [13:14] Tobsn: http://mashable.com/2010/10/09/wal-mart-ipad/ [13:14] Tobsn: like that [13:14] sechrist: the next thing is curated content without logging in [13:14] Tobsn: its even a rumor [13:14] Tobsn: zomg. so fucking not worth reading at all [13:15] Tobsn: we already know apple is producing 35 million of those things next year... and of course they have to sell them somehow [13:15] sechrist: lmao [13:15] Tobsn: curated content? [13:15] sechrist: yeah [13:15] Tobsn: means? [13:15] sechrist: like you go to website [13:15] sechrist: and shuffle through cool shit [13:15] sechrist: stumbleupon without the stumbleupon [13:16] sechrist: I have new mockups and crap to build on but I have to figure out the logistics of fixing some of the problems already [13:16] Tobsn: i dont see the problem [13:17] sechrist: no no [13:17] sechrist: like [13:17] Tobsn: you go to website and you shuffle through cool shit [13:17] Tobsn: sounds pretty straight forward [13:17] sechrist: it's not that simple [13:17] Tobsn: haha [13:17] sechrist: many websites have framebusting code [13:17] sechrist: that we have to counteract [13:17] Tobsn: yep they do [13:17] Tobsn: you cant [13:17] sechrist: I do [13:17] sechrist: except in opera [13:17] Tobsn: how would you do that? [13:17] sechrist: really clever 204 response [13:18] Tobsn: wut? [13:18] Tobsn: wait what? [13:18] Tobsn: you make no sense [13:18] Tobsn: haha [13:19] sechrist: window.onbeforeunload + a http response with a code 204 [13:19] sechrist: most browsers don't move if you get a 204 [13:19] sechrist: so the thing to do is [13:19] sechrist: keep track of the page trying to change [13:19] Tobsn: but how would that fix a framebuster from a different website [13:19] sechrist: it works [13:19] sechrist: if you hit a framebusting site on friendshuffle.. it shuffles. [13:19] sechrist: (most of the time) [13:19] Tobsn: shuffles what? [13:20] sechrist: to the next item [13:20] Tobsn: oh [13:20] sechrist: but the real solution is to blacklist certain websites [13:20] sechrist: and to do that I have to have the shorturls already resolved [13:20] Tobsn: so the thing acts like stumbleupon with a frame bar at the top? [13:20] sechrist: yeah [13:20] sechrist: stumbleupon never solved the framebusting problem [13:20] sechrist: I'm trying to [13:20] sechrist: almost there [13:21] Tobsn: oh and you do an unbeforeonload to prevent the browser from killing your frameset [13:21] rnewson has joined the channel [13:21] sechrist: onbeforeunload just tells my script that it tried to change the location of the page [13:21] Tobsn: and than? [13:21] sechrist: so I quickly set it to a page on my node app that sends a 204 [13:21] sechrist: and the browser sits still [13:21] Tobsn: oh [13:21] Tobsn: you actually change location.href to that page? [13:21] sechrist: yep [13:22] sechrist: cool thing is that I can log framebusts [13:22] Tobsn: and that just stops it and your frame is still there? [13:22] sechrist: yep [13:22] Tobsn: interesting [13:22] Tobsn: 204 is No Content right? [13:22] sechrist: yeah [13:22] Tobsn: ha funny trick [13:22] sechrist: thing is... you have to implement it to where it's not annoying to users [13:22] sechrist: because you can't change the url bar if you just poll forever [13:22] Tobsn: i knew about the beforeunload but the 204 is new [13:22] sechrist: so I have some clever logic on when to prevent framebusting [13:22] sechrist: I can't just poll it at all times [13:23] sechrist: it's freakin weird [13:23] Tobsn: so friendshuffle just shows you random crap of yur friends from their feeds? [13:23] sechrist: essentially [13:23] Tobsn: but not? [13:23] sechrist: well it's not exactly random but sure [13:24] sechrist: key is being fast [13:24] sechrist: you can pretty much spam that shuffle button [13:24] Tobsn: not random? [13:24] Tobsn: looks pretty random [13:24] Blackguard has joined the channel [13:24] sechrist: well the content is but the order isn't [13:25] sechrist: it's descending time, alternating fb/twitter [13:25] Tobsn: oh [13:25] Tobsn: well [13:25] Tobsn: random in time [13:25] Tobsn: ;) [13:26] sechrist: stupid opera doesn't fire onbeforeunload [13:26] sechrist: so opera users get framebusts [13:27] chapel: sechrist: you need to check for the same base url, what if a bunch of your friends rt the same link, or rt and it gets a new short url? [13:27] sechrist: heh they're all unique [13:27] sechrist: I'm tracking all kinds of crap [13:27] sechrist: we have graphs of chains, influence, etc [13:27] chapel: well I got the same page twice in a row [13:27] sechrist: oh that [13:28] sechrist: I thought you meant the share [13:28] Tobsn: you save the last time a user logged in and start the friend shuffle from the timestamp right? [13:28] sechrist: nope because then people would land on the site and not have any content [13:28] sechrist: in some cases [13:28] Tobsn: why? [13:29] sechrist: if I shuffled through everything [13:29] chapel: twitter has a limited timeline [13:29] Tobsn: you just load at least 40 items [13:29] chapel: you can only go back so far [13:29] sechrist: refreshed, and it grabbed content I haven't seen [13:29] sechrist: and there hasn't been any shared [13:29] sechrist: no content [13:29] sechrist: that's also like 3 api calls later [13:29] chapel: have you thought of doing friends of friends? [13:29] Tobsn: well you keep collecting till you ahve a specified amount [13:29] skohorn has joined the channel [13:29] chapel: like if your friends content is low? [13:29] sechrist: chapel: we're launching a new discovery method asap [13:30] sechrist: but yeah it'll fix the "my friends share crap" problem [13:30] Tobsn: well now you just need to find a way to make quick money from it ;) [13:30] Tobsn: how many people use it right now? [13:30] Tobsn: 1k a day? [13:30] sechrist: probably will sell it [13:30] sechrist: over 1k/day [13:30] Tobsn: 2k a day? [13:30] sechrist: there's 98 people on the site right now [13:30] sechrist: 28 idle [13:30] sechrist: all others "active" [13:30] Tobsn: yeah, nobody buys that [13:30] sechrist: according to chartbeat [13:31] sechrist: chartbeat is baller as hell [13:31] Tobsn: dont put too much time into it [13:31] chapel: hmm, wonder if there is a way for you to bookmark the page without it being a friendshuffle link? [13:31] Tobsn: my tip [13:31] sechrist: Tobsn: we're already been offered some money [13:31] Tobsn: 20k? [13:31] sechrist: but stumbleupon wants to have a meeting with us [13:31] sechrist: not going to say [13:31] Tobsn: they probably want to hire you [13:31] chapel: yeah, dont try to work to sell, will just waste time [13:31] temp01: sechrist: are you sure about scripts executing sync in all browsers? AFAIK, it's only <FF4 [13:31] Tobsn: you + one person [13:31] chapel: :) [13:32] Tobsn: so you integrate what you have into their system [13:32] sechrist: that's the thought of a lot of bloggers that mentioned that [13:32] sechrist: thing is we have to launch the new stuff [13:32] chapel: oh and sechrist, you should have a bookmark link, that bookmarks the right url [13:32] sechrist: before we have a lead over stumbleupon [13:32] jetienne has joined the channel [13:32] sechrist: the new stuff is going to make people shit bricks [13:32] Tobsn: hmm [13:32] Tobsn: the new stuff is going to make 1000 people shit bricks ;) [13:33] chapel: you should also check for sites that are regularly spammed, like other social networks [13:33] chapel: like raptr or whatever [13:33] chapel: or automated tweets like that [13:33] chapel: cause tbh, that isn't content [13:33] sechrist: yep [13:33] sechrist: temp01: really? [13:33] digitalspaghetti: anyone know how i can capture a ECONNREFUSED event? I tried wrapping my code in a try{} catch but it seems to be DNS, rather than my code that crashes [13:34] Blackguard has joined the channel [13:34] sechrist: since when they're in html they execute sync I assumed that once you append something to do the dom [13:34] sechrist: they execute sync in that order [13:34] Tobsn: well <FF4 is basically every browser [13:34] sechrist: executing out of sync would break shit [13:34] temp01: sechrist: http://blog.getify.com/2010/10/ff4-script-loaders-and-order-preservation/ [13:34] sechrist: $('#hi').hide(); *jquery loads* undefined! [13:35] temp01: yes, that's why scripts wait for dynamically loaded scripts to load before running code that depends on it [13:35] temp01: that getify article is very detailed about it [13:36] bsstoner has left the channel [13:41] jdalton: well the jq bug doesnt really have to exist [13:41] jdalton: http://dl.dropbox.com/u/513327/ff_globalEval.html [13:42] huntz0r has joined the channel [13:42] Blackguard has joined the channel [13:45] ph^ has joined the channel [13:46] [[zz]] has joined the channel [13:50] heavysixer has joined the channel [13:54] chrischris has joined the channel [14:04] aconbere has joined the channel [14:04] prettyrobots has joined the channel [14:09] astrolin_ has joined the channel [14:10] devkorcvince has joined the channel [14:18] threeve has joined the channel [14:20] prettyrobots has joined the channel [14:21] antono has left the channel [14:27] softdrink has joined the channel [14:28] micheil: has anyone benchmarked yajl bindings vs native json.parser? [14:29] mAritz has joined the channel [14:30] jetienne has joined the channel [14:31] gorakhargosh has joined the channel [14:34] Athox has joined the channel [14:35] matt_c_ has joined the channel [14:39] mlangenberg_ has joined the channel [14:44] jblanche has joined the channel [14:45] jetienne has joined the channel [14:53] mlangenberg_: Anyone using Faye? I would like to know what best practices are regarding securing messages between server side clients. [14:58] mr_daniel: Suppose we have a constructor function called 'EventEmitter'. Usually we call this constructor function to create a new object from 'type' EventEmitter: var emitter = new EventEmitter() [14:59] mr_daniel: but what is the effect of 'process.EventEmitter.call(this)' ? btw: process.EventEmitter and require('events').EventEmitter seem to reference the same constructor function [15:00] mr_daniel: for an example, line 17 in this source file of socket.io http://github.com/LearnBoost/Socket.IO-node/blob/master/lib/socket.io/listener.js [15:01] mr_daniel: what confuses me: why is the resulting created object of 'process.EventEmitter.call(ths)' not bound to a variable like in 'var emitter = process.EventEmitter.call(this)' ? [15:01] mr_daniel: I mean the just created object is lost in memory in totally useless [15:02] Eber has joined the channel [15:02] naxx has joined the channel [15:02] Eber: Hey guys... I need something to make crypt routines (md5, sha1, ...) any suggestions?!?!? [15:03] mr_daniel: Eber: there is require('crypto') available http://nodejs.org/api.html#crypto-238 [15:04] Eber: mr_daniel: ohhhhh! [15:05] matjas has joined the channel [15:05] mlangenberg_: Eber: require('crypto').createHash('sha256').update('secret-password').digest('hex') [15:05] Eber: mlangenberg_: awesome! thanks mate! [15:08] bradleymeck has joined the channel [15:08] huntz0r has left the channel [15:08] bradleymeck: i return~ [15:11] huntz0r_ has joined the channel [15:15] chapel: hmm [15:15] huntz0r_ has joined the channel [15:15] chapel: so has anyone tried cradle for couchdb with nodejs? [15:20] sstephenson has joined the channel [15:22] bradleymeck: chapel nope, i generally find Request to be more than enough for couchdb [15:26] gerred has joined the channel [15:26] noonat has joined the channel [15:26] sveimac has joined the channel [15:29] chapel: hmm [15:29] chapel: request being the basic web thing? [15:29] chapel: so you are just doing basic polling and parsing the json? [15:30] bradleymeck: i dont use any polling [15:30] bradleymeck: are you talking about for _changes? [15:32] chapel: well I know nothing about couchdb atm [15:32] chapel: learning it [15:32] Eber: off-topic do you guys know any linux native mongodb admin tool? [15:36] mlangenberg_: I wish Faye could differentiate between local and remote clients. [15:37] bradleymeck: on the server vs on the client? [15:37] mlangenberg_: right, security wise. [15:39] mlangenberg_: For instance I only want the node server to be able to push messages to a certain channel. [15:39] Athox: announcer clean the tubes [15:39] _announcer: Cleaning the tubes for great justice! [15:40] mlangenberg_: but now all my browser clients can also publish on that specific channel, so I need to build in some kind of token/password system. [15:40] mlangenberg_: Which just look like overkill to me. [15:41] banjiewen has joined the channel [15:43] _announcer: Twitter: "node.js video. You can use it. http://nodecasts.org/ # nodejs_jp" [ja] -- 本城 博昭. http://twitter.com/honjo2/status/26947294348 [15:45] mlangenberg_: bradleymeck: with Faye, by default, every browser client can subscribe to '/**', and receive all messages ... [15:48] Chris64 has joined the channel [15:49] codemanki has joined the channel [15:56] zemanel has joined the channel [15:58] davidascher has joined the channel [15:59] ossareh has joined the channel [16:03] gorakhar` has joined the channel [16:04] [[zz]] has joined the channel [16:05] jchris has joined the channel [16:07] _announcer: Twitter: "You're attending the event I have to install the long awaited one I node.js" [ja] -- altnight. http://twitter.com/altnight/status/26949310164 [16:09] softdrink has joined the channel [16:13] felixge has joined the channel [16:13] felixge has joined the channel [16:14] Chris64: do you know an icmp package for node.js? [16:21] jamesarosen has joined the channel [16:22] micheil: Chris64: not off the top of my head, no [16:24] micheil: Chris64: probably wouldn't be terribly hard to implement [16:25] Athox: was just gonna say that [16:25] Athox: looks damn easy if you ask me [16:25] Chris64: are you sure? mh [16:26] Athox: 2x8 bits and then 3x16 bits of data [16:26] Chris64: with dgram module? [16:26] jdalton has joined the channel [16:27] Athox: aside from the fact that you'd need to implement the actual handling of the data [16:27] Athox: with a possibility of up to 255 different actions [16:27] Athox: though only 40 are specified atm [16:28] pengwynn has joined the channel [16:28] Chris64: ping would be ok so far [16:28] Athox: yeah that's just copying the message and sending it back [16:29] Athox: almost [16:31] rnewson has joined the channel [16:31] rnewson has joined the channel [16:32] spetrea-home has joined the channel [16:35] _announcer: Twitter: "Sorta got somewhere with adding pooling to @christkv node.js mongodb driver. Had to rip out cluster/replicas to make it manageable 4 now." -- karlseguin. http://twitter.com/karlseguin/status/26951595473 [16:36] aurynn has joined the channel [16:37] _announcer: Twitter: "Node.js (V8-based) and RingoJS (Rhino-based) on whether there is such a benchmark comparison. http://bit.ly/aNJ7pt" [ja] -- YAGI.Teruo. http://twitter.com/terurou/status/26951706966 [16:38] _announcer: Twitter: "NodeJS Screencast @ http://nodecasts.org/" [lv] -- Anthony Mann. http://twitter.com/MrNibbles/status/26951823207 [16:40] _announcer: Twitter: "a decent introduction to Node.js http://nodecasts.org/ it'll be interesting to see what future videos cover" -- Colin Wheeler. http://twitter.com/CocoaSamurai/status/26951978340 [16:43] Eber: Hey guys, has anyone ever succeeded using connect-auth with express?!? http://github.com/ciaranj/connect-auth [16:48] softdrink has joined the channel [16:49] Kami_ has joined the channel [16:49] _announcer: Twitter: "Nodecasts - Like Railscasts, but for NodeJS. http://tumblr.com/xtwl8pqux" -- Tom Morris. http://twitter.com/tommorris/status/26952683722 [16:51] dnolen has joined the channel [16:52] Nohryb has joined the channel [16:52] jameshome_ has joined the channel [16:52] dohtem has joined the channel [16:53] ossareh has joined the channel [16:53] jashkenas has joined the channel [16:55] davidwalsh has joined the channel [16:55] mytrile has joined the channel [16:58] cognominal has joined the channel [16:59] bronb has joined the channel [17:00] yhahn has joined the channel [17:01] bronb: Hey all, I was wondering if anybody mind to share cons of a single-threaded HTTP Daemon versus a multi-threaded daemon? [17:02] mr_daniel: can anyobdy explain me what this is good for: var obj={}; process.EventEmitter.call(obj) [17:03] derferman has joined the channel [17:03] noonat: bronb: the jsconf slides on http://nodejs.org talk about it [17:03] jamesaro_ has joined the channel [17:04] bronb: noonat: thanks, I'm on it [17:05] skohorn has joined the channel [17:06] mr_daniel: noonat: not 100% sure, but I think that 'long running tasks' are not good for an event loop, because it blocks the execution of other code for a long time [17:07] digitalspaghetti: Anyone know how in express I can have a .get redirect to a .post and return the values [17:07] digitalspaghetti: rather than duplicating both the get and post response? [17:07] aconbere has joined the channel [17:08] dachary has joined the channel [17:09] _announcer: Twitter: "http://tinyurl.com/38kmfb2 NodeJS Screencasts - By Emerson Macedo" [pt] -- onion_papa. http://twitter.com/onion_papa/status/26954247045 [17:10] noonat: digitalspaghetti: you could just declare the function outside the .get/.post calls and pass it to both... [17:10] digitalspaghetti: yea, probably just best to do [17:10] stride: v8bot: parseInt('101010', 2); [17:10] v8bot: stride: Use v8: <code> to evaluate code or "`v commands" for a list of v8bot commands. [17:11] stride: v8: parseInt('101010', 2); [17:11] v8bot: stride: 42 [17:11] steadicat has joined the channel [17:15] prettyrobots has joined the channel [17:15] Eber: v8: console.dir({me: 'Hi!'}) [17:15] v8bot: Eber: ReferenceError: console is not defined [17:16] Eber: ok... [17:19] rex_fernando has joined the channel [17:20] dgathright has joined the channel [17:20] kjeldahl has joined the channel [17:21] skohorn has joined the channel [17:24] zomgbie has joined the channel [17:24] danielzilla has joined the channel [17:25] danielzilla has joined the channel [17:25] _announcer: Twitter: "nodecasts, episode 1 #nodejs http://icio.us/osrvw0" -- Mauro De Giorgi. http://twitter.com/mdgArt/status/26955479657 [17:26] prettyrobots has joined the channel [17:30] qFox has joined the channel [17:31] sideshowcoder has joined the channel [17:31] bronb: the slides from nodejs.org showed that file I/O for example, would belong to a "thread pool". my question is... if each and every client will fread() a native file, would it mean we pay the same price of multithreading-by-design? [17:32] Yuffster has joined the channel [17:32] bpadalino: not necessarily, right? because, traditionally, you would stop executing while waiting for the fread to occur, with node when the data is ready it is then processed .. allowing everything to continue running with no issues and the only hangups being when you need to access something "slow" [17:33] _announcer: Twitter: "Node.js supervisor with Growl error-reporting: http://gist.github.com/611749" -- Felix Gnass. http://twitter.com/fgnass/status/26956021325 [17:33] hornbeck has joined the channel [17:33] c4milo has joined the channel [17:34] bronb: bpadalino: mind to rephrase? I didn't understand your conclusion [17:34] _announcer: Twitter: "Ubuntu 10.10 has ancient Node.js 0.1.97 :-( But CouchDB and Redis are up-to-date." -- Kenneth Falck. http://twitter.com/kennu/status/26956143583 [17:34] rnewson has joined the channel [17:34] rnewson has joined the channel [17:34] bpadalino: maybe i didn't understand your concern .. [17:35] bpadalino: are you suggesting that because each client does an fread() that you're no better off than just doing a traditional multithreaded design ? [17:36] bronb: bpadalino: yes, that's my question. what would be the difference between the designs if each and every client triggers a thread for a file access? [17:36] Gruni has joined the channel [17:36] bpadalino: if each client triggers a new thread specifically for each file access, then i don't think there would be an issue .. [17:37] bpadalino: or any difference rather [17:37] bronb: bpadalino: really? lol. I thought there was something I don't understand [17:38] bpadalino: it's cases where the execution of your program is stalled due to waiting for disk/network where node improves performance [17:39] bpadalino: but if you fire off a new thread and don't block in your original design, then i don't think, functionally, there is any difference [17:39] bpadalino: node just gives the syntactic sugar for you to easily accomplish this [17:39] noonat: well, there is a difference, except for things in node that use thread pools. [17:39] gerred has joined the channel [17:40] bpadalino: at least that's my understanding .. which could be completely wrong [17:40] dahankzter: Threads are not created for free, multiplexing asynch io across a number of threads would make sense [17:41] bronb: noonat: I'm not 100% sure if I understood your comment, are you suggesting that my scenario has a difference? or it belongs to the expection? [17:41] bpadalino: how much overhead is there in the creation of a new thread ? [17:41] _announcer: Twitter: "busy preparing for my workshop at # ParisWeb, stress begins to rise ... Program # realtime # # WebSocket NodeJs" [fr] -- Jonathan Blanchet. http://twitter.com/jblanchefr/status/26956656039 [17:41] noonat: bronb: the big difference is that the overheard is connected to the file read, and not to the client. grabbing and holding onto a client becomes much cheaper, imo. [17:41] bronb: :( [17:42] noonat: which is why node is so good at things like long polling, where apache falls over [17:42] bronb: I don't understand what it means "grabbing and holding onto a client"? [17:42] noonat: i mean, maintaining a connection to a client is much cheaper because there isn't an individual thread associated with each [17:43] bronb: (I'm sorry, I'll be back in a few minutes - thanks a lot guys) [17:45] skohorn_ has joined the channel [17:48] astrolin has joined the channel [17:49] evanpro has joined the channel [17:50] davidascher has joined the channel [17:50] _announcer: Twitter: "How are people connecting to WebSockets behind nginx? Or are you just running node.js out front?" -- John Boxall. http://twitter.com/johnboxall/status/26957309503 [17:53] Mikushi1 has joined the channel [17:53] bronb: (I'm back) [17:55] _announcer: Twitter: ".@kstewart we asked @ryah, but he declined to do an interview... I will try to find more node.js coverage." -- WebPulp TV. http://twitter.com/webpulptv/status/26957657282 [17:55] bronb: noonat: well yes, I can tell the difference of having a client without the obligation of per-thread basis, but if each each client will have a thread because it is based on a native file - so there shouldn't be any difference. am I wrong? [17:57] bronb: one more question, the thread it needs for the file, is being created dynamically? or it's pre-created for multiple calls? [17:57] noonat: thread pool, pre-created [17:58] noonat: and yes, i think that is true, assuming that file io in a thread is just as expensive as a client in a thread [17:58] noonat: (i don't know enough to say whether that is true, but gut says it is not) [17:59] _announcer: Twitter: "All right, so Jake now supports CoffeeScript. Huzzah, and stuff. http://github.com/mde/node-jake #node.js #nodejs" -- Matthew Eernisse. http://twitter.com/mde/status/26957990169 [17:59] bronb: so I suppose the advantage is still over a thread-per-client, which being created on-the-fly [18:00] bronb: now a different question [18:00] rra_ has joined the channel [18:00] bronb: what happens when each client needs multiple threads? where do we start to worry - for that overhead to be expensive? [18:01] davidwalsh has joined the channel [18:01] bronb: with a common multithreading design, each client will have a thread, and will be allowed to block. so we pay a fixed price for native operations as-is [18:02] bronb: what happens when each client needs 10 operations which needs piping? select'ing? one would think there's an overhead involved? [18:02] boaz has joined the channel [18:04] radiofreejohn has joined the channel [18:04] eisd has joined the channel [18:05] technoweenie has joined the channel [18:07] MikhX has joined the channel [18:07] jagautier has joined the channel [18:08] jagautier: whats the easiest way to access error for mongoose? [18:09] mytrile has joined the channel [18:10] prettyrobots has joined the channel [18:10] tekky has joined the channel [18:12] gerred has joined the channel [18:12] trotter has joined the channel [18:16] sudoer has joined the channel [18:17] rex_fernando has joined the channel [18:17] steadicat has joined the channel [18:17] sonnym: hmm. just added a repl to my server.js file and starting it fails when I run ./server.js& [18:17] tapwater has joined the channel [18:19] rex_fernando has joined the channel [18:23] ossareh has joined the channel [18:24] zemanel_ has joined the channel [18:24] aconbere has joined the channel [18:25] zemanel_ has joined the channel [18:26] vandenoever has joined the channel [18:28] zooko has joined the channel [18:28] temp01 has joined the channel [18:30] c4milo has joined the channel [18:30] Druid_ has joined the channel [18:30] c4milo has joined the channel [18:34] _mythz has joined the channel [18:35] dpritchett has joined the channel [18:37] davidascher: harumph. I like the setup/teardown features of nodeunit, but also the request/response specific features of expresso. Is there a test framework that does both? [18:38] mrbrdo has joined the channel [18:39] mrbrdo: anyone use the mysql module (from felixge)? i can't figure out how to get the insert id from an insert query... [18:40] boaz has joined the channel [18:42] dpritchett: have you tried doing a sys.inspect on the object returned from the query? [18:42] dpritchett: I'm reading through the mysql module source right now and it's not jumping out at me [18:46] benburkert has joined the channel [18:47] evanpro has joined the channel [18:48] micheil: hmm, does anyone know which is stored as a smaller value in v8 memory? null or undefined? [18:49] programble has joined the channel [18:49] _announcer: Twitter: "though nodejs is pretty nifty, some of the coding practices make me feel dirty... like I am back in the days of AS2" -- Philip. http://twitter.com/pvwoods/status/26961610756 [18:50] langworthy has joined the channel [18:51] yhahn: langworthy: cheers [18:52] softdrink has joined the channel [18:52] _announcer: Twitter: "NodeJS Screencasts - By Emerson Macedo - as seen on hacker news http://tumblr.com/xsml96u19" -- Brian Tingle. http://twitter.com/tingletech/status/26961796414 [18:52] langworthy: yhahn: salut [18:52] benburkert has joined the channel [18:53] noonat has joined the channel [18:53] langworthy: yhahn: what sort of node work are you up to? I've been lurking here for awhile and doing some minor hacking here and there. [18:54] antono has joined the channel [18:55] lenbust has joined the channel [18:56] yhahn: langworthy: same, just exploring [18:58] danielzilla has joined the channel [18:59] langworthy: yhahn: cool. it's an exciting system. have fun! [18:59] hassox has joined the channel [19:00] _announcer: Twitter: "@CocoaSamurai That Node.js screencast seems really good, shame about the guy's accent. It's like he's not even trying." -- Leonardo Cassarani. http://twitter.com/cassarani/status/26962359531 [19:02] sonnym: micheil: looks like undefined is bigger [19:02] micheil: sonnym: okay, cool. [19:04] sonnym: micheil: what I did http://pastebin.com/ZJYNBxEi [19:05] ehaas has joined the channel [19:05] dilvie has joined the channel [19:06] c4milo has joined the channel [19:06] sonnym: micheil: weird, running those a bunch of times, seems that they both jump around between the same two values, so maybe neither? dunno [19:07] micheil: var t; [19:07] micheil: !== null [19:07] micheil: undefined !== null [19:08] sonnym: var t; typeof t; is undefined [19:08] sonnym: there was an error in test-null.js when I first pasted it, but setting var t = null; gives the same results [19:09] mrbrdo: dpritchett sorry for the late answer [19:09] mrbrdo: dpritchett i looked through the source too.. the parser does seem to parse the response packet with insert_id, but it seems it is ignored later on (in query and client objects) [19:11] zomgbie has joined the channel [19:12] _mythz: Anyone know who's providing any hosted/cloud services for node.js? [19:14] sudoer has joined the channel [19:14] rex_fernando has joined the channel [19:16] Blackguard has joined the channel [19:18] dal9k has joined the channel [19:19] noonat has joined the channel [19:20] micheil: _mythz: yes, Joyent (who back node.js development) and Heroku [19:20] micheil: there's also Nodejitsu and another company. [19:21] micheil: mrbrdo: perhaps file a bug report then? [19:21] dohtem has joined the channel [19:21] dohtem has joined the channel [19:21] micheil: or a feature request. It's still a work in progress [19:23] _mythz: micheil: hey thanks, will check-em out [19:24] micheil: http://no.de ftw though. [19:24] DozyPieman: has anyone here got into Joyent? I request a coupon last week but nothing yet in the api [19:25] mikeal1: i have an account [19:26] DozyPieman: how long did it take from requesting a coupon to one appearing in the api for you? [19:26] dgathright has joined the channel [19:26] mikeal1: i didn't go through that process [19:27] mikeal1: i got mine before the knockout [19:27] DozyPieman: oh ok :) [19:27] micheil: DozyPieman: yes, I have. [19:28] DozyPieman: micheil, did you go through the api request coupon process? [19:28] _announcer: Twitter: "Optimal designs in the Node KO: # http://nodeknockout.com/ nodejs" [pt] -- Everton Fraga. http://twitter.com/evertonfraga/status/26964409012 [19:28] hassox has joined the channel [19:28] micheil: DozyPieman: yes, but I may have been fast tracked. [19:29] DozyPieman: okey dokey [19:29] davidascher has joined the channel [19:29] mikeal1: i'm sure you were [19:29] micheil: (there's a reason for it though; I was testing so large data parsing stuff) [19:30] micheil: still can't figure out the issues with the race condition in the new node-websocket-server parser [19:32] bradleymeck has joined the channel [19:32] djwm has joined the channel [19:32] MikhX has left the channel [19:32] MikhX has joined the channel [19:34] mrbrdo: micheil way ahead of you :) thanks [19:34] micheil: no worries. [19:36] hassox has joined the channel [19:37] nroot7 has joined the channel [19:37] saikat has joined the channel [19:43] prettyrobots has joined the channel [19:43] boaz has joined the channel [19:45] _announcer: Twitter: "Watching Ryan Dahl's talk about Node.js http://www.yuiblog.com/blog/2010/05/20/video-dahl/" -- Ochirkhuyag.L. http://twitter.com/ochko/status/26965683525 [19:49] gbot2 has joined the channel [19:51] _announcer: Twitter: "Today's tshirt is brought to me by node.js & Joyent" -- Matt Aimonetti. http://twitter.com/merbist/status/26966086726 [19:52] cloudhead has joined the channel [19:54] benburkert has joined the channel [19:54] felixge has joined the channel [19:54] felixge has joined the channel [19:55] rra_ has joined the channel [19:55] _announcer: Twitter: "While working on my js-beautify fork (http://bit.ly/bN5fq4) it appeared to me it might be easier to *just* add a beautify-node.js file." -- Carlo Zottmann. http://twitter.com/Carlo/status/26966385100 [19:58] gerred has joined the channel [19:58] gerred has joined the channel [20:00] davidascher has joined the channel [20:00] aconbere has joined the channel [20:01] benburkert has joined the channel [20:04] softdrink has joined the channel [20:04] pengwynn has joined the channel [20:08] _announcer: Twitter: "Today's tshirt is brought to me by @nodejs & @joyent #sponsoredWardrobe http://yfrog.com/bbhj3ej" -- Matt Aimonetti. http://twitter.com/merbist/status/26967318836 [20:09] sudoer has joined the channel [20:12] _announcer: Twitter: "I want to use / node.js http://htn.to/M57xSt" [ja] -- Sho Kusano(18). http://twitter.com/rosylilly/status/26967573722 [20:12] _announcer: Twitter: "Feel like Sinatra / Express - Node.js Web Development Framework http://htn.to/fVqdXV" [ja] -- Sho Kusano(18). http://twitter.com/rosylilly/status/26967585073 [20:13] _announcer: Twitter: "@cparker actually I was thinking about that while watching a coworker implement server-side tools in Node.js..." -- Brennen Bearnes. http://twitter.com/brennen/status/26967647149 [20:13] matjas has joined the channel [20:15] _announcer: Twitter: "Planned posts this week: Why the new twitter uses hashangs is their urls?, Gravity Forms, Introduction to NodeJS" [es] -- Armando Sosa. http://twitter.com/soska/status/26967806301 [20:16] zomgbie has joined the channel [20:17] mjr_ has joined the channel [20:18] jdalton has left the channel [20:21] dipser has joined the channel [20:23] bmease has joined the channel [20:24] _announcer: Twitter: "You may not read the right blogs, but do not recall reading anything about node.js, sinatra, NoSQL, WebSockets, etc. in Spanish" [es] -- Armando Sosa. http://twitter.com/soska/status/26968366167 [20:25] _announcer: Twitter: "Playing around with node.js. It's pretty cool, but it's no Rails #RailsLove" -- Sam Rudge. http://twitter.com/samrudge/status/26968501920 [20:26] _announcer: Twitter: "delicious: NodeJS Screencasts - By Emerson Macedo http://nodecasts.org/ # fb" [pt] -- Dodgy Developer. http://twitter.com/dodgydev/status/26968569594 [20:27] _announcer: Twitter: "Alright, enough of this #nodejs buffoonery for the weekend. I'm going to Disneyland." -- Philip. http://twitter.com/pvwoods/status/26968594542 [20:28] aconbere has joined the channel [20:29] _announcer: Twitter: "current status: node.js, raphael.js, jquery, and node-static." -- Matthew Kane Parker. http://twitter.com/moonmaster9000/status/26968725623 [20:34] _announcer: Twitter: "New blog post -- Node.js, Express and MongoDB on Snow Leopard - Step by Step: So, I started experimenting with a n... http://bit.ly/cPFh4g" -- Scott Brown. http://twitter.com/rsbrown/status/26969096153 [20:36] _mythz has joined the channel [20:37] _announcer: Twitter: "Sneak peek of my #hackyvr project mr.toad, a remote console for mobile devices: http://bit.ly/cYM6t8 but on #nodejs #socketio #jsconsole" -- John Boxall. http://twitter.com/johnboxall/status/26969291525 [20:38] _announcer: Twitter: "Alpha of my project for #hackyvr mr.toad a remote console for mobile devices: http://bit.ly/cYM6t8 built w/ #nodejs #socketio #jsconsole" -- John Boxall. http://twitter.com/johnboxall/status/26969355982 [20:38] jesusabdullah: Man! [20:40] _announcer: Twitter: "Great slides about thread vs event loop ! #nodejs : http://s3.amazonaws.com/four.livejournal/20091117/jsconf.pdf" -- Grégory. http://twitter.com/paulgreg/status/26969476660 [20:40] mrbrdo: is it possible to do something like sleep in node? i just need it for testing/quickfix.. e.g. sleep for 1 millisecond [20:42] mape: ugly while [20:42] nroot7 has joined the channel [20:42] mrbrdo: i still want something that won't put the CPU to 100% [20:43] mape: settimeout? [20:43] mrbrdo: that's not blocking [20:43] mrbrdo: it's async/callback [20:43] nroot7 has left the channel [20:43] mape: yup [20:43] mrbrdo: i need blocking :) [20:44] mape: then while, node goes out of its way to not have blocking [20:44] gerred has joined the channel [20:50] _announcer: Twitter: "Just got round Trying to October Node.js Simple!" [pt] -- IanT. http://twitter.com/wildwinter/status/26970164483 [20:50] pengwynn has joined the channel [20:54] jamescarr has joined the channel [20:55] lgl has joined the channel [20:56] matjas has joined the channel [20:58] rnewson has joined the channel [20:58] _announcer: Twitter: "Works for me. http://github.com/carlo/js-beautify-node (Renamed the repo.)" -- Carlo Zottmann. http://twitter.com/Carlo/status/26970678248 [21:01] creationix has joined the channel [21:09] skohorn has joined the channel [21:10] AAA_awright: mape: set the nice level, you can't avoid using 100% of the processor, you can make sure other processes get the processor first through [21:11] _announcer: Twitter: "How do I send events to a specific listener in node.js? I have N objects which can respond to event M but I need specificity. Bleh." -- rjp. http://twitter.com/zimpenfish/status/26971531959 [21:12] AAA_awright: "Won't put the CPU at 100%" and not needing a setTimeout simply doesn't make any sense [21:12] frodenius: yes it does [21:15] AAA_awright: I wondered about that a while ago too, but if you are at the point you think you need a sleep() you are doing it wrong [21:17] jpld has joined the channel [21:18] bradleymeck: !tweet @zimpenfish, you would have to keep track of specific listeners then, .emit is a broadcast to all listeners on purpose [21:18] benburkert has joined the channel [21:22] chrischris has joined the channel [21:23] crodas has joined the channel [21:28] dohtem` has joined the channel [21:28] pengwynn has joined the channel [21:32] Anti-X: a sleep() is for intentionally causing a delay for testing purposes. at least that's the only valid use i can see. [21:34] hassox has joined the channel [21:35] _announcer: Twitter: "Node.js screencasts : Nodecasts.org: Comments http://bit.ly/9v2CXM #in" -- Pronojit Saha. http://twitter.com/PRONOjits/status/26973037425 [21:37] c4milo has joined the channel [21:41] saikat has joined the channel [21:41] kolektiv has joined the channel [21:42] dgathright has joined the channel [21:43] gerred has joined the channel [21:43] kolektiv: hi, not sure if this is particularly node.js, but... [21:43] kolektiv: i'm running under cygwin on windows [21:43] kolektiv: the node console does "odd things" [21:44] kolektiv: i.e. no up/down arrow previous/next command, odd alignment, etc. [21:44] kolektiv: is this a known issue under cygwin? [21:49] aho has joined the channel [21:50] _announcer: Twitter: "but I really regret to have missed the one about #nodejs with @ephoz. thanks to the #osdcfr team" -- franck cuny. http://twitter.com/franckcuny/status/26973951734 [21:50] dbathurst has joined the channel [21:50] softdrink has joined the channel [21:53] ncursestest has joined the channel [21:54] _announcer: Twitter: "Pushed a stable version of my nurl package for node.js to github: http://bit.ly/9HunqO" -- David Winterbottom. http://twitter.com/codeinthehole/status/26974210192 [21:55] stephenjudkins has joined the channel [21:56] dachary has joined the channel [21:56] ben_alman has joined the channel [22:00] hsuh has joined the channel [22:00] jagautier: anyone here used less.js with express? [22:00] jagautier: can you pass it a file to render? [22:00] ryah: i'm rather avoiding OO design - but making a super class to net.Socket and fs.ReadStream would be good [22:00] ryah: (also the http streams.) [22:01] yhahn has joined the channel [22:03] guybrush: jagautier: you can use a the compiler middleware of connect in express to compile less [22:03] guybrush: http://senchalabs.github.com/connect/compiler.html [22:03] jagautier: sweet exactly what i was looking for [22:04] guybrush: see configuration in the express-manual on how to enable middleware in express http://expressjs.com/guide.html#Configuration [22:05] jagautier: yeah i was just looking there! thanks i knew this would be easy [22:05] Me1000 has joined the channel [22:05] Tim_Smart has joined the channel [22:06] Tim_Smart: ryah: ping [22:06] ryah: Tim_Smart: hello! [22:06] ryah: Tim_Smart: having fun with gtk? [22:06] Tim_Smart: ryah: Not too bad, except for the ev stuff. [22:07] Tim_Smart: ryah: Btw, your sample didn't work :( [22:07] Tim_Smart: You still have to start the glib loop to get anythign to work. [22:07] _announcer: Twitter: "Found nodeunit and got my project set up to work with it. Very slowly getting the hang of #nodejs. :)" -- Matthew Turland. http://twitter.com/elazar/status/26975070677 [22:07] ryah: Tim_Smart: hm [22:08] Tim_Smart: And then... it blocks the ev loop. Fun fun. [22:08] ryah: Tim_Smart: did you try putting in those GDK_THREAD() things? [22:08] ryah: or whatever they were? [22:08] Tim_Smart: Nope :/ [22:08] ryah: (that we saw in gtk_main() ? [22:08] Tim_Smart: Where do you put them? [22:08] ryah: *shrug* :) [22:08] ryah: in the ev_prepare and ev_check watchers [22:09] ryah: i think that glib-ev thing has both [22:09] Tim_Smart: ryah: They never get executed.. I put some prints in there. [22:09] ryah: ev_prepare is the callback before being descheduled [22:09] ryah: ev_check is after [22:09] ryah: (by select() [22:09] admc has joined the channel [22:09] ryah: Tim_Smart: but are you calling them before ev_loop? [22:09] Tim_Smart: OK I'll give it a go. [22:10] ryah: you might need to hack node a bit... [22:10] jamesarosen has joined the channel [22:10] Tim_Smart: Yeah, I'll chuck it in Loop() [22:10] ryah: hm [22:10] ryah: no you should be able to do it [22:10] Tim_Smart: Right. [22:10] ryah: is your code up somewhere? [22:10] Tim_Smart: http://github.com/Tim-Smart/node-gtk/blob/master/src/ngtk.cc [22:11] Tim_Smart: Actually, I'll try it on your sample first. [22:14] ryah: you can't call this: http://github.com/Tim-Smart/node-gtk/blob/master/src/ngtk_loop.cc#L40 [22:14] jacoblyles has joined the channel [22:14] ryah: where is the entry point? [22:14] Tim_Smart: ryah: Yeah, ignore run [22:14] ryah: what do you call first in your js [22:14] Tim_Smart: Loop rather. [22:14] ryah: (when trying to get the glib-ev stuff working) [22:14] Tim_Smart: It shouldn't be needed. [22:15] ryah: nothing is being called in Loop::Initialize [22:15] Tim_Smart: ryah: You don't need a g_main_loop right? [22:15] ryah: no [22:15] ryah: do you have a link to marc lehmann's stuff? [22:16] ryah: ev::glib.xc ? [22:16] Tim_Smart: http://cvs.schmorp.de/Glib-EV/EV.xs [22:16] Tim_Smart: Wrong one, http://cvs.schmorp.de/EV-Glib/Glib.xs [22:16] ryah: trust me tim, when you get this working it's going to be awesome [22:16] Tim_Smart: Yes, and I can see why. [22:16] Tim_Smart: <3 [22:17] ryah: you need to call the install function [22:17] ryah: (got i hate perl extensions) [22:17] jpld: hmm, i'm confused on an HTTP POST to a node.js server, where is the posted date in the request object? it isn't in params… [22:18] Tim_Smart: ryah: The install function is in my init... Or do I call it after installing all the signal handlers? [22:18] ryah: jpld: it might be set in the body [22:18] ryah: jpld: posted date? [22:18] ryah: Tim_Smart: i dont see it in your code... [22:18] jpld: ahh, i skipped body, oppppsss [22:19] Tim_Smart: http://github.com/Tim-Smart/node-gtk/blob/master/src/ngtk.cc#L123-144 [22:19] ryah: ah okay - sorry i was on the wrong file [22:19] jpld: ryah: hmm body is empty/undefined and params is empty too, bizarre [22:19] ryah: Tim_Smart: okay that looks good.. [22:20] jpld: tried both curl -d and a simple jQuery.post() as well [22:20] Tim_Smart: Except, the loop just falls through :) [22:20] ryah: Tim_Smart: so i think in those check and prepare, you should try putting those gdk thread things [22:20] Tim_Smart: ryah: Again, they never get run. I put print's in there to see. [22:22] ryah: they never get run... [22:23] ryah: are you sure that init function i being run? [22:23] Tim_Smart: Yeah, because all the other stuff gets initialized [22:25] tilgovi has joined the channel [22:25] overra has joined the channel [22:25] ryah: Tim_Smart: that doesn't make sense... [22:26] Tim_Smart: No, it doesn't, [22:26] Tim_Smart: Something weird is happening that we are over looking.. [22:26] rex_fernando has joined the channel [22:26] Tim_Smart: Should those be EV_DEFAULT_UC_ as well? [22:26] Tim_Smart: ev confuses me. [22:27] jpld: ryah: my error, i needed some express body decoder, the pitfalls of using a library you don't know (0: [22:28] ryah: Tim_Smart: just the ev_check_start and ev_check_prepare [22:29] Tim_Smart: ryah: Should I be calling ev_unref or something, whatever that does (looking at node.cc) [22:30] prettyrobots has joined the channel [22:31] ryah: Tim_Smart: yeah, but that doesn't hurt it at the moment [22:31] _announcer: Twitter: "My presentation of nodejs for #OSDCfr is online at http://cyprio.net/nodejs_osdc.pdf Thanks @osdcfr for all the awesome talks!" -- oz. http://twitter.com/ephoz/status/26976536734 [22:31] ryah: (that's just so node will exit cleanly when nothing is running) [22:31] mif86 has joined the channel [22:31] ryah: you have a printf() here: http://github.com/Tim-Smart/node-gtk/blob/master/src/ngtk.cc#L92 [22:31] Tim_Smart: Ah gotcha. [22:31] ryah: ? [22:31] _announcer: Twitter: "@ephoz thanks for your talk! #nodejs #OSDCfr" -- OSDC.fr. http://twitter.com/osdcfr/status/26976591792 [22:32] Tim_Smart: Yeah, just before there. [22:32] ryah: i'm on a macintosh - otherwise i'd help you [22:32] ryah: (i fear using x on mac) [22:32] _announcer: Twitter: "@ Devinrio tell that the speakers will provide presentations? I searched and only found in the slideshare of the nodejs" [pt] -- Cayo Medeiros. http://twitter.com/yogodoshi/status/26976627074 [22:32] Tim_Smart: ryah: I'm on a Mac, running Ubuntu :p [22:33] dohtem|desk has joined the channel [22:34] Tim_Smart: Yeah, the only function in there being entered is init() [22:38] aurynn has joined the channel [22:39] Tim_Smart: ryah: Wait, this needs to be called *before* the loop enters right? [22:41] Tim_Smart: Oh, nevermind. [22:42] Tim_Smart: http://github.com/ry/node/blob/master/src/node.js#L587-589 :/ [22:42] Tim_Smart: Doesn't that mean the main module runs *after* the ev_loop has been called? [22:44] prettyrobots has joined the channel [22:45] Tim_Smart: Meh, doesn't change anything. [22:47] ooooPsss has joined the channel [22:52] ossareh has joined the channel [22:53] mr_daniel has joined the channel [22:56] jesusabdullah: http://github.com/jesusabdullah/bf.js :D [22:57] _announcer: Twitter: "Just published a Cool Thing I made in #node.js :v http://github.com/jesusabdullah/bf.js" -- Joshua Holbrook. http://twitter.com/jesusabdullah/status/26978217986 [22:57] jesusabdullah: ahahahaha >:P [22:59] ryah: Tim_Smart: no [23:00] ryah: do you have some timers or something in your code? [23:00] ryah: maybe the program is just exitting immediately [23:02] _announcer: Twitter: "node.js and socket.io are amazing. have to say it again." -- Marco Kaiser. http://twitter.com/marco/status/26978569655 [23:03] jesusabdullah: I love how easy it is to publish stuff on npm :D [23:03] ryah: jesusabdullah: me too :) [23:04] jesusabdullah: It's refreshing! [23:04] jesusabdullah: I have to admit, I've never bothered publishing anything in other ecosystems, but I have a feeling it's rarely as easy as npm publish [23:05] SubStack: it's super lame in perl, where you have to get a pause account [23:05] ryah: it's pretty easy to publish a gem [23:06] SubStack: ruby looks easy and rubygems.org is a lot more useful than it used to be [23:07] zemanel has left the channel [23:07] Tim_Smart: ryah: Yeah that nextTick does make everything run after ev_loop has been called. [23:07] MikhX has joined the channel [23:07] ryah: Tim_Smart: that should be okay.. [23:08] Tim_Smart: ryah: Interesting though, if I put gtk_init() above the ev_prepare stuff, I get a segfault. [23:09] ryah: maybe you should do your gtk_init on the nextTick [23:09] ryah: what happens if you take it out [23:10] Tim_Smart: ryah: https://gist.github.com/a8774a37a70d7d6f0ff6 [23:11] Tim_Smart: I have a console.log just before process.loop() too, which doesn't get called. [23:14] ryah: Tim_Smart: what if you don't do gtk stuff though [23:15] ryah: Tim_Smart: im just wondering why that ev_check and prepare aren't working [23:15] Tim_Smart: I'm about to find out ;) [23:16] Tim_Smart: segfault [23:18] banjiewen has joined the channel [23:19] Tim_Smart: OK. Removing all of the gtk stuff gets a clean exit. [23:21] ryah: Tim_Smart: put an interval in tehre [23:22] Tim_Smart: setInt? [23:22] ryah: setInterval(function () { console.log('hi'); }) [23:25] Tim_Smart: Yeah that works. [23:26] ryah: http://gist.github.com/619685 [23:26] ryah: mikeal1: you around? [23:27] mikeal1: yeah [23:28] mikeal1: interesting [23:28] HAITI: http://gist.github.com/619688 [23:28] mikeal1: you want to replace sys.pump with this proto method? [23:28] ryah: yeah [23:28] HAITI: on UBUNTU SERVER free EC2 trial [23:29] ryah: mikeal1: req.pipe(process.stdout); req.pipe(file); [23:29] ryah: i'd like to have special meaning for the first arg if it's a string [23:29] ryah: req.pipe('/tmp/x') [23:30] mikeal1: I don't think that's a good idea [23:30] mikeal1: some objects might want strings to be urls [23:30] mikeal1: and then things get complicated [23:30] mikeal1: i do want it to take multiple arguments [23:31] ryah: filesystem is a bit different than remote url.. [23:31] mikeal1: req.pipe(proccessor, template, response); [23:31] ryah: why not call pipe multiple times? [23:31] mAritz has joined the channel [23:32] ryah: req.pipe(gzipper, { close: false }); [23:32] ryah: gzipper.pipe(template) [23:32] ryah: well.. [23:32] ryah: that example doesn't make sense [23:32] ryah: ... [23:32] ryah: req.pipe(gzipper, { close: false }); [23:33] ryah: gzipper.pipe(secureSocket); [23:34] dbathurst has joined the channel [23:34] Tim_Smart: Hmm I think I need to get in touch with schmorp [23:34] _announcer: Twitter: "#nodejs peeps make me laugh. "my new framework is like abc for def", where abc and def are technologies ~3 people have ever used/heard of." -- shaunau. http://twitter.com/shaunau/status/26980777899 [23:34] Tim_Smart: Well, Mark. [23:34] SubStack: I like this pipe thing much better [23:35] Ari-Ugwu has joined the channel [23:36] HAITI: n [23:37] SubStack: mikeal1: also looking forward to this oakjs thing [23:37] mikeal1: ryah: maybe is pipe returns the streams you pass it [23:37] SubStack: ACTION is in Oakland [23:37] mikeal1: http://oakjs.com/ [23:37] mikeal1: putting together the site right now [23:37] mikeal1: and figuring out who is going to speak [23:37] SubStack: saw it on my github dashboard [23:37] mikeal1: i'm not, that picture is just a placeholder [23:38] Tim_Smart: ryah: https://gist.github.com/6a368e85c3edaf54c502 [23:38] mikeal1: ryah: req.pip(processor, {close:false}).pipe(response) [23:38] mikeal1: i've also been thinking about the error handling [23:38] mikeal1: and I think the error handling should only propogate forward [23:39] mikeal1: it simplifies everything [23:40] alcuadrado has joined the channel [23:40] ryah: Tim_Smart: link me your code again [23:40] mikeal1: someone should make this webpage pretty [23:41] Tim_Smart: I'll push my current code. [23:41] mikeal1: cause I don't have those skills :) [23:41] ryah: Tim_Smart: i want to see ../src/ngtk.cc:200 [23:41] Tim_Smart: "ev_prepare_start (EV_DEFAULT_UC_ &ctx->pw);" [23:42] ryah: Tim_Smart: but the whole file.. [23:42] ryah: Tim_Smart: gist it? [23:42] sonnym: ryah: just watched your yui theater talk. . . are you still recommending using nginx as a gateway? [23:43] Tim_Smart: ryah: http://github.com/Tim-Smart/node-gtk/blob/master/src/ngtk.cc#L200 [23:43] Tim_Smart: and the test: http://github.com/Tim-Smart/node-gtk/blob/master/test.js [23:43] ryah: sonnym: sure [23:44] mikeal1: ryah: i like the idea of having it be a proto method [23:44] mikeal1: and i like the options argument the more i think about it [23:44] SubStack: mikeal1: I can do a talk about dnode if you want for oakjs [23:44] mikeal1: I don't like special handling of strings tho [23:44] ryah: Tim_Smart: ctx is a pointer [23:44] ryah: Tim_Smart: no & [23:44] mikeal1: i need a front end person [23:44] ryah: ev_prepare_start (EV_DEFAULT_UC_ ctx->pw) [23:44] mikeal1: we have issacs talking about node stuff already [23:45] ryah: same for all those lines [23:45] Tim_Smart: ryah: Oh ok, then why does it have it in the perl one? [23:45] mikeal1: i need to talk to aq [23:45] SubStack: oh it's general javascript I see [23:45] mikeal1: he's got family in town this weekend tho [23:45] _announcer: Twitter: "@kesavkolla node-mdbm now supports Cache. See http://github.com/robtweed/node-mdbm (Cache instructions at end of readme) #nodejs" -- rtweed. http://twitter.com/rtweed/status/26981518922 [23:46] ryah: Tim_Smart: i don't know [23:46] Tim_Smart: ryah: "../src/ngtk.cc:198: error: invalid cast from type ‘ev_prepare’ to type ‘void*’" [23:47] ryah: which arg [23:47] ryah: oh okay [23:47] ryah: nevermind [23:48] ryah: yes, the & are okay.. [23:48] indexzero has joined the channel [23:49] [[zz]] has joined the channel [23:49] indexzero: yo, anyone tried streaming large files to outgoing httpRequests? I'm seeing some very odd behavior [23:49] benburkert has joined the channel [23:49] ryah: indexzero: how large? [23:50] indexzero: not that large at all actually, like 360kb [23:50] indexzero: I'm seeing the stream choke if I try to send more than 120kb [23:50] indexzero: https://gist.github.com/353b3420b86bd945f01d [23:50] ryah: indexzero: using sys.pump? [23:51] indexzero: no, just calling request.write() a bunch of times [23:51] Tim_Smart: indexzero: Oh, the send buffer will fill up ;) [23:51] Tim_Smart: Sockets are slower than disk usually. [23:51] jamescarr has joined the channel [23:52] Tim_Smart: You will need to check if write() returns false. [23:52] indexzero: Tim_Smart: The thing is, I tried just writing the whole file to the request as a string, but that also just hung indefinitely [23:52] indexzero: ok, what do I do when that happens? Buffer from disk then continue the write? [23:52] Tim_Smart: indexzero: Seen the sys.pump implementation? [23:53] indexzero: Tim_Smart: yeah, I could probably just use sys.pump [23:53] indexzero: I didn't think about that [23:53] Tim_Smart: indexzero: http://github.com/ry/node/blob/master/lib/sys.js#L335 [23:54] Tim_Smart: Usually you don't need that many listeners though. [23:54] indexzero: right.... I get it, so the request stream will be emitting pause, resume, etc events [23:54] indexzero: because it's a writeable stream [23:54] zemanel has joined the channel [23:55] Tim_Smart: The write stream will emit "drain" when everything has been flushed to socket. [23:55] Tim_Smart: You then call resume() on the read stream. [23:55] indexzero: gotcha [23:55] indexzero: thanks man [23:55] jacobolus has joined the channel [23:55] HAITI: https://10.cloud.ubuntu.com/ [23:56] Tim_Smart: Haha, with 1 hour of server time, what could you do? [23:56] Tim_Smart: Not much. [23:56] HAITI: install the wrong version of node =) [23:56] HAITI: and gcc [23:56] HAITI: and everytihng else haha [23:57] HAITI: Interesting idea anyway