[00:00] samcday: Shailer Park... Logan-bogan ;P [00:00] creationix: how can I use the old http api with node 0.4 [00:00] squeeks: lol logan [00:00] creationix: (as a stopgap in migrating stuff) [00:00] zzak: samcday: theres a bunch of rubyists from that area [00:00] TomsB: Sebmaster: But I still need to pass registry like this, right? games[id] = new Game(this); (this = global registry obj.) [00:00] samcday: Orly, maybe I should learn Ruby so I can has some friends ^_^ [00:00] zzak: :D [00:00] Sebmaster: TomsB: Yes [00:00] creationix: isaacs: ryah: was the http legacy API ever tested with https? [00:01] TomsB: Sebmaster: ok, feels beter to write like this, heh. Thanks. [00:01] TomsB: *better [00:01] creationix: I assume it's deprecated and will be gone after 0.4.x [00:01] Sebmaster: TomsB: yea, np [00:05] mscdex: Sebmaster: i've submitted the cpus() fix to ryah, in the meantime you can patch your install with this: https://gist.github.com/b80b6760cddc7b76338c [00:05] brapse has joined the channel [00:05] Sebmaster: mscdex: thanks [00:05] Sebmaster: mscdex++ [00:06] v8bot: Sebmaster has given a beer to mscdex. mscdex now has 7 beers. [00:06] [[zzz]] has joined the channel [00:06] Juan77_ has joined the channel [00:07] Juan77_: hi, how I can convert a async function in a sync function... is there a way to do that? [00:08] mscdex: Juan77_: have you looked at Step or Seq? [00:09] SubStack: plenty of ways! [00:09] comster: I'm feeling pretty newb right now, why would I be getting # has no method 'write'? I'm trying to get a base64 image stored as binary to my db, is Stream or Buffer the right approach? [00:09] SubStack: also it's fun to write your own async flow control lib too [00:11] jashkenas has joined the channel [00:12] Juan77_: hi mscdex, no, I don't know about Step or Seq....but I think that is very trivial, that I don't figure out right now.... my lib is async, but sometimes need to be sync.... where I can found about step ot seq....? [00:12] samcday: comster: What Stream are you using? [00:12] mscdex: Juan77_: https://github.com/substack/node-seq and https://github.com/creationix/step [00:12] mscdex: there's probably several others out there too [00:12] mscdex: but those i know of off the top of my head [00:13] Juan77_: hi mscdex thx!! I will look at these libs! [00:13] comster: samcday, the wrong one I guess... base require('stream').Stream, like var myStream = new Stream(); [00:13] samcday: comster: Nope can't do that. Streams are abstract. [00:13] mscdex: Juan77_: you may want to also check out the modules page on the wiki: https://github.com/ry/node/wiki/modules [00:13] davidc_ has joined the channel [00:13] comster: oh, duh... so what are the implementations besides like net.createServer ? [00:13] samcday: samcday: stream.Stream is just a base point for actual streams to implement, like in net. Which DB lib are you using? [00:14] samcday: ... Why did I just address myself.... [00:14] mscdex: :D [00:14] EyePulp: that could be a medical issue [00:14] comster: that was kinda cool =) thanks for the help btw [00:14] comster: mongo [00:14] samcday: And you already have the base64 image sitting in a buffer? [00:14] SubStack: Juan77_: you can bolt sync functions onto async callers but not the other way around [00:15] chapel: SubStack: what change in npm made you switch to hashish? [00:15] SubStack: async flow control can't solve that problem [00:15] comster: well I have it from another event .on('data', function(data) [00:15] SubStack: chapel: the modules field, so require('traverse/hash') will stop working [00:15] chapel: oh [00:15] comster: should I just use a buffer? [00:15] samcday: Okay well, I'm not terribly familiar with Mongo [00:15] samcday: So I don't know how you actually persist binary with it [00:16] chapel: I dont use the modules field :) [00:16] SubStack: and Hash is big enough to be its own module anyhow [00:16] chapel: did isaacs say why he is making that change? [00:16] Juan77_: SubStack: in other words can convert a sync to a async function but not convert async to sync?? [00:16] samcday: But if it needs a Buffer, then I actually just wrote a pretty handy lbirary you could use: https://github.com/samcday/node-stream-buffer [00:16] comster: I can do that part, if I can just get the binary from the base64 [00:16] isaacs: what change did i make [00:16] isaacs: ? [00:16] SubStack: chapel: so npm doesn't need to build lots of symlink stubs anymore [00:16] samcday: It's a Stream implementation that sends Stream writes to a backing buffer. [00:16] chapel: ah [00:16] isaacs: yeah, SubStack got it right [00:16] SubStack: isaacs: deprecating the modules field in package.json [00:16] comster: cool, I'll take a look [00:16] isaacs: yep [00:16] chapel: sounds good [00:17] isaacs: shims need to die [00:17] chapel: was mostly curious [00:17] isaacs: there are still symlinks. their time is limited. [00:17] chapel: so with lets say the bin thing [00:17] Juan77_: howdy isaacs , I have updated yesterday to 0.3.0-8 and worked the installation of mysql-libmysqlclient... thanks! [00:17] isaacs: but shims were a bigger problem [00:17] chapel: is that going away? [00:17] isaacs: chapel: no [00:17] chapel: kk [00:18] isaacs: chapel: bin is used by a lot of things. it'd be better to just have "bin":"path/to/whatever" though [00:18] aurynn: Does ejs have a way to include other templates? [00:18] tjholowaychuk: aurynn: not on its own [00:18] tjholowaychuk: express provides the partial() function [00:18] tjholowaychuk: look at the ejs examples in the express repo [00:18] chapel: isaacs: and to force the creator to have a cli friendly filename [00:19] isaacs: chapel: or we could just say "you get one cli thing per package. it's name is the name of the package. [00:19] isaacs: that's pretty much the pattern anyway [00:19] chapel: yeah [00:19] aurynn: hmm [00:19] chapel: probably the best idea [00:19] isaacs: with the exception of "json-command" and a few others [00:19] isaacs: i dunno [00:19] chapel: shouldn't be making multiprogram packages [00:19] isaacs: honestly, there's not much reason to change what's there now. [00:19] chapel: and if they want to have that capability [00:20] tjholowaychuk: chapel: stylus has two [00:20] chapel: they can make it themselves, ie shell scripts that link, and what not [00:20] tjholowaychuk: stylus(1) and stylus-tutorial(1) [00:20] chapel: tjholowaychuk: thats cool [00:20] tjholowaychuk: if that is what you guys are talking about [00:20] tjholowaychuk: having multiple bins [00:20] isaacs: tjholowaychuk: yeah, kinda [00:20] isaacs: tjholowaychuk: i guess it's fine how it is. [00:20] chapel: isaacs: npm ERR! Requires: node@0.4 || 0.5 [00:20] isaacs: it's not as much of a cluster as modules was [00:20] chapel: I have 0.4.0 [00:20] isaacs: um... [00:20] chapel: that was for updating npm [00:20] isaacs: chapel: what version of npm do you have already? [00:20] chapel: well, 'installing' [00:21] Ond: Can't you use more than one template, tj? [00:21] chapel: 0.2.10 [00:21] tjholowaychuk: Ond: yeah [00:21] tjholowaychuk: of course [00:21] chapel: do I need to manually do it? [00:21] isaacs: chapel: ok. just do the curl | sh trick [00:21] zomgbie has joined the channel [00:21] chapel: kk [00:21] Ond: Uh, by template aurynn meant layout of course [00:21] isaacs: yeah, 0.2.10 is pretty old [00:21] Ond: Like, you'd go layout:path [00:21] chapel: Im behind the curve :( [00:21] isaacs: no worries :) [00:21] tjholowaychuk: Ond: yup that is correct [00:21] Ond: As a parameter to res.render [00:21] Ond: Mk [00:21] tjholowaychuk: usually you have one, but somtimes you might have one for print or admin or something [00:21] tjholowaychuk: so you can just pass that [00:21] aurynn: I'm still trying to figure out how layouts work :) [00:21] Ond: Yeah [00:22] chapel: nice, like how you ask for root [00:22] chapel: :) [00:22] Ond: I'm pretty sure it's in the documentation at expressjs.com [00:24] aurynn: like does the layout get access to locals? [00:24] tjholowaychuk: aurynn: yup [00:25] aurynn: mkay :) [00:25] SubStack: Juan77_: yep with respect to async and sync [00:25] tjholowaychuk: page view rendered with locals -> layout rendered with locals, "body" local injected as the page view html [00:25] gf3 has joined the channel [00:25] ajashton has left the channel [00:26] creationix has left the channel [00:27] sh1mmer has joined the channel [00:29] markwubben has joined the channel [00:31] daveluke has joined the channel [00:34] xandrews has joined the channel [00:36] daveluke_ has joined the channel [00:38] tim_smart has joined the channel [00:38] fatjonny has left the channel [00:40] phpnode has joined the channel [00:41] NuckingFuts has joined the channel [00:45] dguttman_ has joined the channel [00:47] jschzt has joined the channel [00:48] kenbolton has joined the channel [00:48] Throlkim has joined the channel [00:51] jschzt: good evening gentlemen [00:52] therrg has joined the channel [00:52] therrg has joined the channel [00:56] mscdex: that sounds like something Dr. Weird would say [00:57] joehewitt has joined the channel [00:58] softdrink has joined the channel [00:58] mies has joined the channel [00:59] micheil has joined the channel [01:00] Juan77_: I'm insistent, but I think that is there a way to call an async function and return it as an sync function.... [01:02] Juan77_: I hesitate to create a logic for sync when I have made all async... [01:02] NuckingFuts: Can somebody create a logic for Juan77_'s sentence structure? [01:03] warz has joined the channel [01:03] NuckingFuts: Because I honestly cannot make sense of anything they say. [01:03] samcday: I think I understand what he's asking [01:03] samcday: Maybe ... >_> [01:04] devinus: off topic, but im beginning to grow fond of writing my HTML like: anybody else feelin it? [01:04] Evet has joined the channel [01:04] samcday: Juan77_: You can do this: var allDone = false; myAsyncCall(function callback() { allDone = true; }); while(!allDone) { }. But I think it would be very bad. [01:05] devinus: NuckingFuts: he's just asking if there's a way to syncronously call an async function i think [01:05] samcday: devinus: Pretty sure that's against standards, html spec states you should enclose an attribute in single quotes... You're technically not even supposed to do this: [01:06] samcday: Unless they relaxed that in HTML5, I'm just remembering when I checked out HTML4 strict [01:06] mscdex: Juan77_: i don't think you're going to be able to do what you're wanting without using something like fibers [01:06] Juan77_: thx devinus and samcday! Thx "somebody" understood me! (for you NuckingFuts :P) [01:06] mscdex: otherwise you should consider rethinking your program design [01:07] mbrochh has joined the channel [01:07] samcday: I agree with mscdex. There is virtually NO reason to want to call something synchronously ... Unless you just want to avoid "callback soup", which can be mitigated with good code design [01:07] ryah: mikeal: you there? [01:07] ryah: mikeal: what's with this oak.js thing? [01:07] ryah: did you go last night? [01:08] atmos has joined the channel [01:08] devinus: samcday: nope. completely valid HTML5 [01:08] samcday: devinus: fascinating! I dig it then =D [01:09] SubStack: node party? [01:09] SubStack: wasn't that in the city last night? [01:09] mscdex: this channel is a 24/7 node party [01:09] SubStack: haha [01:10] devinus: samcday: i sort of view as lisp sexpr's and atoms...no need to quote all over the place [01:10] lukegalea has joined the channel [01:11] SubStack: everybody party! [01:11] SubStack: I'll bring the beers [01:11] SubStack: `beers [01:11] SubStack: `v beers SubStack [01:11] v8bot: SubStack: SubStack has 16 beers. [01:11] SubStack: that's the one [01:12] mscdex: as JimBastard would say: stop! node time! [01:14] amerine has joined the channel [01:15] Juan77_: hi mscdex and samcday, I understand, but suppose that I have a fetch method, in which have a callback as an optional argument, if I receive a callback argument I will return it async, but if not I will return sync..... I have the idea right now that for fetching results directly from database to the web using the async way, but when I do some logic, when creating many records or updating doing in sync mode.... i'm not sure that this will be bad, but i thi [01:15] Juan77_: that has a good balance.... [01:16] SubStack: just do it the async way in either case [01:16] samcday: Juan77_: still don't understand why you'd wanna do anything synchronously. If you're finding it tricky to manage many different callbacks in a readable way [01:16] SubStack: it will be simpler and easier to write [01:16] samcday: Then use the async library. [01:16] SubStack: Async. Feel the love. [01:16] samcday: Juan77_: https://github.com/caolan/async [01:17] devinus: lol html5 does require end tags for body or html [01:17] mscdex: Juan77_: i generally try to keep the automagic to a bare minimum [01:17] devinus: sweeeet.... [01:17] Yuffster_work has joined the channel [01:18] Juan77_: well if you truly insist I will look at it... I don't imagine doing all async...but I will try. thanks SubStack and samcday ....and mscdex ! :D [01:18] comster has joined the channel [01:18] SubStack: I glaze over whenever I try to read the async project's readme :/ [01:18] MikeMakesIt has joined the channel [01:18] samcday: Juan77_ Just a reminder that node.js isn't multithreaded. So if you do things synchronously, you're literally blocking the entire application. [01:19] SubStack: I'm sure people do the same thing for my projects! [01:19] samcday: So for example, if you have 6 clients connected simultaneously, and you're doing blocking requests for database results, you're going to have 6 pissed off clients waiting much longer than they should. [01:19] mscdex: samcday: well, the other 5 clients will be anyway [01:19] mscdex: :p [01:19] samcday: Well ,yeah [01:20] samcday: Semantics :p [01:20] Juan77_: samcday: good observation, thx for your advice. [01:20] samcday: SubStack: Yeah that library is a bit of a brainteaser sometimes :P [01:21] Juan77_: I think that this is a cause from my heritage from java. [01:21] mscdex: ACTION shakes a fist at Java [01:21] samcday: Lol [01:22] SvenDowideit has joined the channel [01:23] lukegalea has joined the channel [01:23] devdazed has joined the channel [01:24] Juan77_: je, I said farewell to my old friend Java [01:25] samcday: Meh, I still don't mind working on a decent Spring+Hibernate project. [01:25] samcday: If it wasn't written by a monkey, that is. [01:26] bingomanatee has left the channel [01:27] Juan77_: good for you, samcday, Spring is decent. [01:36] goku253 has joined the channel [01:37] goku253: hh [01:37] goku253: h [01:37] goku253: h [01:37] goku253 has left the channel [01:44] devdazed_ has joined the channel [01:46] tg: hai [01:46] springif` has joined the channel [01:46] tg: i have problems compiling node.js on linux, mksnapshot just hangs and uses all the cpu available [01:47] tg: anyone seen sth like this or know how to fix it? [01:48] constantx has joined the channel [01:49] constantx: is http.createClient() deprecated in node.js 0.4? [01:50] Nevtus has joined the channel [01:50] Nevtus has joined the channel [01:50] TooTallNate: constantx: yes [01:51] constantx: i'm trying to make a requst to twitter streaming api [01:51] constantx: but they give a 400 [01:51] constantx: var request = http.request({ [01:51] constantx: host: "stream.twitter.com", [01:51] constantx: port: 80, [01:51] constantx: method: "POST", [01:51] constantx: path: "/1/statuses/filter.json?track=" + keyword, [01:51] constantx: headers: headers [01:51] constantx: }, streamCallback); [01:53] constantx: see anthing strange? [01:54] aho has joined the channel [01:55] mmx has joined the channel [01:56] mscdex: constantx: a username and password? [01:56] mscdex: *missing [01:56] constantx: it's encoded in the headers [01:56] mscdex: ah ok [01:57] Juan77_: hi, now that I know that node isn't multithreaded.... means that all operations are atomics? [02:00] mikeal: constantx: what is streamCallback? [02:00] mikeal: and headers needs to have {host:'stream.twitter.com'} [02:00] mikeal: you should really just use request [02:00] mikeal: http://search.npmjs.org/#/request [02:01] constantx: headers have 'host' [02:01] constantx: and streamcall back is just function [02:01] gf3 has joined the channel [02:01] mikeal: are you calling end()? [02:01] mikeal: on request [02:02] heavysixer has joined the channel [02:02] constantx: yes [02:10] Juan77_: I'm feel async I can do coffee, drink and code at the same time, but I'm blocked, because I can't finish coding :P [02:11] Alex3000 has joined the channel [02:11] nonnikcam has joined the channel [02:13] samcday: lol [02:15] Ond has left the channel [02:15] Ond has joined the channel [02:17] morgabra has joined the channel [02:17] mbrochh has joined the channel [02:17] mbrochh has joined the channel [02:20] zzak: micheil: ping [02:28] dspree has joined the channel [02:30] SubStack: $ npm ls -s latest | perl -nle'm/.*=([\w-]+).*/ and print $1' | sort | uniq | wc -l [02:31] SubStack: 485 contributors! [02:31] zzak: :D [02:31] SubStack: ACTION gets back to work [02:32] zzak: i'm gonna start doing more doco contribs [02:32] SubStack: perhaps I'll hack up node-primality from the algorithms on http://www.itl.nist.gov/fipspubs/fip186.htm [02:32] k04n has joined the channel [02:33] SubStack: oh sweeeet appendix 5 has an example transaction :D [02:33] zzak: interesting [02:34] softdrink has joined the channel [02:35] daveluke has left the channel [02:42] Blackguard has joined the channel [02:43] softdrink has joined the channel [02:44] gf3 has joined the channel [02:45] x_or has joined the channel [02:45] k04n has joined the channel [02:45] Jourkey has joined the channel [02:45] k04n: what would be the most minimal and simple way with node.js to serve a folder of ejs files. i'd like to avoid complex frameworks if possible [02:46] Jourkey: how do i shut down a node server? [02:46] k04n: something like node-static, but run everything thru ejs [02:46] warz has joined the channel [02:48] caike has joined the channel [02:50] briznad has joined the channel [02:51] boaz has joined the channel [02:53] jtsnow has joined the channel [02:54] tmzt: what would you use for rss parsing? [02:54] bentruyman has joined the channel [02:55] [[zz]] has joined the channel [02:56] luke` has joined the channel [02:57] tilgovi has joined the channel [03:01] gatapia has joined the channel [03:03] gatapia: HI all looking round the wikis but I can't find how to upgrade my v0.3.8-pre to 4.0? I've tried git pull to update my source of node, ./configure, make, make install but make install fails with: 'Could not install the file '/usr/local/include/node/eio.h'', Am I even on the right track :) ? [03:05] dspree_ has joined the channel [03:05] dspree_ has joined the channel [03:07] dspree_ has joined the channel [03:07] dspree_ has joined the channel [03:09] dspree_ has joined the channel [03:09] dspree_ has joined the channel [03:16] sivy has joined the channel [03:16] gf3` has joined the channel [03:17] sudoer has joined the channel [03:17] Yuffster_work has joined the channel [03:18] tfe_ has joined the channel [03:18] tfe_ has joined the channel [03:22] tsyd: jenkins.js [03:22] jimt has joined the channel [03:22] msch has joined the channel [03:23] tsyd: wow... didn't realize that I was a couple weeks back in time [03:25] Roconda has joined the channel [03:27] pugzz has joined the channel [03:29] pengwynn has joined the channel [03:30] Roconda has joined the channel [03:31] mscdex: leeroyjenkins.js? [03:31] jimt has joined the channel [03:32] comster: lol [03:32] maru_cc_ has joined the channel [03:33] luke` has joined the channel [03:33] Solsys has joined the channel [03:33] jimmyz2 has joined the channel [03:36] halfhalo has joined the channel [03:36] halfhalo has joined the channel [03:39] jschzt has joined the channel [03:40] alek_br has joined the channel [03:40] pugzz has joined the channel [03:42] marcello3d has joined the channel [03:42] jschzt: I had a very serious node-amqp problem recently [03:43] jschzt: thought i could put nodes in star layout toward a single rabbitmq master [03:44] gf3 has joined the channel [03:45] clarkfischer has joined the channel [03:45] jschzt: once my first netsplit occurred, turns out I have to actually, motherfucking, log onto the machine, kill erlang's mnesia database, and restart the whole clustering process from scratch --- just because of split brain. [03:46] jschzt: https://github.com/rocketpack/node-amqp next week we fix tests [03:46] Vertice has joined the channel [03:48] jschzt: ryah, this one quite an important change https://github.com/rocketpack/node-amqp/commit/088b28896e00df9d18b860f409cc293b8ba430b2 [03:49] jschzt: at that point, you can no longer trust on / emit 'open' [03:49] robotarmy has joined the channel [03:50] robotarmy has joined the channel [03:50] langworthy has joined the channel [03:51] jschzt: ryah, now you're using the same connection, declaring various exchanges, over and over again, queues short-lived; don't let go before firing queueBindOk -- ever [03:53] sonnym has joined the channel [03:53] tabo` has joined the channel [03:54] gaYak_ has joined the channel [03:54] Chainfire_ has joined the channel [03:55] cyraxx_ has joined the channel [03:56] micxer82 has joined the channel [03:56] kkaefer: has anyone ever gotten "FATAL ERROR: HandleScope::HandleScope Entering the V8 API without proper locking in place"? [03:57] nail_ has joined the channel [03:57] slaskis_ has joined the channel [03:57] Ezku\_ has joined the channel [03:57] liquidpr1of has joined the channel [03:58] EyePulp has joined the channel [04:00] w0rse_ has joined the channel [04:00] iszak has joined the channel [04:00] iszak has joined the channel [04:00] derferman has joined the channel [04:00] jacobolus has joined the channel [04:00] Beretta_V has joined the channel [04:00] Epeli has joined the channel [04:00] abraham has joined the channel [04:00] yx has joined the channel [04:00] Chainfire_ has joined the channel [04:00] Ezku\_ has joined the channel [04:00] thermal has joined the channel [04:02] NuckingFuts has joined the channel [04:05] msch_ has joined the channel [04:10] adrian_berg has joined the channel [04:10] adrian_berg: is there some way i can write a module, import it into node-repl or some other helpful tool and send variables function? [04:10] adrian_berg: i can write a python program to look for greatest common factor, i would like to do the same for javascript [04:10] adrian_berg: i don't want to deal with the dom though [04:10] adrian_berg: variables to the function* [04:14] mynyml has joined the channel [04:15] samcday: adrian_berg: process.argv [04:15] samcday: http://nodejs.org/docs/v0.4.0/api/process.html#process.argv [04:15] samcday: Or do you want something interactive? [04:15] adrian_berg: i come from ipython [04:15] adrian_berg: so yes [04:15] samcday: Ah mmm [04:16] zorzar has joined the channel [04:16] samcday: Well I mean, Node has readline and repl stuff built in [04:16] samcday: But I'm not sure of a nice high level wrapper for it [04:16] evl has joined the channel [04:16] samcday: higher* [04:16] alek_br has joined the channel [04:17] mike5w3c_ has joined the channel [04:19] atmos has joined the channel [04:23] themiddleman has joined the channel [04:27] rcol has joined the channel [04:27] jetheredge has joined the channel [04:31] Roelven has joined the channel [04:33] ajpiano_ has joined the channel [04:33] noahcampbell has joined the channel [04:34] maru_cc_ has joined the channel [04:35] aheckmann has joined the channel [04:36] marcello3d has joined the channel [04:39] deoxxa has joined the channel [04:39] thermal has joined the channel [04:41] kkaefer: apparently I can't use v8::Locker because node never tries to get the lock back [04:46] Coall has joined the channel [04:46] galaxywatcher has joined the channel [04:47] yx has joined the channel [04:47] thermal has joined the channel [04:48] beta_ has joined the channel [04:48] arnorhs has joined the channel [04:48] Dreamer3 has joined the channel [04:50] Vertice has joined the channel [04:52] tbranyen: god damnit i was implementing from scratch what nodejs already has built in [04:52] tbranyen: fml [04:52] tbranyen: fs.createReadStream wootles [04:55] isaacs has joined the channel [04:56] mscdex: :D [04:56] sechrist has joined the channel [04:58] thermal has joined the channel [04:58] tbranyen: omg i love nodejs so much right now [04:59] kkaefer: mscdex: do you have any experience with Lockers in v8? [04:59] tbranyen: i just want to yell that off the top of a mountain, but i didn't have a mountain... i had an irc chat room [04:59] razvandimescu has joined the channel [04:59] mscdex: kkaefer: no idea what they are [05:01] marcello3d: it's where you put your textbooks, magnetic mirrors, and posters of some teen singer [05:04] kkaefer: other question: [05:04] kkaefer: is there a way to bring data from the threadpool into the v8/node without too much copying? [05:05] arnorhs_ has joined the channel [05:05] skm: i have a problem with sockets merging two messages received in their data callback (probably when two messages sent too quickly one after the other).. how would i get around this? [05:06] Benvie has joined the channel [05:07] thefeds has joined the channel [05:07] NuckingFuts has joined the channel [05:12] arnorhs_ has joined the channel [05:12] ratsbane has joined the channel [05:18] jakehow has joined the channel [05:19] NuckingFuts: isaacs: Is there some way to force NPM to build, ignoring the node --version? [05:20] ryanfitz has joined the channel [05:20] AAA_awright: What characters does Node.js base64 use? 0-9a-zA-Z of course [05:22] marcello3d: + / [05:22] sivy has joined the channel [05:22] marcello3d: for encoding, not sure about decoding [05:22] dgathright has joined the channel [05:23] marcello3d: https://secure.wikimedia.org/wikipedia/en/wiki/Base64 [05:23] marcello3d: I'm out [05:23] AAA_awright: The URL safe ones? [05:24] AAA_awright: Wait that's not URL safe because of the / hmm [05:27] NuckingFuts: isaacs: poke? [05:27] dannycoates has joined the channel [05:28] tmpvar has joined the channel [05:28] brianmario has joined the channel [05:29] Ond has joined the channel [05:29] muk_mb: yay, I wrote crappy chat! lol [05:30] Ond: Link? [05:30] AAA_awright: Ah yeah, / and + [05:30] muk_mb: http://goodwinlabs.no.de [05:31] muk_mb: if you put "mukman" as the target, you can talk to me [05:31] muk_mb: lol [05:31] isaacs: NuckingFuts: --node-version [05:31] isaacs: NuckingFuts: that fakes the node version [05:31] isaacs: NuckingFuts: or --node-version null to disable it (i think) [05:45] mattly has joined the channel [05:48] mattly has joined the channel [05:50] sholmes has joined the channel [05:50] sholmes: FINALLY! [05:54] sechrist has joined the channel [05:56] dominictarr has joined the channel [05:56] sholmes has joined the channel [05:57] sholmes: Finally I figured out what was the problem with my script, after days! [05:57] tmpvar: lol [05:57] sholmes: What I learned is that ejs doesn't really help with identifying a problem in a template file. [05:57] tmpvar: you know this room is here full of people willing to help you, right? [05:57] sholmes: tmpvar, yeah I know. [05:58] sholmes: tmpvar, yes. Don't think I didn't come here with my problem multiple times. ;) [05:59] sholmes: Is tjholowaychuk around? [05:59] zz has joined the channel [06:00] sholmes: I suppose not. [06:00] NuckingFuts: lol [06:01] sholmes: Grr. It's his fault really [06:01] tmpvar: lol [06:02] sholmes: where's the bastard?! [06:02] jimmyz2 has joined the channel [06:03] amerine has joined the channel [06:03] sholmes: lol [06:04] tmpvar: busy editing video [06:04] tmpvar: oh, you mean tjholowaychuk [06:04] sholmes: Well, tell him, if you could, that I wanna chat. [06:04] tmpvar: i thought you meant JimBastard [06:04] sholmes: tmpvar, yeah [06:04] sivy has joined the channel [06:04] tmpvar: lol [06:04] sholmes: no no, not Jim... [06:04] sholmes: I can see how you're confused. >.< [06:05] xandrews has joined the channel [06:05] sholmes: This is a sexy abs }.{ [06:06] NuckingFuts: Finally the wiki article on building Node 0.4.0 on Cygwin has a solution for me! [06:06] NuckingFuts: YAY! [06:07] tmpvar: dude, you are fucking nuts [06:07] sholmes: Yeah, so I was getting a ReferenceError, and it wasn't showing me the correct file where this reference error took place. [06:07] sholmes: no, he's nucking futs [06:07] NuckingFuts: Awesome, it seems to have gotten much farther than last time. [06:07] dnolen has joined the channel [06:07] sholmes: NuckingFuts, which article? [06:08] tmpvar: install a real operating system [06:08] NuckingFuts: So once I get that built, I just grab NPM and "npm install sqlite" [06:08] tmpvar: install the fake operating system in a vm, and only boot it when you need it [06:08] NuckingFuts: tmpvar: Meh, I like Windows 7. [06:08] NuckingFuts: And I have a hatred of Linux. [06:08] NuckingFuts: I intend to continue using Windows. [06:09] sholmes: About my error: ejs wasn't reporting the problem correctly. It would have been nice if ejs would be able to say, "This is the error, and this is were it's at." But maybe Node was throwing the error. Even then, ejs should catch it. [06:09] Aria: ... And yet you'll touch cygwin. [06:09] gf3` has joined the channel [06:09] tmpvar: Aria, i second that [06:09] tmpvar: and hi [06:09] NuckingFuts: Aria: I'm willing to use POSIX environments. [06:09] NuckingFuts: But I will not use them normally [06:09] NuckingFuts: I will use them if I must. [06:09] void_ has joined the channel [06:09] Aria: What's POSIX got to do with cygwin ;-) [06:09] NuckingFuts: Aria: lol [06:09] sholmes: I'd perfer a mac, but I'm stuck with cygwin. [06:09] w0rse has joined the channel [06:09] NuckingFuts: sholmes: I'd love to get a mac yeah [06:10] muk_mb: whooo, offline messaging complete [06:10] sholmes: MB Air ish awesome! [06:11] Aria: Seconded. And remarkably fast for having a slow, low-voltage CPU. [06:11] Aria: More than made up for by the flash. [06:12] SubStack: if I had a mac I would just try to put a tiling window manager on it anyhow [06:12] tmpvar: next project: a wayland client nodejs addon [06:12] tmpvar: possible through node-canvas [06:12] Aria: Ooh. [06:12] NuckingFuts: Ah, good ol' huge-ass step 51/74 [06:12] tmpvar: possibly even [06:12] NuckingFuts: All 500 lines of it lol [06:14] NuckingFuts: I think step 51/74 needs its own progress bar XD [06:16] samcday: Question: anyone know how expensive a buffer.slice() call is? [06:17] samcday: Since it just creates a view of the same block of memory, I figure it's pretty cheap to call, even many many times per second? [06:17] tmpvar: sounds cheap ;) [06:17] tmzt: SubStack: not sure if you answered, but browserling uses progressive jpegs delivered to the browser? [06:17] NuckingFuts: Cheap like an ugly hooker. [06:18] samcday: NuckingFuts: By that I assume you mean it's inelegant? :P [06:18] samcday: Or are you just a fan of ugly hookers? [06:18] tmzt: tmpvar: I want to see node-libxcb, the bindings would be so perfect [06:20] sholmes: How does Express know whether to fetch a static file or a route if a route matches the static file's route? [06:21] tmzt: use the static middle ware [06:21] sholmes: I'm talking about using the staticProvider middleware. [06:21] tmzt: it should fallback if nothing else matches [06:21] sholmes: fall back to what? [06:21] sholmes: the static file? [06:21] samcday: sholmes, when the static file middleware kicks in, it does a stat() on the file to see if it exists. [06:22] samcday: If it doesn't, it calls the next middleware (in other words, it gives up and let's another middleware take a crack at resolving the request) [06:22] SubStack: tmzt: pngs right now [06:22] SubStack: v8: new Buffer('moo') [06:22] v8bot: SubStack: ReferenceError: Buffer is not defined [06:22] SubStack: lame [06:22] sholmes: Let's say I have the static file stored in a public directory: /public/foobar, and I have the route $.get('/foobar'). Wouldn't they conflict with eachother? [06:23] samcday: Depends. [06:23] tmpvar: tmzt, NO, no x [06:23] sholmes: Depends on what? [06:23] samcday: If you have router middleware use()'d before static file middlware, then the static file would NEVER be served [06:23] SubStack: > var buf = new Buffer('mooooooooooo'); var t0 = Date.now(); for (var i = 0; i < 100000; i++) buf.slice(i % buf.length); Date.now() - t0 [06:23] SubStack: 252 [06:23] samcday: But, if the static middleware is defined beforehand, what it will do is see if the physical file matching the request exists. [06:23] SubStack: pretty fast [06:23] samcday: If it doesn't, then it falls back to router [06:24] samcday: That is pretty fast SubStack. Thanks :) [06:24] sholmes: samcday: so if app.get comes before the staticProvider, then it will take precedence? [06:24] micheil has joined the channel [06:24] SubStack: for comparison if I just do the i % buf.length and leave off the buf.slice, it's 5 ms [06:24] samcday: Still, that's 100k slices in a quarter of a second, that's plenty for me [06:25] samcday: sholmes: Yup. [06:25] Aria: God, I hate scons. Yeesh. [06:25] SubStack: Aria: you too? [06:25] Aria: Oh ys. [06:25] SubStack: I also hate cmake. So much. [06:25] Aria: Me too. [06:25] sholmes: samcday: it would seem as though this could cause some problems. [06:25] SubStack: why do all of them suck so much? [06:25] Aria: Also, autotools. I think autotools is perhaps the easiest for me to make dance, but I still hate it. [06:26] Aria: Because building software is Hard [06:26] SubStack: plausible [06:26] samcday: sholmes: How do you figure? [06:26] Aria: Also, I can tell you from long experience working on a linux distro, authors are shortsighted and morons. [06:26] Aria: And have NO CLUE how their software is used. [06:26] sholmes: Maybe not though, as long as I'm conciously aware of the filenames I choose. [06:26] SubStack: packaging up software nicely takes some doing [06:26] NuckingFuts: Anybody know a v0.4.0-compatible SQLite module? [06:27] samcday: Well shomles, IMO your static files should have extensions anyway... [06:27] samcday: No benefits (security or otherwise) to hide an extension for an image/js/css/other static file [06:27] sholmes: homless... [06:28] amccollum has joined the channel [06:28] sholmes: haha [06:28] samcday: ;P [06:29] sholmes: I see. So Node has this awesome moduling system, which really makes code easy to handle across files. But how would I make it easy to serve my client js files? [06:29] Aria: NuckingFuts: npm install sqlite [06:30] Aria: sholmes: Just serve them. [06:30] SubStack: yo sholmes, http://github.com/substack/node-browserify [06:30] samcday: Yeah I'm confused by that question: staticProvider does just that? [06:30] SubStack: bundle it! [06:30] NuckingFuts: Aria: I tried that, fails due to invalid JSON. I tried hand-isntalling, still fails :V [06:30] SubStack: sholmes: and you can do require() client-side with this thing [06:31] samcday: Woah SubStack, that looks sick =) [06:31] Aria: NuckingFuts: Works for me. What invalid JSON? [06:31] SubStack: not all npm modules work, but some do [06:31] NuckingFuts: npm ERR! couldn't read package.json in /tmp/npm-1298097061576/1298097061576-0.13 [06:31] NuckingFuts: 379328837618232/contents/package [06:31] NuckingFuts: npm ERR! Error installing sqlite@1.0.2 [06:31] NuckingFuts: npm ERR! Error: Failed to parse json [06:31] NuckingFuts: npm ERR! Unexpected token ILLEGAL [06:31] NuckingFuts: That [06:31] SubStack: I need to wrap some of the sub-libs [06:31] sholmes: smcday: I mean how can I make it easier than just dosent work [21:58] dve: fille: you just want to parse the content? [21:59] dve: if you want to use jquery look at k has quit (Remote host closed the connection) [21:59] dve: fill [21:59] dve: http://groups.google.com/group/nodejs/browse_thread/thread/e02619ec7d208d28 [22:02] fille: thanks [22:02] fille: i whant to use jquery as client side [22:03] ajcates has joined the channel [22:04] fille: wow thats cool [22:05] ph^ has joined the channel [22:06] gf3 has joined the channel [22:08] jimt: I've been using npm 0.2.12-1 on OS X 10.6.6. I tried doing: 'npm cache clean; npm install npm' to get npm 0.3.2 but it complains: npm info rebuilding bundled dependencies npm@0.3.2 [22:08] jimt: npm ERR! install failed Error: ENOENT, No such file or directory [22:08] jimt: How do I know which file/directory it is missing? [22:09] Evet has joined the channel [22:09] Evet has joined the channel [22:09] hecticjeff has joined the channel [22:13] jimt: I ignored it and reinstalled npm from install.sh rather than using npm to install a newer npm [22:14] dve: Anyone know if its possible to do a https post in node 0.4.0 [22:14] dve: ? [22:15] seivan: What is a node_modules folder? [22:15] seivan: ah [22:15] seivan: nvm [22:15] seivan: it's a folder you name to keep your modules there [22:16] ryanfitz has joined the channel [22:16] tim_smart has joined the channel [22:22] mattly has joined the channel [22:29] TLV has joined the channel [22:32] ziro`: anyone got any cool ideas for web apps to make? [22:32] ziro`: anyone need a hand with anything? [22:32] hobs: well [22:32] devrim has joined the channel [22:32] hobs: have you used proto buffers with node [22:32] gravyrobber has joined the channel [22:32] gravyrobber: hi all [22:32] meatmanek: proto buffers with node... [22:33] hobs: http://code.google.com/p/protobuf-for-node/ [22:33] meatmanek: unless you need to work with some existing program that already uses proto buffers, I don't see the point [22:33] hobs: well I am writing a server to receive arbitrary tcp packets and I thought it be a good way to structure it [22:33] TLV: Is there a guide/tutorial for using the new HTTP client API? [22:33] hobs: what do you think would be smarter [22:33] meatmanek: JSON [22:33] hobs: considering it is sending me arbitrary tcp packets [22:34] hobs: I have to read them in [22:34] hobs: and understand it [22:34] hobs: so json doesnt really fit in this situation as I understand it [22:34] sivy has joined the channel [22:34] meatmanek: yeah if you can't control the input, go with whatever the input is [22:34] meatmanek: but if you can control both ends of the pipe, use whatever's native -- in node.js's case, JSON [22:34] hobs: yeah that would be ideal [22:40] gravyrobber: does it make sense to use socket.io for upload progress polling, when using node.js as a file upload server? [22:41] Ond has joined the channel [22:42] chapel has joined the channel [22:46] maushu: gravyrobber, it should be compatible with older browsers. [22:46] maushu: So yes, it probably does make sense. [22:47] seivan: hmm [22:47] seivan: I added $HOME/.applications/homebrew/lib/node to NODE_PATH [22:47] dve: Anyone know how to do a HTTPS POST in node 0.4.0? [22:47] seivan: NODE_PATH="$HOME/.applications/homebrew/lib/node:$NODE_PATH" [22:47] gravyrobber: maushu, my reason for looking into socket.io is I need a progress bar on file uploads [22:47] seivan: But when trying to load the redis module I get cannot find module redis [22:48] gravyrobber: but i'm having a problem communicating between node.js and socket.io [22:48] seivan: NODE_PATH="$HOME/.applications/homebrew/lib/node:$NODE_PATH" [22:48] seivan: That's what I got [22:49] TobiasFar has joined the channel [22:49] gravyrobber: for instance, when and upload starts, I'd like to know which socket.io client it correlates too, and be able to set a file upload ID in relation to each client [22:50] gravyrobber: since my file uploads are handled by the node server, i can't seem to access any socket.io client information... [22:50] zylo has joined the channel [22:50] gravyrobber: is that socket.io information accessible to node server requests? [22:52] isaacs has joined the channel [22:58] TomY has joined the channel [22:58] Juan77 has joined the channel [22:59] amccollum has joined the channel [22:59] TLV: How would I issue a get request with data in the body using the new HTTP client API? [23:02] ziro`: i want to build a shit hot web app but i have no ideas nor have i seen an area in which i can do better than the established competitors [23:05] meatmanek: find a type of webapp that you think more people would want to use if they knew it existed, or knew what it was [23:05] meatmanek: make a decent imitation [23:05] meatmanek: and market the hell out of it [23:05] mkuklis has joined the channel [23:06] void_ has joined the channel [23:09] mkuklis: hi guys I'm just starting with Node and I have a quick question. I would like to find the implementation for EventEmitter could you point me to the right place? I found the place where EventEmitter is extended: https://github.com/ry/node/blob/master/lib/events.js but would like to look into actual implementation [23:11] NuckingFuts: mkuklis: That is where EventEmitter is, I think. [23:12] mkuklis: NuckingFuts thanks how about? var EventEmitter = exports.EventEmitter = process.EventEmitter; [23:12] mkuklis: process.EventEmitter ? [23:12] NuckingFuts: mkuklis: eh? What do you mean? [23:13] mkuklis: I'm wondering where the actual constructor is defined for EventEmitter [23:14] wadey: mkuklis: it is in cpp: https://github.com/ry/node/blob/master/src/node_events.cc [23:14] NuckingFuts: wadey: There's also one in JS, I think [23:14] ryah: ACTION waves [23:14] AAA_awright: Anyone know of some way to convert a number to base64? [23:14] wao: ACTION waves at ocean waves [23:15] ryah: Buffer([123]).toString('base64') [23:15] mkuklis: wadey thank you! I think that's what I was looking for! [23:15] dthompson has joined the channel [23:15] mkuklis: NuckingFuts is there any other place in JS [23:15] mkuklis: ? [23:16] NuckingFuts: I need a good, secure pseudorandom. [23:16] NuckingFuts: I'd LOVE the mersenne twiste, but I can't find a working module for that :/ [23:16] NuckingFuts: mkuklis: That's it, that file has most of the functions in it [23:16] NuckingFuts: with emite [23:16] NuckingFuts: and such [23:16] AAA_awright: ryah: Something to do with buffer I was thinking but of course that truncates it to the last two bytes [23:17] AAA_awright: I'll loop through I guess [23:17] isaacs: ryah: that node_module priority issue is really kind of a pain. any chance we could get it in 0.4, or does it violate the "stable" contract? [23:17] mkuklis: thank you guys [23:17] wadey: mkuklis: here is where it gets bound to process.EventEmitter: https://github.com/ry/node/blob/master/src/node.cc#L2028 [23:17] wadey: if you are curious [23:17] isaacs: ryah: the alternative is that npm has to either default on its promises, or go back to shims. [23:17] mkuklis: wadey awesome thanks! [23:17] wadey: mkuklis: and then the JS code extends it [23:17] ryah: default on its proise? [23:18] mikeal has joined the channel [23:19] AAA_awright: er no, single byte [23:19] isaacs: ryah: foo -> bar1.0. npm install foo; npm install bar2.0; (in foo) require("bar") // get bar2.0 [23:20] isaacs: ryah: because the NODE_PATH has a "bar" module, and that comes before the node_modules folders where npm is putting dependencies. [23:20] isaacs: ACTION feeling a bit foolish for not noticing this earlier [23:22] ryah: isaacs: hm, seems like many people won't hit that? [23:23] isaacs: ryah: not many. it's not baby-seal-clubbing-terrible, no. but i found out about it because someone did in fact hit that. [23:23] mmso has joined the channel [23:23] isaacs: ryah: on the flip side, changing to the correct behavior is extremely low risk, because it is even less likely that anyone was relying on that. [23:25] ryah: ture [23:25] ryah: okay, i'll put it in v0.4 [23:25] perezd has joined the channel [23:25] isaacs: sweet [23:25] pquerna: baby seals :( [23:25] isaacs: i think the docs might be actually specifying the correct behavior anyway, but lemme make sure. [23:26] CIA-39: node: 03Brian White 07v0.4 * r1efac74 10/ (src/platform_cygwin.cc src/platform_linux.cc): Fix os.cpus() on cygwin - http://bit.ly/g25O8f [23:26] pquerna: python sucks, cassandra sucks, it all sucks [23:27] isaacs: ryah: yeah, in the current api docs, `require.paths` is very dramatically a second-class citizen. [23:27] isaacs: ryah: and, the "Package Manager Tips" addendum kind of relies on node_modules being higher priority [23:27] ryah: isaacs: is it clear in the docs that node_modules comes first? doesn't seem explicitly mentioned to me [23:28] bingomanatee: ACTION looks forward to being able to apt-get install node [23:28] isaacs: ryah: it's not clear in the docs that NODE_PATH is even respected. [23:28] isaacs: ryah: :) [23:28] isaacs: ryah: i'll add a line to specify the priority [23:28] ryah: isaacs: okay, good [23:31] marcello3d: NuckingFuts: http://www.enchantedage.com/node-mersenne [23:31] marcello3d: and https://github.com/akdubya/rbytes [23:31] spaceinvader: mersenne twister <3 [23:33] isaacs: ryah: https://github.com/isaacs/node/commit/5704f63dcb51a8ce26cc97f37abd8bbe029b9e0b [23:33] AAA_awright: Argh, Date is a long but Javascript byte operators are 32-bit grr [23:33] AAA_awright: I completely forgot that [23:34] marcello3d: Date is a double, isn't it? [23:34] AAA_awright: s/long/double/ [23:34] AAA_awright: 64-bit floating point [23:35] AAA_awright: marcello3d: Yeah you're right [23:35] marcello3d: well [23:35] marcello3d: all numbers in JS are double [23:35] marcello3d: fwiw [23:37] daveyjoe_ has joined the channel [23:37] ryah: isaacs: fail on test-cli-eval [23:38] isaacs: weird... just as ec [23:38] MikhX has joined the channel [23:38] jacobolus has joined the channel [23:38] AAA_awright: marcello3d: Except when you use the bit operators [23:38] tim_smart: ryah: Was base64 being depreciated in node? [23:39] AAA_awright: A bit of wtfjs right there [23:40] ryah: tim_smart: no [23:40] sveimac has joined the channel [23:43] ajnasz has joined the channel [23:43] isaacs: ah, found it. --eval is so weird.. [23:43] Alex3000 has joined the channel [23:44] abraham has joined the channel [23:45] pr2012 has joined the channel [23:45] kersny has joined the channel [23:47] bmavity has joined the channel [23:48] gf3` has joined the channel [23:49] tc77 has joined the channel [23:50] eck has joined the channel [23:50] eck has joined the channel [23:50] eck has left the channel [23:51] MikhX has joined the channel [23:51] eee_c has joined the channel [23:51] marcello3d: AAA_awright: not that wtf. bit operators don't mean much with double values ;) [23:53] AAA_awright: marcello3d: I mean, in C you would expect to see the IEEE floating point representation, but Javascript doesn't give you that, it converts it into an int64_t (iirc) [23:53] AAA_awright: er, 332 [23:53] ryah: http bugs :/ [23:53] AAA_awright: I'm pretty sure the spec specifies a specific size, 32 [23:54] russell_h: ryah: did you get the patches I emailed you on monday-ish? [23:54] russell_h: ACTION probably should have sent those to the list [23:54] russell_h: in any case there's something wrong with one of them [23:55] zylo has joined the channel [23:55] fcosta has joined the channel [23:55] ryah: russell_h: hm - what were they about? [23:55] russell_h: ryah: http drain events [23:56] ryah: oh right.. [23:56] ryah: i think i merged? [23:56] ryah: yeah e6ede31554d2f23d1efe596bd02e8304ff0dc171 [23:57] russell_h: thats a different one [23:57] russell_h: let me just re-make them then send them to the list, I found a bug in one anyway [23:58] NuckingFuts: isaacs: NPM keeps failing with odd errors when I'm trying to install the module 'rbytes' - https://gist.github.com/835526 [23:58] NuckingFuts: Different error each time :V [23:58] NuckingFuts: Though the first one seems most common [23:58] isaacs: NuckingFuts: weird. [23:58] isaacs: npm ERR! Error: ESRCH, No such process [23:58] isaacs: never seen that before. [23:58] isaacs: EAGAIN is not unheard of [23:59] NuckingFuts: isaacs: I get it pretty often, ESRCH [23:59] isaacs: NuckingFuts: which os? you're on cygwin, right? [23:59] NuckingFuts: Yeah [23:59] NuckingFuts: It seems to do that when I retry too quickly :/