<  February 2012   >
Su Mo Tu We Th Fr Sa
          1  2  3  4
 5  6  7  8  9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29
00:00 sreeix joined
00:02 stelcheck joined
00:02 <zackattack> is it possible to use node in interactive mode; like, python -i ?
00:03 <benvie> there's no way to force it currently like with a flag
00:04 <zackattack> oic
00:04 <benvie> you can implement it though
00:04 <benvie> with a bit of playing with child_process
00:04 <zackattack> with require("repl")?
00:04 <benvie> not exactly
00:05 <benvie> that will start the repl but it won't be using the the TTY socket type
00:05 <jesusabdullah> man, lotta people asking for a node -i
00:05 <benvie> yeah
00:05 <jesusabdullah> someone get on adding that
00:05 <benvie> https://gist.github.com/1748873
00:10 _baton__ joined
00:13 yumike joined
00:13 <hemanth> jamescarr, child = exec("blah"); child.on('exit',function(code,sig) { if (code) return "DONE";}); missing something?
00:16 copongcopong joined
00:22 tofusoul left
00:23 stagas joined
00:24 tricon_ joined
00:26 ryan_stevens joined
00:27 davehamptonusa joined
00:27 jgaui joined
00:31 rwaldron joined
00:33 dimarr joined
00:37 spion joined
00:39 niloy joined
00:44 davehamptonusa joined
00:44 EhevuTov joined
00:44 davehamptonusa left
00:44 <JasonSmith> SubStack: Are you the new pseudo-maintainer of node-tap?
00:45 <JasonSmith> Wondering if there is .tapignore yet, so I can put couch tests or whatever in there too and not have tap nag me
00:45 polyrhythmic joined
00:45 <SubStack> seemingly
00:46 <SubStack> I usually do tap test/*.js
00:46 <SubStack> and put other stuff in subdirs
00:46 <rook2pawn> can you npm install from github? say a fork
00:46 <SubStack> yep!
00:46 <ningu> what about a spoon?
00:47 <SubStack> rook2pawn: go to the download tab in github and copy the tar.gz link into your package.json dependency
00:50 petrjanda joined
00:50 prestonparris joined
00:52 drgs joined
00:52 <jesusabdullah> also, git+ssh://github.com/rook2pawn/project.git should work
00:53 stagas joined
00:54 Jarred joined
00:56 mdaisuke joined
00:57 <rook2pawn> SubStack: would it look like "dependencies" : { "https://github.com/foo/modulename/tarball/master" : "" } ?
00:58 salva joined
00:58 RobWC joined
00:59 RobWC left
01:01 <Jarred> For some reason, I can't install coffeecup within my project http://hastebin.com/siwesicaxe
01:03 take_cheeze joined
01:04 kanzure joined
01:04 <jesusabdullah> rook2pawn: "modulename": "https://github.com/path/to/tarball.tgz"
01:05 kanzure left
01:05 kanzure joined
01:06 devongovett joined
01:06 <Jarred> After basicallyh everything, I get "npm ERR! message ENOENT, no such file or directory '/tmp/npm-1330322744559/1330322744559-0.8374743529129773/package/package.json'"
01:06 <Jarred> *after trying to install basically anything
01:06 <Jarred> via npm
01:07 <SubStack> rook2pawn: "dependencies" : { "beepboop" : "thegiturlgoeshere" }
01:09 <Jarred> Any ideas?
01:09 redir joined
01:12 shipit_ joined
01:14 jxie joined
01:14 Murugaratham joined
01:18 munichlinux joined
01:21 <Jarred> hm
01:21 <Jarred> Apparently its a permissions error
01:23 stagas joined
01:24 garrensmith joined
01:29 stonebranch joined
01:33 <niloy> I am getting this error when trying to install jshint
01:33 <niloy> niloy@Niloy-Laptop:~$ npm install -g jshint
01:33 <niloy> npm ERR! couldn't read package.json in .
01:33 <niloy> npm ERR! Error installing .
01:33 <niloy> npm ERR! Error: ENOENT, No such file or directory 'package.json'
01:33 <niloy> npm ERR! Report this *entire* log at <http://github.com/isaacs/npm/issues>
01:33 <niloy> npm ERR! or email it to <npm-@googlegroups.com>
01:33 <niloy> npm ERR! Just tweeting a tiny part of the error will not be helpful.
01:33 <niloy> npm not ok
01:34 unomi joined
01:34 garrensm_ joined
01:35 <strager> niloy: npm and node version?
01:35 <niloy> node: 0.4.9, npm: 0.2.19, I am on ubuntu
01:36 <strager> Those are seriously out of date.
01:37 <strager> Try this PPA: https://launchpad.net/~richarvey/+archive/nodejs
01:37 <niloy> ok thanks
01:37 boltR joined
01:38 <niloy> strager, should I add that link in the repo?
01:39 <strager> Hmm?
01:39 <niloy> nvm
01:39 <strager> sudo add-apt-repository ppa:richarvey/nodejs
01:40 Rob__ joined
01:41 jdeibele joined
01:42 garrensmith joined
01:42 yumatov joined
01:43 <hemanth> client = dgram.createSocket("udp4"); and client.send() is working on the interpreter, but not as a module :/ tired trying to figure out the issue
01:44 <JohnnyL> hm. have any of you attempted to call OpenGL through Node.js?
01:47 pvankouteren joined
01:48 benvie joined
01:50 <hemanth> https://raw.github.com/gist/a6334ce2269d4d3f5faa/a751a581dac339e93b21f17bf33fcfc3b2a3758e/udp.js what's wrong with that? I have a UDP server running for sure on that port and from the REPL it works well :/
01:51 tornad joined
01:54 tonist joined
01:54 Allyz joined
01:56 Murugaratham joined
01:56 Murugaratham joined
01:57 joaojeronimo joined
01:57 <hemanth> SubStack, facing issue with a simple UDP client, help me!
01:58 Renegade001 joined
01:58 <niloy> strager, I added the repo for nodejs, but it shows as "broken" when I am trying to install via synpatic
01:59 tonymilne joined
01:59 jdeibele joined
02:02 pid1 joined
02:02 airandfingers joined
02:02 <tonymilne> Does anyone have any Ubuntu OS security / node web app security experience?
02:03 <jesusabdullah> define 'security'
02:03 Skaag joined
02:03 <tonymilne> lol, yeah :S there is a company about to be sub-contracted to do a "security audit" for a node + iOS app that i have worked on which is running on Ubuntu based hosting,
02:04 <tonymilne> but i think they will be incredibly under-qualified to do the task justice (since i doubt they know node)
02:04 <jesusabdullah> well, I mean
02:04 <tonymilne> and think that the most important part of the audit is focusing on the iOS app.
02:04 sirPuppy31 left
02:04 <tonymilne> where as i would assume that checking our express based file uploads, permissions, etc, would be more important.
02:05 <tonymilne> just seeking opinions in this ara.
02:05 <tonymilne> *area.
02:05 MerlinDMC joined
02:05 <tonymilne> (we also use mongodb, redis, have ssl, use a node proxy server too)
02:05 niloy_ joined
02:06 <tonymilne> yet they are focusing on the iOS app and will "briefly" look at the other stuff.
02:06 mikeal joined
02:09 <jesusabdullah> probably gonna consist mostly of trying to find cracks where someone can learn more about your box than you intended and/or throw in some kind of injection attack
02:09 <tonymilne> jesusabdullah yeah, but back me up here if you have an opinion, but surely the server is the thing to focus on, not the iOS app!?!
02:10 <tonymilne> the app is just a view to the JSON based server API.
02:12 <airandfingers> is there a good module out there for serving up static files in such a way that users can navigate the static directory tree? i believe apache defaults to this, when displaying a directory with no index.html files
02:13 <jesusabdullah> tonymilne: I mean, I suppose it's possible for an iOS app to have vulnerabilities, but my instinct is that the server would be the thing to focus on yes
02:13 <jesusabdullah> keep in mind I know next to nothing about iOS apps
02:13 <jesusabdullah> airandfingers: My static module does that
02:13 <jesusabdullah> airandfingers: https://github.com/jesusabdullah/node-ecstatic
02:14 <jesusabdullah> it's still a work in progress but we're getting there!
02:15 <airandfingers> thanks jesusabdullah! i'll check this out shortly
02:15 <jesusabdullah> cool!
02:16 <jesusabdullah> I've been working on a new version for a while too, hopefully coderarity's work will lead to a release soon (I'm optimistic)
02:16 graeme_f joined
02:18 ronbas joined
02:18 <airandfingers> jesusabdullah: hm, it looks like coderarity forked node-ecstatic? i'm pretty new to the github scene - what does that mean, exactly? is he working on an independent branch of the same project?
02:19 JJMalina joined
02:20 <jesusabdullah> ah
02:20 vhishna joined
02:20 <jesusabdullah> It's an independent branch, but in the future he's gonna send me a pull request and his work will get pulled into my branch
02:20 <jesusabdullah> the nice thing with git is you can branch and merge willy-nilly
02:21 SamuraiJack joined
02:22 <jesusabdullah> Mine's the one on npm though
02:22 disappearedng joined
02:22 disappearedng joined
02:23 tonymilne left
02:27 Morkel joined
02:28 dingomanatee joined
02:28 <hermanjunge> jesusabdullah
02:28 <hermanjunge> Hi!
02:28 <hermanjunge> I think that I have a very good question
02:28 <jesusabdullah> oh?
02:29 <jesusabdullah> lay it on me hombre
02:29 <hermanjunge> What is the way to make a forEach or a do/while with process.nextTick()
02:29 <hermanjunge> this is the whole case
02:29 paera joined
02:29 <hermanjunge> I'm doing some db requests here and there
02:29 <hermanjunge> they take time
02:29 <hermanjunge> and I want a do/while running, watching a counter
02:30 <hermanjunge> var counter = 10
02:30 <jesusabdullah> look into caolan/async
02:30 <hermanjunge> if that counter reaches 0, bazzinga
02:30 <jesusabdullah> I'd use async.forEach
02:30 <hermanjunge> the problem is the foreach
02:30 <hermanjunge> sorry, the do/while
02:30 <hermanjunge> it can block the whole thing
02:30 <jesusabdullah> right
02:30 <hermanjunge> and nodejs isn's tail recursice
02:30 <hermanjunge> to make and erlang like
02:31 <hermanjunge> myFunction() { do_something; wait; myFunction() }
02:31 <jesusabdullah> https://github.com/caolan/async#forEach This guy, fo'srs
02:31 <hermanjunge> OK
02:31 <hermanjunge> thanks for the tip, as always
02:31 <jesusabdullah> hah! anytime
02:31 <hermanjunge> I'm working hard to be someday like the guys at nodejitsu
02:31 <hermanjunge> maybe next year I can bring you the towels HAHAHAH
02:32 hkjels joined
02:34 Joeysomo joined
02:36 vhishna left
02:37 shivhack joined
02:38 kurtzhong joined
02:39 vhishna joined
02:39 vhishna left
02:39 catlaya joined
02:40 Murugaratham joined
02:41 shivhack joined
02:41 bicranial joined
02:41 <jesusabdullah> pffsht
02:41 dannyamey joined
02:42 nicholasf joined
02:43 paera left
02:43 shivhack joined
02:43 emattias joined
02:43 shivhack joined
02:44 shivhack joined
02:44 tjmehta joined
02:44 jp232 joined
02:47 joeytwiddle joined
02:47 margle joined
02:49 ph^ joined
02:50 Joeysomo joined
02:50 yumike joined
02:50 Joeysomo joined
02:53 groom joined
02:53 <hkjels> Kind of mad at npm at the moment: https://github.com/isaacs/npm/issues/2207
02:54 ablomen joined
02:55 overthemike joined
02:57 gorekee joined
02:59 simenbrekken joined
02:59 sridatta joined
03:01 petrjanda joined
03:02 aliem joined
03:02 benjixx joined
03:02 ph^_ joined
03:03 <Chel> hi guys, im a novice in nodejs, and want to understand what im doing wrong, and how to do it in the right way. I want to pull 2 models from mongodb collections, and use them in the same scope, but mongodb-native-driver only accept callbacks. please help . this is the code snippet and question is in comment https://gist.github.com/d7706eb81afb521b6516
03:05 shivhack joined
03:05 Swaagie joined
03:08 shivhack joined
03:08 hipsterslapfight joined
03:10 vguerra joined
03:11 gasbakid joined
03:11 mikeal joined
03:13 shivhack joined
03:17 orkz joined
03:18 ppcano joined
03:19 rendar joined
03:19 icebox joined
03:20 fangel joined
03:20 <ljharb> Chel: use promises
03:21 hackband joined
03:22 <SubStack> https://github.com/substack/request-browserify-example/blob/master/entry.js
03:22 <SubStack> check THAT out
03:22 <SubStack> you can browserify request now
03:22 uchuff joined
03:23 fangel joined
03:23 <icebox> benvie: ping
03:24 Joeysomo joined
03:26 Hebo joined
03:26 gatorcoder joined
03:27 <diverdude> I have an application where im using socket.io/nodejs to keep a live connection with the client for chat while the actual webapplication is based on a normal apache/php single request connection. When the user is browsing around on my portal he loads a new page relatively often, when i do a io.connect("") everytime he loads a new page. Does that mean that the socket.io connection is also disconnected each time the user loads a new php pag
03:27 <diverdude> e or is socket.io intelligent enough to resume the socket.io connection on connection?
03:30 <stagas> diverdude: sounds like you need sessions
03:31 nodokodo joined
03:31 boltR joined
03:31 <diverdude> stagas: socket.io sessions?
03:31 bergie joined
03:32 nodokodo joined
03:33 [AD]Turbo joined
03:33 <diverdude> stagas: ?
03:33 <stagas> diverdude: dunno usually it's on the http layer, I think socket.io proxies the upgrade request
03:33 <[AD]Turbo> hi there
03:33 dwhittle joined
03:36 nodokodo joined
03:36 <abraxas> does libuv provide an alternative to libevent-like create_event? or do i really have to start talking to libev?
03:37 <abraxas> event_new i mean
03:37 overthemike joined
03:38 jkridner joined
03:39 JakeSays joined
03:39 Skola joined
03:39 jomoho joined
03:39 sdqali joined
03:40 hz joined
03:40 <stagas> SubStack: when will this madness end?? :P
03:40 salva joined
03:41 <stagas> we need a node.min.js and then require everything like norm
03:42 jabbslad joined
03:42 stonebranch joined
03:45 dpino joined
03:45 gdbz joined
03:46 <SubStack> stagas: I already wrote all the pieces previously, just had to refine them slightly
03:46 <diverdude> anybody?
03:49 whitman joined
03:51 gasbakid__ joined
03:53 stagas joined
03:53 <wereHamster> diverdude: you will not get around calling io.connect every time the user loads a new page.
03:53 dve joined
03:53 tornad joined
03:53 felixhummel joined
03:54 <diverdude> wereHamster: how do i then keep the connection?
03:54 <wereHamster> well, you can but then you'd have to make a 'single-page' application and update its content with JS instead of using plain http requests
03:54 <wereHamster> you can't
03:55 arvidkahl joined
03:56 Murugaratham joined
03:56 dwhittle joined
03:56 cosmincx joined
03:56 GodezInc joined
03:57 boltR joined
03:58 <diverdude> wereHamster: hmm right...so what i would do was to kinda keep a session with a userID so whenever a connection is established that connection should send a userid and i check if that user was logged on previously
03:58 <diverdude> and then i transfer that sessiondata
03:59 <diverdude> wereHamster: does that sound like an idea?
03:59 ph^_ joined
04:01 hipsterslapfight joined
04:01 Tricks_ joined
04:02 <diverdude> wereHamster: so basically "transfer" the socket.io connection on every php-page reload
04:02 josh-k joined
04:04 ccare joined
04:04 ccare joined
04:11 <CIA-102> node: 03tedsuo 07v0.6 * rcd4cb8e 10/ doc/api/_toc.markdown :
04:11 <CIA-102> node: docs: split TOC into two parts: overview and API
04:11 <CIA-102> node: Fixes #2090.
04:11 <CIA-102> node: Fixes #2336. - http://git.io/uuP7gw
04:13 stagas joined
04:13 <diverdude> wereHamster: ??
04:14 janjongboom_ joined
04:15 abraxas joined
04:16 fangel joined
04:17 dobber joined
04:18 tonist joined
04:18 <diverdude> anybody here?
04:19 erujolc joined
04:20 Behl joined
04:21 dbrain joined
04:21 aaronmcadam joined
04:22 <erujolc> im using request module along with a rss parser (feedme), basically the line is "request(fetchUrl).pipe(parser)", when the fetchUrl is down it crashed the node process with ECONNREFUSED, stratching my head about how to handle this error gracefully, any pointers?
04:24 <arvidkahl> from a quick google search
04:24 <arvidkahl> http://stackoverflow.com/questions/8843892/what-node-rss-module-handles-authentication
04:24 <arvidkahl> seems to have an example of how to catch that potential error
04:26 graeme_f joined
04:26 <arvidkahl> and the api at https://github.com/fent/feedme.js/blob/master/README.md kinda shows how to use the thing with .on events with createReadStream
04:26 <arvidkahl> scratch API, i meant readme
04:27 johnhamelink joined
04:27 Murugaratham joined
04:27 kwmiebach joined
04:30 <erujolc> thanks, investigating
04:30 <erujolc> arvidkahl, makes sense however was hoping to standardized on the request module for any http calls
04:30 <erujolc> it looks like i need to catch an error event on underlying response stream
04:31 lzskiss joined
04:31 <arvidkahl> yeah that would indeed be great if only people would stick to conventions :D
04:31 dpino joined
04:32 <arvidkahl> anything with a callback should throw you the error in the function(err, data) anyway
04:34 erikzaadi joined
04:36 jetienne_ joined
04:37 skeptic joined
04:38 ericmuyser joined
04:40 infynyxx joined
04:45 TomY joined
04:48 stagas joined
04:48 arduix joined
04:49 ppcano joined
04:50 bicranial joined
04:51 infynyxx_ joined
04:51 McMAGIC--Copy joined
04:52 aranw joined
04:53 infynyxx_ joined
04:53 kejun joined
04:55 Hanspolo joined
04:55 EdwardIII left
04:57 devaholic joined
04:57 hkjels_ joined
05:00 sandfox joined
05:00 paera1 joined
05:00 DuoSRX joined
05:00 paera1 left
05:01 meso joined
05:03 freewil joined
05:03 stagas joined
05:03 <freewil> whats the best mail lib for node?
05:04 [[zzz]] joined
05:06 robhawkes joined
05:06 <erikzaadi> exit
05:08 erikzaadi joined
05:09 <icebox> diverdude: http://www.danielbaulig.de/socket-ioexpress/
05:10 herbySk joined
05:10 <Doikor> freewil: mailer seems to work just fine. https://github.com/Marak/node_mailer
05:11 <freewil> lol flying toasters
05:11 Topcat joined
05:11 skylamer` joined
05:11 <freewil> Doikor, thanks
05:11 redir joined
05:11 <freewil> i think i might use nodemailer though
05:12 <freewil> seems more complex, but seems more flexible
05:12 <rendar> freewil: you have to send emails?
05:12 <Doikor> mailer is built ontop of nodemailer
05:13 <freewil> yeah just writing a quick node daemon to send out a mailqueue stored in pg
05:13 arduix joined
05:13 <rendar> so node_mailer is ok :-)
05:14 <hipsterslapfight> one of them doesn't work anymore iirc
05:14 <hipsterslapfight> was testing them out a few weeks ago and was having real issues with one of them
05:15 <freewil> node_mailer hasnt been updated in 5 months so im guessing its that one
05:15 erikzaadi left
05:15 davidbanham joined
05:16 erikzaadi joined
05:16 <hipsterslapfight> doesn't matter anyway, the syntax is 99% the same between them both
05:18 markwubben joined
05:19 erikzaadi joined
05:19 sgimeno joined
05:20 Wizek joined
05:23 Wizek_ joined
05:25 tvw joined
05:25 satyr joined
05:25 cjroebuck joined
05:27 `3rdEden joined
05:28 robi42 joined
05:32 __doc__ joined
05:33 jsull_ joined
05:34 uchuff joined
05:34 tomasztomczyk joined
05:36 erikzaadi joined
05:37 blup joined
05:38 shinuza joined
05:38 \mSg joined
05:39 <remysharp> Is there a known workaround for shebang node for fedora, since they have the nodejs binary? i.e. I'm doing: #!/usr/bin/env node but in fedora it needs to be looking for nodejs
05:41 wbednarski joined
05:42 erikzaadi joined
05:45 OmidRaha joined
05:45 <abraxas> if i want to hook (C code) my socket into libuv, is there any way i can have it do the select() behavior for me? or am i going to have to call select() myself each tick?
05:47 jldbasa joined
05:47 garrensm_ joined
05:51 jimmysparkle joined
05:53 DrPheltRight joined
05:54 hkjels_ joined
05:55 aranw joined
05:55 hkjels joined
05:57 gasbakid__ joined
05:57 fomatin joined
06:03 larsschenk joined
06:03 larsschenk left
06:05 c-spencer joined
06:08 AD7six joined
06:09 tokumine joined
06:09 gerard0 joined
06:10 Hourd joined
06:10 sridatta joined
06:11 sandfox joined
06:14 <benvie> goddamn node-gyp is awesome
06:15 nuclearsandwich joined
06:17 <chjj> benvie: yeah, i like it
06:18 <icebox> benvie: hi
06:19 <benvie> hello!
06:19 fermion joined
06:19 <icebox> benvie: thanks for https://github.com/tmpvar/jsdom/issues/360#issuecomment-3933198
06:19 <benvie> no problem =D node-gyp made it super easy!
06:19 <benvie> <3 node-gyp
06:19 <purr> Let it be known that benvie hearts node-gyp.
06:20 <benvie> last time it was a pain cause there was no documentation and I had to manually make the projects and figure out all the stuff
06:20 <benvie> this time it was like wham bam
06:20 antono joined
06:21 yumatov joined
06:21 <benvie> my only other experience with node-gyp was with tty.js which I knew wasn't going to work but I wanted to see what would happen
06:21 <benvie> unsurprisingly trying to compile a forkPty module on windows was less than successful
06:22 Edy joined
06:23 <benvie> chjj you should somehow digest all of this file and make it work in pty.js https://gist.github.com/1893415
06:24 <chjj> benvie: what am i looking at here? a windows terminal?
06:24 <benvie> you're looking at the only method I've ever heard of for forking a process (specifically terminal/cmd) that exists
06:24 <chjj> ooo its ReactOS code haha
06:24 AdamSeabrook1 joined
06:24 <benvie> using a large amount of internal windows apis
06:25 <benvie> it's most/all of the building blocks for forkPty on windows
06:25 <chjj> the problem is, even if that did work, tty.js is a vt100/xterm emulator
06:25 <chjj> i dont think the windows console is a real terminal emulator
06:25 <benvie> it basically reconstructs the entire thing piece by piece in order to fork it
06:25 <benvie> the environment, the memory, etc.
06:25 <benvie> so it is in fact a complete duplicate
06:26 <chjj> so i would have to write a windows "terminal emulator" or whatever windows does to make a black window with white characters in it
06:26 <benvie> yeah
06:26 <benvie> well really
06:26 <benvie> what needs to happen is a version of putty stripped down and compiled as a node module
06:26 <chjj> or somehow translate a windows "terminal" to a vt100
06:27 <benvie> which is doable and on my list
06:27 <benvie> or mintty
06:27 superjoe joined
06:27 <chjj> libuv does some goofy stuff to convert csi sequences to windows-language
06:27 <benvie> whatever can be done to rip out basically the minimal communications components to get it talking to libuv, and rendering
06:27 <benvie> no
06:27 beawesomeinstead joined
06:27 <chjj> but i think thats the opposite way i would want to go
06:27 <benvie> well yeah but
06:27 <benvie> to do it on windows you need to completely ignore the windows console bullshit
06:28 <benvie> you can't even use the windows console api to render
06:28 <benvie> talking to the windows api will be purely limited to making it maximally compatible/accessible from other programs but not for rendering or anything at all really aside from that
06:28 <chjj> the problem is, windows programs would be using the windows console api
06:29 daleharvey joined
06:29 <benvie> my understanding is that there's a better result that can be achieved than has been so far
06:29 <benvie> in terms of essentially hooking into the stdin/out streams of a defacto "console"
06:29 <benvie> while not using that window as the ultimate interface
06:29 <benvie> simply as a dummy to get other stuff treating you like a terminal
06:30 <chjj> the only reason tty.js works is because terminals originally talked over a serial port, i just use a websocket instead. if windows uses some weird internal api, i dont know if theres a way it could work.
06:30 <benvie> console2 is supposedly the one example of a program that takes this tact but it seems to do it pretty terribly
06:30 <benvie> it's possible to do that in windows..if you have a serial port
06:30 <benvie> which I won't
06:30 <benvie> I tried lol
06:30 <benvie> you can create a character device on a serial port in windows but you can't really fake the serial port part
06:31 <chjj> maybe i could get something working without any kind of complex behavior, it would just be a dumb terminal
06:31 <benvie> well I have a bit more grandiose goals maybe
06:31 <benvie> but i want a full real terminal on windows
06:31 <chjj> that would be cool
06:32 <benvie> I want essentially mintty or putty but not died to the mingw shit or anything beides nodes. Node can handle all the io, it just needs a renderer
06:32 <chjj> i just dont know how it could work, unless you could convince windows programs to spit out control sequences instead of using the windows console api
06:32 <benvie> node already does
06:32 <chjj> node goes the other way, it converts control sequences to windows console api
06:33 <benvie> I mean I can connect directly opening the file if I hack node a bunch to make it treat mintty like a tty instead of a pipe
06:33 <benvie> I can get colors and all that shit
06:33 <benvie> if it's just willing to output the escape sequences
06:33 <chjj> i should look at the mintty code
06:33 gut4 joined
06:33 <chjj> maybe theres a clue there
06:33 <benvie> the point is that these programs have full ansi parsers built in
06:33 <benvie> putty and all its descendents handle it all
06:33 <benvie> they don't let the OS do it
06:33 <benvie> like you're doing on the browser
06:33 <* chjj> looks at the mintty code.
06:34 niftylettuce joined
06:34 <benvie> that's how I get xterm-256 and near full unix compatability using cygwin
06:34 <benvie> the trick is to divorce it from all that cruft and just get the minimal bits out that node can't do
06:34 herbySk joined
06:35 jol joined
06:35 <chjj> so that is what you mean, you dont want a real windows console, you want a mintty type thing?
06:35 <benvie> I want a console that can be treated like one to everything else in windows but has its own renderer
06:35 <benvie> which isn't a solved problem quite, but it's close
06:35 <benvie> all the stuff that does it relies on mingw still
06:35 <icebox> benvie: I have been trying that contextify ...no require('bindings')?
06:35 <jol> could i get some guidance on wether on not Node.js is suitable for my project?
06:36 <chjj> well, im looking at the mintty code right now. ill try to see if i can figure it out.
06:36 <benvie> I just compiled the binary. I would assume you have to follow the conventions of the binding's module
06:36 <icebox> benvie: I get Error: Cannot find module 'bindings'
06:36 <benvie> which would be like
06:36 <benvie> yeah that's another module
06:36 <benvie> npm install bindings
06:36 <icebox> benvie: ah ok
06:36 <benvie> it handles the cross-platform lookups for compiled binaries
06:36 piscisaureus_ joined
06:36 <benvie> contextify uses it now looks like
06:37 <benvie> you'll need it in some specific direcotry too
06:37 <benvie> I think maybe contextify/out/Release or something
06:37 <benvie> the .node
06:37 misza222 joined
06:38 <icebox> benvie: the old folder was build/Release
06:38 <benvie> chjj I know some chunks of it will be implemented using various mingw platform stuff
06:38 <benvie> but I think most of that is just for hooking up the networking stuff
06:38 <benvie> which I'd defer largely to node if I was trying to relpicate it, if that's not obvious =D
06:39 <benvie> any of the windows API stuff is largely implemented in windows-terms with the mingw stuff
06:39 <jol> i have an application that calls 40 rows new rows from a db every 5 seconds or so with an ajax call to a php script, have only read a little about Node.js and was wondering would it be better for this?
06:40 <icebox> benvie: after installing bindings and putting the binary in build/Release it work nice... thanks
06:40 <benvie> awesome, good to know it worked there =D
06:40 wycats joined
06:40 tiglionabbit joined
06:40 <benvie> I just included the .node directly so I didn't get to make sure it worked like normal
06:40 <chjj> benvie: is mintty only meant to compile under cygwin? all of the code is rather unix-y
06:41 <chjj> looking at putty now
06:41 <benvie> yeah originally it was derived from putty and has mostly run under cyginw. Over the last year it's become runnable under mingw but that's still going to be unixy
06:41 <benvie> just less so
06:41 <benvie> but I think putty is the even more compatible one these days
06:42 <benvie> with normal windows stuff
06:42 <benvie> I need to look at the code in depth to see what it might take to do something with it as a node module
06:42 <benvie> the problem is that all these existing programs have this massive amount of old shoddy networking code that really is unnecessary
06:43 velo joined
06:43 <benvie> but burried in there is a bunch of gems for making shit work well on windows
06:44 <jol> i have an application that calls 40 rows new rows from a db every 5 seconds or so with an ajax call to a php script, have only read a little about Node.js and was wondering would it be better for this?
06:46 <benvie> node won't make that kind minmal usage faster but it'd probably provide more convenient db bindings for translating between db and front-end
06:49 sreeix joined
06:49 <benvie> putty has a massive amount of comments
06:51 blup joined
06:53 <benvie> I made a form in windows on node's main thead and use setTimeout to run the message loop
06:53 <benvie> it works =X
06:54 sj26 joined
06:55 <benvie> using ffi with a js function as the wndProc
06:56 Joeysomo joined
06:58 maritz joined
06:58 hkjels joined
07:03 erikzaadi joined
07:04 markwubben joined
07:10 herbySk74 joined
07:12 izepstan joined
07:12 tokumine joined
07:14 MartinCleaver joined
07:14 bnoordhuis joined
07:20 AndreasMadsen joined
07:21 ppcano joined
07:21 dob_ joined
07:21 gut4 joined
07:23 brianseeders joined
07:24 c0smikdebris joined
07:24 Joeysomo joined
07:26 xbayrockx joined
07:30 Vespakoen joined
07:30 pity joined
07:32 gw joined
07:32 <pity> hello, is there any way how to messure the among of data of request, which comes to nodejs http server?
07:32 vguerra_ joined
07:33 stagas joined
07:33 copongcopong joined
07:33 gw joined
07:34 d0k joined
07:34 tahu joined
07:35 garrettwilkin joined
07:37 jetienne_ joined
07:37 sreeix joined
07:37 Poetro joined
07:37 enmand joined
07:37 overlight joined
07:38 <garrettwilkin> Good Morning to anyone in or around EST
07:38 <garrettwilkin> I'm having a little trouble getting started with hook.io
07:38 <garrettwilkin> has anyone been able to get it going on node 0.7.x yet?
07:40 <agnat> hey, garrettwilkin!
07:40 <garrettwilkin> Hello!
07:41 <garrettwilkin> I saw your response to the issue
07:41 <garrettwilkin> https://github.com/agnat/node_mdns/issues/22#issuecomment-4192687
07:41 snearch joined
07:41 <garrettwilkin> so apparently its something in my environment
07:41 <agnat> yep, works for me ...
07:42 <garrettwilkin> okie doke
07:42 <garrettwilkin> so can i ask
07:42 <agnat> at least the mdns part ... not testing hook.io though ...
07:42 <garrettwilkin> any idea on where i can find the missing files that its looking for?
07:42 hatmam joined
07:43 <garrettwilkin> Is it really that this function is missing? DNSServiceGetAddrInfo
07:43 <hatmam> i have an application that gets 40 new rows from a sqlite db every 5 seconds or so, have only read a little about Node.js and was wondering if it would be better suited than just using an ajax call to a php script?
07:44 <agnat> normally ares.h is part of the node dist ... but that depends on how it is compiled (which libraries are shared &c.)
07:44 overlight left
07:44 <Dmitriju1> hatmam: if you are wondering about that, you shouldn't use node.js :)
07:45 <agnat> garrettwilkin: Well, yes. It's missing on systems using avahi ... but that's ok. mdns works around it ... that's why it is checking it ...
07:45 <garrettwilkin> ah okay
07:45 <Dmitriju1> hatmam: buisiness-wise, although, you could still checkout node.js for other things, because it is awesome
07:45 tdegrunt joined
07:45 <garrettwilkin> so its expected that ares would be missing in some cases
07:45 <garrettwilkin> In file included from /usr/local/include/node/node.h:61,
07:45 <garrettwilkin> from ../src/dns_service_enumerate_domains.cpp:4:
07:46 <garrettwilkin> I can recompile node
07:46 <garrettwilkin> if I need to
07:47 gut4 joined
07:47 <garrettwilkin> not worried about doing that
07:47 overthemike joined
07:47 fairwinds joined
07:47 <garrettwilkin> do you think that could help?
07:47 <agnat> garrettwilkin: no, no! ares.h has to be there ... somewhere ... it's required by uv.h which is core node ...
07:47 <hatmam> dmitriju1: lol, i've actually read abit and it seems like a better option, would just like an experts opinion
07:47 <maritz> garrettwilkin: just a heads up, it's morning everywhere right now. no need to restrict your greetings to EST.
07:47 sreeix joined
07:47 <agnat> garrettwilkin: not sure. I'd like to see verbose compiler output first ...
07:48 hkjels joined
07:50 erichynds joined
07:50 <garrettwilkin> oh okay
07:50 <garrettwilkin> so the fact that npm install is saying that it can't find it
07:50 <garrettwilkin> is a really really bad thing
07:51 looopy joined
07:52 icebox joined
07:53 <agnat> well, it's not like end of the world ... but something is messed up. Pretty sure we can sort it out though ...
07:53 <garrettwilkin> so how do i get the verbose compiler output?
07:53 <garrettwilkin> i just pulled node again
07:53 <garrettwilkin> so I'm going to run the install
07:54 <garrettwilkin> and see if that fixes it
07:54 braoru joined
07:54 RLa joined
07:54 <garrettwilkin> can i just do, ./configure, make, make install? Or do i need to pass -verbose in there?
07:54 <agnat> garrettwilkin: well, you could do that ... I was referring to mdns build output, like described in my comment ...
07:54 <garrettwilkin> oh okay
07:55 yumike joined
07:55 <garrettwilkin> gotcha
07:55 <garrettwilkin> ill do that
07:57 <maritz> imjp from r/node here? :D
07:57 <hatmam> i have this guy: http://mashface.net/llui/ , it fetches the pictures url from a db with an ajax call to a php script, and i plan on having new urls called every couple of seconds, would Node.js be more suitable for this than php and ajax calls?
07:59 <maritz> hatmam: juts simple rest calls basically? there's no real advantage in using node.js for just that. now, if you want to push the changes from the db via websockets to the browser (aka. live updates), node.js would be the better choice.
07:59 qsobad joined
08:00 <hatmam> maritz: yeah it works alright but just wondering if using Node.js now might come in handy down the line
08:01 _th_n joined
08:02 <garrettwilkin> are there reasons to stick with php and ajax?
08:02 <garrettwilkin> when node is an option?
08:02 <hatmam> only that i am familiar with them but thats not a real reason
08:02 <garrettwilkin> other than the obvious benefit of sticking to what you know
08:02 <hatmam> yeah exactly lol
08:02 <garrettwilkin> ha
08:02 Wizek joined
08:03 <hatmam> thats why i'm asking, is Node.js going to do a better job than php?
08:03 <hatmam> before i go and do it and see it won't work at all
08:03 shinuza joined
08:04 artusrocha joined
08:06 <garrettwilkin> agnat https://gist.github.com/1923632
08:06 <* agnat> looks
08:08 <maritz> hatmam: for the really simple usecase of doing an ajax request that returns 5 rows from a db, it really doesn'
08:08 <maritz> doesn't matter what you choose
08:08 <maritz> you could write that in lolcode if you wanted :x
08:09 <hatmam> : /
08:09 <maritz> or brainfuck, if that's more up your alley
08:09 MartinCleaver joined
08:09 margle joined
08:10 <agnat> garrettwilkin: yep, looks like it is broken on the node side ... what does 'ls /usr/local/include/node/ares.h' give you?
08:11 <garrettwilkin> ls /usr/local/include/node/ares.h
08:11 <garrettwilkin> ls: cannot access /usr/local/include/node/ares.h: No such file or directory
08:11 <agnat> k
08:11 <hatmam> maritz: yeah i know, have read some more about Node.js in the last 10 minutes as it was just a buzz word to me 10 minutes ago a couple of friends kept saying
08:12 <agnat> garrettwilkin: If you don't need 0.7.x downgrade to 0.6.11 ... if it has to be 0.7.x upgrade to 0.7.5 (or head)
08:13 <garrettwilkin> okay
08:13 <maritz> hatmam: good. now, if you don't mind learning new languages and environments and don't need this to be done in 5 minutes and have it run in a huge production environment, you can go with node.js. :)
08:13 jaw187 joined
08:13 looopy joined
08:13 francisl joined
08:14 <garrettwilkin> making latest node now...
08:15 <hatmam> maritz: lol, thanks for the help
08:16 <garrettwilkin> hatman
08:16 <garrettwilkin> have you checked out hook.io?
08:16 <garrettwilkin> i think its kinda mindblowing
08:16 <augustl> why isn't the node core vm module doing what the 3rd party contextify module does?
08:16 cha0s joined
08:16 cha0s joined
08:18 neebz joined
08:19 <hatmam> garrettwilkin: looks useful, reading about it now
08:19 <neebz> Hello. I am creating an iPhone app with an expressjs backend. How can I manage session? I'll prefer some token-based approach. Is there any library for that?
08:20 pvankouteren_ joined
08:20 <RLa> anyone tried this IDE: https://www.ebayopensource.org/index.php/VJET/HomePage ?
08:21 <RLa> it's eclipse plugin
08:21 <RLa> and comes with its own fancy type annotations
08:21 yawNO joined
08:21 erikzaadi joined
08:23 <yawNO> \o/
08:24 hotchkiss joined
08:24 <maritz> yawNO is here /o\
08:25 <yawNO> maritz: shut up and have some bamboo
08:25 <maritz> ok. :(
08:25 <yawNO> thought i should nane my next project Panda
08:25 <* maritz> munches on the bamboo that was unlovingly thrown in his cage.
08:25 <yawNO> and the stuff substaining it Bamboo
08:25 st_luke joined
08:25 <garrettwilkin> woo hoo
08:26 <yawNO> i dont know what my next project will be though
08:26 <agnat> garrettwilkin: ;-)
08:26 thetristan joined
08:26 <garrettwilkin> mdns builds on node 0.7.6-pre!
08:26 <yawNO> me needs node 0.8
08:26 <garrettwilkin> so now…
08:26 <yawNO> i dont really like the idea of using 0.7.x
08:26 <yawNO> uhm
08:27 <agnat> mdns ALL the node versions ;-)
08:27 cjroebuc_ joined
08:27 <garrettwilkin> how do i make hook.io use this version of mdns that i just compiled/
08:27 <garrettwilkin> or…
08:27 <garrettwilkin> maybe it doesn't matter, cause the version in the hook.io module directory
08:27 <garrettwilkin> should compile as well
08:27 <garrettwilkin> since i updated my node version
08:27 <agnat> you shouldn't have to ... just do 'npm install hook.io'
08:28 <agnat> precisely
08:28 <yawNO> maritz: i cant believe a fw that lets you code once and exposes both api and html does not yet exist
08:28 <yawNO> :(
08:28 <yawNO> are you aware of any?
08:28 jamescarr joined
08:28 <garrettwilkin> sweet!
08:28 <garrettwilkin> i can't npm install hook.io
08:29 <garrettwilkin> as of last night, it didn't like npm 1.1
08:29 <garrettwilkin> had a strict dependency on npm 1.0.x
08:29 <garrettwilkin> but i did a manual npm link
08:29 <garrettwilkin> seems to have worked!
08:29 <garrettwilkin> thanks agnate!
08:29 <garrettwilkin> err
08:29 <garrettwilkin> agnat!
08:29 <agnat> np. you're welcome.
08:30 <neebz> I am creating an iPhone app with an expressjs backend. How can I manage session? I'll prefer some token-based approach. Is there any library for that?
08:31 <garrettwilkin> how do you only have 21 followers
08:31 <garrettwilkin> if you created node mdns? I thought awesome node programming == lots of followers
08:31 briancray joined
08:33 Vespakoen joined
08:34 <agnat> garrettwilkin: don't know. Maybe because i just started to tweet a bit more ... and most of it is german which doesn't help either ;-)
08:34 eldios joined
08:34 <garrettwilkin> In that case
08:34 <garrettwilkin> danke
08:35 satyr joined
08:36 zagabe_l joined
08:36 <Topcat> Can you do things based on time with node? like a timetable
08:37 <garrettwilkin> there's probably a timer module with events that you can register for
08:38 Virendra joined
08:38 <Topcat> can you trust a js timer to be accurate/
08:39 c0smikdebris joined
08:39 dnolen joined
08:39 webguynow joined
08:39 merlin83 joined
08:39 <garrettwilkin> i don't know, why not?
08:39 <garrettwilkin> how accurate do you need it to be?
08:41 <Topcat> I made a timetable in the browser ages ago and by the end of the day it could be hours off the real time. can you trust js to keep with system time ?
08:41 <tmike> as long as you verify on the back-end that it's sane
08:42 <Virendra> node.js started with process as in input.. I want to use the node js libs in on of the project.. but how can i start the node js.. what should i pass as process here?
08:42 <garrettwilkin> http://stackoverflow.com/questions/8263652/node-js-accurate-timer
08:42 <sriley> if youre using getInterval/setTimeout and only use the date once at start then yea that wont be accurate
08:42 <garrettwilkin> why not have the time running server side
08:42 <garrettwilkin> and just notify the client?
08:43 <garrettwilkin> shouldn't that be more accurate?
08:43 <Topcat> yeah that makes more sense, but how can have node emit and event as say 11am ?
08:44 <Virendra> node.js has this... (function(process) {......}
08:44 <Virendra> what can i pass in process to use this as a lib ?/
08:45 <tmike> huh?
08:45 <garrettwilkin> i don't know off the top of my head
08:45 <garrettwilkin> but apparently theres a microtime module
08:45 <Virendra> i want to use node js lib for other node independend project.. but it's lib has process reference at so many palces
08:45 <garrettwilkin> have you searched github / nom?
08:45 <garrettwilkin> *npm?
08:46 <tmike> Virendra: try browserify?
08:47 <tmike> https://github.com/substack/node-browserify
08:47 plutoniix joined
08:47 <Virendra> thanks tmike.. but I wanted to use this in titanium appcelerator..
08:48 <Virendra> do u think this will help there?
08:48 <tmike> fire it up and see. You're writing in JS, right?
08:48 lazyshot joined
08:48 <Virendra> yes
08:48 <Virendra> i m writing in js..
08:49 <tmike> what does appcelerator target? browsers?
08:49 kurtzhong_ joined
08:49 <Virendra> this is mobile application development platform.. this will be some views.. not browser..
08:49 louissmit joined
08:49 <tmike> give it a shot
08:50 <tmike> write something simple and stupid. if it runs, you're probably good
08:50 <Virendra> ok..thanks for the inputs..
08:50 <Virendra> ok..
08:50 <Virendra> any other suggestion?
08:50 codejunky_ joined
08:50 <tmike> nope. I really have no idea what I'm talking about. I'm making it up as I go along.
08:51 <Virendra> ok..
08:51 <Virendra> anyways thanks
08:51 jaw187 joined
08:51 LBRapid joined
08:52 <tmike> sure. hope it helps
08:53 <maritz> yawNO: i don't understand your question? fw? firewall?
08:53 <yawNO> framework
08:53 <yawNO> you just code stuff once and you get APIs and regular html interface
08:54 <yawNO> without having to code two services
08:56 AaronMT joined
08:57 ryanfitz joined
08:57 yawNO joined
08:57 <yawNO> woops did i miss something?
08:57 Tricks_ joined
08:57 <yawNO> bad internet :<
08:59 vkareh joined
09:00 jxie joined
09:01 thinkt4nk joined
09:01 joshwines joined
09:01 codejunky_ joined
09:02 rwaldron joined
09:02 Wa joined
09:02 nibblebot joined
09:03 mansoor joined
09:03 <maritz> i still don't get it
09:04 <maritz> why do you have two services?
09:04 <maritz> and who was phone?
09:04 <yawNO> if i wanted to code a website
09:04 <yawNO> and to have that website to provide APIs
09:04 <yawNO> i'd use either a backend with a static frontend
09:05 <yawNO> or either a website with apis running as another service
09:05 <yawNO> got it?
09:05 benjixx_ joined
09:07 <maritz> uhm
09:07 <yawNO> but what if i wanted to code a platform that responds to json with json and to browser calls with html
09:07 Cromulent joined
09:07 <yawNO> dealing different auths for every Accept headers for instance
09:07 <maritz> oh, ok
09:07 <yawNO> there's no such framework afaik
09:08 csteen joined
09:08 <maritz> you don't really need much of a framework for that. just a good mvc structure. then have different views for .json and .html and let the router tell the controller which view to chose
09:09 <yawNO> of course, and you could do the same with the auth system
09:10 <yawNO> but having a structure at the bottom would semplify a lot
09:10 <yawNO> that's what frameworks are for
09:12 rauchg joined
09:13 <maritz> i'm still not sure what the problem is. essentially you'd create a layer on top of res.render() that looks at the request (or something provided by the router) to decide whether the data form the controller (or route handler) shoudl be passed to res.render('somefile.json') or res.render('somefile.jade'). that's like 5 lines of code?!
09:13 MartinCleaver joined
09:13 MartinCleaver joined
09:13 st_luke joined
09:13 savardc joined
09:13 <yawNO> how about auth? you can't use oauth on the web
09:14 <yawNO> (tecnically you could but doesnt really make sense)
09:14 <yawNO> but yeah.. prolly you're right.. i'm overestimating it
09:14 robi42 joined
09:14 jyp joined
09:16 tmcw joined
09:17 lduros joined
09:17 gerard0 joined
09:18 fasecharmer joined
09:18 volkan_ joined
09:20 Wa joined
09:21 fumanchu182 joined
09:21 fumanchu182 joined
09:21 Glenjamin joined
09:22 st_luke joined
09:24 briancra_ joined
09:24 nuthinking joined
09:25 <maritz> wait, auth shouldn't have anything to to with how you render your data?!
09:25 <maritz> completely different layer
09:25 <nuthinking> hi guys, is there anyone familiar with the chat.nodejs.org code base?
09:25 <maritz> ideally before the controller or at the start of it
09:26 <yawNO> maritz: yup
09:26 <nuthinking> after 5 calls no ajax call reaches the server anymore
09:26 <maritz> nuthinking: it's a rather simple piece of code if i remember correctly. just state your questions ;)
09:26 kwmiebach_ joined
09:26 dthompso99 joined
09:26 dthompso99 left
09:27 <nuthinking> maritz: yep, it's pretty simple, and I even tried to make it simpler but probably broke it on the way: http://stackoverflow.com/questions/9465000/chat-nodejs-long-polling-and-broadcast
09:27 <maritz> nuthinking: http://chat.nodejs.org/ seems to work fine?!
09:27 <maritz> oh, oka
09:27 <maritz> y
09:27 <nuthinking> maritz: yep, but I wanted something simple, so I started to remove stuff! :D
09:27 snoj joined
09:27 <RLa> btw, i think most browsers can only make 8 connections to a server
09:27 <nuthinking> maritz: I quite like that it doesn't use socket.io (I guess)
09:28 <nuthinking> RLa: but isn't a connection killed when the ajax result is returned?
09:28 <maritz> nuthinking: there's a lot of kinks to websockets/longpolling afaik. using one of the abstraction layers seems like a good idea to me. doesn't need to be socket.io, there are others :)
09:28 <nuthinking> chat.nodejs seems to use simply ajax
09:29 <nuthinking> maritz: we'll, I tried nowjs and had issues there as well
09:29 thomblake joined
09:29 <nuthinking> maritz: I wouldn't mind to keep the solution with less dependency as possible so that it might run on a cheap and shared hosting
09:29 thomblake left
09:29 <nuthinking> maritz: I think that ajax will be ideal for me, do you know any layer based on that?
09:29 Eruadan joined
09:30 <maritz> websockets cost less than ajax calls for something like a chat, afaik
09:30 <maritz> (resource wise)
09:31 hz joined
09:31 <nuthinking> maritz: but it might require bigger control over the IP address, etc... no?
09:31 <maritz> uh, no?!
09:31 <maritz> :D
09:31 <nuthinking> well, I have a domain at the end of the day
09:32 <nuthinking> so also if it is a share hosting, I should still be able to open a port
09:32 Alpha|_| joined
09:32 <nuthinking> if only nowjs would work then! :)
09:32 Wizek joined
09:34 versicolor joined
09:34 <tmike> Can you use handlebars programmatically?
09:35 <tmike> or just precompile templates and serve the precompiled templates with <script> tags?
09:35 nibblebot joined
09:37 Wa joined
09:37 <tmike> probably best to precompile and serve the precompiled templates, dynamically precompilingand serving sounds like a huge mess
09:38 kriszyp joined
09:39 joshfinnie joined
09:40 bradleyg joined
09:41 jdeibele joined
09:42 ceej joined
09:42 Wizek joined
09:42 chrisinajar joined
09:43 bkaney joined
09:43 jetienne_ joined
09:43 bbbb joined
09:44 csteen joined
09:44 gerard0 joined
09:44 adambeynon joined
09:45 Sahua joined
09:45 <nuthinking> did anyone manage to use nowjs on Snow Leopard?
09:46 Sahua left
09:47 willwhite joined
09:47 CarlosC joined
09:49 Eruadan joined
09:49 crutex joined
09:49 ohtogo joined
09:50 Destos joined
09:50 jtsnow joined
09:51 rwaldron joined
09:52 h00k1 joined
09:52 BillyBreen joined
09:53 jocafa joined
09:54 barberdt joined
09:56 herbySk joined
09:56 stafamus joined
09:56 diva joined
09:57 c0smikdebris joined
09:57 baudehlo joined
09:58 c4milo joined
10:00 gut4 joined
10:01 jaha joined
10:01 infynyxx joined
10:02 TooTallNate joined
10:02 boltR joined
10:05 RyanD joined
10:06 fmeyer joined
10:07 cjm joined
10:11 phidah joined
10:13 stagas joined
10:13 pid1 joined
10:14 arvidkahl joined
10:14 nibblebot joined
10:14 lz joined
10:15 aheckmann joined
10:15 shellox joined
10:16 robi42 joined
10:23 lackac joined
10:23 stagas joined
10:24 CarterL joined
10:25 misza222 joined
10:26 zgohr joined
10:28 colinclark joined
10:29 gsmcwhirter joined
10:29 <wingie> pwd
10:29 hackband joined
10:31 <jocafa> . /Users/wingie/code/omg/wtf/how
10:33 YoY joined
10:35 troy-- joined
10:36 mandric joined
10:36 isaacs joined
10:40 bfredrikb joined
10:41 RyanD joined
10:41 xtianw joined
10:41 enmand joined
10:42 c0smikdebris joined
10:42 DavidIAm joined
10:42 <maritz> why is catb0t still gone?
10:43 <maritz> i want mah catb0t back!
10:43 JoshJensen joined
10:43 pid1 joined
10:45 ken-ignite joined
10:46 illourr joined
10:47 ken-ignite joined
10:48 GodezInc joined
10:49 cesconix joined
10:50 nicki9knuckles left
10:51 Skaag joined
10:52 Venom_X joined
10:52 savardc joined
10:52 porco joined
10:53 Vainoharhainen joined
10:53 RyanD joined
10:54 thinkt4nk_ joined
10:54 csteen joined
10:55 <Vainoharhainen> hi! I'm trying node.js out and trying to read a file with "fs" lib.
10:55 <Vainoharhainen> but this function returns undefined http://pastebin.com/gBV0nRbf
10:55 <Vainoharhainen> Its seems like it not wait for a return from readFile
10:55 bkaney joined
10:56 <DavidIAm> its async, isn't it?
10:56 garrensm_ joined
10:56 jocafa joined
10:57 <chjj> Vainoharhainen: where did that file descriptor come from?
10:57 broofa joined
10:57 <Vainoharhainen> chjj: what do you mean? i read here http://onteria.wordpress.com/2011/06/02/different-ways-to-read-in-files-using-node-js/
10:58 <Vainoharhainen> I want my function "lasFil" to return the content of a file.
10:58 <Vainoharhainen> but its not waiting for return =/
10:58 thetristan joined
10:58 <chjj> Vainoharhainen: youre using a variable called `fd`
10:58 wbednarski joined
10:58 <tuhoojabotti> Vainoharhainen: Höhö.
10:58 <chjj> Vainoharhainen: but i dont see you open a file anywhere to get an fd
10:59 <tuhoojabotti> Vainoharhainen: Mainos: #javascript.fi IRCNetissä.
10:59 <Vainoharhainen> chjj: wups then i missed something when i copied from he's site. Dident get it to work by my self. brb will check it out.
10:59 joshsmith joined
10:59 <Vainoharhainen> tuhoojabotti: minä ei ossa suomi *haha*
10:59 <tuhoojabotti>
10:59 <Vainoharhainen> tuhoojabotti: im just half finnish =) 50% swe 50% fin =)
10:59 <tuhoojabotti> det är inte bra, ja
10:59 <chjj> Vainoharhainen: if you just want to read an entire file, all you need is fs.readFile, fs.read is a much lower level interface. it just wraps read(2)
10:59 l_h2o_l joined
11:00 <tuhoojabotti> True.
11:00 <Vainoharhainen> chjj: i need to wrap it bc its to my bot :P
11:00 <Vainoharhainen> so i need to make a function of it.
11:00 Vespakoen left
11:00 CarterL joined
11:01 Wizek joined
11:01 <Vainoharhainen> chjj: if you check my function you see that i have return "error:"
11:01 <Vainoharhainen> in console.log i get
11:01 <Vainoharhainen> File could not be opened: Error: Unknown encoding
11:01 <Vainoharhainen> but its returns "undefined" :S
11:01 <Vainoharhainen> it sould return the error =/
11:01 <chjj> Vainoharhainen: you dont pass flags to readFile
11:02 <chjj> Vainoharhainen: try fs.readFile('filename', 'utf8', function(err, data) { ...
11:02 jtsnow joined
11:04 <Vainoharhainen> Okey buts that not the big problem atm.
11:04 <Vainoharhainen> I want it to return the error
11:04 <Vainoharhainen> but lasFil just returns undefined =/
11:04 <chjj> i dont understand what youre saying. you said you got an error already
11:05 <chjj> Vainoharhainen: you need to pass a callback to your function and then execute it
11:05 napperjabber joined
11:05 <Vainoharhainen> okey if i run "console.log(lasFil("test")); its return Undefined but it sould return "Unknown encoding"
11:05 <chjj> function lasFil(filename, callback) {
11:05 <chjj> and then execute `callback(err, data)
11:05 devongovett joined
11:05 tjholowaychuk joined
11:05 <Vainoharhainen> dont get it atm :P
11:05 <chjj> when you do things asynchronously you can just return values
11:06 <Vainoharhainen> okey
11:06 Phoenixz joined
11:06 <chjj> cant*
11:06 <chjj> Vainoharhainen: you need to pass a callback to your function, just like you did with fs.readFile, but you need to execute it yourself
11:07 <chjj> Vainoharhainen: function lasFile(filename, callback) { fs.readFile('file', 'utf8', function(err, data) { callback(err, data); }); }
11:07 <chjj> like that
11:07 kmiyashiro joined
11:07 <Vainoharhainen> okey
11:07 <Vainoharhainen> is callback some global function in js/nodejs?
11:08 <chjj> Vainoharhainen: no, its just a parameter for that function
11:08 <chjj> Vainoharhainen: you will call your function like: lasFile('./file', function(err, data) { console.log(data); });
11:10 carlyle joined
11:11 wingie joined
11:11 rio{ joined
11:11 RyanD joined
11:12 themiddleman_itv joined
11:13 Vennril joined
11:13 rick_ joined
11:13 robi42_ joined
11:14 sorensen__ joined
11:15 _tors joined
11:15 ovnicraft joined
11:16 yawNO joined
11:16 shipit_ joined
11:17 <Vainoharhainen> chjj: thanks !
11:17 <Vainoharhainen> 17:16 Vainoharhainen !loadModule test
11:17 <Vainoharhainen> 17:16 botfan error:null data:Hej hej
11:17 <Vainoharhainen> :) worked
11:18 ningu joined
11:18 pendlepants joined
11:18 chunhao_ joined
11:19 <chjj> Vainoharhainen: cool
11:21 <nuthinking> is there a way I can debug this ajax issues I am having, that after 5 calls or so the server doesn't answer anymore to calls to the same client?
11:21 kevwil joined
11:21 savardc joined
11:22 carlyle joined
11:22 zemanel joined
11:22 broofa joined
11:23 HardFu joined
11:23 TheJH joined
11:23 f1gm3nt joined
11:23 landlessness joined
11:24 joshthecoder joined
11:25 rwaldron joined
11:26 philips joined
11:26 themiddleman_itv joined
11:28 QaDeS joined
11:28 davehamptonusa joined
11:28 thetristan joined
11:28 jimmysparkle joined
11:28 <stagas> nuthinking: the connections probably don't end so the client reaches its limit
11:28 broofa joined
11:29 <nuthinking> stagas: that's what I thought
11:29 <yawNO>
11:30 <nuthinking> stagas: but don't you just end the connection with res.end()?
11:31 Poetro joined
11:31 <nuthinking> stagas: I am using this: https://github.com/ry/node_chat/blob/master/fu.js
11:31 ekryski joined
11:32 davehamptonusa left
11:32 <stagas> nuthinking: last commit on 2010 maybe it's broken
11:33 <nuthinking> the demo app seems to work: chat.nodejs.org
11:34 kevwil joined
11:34 caolanm joined
11:35 pokoli joined
11:35 jmar777 joined
11:35 tvw joined
11:37 looopy joined
11:37 jzacsh joined
11:37 jzacsh joined
11:37 fatjonny joined
11:38 unomi joined
11:38 perezd joined
11:39 daveman_tn2 joined
11:40 vkandy joined
11:41 ricardooo joined
11:41 <ricardooo> hi
11:41 jerrysv joined
11:41 davidsklar joined
11:41 <DavidIAm> greetings
11:42 <DavidIAm> greetings(function(answer){send.tochannel(answer)})
11:42 <DavidIAm> hyuck.
11:43 margle joined
11:43 alvaro_o joined
11:43 BillyBreen joined
11:44 <RLa> hm, how most node db libs handle queries through single connection?
11:44 gasbakid joined
11:45 vbabiy joined
11:45 <RLa> i'm getting db-mysql constantly segfaulting when doing same query twice at the same time
11:45 ts__ joined
11:45 <RLa> mysql docs seems to indicate than single connection only supports single query at a time
11:46 simenbrekken joined
11:46 <RLa> and there seems to be no guard against violating this from node
11:46 <DavidIAm> interesting.
11:46 jj0hns0n joined
11:46 Qalqi joined
11:46 <DavidIAm> I guess there'll have to be some sort of wait-state for reply then.
11:47 <RLa> a simple queue would work
11:47 steveoh joined
11:47 <DavidIAm> true.
11:47 <DavidIAm> with one worker per connection.
11:47 <RLa> i just wonder whether some db connection library handles this at all
11:48 GodezInc joined
11:48 <RLa> otherwise it will end very badly when you deploy and overlook this issue
11:48 <DavidIAm> I don't have any answer to that personally, just so you know I'm not ignoring the question.
11:48 ryanfitz joined
11:49 themiddleman_itv joined
11:49 hij1nx joined
11:50 boltR joined
11:50 sh1mmer joined
11:51 <illourr> good mornin
11:51 triptec joined
11:51 <yawNO> it's 6 pm
11:51 <yawNO> >:(
11:51 <illourr> england?!
11:51 <illourr> or where hah
11:51 <yawNO> nop italy
11:51 <yawNO> hahaha
11:52 <illourr> cool
11:52 tokumine joined
11:53 sh1mmer joined
11:53 garrensm_ joined
11:54 EhevuTov joined
11:54 themiddleman_itv joined
11:56 pickels joined
11:57 steveoh left
12:00 [[zz]] joined
12:00 <dob_> Somebody online? I want to write a mysql -> mongo converter. And have to select a few million rows from a database. Which mysql module should i choose?
12:01 joshthecoder joined
12:02 tdegrunt joined
12:03 gut4 joined
12:05 ryan_stevens joined
12:05 echobucket joined
12:05 criswell joined
12:05 schofld joined
12:05 Zzaichik joined
12:06 looopy joined
12:06 RobWC joined
12:06 francisl joined
12:06 RobWC left
12:06 <schofld> hello everybody
12:06 francisl left
12:08 <eldios> yawNO, still there?
12:09 isao joined
12:09 cha0s joined
12:09 rtgibbons joined
12:09 <yawNO> eldios: yes
12:09 <eldios> query =)
12:10 <yawNO> ask here
12:10 merlin83 joined
12:10 margle joined
12:11 voodootikigod joined
12:11 snsr joined
12:11 felixhummel joined
12:11 sh1mmer joined
12:12 sh1mmer joined
12:12 blueadept joined
12:12 shinuza joined
12:12 unomi joined
12:13 dnyy joined
12:13 <maritz> xD
12:13 chjj joined
12:14 petrjanda joined
12:15 kcf joined
12:15 mcav` joined
12:15 <yawNO> hi mcav`
12:15 retornam joined
12:18 joetechbob joined
12:19 maletor joined
12:19 DeepEd joined
12:21 airandfingers joined
12:22 <airandfingers> jesusabdullah: i set up ecstatic and the directories are displaying well (when they're not empty), but when I click on a file, I get "Cannot GET /[path]/[file]". Should I be getting the download prompt for the file?
12:23 bindr joined
12:23 ericmuyser joined
12:25 pickels joined
12:26 ohtogo joined
12:26 cha0s joined
12:26 cha0s joined
12:26 gr-eg joined
12:28 themiddleman_itv joined
12:29 <jaha> anyone have any good resources for using zeromq and node.js
12:29 tornad joined
12:29 _tors_ joined
12:31 wendall911 joined
12:31 _tors_ joined
12:31 dnolen joined
12:32 willwhit_ joined
12:34 ryan_stevens joined
12:35 wiwillia joined
12:36 adamkittelson joined
12:36 spion1 joined
12:36 raenger joined
12:36 bindr joined
12:39 rickibalboa joined
12:39 pizthewiz joined
12:40 iangreenleaf joined
12:40 slloyd joined
12:41 kenperkins joined
12:42 tylerstalder joined
12:43 donokuda joined
12:44 voodootikigod joined
12:44 disappearedng joined
12:44 willwhite joined
12:49 neshaug joined
12:49 nicki9knuckles joined
12:51 ericmuyser joined
12:51 Wizek joined
12:52 markdaws joined
12:52 whaley joined
12:52 pvankouteren joined
12:54 aranw joined
12:55 colinclark__ joined
12:56 itayneeman joined
12:58 wbednarski joined
12:58 <RLa> dob_, this far i have found this one to be fastest: https://github.com/felixge/node-mysql
12:58 <RLa> and it does not segfault like the other one
12:59 antono joined
12:59 <dob_> RLa: But there seems to be a limitation of the SELECT sizes. Is that correct?
12:59 <RLa> you mean limitation on returned rows?
12:59 <dob_> Todo: Packet's > 16 MB
12:59 <dob_> Yes
13:00 <RLa> that seems to be single packet
13:00 <dob_> Packet means a single row?
13:00 ryanfitz joined
13:00 jabbslad joined
13:01 fangel joined
13:02 volkan joined
13:02 <RLa> no
13:02 <RLa> i actually have no idea
13:02 sarlalian joined
13:03 <RLa> i just selected 200k rows of strings (3-8 + 150 chars) from db
13:03 <RLa> works well
13:04 <dob_> RLa: I will try that! I will have to select about 5M rows :-)
13:04 <dob_> RLa: Thanks for your help!
13:04 <RLa> 200k took 3.5 secs here (mysql server is on old p4)
13:04 dgathright joined
13:04 <RLa> btw, i'm getting mysql outperforming mongo in reads here too :)
13:05 <RLa> dob_, anyway, do you have blobs in rows?
13:05 <ningu> is there a good mysql orm? one that doesn't just work but does validation, joins, etc?
13:06 jsurfer joined
13:06 <ningu> I am a bit spoiled by the perl ORM I used to use, and I know AR on ruby has a lot of features too
13:06 dodo_ joined
13:07 jocafa joined
13:07 <ningu> mongodb has been good so far, actually, but requires a bit of a different mindset
13:07 jscheel joined
13:08 <yawNO> ningu: https://github.com/joyent/node/wiki/modules#wiki-db-mysql
13:08 <ningu> I know
13:08 <ningu> but that doesn't tell me really which ones are buggy ;)
13:08 wilmoore joined
13:08 jdeibele1 joined
13:08 <RLa> ningu, also see above what i wrote about segfaults
13:09 <RLa> you might not get segfaults if you use pool
13:09 ericmuyser joined
13:09 <ningu> is there a normal way of cloud-hosting mysql?
13:09 <RLa> spin ec2 with mysql?
13:09 <ningu> I suppose
13:09 sh1mmer joined
13:09 <ningu> I was thinking of something like mongohq
13:10 dve joined
13:10 <RLa> i guess it will much more complex if you need mysql cluster or sharding
13:10 <yawNO> ningu: https://github.com/sdepold/sequelize
13:10 <ningu> hmm, I suppose for nodejitsu I could just use sqlite to start with, it would probably pull the .sqlite file along with it
13:10 <yawNO> this one has validations and migrations
13:10 <yawNO> never used it though
13:10 <ningu> yeah, I know
13:10 <dob_> Rla: No, only integer.
13:10 <ningu> but the join support was unclear to me from the docs, I"ll look again
13:10 <ningu> migration is less important to me
13:10 <RLa> dob_, then you should be fine
13:11 <dob_> RLa: YES!
13:11 dve joined
13:11 <RLa> tho, i'm not finding where comes 16M limitation
13:11 <ningu> I don't really trust ORMs to properly migrate anyway
13:11 <dob_> RLa: Thank u!
13:11 <ningu> anyway, the answer seems to be that node ORMs are not as mature as other languages
13:11 <yawNO> ningu: mongolab has free 250 mb
13:11 <yawNO> *a free 250 mb db
13:11 <ningu> cool, will keep that in mind
13:12 <RLa> ningu, with js objects you do not have much need for orm
13:12 <ningu> well
13:12 <ningu> I generally agree
13:12 <ningu> but I'm worried about integrity, too
13:13 crescendo joined
13:13 <RLa> last time i used orm in java where you have no easy syntax for objects
13:13 <ningu> I keep getting my mongodb data in states I didn't anticipate -- a field missing or something accidentally set as a collection rather than objectid
13:13 <ningu> partly due to the learning curve with mongoose
13:13 <RLa> you might want more type-heavy db
13:13 <RLa> something that existing sql bases can do
13:14 <ningu> well, I know I can get the bugs out once I properly learn all the corners of mongoose or mongodb in general
13:14 simenbrekken joined
13:14 <ningu> but that doesn't solve the transaction issue
13:14 <hh__> is there a really good sql ORM yet?? that supports sqlite,pq,mysql
13:14 <ningu> hh__: for node? not that I'm aware of
13:14 <ningu> there are some that support two of the above
13:15 <freewil> ningu, what type of data are you working with
13:15 jdeibele joined
13:15 <freewil> its possible to do ad-hoc transactions if possible in mongo, really PITA though
13:15 <freewil> s/if possible/if needed
13:16 <ningu> freewil: well, for example, I am storing dictionary data from languages, and one thing I do is create a new lexicon, where the user fills out a form and enters its name, author, etc. and uploads a file in a format the app knows how to parse
13:16 <ningu> I need to create the lexicon document so I have an id that the entries can refer to
13:16 <ningu> but if the parsing goes wrong, then I'm stuck with a lexicon document with no entries
13:16 <ningu> but actually, come to think of it, I can get the id without saving it
13:17 looopy joined
13:17 ph^ joined
13:17 StanlySoManly joined
13:17 <ningu> basically it's operations like that though
13:17 <ningu> create one new lexicon doc + 2000 new entry docs at once
13:18 simenbrekken joined
13:18 <freewil> sheesh
13:18 <ningu> if it's just update one doc or something it's atomic anyway
13:18 franciscallo joined
13:18 <ningu> freewil: I thought about embedding the entries, but that's not convenient for other things I want to do
13:18 dubenstein joined
13:18 <freewil> yeah that seems like a lot of docs to embed
13:19 <ningu> because it's nice to be able to treat entries as first class objects
13:19 <ningu> sort by entries etc.
13:19 <ningu> you can do it in theory as embedded docs but it seems like a bad idea
13:19 <freewil> yeah are you aware of dbrefs in mongo?
13:19 vbabiy joined
13:19 <ningu> yes, that's what I use
13:19 <freewil> cool
13:19 <ningu> but mongo's populate implementation is rather wonky
13:19 hotchkiss joined
13:19 <ningu> to use a technical term
13:19 samsonjs joined
13:19 <ningu> mongoose*
13:20 cha0s joined
13:20 cha0s joined
13:20 smallfoot- joined
13:20 <smallfoot-> node.js is good for make high-performance asynchronuos daemon?
13:21 <freewil> ningu, not sure what you mean by the populate implementation
13:21 <ningu> freewil: have you used mongoose?
13:21 volkan joined
13:21 simenbrekken joined
13:21 <jmar777> can anyone help me interpret the RFC on application/json content-type? http://www.ietf.org/rfc/rfc4627.txt
13:22 <freewil> ningu, yes, it can be nice - also used mongolian's much simpler interface
13:22 <ningu> hmm
13:22 <ningu> I'll check that out
13:22 <ningu> jmar777: wait, so this is a RFC on an RFC?
13:22 kuebk joined
13:22 <kuebk> js
13:22 <kuebk> hi
13:22 <kuebk> what's the best way
13:22 <jmar777> ningu: i think just an RFC on a media type :)
13:23 <freewil> smallfoot-, yes
13:23 <kuebk> to load plugin written in C
13:23 <kuebk> while it is compiled to different path in 0.4.x and 0.6.x
13:23 <jmar777> it's not obvious to me whether or not a valid application/json body MUST be an object or array at the top level, or if it's also ok for it to contain just JSON values
13:23 <kuebk> copying it in wscript at shutdown?
13:23 <kuebk> or maybe there is a better way?
13:23 RobWC joined
13:23 <jmar777> e.g., is '\"hello world\"' a valid application/json body?
13:24 <smallfoot-> freewil, node.js is best for this, or i should use python, ruby, php or erlang?
13:24 <kuebk> jmar777 json is between {}
13:24 sdwrage joined
13:24 <smallfoot-> i can do WebSockets in node.js?
13:24 <jmar777> kuebk: right, but the RFC on application/json makes it sound like {} or [] at a minimum are acceptable
13:24 <hh__> i dont get why mongodb won't let you have objectids for embedded docs, thats the only thing that... makes embeedded weird to me
13:24 <mmalecki> smallfoot-: yes
13:24 <jmar777> kuebk: and it's not clear to me whether or not JSON values are also ok
13:25 <freewil> smallfoot-, yeah socket.io is a popular lib for node.js with websockets
13:25 <freewil> supports fallback to long-polling and regular ajax polling
13:25 <kuebk> JSON stands for JavaScript Object Notation
13:25 <DavidIAm> it doesn't actually prohibit values as valid json strings.
13:25 <smallfoot-> oh
13:25 <kuebk> and string
13:25 <kuebk> is not an object
13:25 <smallfoot-> if i want high-performance ascynchronus event-driven websocket, i should use node.js or C#?
13:26 <ningu> hh__: objectids are references, not embedded docs
13:26 <DavidIAm> an application/json body is 'a json value' which is string number object array true false or null
13:26 <freewil> smallfoot-, node.js - but im highly biased
13:26 <jmar777> kuebk: i understand that. i'm simply saying that from the RFC, it appears that application/json may not be exactly equivalent with JSON
13:26 leokaito joined
13:26 <hh__> ningu: right, but for an embedded doc there's no way to give it an objectid for reference
13:26 <ningu> hh__: sure there is
13:26 <ningu> mongoose does it
13:26 <ningu> I'm not sure how
13:27 <strager> smallfoot-: Either will work, but Node.js will have less friction (assuming you're familiar with JS).
13:27 <jmar777> DavidIAm: thanks - can you point me towards some documentation on that?
13:27 volkan joined
13:27 dilvie joined
13:27 <hh__> ningu: it doesn't do it, unless you find some way to do it yourself
13:28 <ningu> hh__: it meaning mongodb or mongoose?
13:28 incon joined
13:28 TooTallNate left
13:28 <hh__> both, mongoose doesn't support it, because it's not part of mongodb's specs or whatever
13:28 <smallfoot-> node.js is suitable for high-performance real-time stuff? like game server?
13:28 TooTallNate joined
13:28 <ningu> hh__: if you have a subschema in mongoose it will give it an _id by default
13:28 <ningu> unless you specify noId: true in teh subschema's definition
13:29 <strager> smallfoot-: Yes, though it's not suitable for computationally expensive things.
13:29 themiddleman_itv joined
13:29 <smallfoot-> oh
13:29 <strager> smallfoot-: If you're passing a lot of data around, Node.js is good at that.
13:29 simenbrekken joined
13:30 leokaito left
13:30 <ningu> is js actually faster at json than other languages?
13:30 <strager> ningu: Not necessarily.
13:30 <RLa> do a benchmark :)
13:31 <ningu> just wondering if someone already had. :)
13:31 <RLa> json is very simple format and could be implemented in assembly too
13:31 <RLa> unlike xml :P
13:31 <DavidIAm> jmar777 - http://www.ietf.org/rfc/rfc4627 http://www.json.org/
13:31 <RLa> tho some guy wrote xml parser in assembly too
13:32 illourr joined
13:32 jsurfer joined
13:32 <jmar777> DavidIAm: thanks - that's the rfc i'm looking at. i just can't find anywhere that states that any JSON value is acceptable as an application/json body
13:32 <jmar777> DavidIAm: he defines JSON-text as "object / array", but then he never refers to that term again
13:33 stephank joined
13:33 <DavidIAm> jmar - oversight.
13:33 <DavidIAm> jmar - just a value that is a true falls null or string is not very useful
13:33 <jmar777> DavidIAm: and in the examples at the bottom, it shows one with a full JSON object and one with a JSON array - so those are the hints that suggest objects/arrays are it
13:33 <strager> I personally send JSON strings as application/json.
13:33 colinclark_ joined
13:33 jetienne_ joined
13:34 <DavidIAm> jmar777 - you're trying to read implications from examples, they show merely the mentality of the author, not the definition.
13:34 <DavidIAm> jmar777 - my logic is thus:
13:34 <DavidIAm> jmar777 - all his examples show json values.
13:34 <strager> I don't think it really matters, because your client is probably not a JSON proxy or something, but something custom-tailored to your API.
13:34 <DavidIAm> jmar777 - string/true/false/null are json values.
13:34 <jmar777> DavidIAm: yes, i agree. but we're both reasoning from examples though :\
13:34 <DavidIAm> jmar777 - there is nothing here that indicates that only a subset of valid json values is valid as an application/json string. ANY json value, hence, IS.
13:35 M1l3n1um joined
13:36 <DavidIAm> jmar777 - were it intended to restrict application/json encoding to *only* a subset of value types, then it must state so.
13:36 <jmar777> DavidIAm: Well, he does refer to "JSON text" in several locations following his "JSON-text" definition. so if those are equivalent, then i would still interpret it as object/array
13:36 NinjaFox^AFK joined
13:36 <jmar777> DavidIAm: i get what you're saying. i just don't see anywhere that says "JSON values" (restricted or otherwise) are acceptable application/json bodies
13:36 <DavidIAm> jmar - object and array are json values.
13:37 <DavidIAm> jmar - they are provided as 'examples of' json values, not 'the only exclusive json values accepted'. THey're a non-inclusive list.
13:37 jsurfer joined
13:37 <jmar777> DavidIAm: yes. but that in and of itself doesn't make them valid application/json bodies. i think what makes them valid is their inclusion in the definition of "JSON-text"... but i'm not sure on that point
13:37 shipit_ joined
13:38 <DavidIAm> jmar777 - ah, I hadn't seen that piece.
13:38 hipsterslapfight joined
13:38 <jmar777> DavidIAm: i just wish that "JSON-text" appeared more than once lol
13:38 <DavidIAm> jmar777 - that enumeration could be considered to be inclusive.
13:38 briancra_ joined
13:38 <raenger> Having trouble using fs.rename from root disk / to attached storage /media/... -- an obvious answer?
13:38 <jmar777> DavidIAm: if "JSON-text" === "JSON text" for the purposes of the RFC, then it's useful i suppose
13:38 adrianF joined
13:38 felixge joined
13:39 <DavidIAm> jmar777 - I think it can be considered so.
13:39 trotter joined
13:39 <felixge> rauchg: ping
13:39 volkan_ joined
13:39 <jmar777> DavidIAm: cool. so with that "established", would you consider application/json to be object/array only then?
13:40 <felixge> rauchg: will you be around later today (in 2-3 hours?). I got one more question about the patch I'd like to discuss. Basically it seems like the handshake is missing one parameter the clients needs to do the heartbeat properly
13:40 <DavidIAm> jmar777 - Per this RFC, Yes.
13:40 EhevuTov joined
13:40 <rauchg> yep
13:40 <DavidIAm> jmar777 - I suspect that parsers wil handle json-value more generally though.
13:40 <jmar777> DavidIAm: right. express for example assumes anything that doesn't throw in JSON.parse() is acceptable
13:40 <felixge> rauchg: awesome, I'll ping you later then!
13:40 <jmar777> DavidIAm: which includes numbers, strings, booleans, etc.
13:41 <DavidIAm> jmar777 - Exactly. I'd have written the rfc that way.
13:41 <DavidIAm> jmar777 - who is to say you don't just want to send 'true'. people'll end up doing things like [true] - why make a list for only one element?
13:42 <DavidIAm> jmar777 - the point becomes moot when you use encapsulations like JSON-RPC, where every communication structure is by definition an object.
13:42 <DavidIAm> jmar777 - or the recurring { error: <errorstuff>, data: <nonerrorstuff> } type construct for intersystem communication to put errors out of band.
13:43 mikeal joined
13:43 <jmar777> DavidIAm: right. although there are conceivably n-number of media types that could employ JSON in various ways. application/json just happens to be one of them
13:43 <iksik> hello
13:43 <iksik> any pcap support for windows?
13:43 <DavidIAm> jmar777 - quite so.
13:43 i42n joined
13:45 <jn> hey
13:45 nicki9knuckles left
13:45 <jn> im developing a cli tool using node. and it has a plugin system (different content handlers)
13:45 simenbrekken joined
13:45 <jmar777> DavidIAm: alright, i'm gonna try and patch connect and hope tjholowaychuk sees it the same way :)
13:45 <jn> anyone have a idea of how to best load these plugins
13:45 volkan joined
13:45 <DavidIAm> jmar777 - nothing but some time to lose there.
13:46 <jn> preferably if you could use npm to just install mytool-theplugin and have the clitool recognize that the plugin is avalible and load it
13:46 <jmar777> DavidIAm: i think his current assumption is that it's always a full serialized object, because middleware down stream treats it like the req.body will always be an object
13:46 <jn> is this possible
13:46 <DavidIAm> jmar777 - so if you make it an array it'll puke?
13:47 <DavidIAm> jn - sounds kind of like a .d directory.
13:47 <DavidIAm> jn - mytool/plugins.d/ where you toss markers for available installs.
13:47 <jmar777> DavidIAm: i think an array would work. on a string value it'll puke though
13:48 <jmar777> DavidIAm: after the bodyParser middleware, req.body will be a string value. the methodOverride middleware than uses in `in` statement against req.body, and that pukes
13:48 felixhummel_ joined
13:48 Vespakoen joined
13:48 <DavidIAm> jmar - sounds like a methodOverride issue for failing to check the content type?
13:48 daglees joined
13:48 daglees joined
13:49 <jmar777> DavidIAm: the methodOverride is supposed to work for any content type, so long as it has a top level "_method" value.
13:49 <jmar777> DavidIAm: so that test should fail for arrays or simple string values, but pass for any content type and body that can be parsed into a JavaScript object
13:49 <jn> DavidIAm: yeah. that would work. but can npm packages touch stuff outside it's own directory?
13:50 hackband joined
13:50 <jmar777> DavidIAm: so there should be two fixes i think. one is that parsing on application/json should be RFC compliant and throw for string bodies
13:50 skylamer` joined
13:50 <DavidIAm> jn - uhm... trying to remember waht I was reading about package.json
13:50 <jmar777> DavidIAm: and two would be the method override middleware should make sure req.body has actually been parsed to an object value
13:50 <DavidIAm> jn - I do know there's a 'bin' key that does things. I seem to remember there was something about arbitrary files.
13:51 <DavidIAm> jmar777 - I could have used type text/json
13:51 <jmar777> DavidIAm: it can do whatever it wants in that case - there's no RFC, so who's to say what's right?
13:51 <jn> DavidIAm: yeah maybe i can scan the .bin/ directory for mytool-*
13:51 <DavidIAm> jn - you can do it in a script
13:51 robi42 joined
13:51 landlessness joined
13:52 nerdy joined
13:52 landlessness left
13:52 odyniec joined
13:52 <DavidIAm> jn - scripts can do any arbitrary thing. though it seems like it might be tricky to figure out what the righ tthing to do is.
13:52 felixhummel joined
13:52 criswell joined
13:53 shipit_ joined
13:53 <DavidIAm> jn - what if you're not root? can't put it in /etc. What if somebody installed the core tool globally and the plugin locally?
13:53 <isaacs> jn: npm packages should not touch things outside their folder.
13:54 <DavidIAm> jmar777 - right. it'd be a good idea not to have the middleware puke out doing an in on a non-object/array.
13:54 <isaacs> jn: it's better to just declare what your package has, and let npm manage everything outside of it
13:54 <jn> DavidIAm: yeah, i'm starting to think i want all logic in the clitool and keep the plugins dumb
13:54 <DavidIAm> I've seen nodejs code that recursively loads libraries by scanning the filesystem.
13:55 mraleph joined
13:55 <DavidIAm> I think that's kind of messy.
13:55 <jn> isaacs: ah, perhaps i can list all packages with the npm package and look for a specific flag
13:55 <isaacs> jn: if you're thinking that you need to modify files outside your package, then you should probably back up and rethink the problem.
13:55 <jn> yeah, i'd rather not have to do that
13:55 <DavidIAm> jn - You might could put a special key/value piece in the package.json and scan the node path for those, parse and look for it.
13:56 <isaacs> it's a safe bet in such a situation, you're trying to do something that is too clever, and not really necessary.
13:56 <isaacs> any hacks you come up with are by definition brittle and unsupported.
13:56 bbbb joined
13:56 <isaacs> npm will break them in future versions, without notice or sympathy.
13:56 dubenstein joined
13:58 <jn> yeah, trying to find a way that's not hacky
13:58 <diminoten> mongoskin's findById... anyone ever see it work?
13:59 litwol joined
13:59 bkaney joined
13:59 volkan joined
14:00 aaronmcadam joined
14:00 qbit_ joined
14:00 <qbit_> is there a way to make child_process.fork() exit without killing the parent?
14:01 litwol left
14:01 <qbit_> also - hi :D
14:01 <dscape> why does ECONNREFUSED thorw?
14:01 `3rdEden joined
14:02 dubenstein joined
14:03 <coderarity> airandfingers: yeah I'm gonna work on node-ecstatic now, should be done soon
14:03 dubenstein joined
14:03 shipit left
14:04 nick12 joined
14:04 merlin83 joined
14:05 johnmdonahue joined
14:05 <qbit_> nm .. looks like process.kill( process.pid ); does it
14:05 paulwe joined
14:05 jocafa joined
14:07 tonist joined
14:07 toothr joined
14:08 cha0s joined
14:08 cha0s joined
14:08 dubenste1n joined
14:08 dubenstein joined
14:09 dve joined
14:10 sh1mmer joined
14:11 Blorb joined
14:12 vguerra joined
14:13 <diminoten> ugh this is extremely frustrating
14:13 <diminoten> mongoskin's findById does not work, or I'm misusing it
14:13 tenshihan joined
14:13 sarlalian left
14:13 <tenshihan> hey guys
14:13 <tenshihan> i'm trying to compile my first addon forn ode
14:13 dubenstein joined
14:14 anon12345 joined
14:14 <TooTallNate> tenshihan: using node-gyp right ? :)
14:14 edektor joined
14:14 <tenshihan> node what?
14:14 <tenshihan> uh
14:14 patcito joined
14:15 <tenshihan> i'm on windows. if that makes it easier then hell ya
14:15 <TooTallNate> well then you should *absolutely* be using node-gyp
14:15 <TooTallNate> what addon are you trying to compile?
14:15 <TooTallNate> you mean one of your own? or someone elses?
14:15 <* bnoordhuis> can vouch for node-gyp
14:15 dob_ joined
14:16 <tenshihan> ok read your read me. sounds awesome.
14:16 <tenshihan> i will use it
14:16 <TooTallNate> ping me if you need any help
14:16 <anon12345> anyone have recommendations for IoC containers? our immediate need is for the client side, but a lib that works on client/server would be best.
14:17 <mmalecki> anon12345: broadway :)
14:17 <dob_> Is there any memory limit in 64bit node?
14:17 <TooTallNate> bnoordhuis: did you try out buffertools on windows?
14:17 <mmalecki> anon12345: https://github.com/flatiron/broadway
14:17 <mmalecki> anon12345: http://flatiron.github.com/broadway/ <- client version
14:17 <anon12345> mmalecki: thanks. checking it out now.
14:18 gorekee joined
14:18 <bnoordhuis> TooTallNate: no, but that's through no fault of node-gyp
14:18 <bnoordhuis> i kind of messed up my windows build
14:18 <jmar777> random q: what's the definition of "core contributor"? having one of your patches pulled, or having commit rights?
14:18 <TooTallNate> haha
14:18 Hebo joined
14:18 <bnoordhuis> jmar777: the former
14:19 <bnoordhuis> commit rights would be core committer / core team member
14:19 <jmar777> bnoordhuis: cool, thanks
14:19 <yawNO> https://github.com/viatropos/tower
14:19 <yawNO> this is sad
14:19 <yawNO> it was promising
14:19 <yawNO> :(
14:20 <jesusabdullah> yawNO: Why sad?
14:20 <yawNO> forces you to use coffeescript for instance
14:20 <yawNO> and a couple of other reasons
14:20 <jesusabdullah> wat
14:20 <jesusabdullah> how do you force coffeescript?
14:20 <jesusabdullah> weaksauce
14:21 overthemike joined
14:21 <DavidIAm> (its modeled on ruby, surely you expect it to force you into its paradigms...)
14:21 <anon12345> broadway looks interesting. what do you think about broadway v.s. wire.js? pros/cons?
14:21 <yawNO> jesusabdullah: it generates coffeescript
14:22 <yawNO> i'm not the one who will convert back from cs to js for sure
14:22 <mmalecki> anon12345: I haven't played with wire.js, actually
14:22 <DavidIAm> I can see the motivation to doing that. Writing javascript is much more complex than writing coffee.
14:22 mcav joined
14:23 <ben_alman> is "errno" a global?
14:23 toothr joined
14:23 <jesusabdullah> anon12345: I'm unfamiliar with wire.js
14:23 <ben_alman> I don't see where errno is defined here https://github.com/joyent/node/blob/1eb1fe32250fc88cb5b0a97cddf3e02be02e3f4a/lib/fs.js#L650
14:23 <mmalecki> ben_alman: yes
14:23 <ben_alman> ah, it's not in the list of globals
14:23 <mmalecki> ben_alman: and yeah, it *is* lame
14:23 <dilvie> hi ben =)
14:23 <mmalecki> bnoordhuis: I thought you renamed it?
14:24 <ben_alman> good times
14:24 <ben_alman> now i need to figure out why the hell fs.watch is erroring in windows xp :/
14:24 <jn> DavidIAm, isaacs: what do you think of this approach for a plugin system? https://gist.github.com/1926447
14:24 <bnoordhuis> mmalecki: question mark
14:24 <ben_alman> jn, i'm going to be doing something similar with grunt
14:24 <bnoordhuis> ben_alman: errno is a magic global (and something of a mistake)
14:24 <ben_alman> for loading all grunt- named npm libs
14:25 nphase joined
14:25 <diminoten> I'm so frustrated right now
14:25 <diminoten> why is mongo so hard to work with
14:25 <diminoten> ALL I want to do is get a doc by its id
14:25 <diminoten> seems like the easiest thing in the world, right?
14:25 <isaacs> jn, ben_alman: i think that's sort of a terrible idea.
14:26 <jerrysv> diminoten: what library are you using?
14:26 <isaacs> why not just load the thing you want, when you want it?
14:26 <diminoten> in sql it'd be 'select * from foo where _id='1234'
14:26 <diminoten> mongoskin
14:26 <Nuck> Wooooooow this ain't good. My localtunnel'd node server is getting Stripe and Twilio API calls.
14:26 <ben_alman> isaacs: it should auto-load, so the user doesn't need to think about it
14:26 cjm joined
14:26 <jerrysv> collection.findOne({_id: '1234'})
14:26 <isaacs> ben_alman: but the user DOES need to think about it!
14:26 overthemike joined
14:26 <diminoten> I so wish it worked like that jsrrysv
14:26 <isaacs> ben_alman: they put it there.
14:26 <diminoten> I so fucking wish...
14:26 <ben_alman> isaacs: after they install the plugin, they never have to think again
14:26 adamkitt_ joined
14:26 <jerrysv> diminoten: works like that for me, what sort of issues are you having? obviously there's a callback, but ?
14:26 <isaacs> ben_alman: what you're describing isn't a good thing, though.
14:27 <diminoten> ObjectID, for starters
14:27 <ben_alman> isaacs: i don't disagree, but the alternative is a hell of a lot more work
14:27 <jn> isaacs: but having to specify eg --plugins plugin1,plugin2,plugin3 every time is such a hassle
14:27 <diminoten> so you'd have to do colleciton.findOne({_id:ObjectId('1234')})
14:27 <ben_alman> the infrastructure alone is out of my ability
14:27 dob_ joined
14:27 <diminoten> (1234 in this case is a hex string but that's not important)
14:27 <DavidIAm> jn - hm. depends on npm. probably safe to do so. Fairly straightforward operation though. Would want to make sure you didn't puke if somebody else put something in your namespace you weren't expecting.
14:27 <isaacs> ben_alman: foo.loadPlugin(require("foo-bar")) what's wrong with that?
14:27 giakar joined
14:27 <diminoten> seems so incredibly simple, but it simply. doesn't. work.
14:27 <isaacs> ben_alman, jn: people do that with express plugins all the time.
14:28 <dob_> when executing a SELECT statement on my database i get this error: FATAL ERROR: CALL_AND_RETRY_2 Allocation failed - process out of memory
14:28 <isaacs> ben_alman, jn: this sounds like inventing new problems to solve.
14:28 jskulski joined
14:28 <dob_> But I am sure my system has enough memory
14:28 <tenshihan> @tootallnate, after installing using npm, where is the executable ?
14:28 <dob_> I tried different settings of max-old-space-size
14:28 <TooTallNate> tenshihan: did you use -g
14:28 <DavidIAm> it didn't say the system was out of memory. :P
14:28 <dob_> but it did not work
14:28 <ben_alman> isaacs: in this case plugins can change the way the core behaves and as such need to be specified well ahead of time
14:28 <diminoten> db.collection("foo").findOne({"_id":db.bson.serializer.ObjectID('1234')}, callback);
14:28 <tenshihan> yess as per the readme
14:29 <TooTallNate> so it should already be available in your PATH
14:29 <TooTallNate> when you type: node-gyp
14:29 <TooTallNate> what do you see?
14:29 <tenshihan> no, i'm on windows 7 and it's path stingy
14:29 <tenshihan> node isn't even in path
14:29 <ben_alman> but i'll have to look at the idea of not auto-loading
14:29 <TooTallNate> well isaacs, where do global installs go on windows?
14:29 <ben_alman> just don't know if it's too late for that
14:30 <isaacs> TooTallNate: npm bin -g
14:30 <ben_alman> does anyone know why fs.watch is giving me an "Error: watch Unknown system errno 995" error in Windows XP ?
14:30 <TooTallNate> tenshihan: ^
14:30 giakar left
14:30 <TooTallNate> isaacs: nice :)
14:30 <isaacs> wait a minute... that's printing out the wrong thing
14:30 <isaacs> wtf?
14:30 <ben_alman> i can't find anything out about error 995 anywhere
14:30 <dob_> DavidIAm: Any ideas?
14:31 sdqali joined
14:31 <maxogden> ben_alman: http://msdn.microsoft.com/en-us/library/ms681388 "The I/O operation has been aborted because of either a thread exit or an application request."
14:32 <tenshihan> ty added it to my path
14:32 <ben_alman> maxogden: any idea of how that might apply to fs.watch in Windows XP?
14:32 <ben_alman> seems… like i shouldn't be getting that error
14:33 <skylamer`> changing the os? :)
14:33 <jn> i really dont see why having autoloading plugins is a bad idea, it surley beats the alternative of having to manually load them every time i run
14:33 <ben_alman> i'm definitely not getting any errors using the same code in osx
14:33 <jn> ben_alman: send me a message if you ever find a good pattern for plugins :)
14:33 <skylamer`> i mean really
14:33 <maxogden> ben_alman: hmm not sure, do the tests pass?
14:33 <ben_alman> jn, this is what i had https://github.com/cowboy/grunt/commit/fb3a6ad4356289fb0c0cd54dd1a437060f0e5ca1 but it seems pretty scary
14:33 cesconix joined
14:33 <skylamer`> osx can't be an os xD
14:33 <bnoordhuis> ben_alman: 995 is ERROR_OPERATION_ABORTED
14:34 <yawNO> nop it just doesnt convince me
14:34 M1l3n1um joined
14:34 vbabiy_ joined
14:34 <ben_alman> bnoordhuis: do you know what that means in a practical sense?
14:34 <bnoordhuis> ben_alman: i suppose the next question is what exactly got aborted
14:34 ningu joined
14:34 <bnoordhuis> where/when are you getting that error?
14:34 <ben_alman> after doing fs.watch(...)
14:34 <ben_alman> i've already watched some files, then i close the watchers, then i watch them again later and that's where it's exploding
14:35 <ben_alman> i wonder if it has a problem with re-watching previously watched files in windows xp
14:35 whitman joined
14:35 <bnoordhuis> it shouldn't obviously but it could be a bug
14:35 <ben_alman> ya
14:35 wink_ joined
14:35 <ben_alman> i'm just trying to make sure i'm closing them properly first
14:35 toothr joined
14:36 themiddleman_i-1 joined
14:36 addisonj joined
14:36 looopy joined
14:36 dshaw_ joined
14:37 <ningu> who watches the watchers?
14:37 <yawNO> ningu: I DO
14:37 jhurliman joined
14:37 <ningu> good, glad someone's on it
14:37 <yawNO> just kidding :(
14:38 <bnoordhuis> ben_alman: can you open an issue? preferably with a standalone test case
14:38 tttthet joined
14:38 <ben_alman> trying to create one
14:38 Vainoharhainen joined
14:38 RyanD joined
14:38 <addisonj> has anyone had issues where node process will slowly have higher and higher cpu usage even with constant load?
14:39 <tenshihan> TooTallNate: Hey ran into some trouble. Documented it here: http://pastebin.com/vasaej6P
14:39 <jn> ben_alman: thx, i'll keep an eye on that
14:39 <tenshihan> probably something on my end
14:39 <TooTallNate> tenshihan: do you have python installed?
14:39 <TooTallNate> it needs to be in your PATH as well
14:39 <* ningu> successfully disconnected the superdrive from his macbook... kind of an annoying procedure :P
14:40 <tenshihan> yes
14:40 <tenshihan> oh
14:40 <tenshihan> effin windows
14:40 <TooTallNate> hahaha
14:40 <TooTallNate> i could try to autodetect where Python lives when that fails
14:40 <TooTallNate> please open an Issue for that if you desire :)
14:40 <ben_alman> hmmn bnoordhuis looks like if i just do w.close(); to close the watcher, it explodes in win xp
14:40 <ben_alman> still trying to figure this out
14:40 <ningu> is node on windows generally kind of dodgy?
14:41 <tenshihan> woot it worked!
14:41 <TooTallNate> ningu: it's generally really nice actually
14:41 <ningu> good to keep in mind
14:41 <ningu> I might be forced to develop some node stuff under windows
14:41 <ningu> :)
14:41 <TooTallNate> windows and osx these days have a nice "low-barrier" feel to them
14:42 <TooTallNate> mainly cause of the installers
14:42 <ningu> well, osx is fairly close to vanilla unix though, or can be
14:42 <mmalecki> windows is dodgy
14:42 <Bonuspunkt> depends on what are you trying to accomplish
14:42 <ningu> I usually use cygwin on windows
14:42 <ben_alman> ok bnoordhuis figureed it out sec
14:42 stafamus joined
14:42 <ningu> but I know that isn't recommended with node
14:43 <TooTallNate> tenshihan: what are you compiling?
14:43 shivhack joined
14:43 cjm joined
14:43 <TooTallNate> tenshihan: oh nvm, i see in the pastie :)
14:43 <tenshihan> TooTallNate: right now just the hellow world example. i'm eventually gonna interface with redis
14:43 shivhack joined
14:44 <dob_> How can i increase the 64bit node.js memory limit? Or is this not possible? Tried node --max_old_space_size=4500 --max_executable_size=4500 --max_new_space_size=450000 test.js
14:44 <tenshihan> i got a new error
14:44 <tenshihan> on the build step
14:44 <dob_> but this does not work... Can somebody help me?
14:44 <TooTallNate> tenshihan: show me please :)
14:44 <TooTallNate> SpootyBooty
14:44 <TooTallNate> :p
14:44 <tenshihan> TooTallNate: http://pastebin.com/yHcE18Ar
14:44 <tenshihan> that's my cat's name
14:45 <TooTallNate> tenshihan: whats the name of your gyp file?
14:45 mcav joined
14:45 shivhack joined
14:45 <TooTallNate> tenshihan: windows currently "wants" the file to be called bindings.gyp, but i have plans to fix that
14:45 <TooTallNate> https://github.com/TooTallNate/node-gyp/issues/28
14:45 itayneeman left
14:45 <TooTallNate> for now you can specify the .sln file to use with --solution=blah.sln
14:46 <tenshihan> ok
14:46 <tenshihan> so instead of hello2.gyp rename it to bindings.gyp
14:46 <TooTallNate> ya that will fix it
14:46 <TooTallNate> won't be necessary in the 0.2.0 release ;)
14:46 <tenshihan> yup
14:46 <tenshihan> very nice tool
14:46 <tenshihan> probably saved me half a day
14:46 itayneeman joined
14:47 <TooTallNate> thanks!
14:47 <tenshihan> ok so now i have this compiled i can just plug it into my addons?
14:47 <TooTallNate> tell your friends :D
14:47 <ben_alman> bnoordhuis: https://github.com/joyent/node/issues/2837
14:47 <TooTallNate> you see it in ./Release?
14:47 <addisonj> hrm… so I am having issues where a long running node process slowly consumes more and more cpu even with constant load, anyone seen this or have ideas on how to debug it? I could could attach the node profiler...
14:48 <TooTallNate> you should just be able to require() it, ya
14:48 gasbakid joined
14:48 <TheJH> addisonj, problem is, memory profiling doesn't work that good in recent node versions anymore :D
14:49 <TheJH> addisonj, what kinds of modules are you using?
14:49 CarterL joined
14:49 <addisonj> its not memory that is being consumed, it is cpu that spikes
14:49 <bnoordhuis> ben_alman: thanks
14:49 <TheJH> uh, sorry
14:49 <ben_alman> sure
14:49 <TheJH> that's weird
14:49 <addisonj> exactly
14:49 <jesusabdullah> TheJH: I saw you have a bot in here. Where's the sauce?
14:49 <addisonj> men leaks I accept, cpu leaks (if such a thing exists) are more crazy
14:49 <dob_> Is it really not possible to increase the memory limit of node under macosx?
14:50 Vainoharhainen joined
14:50 <TheJH> jesusabdullah, https://github.com/thejh/nodebot or so
14:50 <TheJH> coffeescript :P
14:50 <jesusabdullah> whaaaat gurrl
14:50 <TheJH> addisonj, sounds like a weird setInterval or so to me...
14:51 <TheJH> jesusabdullah, I think it's pretty readable :P
14:51 paulwe joined
14:51 <addisonj> thats what I am thinking… i am going to try and grep them out of our codebase but some dependency will probably be the culprit
14:51 <jesusabdullah> sure, I can read coffeescript (kinda)
14:51 <jesusabdullah> I was more interested in structure anyway
14:51 _rockbot_ joined
14:52 <TheJH> one big file with one big object containing commands :)
14:52 <_rockbot_> hi folks! anyone have any experience with cloud9?
14:52 Vainoharhainen joined
14:52 eldios joined
14:52 lohkey joined
14:53 litwol joined
14:53 <litwol> o/ Poetro
14:54 <Poetro> hey litwol
14:54 <litwol> been a while :)
14:54 polotek joined
14:54 boltR joined
14:54 mraxilus joined
14:55 shivhack joined
14:56 shivhack joined
14:56 hackband joined
14:57 litwol left
14:57 <bnoordhuis> _rockbot_: to a certain extent. i work for cloud9. :)
14:57 jabbslad joined
14:57 <yawNO> lol
14:57 <yawNO> that made me laugh
14:58 <_rockbot_> lol bnoordhuis - nice :-) I'm having issues porting my node app, mostly in just getting it to compile
14:58 Vainoharhainen joined
14:59 <bnoordhuis> _rockbot_: what's giving you trouble?
14:59 simenbrekken joined
14:59 <_rockbot_> bnoordhuis: specifically npm install mongoose-auth
15:00 sechrist joined
15:00 <_rockbot_> (even more specifically, npm is failing at bcrypt)
15:00 <smallfoot-> node.js can use database?
15:00 <bnoordhuis> _rockbot_: is your app written for 0.6?
15:00 <CIA-102> node: 03isaacs 07master * r0e7dad3 10/ (61 files in 12 dirs): Merge branch 'json-api-docs' (+45 more commits...) - http://git.io/LBRztg
15:01 <_rockbot_> bnoordhuis,: you know, I'm not sure... (I assume so?) how do I find out?
15:01 dubenstein joined
15:01 <dob_> Is there a option to increase the memory limit under macosx? --max_old_space_size=4500 --max_executable_size=4500 --max_new_space_size=450000
15:01 volkan_ joined
15:01 <_rockbot_> smallfoot-, yes, node.js can use databases; what kind are you looking to use?
15:02 <dob_> did not work for me
15:02 <Qalqi> which db works better with node?
15:02 <bnoordhuis> _rockbot_: what does npm's output look like?
15:03 kuebk joined
15:03 <smallfoot-> _rockbot_, i dont know, i mostly used mysql, but i also have experience with sqlite, which can nodejs use?
15:03 lohkey joined
15:04 bartt joined
15:04 Vainoharhainen joined
15:04 simenbrekken joined
15:05 <_rockbot_> bnoordhuis, here's the output: http://pastebin.com/SgdETLVr
15:05 volkan joined
15:05 gorekee joined
15:05 mjr_ joined
15:06 <_rockbot_> smallfoot-: nodejs can use mysql-type dbs, but (I think) it works best with NoSQL-type dbs, mainly MongoDB, CouchDB, and Redis
15:06 idefine joined
15:06 dreamdust joined
15:06 mjr_ left
15:06 <polotek> Anybody here using a repl server in production processes?
15:07 <bnoordhuis> _rockbot_: yes, bcrypt expects node v0.6 - most of c9 is still on 0.4
15:07 Axsuul joined
15:07 <_rockbot_> ahhh.. what should I do?
15:07 <bnoordhuis> _rockbot_: i'm not in operations but maybe daniela (our support engineer) can migrate you to v0.6
15:08 <bnoordhuis> i'm not sure if and how far the 0.6 rollout is
15:08 <bnoordhuis> but she'll know
15:08 jimubao joined
15:08 <_rockbot_> bnoordhuis, awesome, thanks! how can i contact her?
15:09 ekryski joined
15:09 <bnoordhuis> _rockbot_: let me dig up her email address
15:09 <_rockbot_> sweet, thanks!
15:09 mikeal joined
15:10 <bnoordhuis> _rockbot_: i can give you her email but @C9support on twitter is probably faster
15:10 unomi joined
15:10 <bnoordhuis> that is, if you have twitter, of course
15:10 <CIA-102> node: 03Shigeki Ohtsu 07master * r82ad1f8 10/ (common.gypi configure): Fix #2830 for the old gcc bug on SmartOS - http://git.io/xu_m7w
15:11 <CIA-102> node: 03isaacs 07master * rf4641bd 10/ (179 files in 21 dirs): Update v8 to 3.9.9 - http://git.io/vLr44w
15:11 <CIA-102> node: 03isaacs 07master * rfde2600 10/ deps/v8/build/common.gypi : v8: Remove OutputDirectory from build/common.gypi - http://git.io/xJdH3A
15:11 adamkittelson joined
15:11 <_rockbot_> ok, awesome, thanks! yes, i'm on twitter - i'll tweet at support now :-)
15:12 admin-_ joined
15:12 tylerstalder joined
15:13 darrenlooby joined
15:13 <bnoordhuis> _rockbot_: good luck :)
15:14 <bnoordhuis> polotek: yes
15:14 <darrenlooby> I've kind of approached this before... but, I want to make sure I get it right... I have a web server running apache. I want to also run nodejs - but, I'd want to ignore apache... I don't mind playing with different ports... this'll work, right?
15:15 <bnoordhuis> darrenlooby: yes
15:15 <darrenlooby> Sweet
15:15 euforic joined
15:15 <darrenlooby> I've played with it a few times, but never got it working correctly... just have to try again :)
15:17 Cromulent joined
15:17 joaojeronimo joined
15:18 <polotek> bnoordhuis: How do you connect? socat? I want a better interface to the repl. backspace, multi-line, history, etc.
15:18 Vainoharhainen joined
15:18 <bnoordhuis> polotek: netcat
15:19 socketio\test\22 joined
15:20 <bnoordhuis> polotek: most of what you name works for me(tm), i think
15:21 <polotek> I only run on local socket, that's why I use socat. Is it netcat that makes a difference? I think I need a better repl module.
15:21 <ben_alman> bnoordhuis: does fs.watch get tested with Windows XP? becasue I'm running into all kinds of issues
15:21 <ben_alman> it's a total disaster here
15:21 <ben_alman> it's completely missing file changes and reporting files changed that were untouched
15:21 <ben_alman> :(
15:22 joe__K joined
15:22 <joe__K> Hi... has anyone debugged mocha tests in node.js via node-inspector ?
15:22 <bnoordhuis> ben_alman: windows xp is not the primary target
15:23 <bnoordhuis> it's supported on a best-effort basis but the implicit assumption is that you run at least vista
15:23 <ben_alman> bnoordhuis: so it's unsupported?
15:23 <ben_alman> ok, i can tell people that
15:23 davidsklar joined
15:23 dwhittle joined
15:23 <ben_alman> and not worry about xp
15:23 <ben_alman> thx
15:23 akasha joined
15:23 <ben_alman> let me test in win 7
15:24 fermion joined
15:24 ceej joined
15:25 <akasha> hi, I'm writing my first mocha tests, and wondering if there is a nice way to pass values around? like I set this.foo in before, to access it in nested describe and it statements, but not outside. Is there a nice way to pass values around?
15:25 graeme_f joined
15:25 gerard0 joined
15:26 <joe__K> akasha: I am having exactly the same problem. As long as you use implicit functional closure (i.e. with the BDD "ui"), you can just close over vars
15:26 oht joined
15:26 <akasha> joe__K, you're right :)
15:26 <dob_> node --max-old-space-size=9999 test.js but node does not allocate more than 2GB. Any ideas? I am a bit frustrated. I will need to allocate about 4G for a single process.
15:26 <joe__K> akasha: but no amount of context-setting seems to help, and in fact, the hierarchical context implied by the structure does not seem to be how it gets setup
15:27 <joe__K> akasha: that's why I'm trying to debug mocha in node right now, to see exactly what objects are laying around and where they go during before() and things after it
15:27 <bnoordhuis> dob_: there are a couple of hard limits
15:27 <joe__K> akasha: wait. you are saying setting this.x in before works?
15:27 <joe__K> akasha: I found it didnt
15:27 <polotek> akasha: what kind of tests are you writing that need some much state in between? that's probably a red flag
15:27 johnhamelink joined
15:27 <akasha> joe__K, nope, I'm asking
15:28 <bnoordhuis> dob_: that 1.9 GB heap is one of them
15:28 <bnoordhuis> dob_: in most cases it doesn't really matter, most of your data will be in buffer objects and those live largely outside the heap
15:28 <akasha> polotek, I've just loaded in some fixtures, and would like to store references to them for the nested tests, so I don't have to query the db every time
15:28 thalll joined
15:28 EvRide joined
15:29 <DavidIAm> there are functions in my module that aren't exported. Can I still test them?
15:29 <dob_> bnoordhuis: I am using node mysql to select all data from my database.
15:29 <joe__K> akasha: here's my code that doesnt work http://pastebin.com/AhkZP5U7
15:29 <joe__K> but "should"
15:30 <joe__K> its also funny to me that the context in before is called "failing test" after the function that follows it
15:30 <joe__K> at runtime
15:30 <bnoordhuis> dob_: oh, i don't know how node-mysql arranges things internally
15:30 fatjonny joined
15:31 lz joined
15:31 lz joined
15:31 <joe__K> my problem now is that node-inspector doesnt even seem to see the files that mocha loads for testing
15:32 <dob_> bnoordhuis: I tried --max_old_space_size=9999 --max_new_space_size=10999999 --max_executable_size=9999
15:32 <joe__K> which i understood with coffescript, but not with my .js test
15:33 <darrenlooby> Any recommendations as to a good install tut for nodejs with rpm?
15:33 CarterL joined
15:33 <bnoordhuis> dob_: max_old_space_size is the main one but it's capped in v8 3.6.x
15:33 <ningu> darrenlooby: is it different from any other rpm install?
15:33 themiddleman_itv joined
15:33 <bnoordhuis> dob_: 3.8.x has a new GC that lets you go above that
15:34 fromaz joined
15:34 <bnoordhuis> where 'that' is that 1.9 GB limit
15:34 volkan joined
15:34 lolo joined
15:35 <fromaz> has anyone been able to (simply) authenticate to active directory from within a node app?
15:35 <lolo> مرحبا
15:35 <lolo> الوووو
15:35 <dob_> bnoordhuis: but the current node.js version is using 3.6.x?
15:35 <smallfoot-> whats better node.js, Twisted, POE or EventMachine?
15:35 <bnoordhuis> dob_: node 0.6.x uses v8 3.6.x yes
15:36 <darrenlooby> ningu, generally a good install guide
15:36 <bnoordhuis> dob_: node master is on 3.8.x
15:36 <bnoordhuis> err, 3.9.x even
15:36 <mraleph> dob_: but do not try to pass bogus values to those limits even on master. it will confuse V8.
15:36 sdqali joined
15:36 <RLa> what's poe?
15:36 <ningu> darrenlooby: have you tried installing the rpm for node? I doubt you need to do anything else, maybe npm is a separate rpm
15:36 <ningu> POE is the perl version
15:37 kevinliu joined
15:37 <ningu> the perl equivalent of the concept, I should say
15:37 kevinliu joined
15:37 <kevinliu> anyone have experience with subdomain routing in express?
15:37 <mraleph> dob_: especially the new space size, cause V8 has to prereserve new space memory.
15:38 <kevinliu> similar to apache VirtualHost functionality
15:38 alex_k joined
15:38 lolo left
15:38 jkridner joined
15:39 <dob_> bnoordhuis: Do you think it's a good idea to checkout master?
15:39 Druid_ joined
15:39 volkan_ joined
15:40 <dob_> kevinliu: Take a look at the connect examples
15:40 <bnoordhuis> dob_: well, it depends - master is pretty stable right now but it's probably not a good idea to run your business-critical apps on it
15:41 <fromaz> kevinliu: these look interesting: https://github.com/tblobaum/express-subdomains, https://github.com/WilsonPage/express-subdomain-handler
15:42 <darrenlooby> ningu, sorry. I'm just being silly. npm is what I need. I'm trying to get node working at all
15:42 whaley joined
15:42 AdamSeabrook joined
15:43 Sadin joined
15:44 <dob_> So do you guys think it's a better idea to do SELECT with limits?!
15:44 <dob_> :-)
15:44 phidah joined
15:45 rtgibbons joined
15:47 kevwil joined
15:47 camtrace joined
15:49 camtrace left
15:51 BrianE joined
15:52 tttthet joined
15:52 jimubao joined
15:53 <ben_alman> bnoordhuis: i have the exact same wacky fs.watch behavior in windows 7
15:53 <ben_alman> it's so beyond ridiculous
15:54 <ben_alman> i guess i have to create some test cases
15:54 <ben_alman> this sucks, because i need to like, get actual work done :/
15:54 <ben_alman> it's basically totally broken
15:55 whatthefunk joined
15:55 jetienne_ joined
15:55 Hamms joined
15:56 jimubao joined
15:57 <whatthefunk> I'm creating a c extension and was wondering if theres a way to cast a `<Value>` to a `char *` with escaped newlines and escaped double-quotes.. thanks
15:57 lohkey left
15:57 dob_ joined
15:58 <RLa> won't you have encoding problems with that?
15:59 jimubao joined
15:59 <whatthefunk> @RLa I just want to mimic the #read() function of spidermonkey shell repl
15:59 snearch joined
16:00 mehlah joined
16:00 <RLa> i think you first need to cast Value to String
16:00 jabbslad joined
16:00 lohkey joined
16:01 slloyd joined
16:01 <RLa> hm, there should be ToString method on Value
16:01 isao joined
16:01 <whatthefunk> @RLa I'm currently in that situation.. but I can't seem to find anything in the v8/node docs that point to it.. I ready spidermonkey's and it takes in pathname and they read it as binary
16:01 boltR joined
16:02 jabbslad joined
16:02 <RLa> hm
16:02 <darrenlooby> So, question. I've made a helloworld.js file... how do I make it run in the background...
16:02 <bnoordhuis> whatthefunk: v8 strings always have an encoding
16:03 <bnoordhuis> you can decode a string to utf8, ucs2 or 7 bits ascii
16:03 <bnoordhuis> if you wan true binary, use buffers
16:03 whaley joined
16:03 fomatin joined
16:04 <smallfoot-> socket.io fail to install =/
16:04 echobucket joined
16:05 jimubao joined
16:05 jabbslad_ joined
16:05 andrehjr joined
16:06 jimubao joined
16:06 TheJH joined
16:06 adamkitt_ joined
16:08 jimubao joined
16:09 <CIA-102> node: 03isaacs 07v0.6 * r4f8d732 10/ Makefile : Fix #2822 Only remove logo images, not logo html - http://git.io/WpjDRg
16:09 looopy joined
16:09 dve joined
16:09 <RLa> god damn, my ec2 instance failed before even starting
16:10 <darrenlooby> Ok, here's a really stupid question. Do I have to be in Node CLI to use NPM?
16:10 kuebk joined
16:11 <RLa> no
16:11 felixge joined
16:11 felixge joined
16:11 <felixge> rauchg: ping
16:11 <isaacs> darrenlooby: no
16:11 <isaacs> darrenlooby: npm is a standalone command-line program
16:11 devongovett joined
16:12 <felixge> rauchg: https://github.com/LearnBoost/socket.io/blob/master/lib/manager.js#L743
16:12 <darrenlooby> isaacs, cheers
16:12 <felixge> rauchg: seems like the handshake is only sending the 'heartbeat timeout' to the client, but not the 'heartbeat interval'
16:12 <felixge> rauchg: from what I can tell, the client would need both in order to detect missing heart beats
16:13 joshwines joined
16:13 <darrenlooby> isaacs, it doesn't appear to have install when I install node - what's it call in Ubuntu RPM?
16:13 <CIA-102> libuv: 03Igor Zinkovsky 07v0.6 * r9a5c1ba 10/ src/win/util.c : windows: fix time conversion in stat - http://git.io/B4iQEA
16:13 guidocalvano joined
16:13 <darrenlooby> isaacs, sorry. Another stupid question. Got it.
16:13 <jesusabdullah> isaacs: Question for you!
16:14 <rauchg> that should work though i think
16:14 jimmysparkle joined
16:14 <felixge> rauchg: was that for me?
16:14 <jesusabdullah> isaacs: I know I can use a github repo as the source for an npm install, but can I make it use a specific commit?
16:14 <rauchg> yep
16:14 <guidocalvano> how come require.js loads the same library twice!? Normally it doesn't...
16:14 <jesusabdullah> isaacs: if so (I'm guessing yeah), how?
16:14 <guidocalvano> but I just see my code executing again with console.log
16:14 <guidocalvano> (instead of caching the result)
16:14 <rauchg> we do need better defaults i think
16:14 Wizek joined
16:15 <rauchg> ping timeout should be 60 seconds
16:15 <rauchg> interval 25 seconds
16:15 ryanfitz joined
16:15 <rauchg> basically timeout roughly 2x interval
16:15 jimubao joined
16:15 salva joined
16:15 paulwe joined
16:16 jimubao joined
16:16 <wankdanker> is there an npm command to add the packages in node_modules to package.json's dependencies?
16:16 <CIA-102> node: 03Igor Zinkovsky 07v0.6 * r70a393e 10/ (deps/uv/src/win/fs.c deps/uv/src/win/util.c): update libuv to 9a5c1bad90 - http://git.io/a33OTw
16:17 <isaacs> wankdanker: no. patch welcome.
16:18 jarek joined
16:18 jarek joined
16:18 <jesusabdullah> wankdanker: check out require-analyzer maybe?
16:18 <wankdanker> isaacs: thanks, suggestions? just read package name and version from pacakge.jsons that are found in node_modules?
16:18 <wankdanker> jesusabdullah: cool, thanks. i'll take a look at that.
16:18 <isaacs> wankdanker: yes. npm init shoudl do this.
16:19 <isaacs> wankdanker: there's already shrinkwrap now if you want to lock them down
16:19 <isaacs> wankdanker: but npm init shoudl read them in, and then create a default 'dependencies' section based on those, maybe walk the user through each one to verify
16:19 rlidwka joined
16:20 themiddleman_itv joined
16:20 Cromulent joined
16:20 <wankdanker> isaacs: ok. if I can find some time, I may dig in to that.
16:20 <isaacs> kewl
16:21 <darrenlooby> I'm getting errors on a really basic hello world that I've copied... it worked not minutes ago
16:21 <darrenlooby> http://pastebin.com/P9Npue88
16:21 _rockbot_ joined
16:21 <felixge> rauchg: but wouldn't the client need to know the interval? (rather than the timeout which I assume would start ticking after an interval?)
16:22 jimubao joined
16:22 <kevinliu> express.vhost works perfectly!
16:23 hotchkiss joined
16:23 <rauchg> sure but the client can't expect a perfect world where the packets arrive precisely at interval
16:23 <rauchg> you would need some sort of multiplier
16:23 <rauchg> but it so happens that the ping timeout works very well as a multiplier already
16:23 fomatin joined
16:23 <ts__> anyone has some experience with twitter storm ?
16:23 <rauchg> well it works very well cause it usually is a multiple of the interval i should say
16:23 addisonj joined
16:24 <darrenlooby> I'm getting errors on a really basic hello world that I've copied... it worked not minutes ago http://pastebin.com/P9Npue88
16:24 jimubao joined
16:24 <wink_> darren: you have something else bound to that port
16:24 themiddleman_itv joined
16:24 dreamdust joined
16:24 <wink_> ps aux | grep node
16:24 <wink_> there is probably another copy running
16:24 <felixge> rauchg: ok, I think I'm missing how you define the interval / the timeout. Can you explain what each of them is supposed to do?
16:25 <rauchg> interval is how often the server sends a ping packet
16:25 <felixge> rauchg: Also: Just finished up and pushed the ActiveX patch I mentioned: https://github.com/LearnBoost/socket.io-client/pull/392
16:25 <rauchg> timeout is at which point the server considers the client disconnected
16:25 <rauchg> because it didn't get a ping packet
16:25 <felixge> rauchg: ok, so timeout always needs to be > interval?
16:26 <rauchg> transparent fix ftw!
16:26 <rauchg> yep
16:26 <felixge> rauchg: well, it seems currently the opposite is happening as a default: https://github.com/LearnBoost/socket.io/blob/master/lib/manager.js#L75
16:26 <felixge> w
16:26 <felixge> which is why I'm confused
16:26 EhevuTov joined
16:26 <rauchg> felixge
16:26 <rauchg> on the server its fine tho
16:26 <rauchg> although i do want to change those defaults
16:27 jimubao joined
16:27 <rauchg> but for the client
16:27 <rauchg> if it considered the interval
16:27 <rauchg> as the timeout
16:27 napperjabber_ joined
16:27 <rauchg> it would never work
16:27 <darrenlooby> wingie, cheers. How do I remove it? Do you know?
16:27 <rauchg> the server sends the packet in this case
16:27 <rauchg> it expects it back from the client
16:27 <rauchg> in 15 seconds
16:27 <darrenlooby> It's the first instance that I started of the same script.
16:27 <rauchg> and then in 20 seconds it does that again
16:28 jimubao joined
16:28 <rauchg> the problem would be
16:28 <rauchg> if the client said
16:28 <rauchg> im expecting a ping packet
16:28 <rauchg> every 20 seconds
16:28 <rauchg> that would _not_ work
16:28 <felixge> rauchg: well, right now the client only knows the 15 second timeout
16:28 <felixge> it doesn't know the interval
16:28 <rauchg> right
16:28 <rauchg> and that's bad too
16:28 <felixge> so I'm not sure how the client would be able to detect missing heartbeats from the server properly
16:28 <rauchg> because it would need a multiplier
16:28 <felixge> yeah
16:28 ksys joined
16:28 <rauchg> just because we have bad defaults
16:29 <rauchg> right now the server is too greedy
16:29 <rlidwka> darrenlooby: you have something that listens 8080 port...find out what it is or just change .listen(8080); to some another port
16:29 <rauchg> to consider someone disconnected
16:29 <rauchg> :D
16:29 <ksys> what function will print all object properties? including inherited ones
16:29 <rauchg> so let's change interval to 25s timeout to 60s
16:29 <rauchg> and send timeout
16:29 <rauchg> and on the client
16:29 jimubao joined
16:29 <rauchg> expect a ping packet every timeout
16:29 <darrenlooby> rlidwka, I've found it. And changed it to confirm. But, I don't know how to stop it. It's a node script that on that port.
16:29 <rauchg> seconds
16:29 bshelton joined
16:30 <rlidwka> ksys: require('util').inspect() afaik
16:30 <hh__> why cant you just loop through the objects properties?
16:30 larsschenk1 joined
16:31 <felixge> rauchg: that sounds good
16:31 merlin83 joined
16:31 <ksys> ok
16:31 <felixge> rauchg: I'll do that and also test if changing the default causes any trouble
16:31 <rauchg> (Y)
16:31 <rauchg> what we have right now is definitely not terrible
16:31 <rauchg> but not optimal
16:31 <rauchg> and doesn't work for the client
16:31 <rauchg> which is probably why it's gone in the client atm
16:32 joshwines joined
16:33 hotchkiss joined
16:34 larsschenk1 left
16:34 <felixge> rauchg: yeah, but IMO clients should be able to figure out if they are disconnected
16:34 <rauchg> yep
16:34 <rauchg> absolutely
16:34 <felixge> so I'll get to work on a patch to look at tomorrow, just wanted to talk to you about this first
16:34 <rauchg> that's why we're improving it
16:34 <rauchg> (Y)
16:34 <rauchg> thanks
16:35 <felixge> rauchg: will you be around tomorrow night?
16:35 <rauchg> yep
16:35 <felixge> cool
16:35 <felixge> also lets discuss this real quick, so I can also do that:
16:35 <felixge> https://github.com/LearnBoost/socket.io-client/pull/392#issuecomment-4203626
16:36 <felixge> (I've used ZeParser while hacking on Syntux: https://github.com/evilhackerdude/syntux )
16:36 <felixge> (which is a pretty cool project as well, allows you to enforce coding styles on your code)
16:36 stephank joined
16:37 <maxogden> "bitlifting", like a facelift for code
16:37 <maxogden> node-beverlyhills
16:37 <itayneeman> felixge: would be interesting to see if esprima would work well for syntux
16:38 <felixge> itayneeman: seems like it could work
16:39 <nuthinking> how can I debug how many connection a client has open with the server, I have problem with long poll and ajax
16:39 <felixge> itayneeman: but ZeParser works well enough :)
16:39 <felixge> itayneeman: it's fast, and it can take apart projects as complex as jQuery and put them back together while with the sha1 matching
16:39 dberlinger joined
16:39 <itayneeman> felixge: fair enough. I switched Cover to use esprima this weekend (to do full code instrumentation), worked out pretty well.
16:39 <itayneeman> felixge: that's pretty nice
16:39 levi501d joined
16:39 Eruadan joined
16:39 <felixge> itayneeman: yeah, but I think esprima is also good. Whatever
16:40 <itayneeman> felixge: as long as it isn't uglify :)
16:40 <felixge> itayneeman: with ZeParser I can ask Peter the author if something is broken - so free consulting wins :)
16:40 <itayneeman> felixge: fact!
16:40 <Eruadan> is there alternative frameworks for node other than express.js ?
16:40 <felixge> itayneeman: uglify is ok, but it's just not useful for anything more complex than minifying as the AST is not complete
16:40 <felixge> Eruadan: yeah, like a million
16:41 <Eruadan> o.O
16:41 lazyshot joined
16:41 <felixge> Eruadan: this site hackernews.com show cases at least one a day : )
16:41 <itayneeman> felixge: the AST is also a pain to deal with, I've found, and it's code-gen is buggy as well (I hit a bug here, which is why I switched to esprima)
16:41 <felixge> Eruadan: today's special is: http://news.ycombinator.com/item?id=3639828
16:41 jetienne_ joined
16:41 <felixge> rauchg: what do you think about the comment I linked above?
16:42 <Eruadan> felixge, i see that express is the most used on github, what would be the second one? I mean, what's is the strongest one besides express?
16:42 <rauchg> what comment
16:42 <StanlySoManly> if i have a security requirement that I need to be listening in the right place to find out if Chris Lea's ubuntu packages may have been hacked/corrupted, that would be the user mailing list, correct?
16:43 <rauchg> felixge
16:43 <rauchg> we can add as much as we want to the build process
16:43 <rlidwka> how can I get a list of subdirectories in specified directory?
16:43 <rlidwka> fs.readfile returns all files. Should I use fs.stat on every single file there to see if it's a folder? Or is there some better way?
16:43 <rauchg> another parser won't hurt
16:43 codewar joined
16:43 <dreamdust> Eruadan: Take a look at Connect which Express is built on. Honestly, I prefer rolling my own tools with Connect and borrow things from Express as needed.
16:44 <felixge> rauchg: ok, I'll update my patch to use ZeParser then
16:44 erikzaadi joined
16:46 napperjabber joined
16:46 <Eruadan> felixge, hehe, tower.js is built on top of express. I know there's many frameworks around, but they are all based in express. That's what i was asking. Something based on Connect, similar to express.
16:46 <AvianFlu> StanlySoManly, if you have that requirement, compile from source
16:46 <felixge> Eruadan: they are not all based on express
16:46 <AvianFlu> and then make your own signed packages
16:47 <dreamdust> Unless you know your *exact* needs for the project, I wouldn't begin using a framework at all.
16:47 <felixge> dreamdust: that's stupid advise
16:47 <ben_alman> bnoordhuis: i wrote up a very detailed example of this fs.watch issue for you, this probably supercedes the previous issue https://github.com/joyent/node/issues/2839
16:47 RobWC joined
16:47 RobWC left
16:47 norviller joined
16:47 nuthinking left
16:48 <Eruadan> dreamdust, I'm a newbie, I have good knowledge of javascript, htl and css. So, i was thinking to get things that are already running, so i can learn frm it
16:48 <felixge> dreamdust: I'd say the less you know about a project, the more appropiate a framework is to get something to play with as quick as possible
16:48 <dreamdust> In that case, Express.js is probably the best fit since it's just the essentials.
16:49 <dreamdust> And very popular so there's lots of examples/docs
16:49 <StanlySoManly> AvianFlu: that kinda just pushes the problem back a level. if the source is corrupted, where would i listen to make sure that I'm not using an affect version? :) naturally, I don't expect this to be a problem, but i should be able to react if it does happen.
16:50 <Eruadan> dreamdust, that's what i was asking...beside express, is there any other software that does what express do?
16:50 <AvianFlu> StanlySoManly, no offense to chris lea, but I'd trust joyent's fileservers over his git repo
16:50 <maxogden> ben_alman: hmm maybe try also calling fs.unwatchFile(filename) in your unWatchFile function
16:50 <AvianFlu> I'm sure there are ways to verify the source
16:50 jldbasa joined
16:50 <ben_alman> that seems really wonky
16:51 <maxogden> ben_alman: agreed, but it might work :)
16:51 <maxogden> ben_alman: im not sure what the difference is between watcher.close() and fs.unwatchFile()
16:51 <ben_alman> maxogden: https://github.com/joyent/node/blob/1eb1fe32250fc88cb5b0a97cddf3e02be02e3f4a/lib/fs.js#L766
16:51 <ben_alman> they appear to be completely unrelated
16:51 st_luke_ joined
16:51 <ben_alman> fs.watchFile and fs.unwatchFile use StatWatcher
16:52 swaagie_ joined
16:52 <ben_alman> fs.watch uses FSWatcher
16:52 <StanlySoManly> AvianFlu: totally understand and i see where you're coming from. so if i'm compiling from source and there's an exploit or a compromise, is the user mailing list still the place to watch for those sorts of announcements?
16:52 <maxogden> ben_alman: gotcha
16:52 <AvianFlu> StanlySoManly, that, and here
16:52 disappearedng joined
16:53 <rlidwka> Eruadan: https://github.com/joyent/node/wiki/modules
16:53 <StanlySoManly> AvianFlu: i thought it might be in the /topic here, but just wanted to make sure i didn't miss any other "official" channels. thank you for your help.
16:53 <rlidwka> Eruadan: you can search here... there always is something
16:53 Renegade001 joined
16:53 <Venom_X> I'm having trouble installing npm package zmq@2.0.1. Anyone else in the same boat?
16:55 garrensm_ joined
16:55 <Eruadan> rlidwka, cheers mate, but i've been there already. I just wanted to know if there was similar framework as express.js
16:55 <Eruadan> not that really care about it, just want to know, curious
16:58 tylerstalder joined
16:59 <CIA-102> node: 03isaacs 07master * r2e24ded 10/ (81 files in 14 dirs): Upgrade v8 to 3.9.11 - http://git.io/I7A3VQ
16:59 <CIA-102> node: 03isaacs 07master * r412cebe 10/ deps/v8/build/common.gypi : v8: Remove OutputDirectory from build/common.gypi - http://git.io/9rmW7g
16:59 <CIA-102> node: 03isaacs 07master * r50cfeef 10/ deps/v8/build/common.gypi : Remove -Wall from v8 build - http://git.io/ZzGqgw
16:59 h4mz1d joined
16:59 ceej joined
17:00 amigojapan joined
17:00 <CIA-102> node: 03Mathias Bynens 07master * rcacd651 10/ lib/punycode.js : punycode: Update to v1.0.0 - http://git.io/MMIeeg
17:01 joshgillies joined
17:02 mgolawala joined
17:02 francisl joined
17:03 jesster7 joined
17:03 <CIA-102> node: 03Mathias Bynens 07v0.6 * r483edbd 10/ lib/punycode.js : punycode: Update to v1.0.0 - http://git.io/Pnxkkg
17:04 gerard0 joined
17:05 <CIA-102> node: 03Nathan Rajlich 07master * rba0892b 10/ tools/gyp_addon :
17:05 <CIA-102> node: build: build addons into the "build" dir instead of "out"
17:05 <CIA-102> node: This matches the old node-waf system. Having two different dirs for this stuff
17:05 <CIA-102> node: is dumb. - http://git.io/fpzHAA
17:05 <Eruadan> ugh, i've been there but i didn't check it properlly, i see now there's others frameworks....
17:05 steveoh joined
17:05 GodezInc joined
17:06 yijinsei joined
17:06 _jzl joined
17:08 volkan joined
17:08 sh1mmer joined
17:09 `3rdEden joined
17:10 steveoh left
17:10 devaholic joined
17:11 loucal joined
17:12 sechrist_ joined
17:13 aranw joined
17:13 ningu joined
17:15 AdamSeabrook left
17:16 m00p joined
17:16 felixhummel joined
17:16 michaelhartau joined
17:16 erikzaadi joined
17:17 mandric joined
17:18 <CIA-102> node: 03AJ ONeal 07v0.6 * r7f58d20 10/ (lib/fs.js test/simple/test-fs-non-number-arguments-throw.js): [ISSUE #2554 #2567] throw if fs args for 'start' or 'end' are strings - http://git.io/SF_GBg
17:18 papachan joined
17:18 joshsmith joined
17:18 mikeric joined
17:19 <CIA-102> node: 03AJ ONeal 07master * r493a6bb 10/ (lib/fs.js test/simple/test-fs-non-number-arguments-throw.js): [ISSUE #2554 #2567] throw if fs args for 'start' or 'end' are strings - http://git.io/CPCxpA
17:20 norviller joined
17:21 westg joined
17:21 aismail_ joined
17:21 <aismail_> hi everyone, I'm having some trouble with persistencejs
17:21 vbabiy joined
17:22 <aismail_> is it just me, or the trackedObjects member of session doesn't allow entities with the same ID of different types?
17:23 markq joined
17:23 EhevuTov_ joined
17:23 felixhummel_ joined
17:25 illourr joined
17:27 broofa joined
17:27 heavysixer joined
17:27 diogogmt joined
17:27 <Raynos> 1st attempt at DI library (example: https://github.com/Raynos/ncore/tree/master/examples/files)
17:27 <Raynos> Feedback appreciated o/
17:27 dannyamey joined
17:27 <disappearedng> Is there a way to tell socket.io to fire disconnect only when you leave the page?
17:28 erichynds joined
17:28 <nathanielk> i believe there's a window unload event or something similar
17:29 mcav joined
17:31 st_luke joined
17:34 <addisonj> so I have dying children from cluster and have no idea why, is there anyway to get a stack trace from a child process in cluster
17:36 johnhamelink joined
17:36 aperiodic joined
17:37 aperiodic left
17:37 CarterL joined
17:38 RyanD joined
17:38 bshelton left
17:39 johnhame_ joined
17:41 Vainoharhainen joined
17:41 barce joined
17:41 <garrettwilkin> how do i verify that i successfully linked a module?
17:42 <garrettwilkin> if I do 'npm link' in the module directory
17:42 <garrettwilkin> and then in the directory in which i want to use the module
17:42 <garrettwilkin> but… node then tells me that it can't find the module...
17:42 <garrettwilkin> i know something is wrong
17:42 <garrettwilkin> but i don't know what it is
17:43 kevinliu joined
17:44 shadowh511 joined
17:45 WeeJeWel joined
17:46 devaholic joined
17:50 piscisaureus_ joined
17:51 EhevuTov joined
17:51 <itayneeman> you can see fi the symlinks point to the right place
17:51 <garrettwilkin> yea
17:52 <garrettwilkin> I've looked at them a bit
17:52 <garrettwilkin> seems like you're supposed to use the command
17:52 <garrettwilkin> "npm link hook.io"
17:52 <garrettwilkin> as the module name
17:52 <garrettwilkin> but...
17:52 <itayneeman> in the module you want to make available
17:52 <garrettwilkin> in the code you require hookio?
17:52 <itayneeman> you do "npm link"
17:52 <garrettwilkin> right
17:52 <itayneeman> and in the place where you want to require it
17:52 <itayneeman> you do
17:52 <itayneeman> npm link hook.io
17:52 <garrettwilkin> right
17:52 <itayneeman> or whatever module name it is
17:53 <garrettwilkin> i guess that the fact that the name on the command line has the period
17:53 <itayneeman> you can try npm link "hook.io"
17:53 <garrettwilkin> and when you call require, it doesn't have the dot
17:53 Metamucil joined
17:53 <garrettwilkin> is making me skeptical
17:53 jj0hns0n joined
17:53 <garrettwilkin> yea
17:53 <itayneeman> whats the module name in package.json?
17:53 <itayneeman> you should use that name as the argument
17:55 <garrettwilkin> so this what I'm doing
17:55 <garrettwilkin> garrett@li284-151:~/hook.io$ sudo npm link
17:55 <garrettwilkin> npm WARN eyes@0.1.7 dependencies field should be hash of <name>:<version-range> pairs
17:55 <garrettwilkin> npm http GET https://github.com/substack/socket.io-client/tarball/master
17:55 Topcat joined
17:55 <garrettwilkin> npm http 200 https://github.com/substack/socket.io-client/tarball/master
17:55 <garrettwilkin> oh whoops
17:56 vbabiy joined
17:58 jxson joined
17:58 bnoguchi_ joined
17:59 <garrettwilkin> all right
17:59 <garrettwilkin> i made a gist instead
17:59 <garrettwilkin> https://gist.github.com/1927740
18:00 kuebk joined
18:01 jocafa joined
18:02 davidbanham joined
18:02 blup joined
18:04 bnoguchi_ left
18:05 bnoguchi joined
18:05 <aismail_> so, anyone used persistencejs?
18:05 <* aismail_> is still having trouble
18:06 mgolawala_ joined
18:10 NinjaFox left
18:10 Industrial left
18:11 tenshihan joined
18:11 <tenshihan> hi everyone
18:11 <tenshihan> another problem.
18:11 <tenshihan> i'm developing on linux now and i'm having trouble with express
18:11 <tenshihan> var app = require('express').createServer(); my app consists of one line of code: var app = require('express').createServer();
18:12 <tenshihan> npm install -g express
18:12 <tenshihan> i have done that
18:12 <tenshihan> however it crashes saying can't find module
18:12 <tenshihan> any clues?
18:12 <RLa> did you create app with express command?
18:13 <tenshihan> no
18:13 <tenshihan> i just did none app.js
18:13 <tenshihan> do i need to run a different command?
18:13 garrensmith|away joined
18:13 <RLa> you should read express tutorial then
18:14 wizonesolutions joined
18:15 <garrettwilkin> how do I downgrade npm?
18:16 <itayneeman> does anybody know how commonly used NODE_MODULE_CONTEXTS is?
18:16 <RLa> huh, ec2 micro instance sucks for compiling node
18:16 <tenshihan> RLa: ok read the guide. started doing express /tmp/foo
18:16 <tenshihan> and it crashes still
18:16 <RLa> 90% cpu stealing
18:17 johnhamelink joined
18:17 sbb joined
18:17 <tenshihan> Error: The "sys" module is now called "util".
18:17 <Vainoharhainen> Is it possible to load in external js file into a "class" with nodejs / js ?
18:18 <rlidwka> tenshihan: you can try to make directory "node_modules" and run "npm install express" (without -g) there
18:18 <RLa> tenshihan, did you execute npm install -d in your app directory?
18:20 <tenshihan> http://pastebin.com/YnwBuMX5
18:20 brianseeders joined
18:20 <rlidwka> it's not an error, skip it
18:21 <rlidwka> i'm talking about this: Error: The "sys" module is now called "util"
18:22 <tenshihan> RLa: rlidwka: I attempted to do install -d and i got what is in that pastebin
18:22 <tenshihan> and when i attempt to do express /root/app to make an app
18:22 <tenshihan> it errors with Error: The "sys" module is now called "util".
18:23 <tenshihan> rlidwka: not sure how to skpi it
18:24 <RLa> tenshihan, what is your node version?
18:24 <tenshihan> v.0.7.4
18:24 <tenshihan> err v.0.7.3
18:25 <itayneeman> v0.7.x is "experimental"
18:25 <itayneeman> you should use the stable 0.6.x versions
18:25 <tenshihan> oh
18:25 <itayneeman> when 0.6 shipped, they renamed sys to util
18:25 <itayneeman> and I believe when 0.8 ships, that error will be enforced
18:25 <tenshihan> good point
18:25 <itayneeman> 0.7 is the staging ground for 0.8
18:25 <itayneeman> hence you're getting the error
18:26 <itayneeman> but it also means that most package authors have not updated their packages yet
18:26 <tenshihan> can i file a bug report ?
18:27 <rlidwka> hm... requiring "sys" will throw an error in 0.8? I smell that a lot of packages will fail then...
18:27 Tobsn joined
18:27 barce left
18:27 <itayneeman> rlidwka: I remember reading this somewhere, but I may be hallucinating
18:28 Jarred joined
18:28 <Jarred> What's usually lighter on memory, MySQL or MongoDB?
18:29 <Jarred> (and CPU footprint)
18:29 <Tobsn> depends on the data
18:29 <Tobsn> mongodb is heavy on ram but it only uses what is available
18:29 zackattack joined
18:29 <Tobsn> but thats what makes it fast
18:29 <Tobsn> mysql can use a lot of ram if you set it to use a lot of ram
18:29 gerard0 joined
18:29 <Tobsn> it depends on your cache settings, query cache, index cache etc.
18:30 <CoverSlide> 'sys' was deprecated since 0.5.x . any modules that are still using it probably suck anyway
18:30 <CoverSlide> if anything, just do a sed
18:30 <Jarred> hmm
18:30 <rlidwka> mysql imho is lighter by default, but this defaults can always be tweaked
18:31 <Jarred> alright, thanks
18:31 <Jarred> I'll go with MongoDB
18:31 <Jarred> actually
18:31 <Jarred> Why isn't PostgreSQL popular amongst people who do Node?
18:32 <itayneeman> isaacs: is NODE_MODULE_CONTEXTS still considered an "experiment"?
18:32 <rlidwka> I'm personally prefer NoSQL over SQL... and seems like it's not only me
18:33 <CoverSlide> in your opinion or actually based on experience?
18:34 <TooTallNate> itayneeman: yes, even more so now that the REPL has it *off* by default
18:34 <TooTallNate> (in 0.4.x is was on which was the only time it was relevant)
18:34 <Jarred> CoverSlide: I'm not sure if you're talking to me or rlidwka. From what I've seen so far, there are a lot more ORMs for MongoDB and MySQL for Node than there are for PostgreSQL
18:34 <itayneeman> TooTallNate: do you think it will ever make a comeback?
18:34 <itayneeman> TooTallNate: the main question is whether modules can depend on shared globals or not
18:35 Cromulent joined
18:35 <itayneeman> itayneeman: for example, I know that mocha pretty heavily uses it, and I'm considering it as well
18:35 <itayneeman> wow, I just sent a message to myself
18:35 <TooTallNate> itayneeman: i don't think it'll make a comeback, however the preferred method is to just expose your module as a function
18:35 <RLa> orm makes no sense for mongo since there is no "relations" :)
18:35 <TooTallNate> a function that accepts whatever globals/dependencies you are going to work with
18:35 <itayneeman> TooTallNate: I agree, but there are always edge cases (for example, in my case, code coverage information collection)
18:36 <TooTallNate> what do you mean?
18:36 CrypticSwarm joined
18:37 Vespakoen joined
18:37 <itayneeman> TooTallNate: in my case, I'm instrumenting every file that is required, and when the process is about to exit, I'd like to collect all that coverage information. With shared globals, I could just put all the information in a global variable, and access it on exit. Without shared globals, I'd need to do somethign more complex
18:38 <itayneeman> TooTallNate: did that make any sense?
18:39 <TooTallNate> itayneeman: why not have one "main" file, which has an Array of required files, and an on('exit') handler
18:39 <TooTallNate> and then add to that Array for each file when it gets required
18:39 <itayneeman> TooTallNate: that's fine, but how do I access the instrumented information? Imagine that for each line in a file, I add an expresion like "__coverage[filename][lineNum]++"
18:39 Vespakoen left
18:39 <TooTallNate> you can always just require some hidden module that holds your "shared" state
18:39 <itayneeman> I need to access that __coverage variable for each file
18:40 andrehjr_ joined
18:40 jesster7 left
18:40 snoj joined
18:40 <itayneeman> TooTallNate: though you might be right that i can require a hidden module that will give me back the __coverage object
18:40 <itayneeman> and then everything will be stored o nit
18:41 <TooTallNate> itayneeman: yes, that would be the
18:41 <TooTallNate> "module-y"
18:41 <TooTallNate> way to do it
18:41 reid joined
18:41 reid joined
18:42 <itayneeman> TooTallNate: and I assume that with NODE_MODULE_CONTEXTS, there is still only one version of that module (i.e. doing require('./foo') multiple times will return the same foo instance
18:42 <isaacs> itayneeman: are you familiar with the undercover module?
18:42 <TooTallNate> itayneeman: yes
18:42 <konobi> runforcover?
18:42 <itayneeman> isaacs: nope - there are new ones all the time :)
18:42 skm joined
18:42 <isaacs> itayneeman, konobi: oh, maybe that's it
18:42 <SubStack> cover all the things
18:42 <isaacs> the one that uses substack's bunker
18:42 <isaacs> yes...
18:42 <itayneeman> konobi: yeah
18:43 <itayneeman> isaacs: yes
18:43 <itayneeman> I forked runforcover
18:43 <isaacs> itayneeman: to answer your question, if it resolves to the same file, yes, you get the same module.
18:43 <itayneeman> because I hads ome issues wiht it
18:43 <konobi> it's used in node-tap too
18:43 <isaacs> itayneeman: i too found it a bit more alpha than i'd like.
18:43 <itayneeman> including the fact that it woudl codegen some bad code (I believe this was uglifies fault)
18:43 <isaacs> konobi: yeah... but it needs some love.
18:43 Aleminio joined
18:43 <konobi> mmm
18:43 <itayneeman> isaacs: that is why I now have cover (github.com/itay/node-cover)
18:43 Vespakoen joined
18:44 <isaacs> itayneeman: how easy is it to plug that into a test framework?
18:44 copongcopong joined
18:44 jacobolus joined
18:44 <garrettwilkin> anyone else notice that "sudo npm install hook.io" doesn't work
18:44 <SubStack> isaacs: I don't like how in tap it dumps the coverage to a file
18:44 <garrettwilkin> with npm 1.1.2?
18:44 <itayneeman> isaacs: I gave TJ a sample of how to add it to mocha
18:44 <itayneeman> https://github.com/itay/mocha/commit/2cf6c6669918c6abc142bc4cc331faa15b281ae1
18:44 <garrettwilkin> also
18:44 <itayneeman> For most frameworks though you dont even need to do that
18:44 <tenshihan> something that's not clear in the xpress docs is how to deal with querystring parameters. for example if my route is /rtr/ and i get /rtr/?hi=1&dog=2
18:44 <itayneeman> you can just
18:44 <garrettwilkin> how can i downgrade npm to 1.0?
18:45 <tenshihan> can i check req.params.hi for null to see if i got it?
18:45 <itayneeman> > cover run path/to/mainfile.js -- --any --other --arguments
18:45 gerard0 joined
18:45 <itayneeman> and then you can do
18:45 <itayneeman> > cover report html
18:45 hotsnoj joined
18:45 <addisonj> itayneeman: nope, query strings or on req.query
18:45 <addisonj> oops sorry tenshihan
18:45 <itayneeman> addisonj: I doubt that was meant for me :)
18:45 <addisonj> was who that was meant for
18:45 <tenshihan> ty
18:46 <itayneeman> isaacs: I spent the weekend moving cover over to esprima rather than uglify
18:46 <isaacs> what's esprima?
18:46 <itayneeman> so that it works better now
18:46 <itayneeman> a JS parser (in JS)
18:46 <itayneeman> http://esprima.org
18:47 ericmuyser joined
18:47 <itayneeman> I basically recreated substack's bunker, but for esprima
18:47 enmand joined
18:47 <itayneeman> and then added easier block-level code coverage info
18:47 gangleri joined
18:50 Vespakoen left
18:52 devaholic joined
18:53 <CIA-102> node: 03isaacs 07v0.6 * r692bcbe 10/ doc/api/_toc.markdown :
18:53 <CIA-102> node: Revert "docs: split TOC into two parts: overview and API"
18:53 <CIA-102> node: This reverts commit cd4cb8e79509c3940a94bd70ff16cdb264884114. - http://git.io/mtoeyg
18:54 ^robertj joined
18:54 tokumine joined
18:55 <Jarred> I have three apps. Two talk to a backend, which stores data and maintains state. One of those two is sending back and forth sensor data (it's state). The third is a way of representing state. Is NodeJS a good backend for this situation?
18:56 merlin83 joined
18:56 <WeeJeWel> npm install serialport fails.. anyone knows whats wrong or how to fix?
18:56 woodzee joined
18:56 <itayneeman> isaacs: http://apanda.s3.amazonaws.com/cover_html/index.html
18:56 <itayneeman> an example of the output
18:56 <isaacs> WeeJeWel: not without seeing the error output, that's for sure.
18:56 <itayneeman> for running the express tests
18:57 <WeeJeWel> npm ERR! `cmd "/c" "cd serialport_native;node-waf configure build;cp build/Release/serialport_native.node ../"` failed with 1
18:57 <isaacs> WeeJeWel: it doesn't work on windows.
18:57 <isaacs> WeeJeWel: sorry.
18:57 <WeeJeWel> ffuu
18:57 <WeeJeWel> ok thx
18:57 <remysharp> I'm trying to run a spawn command in windows node - but I'm getting 'createprocessW "system cannot find specified file" - I know it's a path thing, but outside of node, the command (coffee) runs fine. Any ideas/pointers?
18:57 <isaacs> WeeJeWel: it uses node-waf for its build. maybe you can use node-gyp on it manually instead.
18:57 <WeeJeWel> any other alternative that does?
18:57 <TooTallNate> isaacs: WeeJeWel: i already sent him a pull request for gyp
18:58 <isaacs> kewl
18:58 <TooTallNate> not sure about windows support though
18:58 <TooTallNate> i think it's merged actually
18:59 qsobad joined
18:59 Zzaichik joined
18:59 <tenshihan> TooTallNate: are you still around?
19:00 <TooTallNate> tenshihan: ya
19:00 <garrettwilkin> Do I need to run node 0.4 to use hook.io?
19:00 <garrettwilkin> since it depends on npm 1.0.x
19:00 <garrettwilkin> and it seems that i can't install npm 1.0.103
19:00 <garrettwilkin> if I have node 0.6 installed
19:00 <garrettwilkin> it says that I would have to use node 0.4?
19:00 <tenshihan> TooTallNate: I am now attempting node-gyp on linux as it's our dev server. I got configure to work. build get this...http://pastebin.com/ezrX7CKy
19:01 <isaacs> garrettwilkin: you can use npm 1.0.106 with node 0.4
19:01 <garrettwilkin> I must be doing something horribly wrong
19:01 <isaacs> garrettwilkin: why wouldn't you be able to?
19:01 <garrettwilkin> okay
19:01 <garrettwilkin> i just didn't think I had to go that far back
19:01 <garrettwilkin> first I tried to make it work with 0.7
19:01 <garrettwilkin> and just made a huge mess and confused myself
19:01 <garrettwilkin> so i started over
19:01 <garrettwilkin> with a node 0.6 install
19:01 <garrettwilkin> and install npm with the curl command
19:02 <garrettwilkin> and then thought maybe npm can downgrade itself?
19:02 <tenshihan> TooTallNate: found the problem nm
19:02 <TooTallNate> tenshihan: what was it?
19:02 <tenshihan> something between the keyboard and chair
19:02 <garrettwilkin> so i tried sudo npm install npm@1.0.103
19:02 <TooTallNate> :p
19:03 <remysharp> "createprocessW" on windows, any ideas anyone? kinda stuffed atm :-\
19:03 <itayneeman> isaacs: TooTallNate: thanks for the suggestions/help. I'll look into changing how Cover works based on what you said, as I think it can be greatly improved (and stabilized)
19:03 <itayneeman> any other suggestions/requests are always welcome
19:03 <itayneeman> isaacs: if there is a specific test framework you want me to make it work with, just let me know
19:03 <isaacs> itayneeman: tap
19:04 skm joined
19:04 <isaacs> garrettwilkin: curl http://npmjs.org/install.sh | npm_install=1.0.106 sh
19:04 <itayneeman> isaacs: OK - would you like CLI output, or HTML output (or configurable)?
19:04 <isaacs> itayneeman: html dumped into --coverage-dir or some such
19:04 <garrettwilkin> I didn't see that there was a 1.0.106
19:04 <garrettwilkin> in the npm info npm
19:04 <garrettwilkin> thanks for the tip
19:04 <garrettwilkin> ill try downgrading to node 0.4 and then installing hook.io
19:04 <garrettwilkin> i guess that Nodejitsu is still on 0.4?
19:05 <isaacs> itayneeman: it's got some integration with runforcover already, but it's got some issues (documented on the issues list in github)
19:05 <itayneeman> isaacs: I'll take a look at the issues
19:05 jxson joined
19:05 alejandromg joined
19:05 kevwil joined
19:06 <itayneeman> I see just issue #27, yes?
19:06 <garrettwilkin> sweet! didn't know that I could use that argument to specify the version
19:06 <garrettwilkin> thanks!
19:09 <itayneeman> isaacs: I'm not sure I understand the issue. runforcover will only read the files which you do require() on (it hooks into the .js extension)
19:09 <tenshihan> so i have a question. if i use a cpp extension it's faster than writing code in node, correct?
19:09 <tenshihan> my partner is attempting to argue the opposite
19:10 <jerrysv> tenshihan: depends
19:10 <jerrysv> tenshihan: if you do a lot of conversion back and forth between node and cpp, you lose anything you gain
19:10 <jerrysv> if you manage your own garbage collection, you can get a bit of a gain
19:10 <tenshihan> well let's say i send over some data have cpp do all the work and send it back. That's what'm going for
19:11 <jerrysv> but if you just run a very tight loop in javascript for 100000 loops, who knows? your javascript might end up being better in the end
19:11 samuelgoodwin joined
19:11 bingomanatee_ joined
19:11 agnat_ joined
19:11 <tenshihan> something to benchmark for sure
19:11 <jerrysv> tenshihan: check out http://legitimatesounding.com/blog/Faster_sometimes_Associative_Arrays_with_Node_js.html
19:11 <bingomanatee_> I know this seems basic -- how do you run forever from the console without having IT die when you log off?
19:11 <bingomanatee_> (ubuntu)
19:12 Eruadan joined
19:12 <tenshihan> bingomanatee_: nohup command & 2>&1
19:12 <itayneeman> isaacs: in that sense, it'll do no more file reading than was already done (as even the original require hook needs to read those files in)
19:12 <bingomanatee_> thx
19:12 c4milo joined
19:14 <isaacs> itayneeman: yeah, but look through the code.
19:14 <isaacs> itayneeman: it's doing a lot more file reading than it needs to.
19:14 <isaacs> it's not runforcover, it's the specifics of how its integrated into node-tap
19:14 <itayneeman> isaacs: the tap code, or the runforcover code?
19:14 <isaacs> itayneeman: the tap code
19:14 <itayneeman> isaacs: ah. here? https://github.com/isaacs/node-tap/blob/master/lib/tap-runner.js
19:14 <isaacs> teag
19:14 <isaacs> yeah
19:15 <isaacs> also a lot of it is sync, and it only works on files in lib/, etc.
19:15 nibblebo_ joined
19:15 <itayneeman> isaacs: why only in lib/?
19:16 c4milo joined
19:16 teslan joined
19:16 sdwrage joined
19:16 <isaacs> itayneeman: becasue it checks the folder to see if there are any files that *never* get loaded
19:17 <isaacs> itayneeman: but really, it should just not do that.
19:17 <itayneeman> isaacs: "it" being runforcover or tap?
19:18 <itayneeman> isaacs: also, tap spawns a new process per test file, is that right?
19:18 jj0hns0n joined
19:18 <isaacs> itayneeman: the coverage stuf in tap
19:18 <isaacs> itayneeman: yes, the runner runs each test file in a new process.
19:18 <itayneeman> itayneeman: OK
19:19 <isaacs> itayneeman: if you're going to look into this, please don't re-invent the whole thing from scratch.
19:19 shadowh511 joined
19:19 <itayneeman> isaacs: in what sense? I try and avoid doing that, but obviously people have different ideas
19:19 <isaacs> itayneeman: if you can fix the problems, great. but the other bits, like how it generates a new file to load runforcover and then dump the results, that much is probably fine.
19:20 <isaacs> itayneeman: sync fs io is not allowed. reading files unnecessarily is not allowed. it must work in files in "." by default, not a subdire.
19:20 <isaacs> *subdir
19:20 <isaacs> other than that, taps coverage stuff is pretty good.
19:20 <isaacs> i don't care very much about pretty output.
19:21 devaholic joined
19:21 <isaacs> i care much more about valid results with a minimum of overhead and a minimum of lines changed.
19:21 <itayneeman> isaacs: instrumentation seems to require lines changing, no?
19:21 <isaacs> itayneeman: yes. so the minimum is likely greater than 0 :)
19:22 sdwrage joined
19:22 <itayneeman> isaacs: :)
19:22 warz joined
19:22 <itayneeman> isaacs: my fork was meant to solve a couple of things: 1. collect intra-line info (e.g. true || b() <-- want to know that b() wasn't executed). 2. collect block-level coverage info. 3. be able to see the data in a clear way. 4. generate correct code
19:22 <itayneeman> isaacs: I'll think about your issues
19:22 <itayneeman> but I think they may be tied up to how runforcover works
19:22 devongovett joined
19:22 <itayneeman> isaacs: thanks for the poitner though, I will take a look
19:24 jimubao_ joined
19:25 joshfinnie joined
19:26 mcav joined
19:27 JoshJensen joined
19:28 <isaacs> itayneeman: np
19:28 <isaacs> itayneeman: bunker should be able to do that. i'm not sure why runforcover doesn't have it
19:29 <isaacs> itayneeman: i know for sure that uglify can generate correct code to do this.
19:29 <isaacs> because i've done it, and showed it off to SubStack back in 2011, which is why he wrote Bunker.
19:29 darshanshankar joined
19:30 jaw187 left
19:31 <ningu> why do people prefer centos for web servers?
19:32 <ningu> I've never used centos, so I have no idea what it's like. most familiar with ubuntu and debian.
19:32 <iain_> ningu: no idea, centos/redhat is horrible
19:32 <isaacs> ningu: because they use rhel at work
19:32 <isaacs> ningu: but yes, it's pretty much the worst thing ever.
19:32 <ningu> isaacs: so my intuition to go with debian is not a bad one?
19:32 CarterL joined
19:32 <ningu> I've always liked debian.
19:32 <isaacs> no, i much prefer debian
19:32 <ningu> ubuntu for desktop, perhaps.
19:32 <iain_> ningu: debian rocks for ease of use / upgrades
19:32 <isaacs> mint is nice, but i don't know how it is for servers.
19:32 <* dreamdust> prefers Debian
19:33 <isaacs> ubuntu = ugly busted windows, mint = ugly busted mac os
19:33 <ningu> haha
19:33 <isaacs> so, slightly less ugly.
19:33 <isaacs> just as busted.
19:33 <iain_> lol
19:33 <isaacs> same debian craziness.
19:33 <ningu> I like ubuntu, actually. wouldn't use it by choice as my desktop env, but I wouldn't go crazy if I had it.
19:33 <isaacs> there's no desktop os anywhere near as nice as os x, imo
19:33 <ningu> maybe it's gone downhill, I dunno. haven't used it in a couple years.
19:33 <ningu> right, that's why I use os x :P
19:34 <ningu> I was so happy when os x came out, cause I already had been a mac person since I was little, but had been keeping random x86 boxes around for linux for years.
19:34 <ningu> suddenly I had it all in one laptop.
19:34 donokuda joined
19:35 retornam_ joined
19:35 <ningu> it did kind of freak me out the first time I ran apt-get on a mac
19:37 Druid_ joined
19:37 brianseeders joined
19:37 <dilvie> isaacs: windows 7 isn't bad. It's much better than any variant of linux I'm aware of.
19:38 <ningu> dilvie: I hope you are trolling...
19:38 <ningu> not that windows 7 is total crap, but...
19:38 <dilvie> if went back in time 10 years and told me I'd say that about a Microsoft product, I'd punch you in the nose.
19:39 <dilvie> ningu: no, I'm not. Windows 7 is a solid OS with decent usability. It even has a better shell (powershell -- has OO piping, pretty badass, actually)
19:39 <dilvie> not that I think there's anything wrong with bash.. it's just showing its age.
19:40 vbabiy joined
19:40 spion joined
19:40 <dilvie> for the first time in a really long time, MS is actually producing some decent, current tech, instead of playing catch up.
19:41 <dilvie> windows8 is also the most standards-compliant GUI framework I'm aware of.
19:41 cjlicata joined
19:42 <dilvie> it's totally bizarre that I'm sounding like an MS fanboy.
19:42 <* isaacs> didn't realize there was a standard for GUI frameworks to comply with...
19:42 <dilvie> I haven't even mentioned that they produce the best IDE I've ever used.
19:42 <ningu> I think it's more like there are lots of standards. which is to say, there are none :)
19:42 <dilvie> isaacs: html / css / js
19:45 astrostl joined
19:46 RiverraiD joined
19:46 mcav joined
19:46 Skaag joined
19:50 boehm joined
19:51 kriskowal joined
19:52 addisonj joined
19:53 andrehjr joined
19:54 gzmask joined
19:56 ovnicraft joined
19:59 <Daegalus> Anyone know if the pricing on RedisToGo is ram memory or disk memory? because the pricing seems high if its disk memory
20:00 <gzmask> emscripten question: what is the operation overloading functions look like in js after the convertion?
20:00 jxson joined
20:01 tylerstalder joined
20:01 <Tobsn> Daegalus, rackspace cloud
20:02 <Tobsn> and Daegalus, it says pretty but MEMORY ;)
20:03 <Daegalus> ya, i guess if it was disk, it would say storage or something
20:03 <Tobsn> Daegalus, a 1gb node at rackspace cloud cost you 86bucks a month
20:03 hamfz_ joined
20:03 themiddleman_itv joined
20:03 <Daegalus> Tobsn: question, why would i choose Rackspace over AWS or Azure
20:04 <Tobsn> you can start with 256mb thats 10 bucks a month
20:04 <Tobsn> because AWS has outages and the performance is way lower
20:04 <Tobsn> besides that rackspace cloud is way faster to set up
20:04 <Tobsn> AWS/Azure suck against rackspace cloud
20:04 <Tobsn> and we tried them inhouse here a lot
20:04 <Tobsn> you get more bang for the buck at rs
20:05 <Daegalus> well, reason being, being part of Bizspark, I get 2 free Small instances, or 1 medium
20:05 <Daegalus> for Azure
20:05 <Tobsn> well, do whatever, im just trying to tell you redistogo looks like a ripoff
20:05 dthompso99 joined
20:06 madrax joined
20:06 <Daegalus> Tobsn: redis to go is purely redis hosting using AWS/Heroku, even says it at the bottom of the page
20:06 <Tobsn> heroku was down last week
20:06 <Tobsn> aws is down every couple weeks
20:06 <Tobsn> azure is microsoft, i dont trust microsoft
20:06 <Tobsn> :)
20:07 <Tobsn> if you want solid hosting go with softlayer, if you need vm's go with rackspace cloud
20:07 <Tobsn> if you get shit for free, take the free shit
20:07 <Tobsn> :)
20:08 <Daegalus> i have no problems with microsoft. But anyways, this is a small time unimportant to the world project. Its mostly for a game, and its a build calculator for a game. Im designing it in HTML5/JS and Node.js and Im using Redis for data store. Just wanted to see my options
20:08 <Daegalus> but it seems redis does not have a official or stable Windows port, so Azure might be out
20:09 c4milo joined
20:10 <Daegalus> Anyways, thanks for you insight Tobsn, i will take it under consideration. and AWS was never in the cards, i have never really liked it.
20:12 gzmask left
20:12 <Tobsn> Daegalus, http://www.rackspacecloud.com/2923-0-3-13.html
20:13 <Tobsn> if you want to sign up with rackspacecloud, do it over that link and i'll even set you up redis with a config that adjusts to your node size :P
20:14 mcav joined
20:14 boltR joined
20:14 <Daegalus> Tobsn: ok, i will message you again if I decide on Rackspace. Issue is, I am still in super early developement. just hte basic folder structure and a bit of code. I got DB spec finished and a URL spec for some stuff, but I am not anywhere near production ready stuff. But if you often come in here, I will message you when and if the time comes so you can get the referal i am assuming
20:15 <Tobsn> twitter.com/tobsn - if im not here ;)
20:15 <Tobsn> http://www.tob.sn :D
20:16 <Daegalus> i like how you hae taken this conversation and already tweeted about it
20:16 <Tobsn> sure
20:16 <Tobsn> gonna deliver content, right? :)
20:16 <Daegalus> haha not really.
20:16 <Tobsn> :P
20:16 wilmoore joined
20:17 jocafa joined
20:17 sorensen__ joined
20:17 bkaney joined
20:17 <Daegalus> Tobsn: imagine something like this: http://gw2.luna-atra.fr/skills_tool/ but not in flash, has an entire DB backend for saving peoples configurations, user system, descriptions, commenting, and a way for people to share them easier.
20:18 <Tobsn> i built something like that
20:18 <Tobsn> 9 years ago
20:18 <Tobsn> for spacepioneers
20:18 <Daegalus> nice :D but ya, not necessarily delivering content, but peopel will be able to make builds, and link to it
20:18 <Tobsn> you sure you want to code that?
20:18 <Daegalus> and if it catches on as THE site to do your builds on. there can be lots of ad revenue when the site launches
20:19 <Tobsn> seems like a lot of work for almost no payback
20:19 <Daegalus> why not, seems like a simple and small project to work on inbetween my classes and such
20:20 <Tobsn> sounds to me like a lot of tiny shit you have to do
20:20 <Tobsn> data entry etc.
20:20 <Daegalus> thats already automated
20:20 <Tobsn> hmm oh well
20:20 <Daegalus> this is just an idle project, its nothing serious.
20:20 josherickson joined
20:21 CoverSli1e joined
20:22 arturadi_ joined
20:22 gde33 joined
20:22 shanem joined
20:22 cynicalj1y joined
20:22 larsschenk joined
20:22 voodootikigod joined
20:22 steveoh joined
20:22 k1ttty joined
20:22 Jarred joined
20:22 deeprogram joined
20:22 isao joined
20:22 jasonw22 joined
20:22 larsschenk left
20:22 <Daegalus> yay netsplit?
20:24 Octayn joined
20:24 ryanfitz_ joined
20:25 gerard0 joined
20:27 devaholic joined
20:28 devaholic joined
20:28 steveoh left
20:32 mikeal joined
20:33 rich joined
20:33 andrehjr joined
20:33 <CIA-102> node: 03isaacs 07master * r29463cb 10/ test/simple/test-process-argv-0.js : Update argv0 test to verify correct behavior - http://git.io/UgCDgQ
20:33 <CIA-102> node: 03isaacs 07master * r44daa98 10/ lib/vm.js :
20:33 <CIA-102> node: Wrap NodeScript binding class in JavaScript layer
20:33 <CIA-102> node: This makes it easy to prevent errors where Script methods
20:33 <CIA-102> node: are called on non-script objects, resulting in Assertion failures. - http://git.io/nr78QQ
20:33 jergason joined
20:33 rich left
20:34 darinc joined
20:35 QaDeS joined
20:39 QaDeS_ joined
20:39 deeprogram_ joined
20:40 <tenshihan> TooTallNate: hey dude, another question for ya. I'm trying to compile boost threads into my extension but this is popping up : mutex.hpp:40: error: exception handling disabled, use -fexceptions to enable i see you are doing -fno-exceptions .. is there a problem with taking it out?
20:40 kurtzhong joined
20:40 andrehjr joined
20:41 <TooTallNate> tenshihan: see https://github.com/TooTallNate/node-gyp/issues/17
20:41 mcav joined
20:41 <TooTallNate> scroll to the bottom for the TLDR
20:42 mikeric joined
20:42 abraxas joined
20:46 Joeysomo joined
20:47 jskulski joined
20:47 jocafa joined
20:47 Aria joined
20:48 <Tobsn> what does gyp exactly do?
20:48 <Tobsn> i read it but i dont really get it
20:48 <tenshihan> dude
20:48 <tenshihan> it's the shit
20:48 <Tobsn> lol
20:48 subbyyy joined
20:49 <ningu> I don't want to be gypped
20:49 gde33|2 joined
20:49 <Tobsn> so it compiles .js to C?
20:49 <tenshihan> It's like a makefile + easy compiler
20:49 <tenshihan> no
20:49 <tenshihan> it compiles c++ into a library that node can use
20:49 andrehjr joined
20:49 <Tobsn> hu?
20:49 <ningu> Tobsn: bindings...
20:50 <Tobsn> oh
20:50 <Tobsn> oooooh
20:50 <Tobsn> hmm
20:50 <Tobsn> *bookmark
20:50 jtsnow joined
20:52 donokuda joined
20:52 domo1 joined
20:54 domo1 left
20:54 bwen joined
20:54 AI42 joined
20:54 fifo joined
20:54 kirbysayshi joined
20:54 <fifo> Can someone please help me with http://pastebin.com/j8S5Twxy
20:54 icewhite joined
20:55 <fifo> I'm trying to create an object I can use as an instace.. can someone correct me?
20:55 dthompso99 left
20:55 <fifo> I know I'm doing something wrong
20:55 <fifo> assume the first half of the paste lives in one file and the lower half lives in another
20:55 <bwen> fifo: how did you name the files?
20:56 jj0hns0n joined
20:56 <rlidwka> looks good, what is the problem?
20:56 <fifo> so its correct?
20:56 <fifo> oh.. i just felt like it wasn't the "correct" way
20:56 gde33 joined
20:56 andrehjr joined
20:56 <bwen> felt == did not bother to actualy test it? O.o
20:56 <fifo> no no it works
20:57 <fifo> my question was if it was the correct way to do it
20:57 <markq> yep this is the correct way
20:57 sdwrage joined
20:57 <bwen> oh ic
20:57 <fifo> ok
20:57 <fifo> thanks
20:57 <bwen> fifo: did you put the file in node_modules?
20:57 <AI42> Hi i have problems with jade, how to use img, i type img src='path to image' and jade parse it like <img/> O_o
20:58 <fifo> uh no its living in a lib dir right now
20:58 Glenjamin joined
20:58 <markq> i(src='path')
20:58 <markq> ./[anything] would mean that it's in the same directory yeah
20:59 k1ttty_ joined
21:00 <fifo> yeah
21:00 alippai joined
21:03 <AI42> i(src='path') => <i src="my_logo_icon.png"></i>
21:03 <AI42> img(src='path') => <img src="my_logo_icon.png"/>
21:04 <AI42> so it does not work either
21:05 ohtogo joined
21:05 retornam joined
21:05 <tmike> hey on the matter of jade, if you were to class something class="brush: js" would you use pre.brush:.js? or pre."brush: js"?
21:05 <digiwano_> why would you put a colon in a class name >_<
21:06 <tmike> not my code
21:06 <tmike> but I do need to use the class
21:06 <tmike> I'll use the quotes and see if it breaks
21:08 unrob joined
21:08 tjholowaychuk joined
21:08 <AI42> why i can't find how to work with images in documentation jade docs it's not docs it's just tutorial (
21:09 <tenshihan> does anyone know how to convert redis::client::string_vector into a string?
21:09 <tmike> what's wrong with <img src="blah"/>?
21:09 <unrob> Hi, I was hoping to get some help regarding the usage of accented characters with crypto.createHmac
21:09 <tenshihan> you need a space between " nad /
21:09 <AI42> it doesn't work
21:09 mikeal joined
21:09 <tjholowaychuk> AI42 just use an image tag.. lol
21:09 <tjholowaychuk> same as any other tag :p
21:09 <tmike> that sounds like a jade bug, if it doesn't put the space in.
21:09 <tjholowaychuk> if it doesn't work the path to your image is incorrect
21:09 <tmike> and if the space is required
21:10 JoshJensen joined
21:10 <bwen> anyone can recommend a database for nodejs that have a driver capable of "streaming" the result assynchronously and not just return the whole results in one chunk ?
21:10 ericmuyser joined
21:10 <AI42> i've tested with html? path is correct
21:10 <AI42> *,
21:11 <unrob> My code is: var signer = crypto.createHmac('sha256', 'á'); var expected = signer.update("text").digest('hex'); it treats the 'á' as 'á' for some reason
21:12 <tmike> it defaults to unicode, right?
21:12 <tmike> because making sure your stream is encode properly could help.
21:12 <unrob> How would I go about doing that?
21:13 gde33|2 joined
21:13 <unrob> The actual string comes from a file, which I load doing: fs.readFileSync(configFile, 'utf-8');
21:13 <AI42> <tjholowaychuk> img src='path' => <img/>
21:13 <tjholowaychuk> AI42 that's not jade syntax for a tag...
21:13 <unrob> When I console.log the contents, it shows up correctly, though
21:13 <tjholowaychuk> img(src='path')
21:14 a_suenami joined
21:14 tmcw joined
21:14 <AI42> img(src='path') => <img src="my_logo_icon.png"/>
21:14 <AI42> and doesn't work
21:15 <markq> bwen, I think you can buffer data with mongoose but I'm not sure
21:15 <tmike> AI42 how can that not work?
21:15 pp01bit joined
21:15 <markq> i mean pipe*
21:16 <tjholowaychuk> AI42 nothing wrong with that
21:16 dekub joined
21:17 <tenshihan> anyone know how to convert string_vector into something String::New can handle?
21:18 rauchg joined
21:20 warz joined
21:20 warz joined
21:21 kenperkins joined
21:21 samsonjs joined
21:22 <rlidwka> String::New afair gets C string... I dont know what string_vector is, but you can probably google how to cast it to C string
21:22 <tenshihan> i have tried
21:22 <tenshihan> it's specific to the redis - cpp library
21:23 levi501d joined
21:24 fifo left
21:24 alejandromg joined
21:25 Allyz joined
21:26 tmcw joined
21:28 k1ttty joined
21:31 westg joined
21:34 ditesh|cassini joined
21:34 andrehjr joined
21:34 markq joined
21:35 unrob left
21:35 jaw187 joined
21:37 webguynow joined
21:40 bradleymeck joined
21:41 jdeibele joined
21:41 ovnicraft joined
21:42 andrehjr_ joined
21:42 bicranial joined
21:43 <alejandromg> isaacs: Can you share the link where you explain about and "style" guide for javascript (the comma first and more) :)
21:43 <maxogden> nodeguide.com/style.html
21:44 <isaacs> http://npmjs.org/doc/coding-style.html
21:44 <isaacs> alejandromg: or `npm help coding-style`
21:44 <alejandromg> That's the one that you put a while back on a gist?
21:44 diva joined
21:45 bwen left
21:46 <alejandromg> btw thanks maxogden
21:46 trupppOFF joined
21:47 andrehjr joined
21:47 <zackattack> anyone here an nginx guy? (or girl)
21:47 <tmike> I've been playing with it recently, what's up?
21:48 <zackattack> I'm trying to figure out how to rewrite a request so it gets parsed by a directive later in the config file
21:48 <tmike> yeah I don't know anything about that
21:48 <zackattack> haha :)
21:48 <zackattack> me neither
21:49 arvidkahl joined
21:50 <ag4ve> is there a problem with jade on npm?
21:50 whatthefunk joined
21:51 <zackattack> whats the issue ag4ve
21:51 <ag4ve> ie, npmjs.org is giving me 300 and 200 errors...
21:51 <tenshihan> I'm getting this: Error: Unable to load shared library /root/mrpi-redis-cplusplus-client-14e3829/out/Release/extension.node but i can see the file
21:51 <isaacs> ag4ve: 300 and 200 are not errors :)
21:51 <isaacs> ag4ve: in fact, 200 is 100% not an error.
21:51 <tmike> lol
21:51 <isaacs> ag4ve: it's the code for "Success"
21:51 <ag4ve> errr right
21:51 gavin_huang joined
21:51 <tenshihan> could it be because i !-fno-rtti
21:51 <isaacs> 304 = "content not modified". ie, "What you said you have in your cache is the same thing I would give you, so you're all set."
21:52 garrettwilkin joined
21:52 skoom joined
21:53 <ag4ve> npm has a cache.... *shrug* it doesn't seem to be downloading for me but i can always just clone the repo
21:53 <ag4ve> .... just wondering if it was me or a general issue
21:53 slloyd joined
21:54 <hermanjunge> Hi guys
21:54 <hermanjunge> anybody knows how to trap CTRL + C
21:54 <ag4ve> oh shit.... this is also the error you get when it's time to expand the vmdk....
21:54 <isaacs> ag4ve: you can always `npm cache clean`
21:54 <hermanjunge> to handle it in my own function
21:55 <isaacs> ag4ve: if you'd rather throw the cache away
21:55 <isaacs> hermanjunge: process.on('SIGINT', function() { ... })
21:55 <hermanjunge> sorry, I haven't seen you isaacs
21:55 <hermanjunge> of course you know :D
21:55 jergason joined
21:55 <hermanjunge> Thanks a lot
21:55 <isaacs> hermanjunge: or, if it's a raw stream, you have to listen for the code explicitly
21:55 <isaacs> hermanjunge: like the repl does
21:55 <hermanjunge> isaacs
21:55 <isaacs> hi :)
21:55 <hermanjunge> another question since you are here
21:55 <maxogden> lol
21:55 <hermanjunge> tail recursion
21:55 shadowh511 left
21:56 teslan joined
21:56 <hermanjunge> is really tail recursion, like erlang does?
21:56 <isaacs> here's the thing about tail recursion.
21:56 <isaacs> first, i'm going to tell you a little something about tail recursion.
21:56 <isaacs> then i'll tell you all about tail recursion.
21:56 <* maxogden> rimshot
21:56 <hermanjunge> JAJAJJAJA
21:56 <hermanjunge> example
21:56 <isaacs> hermanjunge: no, there is no TCO in js
21:56 <SubStack> (tail (tail (tail (... recursion) ) ) )
21:56 <hermanjunge> loop() { doSomething(); setTimeout(loop, 1000); }
21:57 <isaacs> hermanjunge: but if you're doing stuff on nextTick or as a result of some async IO, then you'll drop the stack, which is a lot *like* tco
21:57 <hermanjunge> does it stack and clock my memory someday?
21:57 <isaacs> hermanjunge: no, because the timeout drops the stack
21:57 <isaacs> hermanjunge: but! that means you lose the return point as well.
21:57 <hermanjunge> so its safe to run it
21:57 <isaacs> hermanjunge: so, you can't return a value back 10 layers up.
21:57 <hermanjunge> for a main loop
21:57 <isaacs> hermanjunge: which *is* possible in erlang, scheme, etc.
21:57 <isaacs> oh, yeah, that's fine.
21:57 <isaacs> crockford dubbed that "eteration" once upon a time.
21:57 <ag4ve> there we go, killed my cpan tree and everything is good :) back to code
21:57 <hermanjunge> the way one does in another languages do { doSomething(); waitOneSec(); } while(true)
21:57 <isaacs> the term didn't stick, but i liked it.
21:58 <isaacs> hermanjunge: right.
21:58 <hermanjunge> excellent
21:58 <isaacs> hermanjunge: that way is a lie, or a bad idea, or both.
21:58 <hermanjunge> I was doing a code, which was too procedural, and this do/while had me crazy
21:58 <isaacs> yep
21:58 <isaacs> you gotta chop it up for node
21:58 <hermanjunge> yep
21:58 <isaacs> which is kind of a good thing to do anyway for other reasons.
21:59 <hermanjunge> function One () { doSomething(); Two() }
21:59 <hermanjunge> function Two() { doOther(); Three() }
21:59 <hermanjunge> Yep
21:59 ryanfitz joined
21:59 <hermanjunge> thank you for your time
21:59 <hermanjunge> :D
21:59 <isaacs> hermanjunge: np
21:59 shanem joined
22:00 <tenshihan> hmm
22:00 <tenshihan> this is failing all of a sudden
22:00 <tenshihan> var addon = require('/root/extension'); .. the file is there. but i get unable to load shared library
22:00 Joeysomo joined
22:00 <tenshihan> even if i pull a version that's a lil older that _was_ working
22:02 jxson joined
22:04 jxson joined
22:04 bvmount joined
22:04 <tenshihan> do you think this could be the culprit ? 'cflags_cc!': [ '-fno-exceptions','-fno-rtti' ]
22:05 <ag4ve> why isn't jade throwing an error or what is happening, i don't any jade directory under $HOME/node_modules: http://pastebin.me/e8440d992354f3e16479ca6f2ad200c2
22:05 <tenshihan> TooTallNate: do you know if using these flags can cause the creation of an unusable extension ? 'cflags_cc!': [ '-fno-exceptions','-fno-rtti' ]
22:05 patcito joined
22:06 <monokrome> It shouldn't. Wouldn't an extension that needs RTTI or throws exceptions just fail to compile?...
22:06 McMAGIC--Copy joined
22:07 _th_n joined
22:08 <tenshihan> it does fail to compile
22:08 <tenshihan> unless i add that flag
22:08 <tenshihan> then it compiles fine
22:08 kriskowal joined
22:08 <monokrome> oh lol
22:09 <tenshihan> http://pastebin.com/t4rUKSMY
22:09 <tenshihan> that's the code for the extension i'm writing. maybe you can spot the error
22:09 gaarf joined
22:10 sh1mmer joined
22:10 mcav joined
22:10 arvidkahl joined
22:10 sdwrage joined
22:11 <monokrome> What is the compiler error?
22:11 KrisJordan joined
22:11 <tenshihan> if i leave it with out the flags, then it complains those flags are there
22:11 <tenshihan> otherwise, no error
22:11 <tenshihan> but node says
22:11 <tenshihan> Error: Unable to load shared library /root/cpp_node_extension/out/Release/extension.node
22:11 <TooTallNate> tenshihan: check the arch of the .node file and node
22:11 <TooTallNate> tenshihan: also, update to v0.2.0 :)
22:12 <TooTallNate> i've been slaving away on it all day
22:12 <tenshihan> update what to v0.2?
22:12 <tenshihan> oh
22:12 <tenshihan> gyp
22:12 <TooTallNate> `file ./out/Release/bindings.gyp`
22:12 <TooTallNate> tenshihan: ya, `npm install -g node-gyp`
22:12 <TooTallNate> `file node`
22:12 jxie joined
22:12 <TooTallNate> more than 50% of the time that error is an arch mismatch
22:13 <TooTallNate> but if you're using node-gyp that shouldn't happen :p
22:13 githogori joined
22:13 <TooTallNate> tenshihan: idk to be honest if those flags would yeild an usuable module
22:13 <TooTallNate> i know that enabling exceptions is alright
22:14 <TooTallNate> and i know that another person needed -fno-rtti
22:14 <TooTallNate> but i've never tried them together
22:15 tenshihan_ joined
22:15 <tenshihan_> client crashed
22:15 <tenshihan_> i get this now with configure
22:15 <tenshihan_> http://pastebin.com/eG1Eg5AL
22:16 <TooTallNate> damn
22:16 <TooTallNate> delete the Makefile.gyp file
22:16 <tenshihan_> not sure what you mean by check the arch. .. it should be the same since i did a simple hello world and it worked and compiled with node.
22:17 <TooTallNate> ya forget that
22:18 <TooTallNate> there's a patch coming soon that actually reports the dlerror()
22:18 <tenshihan_> http://pastebin.com/zCYr4TYp
22:18 <tenshihan_> dlerror?
22:18 <TooTallNate> instead of the non-descriptive "Unable to load shared libarary"
22:19 <TooTallNate> do you have two gyp files?
22:19 <tenshihan_> oh that's be awesome
22:19 <tenshihan_> yes
22:19 <tenshihan_> now i do
22:19 <tenshihan_> which should it be now, i remember you said you were altering that
22:20 <TooTallNate> just have one
22:20 <TooTallNate> but you can name it anything now
22:20 <tenshihan_> works
22:20 <TooTallNate> hello.gyp is fine
22:21 <tenshihan_> still getting dlerror though. crap
22:21 iangreenleaf joined
22:21 <tenshihan_> you know of any problems with boost and node?
22:21 disappearedng joined
22:21 <TooTallNate> hmmm
22:21 <TooTallNate> i haven't heard of anyone doing it actually
22:22 <tenshihan_> and this isn't the culprit? 'cflags_cc!': [ '-fno-exceptions','-fno-rtti' ]
22:22 josh_wines joined
22:22 <TooTallNate> it may be
22:22 <tenshihan_> poop
22:22 andrehjr joined
22:22 <TooTallNate> you gotta try eliminating possibilities
22:23 <TooTallNate> if you want to be daring
22:23 <TooTallNate> try this guy's branch: https://github.com/shigeki/node/compare/shigeki_20120224
22:25 <tenshihan_> https://svn.boost.org/trac/boost/ticket/2094
22:25 arvidkahl joined
22:26 <tenshihan_> looks like someone patched boost to avoid this particular situation
22:26 <tenshihan_> i just wish i was better with patch
22:31 <shlevy> Hi. I have an app that works fine on OSX but when I run it on windows only the first request gets responded to
22:32 sarlalian joined
22:33 TooTallNate joined
22:34 blueadept joined
22:35 cjm left
22:35 disappearedng joined
22:39 davidwalsh joined
22:39 Vennril2 joined
22:39 slloyd joined
22:41 c4milo joined
22:41 dilvie joined
22:42 criswell joined
22:44 arvidkahl joined
22:46 woodzee joined
22:51 cliffano joined
22:52 ryan_stevens joined
22:54 abhatnag joined
22:54 <abhatnag> is this an appropriate place to ask for jade help?
22:54 <alejandromg> abhatnag: just ask...
22:55 tornad joined
22:56 t0mmyvyo joined
22:56 jamescarr joined
22:57 <abhatnag> I have an express setup with jade, but can't get jade to "parse" my jquery based ajax, even though the console shows XHR objects are being passed: http://fpaste.org/zm4a/
22:57 <abhatnag> anyone have any luck with this?
22:59 <abhatnag> upon clicking the button in line 17, console shows a 200 message; but neither lines 23, 29 or 31 show a result.
22:59 <shlevy> Anyone had any problems with an app working on OSX but not Windows?
23:00 dreamdust joined
23:00 <alejandromg> abhatnag: maybe not releated with your problem, but since you are defining a layout, you don't need to add and extra html tag at index.jade
23:00 <alejandromg> abhatnag: the same with the head tag
23:01 <alejandromg> and body
23:01 <rlidwka> shlevy: looks like nobody here use windows :)
23:02 <abhatnag> alejandromg: ah true enough, thanks
23:02 <abhatnag> shlevy: are there any specific console errors you see in windows?
23:03 <alejandromg> abhatnag: also, maybe the call to /api/soc, is timing out, add a log for it (on server.js) and see if the call is working
23:03 <shlevy> abhatnag: Nope. No errors or anything, just nothing is sent from the server after the first non-static request
23:04 <shlevy> abhatnag: I'm using Server-Sent Events, so I have requests with socket timeout set to Infinity, but it works just as expected on OSX
23:04 briancra_ joined
23:04 <abhatnag> alejandromg: hmm, perhaps, but the alert in line 23 should still work, right? also 'web console' in JS shows the message content that is going through, and it seems to be ok
23:05 <abhatnag> shlevy: sorry, confused: so your frontend is not working in Win? the server is on a separate machine here?
23:06 sharkbird joined
23:06 <shlevy> When the server is on OSX, it works. When the server is on Windows, it doesn't, regardless of whether the client is the same machine
23:06 <alejandromg> abhatnag: maybe a res.end() missing?, Oh yeah it should
23:06 sharkbird_ joined
23:06 sharkbird__ joined
23:07 <alejandromg> abhatnag: what about putting the create.js inside of $(document).ready(function(){ .....});?
23:07 jergason joined
23:07 arvidkahl joined
23:08 <abhatnag> alejandromg: I think the res.end() is in place; the same setup works without jade, in normal html. I have a feeling the problem is with jQuery's methods acting on jade...somehow, if that makes sense
23:09 <abhatnag> shlevy: not sure, are you sure your versions of node etc are exactly the same on both OSes. Also when you run a server instance on Windows, the console shows nothing? and does the frontend return a message?
23:09 tmcw joined
23:09 <alejandromg> abhatnag: I don't think so, since the render action happen before requiring the create.js file (which is required when the page start to load in browser
23:09 <tmcw> Does anyone have experience using dtrace or oprofile with node?
23:09 <shlevy> abhatnag: Everything's the same. Frontend doesn't return a message, just keeps trying to load. The console log shows the same in both versions.
23:10 MrWarGames joined
23:11 jetienne joined
23:11 <abhatnag> shlevy: I had a "constant load" thing once. I tried throwing an axaj message to the server and was returned a 500. You could try the same. If you also get back a 500, then at least you know what type of a problem you have.
23:11 <abhatnag> alejandromg: ah, I think I'm confused about the whole thing, let me inspect my code a bit more
23:13 MrWarGames joined
23:13 gavin_hu_ joined
23:14 MrWarGames joined
23:14 MrWarGames joined
23:14 <shlevy> Hmm, figured it out. Setting the socket timeout to Infinity explicitly was causing the problem, seems like that might even be a v8 issue
23:15 MrWarGames joined
23:17 MrWarGames joined
23:18 bradleymeck joined
23:18 blueadept joined
23:19 nerdfiles1 joined
23:19 nerdfiles1 left
23:22 MrWarGames joined
23:22 MrWarGames joined
23:23 MrWarGames joined
23:29 nerdfiles1 joined
23:29 <hermanjunge> Regular Expression question:
23:29 <hermanjunge> Does somebody know how to extract a parameter from an url?
23:29 <hermanjunge> http://www.mysite.com/path/to?param=2&other_param=5
23:29 <tenshihan_> /key=([^&]+)/
23:29 <hermanjunge> returns 5?
23:30 dreamdust left
23:30 <tenshihan_> /other_param=([^&]+)/
23:30 <hermanjunge> :D
23:30 donokuda joined
23:30 nerdfiles1 left
23:30 caffine joined
23:31 <hermanjunge> Thanks tenshinhan_
23:31 <hermanjunge> that third eye works fine!
23:33 <markq> what's the difference between socket.io-node and socket.io?
23:34 <rlidwka> tenshihan_: it would match "another_param=6&other_param=5" just fine :)
23:35 <rlidwka> markq: where did you find socket.io-node?
23:37 <markq> oh wait nvm. that used to be the old name I guess.
23:37 <markq> was reading an old article on how to node
23:37 <rlidwka> yep
23:38 rwaldron joined
23:39 dshaw_ joined
23:39 fans joined
23:42 wizard_2 joined
23:42 bnoguchi joined
23:43 githogori joined
23:43 <wizard_2> Hi, are there any good examples of implementing readable and writable streams?
23:44 <monokrome> readable and writable?
23:44 <tenshihan_> rlidwka: just curious, why not use req.query.another_param ?
23:45 itayneeman joined
23:46 davidwalsh joined
23:46 donokuda joined
23:46 jdeibele joined
23:46 <rlidwka> tenshihan_: ask hermanjunge... probably because not everyone use express :)
23:47 <hermanjunge> ha ha ha
23:47 <hermanjunge> exacty
23:47 <hermanjunge> you don't need express to everything
23:48 <tmike> I'm building a pastebin/sprunge.us clone that uses express and couchdb
23:48 <wizard_2> monokrome: yea - I actually just want to implement a filter stream, to transform data on it's way though, it looks like I need to impliment write() and emit data
23:48 alexmcpherson joined
23:48 <tmike> I think it's pretty neat, and probably pretty useful. Anyone interested in taking a look at it?
23:48 juyeong_park joined
23:49 jdeibele1 joined
23:49 arvidkahl joined
23:49 <tmike> sprunge, by the way, is a pastebin that uses cat | curl -F as its primary mode of sending data to it
23:49 <tmike> instead of actually pasting into a form
23:50 Joeysomo joined
23:51 <tmike> anyway, github's here: http://github.com/totallymike/pastebin_clone
23:51 t0mmyvyo joined
23:51 <tmike> All you need is a pastebin db somewhere, expressjs and Alex Gorbatchev's JS syntax highlighter, most of which is included.
23:52 <tmike> that is, a couchdb database called pastebin
23:52 andrehjr joined
23:55 felixge joined
23:55 felixge joined
23:55 <tmike> felixge are you up early or late?
23:56 mikeal joined
23:57 OmidRaha joined
23:57 rurufufuss joined
23:57 boltR joined
23:58 sbb left
23:58 <alexmcpherson> anyone take a look at towerjs yet?
23:58 EhevuTov joined
23:58 <justicefries> yes
23:58 <justicefries> ohai alexmcpherson
23:58 <alexmcpherson> Oh hai Gerred
23:58 <justicefries> how are you?
23:58 <alexmcpherson> Whaddya make of it?
23:58 st_luke joined
23:58 <justicefries> a todo list, duh.
23:58 <alexmcpherson> Installing it now
23:59 <alexmcpherson> No no, not with it, OF it. Cool?
23:59 <justicefries> Oh, it's alright except MongoDB.
23:59 <justicefries> also, I think it's "comfortable".
23:59 <justicefries> but missingthepoint.txt