[00:00] Booths has joined the channel [00:01] ji0n has joined the channel [00:02] wirehead has left the channel [00:07] markstory has joined the channel [00:07] kenbolton has joined the channel [00:08] malkomalko has joined the channel [00:09] jacobolus has joined the channel [00:11] mikeal has joined the channel [00:11] jaket has joined the channel [00:14] dgathright has joined the channel [00:16] pHcF has joined the channel [00:17] skiz has joined the channel [00:17] bartek has joined the channel [00:17] __directory has joined the channel [00:17] bartek: Hi. How do I make node.js aware of npm packages? I installed socket.io via npm, but it just doesn't find it on require. [00:17] mcantelon has left the channel [00:18] isaacs: bartek: what version of node and npm? [00:18] isaacs: npm -v ; node -v [00:18] bartek: npm is 0.3.15, node is 0.4.2 [00:18] isaacs: npm get root [00:18] isaacs: wha'ts that output^? [00:19] bartek: First line: /usr/local/lib/node .. then it ends with ok [00:19] isaacs: export NODE_PATH=/usr/local/lib/node >> ~/.bashrc ; . ~/.bashrc [00:19] apoc has joined the channel [00:19] isaacs: er, put an "echo" in teh front of that [00:19] isaacs: echo export NODE_PATH=/usr/local/lib/node >> ~/.bashrc ; . ~/.bashrc [00:20] bartek: cool, thanks. [00:20] bartek: didndt see that documented, is it common? [00:20] bartek: Hmm, still complains about missing module [00:21] bartek: Nevermind, its another error [00:22] spaceinvader: it depends how you set up npm, for me it was fine out of the box [00:22] spaceinvader: with node installed to a prefix ~/node [00:22] gazumps has joined the channel [00:22] isaacs: bartek: the issue is that you've installed node using homebrew, most likely [00:22] bartek: I think I did, yes [00:22] bartek: What's wrong with that? [00:22] isaacs: bartek: and that does not set up node in a way to see /usr/local/lib/node in the default require.paths [00:23] isaacs: which npm 0.x relies on [00:23] bartek: Ah [00:23] isaacs: it's a bit different with npm 1.0. then you just install things locally to your project if you want to require() them, sorta like `npm bundle` in 0.x [00:23] isaacs: so everything's separated into its own little project. it's lovely. [00:23] bartek: Interesting, like virtualenvs in Python (if you've used it) [00:23] isaacs: somewhat similar, yes. [00:24] isaacs: i like to steal everything everyone likes. :) [00:24] bartek: hah, nice :) [00:24] bartek: Very cool [00:24] halfhalo: good man [00:24] isaacs: you can still install globally, but then it goes into $prefix/lib/node_modules [00:24] isaacs: that's important for bins to end up in your PATH [00:24] isaacs: but really should not be used for require()-able stuff [00:25] skiz: isaacs: what about something alongs the lines of a Gemfile in ruby? hehe [00:25] isaacs: skiz: yeah, it's "package.json" [00:25] skiz: I need to check that out :) [00:25] isaacs: skiz: write onna those, then do "npm install" and it'll install all the things in teh "dependencies" hash [00:25] isaacs: skiz: npm help json ; npm help developers [00:26] skiz: nice, figured that was just for packaged apps [00:26] blueadept has joined the channel [00:26] isaacs: skiz: well, a "package" is just a folder with a package.json in it. no one says you have to publish it :) [00:26] ryanfitz has joined the channel [00:27] skiz: ACTION goes to write one immediately [00:27] bradleymeck1 has joined the channel [00:27] tokumine has joined the channel [00:27] isaacs: in fact, you can even do "private":true in the package.json to avoid accidentally publishing it [00:27] dguttman_ has joined the channel [00:28] charlenopires has joined the channel [00:28] max_dev has joined the channel [00:29] chapel: thats nice isaacs [00:29] shiawuen has joined the channel [00:31] Booths_ has joined the channel [00:31] nuba has joined the channel [00:31] LukeGalea has joined the channel [00:33] fairwinds has joined the channel [00:36] xandrews has joined the channel [00:38] doubletap has joined the channel [00:39] doubletap has left the channel [00:40] dgathright has joined the channel [00:40] bartek: I'm running node on http://localhost:8001 with socket.io -- When I create a new socket on my client side and watch mt console, it tries to hit the url: http://http//localhost:8001:8000/........ for some reason - Why would this happen? [00:41] bartek: Basically following the example on socket.io [00:41] robhawkes has joined the channel [00:41] bartek: If I fix the url and go to it, I get some kind of hash result, so I think the server end is fine.. [00:42] derferman has joined the channel [00:42] devrim has joined the channel [00:44] modular has joined the channel [00:45] Jamool has joined the channel [00:45] copongcopong has joined the channel [00:46] c4milo1 has joined the channel [00:47] sveimac has joined the channel [00:48] tokumine has joined the channel [00:48] onr has left the channel [00:48] langworthy has joined the channel [00:49] jpld has joined the channel [00:49] pyrotechnick has joined the channel [00:49] pyrotechnick: ask my what's on my new tshirt [00:49] jimt has joined the channel [00:49] pyrotechnick: me* [00:50] pyrotechnick: motherlicking node.js biatches [00:50] pyrotechnick: http://ih0.redbubble.net/work.5821133.1.fig,asphalt,mens,fbfbfb.node-js-v3.jpg [00:52] ckknight_ has joined the channel [00:52] ParadoxQuine: must buy. now. [00:53] pyrotechnick: can u see the picture [00:53] pyrotechnick: http://www.facebook.com/pyrotechnick [00:54] tobym has joined the channel [01:01] bartek: So .. what's the right way to initiate Socket.IO on the client side? the example on the site doesnt work for me, and everyone seems to do a bit differently [01:01] bartek: Yay, got it [01:01] osserver has joined the channel [01:01] bartek: null, then port [01:03] joshthecoder: ACTION wants a node.js T-shirt :D [01:04] braddunbar has joined the channel [01:04] hij1nx has joined the channel [01:07] marcello3d has joined the channel [01:07] TooTallNate has left the channel [01:10] tbranyen: so pissed that i'm going to jsconf but not nodeconf [01:10] Druide_ has joined the channel [01:12] dgathright has joined the channel [01:14] marcello3d: tbranyen: I'm not going to either [01:14] abraxas has joined the channel [01:15] vilhonen has joined the channel [01:15] modular has joined the channel [01:16] marcello3d: no.de question [01:16] marcello3d: how do I get mongod to stay running even if it exits? [01:17] yozgrahame has joined the channel [01:18] jonpacke1 has joined the channel [01:18] Jamool: anyone know any geolocation packages/modules for node? [01:20] jonaslund: jamool: many of the databases comes as SQL data or can be importer there. So since node can talk to DB's you're set if you choose that path [01:21] jonaslund: or if you import the raw data it's mostly a matter of having a continious index [01:22] Jamool: i was just looking at the google maps api and it says that it can't provide real time location [01:22] bbttxu has joined the channel [01:22] Jamool: i am basically trying to get 2 individuals moving in realtime over a map [01:23] Jamool: pretty new to programming trying to make something for an architecture project [01:24] Jamool: if you know of any example of what you are talking about that would be great [01:24] marcello3d: that doesn't really make sense [01:24] marcello3d: node is on the server [01:24] tilgovi has joined the channel [01:25] marcello3d: the server isn't moving anywhere [01:25] marcello3d: unless you're trying to run node on your phone [01:25] marcello3d: which I'll assume you're not [01:26] Jamool: i was thinking of using socket.io as well [01:26] doubletap has joined the channel [01:26] doubletap has left the channel [01:27] marcello3d: https://secure.wikimedia.org/wikipedia/en/wiki/W3C_Geolocation_API [01:27] marcello3d: that's client-side geolocation [01:27] marcello3d: probably what you want [01:27] marcello3d: it'll give you the latitude/longitude [01:27] marcello3d: which you could pipe to the google maps api [01:28] Jamool: hmm thanks i will check that out [01:29] Charuru: actually there are probably server side tools for handling geolocation data? [01:31] postwait has joined the channel [01:32] devrim1 has joined the channel [01:32] devrim has joined the channel [01:33] Insanity5902 has joined the channel [01:35] marcello3d: Charuru: sure, IP geolocation, and latlon->address geolocation [01:35] marcello3d: but neither of those are particularly realtime [01:36] jonaslund: IP addr is prolly irrelevant with 3G-modems and such [01:36] Charuru: ahh ok, i don't work with geo data so not sure, i've heard of stuff though, mongodb also has a particular way of storing geodata that's probably better than any old way? [01:36] perlmonkey2 has joined the channel [01:37] jonaslund: i think it has 2d indexes [01:37] jonaslund: so you can do range querys [01:38] ryah: ACTION waves [01:38] pyrotechnick: ryah i got some node shirts [01:38] marcello3d: jonaslund: ip will still give you a general idea [01:38] pyrotechnick: theyre the bomb [01:38] Aikar: hey ryah, got a min for pm? wanna run an idea by you [01:38] marcello3d: jonaslund: and is your only option without asking for user permission [01:39] hornairs has joined the channel [01:39] jonaslund: marcello3d: atleast in sweden you could make agreements with the providers [01:39] ohtogo has joined the channel [01:39] jonaslund: marcello3d: if you noticed an IP from a provider and had an agreement with them you could query a server about the whereabouts of the machine [01:40] kersny has joined the channel [01:40] kersny has left the channel [01:40] Aikar: O.o [01:40] ryah: Aikar: sure [01:40] ryah: or you can call me [01:40] ryah: pyrotechnick: nice - what do they look like? [01:40] maushu: Is this like those bathroom thingies? [01:41] marcello3d: for a good time call... [01:41] samcday: lollies :p [01:41] zorzar_ has joined the channel [01:41] marcello3d: http://www.robandelliot.cycomics.com/archive.php?id=225 [01:41] pyrotechnick: http://dl.dropbox.com/u/21084952/Photo%20on%202011-04-08%20at%2010.51.jpg [01:41] Me1000 has joined the channel [01:41] pyrotechnick: ryah: http://dl.dropbox.com/u/21084952/Photo%20on%202011-04-08%20at%2010.51.jpg [01:42] ryah: sexy [01:42] marcello3d: ryah: and the shirt? ;D [01:42] shaunau: nice color [01:42] sh1mmer has joined the channel [01:42] Yuffster has joined the channel [01:42] zkirill has joined the channel [01:43] shaunau: can we buy them somewhere? (sorry late to the convo) [01:44] pyrotechnick: theyre on redbubble [01:44] Jamool: i do node graffiti [01:44] pyrotechnick: i got an orange one too [01:44] pyrotechnick: it's pretty bright but still nice [01:44] pyrotechnick: the green and white go real nice [01:44] shaunau: ok thanks [01:44] pyrotechnick: ill take a photo [01:45] pyrotechnick: just google "node redbubble" [01:45] shaunau: will do [01:45] Yuffster_work has joined the channel [01:45] shaunau: cheers [01:45] pyrotechnick: http://dl.dropbox.com/u/21084952/Photo%20on%202011-04-08%20at%2011.45.jpg [01:45] pyrotechnick: orange one [01:46] skm has joined the channel [01:47] marcello3d: it's backwards D: [01:47] zentoooo has joined the channel [01:47] pyrotechnick: yeah i know [01:47] samcday: pyrotechnick, where'd you get the shirt O.o [01:47] samcday: ACTION wants [01:48] pyrotechnick: http://www.redbubble.com/people/dmitrybaranovsk/t-shirts/5821133-node-js [01:48] samcday: Fantastic! Thank you :) [01:49] unomi: mhhm, should probably let it go through Ryah somehow, lets make him a billionaire so he only has to worry about churning out code and saving the world [01:49] pyrotechnick: yeah well if ry uploaded it id get it from him [01:49] pyrotechnick: i considered just uploading it myself and buying it from myself [01:49] pyrotechnick: but dimitry wrote something [01:50] tbranyen: purchasing said shirt right now [01:50] shaunau: what color is the other one? [01:50] pyrotechnick: theyre the color of nodejs.org [01:50] pyrotechnick: and then the orange one is like [01:51] pyrotechnick: orange [01:51] Aikar: anyone here good at C++ memory diagnostics? :( codes blowing up in msgpack library but that channel is super dead >< [01:51] pyrotechnick: but its a little brighter than on the website [01:51] Druide_ has joined the channel [01:51] shaunau: you can choose your own colors? not just predefined ones? [01:52] tbranyen: damnit credit card is in another room [01:52] pyrotechnick: nah just predefined [01:52] tbranyen: oooh paypal [01:52] pyrotechnick: they would have all the shirts in stock [01:52] tbranyen: yesss [01:52] brianmario has joined the channel [01:53] tbranyen: lazy mans cc [01:53] unomi: well, there you go ryah, go merchandise it up, from coffee cups to condoms [01:53] shaunau: wonder if its dark green.. [01:53] pyrotechnick: its sort of green [01:53] pyrotechnick: its mainly just grey though [01:53] pyrotechnick: almost the same color as the website [01:53] pyrotechnick: as close as ull get [01:53] shaunau: k [01:54] pyrotechnick: ahh dimitry makes raphael [01:54] unomi: 'evented IO, satisfaction guaranteed' I could see a Durex line there [01:54] pyrotechnick: which we've used in production [01:54] samcday: pyrotechnick, that' [01:54] pyrotechnick: so i figured he deserves it a little [01:54] samcday: that's kinda ironic :P [01:54] tbranyen: sweet ordered [01:54] pyrotechnick: samcday: what is [01:54] samcday: A developer of a JS framework making profit off a different JS framework [01:54] shaunau: i'm gyuessing its dark gray [01:54] pyrotechnick: im sure if ry did it himself people would get it from him [01:54] pyrotechnick: or joyent [01:55] pyrotechnick: but atm theres not many options and people obviously want em [01:55] pyrotechnick: u dont get that much out of redbubble anyway [01:55] pyrotechnick: cd ~ ; rm -Rf node ; git clone https://github.com/joyent/node.git ; cd node ; git checkout v0.4.5 ; ./configure ; make ; sudo make install [01:55] pyrotechnick: i now know that command off by heart [01:56] jtsnow has joined the channel [01:56] marcello3d: why do you remove it and download it again? [01:56] pyrotechnick: cuz of the checkout [01:56] pyrotechnick: makes me nervous [01:56] pyrotechnick: and the build [01:56] pyrotechnick: and all that shit [01:56] marcello3d: ... [01:56] pyrotechnick: makes me feel safer if i reclone it [01:57] marcello3d: do a git clean [01:57] pyrotechnick: would a reset HEAD —hard be good enough? [01:57] pyrotechnick: clean? [01:57] pyrotechnick: if u fix that command up ill make a npm [01:57] jimt has joined the channel [01:57] pyrotechnick: or can npm install new node? [01:57] marcello3d: it deletes untracked files [01:58] tbranyen: node.js really should have a store [01:58] marcello3d: try git clean -n to see what it'd delete [01:58] pyrotechnick: ok [01:58] pyrotechnick: also [01:58] pyrotechnick: homebrew is up to date aswell [01:59] pyrotechnick: if that's your kind of thing [01:59] marcello3d: alright. I out, bitches [01:59] marcello3d: I just do git pull [01:59] marcello3d: git checkout [01:59] marcello3d: ./configure;make;sudo make install [01:59] marcello3d: hasn't been a problem [01:59] chapel: if I could get a node.js coffee mug I would definitely buy one [01:59] chapel: one of the jumbo mugs [02:02] jimt has joined the channel [02:04] mike5w3c_ has joined the channel [02:04] konobi: ryah: how goes office hours? [02:04] ryah: good :) [02:05] ryah: i was very late [02:05] mscdex: chapel: heck yeah! [02:06] ohtogo has joined the channel [02:06] chapel: I mean, I could make my own [02:07] chapel: but it would be more fun to have an official source [02:07] chapel: ryah konobi get on that asap [02:08] sh1mmer has joined the channel [02:09] Insanity5902 has joined the channel [02:09] doubletap1 has joined the channel [02:09] warz has joined the channel [02:10] devrim1 has joined the channel [02:10] sh1mmer has joined the channel [02:11] Aikar: http://groups.google.com/group/nodejs-dev/browse_thread/thread/7a32a93d6781688f [02:12] Booths has joined the channel [02:12] Aikar: pyrotechnick: if you really wanna do all that, change ; to && so itll abort itself if any of the commands return an error [02:13] Aikar: but the compiler is smart about detecting source code changes [02:13] Aikar: keeping your copy around helps speed up recompiles [02:13] Aikar: specially v8 [02:14] Aikar: and you can skip ./configure unless ry actually updates configure to do more stuff [02:14] devrim has joined the channel [02:14] Aikar: so git pull && make && sudo makei nstall [02:15] jesusabdullah: I like running the config, if only to make sure everything's g2g [02:15] jesusabdullah: but that's just me [02:15] Aikar: note i said can and not should :P [02:15] jesusabdullah: NOPE [02:15] jesusabdullah: XD [02:16] Aikar: :( really wish i could get this code working [02:16] jesusabdullah: THIS WILL HAUNT YOU FOREVER [02:16] Aikar: this lib is a blocker for my main library ; ; [02:17] devrim1 has joined the channel [02:17] robhawkes has joined the channel [02:17] Aikar: https://github.com/aikar/wormhole/blob/master/src/wormhole.cc#L84 on this line, down in the msgpack callstack it blows up with a double linked list corruption :( [02:18] tfe_ has joined the channel [02:18] Aikar: ryah: is there any way to easily print to console from inside C++ land? printf doesnt seem to work [02:19] ryah: Aikar: printf should work [02:19] Aikar: odd O.o [02:19] ryah: try fprintf(stderr, ...) [02:19] samcday: I just std::cout << "Hello World!"; :P [02:20] ryah: cout..oh god [02:20] samcday: <3 [02:20] Aikar: that worked [02:20] samcday: Don't be hating on cout [02:20] ryah: i flinched when you msged that [02:20] piscisaureus: at least try cerr then :-) [02:20] ryah: ACTION likes office hours [02:21] samcday: Office hour Fridays! [02:22] Aikar: hmm well least i know its not the msgpack_to_v8 function thats crashing. i commented it out [02:22] ryah: mikeal just left, so it's just me in the office [02:22] samcday: Aikar, are you using gdb + node_g? [02:22] Aikar: so that means its literally something in the normal msgpack calls [02:22] ryah: Aikar: stdout fd is non-blocking [02:22] Aikar: no but my shell has decided to start printing a callstack on segfault w/o even running gdb lol... [02:22] ryah: if you're printing a ton of stuff it could be the buffer is full [02:22] samcday: o.O [02:22] ryah: and printf will return EAGAIN [02:23] ryah: check errno [02:23] Aikar: https://gist.github.com/9bf2d54215deb3fbcdf6 [02:23] Aikar: samcday: [02:23] Aikar: not sure how its doing that now [02:23] Aikar: it use to just print segfault [02:23] Aikar: oh [02:23] Aikar: maybe cause valgrind installed the libc debug ? [02:23] samcday: Yeah my libc does that sometimes too [02:23] doubletap has joined the channel [02:23] samcday: Not even sure if it's because of valgrind [02:24] samcday: But some random memory hiccups will do that [02:24] samcday: Others will just slap you in the face with a segfault [02:24] Aikar: i commented out the line that actually converts msgpack to v8 is why its returning null [02:24] samcday: You should use gdb though, then youi can jump frames [02:24] samcday: Examine locals, see what's going on [02:24] Aikar: problem is its dieing in msgpack official library :/ [02:24] samcday: Compile it with debug then [02:24] Aikar: and ive copied their example code almost to the T [02:24] Aikar: i wouldnt even really know how to fix it tho lol [02:24] samcday: You don't need to [02:24] samcday: If you can at least see their debug symbols [02:25] Aikar: http://wiki.msgpack.org/display/MSGPACK/QuickStart+for+C+Language [02:25] samcday: You can see where you're entering their lib, and with what data it's getting [02:25] samcday: I had the same issues with libgit2 [02:25] samcday: Seriously, gdb + node_g is god, if you compile your third party libs with debug too, you get a (mostly) full stack trace every time [02:26] samcday: There's usually a couple of lines of V8 voodoo that don't have symbols of course, but you get my point [02:26] Aikar: that gist i just pasted shows the variables im passing to the functions, and those look correct [02:26] Aikar: 26b53cd - 65523 - 9 [02:26] doubletap has left the channel [02:26] Aikar: buffer address - buffer length - length of data im copying into it [02:26] Cellvia has joined the channel [02:27] Aikar: and those functions arnt blowing up [02:27] samcday: Are you doing any of this stuff async [02:27] Aikar: no [02:27] Aikar: https://github.com/aikar/wormhole/blob/master/src/wormhole.cc#L84 [02:27] ryah: samcday: if you compile node with --gdb and run node_g with --gdbjit - you'll get full stacks [02:27] Aikar: theres the code [02:27] ryah: samcday: though the javascript code [02:27] Tug has joined the channel [02:27] samcday: ryah, :O *mind asplodes* Thank you :D! [02:28] jonaslund: argh [02:28] jonaslund: anybody who's used the webstorm ide ? [02:29] Aikar: /home/aikar/src/node/deps/v8/src/compiler.cc:801: error: 'name' was not declared in this scope [02:29] Aikar: i did ./configure --gdb [02:29] JianMeng has joined the channel [02:30] Emmanuel__ has joined the channel [02:30] samcday: Aikar, I couldn't actually get --gdb configure flag to work [02:30] samcday: I used --debug and it worked, and did the same thing [02:30] Aikar: ./configure --debug [02:30] Aikar: err [02:30] Aikar: wron window [02:30] samcday: Lol :P [02:30] msilverman2 has joined the channel [02:31] Aikar: weee fans running high on PC compiling! [02:31] Aikar: wow [02:31] Aikar: its really cranking the fan up O.o [02:31] ryah: samcday: oh, you need linux too [02:31] samcday: ryah To use jit? I'm using ubuntu so should be ok [02:32] Aikar: ubuntu here too [02:32] ryah: --debug --gdb [02:32] Aikar: oh need both? [02:32] Viriix has joined the channel [02:32] samcday: ryah: I was getting the same error Aikar is when I tried compiling node with --debug AND --gdb [02:32] Aikar: yeah i got the error twice when doing both [02:33] Aikar: /home/aikar/src/node/deps/v8/src/compiler.cc: In static member function 'static void v8::internal::Compiler::RecordFunctionCompilation(v8::internal::Logger::LogEventsAndTags, v8::internal::CompilationInfo*, v8::internal::Handle)': [02:33] ryah: hm, damn [02:33] Aikar: /home/aikar/src/node/deps/v8/src/compiler.cc:801: error: 'name' was not declared in this scope [02:33] ryah: maybe it's fallen out of sync [02:33] samcday: I tried a few weeks ago [02:33] Aikar: this is fresh checkout of master [02:33] ryah: mraleph: you here? [02:33] samcday: I dunno though - Ijst used --debug and I was using gdb + node_g fine. [02:33] samcday: ACTION attributes it to black magic, and that's ok with him [02:34] Aikar: how come make install is compiling even more stuff [02:34] ryah: ACTION tries too [02:34] Aikar: when make said nothing left to do [02:34] samcday: installing a whole other binary [02:34] samcday: node + node_g = party [02:34] Aikar: shouldnt that binary of been compiled on make? [02:34] sleeplessinc has joined the channel [02:35] Aikar: i dont set JOBS=4 on make install lol [02:35] samcday: ACTION shrugs [02:35] Aikar: i really need to set that in bashrc [02:35] ryah: ACTION gets the error too [02:35] ryah: sucks. [02:36] Yuffster has joined the channel [02:36] samcday: Indeed! What does --gdb do that --debug doesn't though? I was still getting full Node + V8 symbols in GDB with just --debug. [02:36] Aikar: how do you do "gdb node blah.js" ? [02:36] Aikar: says blah.js isnt a core dump [02:36] samcday: gdb --args node_g balls.js [02:37] ryah: ACTION tries to fix it.. [02:37] samcday: Or just gdb node_g then key in `run balls.js` at the gdb shell [02:37] Aikar: Program received signal SIGSEGV, Segmentation fault. [02:37] Aikar: _int_malloc (av=0x7ffff682ee40, bytes=8248) at malloc.c:4628 [02:37] Aikar: 4628 malloc.c: No such file or directory. in malloc.c [02:37] Aikar: lol... ? [02:37] samcday: Type bt [02:37] Aikar: i know, but why is malloc.c 404? [02:38] Aikar: but i got same stack trace i got before. codes not crashing in V8 [02:38] samcday: No clue :P [02:38] samcday: The difference is now while you're in gdb [02:38] Aikar: https://gist.github.com/909179 [02:38] samcday: you can jump to the frame in static Handle GetResult(const Arguments &args) { [02:38] samcday: And start printing stuff, see what you have [02:39] Aikar: ACTION is a gdb noob :( [02:39] samcday: frame 5 [02:39] samcday: print [02:39] Aikar: wtf [02:39] Aikar: oh [02:39] Aikar: says src file is more recent than executable [02:39] Aikar: but thats true, i added new debug i printfs i havent compiled yet [02:39] samcday: Well [02:39] samcday: your line numbers will be out of sync [02:39] samcday: So shit will be whack :p [02:40] yozgrahame has joined the channel [02:40] ryah: ACTION fixed it [02:41] samcday: Yey! [02:41] samcday: I have a question actually, hoping someone can help. If I use http.get and pass in a Connection: keep-alive header, it seems that my node app won't exit when I'm done - presumably because the http connection is still open to the server. How do I close it? [02:42] Aikar: samcday: ok i tried to help data to find myself, but kinda overwhelmed lol.. so how do i view args to a call? [02:42] ryah: https://gist.github.com/909185 [02:42] samcday: Well Aikar [02:42] samcday: If you're in a frame [02:42] Aikar: ryah: having to patch v8s code? lol [02:42] samcday: You just do print [02:43] unlink has joined the channel [02:43] samcday: ryah: You make it look so easy ;D [02:44] willwhite has joined the channel [02:44] Aikar: ugh this sucks [02:44] Aikar: i really want this module to be done so i can release it [02:45] Aikar: but seems like msgpack irc community is dead, lemme see if they use forums [02:46] samcday: Aikar: maybe you should just try a small test of msgpack in a standard binary first [02:46] samcday: Using the same input you're invoking from node script [02:46] Aikar: it works ok 2 times [02:46] Aikar: its ALWAYS the 3rd attempt [02:47] samcday: Weird :p [02:47] Aikar: the streaming api works in a way you keep feeding it buffers, it gives you data back once it decodes something completely [02:47] samcday: Respamming a question from earlier, someone help me fix it so I can make my node script clone the node git repository natively :P I have a question actually, hoping someone can help. If I use http.get and pass in a Connection: keep-alive header, it seems that my node app won't exit when I'm done - presumably because the http connection is still open to the server. How do I close it? [02:47] Aikar: so i feed it, then call the get esults function [02:47] Yuffster_ has joined the channel [02:47] Aikar: its on the 3rd feed, the getResult segfaults [02:48] Aikar: samcday: client.end() ? [02:48] samcday: is client returned from http.get or something? [02:49] samcday: I tried that and it didn't seem to work [02:49] samcday: looked like http.Agent was insisting on keeping the connections open or something [02:50] Aikar: http.get({}, f(req) { req.end(); }); ? [02:50] Aikar: oh keep alive hmm [02:51] copongcopong has joined the channel [02:51] samcday: Yeah and I have to use keep-alive, since I'm pulling a bunch of loose objects off github, I tried not using keepalive and cloning a repo took 3x longer [02:52] fr0stbyt3 has joined the channel [02:52] fr0stbyt3: does node-forever start on reboot? [02:52] Aikar: // TODO currently we never remove agents from this hash. This is a small [02:52] Aikar: // memory leak. [02:52] Aikar: thats never a good comment to find! [02:53] samcday: Aikar, hahaha agreed : [02:53] samcday: :P [02:53] samcday: Meh I'll look at it again later. I gotta jet. Good luck with your msgpack stuff Aikar :D [02:55] Aikar: i wish i knew how to fix it [02:55] Aikar: i guess ima have to try downgrading msgpack [02:55] ryah: Aikar: pgries has a msgpack lib [02:55] Aikar: but i checked the changelog and nothing major changed [02:55] Aikar: ryah: yeah i know but his is the basic imp, im trying to implement the new streaming API [02:56] Aikar: ive updated his for node .3.x already [02:56] Aikar: but under heavy data flow it can just get backed up [02:56] ryah: ah [02:56] Aikar: so streaming should solve that problem [02:56] Aikar: just i cant get it working :/ [03:00] seivan has joined the channel [03:00] dnolen has joined the channel [03:00] pyrotechnick: what msgpack are you usingh? [03:01] Aikar: msgpack.org [03:02] Aikar: official lol [03:02] Aikar: latest C lib [03:03] Aikar: init unpacker, init result, on data -> (reserve buffer, copy to buffer, inform msgpack length of data you copied into it, msgpack_unpacker_next(result), read data from result if it returned true) > repeat, destroy unpacker and result [03:04] Aikar: thats the steps the C demo shows, thats what im doing [03:04] pyrotechnick: do u have bindings [03:05] mscdex: i wish javascript had named capture groups for regexp [03:05] mscdex: :( [03:05] pyrotechnick: it can [03:05] pyrotechnick: theres a lib [03:05] pyrotechnick: xregexp i think its called [03:05] pyrotechnick: http://xregexp.com/ [03:05] pyrotechnick: i dunno how ull go in node but it works in the browser [03:05] pyrotechnick: pretty sure ive used it in node before [03:05] pyrotechnick: without much trouble [03:05] Aikar: pyrotechnick: https://github.com/aikar/wormhole/blob/master/src/wormhole.cc#L84 [03:06] pyrotechnick: cool man [03:06] pyrotechnick: what do you need help with? [03:06] tbranyen: its even resig approved! [03:06] doubletap1 has joined the channel [03:06] sleeplessinc has joined the channel [03:06] Aikar: so i do in js> wormhole = new Wormhole() to give each stream its own unpacker, then wormhole->unpack(data) really shoulda named that feed [03:06] Aikar: then call wormhole->getResult(); [03:06] mscdex: pyrotechnick: yeah i was already looking at that, but it's nicer to have it native [03:06] Aikar: pyrotechnick: it segfaults in msgpacks code [03:06] mscdex: :/ [03:06] pyrotechnick: :( [03:07] pyrotechnick: msddex submit a patch try get it into v8 or node :p [03:07] Aikar: git clone that, make, then do node examples/wormhole.js and type #'s to stdin [03:07] mscdex: parsing ftp directory listings is a pita [03:07] pyrotechnick: it would be nicer if it was native yes [03:07] pyrotechnick: ok aikar [03:08] pyrotechnick: do i need msgpack lib or anything? [03:08] Aikar: no its bundled [03:08] pyrotechnick: cool [03:08] Aikar: note ive been told the format used in that makefile didnt work on debian, i fixed another makefile in a diff project havent fixed this one [03:08] Aikar: but works on ubuntu... [03:09] pyrotechnick: yeah doesnt work on osx [03:09] kmwallio has joined the channel [03:09] pyrotechnick: ../src/wormhole.cc:24:20: error: endian.h: No such file or directory [03:09] pyrotechnick: Waf: Leaving directory `/Users/pyrotechnick/wormhole/build' [03:09] pyrotechnick: Build failed: -> task failed (err #1): [03:09] pyrotechnick: {task: cxx wormhole.cc -> wormhole_1.o} [03:09] pyrotechnick: endian [03:09] Aikar: ... osx doesnt have endian.h? [03:09] pyrotechnick: lol [03:09] pyrotechnick: not sure [03:10] Aikar: am i allowed, being an anti apple person, to say screw macosx >_>? [03:10] Aikar: linuxonry! [03:11] mhooker has joined the channel [03:11] pyrotechnick: yeah man [03:11] Aikar: thats a diff and prolly not to hard to solve problem [03:11] pyrotechnick: if you have some kind of valid argument then sure [03:11] pyrotechnick: like for instance if endian actually isnt on osx [03:11] pyrotechnick: then by all means [03:11] Aikar: im sure theres a diff way to do it on osx [03:11] pyrotechnick: make a statement and let osx people deal with it if they want your library [03:11] Aikar: actually [03:11] Aikar: delete that line [03:11] Aikar: im not using endian anymore [03:11] Aikar: that was from my old implementation [03:11] pyrotechnick: push it [03:11] pyrotechnick: its friday man [03:12] vahe has joined the channel [03:12] pyrotechnick: i dont go source diving on fridays [03:12] Aikar: ive got a shit ton of other debug lines im working with right now lol [03:12] pyrotechnick: too much canadian club [03:12] Aikar: nano src/wormhole.cc ! [03:12] Aikar: ctrl K [03:12] pyrotechnick: nano [03:12] Aikar: yes nano [03:12] Aikar: i sport my nano [03:12] pyrotechnick: nah man not nano [03:12] pyrotechnick: like its ok [03:13] Aikar: its ok for what its used for, quick on the server editing :P [03:13] pyrotechnick: but it doesnt excite me [03:13] dgathright has joined the channel [03:13] hasenj has joined the channel [03:14] pyrotechnick: ok [03:14] pyrotechnick: i got a server [03:14] pyrotechnick: telnet? [03:14] Aikar: no its just a client connected right back to itself, type 3 [03:14] Aikar: then type it more times lol [03:14] pyrotechnick: wats a code [03:14] pyrotechnick: for some shit [03:14] pyrotechnick: never used msgpack [03:14] doubletap1 has left the channel [03:15] pyrotechnick: i see [03:15] pyrotechnick: thats cool man [03:15] Aikar: this isnt directly feeding to msgpack, its using mp to encode JS objects [03:15] Aikar: then decode on server, and then respond back [03:15] Yuffster has joined the channel [03:15] Aikar: now, the goal is to not crash on 3rd msg :| [03:15] Aikar: are you segfaulting? [03:15] Aikar: after 2nd msg [03:16] jonpacke1 has joined the channel [03:17] Aikar: pyrotechnick: ^ [03:17] Aikar: if its not segfaulting for you it could be a bug with mp on ubuntu [03:18] pyrotechnick: its not [03:18] Aikar: you can continously type #s in it? [03:18] pyrotechnick: yes [03:18] Aikar: mf :( [03:19] pyrotechnick: osx wins again [03:19] Aikar: well makes me feel good that it looks like ive successfully implemented it on first try! [03:19] Aikar: too bad i cant freaking use/test it [03:19] Aikar: anyone else got other distros who can test? [03:20] Aikar: namely Debian (to see if its very specific to ubuntu or debian in general) [03:20] Me1000 has joined the channel [03:24] yozgrahame has joined the channel [03:26] robhawkes has joined the channel [03:27] skm has joined the channel [03:27] Aikar: fixed makefile endian.h require [03:28] MikhX has joined the channel [03:28] raz: hmm how do you guys go for serving compressed javascript/css in express (or anything else)? [03:28] doubletap1 has joined the channel [03:28] raz: i see uglifyjs, but haven't found anything to tie it in yet [03:29] Aikar: too bad i cant freaking use/test it [03:30] xandrews has joined the channel [03:37] Spion__ has joined the channel [03:37] tobym has joined the channel [03:38] wdbl has joined the channel [03:42] c4milo1 has left the channel [03:44] asdfsafdsa: raz: assets manager [03:44] raz: asdfsafdsa: thx! [03:44] Knio has joined the channel [03:45] wdbl: I got the answer to my question before I even asked it. You guys are good. [03:45] mscdex: wooo cloning chromium git repo [03:45] mscdex: this oughta take awhile [03:45] mscdex: :P [03:46] zemanel has joined the channel [03:49] stonecobra has joined the channel [03:49] ryanfitz has joined the channel [03:50] JulioBarros has joined the channel [03:53] Aria has joined the channel [03:53] sirkitree has joined the channel [03:58] Me1000 has joined the channel [04:01] sirkitree has joined the channel [04:03] WRAz has joined the channel [04:04] sub_pop has joined the channel [04:04] sechrist has joined the channel [04:11] sor3nsen has joined the channel [04:12] rednul has joined the channel [04:15] jpld has joined the channel [04:15] jpld has joined the channel [04:20] stonecobra has joined the channel [04:22] ralphholzmann has joined the channel [04:23] langworthy has joined the channel [04:25] zcopley has joined the channel [04:26] davemo has joined the channel [04:30] timcosgrove has joined the channel [04:32] timcosgrove has left the channel [04:40] wilmoore has joined the channel [04:40] darshanshankar has joined the channel [04:42] Swimming_bird has joined the channel [04:49] f1lt3r_ has joined the channel [04:52] mikeal has joined the channel [04:56] SamuraiJack has joined the channel [04:57] tjgillies: using bodyparser req.body is returning undefined [05:05] meso has joined the channel [05:08] mscdex: poll: if you were retrieving a directory listing from an ftp site using a module, would you rather the module: a) buffer the listing, b) return an EventEmitter, or c) execute the callback for each dir. entry with a terminator argument? [05:09] yozgrahame has joined the channel [05:10] ph^ has joined the channel [05:11] rednul has joined the channel [05:13] skm has joined the channel [05:13] bentkus has joined the channel [05:14] seivan has joined the channel [05:15] mike5w3c has joined the channel [05:18] ryah: mscdex: i think return eventemitter [05:18] ryah: call it iterator - iter.on('file', function(f) {}) [05:19] Spion_ has joined the channel [05:19] yozgrahame has joined the channel [05:19] mikeal has joined the channel [05:20] tjgillies: oh req.body is for post req.query is for get it looks like [05:20] hij1nx has joined the channel [05:21] k1ttty has joined the channel [05:24] k1ttty has joined the channel [05:25] doubletap has joined the channel [05:25] doubletap has left the channel [05:27] pquerna: so, spdy [05:28] dans_ has joined the channel [05:28] dans__ has joined the channel [05:30] ryah: pquerna: i was just going to tweet about that [05:30] ryah: i want it in core! [05:31] harth has joined the channel [05:31] ryah: (although i should probably restrain myself from that impulse [05:32] ryah: need a good zlib binding [05:32] Bonuspunkt has joined the channel [05:32] saikat_ has joined the channel [05:32] ryah: (with shared dictionaries) [05:32] pquerna: right [05:33] ryah: we need a good zlib in core, i'm coninced [05:33] ryah: spdy can probably exist outside core [05:33] pquerna: just depend on zlib, or did you have something else in mind? [05:34] ryah: we're already linking to it [05:34] ryah: % ldd `which node`| grep libz [05:34] ryah: libz.so.1 => /lib/libz.so.1 (0x00007fc2c89ac000) [05:34] pquerna: right, openssl will link it on most platforms anyways [05:34] ryah: (if you'e compiled openssl with compression - it comes from the pkg-config [05:35] doubletap has joined the channel [05:35] tfe_ has joined the channel [05:35] tfe_ has joined the channel [05:35] ryah: yeah, i would imagine so [05:35] pquerna: https://github.com/dankogai/js-deflate [05:35] ryah: nah, it should be in C [05:36] pquerna: always wonder though if the jit will just crush the C one someday :) [05:36] ryah: no [05:36] pquerna: well, its the border thing [05:36] pquerna: copying bytes in/out [05:36] ryah: oh, including the border jumping - maybe [05:37] ryah: there's probably some size threshold over which it makes sense [05:37] ryah: i wonder where http headers fall [05:37] tbranyen: 1:40am check, screaming baby downstairs check, can't sleep now check [05:38] samsonjs has joined the channel [05:38] ryah: i need more hours in the day [05:38] tbranyen: let me introduce you to the screaming baby, he'll keep you up even when you know you need sleep [05:39] coreb has joined the channel [05:40] pquerna: you know what sucks about making an app not-memory bound anymore [05:40] pquerna: now its mysql-bound :( [05:40] mjr_ has joined the channel [05:42] pquerna: http://www.mnot.net/blog/2011/04/04/http_post [05:42] ryah: pquerna: client side or mysql-side? [05:43] ryah: mysql-clinet or msyql? [05:44] mike5w3c_ has joined the channel [05:44] pquerna: mysqld side [05:47] micheil has joined the channel [05:47] Swimming_bird has joined the channel [05:50] tilgovi has joined the channel [05:51] xastey has joined the channel [05:52] datapimp has joined the channel [05:53] Emmanuel__ has joined the channel [05:53] Clooth has joined the channel [06:03] mike5w3c has joined the channel [06:03] marlun has joined the channel [06:03] marlun has joined the channel [06:05] phiz has joined the channel [06:05] davidwalsh has joined the channel [06:07] wilken has joined the channel [06:09] ryah: pow.cx - woah [06:09] ryah: missed that [06:11] teemow has joined the channel [06:12] flippyhead_ has joined the channel [06:12] __tosh has joined the channel [06:12] egor has joined the channel [06:18] konobi: ryah: pow does some interesting DNS/Resolver hacks [06:18] zpao_ has joined the channel [06:20] ryah: yeah? [06:21] patzak has joined the channel [06:22] muhqu has joined the channel [06:22] mike5w3c has joined the channel [06:23] ph^ has joined the channel [06:23] derferman has joined the channel [06:24] dcelix has joined the channel [06:24] christophsturm has joined the channel [06:26] bnoguchi has joined the channel [06:26] beawesomeinstead has joined the channel [06:26] beawesomeinstead has joined the channel [06:33] konobi: ryah: /etc/resolver/* [06:33] joshthecoder: ryah someone needs to port that for node :) [06:33] konobi: you can direct specific search domains (.dev) to specific name servers [06:33] konobi: in this case, they run one locally [06:35] konobi: http://serverfault.com/questions/22419/set-dns-server-on-os-x-even-when-without-internet-connection [06:36] LadyGaga has joined the channel [06:36] Madonna has joined the channel [06:36] joshthecoder: oh wait this is written in node :D [06:36] joshthecoder: figured it would have been ruby [06:37] Madonna: I'm so excited for node.js right now! :) [06:37] mikedeboer has joined the channel [06:39] coreb: Madonna: nice [06:40] Madonna: How many cloud node.js hosts are there out now? [06:41] unfo-: idk. i host mine in a micro instance on ec2 [06:41] jetienne has joined the channel [06:42] fr0stbyt3: how much does that run you unfo- [06:42] matjas has joined the channel [06:42] unfo-: fr0stbyt3, 0 atm since they had a campaign that got me a free micro instance for a year as a new customer :D [06:42] unfo-: i dunno if the offer is still open [06:42] joshthecoder: nice [06:42] fr0stbyt3: vnice [06:43] joshthecoder: does that include unlimited i/o ? [06:43] joshthecoder: :) [06:43] unfo-: no :) [06:43] pyrotechnick has left the channel [06:43] unfo-: but i use it for a simple url logging node.js irc bot so my io is quite small :D [06:43] mjr_: You can get a free instance for a while on ChunkHost: http://chunkhost.com/ [06:43] mjr_: Or sign up for no.de, of course. [06:44] V1 has joined the channel [06:44] mjr_: 600GB/month is quite a lot of xfer for $19 [06:45] TomY_ has joined the channel [06:45] unlink has joined the channel [06:45] qFox has joined the channel [06:45] Madonna: What's the value-add of going with a node-specific cloud host when it's so easy to setup node yourself? [06:45] samcday: joshthecoder, There's also duostack [06:46] samcday: Madonna, infrastructure [06:46] mjr_: The value add with no.de is that it is the Joyent platform with super great analytics and the node core people behind it. [06:46] skm has joined the channel [06:46] samcday: Unless you happen to have a few rack servers lying aorund in a datacenter [06:46] fangel has joined the channel [06:46] joshthecoder: nodester is interesting [06:46] samcday: joshthecoder, I've been on the waiting list fvor that for 4 months now ;< [06:47] mikeal has joined the channel [06:48] Madonna: samcday: Which I do [06:48] samcday: Madonna, Oh, well then have fun ^_^ [06:49] Madonna: :) [06:49] hornairs has joined the channel [06:51] yozgrahame has joined the channel [06:52] Emmanuel__ has joined the channel [06:53] jesusabdullah: jetienne: Was that you that made the jquery qr code thing? [06:53] jesusabdullah: jetienne: If so, looks good [06:53] ajnasz has joined the channel [06:57] jetienne: jesusabdullah: yep it is me. thx :) [06:57] samcday: woah, I only just noticed tim caswell's thingy on nodeconf.com [06:59] jesusabdullah: I just happened to see it while checking out the front page of HN in between thesis edits [06:59] mike5w3c has joined the channel [06:59] jesusabdullah: I kinda wish I had a smartphone just so I could be in the QR club [07:00] Croms has joined the channel [07:00] mike5w3c has joined the channel [07:01] jesusabdullah: Maaan, I just realized that there's a brainless thesis thing I need to do, and that tonight would be perfect [07:01] jesusabdullah: >_< [07:01] jesusabdullah: Ah, the realization that there's more work to do [07:02] mscdex: there's a labview workstation calling your name [07:02] jesusabdullah: lol [07:02] jesusabdullah: naw, LaTeX [07:02] jesusabdullah: Actually, no labview in my thesis [07:02] jesusabdullah: Used Campbell's kit instead [07:02] mscdex: this is madness! [07:02] jesusabdullah: PC200W! [07:02] jesusabdullah: Luckily, pre-coded [07:03] newy_ has joined the channel [07:03] groom has joined the channel [07:03] mscdex: i think i used labview maybe once the whole time i was in college [07:03] mscdex: heh [07:03] bergie has joined the channel [07:04] jesusabdullah: *nod* [07:04] jesusabdullah: I tried to encourage my students to look at and improve my VIs [07:04] jesusabdullah: Turns out none of them like LabVIEW *either* [07:04] jesusabdullah: >_< [07:04] Kiba: ACTION sets up his server and everything [07:04] Kiba: but then I realized.... [07:04] jesusabdullah: Do you realize...woowoooo [07:04] Kiba: my client was connecting to local! [07:04] zentoooo has joined the channel [07:05] mscdex: the whistles go wooooo [07:05] jesusabdullah: That you have the most...beautiful server! [07:05] Kiba: lol [07:05] jesusabdullah: ahaha, whistle tips! [07:05] mscdex: :-D [07:05] jesusabdullah: I didn't get to actually see/hear whistle tips. Was almost bummed! [07:06] mscdex: oh, you haven't seen this?: http://www.youtube.com/watch?v=h121VfLPsDo [07:07] jesusabdullah: If it's what I think it is, I have [07:07] mscdex: heh [07:07] jesusabdullah: aww yeah [07:07] jesusabdullah: See, I was *in* Oakland in December [07:08] mscdex: ah, that news story is from 2003 or something, i thought maybe those things would have been gone by now [07:08] mraleph1 has joined the channel [07:09] jesusabdullah: "It was being installed on their car." [07:09] jesusabdullah: Yeah, i have no idea. I didn't hear any, but I was also on the better side of town [07:09] jesusabdullah: I want to put a whistle tip in MY car, if only for a little bit [07:10] jaket has joined the channel [07:10] jesusabdullah: Ah, whistle tips are illegal now [07:11] tbassetto has joined the channel [07:15] mjr_: I lived in Oakland both then until very recently. [07:15] mjr_: And the whistle tips were indeed a serious issue. [07:15] mjr_: I was trippin' [07:15] jetienne: q. i need a small script which reload my node.js server everytime i do a modification in the source. any recomendation ? [07:16] Kiba: self.ws = new WebSocket('ws://jstet.kibabase.com:7000'); [07:16] Kiba: hmm [07:17] Kiba: I tried to initialize a websocket and connect to my game server [07:17] Kiba: but I am not quite getting there [07:18] jetienne: Kiba: websocket are hard... try easywebsocket :) [07:19] samcday: jetienne, https://github.com/fgnass/node-dev worked well for me [07:19] Kiba: jetienne: they're not hard! [07:19] jetienne: samcday: thx trying [07:20] jetienne: Kiba: relax it was just a joke because i run http://easywebsocket.org [07:20] mscdex: Kiba: that looks right, what are you using for the backend? [07:20] Kiba: mscdex: ah! [07:21] Kiba: fixed my bug [07:21] skohorn has joined the channel [07:21] Kiba: silly me [07:21] mscdex: heh :) [07:22] Kiba: http://jstet.kibabase.com/jstet.html [07:22] Kiba: hmm [07:23] jetienne: samcday: it doesnt seem to work here... "node-dev server.js" is what i should do correct ? just to be sure [07:23] samcday: Yeah that's what worked for me ... [07:23] samcday: jetienne, what OS? [07:23] Kiba: I see that somebody connected! [07:23] Kiba: click JOin [07:23] jetienne: samcday: hmm ok. linux ubuntu stable [07:23] Kiba: wow! [07:23] samcday: That's what was working for me o.O [07:23] Kiba: somebody playing my game O.O [07:23] jetienne: samcday: lucky you :) [07:24] Kiba: ACTION is overly excited [07:24] Kiba: :D :D :D :D :D :D :D :D :D :D :D :D :D [07:24] BigWookie: Hi, i try to compile nodejs on my n900 but tmpdir runs full... and I can't change it [07:24] Kiba: NO! [07:24] ckknight|2 has joined the channel [07:24] Kiba: ACTION hit refresh instead of enter [07:25] Kiba: if you're stuck, refresh [07:26] Kiba: wow [07:26] Kiba: anyway [07:26] Kiba: thanks for those who experiment with it [07:27] mattp_ has joined the channel [07:28] raphdg has joined the channel [07:29] mscdex: Kiba: you should have a way to drop the piece to the bottom right away, ala space bar or whatever [07:29] Kiba: mscdex: well, I got other bugs to fix though [07:30] sag3 has joined the channel [07:30] meandi2 has joined the channel [07:30] __tosh has joined the channel [07:30] mscdex: ok :) [07:32] [AD]Turbo has joined the channel [07:32] philhawksworth has joined the channel [07:33] newy_ has joined the channel [07:33] philhawksworth has left the channel [07:34] jonpacke1 has joined the channel [07:35] mAritz has joined the channel [07:38] dgathright has joined the channel [07:42] Kholo has joined the channel [07:43] [AD]Turbo: hi there [07:43] sechrist_ has joined the channel [07:44] ivanfi has joined the channel [07:45] TomsB has joined the channel [07:45] sveimac has joined the channel [07:45] MaxguN has joined the channel [07:47] bzinger has joined the channel [07:47] BigWookie has left the channel [07:48] msucan has joined the channel [07:48] bzinger has joined the channel [07:50] sechrist has joined the channel [07:50] d0k has joined the channel [07:51] mikedeboer has joined the channel [07:52] bzinger has joined the channel [07:54] bergie has joined the channel [07:54] dgathright has joined the channel [07:57] kal-EL_ has joined the channel [07:59] MaxguN has joined the channel [08:00] jeremyselier has joined the channel [08:00] tbassetto has joined the channel [08:01] tommoor has joined the channel [08:01] mc_greeny has joined the channel [08:01] pkrumins has joined the channel [08:01] pkrumins: is npm server down? [08:02] Druide_ has joined the channel [08:04] SamuraiJack has joined the channel [08:07] pkrumins: yeah npm is down. [08:08] Kiba: ACTION should hang out more and learn a lot more  [08:08] Kiba: hmm [08:08] flippyhead_ has joined the channel [08:08] Kiba: I need to acquire knowledge on computer science too! [08:08] mikl has joined the channel [08:08] mikl has joined the channel [08:08] Kiba: all I know is how to program [08:08] pkrumins: screw computer science [08:08] Kiba: but not how to analyze algorithms and data structure [08:08] pkrumins: it's unnecessary [08:08] Kiba: unnecessary? [08:09] littke has joined the channel [08:09] _krs_ has joined the channel [08:09] _krs_: hello [08:10] _krs_: I'm using node v0.4.5 and my problem is an unexpected http status code: [08:10] christophsturm has joined the channel [08:11] _krs_: http://pastebin.com/EMJ9erp6 [08:11] doubletap has joined the channel [08:11] _krs_: The client tries to fetch a url that does return a 404 - but nodejs pretends it's 200 [08:12] ryah: really? how to reproduce? [08:12] ryah: are you sue it actually is sending 404? [08:12] _krs_: yes, curl reports it [08:12] _krs_: but wait, I'll paste a full example [08:13] jesusabdullah: It depends on what you mean by "computer science." A bachellors in CS teaches you programming and algorithms and stuff, but you can learn a lot of the real-world stuff on your own and/or in the field [08:14] Kiba: I don't know anything about aglorithm [08:14] jesusabdullah: research-grade CS is tougher, but may not actually be your deal. I mean, have you *read* a CS research paper? Shit's intense. [08:14] jesusabdullah: Well, can you program Kiba? [08:14] Kiba: yes [08:14] pkrumins: ryah: do you have control over npm server(s)? something is down, if you do npm ls or npm install xxxx, it just hangs and then reports that Error: ETIMEDOUT, Connection timed out [08:14] jesusabdullah: Then you're probably good! Algorithms just means "way to solve some particular problem" so, when you come against that problem, do some googling and asking around and you should hit on the right one [08:14] jesusabdullah: imo [08:15] beejeebus has joined the channel [08:15] _krs_: http://pastebin.com/GWsKmrzJ [08:15] pkrumins: yeah no computer science necessary [08:15] pkrumins: computer science is buzz word [08:15] Kiba: well [08:15] jesusabdullah: There are plenty of people with BS's in CS that are pretty rubbish at programming, and plenty of physics and engineering majors that are pretty good at programming. [08:15] Kiba: I meant aglorithm and stuff [08:15] _krs_: wow, bad example, there should be a trailing slash in the url [08:16] _krs_: curl -i http://www.hudora.de/this_is_a_404/ [08:16] _krs_: HTTP/1.1 404 NOT FOUND [08:16] jesusabdullah: I don't think there's a secret algorithm sauce, really. [08:16] jesusabdullah: I may be wrong! [08:16] pkrumins: there isnt [08:16] _krs_: nodejs: statusCode: 200, [08:16] karboh has joined the channel [08:17] doubletap1 has joined the channel [08:17] jesusabdullah: Most of it is either particular to your problem, or just general ways to go about things in whatever system you're working with. [08:18] jesusabdullah: So, like, in LabVIEW, you end up learning about state machines because until recently, it was pretty much the only reasonable way to write a lot of stuff. [08:18] jesusabdullah: They have events now, so that's a lot better [08:18] Kiba: I am going to write a RTS game [08:18] jesusabdullah: Or, if you're implementing grep, then there's a specific algorithm that makes it uber fast [08:19] jesusabdullah: but then you read a bunch about how to implement grep, y'know? [08:19] _krs_: jesusabdullah: do you read the freebsd-current list? :) [08:19] jesusabdullah: Or, if you're trying to write an RTS, then you'll end up reading about good algorithms for implementing AIs, or whatever you need [08:19] jesusabdullah: _krs_: I don't! I never really got into the BSDs [08:19] Kiba: I won't be implementing AIs [08:19] Kiba: my game [08:20] Kiba: is heavily based on autonomous units [08:20] _krs_: jesusabdullah: there was a thread about speeding up grep recently [08:20] jesusabdullah: huh [08:20] jesusabdullah: Cool! [08:20] Kiba: speeding up grep is cool? [08:20] jesusabdullah: I just knew that grep was one of those ones that people talk about because it's been pretty well optimized for speed [08:20] jesusabdullah: lots of leet haxxx there [08:20] jesusabdullah: Kiba: If you like algorithms :) [08:20] Kiba: ACTION doesn't know anything about algorithms [08:21] Kiba: I did computer science in high school [08:21] jesusabdullah: Like I said, algorithms aren't a secret sauce. It's just basically a method for doing something [08:21] Kiba: I learned the sorting algorithsm..but I can never remember them when I go work on my projects [08:21] jesusabdullah: That's fine though Kiba, because you don't need to implement them yourself. [08:22] jesusabdullah: You don't learn algorithms so that you can re-implement quicksort. You learn them so that you have a general idea for how to tackle problems. [08:22] _krs_: can anybody reproduce the status code 200 for responses that are actually 404? [08:22] Kiba: jesusabdullah: my teacher just teach us a bunch of sorting algorithms and we don't do anything more than that [08:22] Kiba: no, it was mostly a "beginner programming" class [08:23] jesusabdullah: Kiba: The take-home message is basically this: Some ways of solving a problem are faster than others. Some of them are only faster some of the time. [08:23] Kiba: ACTION never needs to optimize his code yet [08:23] jesusabdullah: Sometimes you implement a more complex algorithm because it takes less steps in the long run. [08:23] jesusabdullah: Sometimes you implement an algorithm whose worst-case runtime is pretty long, but has a nice average. [08:24] jesusabdullah: For example: For "linear programming," which is a type of optimization problem, the simplex algorithm is really common because it has a pretty good average runtime, and is well-understood. [08:25] jesusabdullah: There are other algorithms that do the same thing with a *much* better worst-case runtime, but tend to not do as well as the simplex algorithm in the Real World. [08:25] jesusabdullah: But of course, in the Real World you're not going to write your own simplex method. You're gonna use a package some other people wrote that implements it, and then pass it your particular problem. [08:25] mc_greeny has joined the channel [08:26] Kiba: well...is there case when knowing algorithms would help a lot in simplying my codebase and make it easier to understand? [08:26] jesusabdullah: Probably not [08:26] jesusabdullah: unless you find yourself working on a problem that someone has likely already looked at [08:26] jesusabdullah: in which case you do some research [08:26] Kiba: I had a really hard time understanding the networking code because my model of the array data I sent is constantly wrong [08:27] Kiba: well [08:27] jesusabdullah: There *is* the idea of learning how to make things pretty and understandable, but that's not really algorithms [08:27] Kiba: my networking code for the tris clone [08:27] jesusabdullah: That's more coding style [08:27] emattias has joined the channel [08:27] jesusabdullah: and you can learn that from experience, and asking other people for help. [08:27] littke has joined the channel [08:27] jesusabdullah: Like I said, no secret sauce there. [08:28] jesusabdullah: except for, of course, WEB SCALE algorithms [08:28] jetienne has joined the channel [08:28] jesusabdullah: I hear you can shard web-scale algorithms [08:28] coreb: jesusabdullah: algorithms are a secret sauce ;) if not, why doesn't google blog post their recipe? [08:28] bergie has joined the channel [08:28] jesusabdullah: Well, particular algorithms are a secret sauce [08:28] jesusabdullah: but you don't just "learn algorithms" and then be able to write nice code [08:29] jesusabdullah: Kiba: If anything, learning "design patterns" would be more the way to go, as long as you don't try to square-peg-round-hole everything [08:29] unomi has joined the channel [08:29] coreb: an algorithm is _simply_ a series of steps to solving a problem [08:29] jesusabdullah: ^^That. [08:30] Kiba: except when you have to deal with graphics...I sucks at mathematics [08:30] jesusabdullah: Okay, graphics? [08:30] littke has joined the channel [08:30] coreb: maths is algorithms [08:30] jesusabdullah: Pick up a book on linear algebra. [08:30] Kiba: graphic programming [08:30] coreb: if you seriously suck at maths, you're probably not going to be a great programmer [08:31] Kiba: there's khan academy at least [08:31] jesusabdullah: Yeah, I think a lot of people go into programming thinking, "Why do I need math classes? I don't need math to program!" [08:31] pdelgallego has joined the channel [08:32] jesusabdullah: which is funny, because a lot of times it goes the other way: You learn programming so you can do math. [08:32] coreb: a person could fail math class because of lack of effort, but still do well with programming [08:32] coreb: but, if there's no talent for math, there's no talent for programming [08:33] coreb: and by "programming", I don't mean basic php webapps [08:33] micheil has joined the channel [08:34] coreb: most people can do that type of "programming" with some effort [08:34] framlin: and like ther ist no math-secret-sauce, there could not be any algorithm-secret-sauce ;) [08:34] coreb: framlin: tell google [08:34] framlin: or should I do s/could/should ? [08:34] tokumine has joined the channel [08:35] Kiba: coreb: what's higher than php webapps? [08:35] framlin: coreb: I tell that erveryone ;) [08:35] Kiba: rails? [08:35] coreb: Kiba; define "higher" [08:35] garrensmith has joined the channel [08:36] garrensmith: anyone good with jade? [08:36] framlin: coreb: in Germany this was law, until "the americans" convinced "the europeans" that algo-secret-sauce is "vital" ..... [08:37] zcopley-away has left the channel [08:37] idefine has joined the channel [08:37] micheil: ryah: are you about? [08:37] jimt_ has joined the channel [08:38] idefine has joined the channel [08:38] jesusabdullah: It's more like, there's no secret ketchup [08:38] jesusabdullah: No sauce you can dump on just anything and have it work [08:38] pkrumins: is npm down for anyone else too? [08:38] micheil: hmm.. [08:38] saikat has joined the channel [08:39] micheil: pkrumins: do you think it'd be a bad idea to be creating many thousands of small buffers? [08:39] jesusabdullah: pkrumins: Doesn't seem to be [08:39] micheil: (I'm talking about 2 bytes up to about 1024 / 2048 bytes [08:39] idefine: pkrumins: npm seems to be working fine for me [08:39] dgathright has joined the channel [08:39] micheil: pkrumins: npm is up for me. [08:39] pkrumins: down for me from ec2 and this computer [08:39] _krs_: ok, I just filed an issue: https://github.com/joyent/node/issues/891 [08:39] pkrumins: weird. [08:40] pkrumins: micheil: it depends on how often you'd be creating them [08:40] micheil: pkrumins: well, every time someone calls .send() on a websocket [08:40] micheil: or .close() [08:40] idefine: pkrumins: can you access: http://search.npmjs.org/ from the browser? [08:40] pkrumins: idefine: trying [08:41] pkrumins: idefine: up. [08:41] Emmanuel__ has joined the channel [08:41] pkrumins: micheil: i'd first code it up with lots of buffers and see how it works [08:42] micheil: pkrumins: https://gist.github.com/90d59f8c3ae4cbb638d9 [08:42] pkrumins: and if it's too slow, then i'd think about optimizing [08:42] micheil: lines 153 - 186 [08:42] micheil: using and emitting only buffers as 'data' events [08:43] bentkus has joined the channel [08:44] pkrumins: micheil: looks reasonable, if you used something that abstracts that, like bufferlist, it would use many small buffers behind the scenes too [08:44] micheil: hmm, bufferlist? [08:44] pkrumins: https://github.com/substack/node-bufferlist [08:44] jzaefferer has joined the channel [08:44] micheil: does bufferlist handle growing buffers? [08:45] pkrumins: it does exactly that, but it adds a new buffer with new bytes to the list behind the scenes. [08:45] killfill has joined the channel [08:45] micheil: I'm going to think of using a growing buffer for the incoming streams, rather then storing bytes in arrays and shit. [08:46] pkrumins: is there such thing as native growing buffer? [08:46] pkrumins: or a module that does that? [08:46] micheil: no, unfortunately. [08:46] micheil: I would really love that. [08:46] pkrumins: very easy to code [08:46] micheil: it'd also be good to have indexOf [08:47] micheil: which, I do actually have a patch for to support, but ryah won't take it. [08:47] FireFly|n900 has joined the channel [08:48] Adman65 has joined the channel [08:48] xla has joined the channel [08:49] hwinkel has joined the channel [08:50] micheil: pkrumins: actually, node's buffers work on all systems right? [08:50] pkrumins: yep, they are like 100 loc of C++ code. [08:50] pkrumins: nothing system dependent [08:50] micheil: hmm.. [08:50] pkrumins: just a malloc. [08:50] micheil: might make a module Buffer2 or something [08:51] pkrumins: if i was you, i wouldnt worry about it [08:51] pkrumins: i'd get stuff done [08:51] pkrumins: and forget about it :) [08:52] idefine: pkrumins: are you still unable to reach the npm repo? if so, what error are you seeing? [08:52] misterncw has joined the channel [08:52] xla has joined the channel [08:53] pkrumins: idefine: let me try now, yep, it just hangs [08:53] pkrumins: creating paste [08:53] pkrumins: this is from ec2 [08:53] pkrumins: http://pastebin.com/iTVQRevT [08:54] troessner has joined the channel [08:56] markwubben has joined the channel [08:57] idefine: pkrumins: what does the following give you: npm config get registry [08:58] pkrumins: looking [08:58] pkrumins: hmm http://registry.npmjs.org/ [08:58] pkrumins: trying to wget it on ec2 [08:59] pkrumins: hey it's up now! [08:59] mAritz has joined the channel [08:59] idefine: interesting, glad it worked out! wish we could've determined the issue [09:00] micheil: pkrumins: the thing is though, I need these things to be fast and performant [09:00] pkrumins: how do you know? [09:00] pkrumins: maybe they already are! [09:00] pkrumins: fast enough for all practical uses! [09:00] sreeix has joined the channel [09:01] ryah: micheil: heading to bed - email me [09:01] pkrumins: i am going to sleep here. see you tomorrow. [09:01] pkrumins: ryah: good night! [09:01] micheil: ryah: it was on the buffers, good night though [09:01] ryah: pkrumins: night :) [09:02] idefine: likewise, bye bye [09:02] garrensmith has joined the channel [09:02] idefine has left the channel [09:02] walbuena has joined the channel [09:02] killfill has joined the channel [09:03] disq has joined the channel [09:03] disq has joined the channel [09:04] garrensmith: anyone doing any nodejs contract work or looking for someone to do nodejs contract work? [09:05] rchavik has joined the channel [09:06] Kiba: hmm [09:06] luke` has joined the channel [09:06] Kiba: nodejs freelancing [09:08] bergie has joined the channel [09:09] jetienne: garrensmith: http://jobs.nodejs.org/ maybe of interest [09:09] garrensmith: jetienne: cool thanks will check it out [09:09] Croms has joined the channel [09:14] garrensmith_ has joined the channel [09:16] beawesomeinstead has joined the channel [09:16] beawesomeinstead has joined the channel [09:17] davemo has joined the channel [09:19] jetienne: any module to put color in the stacktrace dumped in terminal ? [09:19] suckerpunch has joined the channel [09:20] skm has joined the channel [09:22] V1: jetienne: try eyes [09:23] zentoooo_ has joined the channel [09:26] stonebranch has joined the channel [09:27] sk33lz has joined the channel [09:28] jetienne: V1: it doesnt do it by default, but i could configure it for this goal, correct ? [09:29] tokumine has joined the channel [09:31] PT has joined the channel [09:31] PT: hi [09:31] PT: i am trying to run node.js on my local windows machine, but i get the "cannot find module tcp" error. Anyone has a clue whats wrong? [09:31] Jamool has joined the channel [09:32] markwubben has joined the channel [09:33] Kiba: ACTION doesn't know [09:33] PT: :( [09:33] Stan____ has joined the channel [09:34] PT: anyone else perhaps? [09:36] herbySk has joined the channel [09:37] FireFly|n900 has joined the channel [09:38] tommoor has joined the channel [09:41] jesusabdullah: PT: This is after installing? [09:41] jesusabdullah: Like, you install it, run node and then it says it can't find the tcp module? [09:41] PT: hi. [09:41] PT: yes indeed [09:41] jesusabdullah: If so, that's pretty odd! [09:41] dekz__ has joined the channel [09:42] PT: i used cygwin to install and i also downloaded an old windows version .0.4.2 [09:42] jesusabdullah: I have to admit, I don't know too much about this [09:42] PT: both return the same error [09:42] jesusabdullah: but you read the docs and such? [09:42] jesusabdullah: and cygwin didn't return some kinda error? [09:42] PT: i searched for this error. I seen some more people having the same problem. but all were unanswered [09:42] jesusabdullah: like, in the ./configure state? [09:42] PT: followed the wiki to install it [09:42] jesusabdullah: Is it in github issues or anything? [09:42] PT: so i did the ./configure thing [09:43] PT: i am not sure if it is [09:43] jesusabdullah: ./configure is a script that finds all your dependencies and such so that make can do its job [09:43] jesusabdullah: typically [09:43] jesusabdullah: At the least, if you're missing something important you'll usually see something complain-y [09:43] PT: hm okay [09:44] jesusabdullah: Maybe see if that says anything about tcp, or lack thereof [09:44] jesusabdullah: That'd be what I would do [09:44] PT: i'll have a look [09:44] PT: thanks so far :) [09:44] jesusabdullah: That, and, umm, just try it a second time and hope that it Just Works for some reason ;) [09:44] jesusabdullah: And then whine in here [09:44] jesusabdullah: which you're already doing [09:44] PT: hehe :) [09:44] jesusabdullah: also, github issues! [09:45] jesusabdullah: If you can't find someone in here that actually works on the codebase (and it's odd hours for that right now!), that'd be where I would go next [09:45] PT: configure finished successfully [09:45] jesusabdullah: Hmm! [09:45] jesusabdullah: And no glaring "NO"s? [09:45] PT: 4 no's 6 no founds [09:45] jesusabdullah: Any of them look related to the tcp stack? [09:45] some1else has joined the channel [09:45] PT: nope. not really [09:45] jesusabdullah: There is the fact that there are multiple ways to get events n' such, so that's probably what those no's are about [09:46] jesusabdullah: by events, i mean general stuff, but I remember eventage being where I usually saw my NO's [09:46] jesusabdullah: Okay, well [09:46] jesusabdullah: My next suggestion would be to hit up github issues, and then to come back here in, oh, 8 hours or something [09:46] jesusabdullah: You can also ping ryah directly, if he's idling, and maybe he'll see it tomorrow :/ [09:47] jesusabdullah: Anyways: Good luck! I have a bed to sleep in. [09:47] tjgillies: has anyone written a nodejs apache module [09:47] tjgillies: like apssenger? [09:47] tjgillies: passenger* [09:47] jesusabdullah: I haven't heard of one, but don't take my word for it [09:48] jesusabdullah: ACTION & [09:48] Shrink has joined the channel [09:48] PT_ has joined the channel [09:48] PT_: lost connection [09:49] PT_: reinstalled. but same problem :( [09:50] Guest45237 has joined the channel [09:53] dekz__ has joined the channel [09:57] beawesomeinstead has joined the channel [09:57] beawesomeinstead has joined the channel [09:58] kuebk has joined the channel [09:59] FireFly|n900 has joined the channel [09:59] kuebk has joined the channel [10:02] Lorentz has joined the channel [10:03] jaket_ has joined the channel [10:04] V1: Why would someone want to hook nodejs on apache? Writing an apache module doesn't make sense at all tjgillies [10:05] bentkus has joined the channel [10:05] tjgillies: ok [10:05] tomaw has joined the channel [10:08] xla has joined the channel [10:12] sreeix has joined the channel [10:15] XaKBooT has joined the channel [10:16] XaKBooT: qq all [10:16] skm has joined the channel [10:18] MaxguN has left the channel [10:21] okuryu has joined the channel [10:23] Micfire has joined the channel [10:24] Micfire: anybody know how I can pass timeout for riak-js's mapred? [10:29] sveisvei has joined the channel [10:31] kuebk: i've pulled a request from my repo to nodejs repo [10:31] kuebk: how can I add additional files to this request? [10:32] bentkus has joined the channel [10:41] ph^ has joined the channel [10:42] bergie has joined the channel [10:44] mike5w3c has joined the channel [10:44] micheil has joined the channel [10:47] mc_greeny has joined the channel [10:48] viktors has joined the channel [10:48] viktors: hi [10:48] viktors: is using CoffeeScript a good idea (for a new project)? [10:50] micheil: depends if you like coffeescript [10:50] kuebk: [12:30] i've pulled a request from my repo to nodejs repo [10:50] kuebk: [12:30] how can I add additional files to this request? [10:50] kuebk: ;p [10:50] Stan____: @kuebk just commit to your master branch [10:50] micheil: kuebk: just add another commit [10:51] kuebk: that's what I did [10:51] micheil: then push to your fokr [10:51] kuebk: at least that's what I think what I did [10:52] kuebk: did git add. [10:52] kuebk: git add . [10:52] kuebk: git commit [10:52] kuebk: and now when I'm trying to do [10:52] kuebk: git push origin master [10:53] viktors: micheil: actually i'd prefer something more like ruby, but it's the closest I can get. JavaScript is a bit too verbose otherwise [10:53] micheil: hmm.. that's annoying. setEncoding can't be changed to turn of decoding. [10:53] kuebk: and it gives me no access [10:53] micheil: viktors: if you prefer something more like ruby, use ruby. [10:54] asabil has joined the channel [10:54] micheil: git push YOUR-URL master [10:54] micheil: kuebk: if you do `git remote -v` you can see the URL it'll try and push to. [10:54] viktors: micheil: i'm fed up with rewriting ruby to javascript and back, i'd prefer to settle on one language (javascript) [10:54] micheil: viktors: right, so use javascript then. [10:55] delian66 has joined the channel [10:55] Kiba: viktors: cofeescript? [10:55] micheil: coffeescript is inbetween javascript and ruby as far as syntax [10:56] viktors: micheil: in theory if at some point i stop liking coffeescript, i should be still able to compile to javascript and continue developing as usual, right? [10:56] Stan____: @kuebk it is because you cloned joyent/node and not your fork [10:56] micheil: yes, but there'll be a load of javascript code that you probably won't understand [10:56] littke has joined the channel [10:56] micheil: javascript code that coffeescript uses to give you the syntax it gives you. [10:57] kuebk: Stan____ yea [10:57] skohorn has joined the channel [10:57] kuebk: I was almost sure [10:57] kuebk: I was in right repo [10:57] kuebk: :( [10:57] viktors: micheil: ok, then i'll check quality of generated code first before deciding. thanks! [11:00] viktors: 1 more question: is there any way to avoid having to define validations twice - in Mongoose and in the form? [11:00] kuebk: ok next question [11:00] kuebk: how can I now update my pull request [11:00] kuebk: with the files I've just pushed? [11:01] garrensmith_ has joined the channel [11:02] sivy has joined the channel [11:02] kuebk: Stan____ could you please give me a tip how to do this [11:02] kuebk: nevermind [11:03] micheil: viktors: write a library to handle validations. [11:03] micheil: kuebk: the pull request should've been automatically updated when you pushed to your branch [11:03] Kiba: reddit now? [11:04] Kiba: reddit down? [11:04] viktors: micheil: good idea, thanks [11:04] jetienne has joined the channel [11:05] micheil: viktors: as mongoose validators are just functions. you can have something that exports these that you can use on the client. [11:05] micheil: Kiba: nup [11:05] viktors: micheil: yep that's how I understood your first reply :) [11:07] kuebk: micheil had to update commit range to update my pull request [11:07] kuebk: dunno why [11:07] kuebk: anyway thanks for your help [11:08] sk33lz has left the channel [11:08] Poetro has joined the channel [11:09] Kiba: I stay up all night! [11:10] tommoor: Hey all, is there a good guide to implementing a proper MVC code structure in node? [11:10] Shrink has joined the channel [11:10] tommoor: Express and connect are good, but only get you so far in terms of code organisation and modules, especially for those new to node [11:11] hwinkel has joined the channel [11:14] jarek has joined the channel [11:14] jarek: Hi [11:14] jarek: how can I get path to user home dir? [11:14] jarek: there are __direname and __filename global variables, but I can't find anything like __homedir [11:16] kawaz_work has joined the channel [11:19] RusAlex has left the channel [11:19] rafacv has joined the channel [11:20] Tyrkul has joined the channel [11:22] sourcode has joined the channel [11:22] Emmanuel__ has joined the channel [11:23] konobi: jarek: that means different things on different platforms [11:25] fairwinds has joined the channel [11:25] jarek: konobi: it's standardized by POSIX [11:26] jarek: I guess I should rather ask how can I get value for HOME enviromental variable [11:26] jarek: http://stackoverflow.com/questions/4870328/how-to-read-environment-variable-in-node-js [11:26] jarek: awesome! :) [11:27] konobi: jarek: you assume all platforms targetted are POSIX [11:27] konobi: =0) [11:27] shaunau: i have a question about same origin policy. if i have a js script at foo.com/a.js and i hotlink to it, using to your page, and the socket.io-node server will serve you the client [20:15] apoc has joined the channel [20:15] mytrile has joined the channel [20:18] jimt has joined the channel [20:18] TooTallNate has joined the channel [20:20] hvgotcodes: when i do a listen, do i want to listen on 127.0.0.1 or localhost? [20:20] hvgotcodes: 127...1 worked on os x, but seems to be failing on linux [20:20] rburhum has left the channel [20:23] jimt_ has joined the channel [20:23] karboh has joined the channel [20:23] robertkeizer: hvgotcodes: 127.0.0.1 is the address of lo, the loopback address in *nix. It will work with linux. [20:23] hvgotcodes: robertkeizer: what about localhost [20:24] robertkeizer: hvgotcodes: localhost is the domain name of your local machine. It resolves to 127.0.0.1 in ipv4. [20:25] hvgotcodes: different question: if i do http.createServer(function()...).listen(...) and then immediately start pinging it in the same script, can some sort of timing issue occur in that the server isnt up before the first request comes in? [20:25] blueadept: having some trouble with this hash feature, would anyone happen to know how i can apply it to the password field of the user object? http://pastie.org/private/5jegjuc4ogvx46qgy4fuw [20:25] hvgotcodes: basically i can ping a server with wget, but not from the script that launches the server [20:26] robertkeizer: hvgotcodes: ping is ICMP, wget is TCP/IP, what kind of ping are you doing? [20:26] hvgotcodes: ah, and if i take the assert out which kills the test, i see a connection refused followed by the appropriate responses [20:26] hvgotcodes: ping in the general sense, specifically using the xmlhttprequest [20:26] FireFly has joined the channel [20:27] RushPL has joined the channel [20:27] robertkeizer: hvgotcodes: ping in the gernal sense is the command 'ping' which sends icmp request to the given address, specifically an echo request. [20:27] hvgotcodes: robertkeizer: this is my output https://gist.github.com/685ab39dbe2ae6bd5a67 [20:27] robertkeizer: What you're talking about is a HTTP request. [20:28] hvgotcodes: yes [20:28] hvgotcodes: the first one fails, the others succeed [20:28] ji0n has joined the channel [20:28] mikegerwitz: hvgotcodes: listen() takes a callback. Are you sure it's done binding to the port>? [20:28] fairwinds has joined the channel [20:29] robertkeizer: Depending on how you wrote the code, it could be asynchronous vs synchronous. [20:29] hvgotcodes: mikegerwitz: no im not sure, in fact im suspecting its not done, hence the error [20:29] robertkeizer: So the first part of the code isn't actually executed by the time the 2nd part of the code is executed. [20:29] robertkeizer: If you post what you have to github / gist I'll take a look if you want. [20:29] hvgotcodes: robertkeizer: that is what i suspect is happening [20:30] jimt has joined the channel [20:30] hvgotcodes: robertkeizer: https://gist.github.com/fbed1d4dbbdadd3cde1e [20:30] hvgotcodes: i suspect the naked for loop should be in a callback in listen [20:31] robertkeizer: Your missing the callback in listen. [20:32] robertkeizer: See http://nodejs.org/docs/v0.4.5/api/http.html#server.listen. [20:32] hvgotcodes: robertkeizer: yep [20:32] hornairs has joined the channel [20:32] hvgotcodes: thanx [20:32] hvgotcodes: now that i am dealing in multiple platforms, these things are becoming more important ;) [20:32] hvgotcodes: that passes on os x but no on lucid [20:33] arpegius has joined the channel [20:33] zubairov has joined the channel [20:34] highermath_away has joined the channel [20:34] robertkeizer: hvgotcodes: NodeJS is cross platform in that the code you write is interpreted - it won't change cross platform ( unless you call specific os things ). [20:34] highermath_away has joined the channel [20:34] sechrist: hehe unless there's bugs [20:34] c4milo: tjholowaychuk: hello my friend [20:34] tjholowaychuk: c4milo: hey man [20:34] pomodoro has joined the channel [20:34] max_dev has joined the channel [20:35] hvgotcodes: robertkeizer: hmm then why would that code not break in os x and does break on lucid? [20:35] c4milo: tjholowaychuk: do you recognize this https://gist.github.com/93668b6af67ea03a57e9 [20:35] c4milo: ? [20:35] tjholowaychuk: c4milo: weird [20:36] robertkeizer: hvgotcodes: Different versions of node? Give me the full code to work with and I can help you debug it. [20:36] warz has joined the channel [20:36] tjholowaychuk: c4milo: utils is gone or something haha wtf [20:36] warz has joined the channel [20:36] herbySk has joined the channel [20:36] c4milo: tjholowaychuk: ahahah [20:36] c4milo: tjholowaychuk: somebody killed it [20:36] tjholowaychuk: c4milo: its a relative require too so nothing should be globbering it [20:37] hvgotcodes: robertkeizer: nah man i got it [20:37] hvgotcodes: you pointed me in the right direction [20:37] hvgotcodes: stupid asyncronous weirdness ;) [20:38] robertkeizer: hvgotcodes: Glad I could help. [20:39] c4milo: tjholowaychuk: I am using node 0.4.5 and npm 1.0.1rc7 [20:39] tjholowaychuk: c4milo: hmm that require should be the same with anything really [20:39] highermath_away has joined the channel [20:39] highermath_away has joined the channel [20:39] dmcquay has joined the channel [20:39] itsTodd_ has joined the channel [20:40] c4milo: tjholowaychuk: ok, thanks man, I will figure it out [20:42] jimt_ has joined the channel [20:43] fermion has joined the channel [20:44] Jamool has joined the channel [20:45] atmos has joined the channel [20:45] atmos has joined the channel [20:47] jimt has joined the channel [20:47] Kholo has joined the channel [20:47] skm has joined the channel [20:49] tmpvar_ has joined the channel [20:50] Stan____ has left the channel [20:51] kriszyp has joined the channel [20:53] zubairov has joined the channel [20:54] tilgovi has joined the channel [20:54] blueadept: is there a good way of doing realtime form field checks in node? [20:54] blueadept: like for double entry passwords in registration fields, as such [20:54] arpegius has joined the channel [20:56] luisloaiza: is there something like try catch [20:56] luisloaiza: in [20:56] luisloaiza: nodeJS [20:56] luisloaiza: ?¿ [20:57] luisloaiza: bluedept,, nodejs is like a normal web server, you can call a action request that respond a json with that info [20:58] bcelenza: luisloaiza: try/catch exists.. looks a little like this: https://gist.github.com/910730 [20:58] bcelenza: use the global Error object when possible [20:59] tbranyen: bcelenza: whys that? [20:59] beriberikix: So besides a framework like Expression, what other libs are handy for daily coding? I know of underscorejs. [20:59] tbranyen: using the global Error [20:59] bcelenza: tbranyen: no specific reason other than it seems to be the standard [20:59] tbranyen: bcelenza: hmmm wonder if there are any added benefits to that over, throw "error" [21:00] luisloaiza: how is used? [21:00] luisloaiza: the global error [21:00] luisloaiza: i mean when a function trows and error my server ends to run [21:00] luisloaiza: stop running [21:00] tbranyen: ohhh bcelenza there is a benefit [21:01] tbranyen: http://sharefilewith.me/u/841735.png [21:01] bcelenza: im searching for the docs on the object :) coming up short [21:01] tbranyen: throw new Error gives you an error object in the catch block [21:01] tbranyen: throw "error" gives you a useless string [21:01] tbranyen: interesting [21:01] tbranyen: i'd assume the string would get wrapped, but i guess not [21:01] bcelenza: Yeah, you can also assign an error code to your exceptions as well [21:01] tbranyen: dope, i'm sold on that [21:01] tbranyen: that seems like the right thing to do [21:02] luisloaiza: so i use a normal try catch [21:02] luisloaiza: sintaz [21:02] bcelenza: luisloaiza: a try/catch might not help you in that situation. for catching all uncaught exceptions, check out the process module 'uncaughtException' event: http://nodejs.org/docs/v0.4.4/api/process.html#event_uncaughtException_ [21:02] luisloaiza: sintax [21:02] tbranyen: syntax :) [21:02] luisloaiza: yes, sorry [21:02] luisloaiza: ok [21:02] luisloaiza: let me see [21:03] tk has joined the channel [21:04] cloudhead has joined the channel [21:05] maushu has joined the channel [21:06] robhawkes has joined the channel [21:08] robhawkes has joined the channel [21:10] montylounge has joined the channel [21:11] jimt_ has joined the channel [21:11] reid has joined the channel [21:20] jschoolcraft has joined the channel [21:20] m64253 has joined the channel [21:21] dahankzter has joined the channel [21:21] jimt has joined the channel [21:23] LukeGalea has joined the channel [21:24] dve has joined the channel [21:25] arpegius has joined the channel [21:25] techwraith has joined the channel [21:25] mrcaron has joined the channel [21:25] techwraith: Does anyone know of a good ORM for node that can use different document stores? [21:26] techwraith: I'm making a simple dashboard, but I can't use mongoose/mongo for this one. [21:26] techwraith: Hmmm, maybe a redis ORM [21:27] galaxywatcher has joined the channel [21:27] rburhum has joined the channel [21:28] mrcaron: Re: win32 port... found piscisaureus's github. getting the ball rolling. [21:28] bradleymeck has joined the channel [21:28] jimt_ has joined the channel [21:29] pifantastic_ has joined the channel [21:29] bnoguchi: techwraith: TJ made a Redis one called incredis [21:29] rebeccablack: ITS FRIDAY FRIDAY GETTIN DOWN ON FRIDAY [21:29] tjholowaychuk: bnoguchi: haha no i didnt :p [21:29] tjholowaychuk: that's a sweet name though haha [21:29] tjholowaychuk: I used to have one [21:29] bnoguchi: tjholowaychuk: lol [21:30] bnoguchi: tjholowaychuk: what was the name? [21:30] tjholowaychuk: but I never used it, it was just a one-day project so I removed it [21:30] tjholowaychuk: it was "rapid" [21:30] tjholowaychuk: bad name [21:30] bnoguchi: techwraith: There's also this by the guys at nodejitsu [21:30] bnoguchi: techwraith: https://github.com/cloudhead/resourcer [21:30] techwraith: I saw nohm too [21:30] bnoguchi: tjholowaychuk: doh, yeah, I had made one too, called incredis, just didn't open source it [21:30] bnoguchi: tjholowaychuk: also ended up not using it [21:30] tjholowaychuk: haha [21:30] tjholowaychuk: awesome [21:31] bnoguchi: tjholowaychuk: redis not so great for orm, imho [21:31] tjholowaychuk: nah [21:31] tjholowaychuk: the only thing I want sometimes on top of redis is a bit of validation [21:31] tjholowaychuk: thats about it [21:31] bnoguchi: techwraith: not familiar with nohm [21:31] techwraith: what dbs does resourcer use? [21:32] Kholoa has joined the channel [21:32] bnoguchi: techwraith: What are you using and for what feature? [21:32] bnoguchi: techwraith: What db? [21:33] techwraith: Preferably Redis [21:33] techwraith: The guys at work don't like mongo ;) [21:33] bnoguchi: techwraith: for what feature? [21:33] bnoguchi: techwraith: for the entire app? [21:33] techwraith: Stats dashboard, storing the stats [21:33] bnoguchi: techwraith: You don't need an orm for that; just use npm install redis [21:33] jimt has joined the channel [21:34] tjholowaychuk: techwraith: db.lpush('stats', JSON.stringify(mystats)); done haha [21:34] techwraith: Super simple then [21:34] techwraith: thanks [21:34] techwraith: not a hole lot of experience with redis [21:34] bnoguchi: techwraith: Yeah, no need to make it more complicated than it needs to be [21:34] tjholowaychuk: and possibly throw in ltrim('stats', 0, 1000) or w/e [21:34] tjholowaychuk: if you want to cap it [21:34] bnoguchi: techwraith: http://redis.io [21:34] mrcaron has left the channel [21:34] EyePulp: I saw recently that BB had replaced redis for their event db and was just using PG [21:35] techwraith: I might end up using the pubsub features too [21:35] techwraith: hmmm, sounds fun [21:35] techwraith: lol [21:35] keeto has left the channel [21:35] voodootikigod: any obvious reason why an child of stream would end randomly? [21:35] voodootikigod: something i am missing [21:35] voodootikigod: i know [21:36] keeto has joined the channel [21:36] drachir has joined the channel [21:37] bnoguchi: voodootikigod: Have you tried a debugger? [21:37] voodootikigod: not yet [21:37] voodootikigod: not sure it would heelp [21:37] voodootikigod: i am wrapping an object over serialport [21:38] voodootikigod: and i can trace it with console just fine [21:38] voodootikigod: its not an async issue [21:38] voodootikigod: i think [21:38] voodootikigod: it just .. [21:38] voodootikigod: sotps [21:38] voodootikigod: stop [21:38] voodootikigod: unceremoniously [21:38] voodootikigod: is there anything i can listen for on the stream? [21:38] voodootikigod: close event? [21:39] jimt_ has joined the channel [21:42] bnoguchi: voodootikigod: http://nodejs.org/docs/v0.4.5/api/streams.html [21:42] bnoguchi: voodootikigod: List of available events is there [21:42] voodootikigod: danke [21:43] gattuso has joined the channel [21:44] tmedema has joined the channel [21:44] Jamool has joined the channel [21:45] wadey has joined the channel [21:45] techwraith: So, with redis, is there a way for me to query by date/time? I need to get aggregate stats per day/week/etc. [21:46] Aria: If you put things in by date and time ;-) [21:46] blueadept: does anyone have a good case for either underscore or camelcase conventions? or is it just personal preference? [21:46] Aria: You might want to do the aggregation as you put data in -- increment various statistics, etc. Or do a map-reduce type model, where you look for new data adn fold it in. [21:46] Aria: blueadept: personal preference. [21:47] bnoguchi: techwraith: Yes, store your data as an ordered set where the score is the datetime [21:47] blueadept: sometimes i think underscores are just easier to read [21:47] blueadept: but sometimes i see code where really good coders use camelcase [21:47] blueadept: so its like, wtf [21:48] techwraith: bnoguchi: Have a link for that? [21:48] bnoguchi: techwraith: No. If I were you, I would read up on redis fundamentals [21:48] techwraith: k :) [21:48] bnoguchi: techwraith: and then figure out how you want to store your data [21:48] insin: blueadept: I just use whatever the conventions for the language and its std lib are [21:48] bnoguchi: techwraith: http://redis.io is your best friend in this case [21:48] bnoguchi: techwraith: Read up on ZSets [21:49] bnoguchi: techwraith: aka ordered sets [21:49] insin: so underscores in Python, camelCase in JS [21:49] jetienne: q. im a in .js and would like to know if it is the main script ? not a required .js but the slota.js in 'node slota.js' . how can i do that [21:50] blueadept: insin: ah, cool [21:50] caolanm has joined the channel [21:51] pdelgallego has joined the channel [21:51] voodootikigod: bnoguchi: and if its not firing those events when it should? [21:51] hellp has joined the channel [21:51] voodootikigod: like error/end [21:51] coreb: what ide do people use to debug node.js apps line by line? [21:51] jimt has joined the channel [21:51] coreb: with breakpoints, that is [21:51] tjholowaychuk: coreb: terminal [21:51] mikegerwitz: jetienne: I suppose you could check process.argv [21:52] tjholowaychuk: coreb: node debug myscript.js [21:52] blueadept: coreb: check out node-inspector [21:52] bnoguchi: voodootikigod: I would use a debugger in this case [21:52] voodootikigod: ok cool [21:52] bnoguchi: voodootikigod: node debug script.js [21:53] bnoguchi: voodootikigod: or use node-inspector [21:53] coreb: tjholowaychuk: you get breakpoint stepping that way? [21:53] voodootikigod: already over it [21:53] voodootikigod: thanks [21:53] tjholowaychuk: coreb: yeah [21:53] coreb: I can't believe how old the node.js version in debian testing is; 0.2.0.1 [21:54] teemow has joined the channel [21:54] eRudite: hello all.. I am a newbie here.. writing code in nodejs and was happy until now. But its getting too big and i have so many callback functions inside functions.. any best practices guide to program in nodejs? [21:54] insin: 0.2.0.1, isn't that last week's version? ;) [21:55] mikegerwitz: eRudite: Don't nest them all. Rather than doing foo( function() {} ), do foo( myCallbackName ); function myCallbackName() {} [21:55] arpegius_ has joined the channel [21:56] bnoguchi: eRudite: You could also use the promise/future pattern. But if you're just starting with node, I would stick with mikegerwitz's advice [21:57] perezd: is there anything bizarre about using SocketIO with an HTTPS.createServer? [21:57] colinclark has joined the channel [21:57] perezd: thats how you do secure Socket.IO yes? [21:58] ryah: perezd: there is an example included with socket.io for https [21:58] Silks has joined the channel [21:59] graysky has joined the channel [21:59] perezd: ryah: I only see a chat demo :( [21:59] coreb: do people in here use the cloud9 ide? [22:00] ryah: perezd: basically there's nothing strange [22:00] perezd: ryah: is this the right header to send? 'HTTP/1.1 101 WebSocket Protocol Handshake', [22:01] ZeroCoder has joined the channel [22:01] ryah: seems okay [22:01] perezd: seems odd to send HTTP over HTTPS [22:02] ryah: ACTION raises his eyebrow [22:02] Nexxy has joined the channel [22:02] rook2pawn has joined the channel [22:02] ryah: perezd: HTTPS is HTTP over TLS/SSL [22:03] perezd: yeah, wasn't positive if u send that as the header [22:03] coreb: which isn't posisble until after the handshake, of course [22:03] dmcquay_ has joined the channel [22:03] ryah: coreb: why? [22:03] ryah: coreb: or - what do you mean? [22:04] softdrink: Really? I thought it meant HyperText Transfer Protocol with the Sport package. [22:04] softdrink: ¬¬ [22:04] perezd: lol [22:04] eRudite: alright.. ill take a look at promise/future pattern too.. any link to it would help.. will search on google though [22:04] softdrink: you know, leaner css, tighter leading... [22:04] coreb: ryah; it's "http" communication until the ssl handshake is complete, then http over ssl [22:04] unlink has joined the channel [22:05] delian66 has joined the channel [22:05] halfhalo: softdrink: don't forget the sunroof [22:05] ryah: coreb: hm - usually there's not raw http first [22:05] softdrink: for sure [22:05] ryah: coreb: i guess only in the case of proxies you do that [22:06] coreb: ryah; well, to be able to exchange keys, there must be some unencrypted communication at first [22:06] ceej has joined the channel [22:06] halfhalo: "gimme yo keys biotch" [22:06] jimt has joined the channel [22:07] ryah: coreb: sure - but that's not HTTP [22:07] technoweenie has joined the channel [22:07] softdrink: does the metaphor come full circle if the browser's js engine is V8? [22:07] softdrink: heh [22:08] halfhalo: yes, with an optional upgrade to a hybrid [22:08] clarkfischer has joined the channel [22:09] werm has joined the channel [22:10] coreb: ryah: in reality it is, https is basically just communication over another port and with secure sockets [22:10] coreb: until the sockets are secure, it's basically http [22:10] harth has joined the channel [22:11] Casperin has joined the channel [22:12] ryah: coreb: you have a strange definition of http then :) [22:13] highermath_away has joined the channel [22:13] ryah: which apparently includes things neither defined in the HTTP spec, nor parsable with HTTP parsers [22:13] sh1mmer has joined the channel [22:14] Kuroir1 has joined the channel [22:14] max_dev has joined the channel [22:14] aheckmann has joined the channel [22:16] coreb: ryah: it was a response to the http over the https question, I state that at the beginning unencrypted information goes over the wire both ways [22:17] ryah: unencrypted information does not imply that it's http [22:17] ryah: it's TLS [22:18] coreb: yeah, at a socket level, it is [22:18] cloudhead2 has joined the channel [22:18] hornairs has joined the channel [22:18] tmedema: Do css compilers like less really give a significant advantage? I can see the point of html template engines etc., but I'm not too sure whether the same is needed for css. [22:19] tjholowaychuk: tmedema: depends on the project, sometimes yes sometimes no [22:19] ckknight: it can be quite nice, especially the nesting. [22:19] dgathright has joined the channel [22:19] mscdex: woot! ftp module almost complete :-D [22:19] tjholowaychuk: tmedema: we have ~40k lines of css [22:19] tjholowaychuk: tmedema: so for us it is very important [22:19] tjholowaychuk: although less is just as verbose, so not less specifically [22:19] tmedema: tjholowaychuk: 40k lines of css? may I ask what website is using that much css? [22:19] tjholowaychuk: tmedema: LearnBoost [22:20] ZeroCoder has joined the channel [22:20] tbranyen: lol when i was working on monster.com it had wayyyy more than that [22:20] tbranyen: absurd amounts of js and css [22:20] tjholowaychuk: tmedemat: sorry, haha 16k lines [22:20] tbranyen: 40k isn't that uncommon [22:20] tjholowaychuk: not at all no [22:21] coreb: 40k sounds a lot [22:21] ryah: coreb: tls runs on top of tcp [22:21] Kuroir1: 40k sounds like a weird case of many classes [22:21] tmedema: well considering that the point of css is to avoid repetition I'd say 40k lines is quite a lot [22:21] Kuroir1: or statements.. [22:21] coreb: ryah; you don't say ;) [22:21] Kuroir1: or tabbed.. [22:21] ryah: coreb: well - define 'socket layer' then [22:21] tbranyen: the point of css is to style, so if you have a lot of things to style [22:21] tbranyen: then yea you end up with a lot of css [22:22] tmedema: but I see your point, I guess switching to a css compiler is not a huge step so I could just start with normal css while the app is still relatively small [22:22] tjholowaychuk: yup [22:22] piscisaureus: ryah: are we also going to put child processes in oio? [22:22] Kuroir1: 40k, sounds like a lot. Probably too many overrides? [22:22] tjholowaychuk: and most support the css-like syntax as well [22:22] ryah: piscisaureus: that's the plan [22:22] Kuroir1: I uses sass.scss <3 [22:22] tmedema: great [22:22] tjholowaychuk: Kuroir1: nah, just lots of highly styled components [22:22] tbranyen: Kuroir1: yeah i've been using scss for this project [22:23] Kuroir1: tjholowaychuk: scss outputs 40k!? [22:23] tbranyen: going to give Stylus a whirl for my own project [22:23] ryanfitz has joined the channel [22:23] Kuroir1: tbranyen: SCSS is awesome, I'm working on a library that will work with compass to provide 80% of the tedious css [22:23] tjholowaychuk: tbranyen: feel free to send any pointers my way, stylus ~5 years younger than sass haha [22:24] tbranyen: Kuroir1: yeah compass looks awesome, never used it tho [22:25] techwraith: Are any of the nodejitsu guys here? [22:26] Kuroir1: tbranyen: wait till I release my library. It's going to do magic. [22:26] perezd: cloudhead: you around? [22:26] micheil: ACTION is busy playing with statsd and graphite.. only statsd isn't working at the moment. [22:27] bnoguchi has joined the channel [22:27] techwraith: Working on getting node-loggly installed without NPM, giving me some issues though [22:27] __tosh has joined the channel [22:29] Kuroir1 has left the channel [22:29] Casperin: I get a "npm cannot be installed without nodejs." msg when I try install npm on my mac osx 10.6 here (about 20 minutes after installing nodejs). I tried googling for it, but can't seem to find anything useful, so does any of you guys know what to do? [22:30] maushu_ has joined the channel [22:30] Nevtus has joined the channel [22:31] gzmask has left the channel [22:31] flat has joined the channel [22:32] lorhko has joined the channel [22:32] Schmallon has joined the channel [22:35] tk has joined the channel [22:36] pita has joined the channel [22:36] pita: https://github.com/Pita/etherpad-lite [22:37] AAA_awright: tjholowaychuk: Is there some more detailed API documentation for Jade? I'm looking at modifying the output implementing something similar to XSLT [22:38] tjholowaychuk: AAA_awright: the compiler stuff? [22:38] AAA_awright: It might be compiler level yeah [22:38] dgdo_ has joined the channel [22:38] AAA_awright: Yeah it would be a modification to the compiler [22:38] tjholowaychuk: AAA_awright: well what are you trying to do [22:38] tjholowaychuk: oh ok [22:39] tjholowaychuk: AAA_awright: just look at the "nodes" dir, its pretty basic stuff, block has several nodes, each node can be say a Tag, or another Block etc [22:39] jbpros has joined the channel [22:39] AAA_awright: tjholowaychuk: If I wanted to implement an XSLT engine at the Jade compiler level... actually it's my http://magnode.org/xml-rdft/ spec [22:39] quackquack has joined the channel [22:39] AAA_awright: But for all practical purposes think XSLT [22:40] quackquack: Using the node.js 'fs' module, is it possible to delete a directory and all files in it w/o manually recursing? [22:40] suckerpunch has joined the channel [22:41] skm has joined the channel [22:41] SubStack: exec('rm', ['-rf',dir], fn) [22:41] isaacs has joined the channel [22:42] gazumps has joined the channel [22:42] isaacs: Casperin: hey, you get that figured out? [22:42] AAA_awright: tjholowaychuk: Cool I'm looking through there... Is there some way to do this without modifying Jade sources? [22:43] dgdo_ has left the channel [22:43] quackquack: SubStack: ty! is there no built-in method to do it? [22:43] deebo has joined the channel [22:43] tjholowaychuk: AAA_awright: I dont really know what you are trying to do. why not just use jade for the xml as-is? [22:43] AAA_awright: quackquack: There's no system function that does it, rm recurses, Node.js would have to recurse too [22:43] Casperin: isaacs: I found out that it's a different problem than I thought it was :P — I did manage to install it, but for whatever reason, node only works in the actual terminal that I*m using to install it [22:43] coreb: ryah: yes, it's ssl2/ssl3/tls1 doing it, point was unencrypted data over the wire [22:43] deebo: can someone explain: http://pastebin.com/r6dcYpCf [22:43] quackquack: AAA_awright: okay, thanks! [22:44] isaacs: Casperin: which node <-- what is that? [22:44] sorens3n has joined the channel [22:44] isaacs: Casperin: what does that command output? [22:44] SubStack: quackquack: also get exec like this: var exec = require('child_process').exec [22:44] Casperin: isaacs: /Users/g/local/node/bin/node [22:44] isaacs: deebo: the first is just losing the reference to the exports object [22:44] quackquack: SubStack: excellent, thank you! [22:44] isaacs: deebo: do: module.exports = whatever [22:45] deebo: isaacs: ah! true [22:45] SubStack: quackquack: well you could use findit to get a recursive list of files and fs.unlink() each of those but shelling out to rm probably works faster and more relia bly [22:45] marcello3d has joined the channel [22:45] isaacs: deebo: also: that module pattern thingie is overkill. node modules are already wrapped in a closure [22:45] broofa has joined the channel [22:45] SubStack: and less code [22:45] marcello3d: HELLO JENTLEMEN [22:45] SubStack: marcello3d: OH HELLO [22:45] quackquack: SubStack: ya, it doesnt get much faster than rm =D [22:45] deebo: isaacs: probably, am just used to it and gave it a go [22:45] isaacs: deebo: if you do "var a = 100" in a module, it won't be a globaly. [22:47] isaacs: Casperin: ok. and does your $PATH environment var contain /Usrs/g/local/node/bin? [22:47] isaacs: Casperin: echo $PATH [22:48] Casperin: yeah [22:48] AAA_awright: tjholowaychuk: I'm trying to make a templating language even higher language than Javascript expressions inside Jade... to do the transforms/templating in DOM or whatever, before it generates the actual XML. Detect for-each elements and know to use a Javascript for loop, etc [22:48] Casperin: isaacs: /Users/g/local/node/bin:/usr/bin:/bin:/usr/sbin: + more [22:49] isaacs: Casperin: ok. then why can't node be found...? [22:49] isaacs: Casperin: are you running with sudo or something? [22:49] tjholowaychuk: AAA_awright: oh I see, then yeah you would need a Visitor that implements visitTag() and check the attrs etc, same with visitCode [22:49] AAA_awright: er, one that operates on a higher level than Javascript [22:49] Casperin: isaacs: I really don't know… I've had the same problem with mysql actually. Ended up doing aliases in .bash_profile [22:49] Casperin: isaacs: Too much of a newbie to know exactly what I'm doing wrong :( [22:50] isaacs: Casperin: well, unless you've set up an alias of some sort, then `which node` should be the node that gets run, and hte node that npm sees. [22:51] AAA_awright: tjholowaychuk: Ah cool thanks [22:51] Casperin: isaacs: well… "which node" only worked in the terminal after installing nodejs. Before that, no luck [22:51] Casperin: isaacs: actually.. let me try something [22:51] isaacs: Casperin: yeah. [22:51] isaacs: because there wasn't a node before you installed it [22:52] isaacs: Casperin: it's not there until you install it, so "which" won't find it [22:52] Casperin: yes, but if i open a new terminal, then "which node" doesn't return anything [22:53] Casperin: and it's not in the path of that terminal [22:53] fr0stbyte has joined the channel [22:53] Jamool has joined the channel [22:53] perezd: Error: ENOTCONN, Socket is not connected -- getting this in Cradle.js, anyone have any ideas? [22:53] fr0stbyte: this isn't related, but seems like as good a place as any. in LESS, can this be macrod? &:after { .clearfix-after(); } [22:55] hij1nx has joined the channel [22:55] dmcquay has joined the channel [22:55] tmpvar has joined the channel [22:56] eee_c has joined the channel [22:56] perezd: any advice as to what thats about? [22:57] markwubben has joined the channel [22:57] Casperin: isaacs: hah! I added export PATH=$HOME/local/node/bin:$PATH to .bash_profile and now it works. I'll have to look more into it later.. now it's time for messing around with nodejs :) [22:58] Casperin: isaacs: thanks for your help! [22:58] isaacs: Casperin: you've learned a valuable lesson about setting environment variables. [22:58] isaacs: Casperin: remember the power of "export". [22:58] isaacs: Casperin: if you ever have trouble sleeping, read through `man bash` [22:58] isaacs: srsly, it's very educational. [22:59] lorhko: 1,1 [22:59] Casperin: isaacs: I did run the export, like it said in the installation instructions.. I just didn't add it to .bash_profile [22:59] jano: isaacs, Casperin: http://apenwarr.ca/log/?m=201102#28 [23:00] Casperin: isaacs: and yeah… I once installed a bare bones debian on a test machine once. Having to install *everything* from scratch taught me a lot (but apparently not enough) [23:00] tjgillies: is node.exit() still around? [23:00] tjgillies: ReferenceError: node is not defined [23:01] techwraith: process.exit() [23:01] Casperin: haha isaacs, I'm a frontend guy. That stuff is way beyond me ;) [23:01] tjgillies: thnx [23:02] isaacs: Casperin: no excuses! [23:02] isaacs: ACTION is also a frontend guy [23:02] mscdex: success! [23:02] isaacs: Casperin: next to browser-wrangling and CSS quirks, this stuff is *easy* [23:02] isaacs: it doesn't alwyas seem so, but really, it's so much less mysterious, and works exactly how the docs say it does. [23:02] isaacs: the same can not be said for web browsers [23:03] Casperin: I'd be without a job if it did :P [23:03] isaacs: i guess i'm not really a frontend guy any more... [23:03] isaacs: since pretty much all my js is for node [23:03] isaacs: super spoiled by never ever having to do without es5isms [23:03] Casperin: I'm sort of doing a slow transition towards backend… html(5) and javascript (with nodejs!) will be the way to do that [23:04] Casperin: … i hope [23:04] SubStack: true enough! [23:04] SubStack: although browserify goes some distance towards making browser-side code more like node.js [23:05] Casperin: es5? seo stuff? eew :P [23:05] piscisaureus: warning C4133: '=' : incompatible types - from 'oio_accept_req *' to 'oio_accept_req *' [23:05] piscisaureus: ^- Not even C++ :-/ [23:05] tjgillies: man ruby has corrupted me, keep trying to invoke methods without () [23:05] SubStack: Casperin: es5 as in https://github.com/kriskowal/es5-shim [23:06] SubStack: tjgillies: try coffee script [23:06] insin: tjgillies: ಠ_ಠ [23:06] tjgillies: SubStack: im using coffeescript, you still need () to invoke a function to no args [23:06] tjgillies: s/to no/with no/ [23:06] SubStack: what [23:07] SubStack: oh I see [23:07] SubStack: interesting [23:07] tjgillies: like array.shift != array.shift() [23:07] SubStack: gives you a function reference [23:07] tjgillies: yes [23:07] SubStack: well that does seem nicer than having to &:foo [23:07] ckknight has joined the channel [23:07] tjgillies: which is great if thats what you meant to do [23:07] timmywil has joined the channel [23:07] Nexxy has joined the channel [23:07] flat: Hi all, I'm new here. I'm trying to require('child_process').spawn a proc and write to stdin intermittantly, which causes it to respond on stdout. I want to capture its stdout. My problem is that stdout.on('data', fn) does not get triggered until I call stdin.end(). Any ideas how I might get it to trigger earlier? [23:08] piscisaureus: flat: likely the program you're calling is buffering up its output [23:09] SubStack: flat: is the program doing any line buffering? [23:09] flat: Sounds like it. But it outputs lines for each input on the CLI. [23:09] dnolen has joined the channel [23:11] themiddleman_itv has joined the channel [23:11] flat: From what I can tell the stream is getting buffered by node. [23:11] kmiyashiro has joined the channel [23:13] isaacs: ircretary: tell jano That article is really interesting. Thanks :) [23:13] ircretary: isaacs: I'll be sure to tell jano [23:13] [[zz]] has joined the channel [23:15] sirkitree has joined the channel [23:16] hvgotcodes has joined the channel [23:17] Nexxy has joined the channel [23:17] hij1nx has joined the channel [23:20] dekz: morning gents [23:21] sorens3n: mornin [23:21] sorens3n: what time is it for you? [23:21] dekz: 9:21am [23:22] sorens3n: ehehe [23:22] sorens3n: 6pm here [23:22] sorens3n: morning comes at 6pm here [23:23] sorens3n: :D [23:24] mscdex: gah, the dreaded documentation writing! [23:24] mscdex: :( [23:24] samcday: mscdex, I hear dat! [23:25] dguttman_ has joined the channel [23:26] copongcopong has joined the channel [23:26] mscdex: there oughta be a utility that automatically creates the boilerplate stuff and fills in some information by looking at what's exported on the module [23:26] kriszyp has joined the channel [23:26] mscdex: heh [23:27] dguttman has joined the channel [23:27] mscdex: but then i guess you'd have to write documentation for that utility... [23:27] mscdex: ACTION shakes his fist in the air [23:29] delian66 has joined the channel [23:30] samcday: Hmm. I saw that HN article yesterday about SPDY and thought "hey, wouldn't it be cool to implement a spdy server in Node", turns out two other people already had the same idea lol [23:32] hasenj has joined the channel [23:33] arpegius has joined the channel [23:33] hosh_work has joined the channel [23:34] Venom_X has joined the channel [23:35] mscdex: yeah ryah and pquerna were discussing it earlier [23:36] mscdex: but does anyone besides google use spdy yet? [23:37] samcday: Negative. Only Chrome stable supports it [23:38] samcday: It's still in like, early draft status, but Google went ahead and sexed up their products with it 'cos they can :p [23:39] jesusabdullah: spdy? [23:39] samcday: jesusabdullah, compressed HTTP, in a nutshell [23:39] samcday: And multiplexed [23:40] liquidproof has joined the channel [23:40] samcday: Augments http, but ensures headers can be compressed, also has other cool next-gen stuff (like server push) [23:40] piscisaureus: ryah: if we are also going to put file stuff liboio it's going to be annoying [23:41] tbranyen: doesn't server push conflict with websockets? [23:41] bsparks has left the channel [23:41] piscisaureus: because unixes take utf-8 whereas winapi only supports utf-16 [23:41] Casperin: is 'express' the best (whatever that means) module for getting started with doing simple web tasks? … I'm totally new to nodejs [23:42] samcday: tbranyen, No, it's for assets [23:42] samcday: Like, say you load Google homepage, the server will send you the google logo image before you even ask for it. [23:42] tbranyen: ah right on [23:42] samcday: Pre-emptive resource loading, to prevent wasted round trips asking for assets the server already knows you'll need. [23:42] tbranyen: yeah thats dope [23:42] samcday: From the looks of things though, they haven't quite hit the nail on the head when it comes to caching [23:42] piscisaureus: ryah: btw i got rid of oio_(handle|req)_shared_s stuff [23:42] samcday: Since spdy is exlusively over SSL [23:44] mscdex: samcday: i meant site/server-wise, nobody but google supports spdy? [23:44] samcday: mscdex, Oh, no idea heh. [23:51] bartek has joined the channel [23:52] bartek: Hi there. I want to send a bunch of json data to a node instance, what exactly should I be using to watch for this data? Looks like I should use EventEmitter, but what event am I looking for? [23:53] beejeebus has joined the channel [23:54] ohtogo has joined the channel [23:55] tmpvar: bartek, 'data' [23:56] bartek: Hm, I'm doing this. server.on('data', function(data) { console.log(data); }); -- I'm sending a simple curl request with -d "message=foobar" but nothing is outputted? [23:57] exium has joined the channel [23:58] mikegerwitz: bartek: Can you gist/pastebin your code? Something may be odd before that event. [23:59] tmpvar: bartek, https://gist.github.com/910953