[00:04] ncb000gt: hkeric: nah, they are working hard to get it working well on windows (with some help). [00:04] ncb000gt: it just hadn't been the top priority [00:13] newy_ has joined the channel [00:15] Swimming_bird has joined the channel [00:18] joshfng has joined the channel [00:21] Me1000 has joined the channel [00:21] maushu_: hkeric, do you have any idea how hard is to port stuff? [00:22] maushu_: Node isn't anti-windows, it's pro-procrastination. [00:22] maushu_: In a good way. [00:23] mhooker has joined the channel [00:23] blkcat: developing on windows is a nightmare, it's really no great loss [00:23] themiddleman_itv has joined the channel [00:24] ncb000gt: blkcat: there are people who enjoy it and even prefer it. if node can work well across the board then that's a better approach. [00:24] bingomanatee: wouldn't that be pro-crastination? [00:24] ncb000gt: plus, ultimately it's competing with the other platforms that do [00:24] ncb000gt: lol [00:25] blkcat: ncb000gt: fair enough, but i really have a hard time seeing how anyone could prefer windows for this sort of work [00:25] blkcat: but meh :) [00:25] ncb000gt: blkcat: i completely agree, i can't stand windows [00:25] ncb000gt: BUT, i know that it's not a good idea to dismiss it [00:25] bingomanatee: I think the conceptual block that node has is that JS developers have had GOOD reasons to use windows because its the depoyment platform of code for CLIENT SIDE code. [00:26] bingomanatee: Now we are putting JS on the server and SERVER CENTRIC development is not a pattern that JS people are used to. [00:26] bingomanatee: Not - by the way - that I kare about their widdle feelings, but I can see where the upset orginates. [00:26] copenhas has joined the channel [00:29] ncb000gt: :) [00:29] wereHamster: npm ERR! adduser Error: forbidden name must be lowercase - really? Do we still live in the 19th century? [00:29] skm has joined the channel [00:30] nuba: you could ship a turnkey vm to make it easier for those in windows to play with node.js [00:30] ncb000gt: nuba: nou! [00:31] nuba: and deciding to support deployments in *nix only - or just linux - is fine [00:31] nuba: can't be all things for all people [00:32] no-gooder has joined the channel [00:33] nuba: this being opensource, there's nothing keeping anyone with a strong case and motivation to get a task force up to mantain a windows port [00:33] nuba: I'd rather have the core node.js kicking ass on node.js than dealing with OS idiosyncrasies [00:34] nuba: oops, i meant "core node.js developers kicking ass on node.js" [00:34] no-gooder has left the channel [00:35] nuba: hence the VM suggestion. [00:36] Nexxy has joined the channel [00:36] gkatsev: anyone have a good tutorial about creating modules? [00:37] ncb000gt: nuba: sure, i was just being an ass [00:37] ncb000gt: :) [00:37] nuba: just my $0.02 :) and btw now that I already left my "lurk mode" and opened my mouth, thanks guys for node.js!!! :D [00:37] ncb000gt: heh [00:37] ncb000gt: gkatsev: what kind of module? [00:38] ncb000gt: a c/c++ module or a js module? [00:38] gkatsev: js [00:38] nuba: ACTION back to lurk mode :/  [00:38] ncb000gt: gkatsev: are you unsure of how do go about the whole thing or just the deployment side? [00:39] sokrates has joined the channel [00:40] gkatsev: how to go about it. What's with the module and exports things. I am trying to do exports.Foo = function but then when I require it, it is an object that contains Foo [00:40] ohtogo has joined the channel [00:40] ncb000gt: gkatsev: sure, that is because the module is loaded as an object, own scoping and such [00:41] ncb000gt: if you would rather have a function returned so that you can do var foo = require('./foo')() [00:41] ncb000gt: then you'd want to do module.exports = function() {} [00:42] ncb000gt: gkatsev: this doesn't cover how you'd go about it but it does a nice job covering deployment [00:42] ncb000gt: http://howtonode.org/how-to-module [00:42] ncb000gt: by isaac (the creator of npm) [00:42] gkatsev: ncb000gt: yeah, I saw that. Thanks. [00:42] ncb000gt: cool [00:42] gkatsev: I've been using node, just haven't really wrote a module before. [00:43] ncb000gt: gkatsev: sure [00:43] ncb000gt: let me see if i have a simple example you can take from [00:43] gkatsev: http://nodeguide.com/beginner.html#the-module-system might be enough for me. [00:43] norviller has joined the channel [00:43] ncb000gt: gkatsev: this might be the simplest example I have (at least a repo for) https://github.com/ncb000gt/node-cron/blob/master/lib/cron.js [00:44] ncb000gt: if you look at that link and pop to the bottom you'll see the exports in the same way you described above [00:44] skm has joined the channel [00:44] ncb000gt: but then if you look at https://github.com/ncb000gt/node.bcrypt.js/blob/master/bcrypt.js [00:44] ncb000gt: you'll see it's different [00:44] ncb000gt: in that i'm specifying the object that is loaded for use [00:44] Emmanuel__ has joined the channel [00:45] ncb000gt: so when you require('bcrypt') you have an object returned through my function call [00:45] ncb000gt: gkatsev: yea, that link should be good [00:46] gkatsev: what other things does the module/exports object give? [00:46] gkatsev: I guess exports is purely for exporting things [00:46] ncb000gt: gkatsev: just what you specify [00:46] ncb000gt: aye [00:46] gkatsev: does module give anything extra? [00:46] ncb000gt: gkatsev: so you can write a bunch of code that isn't exported [00:46] astropirate has joined the channel [00:46] ncb000gt: i don't believe so...i haven't looked into it actually [00:46] ncb000gt: :) [00:47] gkatsev: ok :) [00:47] galaxywatcher has joined the channel [00:48] ncb000gt: gkatsev: the module loader is here -> https://github.com/joyent/node/blob/master/lib/module.js [00:48] ncb000gt: but i don't believe it's giving much [00:48] bingomanatee: what exports gives you, by implication, is a lot of space outside the delcaration for private scoped structures, exposed throught the rules of closure. [00:49] gkatsev: makes sense. [00:49] gkatsev: does module give me anything other than a way to override exports completely? [00:49] kriszyp has joined the channel [00:49] ncb000gt: bingomanatee: yea but it's not providing extra helper functions or anything other then letting you have private scoping correct? [00:50] bingomanatee: It is essentially a namespace - neither module nor exports is an object instance - its simply a place. [00:50] ncb000gt: gkatsev: actually it does give you more [00:50] bingomanatee: AFAIK. [00:51] bingomanatee: I have certainly never USED either of those for anything more than placeholdering. [00:51] ncb000gt: https://gist.github.com/911941 [00:52] ncb000gt: if you open the node repl [00:52] ncb000gt: and type module [00:52] ncb000gt: it'll spit that out [00:52] ncb000gt: exports has some repl based stuff in it [00:53] ncb000gt: it's mostly just for information [00:53] gkatsev: someone should write an article elaborating on module and exports [00:53] ncb000gt: no real added functionality [00:54] ncb000gt: heh, maybe once I get streaming working with luwak in riak-js [00:55] gkatsev: sweet, got it working. [00:55] ncb000gt: gkatsev: awesome :) [00:55] gkatsev: module.exports is what I was looking for. [00:56] ncb000gt: i figured :) [00:56] ncb000gt: something to note is that when you require a module it will load it and cache that [00:56] ncb000gt: so you'll need to take care of object creation [00:56] gkatsev: I am writing a Set object/module. Partly for fun/learning and partly because I noticed that there is no object implementation of it. [00:56] n2liquid has joined the channel [00:56] gkatsev: yeah, it's an object. [00:57] gkatsev: or, well, function that can be `new'ed [00:57] Nexxy has joined the channel [00:57] Nexxy has joined the channel [00:57] ncb000gt: if you have many places that should have different objects, you'll likely want to create a factory/function pointer [00:57] tmzt: well, it looks like I'm going to have *writable* jsonPaths very soon [00:57] ncb000gt: gkatsev: yea [00:57] ncb000gt: github just released a new issue tracker [00:57] ncb000gt: woot [00:57] ncb000gt: :) [00:57] ncb000gt: <3 [00:58] tobym has joined the channel [00:58] gkatsev: ncb000gt: here is my initial code: https://bitbucket.org/gkatsev/sets.js/src/b4a6c620094e/sets.js fwiw. [00:58] [[zz]] has joined the channel [00:59] ncb000gt: is it private? [00:59] gkatsev: should be public [00:59] ncb000gt: because bb is telling me to login [00:59] ncb000gt: those bastards [00:59] gkatsev: nope, it was set to private [00:59] gkatsev: weird [00:59] gkatsev: try now [00:59] matschaffer has joined the channel [00:59] ncb000gt: gkatsev: perfect [00:59] ncb000gt: that should be fine [01:00] n2liquid: huh, hi guys [01:00] gkatsev: I wonder why it auto set everything to private. Maybe a new thing [01:00] ncb000gt: n2liquid: hey [01:00] ncb000gt: gkatsev: possibly, github ftw [01:00] ncb000gt: <.< [01:00] n2liquid: didn't expect this channel to be *that* active [01:00] n2liquid: is everyday like this here? [01:01] ncb000gt: n2liquid: i can shutup... [01:01] ncb000gt: maybe... [01:01] n2liquid: hahaha [01:01] ncb000gt: i lied [01:01] n2liquid: seriously, this is nice [01:01] zkirill has joined the channel [01:01] ncb000gt: and, yea, different times of the day it gets quiet [01:01] ncb000gt: but there are usually people lurking around here [01:01] ncb000gt: :) [01:01] n2liquid: uh huh, I see [01:01] n2liquid: good [01:01] n2liquid: does ryan appear a lot? [01:01] gkatsev: ncb000gt: heh. 1) I like hg. 2) I like that bitbucket gives me unlimited private repos as I am a student and dont want course work to be public, though, I guess I can request github for a free upgrade but still. 3) I should probably just clone my repos or w/e. [01:02] gkatsev: n2liquid: yes, he's here all the time. [01:02] n2liquid: huh, great [01:02] ncb000gt: gkatsev: i'm just being an ass. use what you like, unless it's svn or other crap like that [01:02] n2liquid: is there a jQuery channel like this one? [01:02] gkatsev: as is TJ and isaacs and tim [01:02] gkatsev: n2liquid: #jquery :) [01:02] ncb000gt: n2liquid: ^ [01:02] n2liquid: is it active? [01:02] ncb000gt: nfc [01:03] jesusabdullah: Very, iirc [01:03] gkatsev: ncb000gt: heh. Yeah, well, even people who use svn are better off. I know of some people at my college who dont even know what source control is. RCS ftw! (jk) [01:03] n2liquid: I'll take a look at it later [01:03] n2liquid: thanks [01:04] gkatsev: /join #jquery [01:04] n2liquid: yeah, sure [01:04] gkatsev: you can take a look now. while chatting here :) [01:04] n2liquid: hm, I'll try [01:04] ncb000gt: gkatsev: they will learn...i was like that too. then... one day i was running my pc up a flight of stairs (halfway through the semester to show off my thesis)- tripped going up the stairs and the tower went flying [01:04] ncb000gt: thesis gone [01:05] ncb000gt: that night i consumed my weight in alcohol [01:05] n2liquid: lol [01:05] ncb000gt: then learned about source control [01:05] gkatsev: lol [01:06] gkatsev: ncb000gt: unfortunately, I know for a fact that some off them will never learn. And it is sad. [01:06] ncb000gt: gkatsev: heh, if any of them get jobs working with me...they will [01:06] ncb000gt: oh they will [01:07] gkatsev: lol [01:07] ncb000gt: ;D [01:07] gkatsev: where do you work? [01:07] gkatsev: /do? [01:07] ncb000gt: Siteworx [01:07] gazumps has joined the channel [01:07] ncb000gt: r&d ish stuff...some client work [01:07] gkatsev: ncb000gt: hehe (about github issues) http://thechangelog.com/post/4480502475/codeconf-github-issues-2-0 [01:08] ncb000gt: aye [01:08] ncb000gt: :) [01:08] gkatsev: ncb000gt: do you use node at work? [01:08] ncb000gt: gkatsev: have been yes [01:08] gkatsev: cool [01:09] gkatsev: I might end up using node at my co-op [01:09] ncb000gt: nice, whereat? [01:09] gkatsev: (I go to northeastern where we work for 6 months several times during the 5 year program) [01:09] gkatsev: I'll be working at BBN [01:10] ncb000gt: nice, i know someone headed to nw for communications [01:10] ncb000gt: phd student [01:10] gkatsev: nw != NEU [01:10] ncb000gt: oh bleh [01:10] ncb000gt: heh [01:10] gkatsev: heh [01:10] ncb000gt: <-- can't read [01:10] ncb000gt: makes coding tough [01:10] gkatsev: I'd imagine [01:11] gkatsev: and you have no compiler to yell at you. [01:11] onr has left the channel [01:11] ncb000gt: :) [01:12] ncb000gt: gkatsev: bbn being apart of raytheon? [01:12] kriszyp has joined the channel [01:12] gkatsev: yes, BBN is now part of raytheon [01:12] ncb000gt: interesting, and they are using node? [01:12] ncb000gt: sweet [01:12] gkatsev: so, technically, I'll be working for Ratheon BBN but I'll be working for the BBN part [01:12] ncb000gt: sure [01:13] gkatsev: well, they aren't using node right now. [01:13] gkatsev: but they might if I have anything to say about it. :) [01:13] ncb000gt: hahaha [01:14] gkatsev: during the interview I suggested that node might be useful to increase connections of radars from 10s to much much more. [01:14] gkatsev: i'll be working with these cute little radars. [01:14] gkatsev: though, mostly android dev, probably. [01:15] gkatsev: we'll see how it works out when I start the job in july [01:15] micheil: ryah: why is the variable END_OF_FILE in net.js 42? [01:18] ncb000gt: gkatsev: nice, i've done some node dev too [01:18] ncb000gt: erm android [01:18] gkatsev: lol [01:18] gkatsev: I figured the node part :P [01:19] ncb000gt: :) [01:19] gkatsev: anyway, gf time. BBL [01:19] MarkMenard has joined the channel [01:19] gkatsev: ncb000gt: thanks for your help. [01:19] tmzt: somebody tell if this looks okay? https://gist.github.com/911955 [01:19] perlmonkey2 has joined the channel [01:19] ncb000gt: gkatsev: np [01:20] ncb000gt: tmzt: wrt? [01:21] tmzt: ncb000gt: it's supposed to create a json path (like a js name) if it doesn't exist in a particular object [01:21] tmzt: just wondering if it looks bad for js cons, it works though [01:21] hornairs has joined the channel [01:22] bartt has joined the channel [01:24] ncb000gt: tmzt: it looks fine, tho i'm unsure of where i'd use it [01:24] tmzt: ah, well I have a document management system that has writable fields in the documents, so I have a type of template engine [01:24] ncb000gt: i don't know that i've ever had to create a json path like that...seems a bit like xpath to me [01:24] ncb000gt: haha [01:24] ncb000gt: ok [01:24] sechrist has joined the channel [01:25] ncb000gt: well, at least i'm reading it right [01:25] ncb000gt: :) [01:25] tmzt: yeah, jsonPath is like xpath [01:25] tmzt: it just didn't have writable support [01:25] ncb000gt: tmzt: yea [01:25] ncb000gt: gotcha [01:25] mikl_ has joined the channel [01:26] ncb000gt: looks fine, have you tested it wrt speed of operation? [01:26] tmzt: thanks, hadn't really written a recursive algorithm in a while [01:26] tmzt: not yet, have to kill all the debugging [01:27] ncb000gt: also, you can likely speed it up by caching paths within instances [01:27] tmzt: not just in this, the rest of my code is filled with it [01:27] ncb000gt: tmzt: sure [01:27] tmzt: maybe, I'm doing that in a few other places [01:27] tmzt: I also have a stateful version of jsonPath that will keep track of the next entry in an array [01:27] tmzt: since the original is not stateful [01:28] tmzt: that's using caching [01:28] ncb000gt: gotcha [01:28] charlenopires has joined the channel [01:28] tmzt: obviously I can optmize the regex matches, and probably get rid of one of the cases [01:29] tmzt: but it's working [01:29] LukeGalea has joined the channel [01:30] yozgrahame has joined the channel [01:31] themiddleman has joined the channel [01:31] ncb000gt: yea [01:33] Me1000 has joined the channel [01:34] ncb000gt: anyone know why Stream.pipe doesn't have use an encoding when calling dest.write? [01:34] ncb000gt: :s/have// [01:35] jimt_ has joined the channel [01:36] zakabird has joined the channel [01:36] LukeGalea has joined the channel [01:37] no-gooder has joined the channel [01:39] flippyhead has joined the channel [01:40] xtian has joined the channel [01:44] no-gooder: how can i prevent sql injectşon with javascript ?? [01:45] no-gooder: is there any library or any known way.. any tutorial? [01:45] DTrejo: no-gooder: the situation is the same as it would be with php or another language [01:46] DTrejo: no-gooder: make sure treat any data from users as dangerous [01:46] no-gooder: DTrejo, there is afunction in php [01:46] DTrejo: I think [01:46] no-gooder: i think it was someting like escapestring() or something [01:46] DTrejo: no-gooder: I'm not a good person to ask, anyone else have an answer? [01:47] no-gooder: is there any spesific function in javascript to prevent injections ?? [01:48] ncb000gt: no-gooder: escape(str) [01:48] ncb000gt: it wont itself prevent everything but it will encode your strings for you [01:48] zorzar has joined the channel [01:49] no-gooder: ncb000gt, so how am i suppost to decode ? [01:49] ncb000gt: no-gooder: unescape(escape(str)) [01:50] no-gooder: ncb000gt, oh ok. what was i thinking =) [01:50] ncb000gt: :) [01:50] dashokado has joined the channel [01:51] darshanshankar has joined the channel [01:53] mhooker has joined the channel [01:57] chapel: JimBastard: ping [01:59] saikat has joined the channel [01:59] no-gooder: what if some username has one of these dengerous characters like ' or " ? [02:00] no-gooder: while log in proccess (validation) [02:01] broofa has joined the channel [02:04] ljounce has joined the channel [02:04] marcello3d has joined the channel [02:05] seivan has joined the channel [02:05] piscisaureus has joined the channel [02:06] TooTallNate: oh boy, oh boy, oh boy, oh boy. minutes away from compiling node on my iPhone 4! [02:07] ohtogo has joined the channel [02:07] marcello3d: ACTION has a sudden craving to go out and buy an iphone 4 now [02:07] marcello3d: ;-D [02:10] kbni: what's the best way to save arbitrary objects/arrays/strings to a file (and import it again) - is there something similar to pickle? [02:11] guybrush: `v git dirty [02:11] v8bot: guybrush: felixge/node-dirty - GitHub - https://github.com/felixge/node-dirty [02:11] guybrush: `v git nstore [02:11] v8bot: guybrush: creationix/nstore - GitHub - https://github.com/creationix/nstore [02:11] guybrush: look at those kbni [02:11] kbni: thanks buddy :) [02:12] guybrush: `v git alfred [02:12] v8bot: guybrush: pgte/alfred - GitHub - https://github.com/pgte/alfred [02:12] beejeebus has joined the channel [02:12] Viriix has joined the channel [02:13] hvgotcodes: is there some way to always catch an error? [02:14] bradleymeck has joined the channel [02:16] micheil: kbni: you could always write pickle yourself, iirc, there is also a BERT encoding option, although, I'm pretty sure most people just write out JSON fragments. [02:16] micheil: `v git bert [02:16] v8bot: micheil: mojombo/bert - GitHub - https://github.com/mojombo/bert [02:16] micheil: (that's the ruby implementation, not sure where the node.js one is) [02:16] chapel: `v git chaos [02:16] v8bot: chapel: stagas/chaos - GitHub - https://github.com/stagas/chaos [02:17] kbni: dirty will do [02:17] kbni: :D [02:17] micheil: or it's the erlang one. [02:17] micheil: BERT is closer to Pickle than dirty [02:17] micheil: you could also use protobuf, which is another encoding format [02:18] guybrush: some time ago i used file.json as small stores with php :D (json_encode/decode are awesome! haha) [02:18] micheil: dirty and nstore, and alfred are all database type solutions. [02:18] guybrush: well you write in a file [02:19] micheil: not really. [02:19] micheil: you write to a databse [02:19] micheil: which in turn writes to a file, but it's still a database [02:20] micheil: sqlite files aren't the same thing as a file containing a bunch of bytes that are a BERT encoded thing [02:20] guybrush: i see [02:20] marcello3d: you guys see the new github issues UI? [02:21] micheil: in order to read a sqlite file, you need to implement a database, in one way or another [02:21] micheil: BERT is just a data encoding, as is protobuf and a bunch of others. [02:21] guybrush: tbh didnt know about bert [02:21] guybrush: is it like xml? :) [02:21] micheil: marcello3d: thoughts? https://gist.github.com/911968 [02:21] micheil: guybrush: no. It takes native types and encodes them to binary [02:22] guybrush: ah sweet [02:22] mikegerwitz: marcello3d: not until you mentioned it..I had just used it earlier today and it was still the old one. Nice. [02:22] ncb000gt: mikegerwitz: yea, they launched it during a talk at codeconf [02:22] ncb000gt: :) [02:22] micheil: guybrush: it's binary format is based on the binary erlang format [02:22] ncb000gt: i'm really beginning to wish i was there [02:22] ncb000gt: heh [02:22] marcello3d: micheil: a little occontext? [02:22] marcello3d: *context [02:22] ncb000gt: seeing some of the stuff come out of that conf [02:22] mikegerwitz: ncb000gt: I can finally get rid of my milestone labels! [02:23] marcello3d: ncb000gt: what conf? [02:23] ncb000gt: marcello3d: codeconf [02:23] micheil: marcello3d: well, rather then approaching things like a websocket protocol from the stand point of streams, this is a superset of a stream [02:23] ncb000gt: marcello3d: http://codeconf.com/ [02:23] newy_ has joined the channel [02:23] marcello3d: micheil: what does it add on top of streams? [02:24] marcello3d: types? [02:24] micheil: read it, it tells you. [02:24] micheil: pretty much [02:24] micheil: your events from a writable stream describe your data [02:24] Viriix has left the channel [02:24] micheil: and your methods on a readable stream describe what your writing [02:24] marcello3d: so basically a super simple binary json [02:25] micheil: marcello3d: no.. [02:25] hosh_work has joined the channel [02:25] micheil: it doesn't define your data. [02:26] micheil: it definites a few methods that an Encoder stream should have, some that a Decoder stream should have, and then tells you to use logical names with your events and methods [02:26] eventi has joined the channel [02:26] micheil: example: websockets has a 'close' frame, so my Encoder has a close() method, and my Decoder has a 'close' event [02:26] marcello3d: right [02:26] micheil: context further: [02:27] marcello3d: so basically a binary emitter? [02:27] micheil: net.Socket writes to Decoder [02:27] micheil: Encoder writes to net.Socket [02:27] marcello3d: who is doing the header work: 0x82 0x05 [02:27] marcello3d: 0x85 0x03 [02:27] micheil: that is the websocket format [02:27] micheil: 0x80 means final frame [02:28] micheil: 0x05 means binary frame [02:28] micheil: 0x03 is the length [02:28] marcello3d: yup [02:28] jtsnow has joined the channel [02:28] micheil: but essentially your Decoder and Encoder describe the data [02:29] marcello3d: it feels like a serialized event emitter to me [02:29] marcello3d: with domain-specific serialization [02:30] micheil: I think it's the right way to go with working with framing. [02:31] marcello3d: really hard to say without using it :) [02:31] micheil: I'll have an in-use example up soon. [02:31] micheil: but first I need sleep. [02:31] marcello3d: :) [02:32] sivy has joined the channel [02:32] marcello3d: woah [02:32] marcello3d: node.js segfaulted [02:33] marcello3d: does it stackdump somewhere? [02:33] mscdex: are there any stable async zlib modules out there? [02:33] piscisaureus: not.true node.does.not.fail. you.must.be.lying [02:33] marcello3d: mscdex: why async? [02:34] mscdex: marcello3d: just curious [02:34] samcday: mscdex, I had the same question about zlib [02:34] marcello3d: I'm using compress-ds via npm [02:34] samcday: I found one, but it was pretty basic, and apparently "should only be used for 128kb data or less" [02:34] mscdex: heh [02:34] samcday: Wasn't async either [02:34] piscisaureus: Some day, zlib support will be in core. [02:34] samcday: piscisaureus, Oh? [02:34] marcello3d: you don't want async zli [02:34] marcello3d: zlib [02:34] mscdex: marcello3d: why? [02:34] samcday: ... [02:34] samcday: Why? [02:35] marcello3d: it's not IO [02:35] mscdex: :) [02:35] marcello3d: for the same reason you don't have async Math.pow [02:35] samcday: It's still computation heavy and you don't want to tie up the main thread... [02:35] marcello3d: or Math.sqrt [02:35] samcday: Math.sqrt is hardly the same as deflating a mb of data. [02:35] marcello3d: you rarely deflate the whole mb all at once [02:35] samcday: I beg to differ o.O [02:35] samcday: Example: I am writing libgit2 bindings [02:36] samcday: I need to decompress loose objects [02:36] samcday: Which can easily be that size, if not more. [02:36] marcello3d: right [02:36] marcello3d: but the raw usage of the zlib library [02:36] marcello3d: you have a buffer [02:36] marcello3d: that's usually on the order of 10-200k [02:36] no-gooder: hoe can i pass html tags with ejs ??? it encodes it. [02:37] marcello3d: besides, if you start multi-threading your zlib code [02:37] marcello3d: you run into other problems :) [02:37] samcday: Like? [02:37] marcello3d: well you're either have to copy memory or share memory [02:38] robertkeizer: Ho hum.. has anyone played with requires() inside a vm context? I'm having a little bit of trouble.. [02:38] sivy has joined the channel [02:38] arrty has joined the channel [02:38] marcello3d: imagine you're reading some data from IO into a Buffer [02:38] robertkeizer: Specificly vm.runInNewContext .. [02:38] marcello3d: and then passing it off to an async zlib [02:38] marcello3d: then you read more data into the same buffer while zlib is working on it [02:38] marcello3d: that'll screw everything up [02:38] samcday: marcello3d, But it's really simple, you just don't do that... [02:39] marcello3d: plus the overhead of spinning up a thread for each zlib call [02:39] marcello3d: is a bit silly [02:39] samcday: Following that logic [02:39] samcday: No operations in node.js should be spun up in a thread [02:39] marcello3d: exactly [02:39] samcday: Since it's probably just better to do it all in the main thread, right? [02:39] marcello3d: or run multiple node processes [02:39] marcello3d: or worker processes [02:39] marcello3d: to do computation [02:39] samcday: Wait [02:39] marcello3d: the point being, it's not the job of the zlib library to organize that [02:39] samcday: o.O [02:40] marcello3d: since the actual zlib work is inherently cpu bound, not io bound [02:40] samcday: So it's faster to send a 1mb file to another process to do the logic for me [02:40] samcday: Rather than just spin up a thread and deflate it in the same process [02:40] yozgrahame has joined the channel [02:40] marcello3d: it's faster to unzip it in the same process :) [02:40] marcello3d: than both of those [02:41] samcday: I still don't quite understand what you're saying here :P All I said in the first place is we need a good zlib module that allows asynchronous zlib operations [02:41] NuckingFuts: Why is my NodeJS smartmachine so fail? [02:41] ncb000gt: robertkeizer: not really, but what is the issue? [02:41] n2liquid: I found somewhere a NodeJS extension to write daemons [02:41] piscisaureus has joined the channel [02:42] marcello3d: the problem isn't zlib's [02:42] n2liquid: is there any reason not to use NodeJS for writing daemons? [02:42] mobile has joined the channel [02:42] marcello3d: it's inherent with cpu-bound tasks inside node.js [02:42] samcday: Am I mistaken in thinking that runnign a multithreaded application will take advantage of multiple cores? [02:42] samcday: Because I thought they did [02:42] gazumps has joined the channel [02:42] marcello3d: samcday: you're not mistaken, but the zlib library doesn't take advantage of multiple cores itself [02:42] samcday: It doesn't need to [02:42] marcello3d: so you'd either have to write a parallelized version of zlib, or put some layer between your code and zlib [02:43] samcday: Of course you would [02:43] samcday: It's called a node.js binding lol [02:43] samcday: The fact still remains [02:43] robertkeizer: ncb000gt: Re-writing a small cli that I had hacked togeather with evals.. trying to do it cleaner - getting a "require not found" message from vm.runInNewContext. [02:43] samcday: If you wanted to do something cpu intensive [02:43] samcday: Of COURSE you'd spin it up in another thread [02:43] konobi: robertkeizer: you need to pass object in [02:43] n2liquid: marcello3d: I think he means each thread would run zlibs in isolation [02:43] samcday: n2liquid, Not necessarily [02:43] samcday: But yes that would be nice [02:43] samcday: If not [02:44] samcday: A simple mutex to gate zlib operations is fine. [02:44] marcello3d: I know what he means :) [02:44] ncb000gt: robertkeizer: i suspect from using a string that has a require in it? [02:44] samcday: The point still is, you would NOT want to block the main thread to do something with a buffer of any significant size. [02:44] robertkeizer: konobi: I'm passing some objects in.. hmm, you're saying pass in require? I didn't know I could do that. [02:44] konobi: robertkeizer: { require: require } [02:44] n2liquid: so you mean zlib should lock the main thread or do you mean there is some other asynchronous way of using zlib without blocking it? [02:44] samcday: The cost of spinning up an eio thread and returning straight to the JS is far less than doing the deflate/inflate in the main thread straight up. [02:44] robertkeizer: ncb000gt: Yup.. :) [02:45] robertkeizer: konobi: Ahh.. thanks. [02:45] ncb000gt: robertkeizer: yea, what konobi said then [02:45] samcday: n2liquid, I mean that you lock operations on zlib in the threadpool, not the main thread [02:45] samcday: A simple fifo queue or something would be fine [02:45] marcello3d: samcday: but I'd want a non-zlib specific way of doing that, I don't want my zlib code to do that for me [02:45] n2liquid: samcday: yeah, I get you [02:45] n2liquid: I was wondering what marcello3d is thinking [02:45] samcday: I'm still really confused lol [02:46] robertkeizer: konobi, ncb000gt: Thanks - that worked :) [02:46] konobi: samcday: child process and pipe through gzip [02:47] konobi: =0) [02:47] samcday: konobi, oh shit [02:47] samcday: I honestly didn't think of that haha :p [02:47] samcday: But but but! I don't get to reinvent the wheel in Node then! Where's the fun in that :( [02:47] n2liquid: isn't creating a process a lot more than creating a thread? /newbie question, don't blame me [02:48] samcday: n2liquid, it is [02:48] samcday: But marcello3d meant having a few worker processes spun up already [02:48] marcello3d: samcday: use https://github.com/pgriess/node-webworker ? :) [02:48] n2liquid: oh, I see [02:48] samcday: But in the context of a zlib operation, sending the data to be processed to the process is still expensive [02:48] n2liquid: that must be easier indeed [02:48] samcday: Let's say you had 5mb of data to compress [02:48] samcday: Copying that to an IPC buffer, or sending it via some other means [02:49] marcello3d: you could stream that to the process though [02:49] konobi: samcday: using dup2 fd's should make that easier [02:49] samcday: Is guaranteed to be more expensive than just spinning up a thread [02:49] samcday: I might already have the data in a buffer though [02:49] marcello3d: maybe node.js isn't the right language for you, then :) [02:50] bartt has joined the channel [02:50] marcello3d: I mean, guys like http://www.zeromq.org/ seem to think they can do better (speed-wise) than traditional multi-threading [02:50] marcello3d: so there has to be something to that approach [02:50] samcday: marcello3d, k now I'm sure you're just trolling [02:50] jesusabdullah: Well no, javascript is the right language, not node.js! [02:50] jesusabdullah: I don't think the zmq guys mean to replace "traditional multithreading" [02:51] jesusabdullah: They aim to replace cruddier systems for ipc [02:51] marcello3d: you sure? they had a presentation on it and that's what I got out of it [02:51] marcello3d: http://vimeo.com/20605470 [02:51] samcday: marcello3d, The whole point of Node.js is to be evented, right? [02:52] marcello3d: and single threaded [02:52] samcday: And yes I know that's in the context of io operations [02:52] samcday: No, the point of node is to be single threaded in the request/response model [02:52] samcday: However the fact remains that some things (mainly io) should be asynchronous. I believe that logic extends to cpu-bound operations too (within reason) [02:53] samcday: I'm not making this a general debate, I'm still just talking specifically about something like zlib. [02:53] marcello3d: well, I haven't been convinced that zlib is so slow [02:53] marcello3d: I mean, how long does it take to uncompress 10mb? [02:54] kbni: why doesn't fs.open(.., 'w') createa new file? :S [02:54] samcday: It would *have* to be longer than it would take to spin it up in a thread. [02:54] jesusabdullah: The one way in which I think the zmq guys could be said to be wanting to "replace" traditional multi-threading is that they aim to make something that's *easier* to use than, say, OpenMP/MPI [02:54] marcello3d: samc: but you're leaving out the whole part where the thread does the work and sends it back [02:54] marcello3d: that will obviously take longer than just doing it in the main thread, right? [02:55] ncb000gt: kbni: i thought it did [02:55] marcello3d: ok just did a quick test [02:55] ncb000gt: kbni: what error are you seeing> [02:56] ncb000gt: ? [02:56] marcello3d: 7MB mp3 [02:56] marcello3d: should be mostly random data, hard to compress [02:56] samcday: marcello3d, It doesn't *send* the data back. [02:56] samcday: A thread operates in the same process. [02:56] marcello3d: .38s to compress [02:56] samcday: LOL [02:56] samcday: So, you want to lock the main thread for 380ms? [02:56] samcday: Am I getting this right? :P [02:56] marcello3d: .06s to uncompress [02:57] marcello3d: that includes io time no doubt [02:57] samcday: Spinning up a thread takes much less than that [02:57] robotarmy has joined the channel [02:57] marcello3d: let's back up a second here [02:57] kriszyp has joined the channel [02:57] marcello3d: what else are you trying to do in the main thread? [02:57] marcello3d: is this a desktop app, web app? [02:57] n2liquid: serving everybody..? [02:57] samcday: Irrelevant. [02:57] samcday: Cpould be a web app, could be a desktop app [02:57] marcello3d: humor me [02:57] kbni: soh [02:57] samcday: Could be a background task. [02:58] kbni: knbi: typo in directory name [02:58] samcday: Okay in the example of my libgit2 stuff [02:58] kbni: :D [02:58] ncb000gt: kbni: :) [02:58] samcday: I am cloning a reposuitory over HTTP right? [02:58] marcello3d: ok [02:58] samcday: Made up of many loose objects [02:58] samcday: I will have many HTTP requests on the go [02:58] marcello3d: so I would argue [02:58] samcday: I will also be processing other objects [02:58] robotarmy has joined the channel [02:58] marcello3d: assuming you have more than one core [02:59] marcello3d: you should be running ALL of your code on all of your cores for maximum performance [02:59] samcday: More processes? [02:59] marcello3d: not just the zlib [02:59] samcday: I am though. [02:59] samcday: My libgit2 code is asynchronous [02:59] samcday: As are http requests [02:59] marcello3d: yes but that's not multi-core [02:59] marcello3d: that's just non-io-blocking [02:59] samcday: Therefore I'm able to keep racing around the event loop, pumping numerous requests in threads [02:59] marcello3d: when you're actually dealing with data, it's all on one core [02:59] samcday: So threads don't use more than one core? [02:59] hvgotcodes: hmm i still can't get a vows suite to exit [03:00] marcello3d: your javascript code [03:00] marcello3d: that's processing the data from IO [03:00] marcello3d: is all running on the same thread [03:00] samcday: O.o [03:00] marcello3d: your callbacks are run one at a time [03:00] ncb000gt: yep [03:00] samcday: I know that [03:00] samcday: However [03:00] samcday: I will queue up something to decompress right [03:00] samcday: Then [03:00] samcday: I will queue up something else to doewnload via HTTP [03:00] marcello3d: yes, but you're missing the big picture [03:00] samcday: Or I could be performing some other logic [03:00] samcday: This is happening WHILE something is decompressing *not* on the main thread [03:01] marcello3d: ok [03:01] marcello3d: cool :) [03:01] n2liquid: seriously, I'm totally lost here [03:01] skm has joined the channel [03:01] marcello3d: so let's say you don't care about the lost cpu power for all the non zlib parts [03:01] samcday: n2liquid, Me too, I think marcello3d is just debating for the fun of it :p [03:01] n2liquid: while you're uncompressing stuff with zlib [03:02] cloudhead has joined the channel [03:02] n2liquid: you cannot be receiving the completion callbacks of other stuff [03:02] samcday: Exactly. [03:02] marcello3d: how hard would it be to implement what you're describing using a synchronous zlib library + web workers [03:02] samcday: In the context of a web app [03:02] n2liquid: to forward to other things [03:02] samcday: You may have just generated a report for one request [03:02] samcday: And you're compressing it [03:02] samcday: you still want to be able to respond to other requests while it's being compressed [03:02] samcday: 380ms is a LONG time if you have even more than 10 requests at once. [03:02] marcello3d: but it's not 380ms [03:03] marcello3d: that's 380ms to do 7MB all at once [03:03] samcday: Might be a 7mb report. [03:03] marcello3d: I'm going to be streaming the file in 10k chunks [03:03] marcello3d: to my zlib library [03:03] samcday: The report may have been built in memory. [03:03] marcello3d: doesn't matter [03:03] samcday: It DOES! [03:03] marcello3d: have you used the zlib library before? [03:03] marcello3d: like, in c [03:04] samcday: Nope [03:04] marcello3d: alright, I'm done then :-) [03:04] marcello3d: have a good night [03:04] samcday: Okay! [03:04] itistoday has joined the channel [03:04] monokrome: ,ir rr,rrrrrr rr,,rrrrrr,,rrrr,r,r,r,,,rrr,r4r,r,rrr,r ttt,rr,rr tääät,t,,rttttttttt,r [03:04] n2liquid: hey, marcello3d [03:04] n2liquid: just a second [03:04] samcday: n2liquid, don't bother lol [03:04] n2liquid: are you brazilian? [03:04] marcello3d: nope [03:04] n2liquid: it's not that [03:04] n2liquid: heh [03:05] n2liquid: you're from where? [03:05] marcello3d: many places :) [03:05] n2liquid: .. troll confirmed [03:05] n2liquid: whatever [03:05] samcday: Yeah I kinda feel stupid feeding him for that long >_< [03:05] samcday: It was fun for a while though :p [03:05] eee_c has joined the channel [03:05] marcello3d: =P [03:06] samcday: Anyway, back to the original problem, I suppose child_process and using binary is best bet [03:06] TooTallNate: And it's built! NodeJS on iOS is official guys! [03:06] samcday: OMG [03:06] ncb000gt: o.0 [03:06] marcello3d: TooTallNate: for jailbreak? [03:06] TooTallNate: yes [03:07] marcello3d: I'm totally running my next site on a cluster of ipads [03:07] samcday: TooTallNate, Link is where? [03:07] TooTallNate: i literally just built it on my iphone. I've been working with @mraleph all week to get V8 working properly [03:07] hvgotcodes: when i run a node program (no http server) should it end when done? [03:07] TooTallNate: I'll write a blog post shortly [03:08] tbranyen: TooTallNate: lol nice, i've been considering trying to get it working on windows mobile [03:08] TooTallNate: but there's this: https://github.com/TooTallNate/node/tree/iphone-build [03:08] ncb000gt: hvgotcodes: depends on if there are any callbacks waiting... [03:08] hvgotcodes: ncb000gt: how do i tell? [03:08] marcello3d: hmmm [03:08] hij1nx has joined the channel [03:08] marcello3d: I'm getting a segfault on node.js [03:08] hvgotcodes: my vows test is not exiting [03:08] marcello3d: what's the best way to report? [03:09] marcello3d: ooh, it's not node, it's node-canvas [03:09] ncb000gt: marcello3d: github issues, but try to inspect with gdb [03:09] marcello3d: Thread 0 Crashed: Dispatch queue: com.apple.main-thread [03:09] marcello3d: 0 canvas.node 0x000000012636bd50 PixelArray::PixelArray(Canvas*, int, int, int, int) + 224 (PixelArray.cc:107) [03:09] marcello3d: 1 canvas.node 0x000000012636c079 PixelArray::New(v8::Arguments const&) + 585 (PixelArray.cc:119) [03:09] marcello3d: 2 node 0x000000010007f33e v8::internal::Builtin_HandleApiCallConstruct(v8::internal::(anonymous namespace)::BuiltinArguments<(v8::internal::BuiltinExtraArguments)1>) + 798 [03:09] ncb000gt: hvgotcodes: can you post a gist of it? [03:10] samcday: TooTallNate, How hard is it to compile? I might go run it on my ipad now :D [03:11] hvgotcodes: ncb000gt: cloudhead was helping me before. I wasnt handling testing request async, but i fixed that, and still not exiting. here is the code https://gist.github.com/c68282fb6677248d30a2 some details are obfuscated but you get the idea [03:12] TooTallNate: samcday: well getting the g++ setup on the phone is a learning process [03:12] samcday: I imagine so :D That's what I was worried about [03:12] samcday: compilation must take FOREVER too :P [03:13] TooTallNate: yeeessssss [03:13] TooTallNate: over an hour for sure [03:13] TooTallNate: that damn V8 [03:13] samcday: Jebus :p [03:13] marcello3d: can you compile on computer? [03:13] ncb000gt: hvgotcodes: are you seeing "End Login Called" on the console? [03:13] hvgotcodes: ncb000gt: yessir [03:13] samcday: marcello3d, You could probably cross-compile [03:13] TooTallNate: yeah i'm sure you can [03:14] hvgotcodes: yeah that gist is abit out of date -- the logging in batch now takes err and response as args [03:14] samcday: Gotta make sure you setup all the right prefixes and stuiff though [03:14] hvgotcodes: im testing them appropriately [03:14] ncb000gt: hvgotcodes: have you printed out callback to make sure it's really a function and all that? [03:14] samcday: iOS is VERY persnickety about where you put stuff on the fs. [03:14] hvgotcodes: ncb000gt: its provided by vows [03:14] ncb000gt: hvgotcodes: i figured as much, i'm just trying to see where it might hang up [03:14] marcello3d: wonder how hard it'd be to just embed node.js into a regular app store app [03:15] hvgotcodes: ncb000gt: the Logged in Succesfully callback is firing, and that is invoked by the callback [03:15] ncb000gt: hvgotcodes: i've never used vows [03:15] TooTallNate: samcday: the main problems I had were fixed by copying over the /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/usr/* dirs to the /usr/* on the iphone [03:16] samcday: hvgotcodes, that code looks fine [03:16] hvgotcodes: samcday: yeah [03:16] samcday: I don't think vows is the reason node isn't exiting [03:16] samcday: I' [03:16] ncb000gt: yea [03:16] samcday: I'd say your custom lib has something it's not cleaning up. [03:16] hvgotcodes: but when i do node mytests. i have to ctrl c it [03:16] ncb000gt: that's kind of what i'm figuring [03:16] ncb000gt: hvgotcodes: what about the application itself? [03:16] ncb000gt: without the tests [03:16] samcday: TooTallNate, oh ok ;D I'ma try and get g++ running now ^_^ [03:17] samcday: hvgotcodes, Is your code starting up a server anywhere? [03:17] samcday: http or otherwise, because it could just be sitting there waiting for connections. [03:17] hvgotcodes: ncb000gt: you are correct -- i started commenting things out -- it in the require of sproutnode [03:18] saikat has joined the channel [03:20] dashokado has left the channel [03:20] hvgotcodes: hmm what would cause it to not exit? [03:20] hvgotcodes: is there any way to tell? [03:20] hvgotcodes: that library is tens of thousands of lines [03:20] ncb000gt: hvgotcodes: take a look at how you're using it, is there a place you need to call end() or close() [03:20] ncb000gt: ? [03:21] dyer has joined the channel [03:21] dyer has joined the channel [03:21] hvgotcodes: ncb000gt: i cant think of any -- its a browser framework ported to run on node [03:22] hvgotcodes: ncb000gt: what causes this? [03:23] hvgotcodes: is it a function that is broken? [03:24] ncb000gt: hvgotcodes: sorry, i was trying to look around for things [03:24] ncb000gt: sproutnode in particular [03:24] ncb000gt: i've never used that either [03:24] ncb000gt: but it does look like it has registers for things like finish [03:24] hvgotcodes: i just created it ;) [03:24] ncb000gt: haha [03:24] hvgotcodes: its a port of sproutcore [03:24] hvgotcodes: but just the model stuff [03:24] ncb000gt: i figured [03:25] tbranyen: new github issues looks awesome [03:25] ncb000gt: tbranyen: ay [03:25] ncb000gt: e [03:25] zakabird has joined the channel [03:25] hvgotcodes: ncb000gt: ive narrowed it down to one 120k line file [03:25] ncb000gt: LOL [03:25] ncb000gt: that's a start [03:25] samcday: hvgotcodes, If it's ported from the browser [03:25] samcday: It might actually be a setInterval [03:26] samcday: Any pending timeouts or intervals will keep node running [03:26] samcday: Try just ctrl+F for that as a start [03:26] hvgotcodes: samcday: right, but this is litteraly the framework code -- im not invoking anything [03:26] samcday: You are. [03:26] samcday: By doing require("module") you're invoking module code [03:26] hvgotcodes: right but just the definitions [03:27] hvgotcodes: i mean you must be correct, because something is freezing it [03:27] samcday: The second you include a module it will start executing code, which could very easily be setting up timers/intervals/database connections/evil plots to conquer the world [03:27] samcday: Sometimes even all of the above. AT THE SAME TIME *doom* [03:27] hvgotcodes: samcday: hmm [03:27] hvgotcodes: this is just the definition of the framework 'classes' [03:27] hvgotcodes: so yes code is running [03:27] hvgotcodes: to set up the definitions [03:28] samcday: Are you sure there isn't an "init" being run somewhere as soon as you include sproutnode? [03:28] hvgotcodes: you have to be correct, i just can't see how or where [03:28] samcday: Link me the codE? :P [03:28] samcday: <--- lazy [03:29] hvgotcodes: samcday: there is no init invoked [03:29] hvgotcodes: just definitions [03:30] tylerstalder has joined the channel [03:31] hvgotcodes: samcday: its 4mb long [03:31] hvgotcodes: i dont think gisthub will take it ;) [03:31] samcday: I just meant a link to sproutnode :P [03:31] samcday: It's ok I founds it [03:31] hvgotcodes: i havent published this version [03:31] hvgotcodes: any other versions are oooooolllldddd [03:31] ncb000gt: yea, i just looked at one too from 2009 [03:31] ncb000gt: heh [03:31] ncb000gt: :) [03:32] hvgotcodes: gisthub says entry too large [03:32] hvgotcodes: instead of generating a huge file [03:32] hvgotcodes: ill do it another way so i can find out exactly where its dying [03:34] TooTallNate: Does anyone know any good places to learn the iOS low-level C APIs? [03:34] TooTallNate: preferabbly including the undocumented ones [03:34] TooTallNate: I need to write some node bindings now! [03:36] rchavik has joined the channel [03:37] jonpacker has joined the channel [03:40] samcday: iphonewiki [03:40] samcday: Or something similar [03:40] samcday: It documents alot of the private apis [03:40] samcday: gotta jet [03:42] jonpacker has joined the channel [03:45] mt3 has joined the channel [03:46] mt3 has left the channel [03:47] hasenj has joined the channel [03:48] tuckbick has joined the channel [03:50] hvgotcodes: how do i invoke a node process (running tests) from within a callback on a server? [03:50] ncb000gt: hvgotcodes: you could spawn a child process [03:51] hvgotcodes: ncb000gt: docs? [03:51] ncb000gt: http://nodejs.org/docs/v0.4.5/api/child_processes.html [03:52] timcosgrove has joined the channel [03:53] hvgotcodes: ncb000gt: how do i handle the exit event? [03:53] ncb000gt: spawn.on('exit', function() {}); [03:53] mike_miller has joined the channel [03:54] hvgotcodes: ncb000gt: does that require a require? [03:55] ncb000gt: yep [03:55] mike5w3c_ has joined the channel [03:55] hvgotcodes: like require('child_processes').spawn.on(...) [03:56] no-gooder: anybody use ejs template engine ???????????? [03:56] ncb000gt: spawn is a function [03:56] ncb000gt: but yes [03:56] ncb000gt: no-gooder: i don't, but i'd guess you're using too many ?'s in there [03:56] ncb000gt: <.< [03:56] hvgotcodes: ncb000gt: am i calling spawn or registeting a callback on it? [03:56] ncb000gt: hvgotcodes: yes [03:56] ncb000gt: <.< [03:57] hvgotcodes: hmm this isnt going to work if i cant get this thing to return [03:57] ncb000gt: require('child_processes').spawn('ls', ['/']).on('exit', function() {}); [03:57] no-gooder: ncb000gt, so? [03:57] ncb000gt: since spawn is a function you need to invoke it and pass a few params [03:58] ncb000gt: then on the object returned you can register the callback [03:58] ncb000gt: for the exit event [03:58] ncb000gt: no-gooder: buttons? [03:58] ncb000gt: sorry, what's the issue you're having? [04:00] kuebk has joined the channel [04:00] no-gooder: ncb000gt, i'm having some trouble and you are no help. (!) i used one ; are you happy? [04:01] ncb000gt: :D [04:01] hasokeric has joined the channel [04:01] Micfire: now thats how you make friends.. [04:01] ncb000gt: no-gooder: that is why i asked you what issue you're having [04:01] ncb000gt: Micfire: lol [04:02] jesusabdullah: no-gooder: What's your promblem? [04:03] Aria has joined the channel [04:04] jesusabdullah: no-gooder: I've never used ejs, so I doubt I could help you, but it can [04:04] jesusabdullah: t do any harm for you to Just Ask [04:04] no-gooder: jesusabdullah, i have <%= vrble %> in my ejs file. vrble has some html tags. ejs shows this as text. i need to show it as html. [04:05] no-gooder: it converts "<" to "<"... [04:05] Micfire: no-gooder: have you checked that it's not "a feature" to prevent XSS or something? [04:06] DTrejo has joined the channel [04:07] no-gooder: Micfire, it goes from server to client. [04:07] Micfire: no-gooder: you mean the data goes from server to client without converting? [04:08] jesusabdullah: no-gooder: Try escaping it back out. The examples indicate to me that your var as "%> <%" would work [04:08] Micfire: if that's the case, then it is "a feature" and you need to check documentation if there's a way to turn it off.. if not, then you'll just have to stab the source. [04:08] jesusabdullah: No guarantees [04:08] robotblake has joined the channel [04:09] Micfire: in my opinion if framework/library does converting to data, there should be always a way to turn it off [04:10] jonpacker has left the channel [04:10] mscdex: blargh [04:10] mscdex: npm no worky :( [04:10] ncb000gt: mscdex: oh? [04:11] ncb000gt: how so? [04:11] mscdex: trying to upgrade npm [04:11] mscdex: i get ENOENT [04:11] mscdex: :/ [04:11] ncb000gt: to the rc? [04:11] mscdex: eh.. to whatever it chooses [04:11] mscdex: 0.3.x [04:11] mscdex: or something [04:11] ncb000gt: so npm upgrade npm? [04:11] ncb000gt: hmm strange [04:11] ncb000gt: i did it earlier today [04:11] ncb000gt: =\ [04:11] jaket has joined the channel [04:11] ncb000gt: not to the rc [04:12] mscdex: 0.3.18 [04:12] ncb000gt: yea [04:12] ncb000gt: i upgraded to that version [04:12] mscdex: currently have 0.2.14-6 [04:12] mscdex: :S [04:12] ncb000gt: hmm [04:12] ncb000gt: sudo? [04:12] mscdex: yeah [04:12] no-gooder: jesusabdullah, no , it doesn'T work. "<%" executes the code "<%=" echos. [04:16] Viriix has joined the channel [04:16] dabtop has joined the channel [04:17] ncb000gt: it looks like tj's parser escapes anything that has html characters like < and others [04:17] dabtop: Is there not a .split method for arrays ? [04:17] jesusabdullah: no-gooder: Maybe <%= then [04:17] harth has joined the channel [04:17] jesusabdullah: Other than that I got nothing [04:17] ncb000gt: dabtop: umm, why would you split an array? [04:17] ncb000gt: it's already split [04:17] dabtop: oh shi- [04:17] dabtop: lol I think I meant slice [04:17] dabtop: ACTION tries [04:18] ncb000gt: heh [04:18] astropirate has joined the channel [04:18] ncb000gt: slice exists [04:18] dabtop: yea lemme check [04:19] dabtop: aha [04:19] dabtop: yea lol I feel silly now [04:19] dabtop: :< [04:19] ncb000gt: haha all good [04:19] ncb000gt: :) [04:19] mscdex: heh.. looks like i can't upgrade npm with this version [04:19] ncb000gt: glad it worked [04:19] mscdex: woo [04:19] ncb000gt: mscdex: damn [04:19] ncb000gt: heh [04:19] ncb000gt: i had been upgrading with master for a while so i must have been further along [04:20] dabtop: How come the JSON object is {} [04:20] marcello3d: how do I compile node js with debugging symbols? [04:20] dabtop: Do I need a certain module? :< [04:20] SubStack: JSON is built in [04:20] dabtop: :\ [04:21] ncb000gt: marcello3d: ./configure --debug [04:21] shiawuen has joined the channel [04:21] ncb000gt: iirc [04:21] marcello3d: I'm getting a segfault in what appears to be the debugger [04:21] SubStack: dabtop: the parameters are not enumerable [04:21] marcello3d: er [04:21] marcello3d: garbage collector [04:21] dabtop: console.log( JSON ); gives me {} and JSON.parse gives me method error [04:21] SubStack: v8: Object.getOwnPropertyNames(JSON) [04:21] v8bot: SubStack: ["stringify","parse"] [04:21] dabtop: :/ [04:21] SubStack: dabtop: ^^ [04:21] SubStack: v8: JSON.stringify([1,2,3]) [04:21] v8bot: SubStack: "[1,2,3]" [04:21] SubStack: v8: JSON.parse('{ [04:21] v8bot: SubStack: SyntaxError: Unexpected token ILLEGAL [04:22] SubStack: v8: JSON.parse('{"a":2,"b":[3,4]}') [04:22] v8bot: SubStack: {a:2,b:[3,4]} [04:22] dabtop: hmmk [04:22] dabtop: !! JSON.parse('{"a":2,"b":[3,4]}') [04:22] dabtop: oops [04:22] dabtop: wrong channel [04:22] Nic__ has joined the channel [04:23] dabtop: oh strange [04:23] dabtop: hmmk [04:23] dabtop: time to see if itworks now :x [04:23] marcello3d: *recompiles node* [04:24] marcello3d: ncb000gt: do you know how the same applies to node modules? [04:24] dabtop: btw node.js is awesome [04:24] dabtop: http://pastebin.com/CVsakkmQ [04:24] dabtop: I mean, I made that in a few minutes :D [04:24] dabtop: for a simple debug ;P [04:24] ncb000gt: marcello3d: depends on the module. but the module needs to be compiled with the correct compile time options [04:24] marcello3d: ncb000gt: module is compiled with node-waf I think [04:25] marcello3d: through npm [04:25] ncb000gt: aye [04:25] marcello3d: I'm seeing debug information in the mac os x crash window [04:25] ncb000gt: if it's compiled with waf it has a wscript [04:25] marcello3d: but not when I run through gdb [04:25] marcello3d: which is kind of weird [04:25] ncb000gt: hmm [04:25] ncb000gt: i debug solely with gdb and valgrind [04:25] marcello3d: but it's been a while since I did c/c++ stuff, so not going to pretend I know the latest in that world :) [04:25] marcello3d: I'd rather not have to debug c/c++ stuff [04:25] marcello3d: t [04:25] dabtop: aha seemed it works. All is good for now, thanks SubStack and ncb000gt [04:26] marcello3d: that's why I use java/js :) [04:26] ncb000gt: dabtop: cheers [04:26] ncb000gt: hahaha [04:26] ncb000gt: c/c++ isn't that bad [04:26] ncb000gt: and java is more verbose [04:26] ncb000gt: if i have to use java i try to use scala [04:27] ncb000gt: but i don't know as much about scala as i do java, so i do sometimes have to work with the java [04:27] ncb000gt: =\ [04:27] marcello3d: scala is pretty thick [04:27] marcello3d: actually switched from scala -> node.js [04:27] ncb000gt: why? [04:27] ncb000gt: and what do you mean by thick? [04:28] ncb000gt: i'm pretty interested in scala and erlang [04:28] marcello3d: it has a lot of syntax, a lot of things to know/understand/think about [04:28] ncb000gt: still on my todo list [04:28] marcello3d: I spent a good few months learning it, but came to the conclusion that it isn't ready/worth it, yet [04:28] marcello3d: the compiler is way too slow [04:28] marcello3d: the IDE support is crap, and the community is meh [04:28] ncb000gt: i don't need ide support [04:28] ncb000gt: vim works fine [04:28] marcello3d: :) [04:29] ncb000gt: :) [04:29] ncb000gt: i never noticed the compiler being slow [04:29] marcello3d: also, not too many people know scala [04:29] marcello3d: and it's hard to learn, so that hurts that even further [04:29] marcello3d: compiler is ridiculously slow [04:29] jesusabdullah: Did you know java beforehand? [04:29] marcello3d: compared to node.js or java [04:29] jesusabdullah: Sounds like you did [04:29] marcello3d: yes, java IDEs rock [04:29] ncb000gt: that doesn't bother me much, as long as there are some people who are active in the community [04:30] jesusabdullah: I was thinking less in terms of IDEs and more in terms of, "It's supposed to be kinda like java right?" [04:30] derferman has joined the channel [04:30] ncb000gt: meh, it seemed just as fast as javac [04:30] jesusabdullah: Yeah, I usually just use vim or gedit, but then again [04:30] marcello3d: the closest is jetbrain's scala plugin for intellij, but it's not there yet, it can't handle all the type inferencing stuff [04:30] marcello3d: ncb000gt: not for large projects [04:30] ncb000gt: marcello3d: probably so, i've only screwed around with it [04:30] marcello3d: javac you can run essentially in realtime while you code [04:30] ncb000gt: so i can't say much wrt large projects [04:30] marcello3d: get live syntax errors/highlighting/type suggestions [04:31] marcello3d: scala, not so much [04:31] ncb000gt: marcello3d: interesting [04:31] marcello3d: and programming completely transforms once you have realtime compiling [04:31] marcello3d: imo [04:31] marcello3d: especially in a typesafe language [04:31] jesusabdullah: You sound like one of those lispy SLIME types >:P [04:31] marcello3d: jesusabdullah: what's that? [04:32] jesusabdullah: Superior Lisp Interaction Mode in Emacs [04:32] SubStack: projects shouldn't be large [04:32] marcello3d: oh man I fucking hate emacs [04:32] jesusabdullah: Yeah, me too [04:32] jesusabdullah: but I never tried SLIME [04:32] ncb000gt: SubStack: depends on the project and what you'd consider to be "the project" [04:32] SubStack: you don't set out to solve some problem by saying to yourself, "gee, I think I'll start a big project" [04:32] jesusabdullah: I get the impression that it's less a text editing mode and more of a uber-powerful REPL kinda thing [04:32] SubStack: you solve the problem and try to keep the scope under control [04:33] marcello3d: SubStack: my project had maybe 10 classes. it wasn't that big, but the compiler started getting in the way [04:33] jesusabdullah: Lisp has this weird culture of doing everything in the REPL, even when it doesn't really make sense to [04:33] ncb000gt: SubStack: That's the key though. What problem are you trying to solve? [04:33] SubStack: jesusabdullah: strange! [04:33] jesusabdullah: Yeah! [04:33] SubStack: ncb000gt: well ideally you can just break up big projects until they are just a bunch of small projects [04:33] ncb000gt: and that problem can entail having 2-3 different backends, message passing frameworks, and then a frontend framework [04:34] marcello3d: ok [04:34] ncb000gt: SubStack: sure, and that's why i said it depends. [04:34] jesusabdullah: There's a sort of stereotypical situation where people go and ask LISPers, "How do I make a standalone app?" and some people **actually reply** with, "Why would you do that? You just don't "get" lisp." [04:34] ncb000gt: in dev terms, they are likely a handful of small projects. [04:34] ncb000gt: but to managers, it's likely one large project [04:34] jesusabdullah: and, I mean, running stuff in a REPL-ish environment like that CAN be really cool for some stuff, but you're not ALWAYS wanting to do the whole "exploratory programming" thing [04:35] jesusabdullah: That said, I should give slime a try so that I can steal ideas from it for my jabbascriptings [04:35] marcello3d: not a huge fan of repl except for debugging [04:35] marcello3d: I like being able to pause code and evaluate random code [04:35] marcello3d: in my actual app [04:35] marcello3d: don't care so much about doing stuff from scratch in a repl [04:37] jimp has joined the channel [04:37] jesusabdullah: Well, usually it's more like, you write some code, then load it, then see how the function runs [04:37] jesusabdullah: and you can re-load it later if it doesn't do what you want [04:37] marcello3d: man loading code is so lame [04:37] marcello3d: :D [04:37] jesusabdullah: It'd be like writing a module, then requiring it, trying it out, and then re-requiring it later or something [04:37] jesusabdullah: except different [04:37] jesusabdullah: It's more like, (load "file") [04:38] jesusabdullah: (function-in-file) [04:38] jesusabdullah: Keep in mind, I haven't spent THAT much time with CL. I went through Land of Lisp and hung out in the channel for a month [04:38] marcello3d: ugh [04:38] marcello3d: this can't be good [04:38] marcello3d: https://gist.github.com/fee466e226cb67aa5693 [04:38] jesusabdullah: I'd love to hack with it some more, but [04:38] jesusabdullah: there are some *weird* idioms [04:38] jesusabdullah: and some of the people there are, well, very much like grumpy old men [04:39] jesusabdullah: "You'll eat it and like it!" [04:39] jesusabdullah: Whoa, that looks intense marcello3d O__O [04:39] marcello3d: not sure what's going on really [04:40] marcello3d: did fix another bug in node-canvas though [04:40] no-gooder: i found he solution <%- [04:40] no-gooder: there is nothing in stupid documentation [04:40] timmywil has joined the channel [04:40] mscdex: success! npm packages updated [04:41] jakehow has joined the channel [04:41] mscdex: guess i should keep on top of that more often [04:41] ncb000gt: no-gooder: fork and submit a pull request. :) [04:41] ncb000gt: good find [04:41] ncb000gt: mscdex: heh...maybe [04:43] no-gooder: ncb000gt, i will :) it took my fuckn two hours to find :S [04:43] no-gooder: anyway, goodnight... [04:45] Viriix has left the channel [04:51] dabtop: v8: 1 [04:51] v8bot: dabtop: 1 [04:51] dabtop: :o [04:51] dabtop: sweet [04:52] dabtop: v8: 1+1 [04:52] v8bot: dabtop: 2 [04:52] dabtop: :D [04:52] dabtop: ACTION walks away content [04:53] marcello3d: night all [04:55] saschagehlich has joined the channel [04:58] cloudhead has joined the channel [04:58] prettyrobots has joined the channel [04:58] jeffmoss has joined the channel [04:58] indiefan2a has joined the channel [04:59] lorhko has joined the channel [05:00] jeffmoss: I have an object that has a few internal objects that it waits on, it keeps a count and each internal object emits a "loaded", then the callback happens once they're all loaded. I want to create a form of this that blocks and waits for everythign to be loaded and then executes. How do I do this? [05:01] zkirill has joined the channel [05:01] reid has joined the channel [05:03] jeffmoss: a promise is what I want but I read that it's no longer included? [05:03] jaket_ has joined the channel [05:04] ckknight: jeffmoss: a promise is basically something that should eventually have a value [05:04] ckknight: conceptually, at least [05:04] ckknight: and it represents one value (though that might be a list) [05:04] ckknight: at least it should... [05:04] jeffmoss: so is there any way now to wait for some event with a blocking call? [05:06] ckknight: jeffmoss: if so, don't use it. You don't want to halt your app entirely, you just want to execute things once the promise comes to be. [05:06] ckknight: the promise should provide a callback for when it receives its value. [05:07] jeffmoss: yeah ok, hard to get into this frame of mind but now I see a way [05:07] ckknight: the water's fine, dive right in. [05:07] ckknight: :P [05:10] MikhX has joined the channel [05:18] hornairs has joined the channel [05:19] bnoguchi has joined the channel [05:19] johnfn has joined the channel [05:20] johnfn: is there a way to print out an object that gives me something more meaningful than [object Object]? I tried to do JSON.stringify but it tells me i have a circular reference and gives up. :( [05:20] jeffmoss: sys.inspect [05:20] johnfn: ah thanks!! [05:22] losing has joined the channel [05:25] ncb000gt: sys is deprecated, prolly want to use util [05:25] ncb000gt: most of sys moved to util [05:27] modular has joined the channel [05:28] johnfn: ncb000gt, aah, okay, thanks. i was wondering why i couldnt find sys in the docs. :) [05:28] ncb000gt: :) [05:30] gazumps has joined the channel [05:34] markc: would anyone happen to have a howtonode.org/apps.js that is current and works? [05:34] dabtop: :\ [05:35] Nic__ has joined the channel [05:39] mscdex: markc: what is that file supposed to be? [05:40] markc: this doesn't work ootb -> https://github.com/creationix/howtonode.org/raw/master/app.js [05:41] markc: connect.conditionalGet doesn't seem to exist [05:41] jimt has joined the channel [05:42] ncb000gt: markc: are you running a new version of connect? [05:42] darshanshankar has joined the channel [05:42] markc: ncb000gt: not sure, whatever npm gave me [05:43] markc: ncb000gt: git pull says uptodate [05:43] ncb000gt: yea, so you're using the latest [05:43] ncb000gt: change that line to connect.utils.conditionalGet [05:43] ncb000gt: tj refactored a lot of the code in connect and express [05:43] ncb000gt: a while back [05:43] ncb000gt: conditionalGet is now in connect.utils [05:44] ncb000gt: hmm [05:44] ncb000gt: actually [05:44] skm has joined the channel [05:44] ncb000gt: oh right, yea [05:44] ncb000gt: that [05:44] markc: ncb000gt: Connect or connect? [05:45] ncb000gt: whatever was there [05:45] ncb000gt: looks like Connect [05:45] ncb000gt: so Connect.utils.conditionalGet [05:45] okuryu has joined the channel [05:47] markc: nope, I must have an older version of connect or something, it was howtonode.org that I did the git pull in [05:48] markc: apparently I have connect v 1.3.0 [05:49] jimt_ has joined the channel [05:49] ncb000gt: that's new afaik [05:49] markc: ah! ... exports.conditionalGET [05:49] sholmes has joined the channel [05:50] sholmes: Hey everyone! [05:50] mscdex: hola [05:51] ncb000gt: yo [05:51] ckknight: howdy, sholmes [05:51] sholmes: why hello ckknight. [05:51] ckknight: ...where's watson? [05:52] sholmes: I've come here to talk JS/node stuff, but specifically, and for starters, umm something... [05:52] mscdex: heh [05:53] ckknight: sounds good. [05:53] mscdex: ckknight: watson is still busy pwning jeopardy contestants [05:53] ckknight: they had it coming [05:53] ckknight: with their fleshy skin and all [05:53] ckknight: and they think with meat! who do they think they are? [05:54] markc: damn, looks like howtonode + wheat + connect is still in flux -> TypeError: Cannot read property 'headers' of undefined -> connect/1.3.0/package/lib/utils.js:247 [05:54] johnfn: they're made... of meat? [05:54] sholmes: Question: Node.js makes it natural to think of ways to organize your code into modules. You can do MVC with modules for models and templates (ejs, jade) for views and modules for controllers. But what my question, and what I'd like to discuss, is what sort of organizational conventions are there for client-side code. [05:54] ckknight: johnfn: the brains, at least. [05:55] ckknight: sholmes: well, you can follow an MVC or an MVVM pattern in your client if you want. [05:55] sholmes: My experience coming from PHP dev, is one client-side js file per page/php file with the same name in a /script directory. Not such a great solution for application development. [05:55] jesusabdullah: sholmes: I've seen people put all their client-side code in a folder and use, say, connect's staticProvider, to serve them up [05:56] jesusabdullah: sholmes: you may like browserify [05:56] sholmes: ckknight: MVVM? [05:56] ckknight: MVC was originally _for_ client-side development, then it was shoehorned into web development [05:56] jesusabdullah: https://github.com/substack/node-browserify [05:56] sholmes: jesusabdullah: I've seen browserfy. ;) [05:56] mscdex: ckknight: eh? [05:56] ckknight: sholmes: model-view-viewmodel (it's a microsofty thing that has a few benefits over MVC, but I tend to not use either) [05:57] sholmes: ckknight: interesting. I'll wikipedia that. [05:57] mscdex: mvc was never designed/built for a particular place [05:57] ckknight: MVC was a smalltalk thing, and it inspired many GUI frameworks [05:57] ckknight: rich-client side [05:59] ckknight: Cocoa, Qt, GTK+, and MFC are all MVC in one way or another. Some more than others. [05:59] jeffmoss: sholmes: have you looked at sencha or any other thin-client frameworks [05:59] sholmes: Well, I guess code organization can be whatever I want. [05:59] tylerstalder has joined the channel [06:00] jeffmoss: typically you'd just load the entire javascript all up front, all packaged and minified [06:00] sholmes: jeffmoss: I've been just using jQuery, and that's just one file. [06:00] MikhX has joined the channel [06:00] jeffmoss: the only reason to try and organize into efficient files is if you are doing classic HTTP [06:00] ckknight: sholmes: pretty much, as long as you're in charge of it. I tend to have my javascript files sorted and namespaced. On deployment, they're all concatenated together and served as one huge file, though. [06:00] jeffmoss: so, since efficiency doesn't matter, you could organize it into as many tiny files as you want, cat them all and minify [06:01] sholmes: ckknight: that's actually good to serve them as one file, it's faster that way. [06:01] DTrejo: has anyone ever dealt with sending base64 to the server so it can be sent back as a content-disposition attachment for auto-downloading? [06:01] sholmes: So, it doesn't matter how I organize my files really. [06:02] ckknight: sholmes: yeah, but have _some_ organization. [06:02] sholmes: ckknight: yeah, it matters to an extent. [06:02] DTrejo: SubStack: have you ever dealt with sending base64 to the server so it can be sent back as a content-disposition attachment for auto-downloading? [06:03] jeffmoss: DTrejo: just ask the question [06:04] DTrejo: oh, well, I want to know how to do that [06:04] sholmes: Part of my query is about how I should go about writting my code. Should it just be a file per page? What if I decide to do more Hijax-y things where there are no page refreshes? [06:04] DTrejo: how do I send image data from the client to the server so it will be auto-downloaded? [06:04] jeffmoss: define auto-downloaded [06:05] jeffmoss: not displayed in the browser ? [06:05] DTrejo: jeffmoss: when you click a link and the file appears on your computer [06:05] DTrejo: content-disposition: attachment; filename=mycoolpic.png [06:05] jeffmoss: DTrejo: you just need to set the appropriate header, I think you're on the right path with content-disposition [06:05] DTrejo: is the header that enables that [06:06] DTrejo: but I don't know how to appropriately send the data from the client to the server, and then encode it as binary correctly when I send it back down [06:06] DTrejo: jeffmoss: want to see what I have so far? [06:06] SubStack: DTrejo: I've never used content-disposition before [06:06] SubStack: never heard of it even [06:06] jeffmoss: DTrejo: sounds like you know what you're doing, where exactly is the problem [06:06] sholmes: How can I use JS objects effectively within the client-side? I've just been adding event handles to elements on dom ready, mostly. It seems to me like I should be using objects more, somewhere. [06:07] skm has joined the channel [06:07] DTrejo: jeffmoss: https://github.com/DTrejo/post-echo [06:07] sholmes: Anyone have any good resources online, or books on roughly the subject I'm portraying that you would recommend? [06:08] DTrejo: jeffmoss: the problem is that the image I have in the text input, that is base64 encoded, when I change it to binary on the server side and save it to my computer, it can't be opened as an image [06:08] jeffmoss: sholmes: I'd look into sencha, formerly extjs, formerly yahoo UI toolkit [06:08] SubStack: yui is separate I thought [06:08] gazumps has joined the channel [06:09] sholmes: jeffmoss: isn't that kinda like jQuery though or jQuery UI? [06:10] jeffmoss: DTrejo: how're you changing it to binary? [06:10] jeffmoss: oh I see [06:10] DTrejo: var buf = new Buffer(request.body, 'base64'); [06:10] DTrejo: var data = buf.toString('binary'); [06:10] jeffmoss: DTrejo: you using linux? Try "file" it [06:11] jeffmoss: use the file command see what it tells you [06:11] DTrejo: unix, but let's see [06:11] SubStack: oh interesting, didn't know ext started out based on yui [06:11] sholmes: I'm not looking to build one of these. Rather, I would use something like these. I'm talking about where the application logic goes. Where does the callbacks for that button on the go, where does that sidebar animation code go, etc. Things roughly like that. :\ [06:11] jeffmoss: sholmes: ext is a lot more ambitious than jquery [06:11] jeffmoss: ext/sencha [06:11] SubStack: DTrejo: don't re-serialize to string then? [06:11] SubStack: just keep as a buffer? [06:12] jeffmoss: sholmes: yeah you could think all of that up and figure it out but it's already been done by a gang of experts [06:12] mhooker has joined the channel [06:12] jeffmoss: sholmes: did you remember the extremely important thing called a DataView ? [06:13] sholmes: jeffmoss: Errr, ehh. What's the DataView agian. :P [06:13] sholmes: *? [06:13] jeffmoss: http://dev.sencha.com/deploy/dev/examples/view/data-view.html [06:14] DTrejo: SubStack: so you mean just put the buffer in there when I response.end() [06:14] nitind has left the channel [06:16] jeffmoss: DTrejo: file say anything interesting? [06:17] sholmes: jeffmoss: Ah I see. I sorta looked into Cappuccino, so I'm semi-familiar with the idea of views. I suppose I could build my own frameworks and views and such. [06:17] DTrejo: file buf.png [06:17] DTrejo: buf.png: data [06:17] DTrejo: not particularly [06:18] jeffmoss: DTrejo: so binary data, but not recognizable [06:18] jeffmoss: I'd compare the base64 encoded strings [06:18] jeffmoss: I have a unix base64 command [06:18] DTrejo: ah, buffers have them too [06:19] sholmes: What if you were doing the traditional application kind of architechture. One major fallback with applications out there is that if it's all JS powered, then you lose on SEO. So what if you could do a sort of mixture between the two. Kinda like facebook is app-like, but still page by page. [06:20] sholmes: what if you weren't* doing the traditional appl... [06:20] DTrejo: good idea, comparing now [06:20] DTrejo: thanks for the lead [06:21] dabtop: Where can I find the v8 bot? :< [06:21] jeffmoss: sholmes: then I'd come up with some sort of abstract file layout [06:22] sivy has joined the channel [06:22] jeffmoss: not necessarily pages, not necessarily functionality, but best fit for minimal files, quick download [06:22] sholmes: jeffmoss: I like the sound of that. What do you mean exactly? [06:22] jeffmoss: like a common.js, for starters [06:22] jeffmoss: home.js maybe for quick homepage load [06:22] jeffmoss: backend.js [06:23] jeffmoss: which is always incredibly difficult to get a team of programmers to all think the same with [06:23] MuzzleFork has joined the channel [06:23] jeffmoss: like trying to organize CSS [06:23] sholmes: in other words, each file is like a page or for a page? [06:24] sholmes: with a global one, common.js? [06:24] jeffmoss: or a group of pages [06:24] sholmes: For a group*? [06:24] jeffmoss: maybe you have 50 pages in your backend and they all have a menubar and date pickers, so you put that all in the backend.js" [06:25] jeffmoss: general abstraction layer specificaly for optimal browser load times [06:25] Emmanuel__ has joined the channel [06:26] sholmes: So all pages that share a common element could share the script that goes with it. [06:26] sholmes: Similar to how it would share the css file to style it. [06:27] sholmes: This is sort of the approach I've been taking, however I'm not sure on how I would want to organize the files and how I would name them. [06:27] jetienne has joined the channel [06:29] jeffmoss: no that's not what I'm saying, there is no reason to do one file per page [06:29] jeffmoss: only for your own satisfaction [06:29] highermath_away has joined the channel [06:29] jeffmoss: however it might be ok to write the code that way [06:30] cloudhea1 has joined the channel [06:30] jeffmoss: but all I'm saying is you probably want to come up with this abstraction layer where you combine your hundreds of tiny filse into larger chunks [06:30] sholmes: hmm, I didn't say one js file per page, unless that page had a specific script requirement, I suppose. [06:30] jeffmoss: and minify, etc. [06:31] jeffmoss: it's like CSS you just have to sortof wing it [06:31] sholmes: I see. [06:32] jeffmoss: 1, 2 or 10 files, you decide [06:32] eck has joined the channel [06:32] eck has joined the channel [06:32] perezd has joined the channel [06:32] sholmes: I was actually going with a backend design where I have /model, /view and /controller directories in my app. I would have an app.js file which contained all the routing code, and every route would just require a module as the callback: app.get('/', require('./controllers/index.js')); [06:33] sholmes: the controllers would handle the request and serve back the appropriete data, which would usually be HTML and generated from a template file from the /views dir. [06:34] sholmes: Is there lag in here? [06:34] jeffmoss: I've come up with a similar strategy... sortof based on other frameworks I've used... [06:34] sholmes: /views would hold all the ejs, jade, templates, what have you. [06:34] jeffmoss: instead of controllers I have 'routers' [06:34] derferman has joined the channel [06:35] sorens3n: express.js has a good example of MVC [06:35] jeffmoss: a path like /foo/bar/baz would just get routed to Foo, and then from there Foo could forward it on to Bar or BarBaz or whatever [06:35] sholmes: Ah I see. So the router modules would export a callback though? [06:35] jeffmoss: router tree [06:35] sholmes: Ah, sort of similar to CodeIgniter. [06:35] sorens3n: https://github.com/visionmedia/express/tree/master/examples/mvc [06:36] sorens3n: that might help you [06:37] sholmes: sorens3n: I'm pretty sure I've seen it. [06:38] sholmes: sorens3n: but looking at it again, it clues me in that I could loop through all my controller files and then route them automatically without needing to hard code the route everytime there's a new controller. [06:38] jeffmoss: there are dozens of mini frameworks but as I go about my work I don't see a need for hardly anything... I downloaded someones example of a minimalist templating system and that's basically all I need [06:39] Twelve-60: saw this in some code.. cant find any documentation about it: var Script = process.binding('evals').Script; [06:40] sholmes: sorens3n: though, how would I know which HTTP method the route should be in (get, post, put, ...). [06:41] sholmes: jeffmoss: well my application is going to be a hijax approach, all links are static, but JS hijacks them. [06:41] Croms has joined the channel [06:41] perezd has joined the channel [06:41] jeffmoss: what does the app do? [06:42] jeffmoss: sholmes: see, now you open up a pandoras box of something that "routes" for you [06:42] gmanika has joined the channel [06:42] jeffmoss: IMO, all the big mega-frameworks like Rails have become too complicated [06:42] sholmes: I believe that too, these things get too complicated, like sencha. [06:43] sholmes: I really don't want a bloated framework to load. Rather, I want a lightweight base to load, then things load in as you go. I want the system to be dynamic enough to load what you need on the fly, while still maintaining static fallbacks (SEO friendly). :) [06:44] sholmes: What did you mean by the pandora's box reference though? [06:44] jeffmoss: when you say "which method the route should be in" I think that is up to the receiver, you just have to get the entire request object to the right block of code is all [06:45] jeffmoss: here's how I do it: [06:45] ako has joined the channel [06:46] jeffmoss: Router = require('../routers/' + args.shift()); [06:46] jeffmoss: Router.init(args, request, response, function(router) { [06:46] jeffmoss: request.addListener('data', router.data); [06:46] jeffmoss: request.addListener('end', router.process); [06:46] jeffmoss: }); [06:46] zalez has joined the channel [06:47] sholmes: ags.shift()? [06:47] jeffmoss: var args = location.pathname.split('/'); [06:48] sholmes: is this clientside or server? [06:48] jeffmoss: server, so if I hit /pages/home, it'd call Pages.init.process(['home'] ... ) [06:49] jeffmoss: no need for a framework that does who knows what, this is working out very well [06:50] ckknight: what library is this? [06:50] jeffmoss: nolibrary [06:50] jeffmoss: if this wre a library it'd be ... 6 lines of code [06:50] hflw has joined the channel [06:51] ckknight: well then [06:51] sholmes: Hmm. I'm new to node, so I'm not sure exactly how this works. First, Router is an imported module you created? And what's the init method do? Also, I didn't know request.addListener existed or how it works. :P [06:51] sdixon has joined the channel [06:51] jeffmoss: Router == Pages == '../routers/pages' [06:51] ckknight: <-- wrote a routing library: https://github.com/ckknight/escort [06:52] sholmes: Pages is defined in /routers/pages? [06:53] jeffmoss: sholmes: yeah [06:53] jeffmoss: ckknight: this is pretty huge [06:54] jeffmoss: lots of code and regexes and stuff [06:54] sholmes: jeffmoss: it's hard for me to understand how it works, when I don't know what the init.process methods do, and stuff. [06:54] ckknight: jeffmoss: yeah, it's meant to be powerful and as efficient as possible. [06:55] m64253 has joined the channel [06:55] jeffmoss: Pages.init just calls Pages.new, as a matter of fact, with those same arguments... the only reason i cal it .init is because I don't always want to initialize new objects [06:55] jeffmoss: so maybe I have something called /static [06:56] jeffmoss: Static.init would just load a file and return [06:56] jeffmoss: i had the opposite goal of ckknight it seems [06:56] sholmes: is .new a native function to node.js I should know about? [06:57] jeffmoss: going totally minimalist [06:57] ckknight: sholmes: no [06:57] jeffmoss: oh, no, I meant "new Pages" [06:57] sholmes: :S [06:58] ckknight: sholmes: if you're just starting out, I'd recommend looking at Connect and Express. [06:58] sholmes: jeffmoss, could you maybe gist all the code for this, so that way I understand fully. I think that'll help. :) [06:59] sholmes: ckknight: Those are the frameworks I'm using. :P [06:59] ckknight: ah, good, then [07:00] jeffmoss: sholmes: that's really all there is to it, everything else is proprietary implementation, concluding with response.end(); [07:00] jeffmoss: see how init gets response [07:00] jeffmoss: I find there is no need for complex router library, everyones trying to reinvent rails in node.js [07:01] jeffmoss: express is pretty minimal I suppose [07:01] sorens3n: express hasnt let me down yet ;) [07:01] abraham has joined the channel [07:01] sorens3n: also, /b/ is addicting [07:01] sholmes: Hmm, so where's location defined? [07:01] sholmes: sorens3n: what's /b/ got to do with it? [07:02] sorens3n: nothing [07:02] sorens3n: :) [07:02] sholmes: oh right, gotcha [07:02] sorens3n: its whats preventing me from coding [07:03] sholmes: that's somewhat relavent then. [07:04] sholmes: var args = location.pathname.split('/'); what's locaiton? [07:04] sholmes: location* [07:04] sub_pop has joined the channel [07:06] jeffmoss: var location = url.parse(request.url, true); [07:06] jeffmoss: url = require('url') [07:08] markc has joined the channel [07:08] jesusabdullah: var location = require('url').parse(request.url, true); [07:09] sholmes: I see. [07:10] markc_ has joined the channel [07:10] sholmes: Okay, so you shift this array you made, which returns the first element. [07:10] james_gary has joined the channel [07:11] Stan____ has joined the channel [07:11] sholmes: Ah, so it's essentially like CodeIgniter. [07:13] sholmes: However, I didn't know that request objects had different event handles. [07:18] Rodtusker has joined the channel [07:27] DTrejo has joined the channel [07:28] sholmes: this chan went dead abruptly... [07:29] aho: sunday 9:30 am [07:29] aho: *picks nose* [07:30] aho: it's cartoon time, obviously [07:30] sholmes: lol, 12:30 am here. [07:30] Emmanuel__ has joined the channel [07:31] nephics has joined the channel [07:31] ckknight: sholmes: the chan's not dead, just ran out of conversation. [07:32] mytrile has joined the channel [07:32] jaket has joined the channel [07:36] synkro has joined the channel [07:38] ZeroCoder has joined the channel [07:38] insin has joined the channel [07:39] narayan82 has joined the channel [07:39] cyy has joined the channel [07:40] cyy: I'm having trouble finding a running example of nodewiki anywhere, can anyone point me to one? (I'm new to node.js, so I'm not at the point where I can just run it myself atm) [07:43] msucan has joined the channel [07:43] marienz has joined the channel [07:44] yozgrahame has joined the channel [07:45] sdecastelberg has joined the channel [07:46] ZeroCoder has joined the channel [07:46] ZeroCoder has joined the channel [07:46] joshthecoder has joined the channel [07:48] hflw has joined the channel [07:48] sholmes: Anyone here familiar with pushState? [07:48] timcosgrove has joined the channel [07:49] mike_miller has joined the channel [07:49] timcosgrove has left the channel [07:49] tfe_ has joined the channel [07:49] tfe_ has joined the channel [07:50] bentkus has joined the channel [07:51] matjas has joined the channel [07:51] ckknight: sholmes: in reference to the browser location thing? [07:51] sholmes: yeah [07:52] ckknight: haven't used it myself [07:53] sholmes: It's pretty cool. I'd like to see a lib make the API backwards compatible using the hashchange as a fallback [07:53] sako has joined the channel [07:54] pdelgallego has joined the channel [07:54] HAITI has left the channel [07:54] cossovich has joined the channel [07:56] ckknight: sholmes: big problem with that is that then you get two different urls representing the same route, and that when someone visits /some/specific/url, should they be redirected to /#/some/specific/url? [07:56] ckknight: and other questions. [07:56] sholmes: redirected to /#/...? [07:56] sholmes: hmm [07:58] xsyn has joined the channel [07:58] sholmes: Well, I'd have to say that the non-hash version is preferable. That said, if a user went to /some/url, then the server would serve up this url. If they went to /, then click the link to /some/url, it would make the ajax request to get the data it needs, and render that data on the page and only that data (saving bandwidth). [07:59] sholmes: Now, sense not all browsers support pushState, then hashes are an obvious fallback. The only problem with hashes is that they don't get sent to the server. So if someone copies the link, and they're IE, then they'd be copying the hash version. [08:00] ckknight: yeah, and then when they visit / and the client recognizes they have a hash, it loads that appropriate page [08:00] sholmes: What would happen when they go to the /#/some/url is that they'd get served /, but the framework would immediately detect the hash in the URL and make the Ajax request. [08:00] sholmes: exactly [08:01] sholmes: you'd probably want to remove the default content at / while the ajax request is being made, to prevent a momentary flash of the homepage. [08:02] sholmes: But, if someone goes to the hash version and is using Chrome, the library could remove the hash, push the appropriete state, and make the ajax request then. [08:03] sholmes: Also, all links on the page, could point to the static /some/url, and be hijack by the library. [08:03] sholmes: Thus SEO optimized. [08:03] sholmes: Sounds cool? [08:04] sholmes: Also, the library would use the standard proposed APIs, history.pushState, and it works transparently in lagacy browsers. [08:05] sholmes: problem is, IE is so bad, that it doesn't even support the hashchange event. [08:05] sholmes: Btw, what's a good Node.js IDE/editor? [08:05] blkcat: vim ;) [08:06] coreb has joined the channel [08:06] jesusabdullah: cloud9ide :D [08:07] jesusabdullah: I haven't used it, but the guys making it are pretty rad, and their goal is to make a good javascript ide [08:07] jesusabdullah: I think they have node and client-side in mind [08:08] m64253 has left the channel [08:08] m64253 has joined the channel [08:08] gattuso has joined the channel [08:08] mraleph has joined the channel [08:09] sdecastelberg has joined the channel [08:09] sholmes: cloud9ide, is pretty cool. It's all based around Node. I found another one that's based on node and using cappuccino on the client-side, although, it seems like it's forcing it's own framework on new projects. http://www.akshell.com/ [08:10] idefine has joined the channel [08:11] jesusabdullah: hmm [08:11] jesusabdullah: I see [08:11] sholmes: I'm not liking the new ace editor in cloud9 though... [08:11] sholmes: :( [08:11] jesusabdullah: ace editor? [08:11] jesusabdullah: Sometimes the cloud9 guys are in here [08:12] jesusabdullah: you should talk to them about it! [08:13] sholmes: ace is the editor that ajax.org made, and that skywritter (formally bespin) has been merged to. [08:13] stillmotion has joined the channel [08:14] stillmotion: What's a recommended forgiving HTML parser module? [08:14] qFox has joined the channel [08:14] diegoviola has joined the channel [08:14] diegoviola: hi [08:15] johnfn has joined the channel [08:15] jesusabdullah: stillmotion: html5 is a pretty good one iirc [08:15] stillmotion: thanks, jesusabdullah, I'll check that out [08:15] jesusabdullah: stillmotion: You end up using it with jsdom though, which has a different one by default from what I saw [08:15] jesusabdullah: stillmotion: Either way, using jsdom might be the easiest way to do what you want [08:16] stillmotion: My HTML document isn't completely valid. [08:16] stillmotion: just worried that jsdom with some selector engine will fail. [08:16] stillmotion: have yet to test it, though. [08:17] sorens3n: not valid or broken? [08:18] stillmotion: broken [08:18] tmedema has joined the channel [08:18] sorens3n: well, im sure the thought of fixing it has crossed your mind [08:18] jesusabdullah: Well [08:18] xsyn has joined the channel [08:18] dnolen has joined the channel [08:19] sorens3n: broken code is broken code [08:19] sorens3n: =\ [08:19] jesusabdullah: html5 is supposed to be pretty robust [08:19] jesusabdullah: one of its goals [08:19] stillmotion: Fixing it has crossed my mind, but it's 35k lines. [08:19] sorens3n: ouch! [08:19] jesusabdullah: o__o [08:19] stillmotion: I'll try html5 [08:19] sorens3n: messy? [08:19] stillmotion: yes, messy [08:19] jesusabdullah: Do you know *how* it's broken? [08:19] stillmotion: not yet [08:19] stillmotion: i have a sense that it is [08:20] sorens3n: http://infohound.net/tidy/ [08:20] sorens3n: well not valid and broken are different [08:20] sorens3n: if you are missing closing tags or the like i would try and fix [08:21] sorens3n: heres one for JS while i'm at it, http://jsbeautifier.org/ [08:22] stillmotion: thanks, sorens3n [08:22] sorens3n: np, not sure how else i can help [08:23] sorens3n: if you need help debugging small sections at a time, you can gist it and i can take a look [08:23] sorens3n: otherwise grab some coffee! [08:23] sorens3n: :D [08:23] d0k has joined the channel [08:25] saikat has joined the channel [08:26] ckknight has joined the channel [08:27] V1 has joined the channel [08:27] ckknight: why is the topic "The Java Age"? [08:27] seivan has joined the channel [08:27] sorens3n: uh, moment [08:27] sorens3n: i'll find it [08:28] sorens3n: there was an article just written [08:29] sorens3n: http://metamarketsgroup.com/blog/node-js-and-the-javascript-age/ [08:29] ZeroCoder has joined the channel [08:29] sorens3n: i'm guessing thats what its about anyways [08:29] diegoviola has left the channel [08:32] jaket has joined the channel [08:34] icebox has joined the channel [08:38] OneBraveHog: I always like to ask every now and then [08:38] OneBraveHog: prime benefit of running node.js is ? over another web server ? [08:38] fangel has joined the channel [08:39] tmedema: Is there anyone here who I can ask about handling a "streaming" multipart file upload with an express http server? [08:40] tmedema: OneBraveHog: I'd say simplicity, efficiency and javascript but hey I am not that experienced with node [08:41] icebox: OneBraveHog: http://nodeguide.com/convincing_the_boss.html [08:42] sorens3n: omg, where was that link a week ago [08:42] sorens3n: nice [08:42] flat has joined the channel [08:43] jesusabdullah: OneBraveHog: I just like javascript ^__^ Also, awesome community, bitchin' package manager, lots of room to hack [08:44] hflw has joined the channel [08:45] tmedema: I thought Redis is pretty stable and frequently used.. the second paragraph in that article seems to imply otherwise. [08:45] tmedema: third* [08:46] stagas has joined the channel [08:46] mikeal has joined the channel [08:47] stagas: SubStack: ping [08:47] SubStack: pong [08:48] ckknight: does node.js provide an easy way of escaping HTML? (something built-in, not a library) [08:48] stagas: SubStack: I'm having some trouble with dnode and date values [08:49] stagas: SubStack: https://gist.github.com/912162 [08:49] ngs has joined the channel [08:50] tmedema: Is there a reliable (and inexpensive) way to stress test a RIA build on node? Specifically, I'd like to see simultaneous connections all actually using the service rather than just keeping a connection idle. [08:50] tmedema: I need such stress test to calculate howmany nodes my server cluster would need for a specific user base, so I can see whether it is monetizeable [08:51] SubStack: ckknight: that sounds like a very arbitrary and artificial restriction [08:51] SubStack: "not a library" [08:51] SubStack: as if that were a bad thing [08:51] ckknight: I want to use it in a library for a fringe case [08:51] sholmes: Would it be a good idea to replace Ajax completely with Socket.IO? [08:51] ckknight: and not have any dependencies [08:51] ckknight: basically. [08:52] ckknight: if the answer is "no", that's fine. [08:52] SubStack: ckknight: why no dependencies? [08:52] SubStack: it's easy to have dependencies [08:52] ckknight: I'd rather just get an answer [08:52] SubStack: there is no html entities baked in [08:52] SubStack: npm install ent [08:52] tmedema: SubStack: dependencies add reliability on a third party [08:52] ckknight: okay, I thought that was the case [08:53] SubStack: tmedema: a third party that put quite a lot of time into building a reusable module that other people could derive some benefit from [08:53] SubStack: stagas: looking [08:53] tmedema: SubStack: sure, I'm not saying it's a bad thing, just answering on what could be a potential disadvantage [08:53] sholmes: Instead of making an ajax request and getting a response, I would send a message through socket.io and get await the "response" message. [08:54] cellvia has joined the channel [08:54] SubStack: stagas: Date objects just get converted to strings with JSON.stringify [08:55] tmedema: So anyway, anyone here been handling multipart file upload streams with express ? [08:55] sholmes: Would you think that Ajax would be significantly more efficient with this, or do you think that socket.io could do it without much difference (in speed/efficiency) as to worry about it? [08:55] chapel: tmedema: formidable [08:55] cellvia: hi all... having a total noob moment here, is there anyone with mongodb / mongous experience (not spelling mistake) to help ? [08:55] SubStack: stagas: and you can just do foo.bar, there is no magic attribute callback generation [08:55] stagas: SubStack: yeah but why does it throw [08:55] tmedema: chapel: I noticed that formidable actually tries to store the file on the server automatically, while I only need to proxy the multipart stream.. not sure if that is possible with formidable [08:56] xsyn has joined the channel [08:56] cellvia: as simple as it sounds im unable to setup mongous to connect to a remote non-local mongodb [08:56] cellvia: and for the life of me cant figure it out [08:56] SubStack: stagas: it could be related to some cloning used in the traversal [08:57] SubStack: yep, > require('traverse')(new Date).map(console.log) gives the same error [08:57] SubStack: stagas: just stringify the Date yourself perhaps? [08:58] cellvia: https://github.com/amark/mongous for anyone who might feel up to helping [08:58] asabil has joined the channel [08:58] stagas: SubStack: that sucks :) [08:58] ngs has joined the channel [08:59] jaket has joined the channel [08:59] SubStack: yeah :/ [09:01] chapel: makes no sense why its having troubles [09:02] SubStack: stagas: adding a unit test to traverse [09:02] stagas: SubStack: it's ln 54 in js-traverse/index.js Object.create(src.__proto__) is causing that error [09:02] coreb: sorens3n: the article certainly says "the javascript age", not "java" [09:02] stagas: SubStack: it should instanceof Date maybe ? [09:02] SubStack: possibly [09:03] SubStack: I didn't really know what I was doing when I wrote that part [09:04] chapel: lol [09:04] stagas: other types don't have the same problem, just Date from what I'm seeing [09:08] mraleph: Date is a niece piece of wisdom, you can create one with Object.create() [09:08] mraleph: *nice [09:08] stagas: still new String and new Boolean are typeof object so they might break too there [09:08] mraleph: *can not [09:08] mraleph: yeah they are also special [09:08] mraleph: String, Number, Boolean, Date [09:15] SamuraiJack has joined the channel [09:16] tmedema: chapel: is it possible to pipe an incoming multipart stream to another stream without saving on the disk with formidable? [09:16] ardcore has joined the channel [09:16] Astro has joined the channel [09:17] chapel: idk, I haven't used formidable [09:18] tmedema: alright, unfortunately it doesn't say much about streaming [09:18] tmedema: looks like it is intended for saving the file on the server [09:19] herbySk has joined the channel [09:20] herbySk: v8: var x="4"; x.valueOf=function() { return 4; }; x+3 [09:20] v8bot: herbySk: "43" [09:21] Emmanuel__ has joined the channel [09:23] SubStack: stagas: traverse 0.3.2 published, should fix this [09:25] tanepiper: has anyone here got coffeescript to work with cloud9ide? [09:25] eiffel has joined the channel [09:26] stillmotion: I'm trying to load a 35k HTML file into jsdom, however, it seems to overload the system. How can I load it into jsdom to perform selector queries without halting my machine? I'm currently using ReadFile. [09:26] tanepiper: tmedema: i belive you can intercept the incoming stream with formiable, but i haven't done it myself [09:26] stillmotion: 35k line HTML file I should say [09:27] stillmotion: it's about 20MB [09:27] tanepiper: tmedema: check out the docs on incomingForm.onPart [09:27] stagas: SubStack: yes! fixed :D [09:28] stagas: SubStack: maybe deserialize them too in dnode protocol? :D found this http://www.asp.net/ajaxlibrary/jquery_webforms_serialize_dates_to_json.ashx [09:29] stagas: if you scroll midway there's a neat solution involving the 2nd argument in JSON.parse [09:29] jbergstroem has joined the channel [09:30] larsemil has joined the channel [09:30] tanepiper: yea. dates and json are always a pain [09:30] stagas: you just need the half part with the reISO regex, the other one is for msajax [09:31] stephank has joined the channel [09:31] tmedema: tanepiper: yeah that's interesting, strangely enough that onPart function doesn't seem to be called when I upload something [09:32] stagas: I do a new Date() on date objects anyway because they tend to change types [09:33] tanepiper: stagas: another way is just to pass around Date.now() and parse that on each side, as parsing a datetime is the fastest AFAIK [09:38] mike_miller: In practice, what have you guys found the best solution to http://stackoverflow.com/questions/4234619/how-to-avoid-long-nesting-of-asynchronous-functions-in-node-js to be? [09:38] mike_miller: named functions, or some syntactic sugar? If the latter, what sugar? :) [09:38] stagas: at least now dnode doesn't break, I was doing JSON.stringify() which was too inconvenient because I want to use that method elsewhere so I had to determine when to callback json or not [09:39] stagas: might as well use ajax :P [09:39] tanepiper: mike_miller: use a flow control lib like Seq or Step [09:39] mike_miller: which one is better/more widely supported/do you use? [09:40] tanepiper: personaly i like Seq, but that's because SubStack fixed it so it works with coffeescript :D [09:40] coreb: so with the new style webapps based on js both client and server side, how is authentication/authorization done? [09:41] mike_miller: Is CoffeScript the thing used by Cappucino? [09:41] mike_miller: no wait, that's Objective-J, right? [09:41] tanepiper: no, yes [09:41] ckknight: coreb: same as it ever was, secure cookies unreadable by the client. [09:41] mike_miller: tanepiper: CoffeScript aside, still recommend Seq over Step? [09:41] coreb: ckknight: yeah, but node.js have support for it? [09:41] bananna has joined the channel [09:42] ckknight: I haven't gotten to that stage yet [09:42] tanepiper: mike_miller: yes [09:42] ckknight: coreb: if not, tell me and I'll write a lib. :P [09:44] SubStack: I should really fix that catch() parallelism issue that somebody posted last week [09:44] jbergstroem has joined the channel [09:45] __tosh has joined the channel [09:48] SubStack: bah I don't like this new version of npm [09:48] SubStack: installing modules in $PWD/node_modules [09:50] V1: ^__ i agree, it's really annoying and it's cluttering my projects [09:50] chapel: whats $PWD? [09:50] chapel: project working directory? [09:50] V1: current working directory [09:50] ckknight: the P stands for current [09:51] SubStack: because now projects complain about not having certain modules that other projects have installed [09:51] SubStack: and the repl doesn't have the modules that my projects do [09:53] SubStack: and I need to make sure I'm in the right directory now [09:53] SubStack: whereas before I didn't need to care [09:54] stagas: made a nice JSON.parse override for dates https://gist.github.com/912197 :P [09:55] V1: Yeh its so annoying that I actually hope that people will fork NPM and bring back the original functionality [09:55] chapel: hmm [09:56] xsyn has joined the channel [09:56] MuzzleFork has joined the channel [09:56] SubStack: what is the use-case that justifies this $PWD behavior? [09:56] tmedema: Can anyone explain why the onPart here never gets called even though it is a correct multipart file upload using formidable? https://gist.github.com/912200 [09:57] skm has joined the channel [09:58] bananna has left the channel [09:58] unlink has joined the channel [09:58] unlink has joined the channel [09:58] liquidproof has joined the channel [10:01] jaket has joined the channel [10:02] xsyn has joined the channel [10:03] eventi: is anyone using a library for ec2? I tried aws-lib, but it seems to have dependency problems [10:04] mike5w3c has joined the channel [10:08] Spion_ has joined the channel [10:08] SubStack: gah npm no longer fetches the dependencies when you `npm link` >_< [10:11] jonpacker has joined the channel [10:12] herbySk: hi. is there a way to create a (named [10:12] herbySk: ) pipe in node? [10:15] stillmotion has joined the channel [10:21] arrty has joined the channel [10:21] suckerpunch has joined the channel [10:34] adambeynon has joined the channel [10:34] JimBastard has joined the channel [10:37] liquidproof has joined the channel [10:40] M3l7D0wN has joined the channel [10:42] stillmotion: sorens3n: yt? [10:44] stillmotion: I'm trying to mess around with the HTML5 parser api, but I can't seem to get it to load my html document. Here's a gist: https://gist.github.com/a2319b930c7254cf0719 [10:45] stillmotion: The file reads into memory [10:45] robhawkes has joined the channel [10:45] stillmotion: but the parser hangs on the file — I'm guessing because it's about 4MB. [10:45] suckerpunch has joined the channel [10:46] Rob- has joined the channel [10:48] sreeix has joined the channel [10:51] mikl has joined the channel [10:55] flat: herbySk: Looks like it's not (yet) built in. But you can do it with require('child_process').spawn('mknod', ['myfifo', 'p']); [10:55] cellvia: hey all, anyone know about sockets with node [10:55] ezmobius has joined the channel [10:55] cellvia: im trying to use the net module to create a socket and wondering how to pass auth info [10:55] cellvia: net.createConnection [10:55] cellvia: takes port and host args [10:56] cellvia: any ideas on a way to pass add commands ( like -u username -p password [10:59] herbySk: flat: thanx [11:02] shaunau has joined the channel [11:04] eventi: is anyone using a library for ec2? I tried aws-lib, but it seems to have dependency problems [11:06] eveningsky2 has joined the channel [11:08] SvenDowideit_ has joined the channel [11:10] eveningsky2 has joined the channel [11:10] kbni: has anyone here had much luck interacting with graph from the server only? I'm trying to pull my own wall in my application only, but my token keeps expiring :S [11:13] eveningsky2: I'm getting the error "...Evente [11:14] eveningsky2: I'm getting the error "...EventEmitter()...has no method 'on' " [11:14] dahankzter has joined the channel [11:22] jarek has joined the channel [11:23] jarek: Hi [11:23] s0urce has joined the channel [11:23] s0urce: hi [11:23] jarek: is there something like PHPDoc in node.js? [11:23] s0urce: i can't prototype array in node?! [11:24] jarek: I have found this on google: http://jsdoc.sourceforge.net/ [11:24] s0urce: like Array.prototype.foo=function(){...}; [11:24] jarek: but it seems to be written by rhino people, not sure if node.js uses it? [11:24] s0urce: always get, my function doesn't exsists [11:26] stonebranch has joined the channel [11:27] jjmalina has joined the channel [11:28] V1: I here by conclude, that the node module "email" works.. As my inbox just gained 700 new emails, with a smaill loop error ;$ [11:28] k1ttty has joined the channel [11:29] shaunau: sOurce: [shaun@air:~] node [11:29] shaunau: > Array.prototype.foo=function(){ console.log('foo');} [11:29] shaunau: [Function] [11:29] shaunau: > [].foo(); [11:29] shaunau: foo [11:29] shaunau: > [11:31] s0urce: don't work for me [11:31] s0urce: i can't require this mb? [11:35] shaunau: V1: always use a collegues email address when testing :) [11:36] fairwinds has joined the channel [11:36] V1: shaunau: I just started grouping them using + sign in for gmail filters ;) V1+spam@address.com :) [11:39] Schmallon has joined the channel [11:39] ph^ has joined the channel [11:43] LukeGalea has joined the channel [11:47] s0urce: Does any1 knows why i always get this: "Error: Failed to load user favicon.ico [11:47] s0urce: " on console [11:48] Kingdutch has joined the channel [11:48] tanepiper: do you have connect favicon middleware installed? [11:49] s0urce: not that i know [11:49] s0urce: i use express [11:49] FireFly|n900 has joined the channel [11:49] jarek: s0urce: I was also getting this error [11:49] jarek: s0urce: in connect I had to add this: [11:49] jarek: connect.favicon(__dirname + '/client/favicon.ico'), [11:49] s0urce: but i dont have one ^ [11:50] s0urce: btw. wich connect? [11:51] jarek: dunno :) [11:51] jarek: but it should be done in similar fashino in express [11:51] jarek: s/fasino/fashion [11:51] shaunau: app.use(express.favicon()); [11:52] s0urce: and the path is? [11:52] jarek: s0urce: only you can now this [11:53] jarek: s0urce: __dirname will give the path to the directory were the currently running script is placed [11:54] jarek: s/now/know [11:54] jarek: sorry for typos [11:54] s0urce: ok, now did: app.use(express.favicon(__dirname + '/public/images/favicon.ico')); [11:54] s0urce: and added an icon in this dir [11:54] s0urce: still this error :/ [11:55] some1else has joined the channel [11:57] Stan____ has joined the channel [11:57] tanepiper: s0urce: express is just connect btw, you get all the methods of connect on it [11:57] tanepiper: but if you aren't using it, weird you are getting that error [11:58] s0urce: but how to use proper? [11:58] tanepiper: i'd grep -R ".ico" in your source dir [11:58] s0urce: i already got one now [11:58] s0urce: but how to link [12:00] stagas: date deserialization for JSON.parse: https://github.com/stagas/jsondate [12:00] stagas: :) [12:01] jarek: btw, how can I server page other than index.html with connect? [12:01] jarek: connect.static(__dirname + '/client/') will pick index.html automatically [12:02] jarek: s/server/serve [12:03] karboh has joined the channel [12:03] methym has joined the channel [12:04] stillmotion has joined the channel [12:04] JimBastard: SubStack: you still awake? [12:04] s0urce: jarek, in express i got somthing like "res.render('index', {...." [12:04] s0urce: there i can change the file name [12:05] s0urce: not sure about this "connect" thing ;) [12:07] tanepiper: jarek: that's serving static files [12:07] tanepiper: you need to set up views [12:07] jarek: tanepiper: but I would like to server just one static file [12:07] jarek: tanepiper: the problem is that that I don't want to call it index.html [12:08] jarek: s/server/serve [12:08] tanepiper: not sure if it's possible [12:09] tmedema has joined the channel [12:09] tmedema: Is there something like a "translation module" for Express so you can easily serve different languages to each client ? [12:09] hkjels: Anyone tried stylus? [12:09] jarek: how can I serve the index.html file as XHTML, not as HTML? [12:10] hkjels: Need to know how I can use a variable to build a selectorname [12:10] stagas: jarek: you need to make a middleware to rewrite the url [12:11] jarek: stagas: does changing the file name from index.html to index.xhtml will make node.js host it as XHTML? [12:11] hkjels: tried : .grid-$width, .grid-{$width}, {'.grid-'+$width} without any luck [12:13] jarek: afaik I have to send the file with mime type "application/xhtml+xml" [12:13] jarek: how do I specify the mime type for static files served with connect? [12:13] stagas: jarek: the mimetype will work but it still won't serve index.xhtml without you rewriting the request, it's hardcoded to use index.html [12:14] raphdg has joined the channel [12:14] stagas: jarek: https://github.com/senchalabs/connect/blob/master/lib/middleware/static.js#L128 [12:14] astropirate has joined the channel [12:14] jarek: stagas: ok, so I can server index.html as XHTML and it will be parsed as XHTML by browser, right? [12:15] jarek: s/server/serve [12:15] charlenopires_ has joined the channel [12:17] jarek: wait... it seems to be automatically detecting the mime type [12:17] jarek: in line 131 it does: [12:17] jarek: type = mime.lookup(path); [12:17] shaunau: tmedema: you'd prob do that with paths to different view assets. eg) views_en, views_de, views_id etc. not sure what hoops you'd need to jump through to make it work (if any) [12:17] jarek: so if my index.html file starts with then it should be automatically served as "application/xhtml+xml", right? [12:17] stagas: jarek: here's a rewrite middleware function to use: https://github.com/stagas/express-helpful/blob/master/helpful.js#L49-58 [12:18] stagas: jarek: no it just looks at the extension [12:19] Kami_ has joined the channel [12:19] Kami_ has joined the channel [12:19] jarek: stagas: thanks [12:19] jarek: stagas: where do I put it? [12:20] stagas: jarek: then you just insert this before connect.static: rewrite(function(url) { if (url[url.length-1] == '/') url += 'index.xhtml'; return url }) [12:24] shaunau: stagas: bug? https://github.com/stagas/express-helpful/blob/master/helpful.js#L399-400 [12:24] tmedema: shaunau: why? the language used is not related to the layout of the application [12:24] stagas: shaunau: the whole repo is a bug :P [12:24] tmedema: even if you put literal text in your layout/views most of it will be formatting and elements [12:24] shaunau: stagas: haha [12:25] shaunau: tmedema: depends what your trying to do really. If you dont want dynamic everything, form field names etc. then the approach i eluded to above is common. [12:26] shaunau: tmedema: sounds like you want realtime xlation. [12:28] jarek: stagas: awesome, it works now :) [12:28] shaunau: tmedema: i doubt that'll work very well, but i dunno. Prob. depends on which langs your're trying to support. [12:28] tmedema: shaunau: I could do somethng like require('trans')("hello", "nl") which would translate the hello string to dutch, but that doesn't seem efficient at all as you'd need all strings of the entire application in one big source file [12:28] jarek: stagas: the only problem is that browser treats it as an XML document: http://pics.kiwi-themes.com/580.png [12:29] shaunau: tmedema: yeah. and some languages are right-to-left so your layout's not right. [12:29] tmedema: shaunau: right-to-left? [12:29] shaunau: yep. the direction the text is read by the user. [12:30] piscisaureus has joined the channel [12:31] tmedema: shaunau: so it would need to contain variables, eg. require('trans')("welcome %USER_NAME%", "cn") [12:31] stagas: jarek: what does the response say as content-type ? [12:32] shaunau: tmedema: probably [12:32] tmedema: shaunau: nothing like that has been attempted before? [12:32] jarek: stagas: http://pics.kiwi-themes.com/581.png [12:32] jarek: stagas: no... those are request headers... [12:33] shaunau: username might already be in dutch so what would that mean for the translator? i dunno. would it "know" that word 3 is already dutch? [12:33] mscdex: JimBastard: were you wanting xml to json or the other way around? [12:34] tmedema: shaunau: eh, it's a name.. [12:34] shaunau: tmedema: i dont know. i have seen the way i described done before. but i havent seen it done the way you're approaching it. [12:34] tmedema: shaunau: your way was to duplicate the entire set of views and replace literal strings, right? [12:34] shaunau: tmedema: yep [12:35] shaunau: not pleasant. [12:35] JimBastard: mscdex: sorry, JSON 2 XML [12:35] tmedema: indeed, I will look at how other bigger platforms have approached this issue [12:35] shaunau: tmedema: its the only way i [12:35] shaunau: *i've seen it done. [12:35] tmedema: shaunau: did you ever code for android? [12:35] shaunau: doesn't mean its the best way though [12:35] shaunau: no, only iOS. [12:35] MuzzleFork has joined the channel [12:35] tmedema: alright well android has a simple strings.xml file for every language [12:36] shaunau: i see. [12:36] anonymous has joined the channel [12:36] shaunau: seems reasonable. [12:36] jarek: stagas: I have just checked the server with Firebug, the response headers looks correct ("application/xhtml+xml") [12:37] jarek: not sure why browser decided to render it as pure XML [12:37] sreeix has joined the channel [12:37] mscdex: JimBastard: i bet the reason you don't see any json to xml modules is that they would be dependent on the structure of the json (location of attributes, etc) [12:37] jarek: http://pics.kiwi-themes.com/582.png [12:37] hij1nx has joined the channel [12:37] stagas: jarek: maybe you need to declare it in the tag as well http://en.wikipedia.org/wiki/XHTML#Root_element [12:37] JimBastard: mscdex: i dont see why you cant just do a straight mapping [12:38] hvgotcodes has joined the channel [12:39] mscdex: JimBastard: how would you expect to create xml attributes from json? [12:39] jarek: stagas: namespace... [12:39] stagas: jarek: works now? [12:39] JimBastard: mscdex: don't? [12:39] jarek: stagas: you are right, I forgot to add this to html element xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" [12:39] mscdex: heh [12:39] jarek: stagas: yes, it work perfectly now [12:39] stagas: jarek: :D [12:40] jarek: stagas: thanks for all your help, it would take me days to figure out those things myself [12:40] JimBastard: mscdex: you could detect if you were at the "bottom" of the JSON object, i.e. no children [12:40] mscdex: JimBastard: and what about children? [12:40] jarek: s/work/works [12:40] mscdex: JimBastard: would you look for a 'children' property or ? [12:40] JimBastard: mscdex: i bet i could come up with a basic mapping rules that would cover all cases. it might not be the most awesome XML, but it would be valid and understandable [12:43] stagas: jarek: np [12:43] broofa has joined the channel [12:44] mscdex: node needs a gopher module! [12:44] mscdex: :-D [12:49] seivan has joined the channel [12:52] sor3nsen has joined the channel [12:53] stagas: and a lynx clone! it's 90s again! :P [12:53] tmedema: http://stackoverflow.com/questions/5611808/designing-an-international-translation-language-adapter-for-global-applications [12:53] mscdex: stagas: we've got an ncurses binding, get to it! [12:53] mscdex: ;) [12:54] mscdex: i think nntp is next on my list [13:00] jarek_ has joined the channel [13:01] jarek_: it would be awesome if I could do "require('./style.css');" in Browsify [13:02] ardcore1 has joined the channel [13:12] kriszyp has joined the channel [13:16] V1: Any jade ninjas here? [13:18] V1: Im trying to add a dynamically generated src to a image tag.. but img(src="#(src)") doesn't really work [13:18] DTrejo has joined the channel [13:19] shiawuen has joined the channel [13:21] max_dev has joined the channel [13:21] sugardave has joined the channel [13:23] hij1nx has joined the channel [13:24] patcito has joined the channel [13:24] astropirate: what does require.paths.unshift() do? [13:25] tob1 has joined the channel [13:25] stagas: V1: it's js in there: img(src=src) or img(src: src) [13:25] tob1 has left the channel [13:26] tmedema: V1: try #{src} [13:26] V1: that gave an error tmedema [13:26] shiawuen has joined the channel [13:26] tmedema: V1: ah well stagas has the answer [13:26] stagas: I like the 2nd way better because it's clearer that it's js [13:26] V1: stagas: thanks img(src=src) workded [13:27] V1: worked* [13:27] tmedema: stagas: why is that clearer with : ? [13:28] stagas: for no reason :P [13:29] V1: Now I finally have a proper output for my cluster module \o/ [13:32] tmedema: stagas: ah that makes sense =) [13:36] flat_ has joined the channel [13:39] stiang has joined the channel [13:40] er1c_ has joined the channel [13:41] timmywil has joined the channel [13:42] |sWORDs|: any one here with some experience with step.js? [13:43] stiang: how can I render something to a string in express, using EJS as the view engine? [13:45] XaKBooT has joined the channel [13:46] ncb000gt has joined the channel [13:48] shaunau: stiang: maybe have a look at the tests see if/how they do it? [13:48] tmedema: Could anyone give an intelligent guess (to the extent of how intelligent a guess can be) on howmany node developers use coffeescript? [13:49] ncb000gt: tmedema: it's enough that i have to learn it for my projects [13:49] ncb000gt: because i'm having to fix/patch other projects code [13:50] flippyhead has joined the channel [13:50] tmedema: ncb000gt: alright, so I'm going to assume that it is worth looking into then. I used to use haXe before (it also compiled to javascript) [13:50] tmedema: although I am getting used to pure javascript now and so far have not faced huge problems yet [13:51] JimBastard has joined the channel [13:51] ncb000gt: i prefer pure JS to the other abstractions [13:51] ncb000gt: but that's a personal preference [13:52] tmedema: ncb000gt: so far I have to agree with you, now that I use pure javascript I can use libraries way easier and it's a blast [13:52] ncb000gt: :) [13:52] tmedema: with haXe I had to create strictly typed bindings for every library [13:52] ncb000gt: /puke [13:52] tmedema: ncb000gt: well I loved the strictly typed feature [13:52] rfay has joined the channel [13:52] tmedema: (I realize how geeky that sounds) [13:52] ncb000gt: to each their own [13:53] gattuso has joined the channel [13:53] tmedema: :) [13:53] suckerpunch has joined the channel [13:54] jarek_: is it hard to debug coffeescript scripts? [13:54] jarek_: or perhaps I should ask - is it easier to debug than js? [13:55] |sWORDs|: When using step how can I pass extra objects (besides this) to the next function? My first function fetches Name and Id from Customers, the second function fetches Debts from Debt with a for each clause on Customers.Id. But the third function needs both Name and Debt. [13:57] |sWORDs|: I'm trying not to nest anything, but when using a .forEach it doesn't seem possible with Step.js. [13:59] er1c_ has joined the channel [14:01] xandrews has joined the channel [14:01] bradleymeck has joined the channel [14:03] onr has joined the channel [14:04] bcelenza has joined the channel [14:04] kriszyp has joined the channel [14:04] KRTac has joined the channel [14:05] KRTac: morning [14:05] xandrews has joined the channel [14:05] KRTac: i tryed to compile node.js and the compiler crashed [14:06] KRTac: ../src/node.cc: In function ‘int node::Start(int, char**)’: [14:06] KRTac: ../src/node.cc:2250:5: internal compiler error: Segmentation fault [14:06] ptimothyp has joined the channel [14:11] |sWORDs|: sample with and without step of my above mentioned issue: http://pastebin.com/SvF8mgR4 [14:11] ncb000gt: KRTac: which version are you trying to compile? [14:11] ncb000gt: |sWORDs|: no idea, sorry [14:12] |sWORDs|: ncb000gt, no problem. Tnx for looking! [14:14] |sWORDs|: In how many hours will most americans be active here? (6 hours?) [14:15] ncb000gt: |sWORDs|: mmm depends really, but it's 10AM here (East Coast) [14:15] unomi has joined the channel [14:16] ncb000gt: so if I had nothing else to do, possibly 6-10 hours... [14:16] ncb000gt: but that seems unlikely [14:16] shaunau: sWORDs: are those Database.query calls right? [14:16] broofa has joined the channel [14:16] ncb000gt: |sWORDs|: 6 hours is probably accurate but scattered through the day [14:16] |sWORDs|: shaunau, yeah, that's mysql-node from felix [14:16] Stan____ has left the channel [14:16] shaunau: specifically the callbacks.. [14:16] zalez has joined the channel [14:17] zalez has left the channel [14:18] |sWORDs|: It's just a small chunk of my spaghetti, which got so hard to maintain that I'm trying to remove all nesting with step.js. [14:19] |sWORDs|: shanau: Sorry, I miss read that question. Yes they are right, they actually work. What doesn't work is using values set in the previous function. [14:21] |sWORDs|: in dbParseQueryCustomers I can acces customer.Name, but in parseDebt I no longer have that, but the results do have the debts data. [14:22] sub_pop has joined the channel [14:22] |sWORDs|: The question is how I pass along customer.Name to the next function. [14:22] jeffecu88 has joined the channel [14:22] dylang has joined the channel [14:25] KRTac: ncb000gt: 0.4.5 [14:26] |sWORDs|: Maybe I should create an object and fill part by part with each function. [14:27] |sWORDs|: But then I'd still wouldn't know how many items are actually in there, and it might be have funny because some queries are performed in parallel. [14:28] H4ns has joined the channel [14:28] |sWORDs|: And I wouldn't know which debt belongs to which customer after the second query... [14:28] pc1oad1etter has joined the channel [14:30] ncb000gt: KRTac: which os? [14:31] KRTac: ncb000gt: archlinux [14:32] ncb000gt: hmm. i know there are at least a few people here using arch with 0.4.5 [14:33] Croms has joined the channel [14:33] ncb000gt: i wonder if they ran into problems [14:33] ncb000gt: =\ [14:33] Aria has joined the channel [14:34] KRTac: ncb000gt: dunno...i tryed to compile it on my homeserver and it segfaulted (the compiler), but on my personal computer it compiled fine [14:34] KRTac: will try it again on the server [14:34] ncb000gt: o.0 [14:34] ncb000gt: what is the difference there? [14:35] ncb000gt: if anything? [14:35] KRTac: dunno [14:35] ncb000gt: which versions of arch are being run? [14:35] bradleymeck has joined the channel [14:35] KRTac: the latest packages [14:35] KRTac: it's a rolling relese [14:35] ncb000gt: i thought so [14:36] ncb000gt: I haven't used arch so i wont be much help with debugging the arch side, just trying to come up with anything that might be an issue [14:36] ncb000gt: more of a brick wall [14:36] KRTac: thanks for the effort [14:36] bradleymeck has joined the channel [14:36] KRTac: i'll try to compile it again [14:36] ohtogo has joined the channel [14:37] KRTac: btw, why does it say that it can't find openssl, when i have it installed? [14:37] ncb000gt: where are the headers/libs? [14:37] ncb000gt: node has a few paths it checks [14:38] Croms: KRTac: Install pkg-config. [14:38] TooTallNate has joined the channel [14:39] KRTac: the headers are in /usr/include/openssl/ [14:40] V1: LOL why are there hamsters dancing on my screen [14:40] V1: whoops wrong channel [14:40] V1: lol [14:40] KRTac: lol [14:40] ncb000gt: V1: ummm [14:40] ncb000gt: less tequila [14:40] V1: ncb000gt: :$ [14:40] ncb000gt: V1: you're right...i should never say that [14:40] ncb000gt: just drink more and embrace them [14:41] sor3nsen: out of curiosity, how many of you visit 4chan? [14:42] KRTac: Croms: thanks...openssl is now detected [14:42] sor3nsen: something about dancing hamsters [14:42] Croms: ^_^ [14:42] kriszyp has joined the channel [14:42] |sWORDs|: Did anyone ever use https://github.com/tmpvar/conductor ? [14:42] mraleph has joined the channel [14:44] Vertice has joined the channel [14:45] |sWORDs|: If no one is using step or conducter what do you use? Nesting? [14:45] ncb000gt: I don't. [14:46] copenhas has joined the channel [14:47] Croms has joined the channel [14:47] failer has joined the channel [14:48] shaunau: sWORDs: i just name my functions and put them in the scope, but not nested in the function call [14:48] postwait has joined the channel [14:49] failer: hello! i ve problems with my pathes (and interpreter) [14:49] failer: can anybody help me? [14:49] tbranyen: failer: just ask [14:50] tbranyen: its not like we have 1:1 help here, if you ask and someone knows they'll answer :) [14:50] |sWORDs|: shanau: If I understand correctly the code (of the callback functions) isn't nested but all calls will still be nested? [14:50] bradleymeck: |sWORDs| i pull out call that dont need nesting [14:50] bradleymeck: calls* [14:50] failer: i installed node (https://github.com/joyent/node/wiki/Installation) with export PATH=$HOME/local/node/bin:$PATH and when i try to run a script it fails [14:50] jeffecu88 has left the channel [14:50] JimBastard has joined the channel [14:51] |sWORDs|: failer: Which platform and did you configure and build node? [14:51] failer: ubuntu [14:52] bradleymeck has left the channel [14:52] failer: i got my bin under ~/local and the script is looking for /usr/local/bin/node [14:54] failer: any ideas? [14:54] Croms has joined the channel [14:54] |sWORDs|: I'm not sure, never did it like that, I normally copy my scripts to the lib folder ./configure, then make and copy the binary to the location where I want it and add a small script that requires my scripts [14:55] |sWORDs|: Never actually used make install [14:55] |sWORDs|: but the binary file is all you need [14:55] failer: okay, so your binaries are located at /usr/local/bin [14:56] |sWORDs|: No, I don't install it, I just copy the binary to /share/MD0_DATA/Controller and start it from there as a deamon [14:57] failer: so i change my scripts .. [14:57] failer: thx [14:57] failer has left the channel [14:57] |sWORDs|: Or copy the binary to the path it expects it. It's just a single binary. [14:59] Twelve-60` has joined the channel [15:00] MMZ has joined the channel [15:03] wereHamster: can I pass options to node-waf through the environment? [15:03] FireFly|n900 has joined the channel [15:04] xla has joined the channel [15:05] graysky has joined the channel [15:05] |sWORDs|: wereHamster: Not sure, I've added conf.env.append_value('LINKFLAGS', '/opt/lib/libpthread_nonshared.a') to wscript [15:05] RusAlex has joined the channel [15:05] flippyhead has joined the channel [15:05] RusAlex has left the channel [15:06] ardcore has left the channel [15:10] ji0n has joined the channel [15:11] esundahl has joined the channel [15:12] MarkMenard has joined the channel [15:17] click_click has joined the channel [15:18] hvgotcodes: any vows users can tell me why using the --json and --spec flags are not changing the format of the output? [15:21] idefine has joined the channel [15:21] bingomanatee has joined the channel [15:22] ph^ has joined the channel [15:23] unomi has joined the channel [15:24] skiz has joined the channel [15:25] Nican has joined the channel [15:25] dnolen has joined the channel [15:26] astropirate has joined the channel [15:26] Astro has joined the channel [15:26] astropirate: This is odd.. why is assert.AssertionError not in the documentation? is it being phased out or something? [15:27] c4milo1 has joined the channel [15:27] flat has joined the channel [15:27] flat has joined the channel [15:29] tmedema: Has anyone been using the 960 grid system to design a layout with Jade? http://960.gs/ [15:29] tmedema: Or anything similar? I'm not a designer but this seems like the easiest way to make something look fancy and web 2.0ish [15:30] wereHamster: |sWORDs|: apparently node-waf already supports a JOBS env. variable. Which is good :) [15:32] mikeal1 has joined the channel [15:32] Country has joined the channel [15:35] Remoun has joined the channel [15:35] akashiraffee has joined the channel [15:36] josh_ has joined the channel [15:36] akashiraffee: Is there any html entity encode/decode in node (inc. connect & express)? [15:37] Croms: tmedema: Adaptive layouts are definitely a part of the future in web design. [15:38] sirkitree has joined the channel [15:38] tmedema: Croms: I believe there is a fluid (Adaptive) 960 variant as well [15:39] coreb has joined the channel [15:39] tmedema: or elastic, not sure about the difference [15:41] Croms: tmedema: Yeah, I think you mean 978.gs. I prefer 960 though. [15:41] objectiveous has joined the channel [15:41] Croms: Nice round numbers. [15:42] tmedema: Croms: http://www.designinfluences.com/fluid960gs/ [15:42] Croms: It's nothing more than a bit of JS listening for changes in window size. [15:43] tmedema: Alright, well that's not a problem for me. I guess I need to hire a proper designer though [15:44] baudehlo has joined the channel [15:47] TooTallNate has joined the channel [15:47] Croms: Shouldn't be too difficult implementing it I guess. Making it look good is a whole different ball game. [15:48] throughnothing has joined the channel [15:49] dve has joined the channel [15:50] k1ttty has joined the channel [15:51] pita has joined the channel [15:51] charlenopires has joined the channel [15:52] pita: I have a problem with npm. I run "npm install nstore" and tried a "require('nstore')" in a script, but it fails. I installed other packages successfully with npm before and they are still working. It seems like this is the only package it doesn't like [15:53] davidwalsh has joined the channel [15:53] pita: can anyone help me please? [15:53] charlenopires has joined the channel [15:54] DTrejo has joined the channel [15:55] mike5w3c_ has joined the channel [15:57] xandy has joined the channel [15:58] fangel has joined the channel [15:58] tobym has joined the channel [15:59] n00dles has joined the channel [16:00] n00dles has left the channel [16:01] dsirijus has joined the channel [16:05] SvenDowideit_ has joined the channel [16:06] xtian: pita: https://github.com/creationix/nstore/issues/18 [16:06] zakabird has joined the channel [16:07] hij1nx has joined the channel [16:08] dve has joined the channel [16:10] meder has joined the channel [16:10] steph021 has joined the channel [16:10] johnmclear has joined the channel [16:10] davidwalsh has joined the channel [16:10] Astro has joined the channel [16:10] Nican has joined the channel [16:10] patzak has joined the channel [16:10] nefD has joined the channel [16:10] mscdex has joined the channel [16:10] gbot2 has joined the channel [16:10] jspiros has joined the channel [16:10] hucker has joined the channel [16:10] nail__ has joined the channel [16:10] daleharvey has joined the channel [16:10] ivan_ has joined the channel [16:10] justis has joined the channel [16:10] oscarkilhed has joined the channel [16:10] mikey_p has joined the channel [16:10] Leonidas has joined the channel [16:10] konobi has joined the channel [16:10] Sami_ZzZ__ has joined the channel [16:10] oninoshiko has joined the channel [16:10] lstoll has joined the channel [16:10] Connorhd has joined the channel [16:10] pquerna has joined the channel [16:10] mnbvasd has joined the channel [16:11] ddollar has joined the channel [16:12] ybit has joined the channel [16:15] tobym has joined the channel [16:15] ralphholzmann has joined the channel [16:18] jarek has joined the channel [16:18] jarek has joined the channel [16:18] AAA_awright_ has joined the channel [16:18] pita: xtian: thx, any idea how to solve this issue? [16:20] dve: is it possible to use eval in node.js? [16:20] mc_greeny has joined the channel [16:21] whoops has joined the channel [16:21] jtsnow has joined the channel [16:21] mynyml has joined the channel [16:21] bengl has joined the channel [16:22] nibblebot_ny has joined the channel [16:23] roger_raymond has joined the channel [16:23] matyr_ has joined the channel [16:24] Promethet has joined the channel [16:24] maushu has joined the channel [16:24] Me1000 has joined the channel [16:24] Twelve-60` has joined the channel [16:25] jtsnow has joined the channel [16:25] harth has joined the channel [16:26] click_ has joined the channel [16:26] halfhalo_ has joined the channel [16:27] sstreza has joined the channel [16:27] keeto has joined the channel [16:27] zakabird: dve: look at http://nodejs.org/docs/v0.4.5/api/vm.html [16:27] dambalah has joined the channel [16:27] freeformz has joined the channel [16:27] inarru has joined the channel [16:27] iFire has joined the channel [16:27] jetienne has joined the channel [16:27] Pilate has joined the channel [16:28] Aikar: this sucks [16:28] Aikar: almost done with this lib but the msgpack library has a bug in it or else insuffecient documentation :/ [16:28] xtianw: pita: nope, haha [16:28] johnmclear: Can anyone get nStore to run/work? We can't ;/ [16:30] zakabird: dve: you can use eval, that link discusses sanboxing using vm as well [16:31] c4milo1 has joined the channel [16:31] fteem has joined the channel [16:32] scoates has joined the channel [16:32] fteem: hi guys, I'm really interested in learning node. Can anyone recommend me a good tutorial/book? [16:33] Aikar: i hope noones wrote a book for node [16:33] Aikar: node is changing way too much right now [16:33] ivan has joined the channel [16:35] fr0stbyt3r has joined the channel [16:35] mytrile: fteem: http://nodeguide.com/, http://visionmedia.github.com/masteringnode/, http://howtonode.org/ [16:36] mytrile: fteem: The api doc is pretty extensive, you should start from there [16:36] fteem: thanks mytrile :> [16:37] coreb has joined the channel [16:37] Arenstar has joined the channel [16:37] pekim has joined the channel [16:37] postwait has joined the channel [16:37] Phunky has joined the channel [16:37] gf3 has joined the channel [16:38] hij1nx has joined the channel [16:38] shiawuen has joined the channel [16:38] mgodinho has joined the channel [16:38] larsemil has joined the channel [16:39] PhilK has joined the channel [16:39] hkeric has joined the channel [16:40] blueadept has joined the channel [16:40] matyr has joined the channel [16:40] timmywil has joined the channel [16:41] skiz has joined the channel [16:41] Viper-7 has joined the channel [16:41] mytrile: fteem: we're welcome :) [16:42] fljitovak has joined the channel [16:43] hasokeric has joined the channel [16:43] midjar has joined the channel [16:43] midjar: Hi! [16:43] jakehow has joined the channel [16:44] wookiehangover has joined the channel [16:45] onr has left the channel [16:46] nibblebot has joined the channel [16:46] broofa has joined the channel [16:49] losing has joined the channel [16:51] galaxywatcher has joined the channel [16:52] mike5w3c has joined the channel [16:53] fr0stbyte has joined the channel [16:53] matyr has joined the channel [16:54] c4milo1 has joined the channel [16:56] dve: zakabird: gracias! [16:56] Croms has joined the channel [16:57] bergie has joined the channel [16:58] zakabird: ACTION googling up a translation [16:58] zakabird: le invitamos! [16:59] CIDIC has joined the channel [16:59] mAritz has joined the channel [16:59] prettyrobots: Can someone suggest a library to study to understand pumpable streams? [16:59] prettyrobots: I'm going to make a tar archive parser and I want it to pump the output. [17:00] V1: another tar parser? [17:00] bingomanatee: Aikar: while it is true there is a lot of development happening in Node you can always freeze a given project to a version of node that you started with and in the context of that project establish a consistent codebase. Esp. now that npm is project-aware. [17:00] CIDIC: whenever I try to use npm I get error parsing json syntaxerror unexpected end of input [17:00] bingomanatee: CDIC: what version of windows are you using? [17:00] CIDIC: os x [17:00] bingomanatee: ah. [17:00] CIDIC: 10.6 [17:01] CIDIC: any suggestions? [17:01] bingomanatee: when did you install node/npm? [17:01] CIDIC: last night [17:01] c4milo1 has left the channel [17:01] bingomanatee: hm. [17:01] bingomanatee: isaacs: ping [17:01] CIDIC: says npm 0.3.17 [17:02] CIDIC: I assume thats the version [17:02] esundahl has joined the channel [17:02] bingomanatee: yes - I would look for Isaacs - npm is his product. [17:02] Stan____ has joined the channel [17:02] CIDIC: there isn't an npm chanel is there [17:02] CIDIC: ? [17:03] bingomanatee: no. [17:03] bingomanatee: You're at the right place, just Sunday might not be the best day to get the right people : D [17:03] Kingdutch has joined the channel [17:03] mikey_p has joined the channel [17:03] mikey_p has joined the channel [17:04] CIDIC: so the irc chanel usually is the best place for help? [17:04] bingomanatee: absolutely. [17:04] CIDIC: good [17:04] CIDIC: :) [17:04] tbranyen: lazy sunday [17:04] bingomanatee: You can put issues on the git repo for npm as well if you want to post your solution but that will drag out for a while as they ask for diagnostic detail. [17:04] bingomanatee: Searching issues on the node git might solve your probelm too... [17:05] CIDIC: I have [17:05] Connorhd has joined the channel [17:05] lstoll has joined the channel [17:06] robhawkes has joined the channel [17:06] krazyivan has joined the channel [17:06] sirkitree has joined the channel [17:06] kawaz_wo_ has joined the channel [17:10] raphdg_ has joined the channel [17:10] izz has joined the channel [17:10] bentkus_ has joined the channel [17:10] ljounce has joined the channel [17:11] figital has joined the channel [17:11] Nacho__ has joined the channel [17:11] plexorama has joined the channel [17:11] stagas has joined the channel [17:11] maushu_ has joined the channel [17:12] Draggor has joined the channel [17:12] ljackson has joined the channel [17:12] btipling has joined the channel [17:12] ajpiano has joined the channel [17:13] moneal has joined the channel [17:13] SubStack has joined the channel [17:13] devrim has joined the channel [17:13] mikey_p has joined the channel [17:14] sivy has joined the channel [17:14] halfhalo_ has joined the channel [17:15] halfhalo has joined the channel [17:15] Phunky has joined the channel [17:15] meder has joined the channel [17:15] mikey_p has joined the channel [17:16] d0k has joined the channel [17:17] hvgotcodes has joined the channel [17:17] bartt has joined the channel [17:17] liquidproof has joined the channel [17:17] inarru has joined the channel [17:17] sstreza has joined the channel [17:18] ncb000gt has joined the channel [17:18] willwhite has joined the channel [17:19] unlink has joined the channel [17:19] unlink has joined the channel [17:19] MikhX has joined the channel [17:20] bingomanatee: do you get this error on all modules or a particular one? [17:20] mikeal has joined the channel [17:20] Sami_ZzZ__ has joined the channel [17:21] lstoll has joined the channel [17:22] coreb has joined the channel [17:24] bnoguchi has joined the channel [17:24] skohorn has joined the channel [17:32] crodas has joined the channel [17:32] jimt has joined the channel [17:32] hij1nx has joined the channel [17:32] maushu__ has joined the channel [17:32] fr0stbyte_ has joined the channel [17:34] shiawuen has joined the channel [17:34] Guest20280 has joined the channel [17:34] shiawuen_ has joined the channel [17:35] tokumine has joined the channel [17:35] tobym has joined the channel [17:35] boaz has joined the channel [17:39] brianmario has joined the channel [17:40] Eber has joined the channel [17:40] jeff_horton has joined the channel [17:40] Eber: Right now I have a PHP project... It's kind of big, it's written on PHP with CakePHP... Would it be crazy to try re-writing it on JavaScript to run on node? If not, what should I use? Express? [17:41] jzaefferer has joined the channel [17:42] skohorn has joined the channel [17:42] sako has joined the channel [17:42] marcello3d has joined the channel [17:42] ncb000gt: Eber: calling it crazy would depend on whether or not you are crazy already... [17:43] Sami_ZzZ__ has joined the channel [17:43] gazumps has joined the channel [17:43] Eber: ncb000gt: makes sense... [17:43] marcello3d: has anyone done anything with node.js + pjax? [17:43] click__ has joined the channel [17:43] marcello3d: (possibly with express [17:43] Eber: ncb000gt: let'sw consider I'm not... [17:43] matyr_ has joined the channel [17:43] ncb000gt: Eber: proof? [17:43] ncb000gt: :) [17:43] ncb000gt: ;D [17:43] Eber: ncb000gt: I make real money on the web :P [17:43] ncb000gt: Eber: proof? [17:43] ncb000gt: I'll accept checks [17:44] Eber: ncb000gt: www.tanlup.com [17:44] ncb000gt: the only proof of money is to see it [17:44] Eber: ncb000gt: Sorry... I can't provide that to you, mainly because I'm from Brazil... [17:44] marcello3d: brasiling etsy? [17:44] marcello3d: *brasilian [17:44] sako: is Express the best framework for node.js? [17:45] ncb000gt: looks it [17:45] ncb000gt: sako: depends on your preferences [17:45] marcello3d: I like the design [17:45] ncb000gt: sako: there is Geddy, Express, Stack, and a few others [17:45] sako: i see [17:45] sako: what is fab? [17:45] marcello3d: sako: nithub says yes: http://2.no.de/#tag_framework [17:45] dxld has joined the channel [17:45] sako: is that a framework too? [17:45] ncb000gt: Eber: I wouldn't say you'd be crazy to, but you could at least invest some time to check it out [17:46] ncb000gt: make sure you have a business case for doing so though [17:46] Eber: marcello3d: we got some inspiration from there ;) yes... [17:46] ncb000gt: lol [17:46] coreb: ncb000gt: but which framework is catching on? [17:46] marcello3d: weird, the site doesn't work with google translate [17:46] Eber: ncb000gt: right :) I do like CoffeeScript syntax, I wish I could write erything with it... [17:47] marcello3d: rather, most of it doesn't get translated [17:47] ncb000gt: coreb: Express is the biggest framework [17:47] jeffmoss: bah, frameworks aren't necessary, just start writing a request handler [17:47] dgdo has joined the channel [17:47] ncb000gt: biggest in terms of people using/watching [17:47] marcello3d: probably cufon's fault [17:47] coreb: ncb000gt: alright [17:47] ncb000gt: jeffmoss: it's not required but it sure takes care of a lot of headaches [17:47] mytrile has joined the channel [17:47] marcello3d: express.js is good if you're writing a more standard site/web app [17:47] jeffmoss: it also adds a layer of slowness [17:47] coreb: how is the node.js community catching on as compared to ror and django? [17:47] ncb000gt: Eber: heh, i'm not a fan of coffee-script [17:47] ncb000gt: but it's a personal preference [17:48] marcello3d: if you're doing something custom, it isn't necessary [17:48] ncb000gt: to each their own [17:48] Eber: ncb000gt: sure :) [17:48] ncb000gt: jeffmoss: right...and it's been tested and tried, so you can write your code that hasn't, recreate the problems that have been worked out, and waste time and dev reinventing the wheel [17:48] marcello3d: a shorthand for function() { return } would be nice :) the rest of coffeescript isn't a big draw for me [17:49] tbranyen: coreb: its not really comparable to django or ror [17:49] tbranyen: imo [17:49] ncb000gt: jeffmoss: if it were slow people wouldn't use it [17:49] tbranyen: its more low level [17:49] jeffmoss: if you're just starting out with node try using apache bench and just look at what you're doing to your app when you download "rails in node" [17:49] marcello3d: tbranyen: it's comparable to rack/twisted, though, right? [17:49] tbranyen: marcello3d: i've never used either so i have no idea [17:49] tbranyen: i think they use similar evented concepts [17:50] marcello3d: http://rack.rubyforge.org/ [17:50] marcello3d: http://twistedmatrix.com/trac/ [17:50] tbranyen: marcello3d: if you want to know if they compare, better off googling for articles written on that topic [17:50] marcello3d: you could build the equivalent of ror or django on top of node.js, though [17:51] tbranyen: so? that doesn't mean they are comparable [17:51] coreb: tbranyen: yeah, but it seems people are making the switch from ie django to node.js [17:51] marcello3d: I'm not saying they're comparable as-is [17:51] tbranyen: coreb: ya i for one am [17:51] matyr has joined the channel [17:51] marcello3d: just adding some context :) [17:51] marcello3d: they're indirectly comparable [17:51] marcello3d: in the sense that you could use either to achieve the same goal and you wouldn't be totally crazy [17:51] perezd has joined the channel [17:52] coreb: tbranyen: what are your main reasons for doing so? [17:52] tbranyen: coreb: projects rarely fit the scope that django defines for you [17:52] jeffmoss: my favorite is the big huge bloated regex parser called "routing" that everyone seems to want to attach to the front of their app [17:52] Croms has joined the channel [17:53] coreb: tbranyen: considered pyramid? [17:53] marcello3d: jeffmoss: bitter much? regexp is fast :) [17:53] ncb000gt: haha [17:53] jeffmoss: you know what's even faster? String comparison [17:53] tbranyen: coreb: nope its been recommended tho [17:53] ncb000gt: string comparison doesn't fit every need [17:54] marcello3d: string comparison doesn't help with dynamic urls [17:54] jeffmoss: /i/am/trying/to/make/this/easy/for/you [17:54] marcello3d: compiled regexp is going to be comparable to string comparison [17:54] marcello3d: and probably faster if you start doing string inspection [17:55] jeffmoss: probably, maybe, sometimes... but have you ever looked what you're getting with the "routing" ? [17:55] marcello3d: but that's premature optimization to even be thinking about that [17:55] kkaefer: I don't think that regexp routing is a major bottleneck in most apps [17:55] marcello3d: you're clearly focusing on the wrong problems if you have issue with using regexp for routing [17:56] jeffmoss: well, to each his own, I'm trying to avoid the rails phenomenon... it occurred to me just how simple the apps are that don't use a framework [17:57] mgodinho has left the channel [17:57] ncb000gt: jeffmoss: it's true, if your app is simple you don't _need_ a framework [17:57] marcello3d: connect isn't that complex [17:57] jeffmoss: connect is probably a better choice, in my opinion [17:58] marcello3d: express is connect [17:58] ncb000gt: but apps aren't always simple, in that case you'll either spend your time building a framework or using one [17:58] ncb000gt: express just adds to connect [18:00] deebo: anyone using npm/node on solaris, npm seems wonky [18:01] deebo: http://pastebin.com/JnbYQWGb for example [18:02] dxld has left the channel [18:02] deebo: guess its kind of self explanatory but still, no man pages [18:02] marcello3d: deebo: post on the npm mailing list [18:02] marcello3d: or npm github issues? [18:02] sh1mmer has joined the channel [18:02] johnfn has joined the channel [18:02] marcello3d: oh snap, the error message says that already D: [18:03] rezachez has joined the channel [18:03] mytrile has joined the channel [18:03] deebo: just no idea how to use npm since i cant open any of the helps since it uses man and didnt install them or didnt install them porperly :) [18:05] rezachez: build failed: -> task failed (err #-1): {task: cc eio.c -> eio_1.o} [18:05] rezachez: cygwin setup [18:08] mape: Anyone used SPDY with node? [18:09] johnmclear has left the channel [18:09] dabtop has joined the channel [18:10] andi5 has joined the channel [18:10] NuckingFuts has joined the channel [18:10] abraham has joined the channel [18:11] ryan0x2 has joined the channel [18:11] dgathright has joined the channel [18:12] jimt_ has joined the channel [18:13] xandrews has joined the channel [18:14] tobym has joined the channel [18:14] micheil: mape: it's being worked on. [18:14] mape: By? [18:15] micheil: see the conversation at around this time yesterday [18:15] mape: k [18:15] micheil: I think pquerna and a few others were involved. [18:16] jetienne: V1 and aika expresses interest in coding it [18:17] jetienne: expressed [18:17] Kingdutch has joined the channel [18:17] hornairs has joined the channel [18:17] V1: yup [18:18] brianmario has joined the channel [18:19] aleksey has joined the channel [18:20] V1: If we are lucky we can just use HTTP parser that node is already using.. [18:20] V1: *crosses fingers* [18:20] metadaddy has joined the channel [18:20] willwhite has joined the channel [18:20] herbySk has joined the channel [18:20] [ok] has joined the channel [18:20] samcday_away has joined the channel [18:21] Charuru has joined the channel [18:21] mikey_p has joined the channel [18:21] _sri has joined the channel [18:21] kristsk has joined the channel [18:21] mape: Would be really neat, besides the fact one would have to drop nginx infront no? [18:21] blueadept has joined the channel [18:22] kristsk has joined the channel [18:22] deebo: mm node from git seems to use /usr/local/lib/node but npm uses /usr/local/lib/node_modules [18:22] figital has joined the channel [18:23] ryan0x2 has joined the channel [18:23] invi has joined the channel [18:24] ajpiano has joined the channel [18:24] [AD]Turbo has joined the channel [18:26] Viper-7 has joined the channel [18:26] mike_miller has joined the channel [18:27] groundup has joined the channel [18:27] sako has joined the channel [18:27] eveningsky2: I'm trying to follow a tutorial that uses require.registerExtension which is apparently deprecated and removed, but can't find documentation on require.extensions [18:27] matjas has joined the channel [18:27] xiackok has joined the channel [18:27] hij1nx has joined the channel [18:27] qbert_ has joined the channel [18:28] eveningsky2: is there somewhere I can look for even some minimal documentation on require.extensions? [18:29] jeffmoss: http://nodejs.org/docs/v0.4.5/api/all.html [18:29] liquidproof has joined the channel [18:29] micheil: see line 410 of HEAD:/lib/module.js [18:29] jeffmoss: http://nodejs.org/docs/v0.4.5/api/all.html#require [18:30] V1: mape: maybe.. I don't know if nginx needs to "parse" the responses it receives or proxies [18:30] eveningsky2: jeffmoss: thank you, but no mention of extensions there [18:30] hornairs has joined the channel [18:30] dnolen has joined the channel [18:30] micheil: jeffmoss: those are just on using require() and doesn't document extensions [18:31] micheil: eveningsky2: see 410 of HEAD:/lib/module.js [18:31] micheil: that's where the .js and .node extensions are registered. [18:33] jetienne: http://syntensity.blogspot.com/2011/04/emscripten-10.html llvm to js .... i want linux kernel in node :) [18:33] pdelgallego has joined the channel [18:33] jetienne: or better in a browser :) [18:33] qbert_: Id like to use just the mongo shell commands in my nodejs scripts but all I can find is the native driver here https://github.com/christkv/node-mongodb-native , is there a way to use mongo shell syntax ? [18:34] matyr_ has joined the channel [18:34] dab` has joined the channel [18:34] cha0s has joined the channel [18:34] cha0s has joined the channel [18:34] Rodtusker has joined the channel [18:35] micheil: jetienne: it sounds like GWT all over again. [18:35] cbibler has joined the channel [18:35] eveningsky2: micheil: thank you. I found it. Now I just gotta figure out what I'm supposed to do with that. [18:35] jetienne: micheil: hehe not far indeed :) [18:35] Me1000 has joined the channel [18:35] micheil: require.extensions[".myext"] = function(){} [18:36] micheil: iirc. [18:36] cbibler has joined the channel [18:37] micheil: https://github.com/jashkenas/coffee-script/blob/master/lib/coffee-script.js#L7-17 [18:38] eveningsky2: micheil: so if the function is already defined in another file, can I say require.extensions['.myext'] = require('./pathtofile').myfunction; ? [18:39] micheil: I guess, if it's a function [18:39] micheil: although, I wouldn't recommend having extra overhead there [18:42] maushu_ has joined the channel [18:44] beawesomeinstead has joined the channel [18:47] Aria has joined the channel [18:48] Phyllio has joined the channel [18:48] eveningsky2: micheil: well I'm not getting the results I'm expecting, but that part seems to be working. thanks [18:51] qbert_: Can someone point me in the right direction to why this isnt working http://pastebin.com/raZQM7vL , there is a user, if I just inspet there its cleary not null, however I'm aways getting a null returnd from this function [18:51] wookiehang0ver has joined the channel [18:52] sako: hey guys anyone read this? http://howtonode.org/redis-pubsub [18:52] Phunky has joined the channel [18:52] mikegerwitz: qbert_: if the operation is async, then getUser() will return ret before the callbacks are even called [18:52] sako: im wondering where the flight info is coming from [18:52] mikegerwitz: qbert_: Instead, you'll have to accept a callback and call that instead of ret = user [18:52] qbert_: mikegerwitz, ugh [18:53] sako: i want to find a flight status feed to make a similar app with node.js a flight status checker, wondering if anyone has any ideas of free ones out there? [18:53] wookiehang0ver has joined the channel [18:53] qbert_: mikegerwitz, thanks for letting me know that though, still wrapping my head around this asynch stuff [18:53] Croms has joined the channel [18:53] xiackok: hi everybody. how can i read my multipart-form data in express.js ?? [18:54] aho has joined the channel [18:55] omni5cience has joined the channel [18:56] Phunky: Anyone about whos using/used lightnode? [18:56] micheil: sako: that tutorial is pretty broken. [18:57] kuya_ has joined the channel [18:58] micheil: sako: you'd have to ask around, someone might have an api, but I doubt it. You'd probably have to pay substantially for that data. [18:59] NuckingFuts: We need a _why [19:00] NuckingFuts: Somebody make us a poignant guide C: [19:00] brianloveswords has joined the channel [19:00] coreb: micheil: how is your frustration with socket.io going? [19:01] micheil: coreb: I don't have a frustration with socket.io, just people telling me to use it. [19:01] DTrejo has joined the channel [19:01] CIDIC has joined the channel [19:01] micheil: it's like telling the developer of say redis to go use memcache. [19:01] NuckingFuts: My old code used no modules, so I generally don't use that many of those :B [19:02] micheil: NuckingFuts: see Beej's guides. [19:02] NuckingFuts: Only where neccessary, such as encryption or database stuff [19:02] perezd has joined the channel [19:02] micheil: coreb: I'm working on a generic websocket decoder / encoder module, who api can be found here: https://gist.github.com/912615 [19:03] jeffmoss: anybody know of any good queing libraries? I find I'm doing this quite often: var callbackCount = list.length; list.each.doSomething(function(){ callbackCount--; if(callbackCount == 0){ complete(); [19:03] micheil: NuckingFuts: http://beej.us/guide/bgc/ [19:03] NuckingFuts: micheil: No, I want an illustrated guide :( [19:03] jeffmoss: this works fine, but the problem is sometimes I want to wait, and sometimes I don't [19:03] micheil: jeffmoss: check the mailing list and npm, there's tonnes of them [19:03] jeffmoss: sometimes I want to wait at a different point in the app [19:03] jeffmoss: I have looked at one, called Next or Step or somethign [19:03] jeffmoss: didn't like the syntax at all though [19:04] micheil: NuckingFuts: oh, well, at any rate, texts by Beej are awesome. [19:04] micheil: jeffmoss: write your own then. [19:04] NuckingFuts: micheil: Go read why's poignant guide, it's actually quite epic, even though I dislike Ruby :B [19:04] micheil: jeffmoss: there's sort of things become pretty standard in the course of node.js development [19:04] jeffmoss: micheil: what, how I'm doing it? [19:05] CIDIC: whenever I try to use npm I get error parsing json syntaxerror unexpected end of input [19:05] CIDIC: any suggestions? [19:05] micheil: jeffmoss: you already know how to do things like waiting for N number of callbacks to complete before running another callback, so you just need to abstract that into a library [19:05] FireFly has joined the channel [19:06] jeffmoss: micheil: yeah my question was what're the good ones, what is everyone uses [19:06] jeffmoss: using [19:06] micheil: jeffmoss: like I said, most people write their own. [19:06] micheil: everyone has different needs here. [19:07] micheil: CIDIC: copy the whole error message (from the time you did `npm whatever` in your shell to the time you got control back) into a gist.github.com and email it to isaacs. [19:08] micheil: bugs: [19:08] micheil: { email: 'npm-@googlegroups.com', [19:08] micheil: url: 'http://github.com/isaacs/npm/issues' }, [19:08] liar has joined the channel [19:08] micheil: or those. [19:09] Shrink has joined the channel [19:09] Shrink has joined the channel [19:10] FireFly|n900 has joined the channel [19:10] NuckingFuts: SubStack: Don't you draw comics? [19:11] DTrejo: hij1nx: missed the announcement spot you guys had at the end, understandable though cause there was a lot going on [19:12] jakehow has joined the channel [19:12] fairwinds has joined the channel [19:13] suckerpunch has joined the channel [19:14] SubStack: NuckingFuts: now and then [19:15] blueadept: is anyone have a recommendation for how to approach realtime form field validation in node? like for instance making sure an email is proper, or passwords have been entered in twice correctly? [19:15] dguttman has joined the channel [19:15] tbranyen: blueadept: yeah use client side javascript? [19:15] ckknight: blueadept: https://github.com/caolan/forms seemed good for that [19:15] tbranyen: why both with node? [19:15] tbranyen: bother* [19:16] blueadept: haha, actually you're right [19:16] ckknight: well, you'd want both client-side and server-side validation [19:16] blueadept: brain dump there, sorry [19:16] tbranyen: ckknight: checking client side with ajax doesn't do anything but add overhead [19:16] tbranyen: check again once the request is made [19:16] ckknight: I don't mean with AJAX [19:17] ckknight: I mean on submission, verify that the user's input is valid server-side [19:17] ckknight: otherwise you have a security flaw [19:17] ckknight: the client-side is just gravy [19:17] tbranyen: yea [19:19] jimt has joined the channel [19:19] micheil: what was that article recently on better default variable assignment? [19:19] NuckingFuts: SubStack: You should Illustrate a poignant guide to NodeJS cB [19:19] NuckingFuts: And then NOT disappear, makign you instantly better than _why [19:20] tokumine has joined the channel [19:20] CIDIC: there isn't much I can do without npm is there? [19:20] tbranyen: micheil: you mean using || instead of a ternary? [19:20] micheil: yeah, something like that. [19:21] micheil: there was something better than a = a || true; style stuff [19:21] tbranyen: perhaps, thats what all the major js libs use tho [19:21] ckknight: var value = cache[key] || (cache[key] = calculate(key)); [19:22] ckknight: I've seen that [19:22] NuckingFuts: micheil: I wish I could specify default values in the argument list /ponder [19:22] ckknight: NuckingFuts: yeah, that is one really nice thing I miss from Python [19:22] NuckingFuts: function foo (a || true, b || false) [19:22] tbranyen: yeah only thing sucks is if a valid value is empty string, false, undefined, etc [19:22] tbranyen: thats when you'd need more checks [19:23] NuckingFuts: tbranyen: In JS, just have it for when it's undefined lol [19:23] tbranyen: NuckingFuts: i mean for value || default [19:23] ckknight: I wish we had ?? from C# [19:23] tbranyen: if you wanted to override a default value with '' for instance [19:23] tbranyen: that would fail [19:23] ckknight: value ?? "other", only changed to "other" if value is null. [19:25] xiackok: how can i find my script file's path? like __file__ or something like this? [19:25] ckknight: __filepath, I think [19:25] ckknight: err [19:25] ckknight: __filename [19:25] ckknight: eh, lemme check [19:26] ckknight: it's __filename [19:26] xiackok: ckknight: yeah i checked thanks [19:28] pdelgallego has joined the channel [19:29] fr0stbyte_ has joined the channel [19:29] cloudhead has joined the channel [19:31] zcopley has joined the channel [19:32] ZeroCoder has joined the channel [19:34] kriszyp has joined the channel [19:41] siong1987 has joined the channel [19:43] path[l] has joined the channel [19:44] matjas has joined the channel [19:45] xsyn has joined the channel [19:46] ryan0x2 has joined the channel [19:47] xandy: hm which mysql client would you suggest? [19:48] xandy: i found 5 different implementations [19:48] Jamool has joined the channel [19:49] path[l]: hi Im trying to write an app that requires a simple keyvalue store, ideally file based and I decided on Alfred. But so far with my experiments, I havent fully managed to figure out some of this and I'd like some help. I'm trying to persist data, but it doesnt seem to be persisting anything to file [19:50] brianloveswords has joined the channel [19:52] ncb000gt: path[l]: how are you trying to do it? [19:52] ncb000gt: xandy: probably node-mysql by felixge [19:52] ncb000gt: but i've never used it personally [19:52] ncb000gt: it'd be better to use whichever you enjoy working with most [19:52] xandy: hm ok google lead me to mysql-native [19:54] path[l]: ncb000gt: here's what I did http://pastebin.com/grppUXAY . It's a really simple example where i try to save one record. [19:54] mike5w3c has joined the channel [19:55] xandy: topic [19:55] xandy: sry [19:55] xandy: :D [19:56] ncb000gt: path[l]: ok. are you trying to write to ircd? what does the save function look like? [19:58] path[l]: ncb000gt: yes I am. But I'm not sure what you mean by what does the save function look like. I thought that was the api of save? [19:59] robotarmy has joined the channel [19:59] robotarmy has joined the channel [19:59] ncb000gt: path[l]: somehow i skipped over where you said you were using Alfred [19:59] ncb000gt: :) [19:59] evilhackerdude: which doc generator would you recommend? docco, dox? [20:00] steve_____ has joined the channel [20:00] path[l]: ah [20:00] path[l]: do you recommend something instead of alfred? [20:00] tbranyen: evilhackerdude: if you only have a single JS file and its pretty self explanatory with consistent well written code, docco is great [20:01] ncb000gt: path[l]: no, i haven't used any of them. I tend to just go with a proper db solution or redis. [20:01] path[l]: ah ok [20:01] ncb000gt: and by proper i mean external [20:01] path[l]: I have a really small app, so I dont want to add to the deployment overhead [20:01] ncb000gt: sure [20:02] evilhackerdude: tbranyen: i thought about trying to put my public api docs into tests (https://twitter.com/#!/tlrobinson/status/56143147985678336) - it would also be more than one file [20:02] mhooker has joined the channel [20:02] ncb000gt: path[l]: i'm not sure if you need to close the db before it will flush out [20:02] ncb000gt: also, you may want to add some event listeners to see if those are called [20:02] tbranyen: evilhackerdude: i follow strict TDD in which tests would do nothing to support public api [20:03] tbranyen: would only serve to confuse [20:03] ncb000gt: path[l]: http://pgte.github.com/alfred/api/odm.html#events [20:03] path[l]: hmm, but this is a long running server, which if it dies, will actually crash [20:03] path[l]: thanks I'll try that [20:03] tbranyen: evilhackerdude: unless i'm misunderstanding your tweet [20:03] abraham has joined the channel [20:04] ncb000gt: it doesn't appear as thought it needs a flush [20:04] ncb000gt: so unless it just doesn't work, you should be ok [20:05] path[l]: maybe it flushes to disk only at discrete intervals : x [20:05] ncb000gt: you might also want to check the error log [20:05] ncb000gt: erm not log [20:05] ncb000gt: sorry, but the error passed to the callback on save [20:05] mike_miller has joined the channel [20:05] ncb000gt: hmm, looks like you are [20:06] ncb000gt: is it that the callback is never fired? [20:06] ncb000gt: or just that it doesn't seem to be writing? [20:06] ncb000gt: also, you might want to make sure that ./ works for pathing [20:06] ncb000gt: you might want to try a full path [20:07] path[l]: nope, it does fire [20:07] path[l]: also files have been created. They just are empty [20:08] path[l]: http://pgte.github.com/alfred/internals/model.html <-- according to this writes are flushed every 1 second. But even after 5 minutes i dont have anythnig [20:08] brianmario has joined the channel [20:09] path[l]: adding a db.close definetly does a save [20:09] path[l]: but that's useless to me [20:11] evilhackerdude: tbranyen: are you saying your tests are all internal and unrelated to how the code being tested is used from the outside? (btw, i'm not tom) [20:11] tbranyen: oh [20:12] tbranyen: evilhackerdude: i would not expect someone to read my tests to figure out how to use it, but to ensure that it won't behave in expected ways [20:14] skm has joined the channel [20:14] sub_pop has joined the channel [20:15] skm has joined the channel [20:16] evilhackerdude: tbranyen: i agree, though i would "sell" the documentation generated from the docs inside the tests as the de-facto documentation of my library/app/whatever [20:16] tbranyen: evilhackerdude: i'd have to see that done in practice, no libs/frameworks i've ever used do that [20:17] Me1000 has joined the channel [20:17] evilhackerdude: tbranyen: i'll give it a try. many thanks for your input! [20:18] jtsnow has joined the channel [20:18] c4milo1 has joined the channel [20:19] KRTac has left the channel [20:19] tokumine has joined the channel [20:21] ncb000gt: path[l]: hmm, strange. maybe the timer is off on the flush behavior [20:22] matyr has joined the channel [20:22] path[l]: yeah :/ [20:25] Draggor has joined the channel [20:26] fr0stbyte has joined the channel [20:26] max_dev has joined the channel [20:26] charlenopires has joined the channel [20:27] dguttman has joined the channel [20:27] mynyml has joined the channel [20:28] fr0stbyte has joined the channel [20:29] boaz has joined the channel [20:30] fr0stbyte has joined the channel [20:31] mscdex: sounds like alfred is getting old and forgetful :> [20:32] mikeal has joined the channel [20:33] ngs has joined the channel [20:35] max_dev has joined the channel [20:38] skohorn has joined the channel [20:38] path[l]: hahaha [20:39] dguttman_ has joined the channel [20:40] ezmobius has joined the channel [20:41] saschagehlich has joined the channel [20:42] fairwinds has joined the channel [20:42] jonaslund: alfred looks nifty [20:43] dab`: v8: WHERE CAN I GET YOU!? [20:43] v8bot: dab`: SyntaxError: Unexpected identifier [20:43] dabtop: :< [20:43] dabtop: v8: 1 [20:43] v8bot: dabtop: 1 [20:43] dabtop: :D [20:44] mike_miller has joined the channel [20:45] christophsturm has joined the channel [20:45] christophsturm has joined the channel [20:47] matyr_ has joined the channel [20:47] pdelgallego has joined the channel [20:48] disq has joined the channel [20:48] disq has joined the channel [20:50] path[l] has joined the channel [20:50] tshpaper has joined the channel [20:52] ryan0x2 has joined the channel [20:56] Bonuspunkt: v8: while(true); [20:56] v8bot: Bonuspunkt: Error: Timeout [20:57] Phyllio has joined the channel [20:58] ezmobius has joined the channel [20:59] pita: v8: console.log("hello world") [20:59] v8bot: pita: "hello world" [20:59] pita: yeah :) [20:59] pita: v8: "bla" [20:59] v8bot: pita: "bla" [20:59] pita: v8: while(true){console.log("hello")} [20:59] sirkitree has joined the channel [20:59] v8bot: pita: Error: Timeout [21:00] pita: v8: for(var i=0;i<10;i++){console.log("hello")} [21:00] v8bot: pita: "hello" [21:00] v8bot: pita: "hello" [21:00] v8bot: pita: "hello" [21:00] v8bot: pita: "hello" [21:01] v8bot: pita: "hello" [21:01] v8bot: pita: [Output truncated...] [21:01] pita: :) [21:01] patzak has joined the channel [21:02] pita: jonaslund: alfred didn't work for me. I had lots of trouble with nstore too. I'm still searching for a good key value store in node [21:02] Croms has joined the channel [21:03] jonaslund: too bad [21:03] jonaslund: i'm in the process of writing something "similiar" to alfred [21:04] jonaslund: did a small prototype in-mem system earlier [21:04] wookiehangover has joined the channel [21:04] jonaslund: but i'm redoing it with persistence and quicker recovery [21:05] zakabird has joined the channel [21:07] btipling has joined the channel [21:07] Utkarsh has joined the channel [21:07] skm_ has joined the channel [21:08] Gregor has joined the channel [21:08] unlink has joined the channel [21:08] unlink has joined the channel [21:08] WRAz has joined the channel [21:09] ReinH has joined the channel [21:10] brianloveswords_ has joined the channel [21:13] dguttman has joined the channel [21:13] rphillips has joined the channel [21:18] mjr_ has joined the channel [21:18] blueadept: anyone here have an opinion on node-mail? https://github.com/weaver/node-mail [21:18] blueadept: seems like the most up-to-date mailer available through npm [21:19] mscdex: blueadept: there's also: https://github.com/eleith/emailjs [21:21] brianmario has joined the channel [21:21] Stan____ has left the channel [21:21] mscdex: `v about [21:21] v8bot: mscdex: v8bot is an IRC bot written entirely in Javascript using Google's v8 Javascript engine and Node.js. Credits: eisd, Tim_Smart, gf3, MizardX, inimino. Join us at #v8bot ! [21:21] mscdex: `v help [21:21] v8bot: mscdex: For a list of commands, type "`v commands". For help on a specific command, type "`v help ". Join #v8bot for more support. [21:21] mscdex: `v commands [21:21] v8bot: mscdex: Commands: Type `v . Optionally, type `v @ to send to a specific user. `v Commands are: about, beers, commands, git, google, help, macro. Other commands: v8, `re, `pcre, `ref. Type `v help for more information. Join #v8bot for more support. [21:21] blueadept: mscdex: cool, i'll check it out [21:22] mscdex: dabtop: http://github.com/eisd/v8bot [21:22] ryan0x2 has joined the channel [21:22] dabtop: yea just found it ^_^ [21:22] mscdex: :) [21:22] dabtop: thanks :P [21:23] Jamool has joined the channel [21:26] pita has joined the channel [21:28] apoc: v8: console.log( require('os').type() ); [21:28] v8bot: apoc: ReferenceError: require is not defined [21:29] Aria: Hey, apoc. [21:29] Aikar: apoc: v8 is sandboxed and only has console.log lol [21:29] zemanel has joined the channel [21:29] apoc: scnr ;) [21:30] dgathright has joined the channel [21:30] marcello3d has joined the channel [21:31] micheil: mikeal: did you happen to see that gist I did on decoders / encoders? [21:31] mikeal: i don't remember [21:31] mikeal: send me a link again [21:31] micheil: https://gist.github.com/911968 [21:32] micheil: it's essentially a layer on top of streams [21:33] dotcomstu has joined the channel [21:33] mikeal: do you mean it's basically just a subclass of streams? [21:34] tobym has left the channel [21:35] Viriix has joined the channel [21:36] rfay has joined the channel [21:36] bartt has joined the channel [21:36] micheil: mikeal: I wouldn't say subclass of streams [21:37] micheil: as it adds to streams, maybe superclass, but really it's just a way of thinking on top of streams [21:37] mikeal: so [21:38] mikeal: streams should be where you do mutation [21:38] perezd: cloudhead: cloudhea1 u around? [21:38] mikeal: and build extra domain specific api [21:38] mikeal: so long as they don't break the standard stream primatives [21:38] |sWORDs|: When using step how can I pass extra objects (besides this) to the next function? My first function fetches Name and Id from Customers, the second function fetches Debts from Debt with a for each clause on Customers.Id. But the third function needs both Name and Debt. [21:38] mikeal: you should still be able to pipe to a writable stream and from a readable one [21:38] mikeal: and you should respect pause/resume semantics [21:39] |sWORDs|: sample with and without step of my above mentioned issue: http://pastebin.com/SvF8mgR4 [21:39] NuckingFuts has joined the channel [21:41] marcello3d has joined the channel [21:41] dabtop has joined the channel [21:41] Astro has joined the channel [21:41] balaa has joined the channel [21:46] micheil: mikeal: I'm more thinking that a decoder should emit descriptive events about the data. [21:49] micheil: and an encoder should take descriptive methods and emit out "data" events [21:49] astropirate has joined the channel [21:49] xandy: hm seems like the gearman module is out of date, isn't it? https://github.com/joshrotenberg/node-gearman [21:49] Croms has joined the channel [21:49] mikeal: is there any reason why there are two of them? [21:50] Croms_ has joined the channel [21:50] micheil: mikeal: it's because you can't have a stream that's both readable and writable by two sides [21:50] micheil: classic case is the tls streams [21:50] mikeal: yes you can :) [21:50] micheil: it's actually two streams underneath. [21:50] brianmario has joined the channel [21:50] mikeal: tls streams are duplex man [21:50] mikeal: but tls doesn't mutate [21:50] micheil: it's much easier to just have two objects. [21:50] mikeal: not really [21:51] mikeal: i don't believe it really is [21:51] mikeal: you can have one API [21:51] losing has joined the channel [21:51] mikeal: that you write to, emits descriptive events, and assumes that you will emit some kind of decoded data out that is readable by another stream [21:51] micheil: hmm.. it always got damn confusing that way whenever I tried to implement it [21:52] mikeal: it's hard to implement, but really easy to use once you finish [21:52] mikeal: you can provide much more simlified APIs [21:52] micheil: this is just as easy to use, given the right context [21:52] micheil: I prefer easy to implement + easy to use [21:53] mikeal: not really, because you're assuming the person using the decoder will create their own other writable stream and write to it plainly [21:53] mikeal: which presumes they understand the stream API [21:53] micheil: well, that's not really the idea. [21:53] micheil: think of something like a WebSocket [21:53] mikeal: the intention should be to enable streaming and a domain specific API that doesn't presume to know about streaming [21:53] mikeal: also, you're going to lose the pause/resume semantics [21:53] micheil: you end up receiving "data" events consisting of Buffer's [21:53] Twelve-60 has joined the channel [21:53] mikeal: because the decoder won't get piped to anything [21:53] micheil: that's on a net.Socket [21:54] timcosgrove has joined the channel [21:54] micheil: but you don't really want to write this binary data to a websocket stream. [21:54] indiefan2a has joined the channel [21:55] micheil: (because there's like 16 different packet types, 0x00 -> 0x0F [21:55] mikeal: no, but if this data is being decoded in order to send some other kind of mutated or computed data to another stream [21:55] mikeal: then you haven't created a unified way to pipe the mutated/computed data chunks out without breaking pipes [21:55] micheil: rather then using stream.pipe, you write your own. [21:56] mikeal: which will break [21:56] timcosgrove has left the channel [21:56] mikeal: it will, it won't handle pause/resume [21:56] mikeal: it'll leak [21:56] micheil: because you want to say, this data is actually a bunch of binary things [21:56] mikeal: all kinds of issues becuase people don't understand streams [21:56] mikeal: you mostly get streams and you're having a hard time implementing a duplexed one :) [21:56] mikeal: how do you expect consumers of the api to know so much about streams [21:57] jesusabdullah has joined the channel [21:57] mikeal: micheil, you're missing the point [21:57] mikeal: don't care about what people do with the decoded data [21:57] mikeal: you help them with that [21:57] mikeal: then you give them another method to write out to that is on the object [21:57] mikeal: and that emits data events [21:57] micheil: maybe I am, but so far no-one has provided an easy boiler plate, this is a duplex stream. [21:57] jesusabdullah: What are you guys doing? Sorry, I lagged out [21:57] mikeal: so then, it's a readable stream [21:57] micheil: jesusabdullah: https://github.com/miksago/node-eventstream [21:57] micheil: erm [21:58] micheil: https://gist.github.com/911968 [21:58] abraham has joined the channel [21:58] mikeal: yeah, i need to write that "proxy" stream [21:58] mikeal: then just passed everythign through [21:58] mikeal: then you can just override a couple methods and all the rest will work fine [21:58] micheil: mikeal: yes, a readable stream has "data" events. [21:58] Phyllio has joined the channel [21:59] micheil: but it's expected that the "data" event only has one argument [21:59] stillmotion: What's a recommended XML parser module? [21:59] hij1nx has joined the channel [22:00] matyr has joined the channel [22:01] kmiyashiro has joined the channel [22:01] micheil: mikeal: I've been trying to implement it as a duplex stream for months, and not been getting anywhere, this solves that problem. [22:02] xandy: i've a manual compilet module here. where do i have to put the .node file and the js files to? [22:04] perezd: cloudhea1: cloudhead lookin for ya :) [22:04] tfe_ has joined the channel [22:04] tfe_ has joined the channel [22:04] timmywil has joined the channel [22:05] johnnywengluu_ has joined the channel [22:06] mhooker has joined the channel [22:08] Spion__ has joined the channel [22:09] xandy: hm the comile log says note path not found [22:10] eee_c has joined the channel [22:11] derferman has joined the channel [22:13] maushu has joined the channel [22:13] xandy: anyone? [22:14] ncb000gt: those of you that work with coffeescript, how in the world do you actually debug this? [22:14] fr0stbyte has joined the channel [22:14] xandy: the howto only says "node-waf configure build" [22:14] ncb000gt: the line numbers are always inaccurate [22:14] mynyml has joined the channel [22:14] ncb000gt: xandy: depends, it needs to be on your nodepath for it to be used [22:14] xandy: ah ok [22:14] ncb000gt: or you can specify it with a path in the requires [22:15] ncb000gt: require('/path/to/module/file') [22:15] xandy: ok and what about the .js file for the .node file? [22:15] ncb000gt: xandy: take a look at https://github.com/ncb000gt/node.bcrypt.js [22:15] xandy: ok [22:15] ncb000gt: it's an addon i wrote [22:16] ncb000gt: should give you some hints [22:16] skm has joined the channel [22:16] fr0stbyte has joined the channel [22:16] xandy: i see this was written for npm but i've a module (https://github.com/joshrotenberg/node-gearman ) here that doesn't have anything for npm [22:17] ncb000gt: yea, i put together the package.json file [22:17] ncb000gt: it's easier to throw that into your project [22:17] ncb000gt: and install that way [22:17] ncb000gt: not required though [22:18] xandy: ok [22:18] xandy: i'll try to build a working package.json file [22:20] ncb000gt: xandy: if you don't want to work with npm, for now, you can use the approach i mentioned earlier (with git submodules you can make it a little easier), or you could just update your nodepath [22:20] jonaslund: hmmm [22:20] jonaslund: has the --debug option been removed in node ? [22:21] ncb000gt: don't believe so [22:21] xandy: i think it's better of i do it with npm so i can install the module easier on different machines and the module gets a bit up to date [22:21] guybrush: stillmotion: i am using node-htmlparser a lot because it is very forgiving when it comes to eating (very) dirty html, beside that there is also sax-js and some other https://github.com/joyent/node/wiki/modules#parsers-xml [22:21] markstory has joined the channel [22:21] ncb000gt: xandy: agreed [22:21] Me1000 has joined the channel [22:21] stillmotion: guybrush: libxml.js looks good [22:21] jonaslund: ah [22:21] guybrush: didnt try them all so far [22:21] xandy: and gearman is really great. there should be a module for node and if noone does one, i'll try ;) [22:22] jonaslund: you need to have the debugger early in the cmdline [22:22] xandy: or at least i'll try to get the old one working with npm [22:22] ncb000gt: stillmotion: yea, libxml.js is nice [22:22] stillmotion: does it have a css selector interface? [22:22] stillmotion: or is everything xpath? [22:22] ncb000gt: it has been a while since it's gotten updates though [22:23] guybrush: nah [22:23] guybrush: i am working on something like that though :D [22:23] guybrush: stillmotion: do you know about jsdom? [22:23] guybrush: maybe that is what you are looking for [22:23] ncb000gt: https://github.com/dshaw/node-sizzle [22:23] stillmotion: yes, however, my html is pretty malformed. [22:23] ncb000gt: works with css selectors [22:23] xandrews has joined the channel [22:24] xandy: err i just can't find a documentation for the package.json file [22:24] ncb000gt: there is also https://github.com/harryf/node-soupselect [22:24] ncb000gt: xandy: check the commonjs wiki [22:24] ncb000gt: there is a bunch of info there [22:24] ncb000gt: but also, ii believe the npm manpage covers a bunch of stuff [22:25] xandy: ah https://github.com/isaacs/npm/blob/master/doc/json.md [22:26] jonaslund: hrrm [22:26] jonaslund: someone who's used the eclipse based V8 debugger ? [22:26] stillmotion: this is my issue: http://stackoverflow.com/questions/5614935/parsing-large-html-fragments-from-a-flatfile [22:28] ncb000gt: you could use a stream based reader, but i'm not sure which ones exist to support it...node-expat, i know that libxmljs has a sax parser, but i'm not sure it works with readstreams [22:29] guybrush: htmlparser supports streams [22:29] mikl has joined the channel [22:29] guybrush: input [22:29] ncb000gt: nice [22:29] mikl has joined the channel [22:29] crodas has joined the channel [22:30] mattikus has joined the channel [22:31] tfe__ has joined the channel [22:31] horofox has joined the channel [22:31] jonaslund: ok figured it out [22:31] cyrus- has joined the channel [22:32] warreng has joined the channel [22:32] groundup: Would it be possible to run a web server on an Android tablet/phone using node? [22:32] warreng: anybody know how hard it'd be to create a sshd server in node.js? [22:32] MarkMenard has joined the channel [22:33] ncb000gt: groundup: i'd imagine so, but i don't know that anyone has set that up [22:33] tfe_ has joined the channel [22:33] warreng: i assume there's SSL libraries already available... [22:33] ncb000gt: warreng: I believe substack has done some work on that [22:33] jonaslund: is pisci or ryah here ? [22:33] warreng: cool, thanks [22:34] xandy: hm i think i'll try to solve my problem with some rest-magic and will remove this old gearman crap :/ [22:34] ryah: jonaslund: yes [22:34] jonaslund: what platform are you on ryan ? [22:35] ryah: os? [22:35] jonaslund: yeah [22:35] ryah: linux [22:35] secoif has joined the channel [22:35] jonaslund: used the chrome debugger from eclipse ? [22:35] CiRlE has joined the channel [22:35] ryah: once, yes [22:36] micheil: ryah: is there any further documentation on duplex streams floating about? [22:36] jonaslund: does setting breakpoints in the IDE work? (assuming correct project setup) [22:36] micheil: I've only found the documentation on either readable or writable streams [22:36] SvenDowideit_ has joined the channel [22:37] ryah: jonaslund: i think so [22:37] jonaslund: I'm on cygwin and it doesn't work.. the debugger creates a "virtual project" in the IDE where i can set breakpoints on the loaded sources (kinda like when debugging web stuff) [22:37] ryah: micheil: nope - it's just an interface you'd need to implement the write, and 'data' events [22:37] SubStack: warreng: unfortunately it has threading issues [22:37] robotarmy has joined the channel [22:37] jonaslund: i'm thinking of 2 error sources, either the extra 2 lines for wrapping the sources in a file mucks it up? (was that in earlier?) [22:38] micheil: ryah: hmm, okay. I'm currently thinking of this for my websockets protocol implementation: https://gist.github.com/911968 [22:38] jonaslund: or the cygwin-name-munging mucks it up (eclipse not recognizing the filename /cygdrive/d/...) [22:38] micheil: or, following the ideas presented there. [22:39] micheil: ryah: end API becomes: https://gist.github.com/912810 [22:39] piscisaureus: jonaslund: if the name munging is the problem, create a junction called \cygdrive\d that points to d:\ [22:39] jonaslund: piscisaureus: NTFS stuff ? [22:39] piscisaureus: yeah you don't have it? [22:39] micheil: because having each frame as a stream doesn't make sense. [22:40] piscisaureus: jonaslund: what windows verion you have? [22:40] jonaslund: never tried [22:40] jonaslund: 7 [22:40] piscisaureus: md \cygdrive [22:40] piscisaureus: mklink \cygdrive\d d:\ [22:40] piscisaureus: probably you should do that on d:\ [22:41] piscisaureus: err -> mklink /j \cygdrive\d d:\ [22:42] dguttman has joined the channel [22:43] mscdex: ryah: what do you think about adding remoteAddress and remotePort for client tcp connections? [22:44] jonaslund: ok create them [22:44] jonaslund: gonna restart eclipse and try it [22:45] jonaslund: I'll add a few lines of "padding" around the line i'm breaking on aswell [22:46] mc_greeny has joined the channel [22:47] jonaslund: no break :P [22:47] jonaslund: oh the lines should align atleast [22:48] xandy: hm what yould you recommend for a very small webserver? j just need the rest api to do some actions via curl [22:48] xandy: i don't need a full webserver with static content [22:48] Aria: try node.js. [22:48] Aria: It's great! [22:48] xandy: err i'm looking for a node module [22:48] systemfault: Does v8 support any javascript extensions like spidermonkey? If yes, is there a link a something? [22:48] xandy: express is too much i guess [22:48] themiddleman has joined the channel [22:49] Aria: express is pretty tiny ;-) [22:49] jonaslund: systemfault: node supports what V8 supports pretty much [22:49] xandy: Aria but it has a lot of functions i don't need [22:49] Aria: And? [22:49] Aria: You could just use connect middleware, too. Go down a level in that stack. [22:49] systemfault: jonaslund: Of course.. But seems that I cannot find what v8 supports [22:50] Aikar: https://gist.github.com/9bf2d54215deb3fbcdf6 any C/C++ gurus able to read this and see if anything sticks out as to wtf is wrong? [22:50] jonaslund: systemfault: https://github.com/joyent/node/wiki/ECMA-5-Mozilla-Features-Implemented-in-V8 [22:50] LukeGalea: Hey all [22:50] patzak has joined the channel [22:50] hvgotcodes: can i not run nohup node server.js &? [22:50] LukeGalea: I'm trying to update my production-esque systems to 0.4.5 [22:51] xandy: systemfault a stacktrace with some error symbols is no great help ;) [22:51] systemfault: jonaslund: Yeah, doesn't tell if it supports other extensions :P [22:51] LukeGalea: from 0.2.6.. and I'm finding that npm won [22:51] mscdex: node.js rules! [22:51] LukeGalea: 't load from node_modules [22:51] xandy: but i guess its something in the eventqueue systemfault [22:51] LukeGalea: On my dev machine using nvm all is good. [22:51] jonaslund: systemfault: you mean stuff like generators and yield,etc ? [22:52] xandy: because most v8 uses c++ and the glibc is therefore a c error [22:52] LukeGalea: but with just raw node and npm.. the following doesn't do anything: paths.unshift(path.join(__dirname, "node_modules")); [22:52] systemfault: jonaslund: Yes sir. [22:52] LukeGalea: any ideas? [22:52] mscdex: LukeGalea: you mean require.paths? [22:53] LukeGalea: mscdex: sorry.. ya. missed the beggining of the line. but ya. [22:53] jonaslund: systemfault: there was some msgs from last year about the V8 guys not being interested in that stuff [22:54] skiz has joined the channel [22:54] systemfault: jonaslund: I'm actually more interested in "let" than "yield" [22:54] jonaslund: actually someone here mentioned that let was in [22:55] jonaslund: let is fairly simple to add without rewriting big parts of a system (once you start doing yield you can do a ton of other stuff aswell) [22:55] mike_miller has joined the channel [22:55] jonaslund: as let is in Ecma5 afaik [22:55] LukeGalea: mscdex: I tried a console.dir on require paths and it does contain the dir I'm looking for. [22:55] LukeGalea: hrmm.. [22:56] LukeGalea: mscdex: And npm bundle ls shows all is good. [22:56] systemfault: jonaslund: It isn't :'( [22:56] mscdex: LukeGalea: you shouldn't need to unshift anything onto require.paths [22:56] LukeGalea: I guess I could run nvm in prod because that seems to be the big difference that's messing me up.. but I really don't like running that kind of thing in prod envs. [22:56] LukeGalea: hmm. [22:57] mscdex: LukeGalea: i'm running 0.4.5 and placing "foo.js" in ~/node_modules and then doing require('foo') loads the foo.js in ~/node_modules [22:57] mscdex: if you want a local foo.js then require('./foo') [22:58] LukeGalea: mscdex: Okay.. if I don't explictly add node_modules to the require paths.. it's fine, but then it won't load my "vendor" dir (where I keep things I've forked , etc) [22:58] LukeGalea: but if I add just the vendor dir, then node_modules files stop working.. [23:00] LukeGalea: I really need both vendor and node_modules working.. really strange that if I try to add vendor it breaks node_modules... [23:00] piscisaureus has joined the channel [23:00] k1ttty has joined the channel [23:01] fr0stbyte has joined the channel [23:01] marcello3d has joined the channel [23:02] pHcF has joined the channel [23:02] jtsnow has joined the channel [23:03] coreb: ryah: http://nodejs.org/jsconf2010.pdf how's the performance on large strings now? [23:03] jakehow has joined the channel [23:03] ryah: same [23:04] mscdex: LukeGalea: you could also set the NODE_PATH env var [23:04] LukeGalea: mscdex: I [23:05] LukeGalea: I'll try that out. I might also try to collapse everything into node_modules.. but I do like keeping my npm stuff seperate from my git submodules.. [23:05] mscdex: LukeGalea: otherwise keep your vendor stuff in a subdirectory called node_modules [23:05] mscdex: node will look there first [23:06] LukeGalea: I wonder how npm bundle will react though to having stuff jammed in there that it isn't managing.. [23:06] [[zz]] has joined the channel [23:06] piscisaureus: Fuck. WriteFileGather needs page-aligned buffers. [23:07] coreb: ryah; I guess there's a low limit to how large static files should be served with nginx as well [23:07] ryan0x2 has joined the channel [23:08] onre has joined the channel [23:09] ryah: coreb: ? [23:09] jonpacker has joined the channel [23:10] ryan0x2 has joined the channel [23:11] m64253 has joined the channel [23:12] m64253 has joined the channel [23:13] brianloveswords_ has joined the channel [23:15] jonaslund: coreb: read the pdf carefully.. a big string is slow, a big buffer is fast however [23:15] Croms has joined the channel [23:16] jonaslund: coreb: simply because the buffer can be sent as-is.. a string is made up of characters that needs to be translated before sending [23:16] unomi has joined the channel [23:19] xla has joined the channel [23:21] dnolen has joined the channel [23:23] warz has joined the channel [23:23] warz has joined the channel [23:27] coreb: jonaslund: I implicitly meant strings as buffers [23:30] fteem has joined the channel [23:30] warz has left the channel [23:33] tjgillies: has anyone made cocoa bindings for node? [23:33] matyr has joined the channel [23:33] perezd: tjgillies: ? [23:34] tjgillies: so you can create guis with node [23:34] tjgillies: ruby and python have them [23:34] perezd: tjgillies: not sure how that would look exactly [23:34] tjgillies: prolly just bind the c lib like ruby and python [23:35] perezd: yeah but, is objc non-blocking? [23:35] perezd: pretty sure its imperative by nature [23:35] perezd: it has blocks, but... [23:36] tjgillies: https://github.com/naturalethic/Cloverleaf [23:36] perezd: pretty interesting [23:37] tim_smart has joined the channel [23:38] jtsnow has joined the channel [23:39] matyr_ has joined the channel [23:40] path[l] has joined the channel [23:41] indexzero has joined the channel [23:42] davidwalsh has joined the channel [23:45] saikat has joined the channel [23:45] eee_c has joined the channel [23:49] mc_greeny1 has joined the channel [23:50] dguttman has joined the channel [23:50] derferman has joined the channel [23:57] saikat has joined the channel [23:58] isaacs has joined the channel [23:59] sh1mmer has joined the channel [23:59] ryan0x2 has joined the channel [23:59] TooTallNate: ok you Apple jailbreakers, here's node: [23:59] TooTallNate: https://github.com/downloads/TooTallNate/node/node-v0.4.5-ios-arm-1.deb