[00:02] teemow has joined the channel
[00:04] ossareh has joined the channel
[00:05] omni5cience has joined the channel
[00:09] BrianTheCoder has joined the channel
[00:09] pedrobelo has joined the channel
[00:10] hij1nx has joined the channel
[00:10] clarkfischer has joined the channel
[00:11] mdoan has joined the channel
[00:12] jakehow has joined the channel
[00:13] jpick has joined the channel
[00:14] echosystm: how do you do a sendfile?
[00:14] altamic has joined the channel
[00:15] [[zz]] has joined the channel
[00:15] warz has joined the channel
[00:16] warz-pc has joined the channel
[00:17] chiragrules has joined the channel
[00:18] clarkfischer: echosystm: What do you mean sendfile?
[00:18] echosystm: copy data between file descriptors
[00:19] echosystm: you know, 'zero copy file transfers'
[00:19] yrashk has joined the channel
[00:20] echosystm: http://linux.die.net/man/2/sendfile
[00:20] clarkfischer: echosystm: What about just using childprocess.exec?
[00:20] echosystm: no
[00:20] echosystm: thats... not related
[00:20] clarkfischer: Hrm?
[00:20] echosystm: im pretty sure node has support for this in some fashion
[00:20] tilgovi has joined the channel
[00:21] isaacs: yes, node has fs.sendfile
[00:21] echosystm: why is that not in the doc?
[00:21] isaacs: echosystm: require("fs").sendfile
[00:21] eee_c1 has joined the channel
[00:21] echosystm: http://nodejs.org/docs/v0.3.4/api/fs.html
[00:22] isaacs: i dunno
[00:22] isaacs: bug?
[00:22] clarkfischer: There's a bunch of undocumented stuff.
[00:22] echosystm: cool bananas!
[00:23] echosystm: thanks isaacs
[00:23] echosystm: we should make the node documentation a wiki
[00:23] echosystm: so people can edit it
[00:23] echosystm: and by we, i mean ryan
[00:23] echosystm: :P
[00:25] bradleymeck: echosystm i know creationix had sendfile stuff around here a while ago
[00:25] bradleymeck: bleh isaacs beat me to it, dont type until you are done readin
[00:28] isaacs: echosystm: it's in git. patches welcome :)
[00:29] echosystm: thats about 11ty percent too hard
[00:29] ttpva has joined the channel
[00:29] echosystm: yeah thast right, 11ty
[00:29] echosystm: need wiki!
[00:29] echosystm: :P
[00:30] sprout has joined the channel
[00:34] mscdex: wiki wiki wiki!
[00:36] bradleymeck: ACTION ponders dumping all the node blog posts in the world into a wiki
[00:36] pquerna: ryah: beers?
[00:37] softdrink has joined the channel
[00:38] onar has joined the channel
[00:38] bradleymeck: http://www.wikihost.org/w/nodejs there ya go, now get to work
[00:43] amerine has joined the channel
[00:45] tanepiper: first item added
[00:45] c4milo1 has joined the channel
[00:46] chiragrules_ has joined the channel
[00:47] jakehow has joined the channel
[00:47] jimt_ has joined the channel
[00:48] jacobolus has joined the channel
[00:49] pkrumins: visiting ryah right now :D
[00:50] skm has joined the channel
[00:52] jacobolus has joined the channel
[00:55] lukegalea has joined the channel
[00:56] yyamano has joined the channel
[00:57] JonKirkpatrick has left the channel
[00:57] ttpva: is there a ruby5 for node?
[00:57] m3nt0r^aw has joined the channel
[00:59] tanepiper: not really, there are some sites that drive off twitter, and mikeal does thenoded but no specific news site yet
[01:00] ttpva: ok thanks
[01:00] mikeal: micheil has a hard time finishing the mix downs for the noded
[01:00] mikeal: but
[01:00] mikeal: aminutewithnode :)
[01:00] mikeal: http://node.minutewith.com/
[01:00] mikeal: I help organize it a little, Chris Williams records, edits and publishes it
[01:01] BrianTheCoder has joined the channel
[01:01] mikeal: it's a rotating list of people that work on node core
[01:02] jimt has joined the channel
[01:02] broofa has joined the channel
[01:03] tanepiper: aww, @nodemodules never got mentioned on the npm podcast :(
[01:03] mikeal: was it around?
[01:03] gf3` has joined the channel
[01:03] mikeal: i only became aware of it a few weeks ago
[01:04] tanepiper: yes, it's been around since october, but it was broken for a bit
[01:04] tanepiper: until i changed it to use your CouchDB changes emitter
[01:04] tanepiper: now monitors the _changes feed from npm, and tweets :)
[01:04] mikeal: sweet
[01:07] A83 has joined the channel
[01:10] booths has joined the channel
[01:11] echosystm: is it unsafe to res.writeHead and then fs.sendFile(res.connection.fd, file....
[01:11] echosystm: ?
[01:11] tanepiper: echosystm: have you checked out express?
[01:11] jimt_ has joined the channel
[01:12] echosystm: nope
[01:12] tanepiper: http://expressjs.com/guide.html#res-download-file-filename-
[01:12] echosystm: well
[01:12] echosystm: i have
[01:12] echosystm: but i want to know anyway
[01:12] tanepiper: well look at how express does it
[01:12] mlangenberg has joined the channel
[01:12] tanepiper: i suspect it'll be the safest way for now
[01:13] Kryckan has joined the channel
[01:14] echosystm: ok
[01:14] echosystm: cheers
[01:15] tanepiper: ACTION wonders if he should stick his oar into the WebM debate with a nodejs powered webm encoder tool
[01:15] chiragrules has joined the channel
[01:15] whack has joined the channel
[01:16] maushu has joined the channel
[01:20] mikeal: echosystm: here's the deal
[01:21] mikeal: 1. no, it's not bad to res.writeHead and the stream somethign from the filesystem
[01:21] mikeal: it is, however, bad to use sendfile at the moment
[01:21] echosystm: oh
[01:21] mikeal: it's not considered stable
[01:21] echosystm: rightyo
[01:21] jimt has joined the channel
[01:21] echosystm: what about stream.write with an FD?
[01:21] mikeal: just do
[01:21] mikeal: fs.createReadStream('filename').pipe(res)
[01:22] mikeal: on 0.3.x
[01:22] echosystm: okie doke
[01:22] echosystm: thanks for that
[01:22] mikeal: on 0.2.x do sys.pump(fs.createReadStream(…), res)
[01:22] whack: so, I upgraded from 0.2.x to 0.3.3, and http.createServer().setSecure() went away
[01:23] whack: am I missing anything obvious?
[01:23] mattly has joined the channel
[01:23] whack: I'm not seeing anything obviously ssl-related about http serving in the 0.3.3 docs
[01:23] mikeal: HTTPS is gone in 0.3.2+
[01:23] mikeal: 0.3.x is not stable
[01:24] whack: mikeal: ahh, I'll downgrade, then.
[01:25] mikeal: 0.4 will be stable
[01:25] mscdex: why is the latest stable api docs not the default docs on nodejs.org?
[01:26] robotarmy has joined the channel
[01:27] mikeal: it is
[01:27] mscdex: i'm seeing 0.3.0
[01:27] mikeal: hrm....
[01:27] mikeal: that's concerning
[01:27] mscdex: http://nodejs.org/api.html
[01:27] mikeal: for what it's worth, i don't think 0.3.0 API changed anything
[01:28] mikeal: latest 0.3.x docs are not on that page
[01:28] mscdex: except util and probably a few other things
[01:28] mikeal: http://nodejs.org/docs/v0.3.4/api/
[01:28] mikeal: most of 0.3.0 was just removed things that were deprecated
[01:29] c4milo1: mikeal: what needs to be changed by addons that were working with 0.2.6?
[01:30] mikeal: C addons?
[01:30] c4milo1: mikeal: node-waf is not being used anymore right?
[01:30] c4milo1: mikeal: yes
[01:30] mikeal: ry said the C api didn't change much, but I don't have any experience with it
[01:31] mikeal: none of my modules use C bindings
[01:31] boaz has joined the channel
[01:31] fille12: i cant have a constructors at the same time
[01:31] fille12: and functions
[01:31] fille12: in a module
[01:31] maushu: wut
[01:32] fille12: i have a module
[01:32] fille12: it has a constructor
[01:32] fille12: i load the module
[01:32] fille12: var test = require('./test')
[01:32] fille12: then i whant to load a function
[01:33] fille12: from it
[01:33] fille12: but i cant
[01:33] mscdex: what are you exporting exactly?
[01:33] fille12: my constructer is
[01:34] fille12: module.exports = function test()
[01:34] fille12: and my function exports.addMe = function ()
[01:35] mikeal: no
[01:35] mikeal: you can't do that
[01:35] mikeal: also, setting exports to a function does not make it a constructor
[01:35] mikeal: setting exports to a function means the return value of the module is that function
[01:35] fille12: ohh god
[01:35] mikeal: do whatever "constructing" you want to do in the base module scope
[01:35] Intel_iX has joined the channel
[01:36] mikeal: then add your functions, attributes, whatever to exports
[01:36] fille12: okej
[01:36] fille12: any fast exampel?
[01:39] mikeal: there are some in the spec
[01:39] mikeal: http://wiki.commonjs.org/wiki/Modules/1.1.1
[01:39] dthompson has joined the channel
[01:40] eikke has joined the channel
[01:41] tmzt: a nodejs powered wiki?
[01:44] chiragrules_ has joined the channel
[01:49] dspree has joined the channel
[01:49] dspree has joined the channel
[01:49] fille12: so what about objects and classes in node.js
[01:50] eee_c has joined the channel
[01:52] mikeal: it's javascript
[01:52] mikeal: http://www.google.com/search?sourceid=chrome&ie=UTF-8&q=objects+and+classes+in+javascript
[01:53] iszak has joined the channel
[01:53] iszak has joined the channel
[01:54] fille12: u see i know how to make classes
[01:54] fille12: but how do i include them in my controller
[01:54] mdoan has left the channel
[01:54] fille12: thats the problem
[01:54] mikeal: in node you do things functionally more often than using objects
[01:55] mikeal: because object methods make bad callabcks
[01:55] mikeal: so you leverage closures most of the time
[01:55] fille12: u mean i need to rethink my whole state of being :D
[01:55] mikeal: here's the thing
[01:56] mikeal: you can't do this
[01:56] mikeal: new Obj();
[01:56] mikeal: sorry
[01:56] mikeal: var x = new Obj("asdf");
[01:56] mikeal: server.on('request', obj.requestHandler);
[01:56] mikeal: that will almost always break
[01:57] mikeal: because if requestHandler is a prototype method it won't have a reference to this
[01:57] mikeal: you have to do
[01:57] mikeal: server.on('request', function (req, res) { obj.requestHandler(req, res)})
[01:57] mikeal: it looks like it would be the same, but it's not
[01:58] fille12: will have to read some of this documentation
[01:58] mikeal: being that you have to use a closure to do callbacks even with object methods, you might as well just write fucntionally
[01:58] fille12: ok
[01:58] AAA_awright_ has joined the channel
[01:59] themiddleman has joined the channel
[02:00] Wizek has joined the channel
[02:05] MattDiPa_ has joined the channel
[02:05] Me1000 has joined the channel
[02:06] maushu_ has joined the channel
[02:06] tomhsx has joined the channel
[02:07] dguttman_ has joined the channel
[02:08] yozgrahame has joined the channel
[02:13] jakehow has joined the channel
[02:15] Bosmon2: So, looks like recent Cygwin builds produce .exes which just don't work
[02:15] Bosmon2: I've tested 0.3.3 and 0.3.4 which produce the same "do nothing" behaviour
[02:15] Bosmon2: 0.3.1 works fine
[02:15] sprout has joined the channel
[02:17] Bosmon2: I'm guessing that the patch on the wiki page for "Sampler" in v8 resolves the build issue, but somehow breaks functionality
[02:20] charlenopires has joined the channel
[02:21] SubStack: what to hack up next...
[02:21] SubStack: can't force it, I've found
[02:22] desaiu has joined the channel
[02:26] stephen_mcd has joined the channel
[02:26] mscdex: gah, just when i thought everything was working fine
[02:27] mscdex: ACTION shakes a fist at terminals
[02:27] deric_skibotn has left the channel
[02:28] mattly has joined the channel
[02:28] mravaux has joined the channel
[02:29] tanepiper: just thrown up https://github.com/tanepiper/dnode-upload-example if anyone is interested
[02:30] chrischris has joined the channel
[02:32] ossareh has joined the channel
[02:36] softdrink has joined the channel
[02:48] bmizerany has joined the channel
[02:50] piscisaureus: ryah: would it be possible to debug node with the node builtin debugger?
[02:50] piscisaureus: I need to debug node_g repl, it crashes with an incomprehensible v8 stacktrace.
[02:51] piscisaureus: hmm, Mr Dahl's not here apparently
[02:52] zorzar_: hey i have a basic problem getting something with the net module
[02:52] zorzar_: i have a function as basic as possible
[02:52] mayfield has joined the channel
[02:53] mscdex: zorzar_: what is the problem and can you gist the code?
[02:53] zorzar_: stream.on('data', function(data){console.log(data)}) if the data i send to the socket get's more then a few bytes the receiving of the data is split up in more then one function call
[02:54] mscdex: then concatenate?
[02:54] zorzar_: my problem is now: is there a pattern how to recieve the whole data in one run?
[02:55] zorzar_: mscdex: but how do i know which data to concat with wich?
[02:55] mscdex: zorzar_: create a variable outside your stream.on() statement and append to that every time the 'data' event fires
[02:56] zorzar_: mscdex: my first idea was to have an object that stores incoming data depeding on the filedescriptor
[02:58] zorzar_: mscdex: https://gist.github.com/24b517f52d274c0db03e this is more or less my code
[03:00] mscdex: zorzar_: is the data always non-binary?
[03:00] zorzar_: mscdex: no it will be binary
[03:01] zorzar_: mscdex: i'll get a header with a fixed length including the lenght of the rest of the message
[03:02] davidc_ has joined the channel
[03:08] tomhsx has joined the channel
[03:08] ringomanatee has joined the channel
[03:09] saikat has joined the channel
[03:10] mscdex: zorzar_: here is an easy way if you are not going to be streaming the chunks elsewhere as they come in: https://gist.github.com/9da9bec948d3d90af842
[03:12] zorzar_: mscdex: ahhh thats cool... adding the buffer to the stream is a great idea...
[03:12] zorzar_: mscdex: thanks a lot!
[03:12] mscdex: no problem
[03:13] zorzar_: mscdex: lol today i took a look at your node-asterisk module... small world...
[03:13] mscdex: heh
[03:13] mscdex: it needs a lot of love yet
[03:13] Aria has joined the channel
[03:14] mscdex: it's one of those projects on the backburner at the moment unfortunately
[03:14] zorzar_: mscdex: probably i'll get into that field in the next months. I'll hope to contribute something then
[03:18] stephen_mcd has joined the channel
[03:19] gf3 has joined the channel
[03:19] dgathright has joined the channel
[03:21] AAA_awright_ has joined the channel
[03:23] lailial has joined the channel
[03:26] admc has joined the channel
[03:31] mikew3c: I really dig node-static
[03:31] mikew3c: makes it dead-simple to test out XHR-laden pages locally
[03:32] mikew3c: cloudhead++
[03:32] v8bot: mikew3c has given a beer to cloudhead. cloudhead now has 2 beers.
[03:32] mikew3c: cloudhead has earned those beers
[03:32] mikew3c: he should be given more
[03:32] mikew3c: until he becomes fat with beer
[03:33] MikhX has joined the channel
[03:35] mscdex: at which point he will no longer be able to code
[03:35] mscdex: :p
[03:36] robotarmy has joined the channel
[03:36] stagas_ has joined the channel
[03:39] mikew3c: "never code sober"
[03:41] laheadle has joined the channel
[03:42] mikew3c: "Everything that can be done better with another tool should be, but one should not have too much pie to stay fit."
[03:43] EyePulp has joined the channel
[03:46] pedrobelo has joined the channel
[03:46] ossareh has joined the channel
[03:54] creationix has joined the channel
[03:54] creationix has left the channel
[04:00] chris_b has joined the channel
[04:02] silence has joined the channel
[04:03] sprout has joined the channel
[04:03] Christopher_Bisc: Has anyone been able to run node on a server that has Apache installed? Without going through Apache
[04:05] Aria: Yes, but that depends highly on what you mean.
[04:05] Aria: No, two things can't bind port 80 on the same IP.
[04:05] Aria: But yes, they can coexist if they bind different ports or different IPs.
[04:05] Aria: Or, one proxies to the other.
[04:05] Christopher_Bisc: I'm aware of not being able to bind both to port 80
[04:06] Christopher_Bisc: So maybe I can put node through a port and rewrite the url?
[04:06] Christopher_Bisc: I'm looking for the performance benefits to still be there when I use node
[04:09] perlmonkey2 has joined the channel
[04:10] Jaye has joined the channel
[04:12] Yuffster has joined the channel
[04:16] pyrotechinck has joined the channel
[04:20] mscdex: woo! 256 colors in ncurses!
[04:20] sprout has joined the channel
[04:21] Aaaarg has joined the channel
[04:24] ossareh has joined the channel
[04:28] Chris_Biscardi has joined the channel
[04:38] B2oba has joined the channel
[04:46] tmzt: Chris_Biscardi: you can use nginx and proxy it to both node and apache
[04:46] tmzt: that's what I'm doing mostly for vhost support
[04:47] Aria: nginx is among the better proxies, though http-1.0 only, sadly.
[04:47] Aria: If you can spare an IP, that's a good way to go -- direct bind.
[04:47] nook has joined the channel
[04:47] yozgrahame has joined the channel
[04:47] B2oba: what is vhost?
[04:48] B2oba: oh virtual host, my bad ^^
[04:50] mscdex: and nginx doesn't do modern websockets, so keep that in mind
[04:52] Aria: Yeah.
[04:56] blueadept2 has joined the channel
[04:58] Rixius has joined the channel
[05:02] amerine has joined the channel
[05:03] kiddphunk has joined the channel
[05:05] Chris_Biscardi: well the websockets kinda stinks, I think I'm either going to go with 2 IPs or porting through on 1IP
[05:05] Chris_Biscardi: thanks for the comments
[05:06] Chris_Biscardi: nginx not doing websockets stinks*
[05:06] fangel has joined the channel
[05:07] Aria: Or, if you can get away with it, change ports for node.
[05:08] Aria: (I like the multiple IP approach.)
[05:10] tmzt: nginx doesn't have to do websockets, it should pass them unmodified
[05:10] tmzt: that's what all this discussion on hybi-list is about
[05:11] ewdafa has joined the channel
[05:14] Chris_Biscardi: What's the best way to go about setting up the multiple IP's?
[05:14] ajpiano has joined the channel
[05:16] Jaye: if you are not using nginx to serve files couldnt you simply put node + express or something behind varnish-cache?
[05:16] tmzt: mscdex: sorry what do they mean
[05:18] mscdex: tmzt: websocket draft 76 and newer are not HTTP (unlike draft 75), so nginx, haproxy, or whatever else won't know what to do with it
[05:18] mscdex: the websocket request anyway anyway
[05:19] mscdex: heh
[05:21] Yuffster_work has joined the channel
[05:21] tmzt: it's supposed to upgrade the connect though
[05:23] mscdex: if it were valid HTTP, yes, but draft 76+ intentionally includes HTTP-breaking stuff
[05:23] kawaz_air has joined the channel
[05:24] mscdex: and according to the protocol author, it was an error for draft 75 to look like HTTP
[05:24] tmzt: I know, by the big discussion on hybi-list is some unknown proxy that prevents using websockets because it might allow for cache poisoning
[05:25] tmzt: so it's hard to belive that a common proxy doesn't support Upgrade: WebSocket or whatever mechanism they end up using
[05:26] Jaye: page 4 http://www.whatwg.org/specs/web-socket-protocol/
[05:26] mscdex: well, for haproxy anyway, the author has already said they do not want to start incorporating workarounds for any new protocol that is just barely not HTTP
[05:26] BrianTheCoder has joined the channel
[05:26] mscdex: afaik node is the only one that can deal with both HTTP and websockets
[05:27] ron_frown has joined the channel
[05:28] kriskowal has joined the channel
[05:28] mscdex: it's still sad to see that websocket can't do binary natively
[05:29] pkrumins: ryah: thanks for the coffee. :)
[05:30] robotarmy has joined the channel
[05:31] tmzt: mscdex: it follows the http standard for Upgrade: I don't know they rfc's to cite and it's all in a state of flux
[05:32] tmzt: because there are other proposals on the table
[05:32] piscisaureus: memory corruption sucks
[05:33] mscdex: tmzt: right, but iirc it's because there is a body in the Upgrade request, which is not legal in HTTP
[05:33] kawaz_air has joined the channel
[05:34] mscdex: other than that, it is valid HTTP afaik
[05:34] mscdex: it's all so silly
[05:34] tmzt: so what proxies do they expect to break if none work?
[05:35] tmzt: I'm really looking forward to is a per channel on('message') without a seperate http connection
[05:35] tmzt: not sure that any proposals being seriously considered have that feature (muxing basically)
[05:35] tmzt: or it's expected that javascript libraries will be used for the framing
[05:37] tmzt: at some point I wonder if something like html6 will allow for truely independent context within the page without also requiring those be threads or 'web workers'
[05:37] tmzt: or a tag
[05:40] tmzt: I'm sort of with those that have suggested something like chrome being built on node, it would be be interesting if the concept of a global dom0/netscape-derived namespace for javascript went away in favor of modules, with code that wants to interact with an html page being able to do that (and being sent a reference to the page or node as part of an event)
[05:40] Chris_Biscardi: I believe html will stop numbering after 5 and just update the spec
[05:41] tmzt: Chris_Biscardi: yes, I wasn't using it to refer to a version instead to the html6 concept, which is html+svg+js and is being discussed in various blogs I read
[05:41] Chris_Biscardi: yes, realized this after I posted :-) I do believe it's time for bed
[05:42] tmzt: hey, the versions don't mean that much anyway, just a way to keep broken ie and ns versions from clashing
[05:42] tmzt: didn't they go 3.x 4.01 or something?
[05:44] tmzt: hmm,
[05:46] Intel_iX has joined the channel
[05:46] Intel_iX: How do you get the IP of an incoming connection?
[05:47] mscdex: Intel_iX: stream.remoteAddress
[05:48] Intel_iX: How do you apply that to http connections?
[05:48] Intel_iX: Sorry if I'm being a noob. ._.
[05:48] boaz has joined the channel
[05:48] mscdex: request.connection.remoteAddress
[05:49] dgathright has joined the channel
[05:49] AAA_awright_ has joined the channel
[05:51] masahiroh has joined the channel
[05:51] Intel_iX: Ok thanks.
[05:54] mikew3c_ has joined the channel
[05:55] amerine: mscdex: Was it you that was making that sweet looking adventure-style game I was played for a few minutes a few months ago?
[05:55] mscdex: doubt it
[05:55] B2oba: lol
[05:56] amerine: damn
[05:56] mscdex: i haven't written any games yet
[05:56] mscdex: i started on a multiplayer uno game though
[05:56] amerine: I've been trying to remember all day.... my mind is coming up blank. I wan't to check the status
[05:56] amerine: I wonder if it was creationx
[05:57] B2oba: there are chat logs available
[05:57] B2oba: search for your name :P
[05:57] mscdex: yep, i'd give that a try
[05:57] B2oba: http://nodejs.debuggable.com/
[05:57] B2oba: to make it more fun, write the log parse in node.js :P
[05:58] B2oba: parser*
[05:58] mscdex: or use google to search the logs: adventure site:nodejs.debuggable.com
[05:58] mscdex: ;-)
[05:58] B2oba: hehe as I said, for the fun only -- not for practicality
[05:59] B2oba: :)
[05:59] B2oba: im interesting about the game if you do find it btw
[05:59] amerine: I think the conversation went like this: check this out: http://link
[05:59] amerine: nice
[05:59] mscdex: heh
[05:59] tmzt: mscdex: my first exploration of node was a very simple game
[06:00] tmzt: mostly because it was a video by pbaukus that led me to node
[06:00] jeffmoss has joined the channel
[06:00] mscdex: amerine: it wasn't a node knockout entry was it?
[06:01] amerine: mscdex: It might have been... I think it was a week or so after the knockout
[06:01] mscdex: amerine: http://nodeknockout.com/teams
[06:02] amerine: mscdex: Yeah I already looked there.
[06:02] mscdex: ah ok
[06:02] yozgrahame has joined the channel
[06:03] amerine: the more I think about it the more I think it might have been mikeal
[06:04] amerine: Oh well. I'll ask mikeal the next time I see him
[06:04] amerine: Thanks guys
[06:04] softdrink has joined the channel
[06:05] Ond has joined the channel
[06:06] kiddphunk has joined the channel
[06:09] dingomanatee has joined the channel
[06:11] mikedeboer has joined the channel
[06:11] shinmei has joined the channel
[06:14] mscdex: ircretary: tell mikeal amerine was wanting to know if you created an adventure game a little while back
[06:14] ircretary: mscdex: I'll be sure to tell mikeal
[06:14] mscdex: :p
[06:14] amerine: hehe
[06:14] amerine: thanks ;-)
[06:18] bingomanatee_ has joined the channel
[06:19] fangel has joined the channel
[06:20] kubrow has joined the channel
[06:20] jimt_ has joined the channel
[06:23] Figaroo has joined the channel
[06:23] Figaroo: I'm thinking of using socket.io to build a comet application. But, I'm wondering how I can know when to send a message to the client?
[06:25] jimt has joined the channel
[06:25] Jaye: socket.on('connection', function(client){ //send something to the new client } ?
[06:25] B2oba: Figaroo: There is a good example of a chat client on the node.js website
[06:25] dgathright has joined the channel
[06:25] B2oba: Jaye: Not quite, if there is nothing to send what happens? :P
[06:26] Figaroo: For example: if I'm creating a chat application, and two users connect, one user sends a message to the server and that message goes into the database. How would I know when to send a message to the other user?
[06:26] B2oba: One option, is when a user connect query whether there is something to send. If there is, send it back, register the callback until there is a message sent. When there it, notify all the registred callbacks
[06:27] benburkert has joined the channel
[06:27] B2oba: Figaroo: This is a good place to start https://github.com/ry/node_chat
[06:27] Figaroo: B2oba, sorry could you rephrase that a bit?
[06:28] B2oba: hum, i just explained how it worked in that example
[06:28] B2oba: i suggest taking a look. If you don't udnerstand something in there, let me know and I can explain if you want
[06:29] Figaroo: In a PHP comet environment, a PHP script would be iterating over a database table every second, looking for new records. Once it found something new, the PHP script would return that.
[06:29] B2oba: The example shows how to get the "comet" part of the application. However it stores the messages in memory. If you want to have messages stored in a database it is slightly different.
[06:30] rpflo has joined the channel
[06:33] AAA_awright has joined the channel
[06:33] Figaroo: hmm
[06:34] Figaroo: So with Node you can use the server's memory to store tempory data across HTTP requests?
[06:35] Jaye: node_chat checks timestamps and compares to the time of the last query. right? But doesnt socket.io emit events that you can use to send msg to the clients?
[06:36] B2oba: Jaye: My bad, didn't know you were refering to socket.io -- It is very possible, i have not used socket.io yet
[06:38] B2oba: Figaroo: That is right. It is different than writing a php file which is limited to a single request for execution. With nodejs, you can have logic to handle incoming requests, as well as logic regarding what happens after, before, during etc..
[06:38] Jaye: he mentioned socket.io so i figured he wanted to use that, seems overkill just for chat though
[06:40] Figaroo: Jaye, I only use chat as an example
[06:41] devdrinker has joined the channel
[06:41] Figaroo: B2oba, so when does the Node script end? I assume that you'll need the script to be constently running in order for your server (or entire web application for that matter) to be working. If that's the case, what if there are memory leaks or something goes wrong with that script?
[06:42] Jaye: well, socket.io emits events on 'message', so you could put code into a receiver for that event and push messages to the clients in real time, id recommend looking at eventemitters in the node api docs and the example on http://socket.io/
[06:43] stephen_mcd has joined the channel
[06:44] mfernest has joined the channel
[06:44] B2oba: You are right, nodejs is your server listening on a given port. As such it never "ends" (unless you want to take the server down). If there are memory leaks you fix them (but Javascript's gc does a good job at making it hard to leak memory -- and hope that nodejs isn't leaking on it's own), and take care of handle uncaughtException and Errors (e.g. process.on('uncaughtException', function(err) {//... });
[06:45] B2oba: if that were to fail and still take your server down, you would have a daemon that restart it automatically... but history would be lost
[06:45] SubStack: forever!
[06:45] Figaroo: Jaye, the socket.io event listener function would be client.on('message')?
[06:46] Jaye: you have socket.on 'connection', 'message' and 'disconnect'
[06:46] B2oba: Note: I've only been using nodejs for a week ^^ so I have limited knowledge
[06:47] Figaroo: Jaye, do you use coffeescript?
[06:47] Jaye: on both the server and client side i might add
[06:47] Figaroo: Jaye: but isn't the message event only for that specific client?
[06:50] Jaye: yeah, but nothing is stopping you from using a callback in there to process it and send it to all the clients? not sure what your asking
[06:51] Jaye: try looking at https://github.com/arunjitsingh/socket-chat
[06:51] SubStack: clients[client.id] = client // something like this
[06:51] B2oba: oh socket.io looks pretty amazing -- I'll have to use it at some point
[06:51] Figaroo: how would you send it to *all* clients? Is there a method for this, or is there a client array that I would need to loop through and execute send() for each client?
[06:52] SubStack: there used to be a .broadcast()
[06:52] SubStack: might still be in there
[06:52] Jaye: youd have to push the msg into a buffer somewhere and broadcast from there
[06:54] ringomanatee: question: I was using express on one machine and the messages partial worked fine when called from the layout as <%- partial('messages') %>
[06:54] ringomanatee: (ejs)
[06:54] Jaye: so basically yeah, your looking at using shift on an array of msg's, and yeah there is client.broadcast iirc
[06:54] ringomanatee: Now its complaining that the file should be [root path]/views/_messages.html'
[06:55] ringomanatee: was there a change in the pathing of partials in express?
[06:56] x_or has joined the channel
[06:57] Figaroo: say I had an on 'message' for the client. The client sends a message. The server receives the message and the on 'message' callback fires. In the callback I would add the message to a buffer variable with a relatively global scope. I would then need a way to broadcast that message to all clients. If there was a broadcast method of some kind, great, but what if I also wanted a way to push the message down to only a select few clients (clients in
[06:57] Figaroo: a specific channel for example)
[06:57] robotarmy has joined the channel
[07:02] Jaye: have not used multiple channels yet so dunno really
[07:02] devdrinker has joined the channel
[07:03] B2oba: you would need a separate logic to handle "chat channels" (list of users), and "a websocket channel" (1-1 client-server mapping)
[07:03] Jaye: send a channel name in the json object from the client and use that to only push their msg to certain buffers? something like that
[07:04] Jaye: security issues with that though i spose
[07:05] Jaye: https://github.com/maccman/juggernaut is built on socket.io and has pubsub channels, maybe have a look?
[07:06] B2oba: when one of those "chat channels" receives a "text message", select all the users in that chanel, which are bound to a single websocket. Send a message through that websocket (e.g. {channelName: 'Node.js', Message: 'Hello', From: 'B2oba'})
[07:06] B2oba: something like that?
[07:07] Jaye: that would work but i think he wants an "ALL" channel as well as private ones, and seperate messages depending on clients
[07:08] B2oba: Private channel is just like any other channel, except there are only two members registred to it ;)
[07:08] B2oba: but yeah this is implementation details, not really nodejs/socket.io specific -- makes sense Figaroo?
[07:10] SubStack: just implement irc
[07:10] SubStack: why, you're using irc right now!
[07:10] Jaye: why do that when you can reinvent the wheel? why, there is even a node-irc lib :P
[07:11] kiddphunk has joined the channel
[07:11] SubStack: node-irc and irc-js and jerk
[07:11] SubStack: I recal somebody wrote an irc server in node too
[07:12] mr_daniel has joined the channel
[07:12] Jaye: recalling an earlier convo, has anything written a reverse-proxy cache in node yet? full-node stack on my server would be nice
[07:14] Jaye: just asking before i start working on one
[07:17] AAA_awright: What's so great about a "full-nodejs" stack? If you can do even better with Nginx why not use that?
[07:18] Jaye: "because i can"? :P
[07:18] Jaye: also, websockets and nginx/varnish dont play nice
[07:18] x_or has joined the channel
[07:19] MikhX has joined the channel
[07:20] alek_br has joined the channel
[07:22] dnolen has joined the channel
[07:23] muk_mb has joined the channel
[07:23] Figaroo: I'm not looking to create a chat thing
[07:24] mikeal has joined the channel
[07:24] Figaroo: just trying to understand how socket.io would work
[07:24] Figaroo: I'm coming from a PHP background, so Node is very new to me.
[07:25] gkatsev: Figaroo: welcome to the light side of the force. :)
[07:25] Figaroo: gkatsev, haha. Are you confirming that Node can replace PHP? I've been asking that around, and been getting mixed answers.
[07:26] gkatsev: what do you mean replace?
[07:26] gkatsev: can you do, in node, everything you can do with php? sure.
[07:26] m64253 has joined the channel
[07:27] Jaye: you can run php almost everywhere, you need to configure node on a server if you want it, a big minus for someone who doesnt like admin
[07:27] ph^ has joined the channel
[07:27] Figaroo: Jaye, wouldn't eventually we be seeing more Node hosting services?
[07:27] gkatsev: heroku does node
[07:28] Jaye: heres to hoping the heroku node hosting arrives this year
[07:28] gkatsev: joyent is working on node hosting in no.de
[07:28] B2oba: yeah... i was in that boat a week ago. Got introduced to VPS through node
[07:28] Figaroo: Anyway, if I were to store all messages in memory while they get pushed down to the clients, then the limit to how many users the server can handle is based on how much memory there is to go around. Wouldn't storing these messages in a database scale better?
[07:28] B2oba: really depends on your scenario
[07:28] gkatsev: 2host.com, cheapest vps hosting every. via tmzt
[07:28] Figaroo: B2oba, you only recently switched to Node from PHP?
[07:28] B2oba: yes a week ago
[07:29] Figaroo: Are you doing a mix of PHP and Node or did you just split cold turkey, B2oba?
[07:29] gkatsev: Figaroo: but yeah, as I said, you can do everything in node as you can in php. There are draw backs. For example, node isn't really available everywhere and it is also new in its life cycle.
[07:29] B2oba: I didn't "switch", but i learned node... I think as of today, they both serve a different purpose
[07:30] B2oba: if you're looking for socket.io, real time application that scale "better" -- Then i'd definitly go with node.js
[07:30] Figaroo: gkatsev, yeah he introduced that to me too, I think I will go with them when I decide to get a VPS. However, their bandwidth is all the same across all their plans (10TB)
[07:30] Jaye: well DB calls will slow things down as opposed to keeping it in memory and letting the OS handle swapping to disk, if you are going to be needing to do load-balancing with mutiple instances you have no choice but to use a DB
[07:30] B2oba: if you're looking for more fun, and learn new technology and a bunch of useful things -- go with node and get a VPS and learn about server setup etc..
[07:30] Jaye: or fiddle with IPC (ew)
[07:30] gkatsev: Figaroo: there is also prgmr which is fairly cheap
[07:30] B2oba: If you're looking forward building a "standard" web application, quickly, I'd go with php
[07:30] Figaroo: Jaye, what's load-balancing?
[07:30] hackeron has joined the channel
[07:31] B2oba: Figaroo, I'd suggest going with Chunkhost, they have a free beta :)
[07:31] hackeron: hey, can someone explain to me what are the advantages of using Node.js over say EventMachine in Ruby or Twisted in Python?
[07:31] B2oba: and get your documentation from Slicehost
[07:32] Jaye: for example running 4 seperate instances of an app on different cores or even phsucal servers, im not sure there are many node.js apps around yet that need to resort to that?
[07:32] Figaroo: wait, Chuckhost is giving *free* VPSes away?! O.o
[07:32] gkatsev: hackeron: js is by nature nonblocking and eventful while ruby and python are not.
[07:32] B2oba: Figaroo: for the moment, you'll probably end up paying 20$ in a month or so... but it's a good way to learn (you still have to give you credit card info etc..)
[07:33] Figaroo: Jaye, you mean eventually you'll need to put the node server on multiple pieces of hardware once you get *really big*?
[07:33] hackeron: gkatsev: so? - the syntax to achieve non blocking operations is basically the same in each.
[07:33] Jaye: node is single-threaded, so for more concurrency you spool up more instances
[07:33] dgathright has joined the channel
[07:34] B2oba: gkatsev: wow, 2host is very cheap compared to a lot of other VPS. Are you using it?
[07:34] hackeron: Jaye: aha, so same in EventMachine and Twisted :/
[07:34] Figaroo: B2oba, that's what I thought. If I'm not carefull I'll get a $20 bite off my card. But if I just went with 2host, it's only $5 for the same thing.
[07:34] gkatsev: B2oba: no, tmzt is, though.
[07:35] Jaye: hackeron: well personally, i think JS handles async more elgantly than twisted and ruby, but personal choices
[07:35] gkatsev: it does handle async better
[07:36] B2oba: hackeron: very similar. One of the main differences is it's easiest and quicker to get started, and it uses javascript which many already know and is event oriented (thus well suited) -- especially for doing web applications
[07:36] hackeron: Jaye: well, it all still looks like a callback spaghetti, I'm currently using coroutines for concurrency which is far more elegant than callbacks
[07:36] Figaroo: These huge sites, like google/facebook, they need to have multiple "cores" (I'm guessing that's what they call them) for their servers -- it's not just a single box like a dedicated server?
[07:36] Jaye: try using the step library by creationix to ease the pain of callback-hell
[07:37] hackeron: B2oba: hmmm, is there an MVC framework for it like Rails or Django?
[07:37] Figaroo: JavaScript is also used exclusively on the front-end, as everyone already knows. Which means no more language switching.
[07:37] Jaye: http://github.com/creationix/step
[07:38] Jaye: yeah, you can even push code from the server to client, is nice
[07:38] josephhitchens has joined the channel
[07:38] dnyy has joined the channel
[07:38] Figaroo: Jaye, hmm that sounds scary. :\
[07:39] B2oba: Figaroo: It could be interesting to have shared code between client and server
[07:39] Jaye: ive only pushed down generated js templates that way, there are security concerns
[07:39] Figaroo: right, pushing down would definately be a lot less scary than pushing up, haha
[07:40] josephhitchens: does "Array.prototype.slice.call(a)" just return a duplicate of the array "a"?
[07:40] Me1000 has joined the channel
[07:40] josephhitchens: anyone know?
[07:40] hackeron: Jaye: yeh, that's why I'm interested in node, so I take it it's pretty easy to have a browser open a socket connection to node.js for realtime browser applications then? - In Python/Ruby/PHP you pretty much need to run maybe an AMQP server to proxy everything between the client and server
[07:41] Jaye: yeah, its fairly easy with socket.io, but as i was talking about before some stuff doesnt play nice with sockets, thats not nodes fault though
[07:41] Jaye: you can go more low level and just use your own eventemitters too but ughh
[07:42] hackeron: hmmmm
[07:43] Jaye: also node isnt just for http and websockets, you can implement arbitrary socket protocols
[07:43] kriskowal: josephhitchens: yes
[07:43] hackeron: Jaye: I see, I'll experiment with it. So are there any MVC frameworks for it?
[07:44] hackeron: I donno though, maybe javascript is better suited for event driven stuff, but god I hate the syntax - wonder how compatible coffeescript is, hmmm
[07:45] B2oba: hackeron: Have you ever used javascript before?
[07:45] Jaye: you can pretty much follow an MVC pattern using something like express or zappa
[07:46] kriskowal has joined the channel
[07:46] Jaye: i use coffeescript, and am in love with it :P zappa is coffeescript
[07:46] hackeron: B2oba: not heavily, used it for this http://leo1.xanview.com - username/password: demo/demo
[07:46] hackeron: B2oba: try the live view
[07:47] hackeron: but I guess that's more jquery than javascript :)
[07:47] hackeron: Jaye: I'll check it out, thanks :)
[07:47] ryah_ has joined the channel
[07:48] rphillips has joined the channel
[07:48] Jaye: for my app i settled on coffeekup for views, chaos for models and zappa for routing/controllers
[07:49] Figaroo: Jaye, what's zappa?
[07:49] onar has joined the channel
[07:49] jakehow has joined the channel
[07:49] ncursestest34 has joined the channel
[07:49] ncursestest34: frank zappa!
[07:49] ncursestest34: :D
[07:49] Jaye: https://github.com/mauricemach/zappa
[07:49] Jaye: lol
[07:50] Jaye: its basically a sinatra clone
[07:50] yozgrahame has joined the channel
[07:50] ncursestest43 has joined the channel
[07:50] ncursestest43: bam!
[07:52] ncursestest43: ACTION does a dance
[07:52] B2oba: hackeron: cool stuff. I would suggest reading "Javascript, the good parts" to learn more about the language. It's pretty short and a useful summary
[07:52] ivan has joined the channel
[07:53] hackeron: B2oba: that's a contradiction of terms :P
[07:54] Figaroo: is all javascript code valid coffeescript code?
[07:54] hackeron: good javascript == heavily abstracted javascript :P
[07:54] Jaye: no, all coffeescript creates valid javascript
[07:54] hackeron: behind jquery and coffeescript is just about alright
[07:54] Jaye: but JS wont pass through the coffeescript parser
[07:54] mscdex: i'm waiting for someone to create lattescript
[07:54] B2oba: but all javascript is valid coffeescript too
[07:54] B2oba: oh?
[07:54] hackeron: mscdex: what's lattescript?
[07:55] Jaye: you have to wrap JS in ''' for it to go through the parser, you can use JS in a CS file though
[07:55] mscdex: i don't know, maybe you'll be the one to create it? ;-)
[07:56] hackeron: mscdex: what's wrong with coffeescript?
[07:56] Figaroo: .cs is a coffeescript file extension?
[07:56] hackeron: Figaroo: I think it's .coffee
[07:56] Jaye: also coffeescript really wants you to use the module pattern, methods are like somemethod = (somearg, secondarg) => which compiles to var somemethod = function(somearg, secondarg){
[07:56] Figaroo: longer extensions FTW!
[07:57] mscdex: hackeron: i can't comment since i've never used it, but i was just poking fun at the coffee-themed language names
[07:57] hackeron: Figaroo: that's right :P - like htm vs html
[07:57] Figaroo: Jaye, that's interesting. ()-> replaces function(){}, but i don't like how the last statement of the function in CS returns the value...
[07:57] Jaye: poor old cappuccino, always forgotton
[07:58] Jaye: yeah that bugs me too
[07:58] Jaye: you can write an explicit return to get it to return where you want, but you dont always want that, not sure how he'd fix that
[07:58] Figaroo: Interesting, back in the cappuccino times (when it first released) I wrote out in notepad a sort of draft my own language I was going to "eventually" interpret to JS.
[08:00] Figaroo: So is CS interpretted? compiled? how does that work?
[08:00] Jaye: both, you can run an interpreter in the browser, or compile to JS first, it also has a node app so you can 'coffee app.coffee' instead of 'node app.js'
[08:01] Me1000: Jaye: always forgotten? I dont really think so... there is a ton of work going into it, and some great apps out there and new ones on the horizon
[08:01] stagas has joined the channel
[08:01] Me1000: ACTION is on the cappuccino core team
[08:01] Figaroo: cappuccino = framework. On the other hand, Objective-J = language.
[08:01] Jaye: your right the blog actually got updated, zomg!
[08:02] B2oba: funny :)
[08:02] Me1000: Jaye: we're releasing 0.9 very very soon, RC1 came out a couple days ago
[08:02] Jaye: i actually use mockingbird and your issues app so dont think im putting down capp or anything :)
[08:02] Me1000: Figaroo: that is correct, and there is a 2nd iteration of the language in the works
[08:02] Figaroo: Objective-J 2.0?
[08:03] Me1000: yup
[08:03] Jaye: oh? any big changes?
[08:03] Me1000: @each loops
[08:03] Me1000: and the removal of the with() statement
[08:04] Figaroo: It seems like there's a little bit of a barrier to entry with Cappuccino.
[08:04] Figaroo: You can write CS on the server with Node right?
[08:05] Me1000: Jaye: hope you like the issues app :)
[08:05] Me1000: Figaroo: I mean, the barrier is the same for any real framework...
[08:05] Jaye: its basically objective-c though, if you are a mac dev its not such a big barrier, what confused me was getting stuff into Atlas, hope i someday get a chance to build something complex enough to use capp but alas it hasnt come to be :P
[08:06] echosystm: i have no idea why people would want to use objective j
[08:06] Figaroo: is there a server-side interpretter for coffeescript?
[08:06] B2oba: Yeah i tried cappucino once, and the barrier was too much to take one shot for me -- i never used objective C or a mac
[08:06] Jaye: yes
[08:06] echosystm: it;s like the worst language in the world being compiled to one of the better ones
[08:07] B2oba: I was sad, looking at the things it does. Really looks powerful
[08:07] echosystm: (im saying this as an ex-iphone dev)
[08:07] Jaye: figaroo: you can run coffeescript on node without compiling to JS
[08:07] Figaroo: B2oba, like-wise
[08:07] Jaye: just npm install coffee-script, coffee app.coffee or require('coffee-script');
[08:07] Me1000: objj is crazy dynamic
[08:08] Me1000: <3 objj
[08:08] Jaye: any chance of objj in node? :)
[08:08] fangel: Jaye: or technically with JIT compiling.. :)
[08:08] Me1000: actually, there is a guy that has worked on that, but it requires some extra work (right now)
[08:08] Me1000: objj 2 might solve that
[08:09] Me1000: the problem I have with people putting down capp on the grounds of objj is that you're going to be spending soooooo much more time learning cappuccino than you are learning objj
[08:10] Figaroo: So CS comes with an interpretter, but once I'm finish developing, is there a way to easily store all the interpretted files in a sort of cache? That would be cool, if CoffeeScript simply had a cache; it stored all interpretted files and only when a file changes (mod date changes) does it re-compile them.
[08:10] mikeal: ryah_: did you see this https://developer.mozilla.org/en/JavaScript_typed_arrays shipped in FF beta
[08:10] B2oba: mikeal: Did you write a adventure game in nodejs in the past?
[08:11] Jaye: dont think so, but writing a node script that watches files and runs CS on them when they change wouldnt be hard
[08:11] Me1000: Jaye: interestingly enough the issues app server was written in node, but it's all straight js
[08:11] mikeal: nope
[08:11] mikeal: i think i remember judging one for the node knockout tho
[08:11] B2oba: mikeal: Ahh ok. Some guy earlier was looking for it, and he though you might have been the owner. thks
[08:12] Jaye: yeah running on heroku node beta right? i mostly just ask because i dont have much experience with narwhal and dont want to leave my comfort zone :P
[08:12] Me1000: yep
[08:13] Figaroo: I wonder if one day these interpretted/compiled languages will ever get promoted to native browser support. You'd think Apple would consider this in Safari. :\
[08:13] Me1000: there was actually talk of moving all the cappuccino build tools to node, but it's crazy difficult because we've changed technologies for our build tools five times already
[08:13] B2oba: Figaroo: never
[08:13] Jaye: figaroo: there is a draft spec for that already, or maybe it died?
[08:14] Me1000: B2oba: dont be so sure...
[08:14] Figaroo: B2oba, never?
[08:14] Figaroo: Jaye, linnk?
[08:14] B2oba: fine... i hope never. When browser start implementing their own stuff (which are not standard) it breaks all the other ones. Applications are not portable anymore
[08:15] Me1000: I know for a fact there are a couple very influential people that think it's a good idea...
[08:15] Jaye: http://code.google.com/p/nativeclient/
[08:15] Me1000: inside companies/organizations that can change it
[08:15] Jaye: support is... minimal
[08:15] B2oba: The beauty of html/javascript/css is that it's "almost" the same across all those platforms
[08:15] Jaye: there is also that silverlight app that runs python/ruby in the browser
[08:15] Jaye: but really...JS is good enough, better even
[08:15] Me1000: B2oba: the hell that is html/js/css is the reason cappuccino exists
[08:16] Jaye: we have CS and objj for higher level
[08:16] Figaroo: Why couldn't objj become a standard?
[08:16] B2oba: well if it becomes standards it's a different story.
[08:16] B2oba: i'm all for better standards
[08:17] Me1000: standard is such a poor word... you want it certified by the browser vendors?
[08:17] Figaroo: But, anyone could go and make it a standard under their own organization.
[08:17] Me1000: or ecma?
[08:17] Jaye: w3c moves so slow youll be waiting a long time
[08:17] B2oba: standards are defined by marketshare lol
[08:18] Me1000: hardly, take a look at IE
[08:18] Figaroo: I don't see ActiveX as much of a standard
[08:18] Figaroo: haha
[08:18] Jaye: filters never caught on despite ie's 90% marketshare :P now we have css3
[08:18] B2oba: they defined quite a lot -- for the worst -- over the last decade...
[08:19] Jaye: ajax i suppose
[08:19] Figaroo: Ajax, only after XHR lol
[08:19] devdrinker has joined the channel
[08:20] dgathright has joined the channel
[08:20] B2oba: anyways, objj on safari would be like activeX == fail (imo)
[08:20] devdrink_ has joined the channel
[08:20] B2oba: xD
[08:20] Me1000: but that doesnt make sense
[08:21] Me1000: objj is just a higher level language
[08:21] Me1000: it's still all completely valid JS
[08:21] Jaye: also i hate IE grr, im forced to support it for a client that sells stuff to the gov and always end up mangling my markup to get it working
[08:21] Figaroo: You can write JS in objj
[08:22] Figaroo: I'm talking about capp though, if capp became a standardized framework
[08:22] Me1000: hell, you can do things like var foo = []; [foo objectAtIndex:bar] === foo[bar];
[08:22] Figaroo: Jaye, is Chrome Frame an obtion?
[08:22] Jaye: i thought the entire point was objj will run anywhere JS can so you guys dont fall into the "only works on one browser" pitfall
[08:23] Me1000: Jaye: you can
[08:23] Me1000: we run in every browser
[08:23] Figaroo: Jaye, but the point is objj works already in every browser
[08:23] Jaye: figaroo: nope, sadly, they understand it means some features cant be implemented so its not a nightmare, they are reasonable
[08:23] mikeal: objj works everywhere, it just compiles to js with the objj implementation there
[08:23] mikeal: dude
[08:23] Jaye: yeah thats what i mean me :P
[08:23] mikeal: just write javascript
[08:23] mikeal: you'll be happier
[08:24] Me1000: until you want classes, or code importing anyway :)
[08:24] B2oba: hum... I got confused at some point, i apologize ^^ I'll have to look more into objj
[08:24] clarkfischer has joined the channel
[08:24] Me1000: then you rely on your framework/server
[08:24] Figaroo: if safari got native with objj, then it would just mean no need to load the interpretter for that browser, eventually other browser will probably support it too, or not. Doesn't matter either way.
[08:24] SamuraiJack has joined the channel
[08:24] mikeal: lack of class inheritance has never stopped someone from building a working application
[08:25] Me1000: B2oba: please feel free to ping me at any point, I'll clear up any questions you have :)
[08:25] Jaye: ps , prototypes
[08:25] mikeal: Figaroo: that's never going to happen
[08:25] Me1000: Figaroo: keep in mind most applications are compiled before they're deployed... there is not objj to js conversion on the server (when actually deployed)
[08:26] Jaye: you can serve a capp app as static files iirc, and just have a small server handle the ajax
[08:26] Me1000: mikeal: never say never :)
[08:27] mytrile has joined the channel
[08:27] mikeal: i know a lot of people who work on browsers, it's not going to happen
[08:27] mikeal: IE thinks this about every language they ever write
[08:27] Me1000: Jaye: of course... we're completely server agnostic... in fact most of my apps never see a server until I absolutely need to store data on it
[08:27] mikeal: it never happens
[08:27] mikeal: aza even tried to get pyscript in to Firefox, didn't happen
[08:27] B2oba: Me1000: Thanks :) I'll definitly give cappucino a second try
[08:27] Me1000: mikeal: I know people who work on browsers too, people who are in favor of it
[08:28] mikeal: it might happen in one browser, but it'll be mostly ignored by the other vendors
[08:28] B2oba: Me1000 must know people working on safari
[08:28] B2oba: mikeal, which browser? :P
[08:28] mikeal: that's how this works, you can't get them to agree on anything but javascript, and even that is hard
[08:28] mikeal: new language support for any language or DSL
[08:29] mikeal: is a pipe dream
[08:29] Me1000: Here's the thing, the only real advantage native non-js languages have comes when you start developing... at deployment it's all compiled.
[08:29] Jaye: http://code.google.com/p/nativeclient/ ?
[08:29] Me1000: so, you only need one browser to do it
[08:29] mikeal: brendan actually talked a little about it a few podcasts back on aminutewithbrendan
[08:30] Figaroo: I love how #node.js is so kick-back; no flames from off-topic conversations. :P
[08:30] mikeal: Figaroo: pretty soon we'll have to start a #nodejs-dev channel
[08:31] mikeal: just to get out of this
[08:31] mikeal: at least we aren't talking about coroutines :)
[08:32] B2oba: ACTION is going to create node.f90 -- Fortran ftw :P
[08:32] dgathright has joined the channel
[08:33] mikeal: that would be an awesome April fools joke
[08:33] mikeal: i love *working* april fools jokes
[08:33] B2oba: mikeal: Want to make it happen? :P
[08:33] mikeal: like GitHub's svn support, which is still in production :)
[08:33] Me1000: manual memory management in cappuccino ;) that was our last one
[08:33] mikeal: jspp started as an April fools joke, then i realized it was kind of useful
[08:33] Jaye: github has svn support? lol
[08:33] Me1000: it actually worked.
[08:34] mikeal: Me1000: that is awesome
[08:34] Figaroo: mikeal, wtf is a coroutine. =S
[08:34] mikeal: oh man, i remember ryan was going off once at a bar about how he wants a function language with simple syntax and closures but manual memory management
[08:34] Me1000: we had like auto-release pools retain, release, etc... lots of confusion on the first of april :D
[08:34] mikeal: it was awesome, at some point he was like "who really wants a gc?"
[08:35] mikeal: and me and isaacs were like "umn… everyone"
[08:36] Figaroo: what is this quarl some ppl have with a gc?
[08:36] yozgrahame has joined the channel
[08:38] mikeal: you know what people hate the gc? the people who implement it
[08:38] mikeal: that's pretty much it
[08:38] jacobolus has joined the channel
[08:38] mikeal: if you have to deal with the internals, you hate it
[08:39] mikeal: and you're like "why can't people just do this themselves, lazy bastards"
[08:39] mikeal: and of course, people like ryan
[08:40] mikeal: :)
[08:40] Me1000: http://cappuccino.org/discuss/2010/04/01/solving-the-javascript-memory-management-problem/
[08:40] SubStack: I love the GC
[08:40] SubStack: it just works™
[08:40] qFox has joined the channel
[08:41] mikeal: until you hit 1.7gigs
[08:41] mikeal: then you're fucked :P
[08:41] Jaye: i wouldnt complain if GC was optional
[08:41] Figaroo: I thought V8 already did this for ryan?
[08:42] dave has joined the channel
[08:42] Me1000: Jaye: it is, just keep a reference to your object :P
[08:42] mikeal: ryan hunts down a lot of leaks and weird things in the gv
[08:42] mikeal: er gc
[08:43] Jaye: has it turned him into an angry husk of a man?
[08:44] Figaroo: I have a Node related question, because I know we're missing those oh so much.
[08:44] m64253 has joined the channel
[08:45] Figaroo: is emitter.on a shorthand for emitter.addListener?
[08:45] mikeal: yes
[08:45] mikeal: addListener was too many characters
[08:45] Figaroo: is there going to be a move towards just 'on'; will addListener be depreciated?
[08:45] mikeal: made all the code on our slides not fit
[08:46] mikeal: i don't think there is a plan to deprecated it
[08:46] mikeal: because removeListener doesn't have a shorthand
[08:46] Figaroo: .off?
[08:46] mikeal: eww
[08:46] Figaroo: lol
[08:47] Jaye: eventemitters as lightswitches lol
[08:47] Figaroo: that actually would be pretty epic IMO
[08:47] Figaroo: this seems like the way things should be done in browsers.
[08:47] mikeal: DOM is verbose
[08:47] Figaroo: you think addListener is long, we've been stuck with addEventListener.. :\
[08:47] mikeal: mostly because it's designed by committee
[08:48] Jaye: in the browser events bubble up so you can kinda-sorta write similar code
[08:48] Figaroo: because committees like to talk?
[08:48] mikeal: committess like to bike shed, so you end up with the solution that everyone hates the least
[08:49] mikeal: which means verbose and clear, impossible to misinterpret but ugly
[08:49] Jaye: souless code
[08:49] mikeal: take a look at any of the new specs
[08:49] mikeal: it's the same shit
[08:49] mikeal: every revision of the IndexedDatabase spec gets more verbose
[08:50] mikeal: actually, that's not true, the first revision was less, but all the subsequent changes have removed shorthands and conveniences for the sake of uniformity
[08:50] mikeal: but none of this shit matters
[08:51] mikeal: people don't write DOM, they write jquery
[08:51] mikeal: people won't use IndexedDatabase, they'll use some library that implements a nice database on top of it
[08:51] Figaroo: I wonder if not defining API would work for the committees. Rather, they just define what the browser can do using a very low level language, like JS only more machine like, then us developers can create the frameworks/languages around that.
[08:51] Jaye: wouldnt it be nicer if browsers just used jquery like syntax though? ahh fantasies
[08:52] adambeynon has joined the channel
[08:52] Figaroo: Like I said, if browsers encouraged us to make our own APIs, that would benifit all of us.
[08:52] mikeal: the problem with multiple languages in the browser is that they both get access to the same global scope on the page and since they have different garbage collection methods they can't have a compatible unified GC and will just leak
[08:53] mikeal: ECMA Harmony is basically a new language
[08:53] Figaroo: No multiple GCs
[08:53] mikeal: the only real requirement on it is that it needs to be able to share a GC with ECMA5
[08:53] Figaroo: just the single language which is very capable of creating interpretters on top of, easily and efficiantly.
[08:53] Jaye: figaroo: big architectural changes cant be made because the web is still full of dinosaurs, breaking backwards compatibility is basically a death sentence
[08:54] mikeal: Jaye: that's changing tho
[08:54] Figaroo: Unless one started their own network and made it "popular" within a click
[08:54] mikeal: IE6 is the last browser with significant market share that didn't ship with an updater built in
[08:54] Jaye: i look forward till the day i dont need polyfills, heres hoping
[08:55] mikeal: so once we get over this last hump, updates will be adopted a lot faster
[08:55] Figaroo: ugh, idealism is such a bitch. :\
[08:56] mikeal: some day M$ is just going to send someone to everyone's house who is running IE6 and smash their computer with a hammer
[08:56] mikeal: they have the money
[08:56] Jaye: atm its "write ugly draft", "refactor into something to be proud of", "obliterate with hacks"
[08:56] Figaroo: more like a hot, sexy black widow -- lures you in but then destorys you.
[08:56] B2oba: Figaroo: Those are facts, it's impressive to see Chrome's update rate -- One could argue that most people using Chrome are tech-savy in the first place, and more apt and willing to update
[08:56] mikeal: Chrome updates easily and seamlessly, that's the key
[08:57] mikeal: for what it's worth, new IE versions do a much better job too
[08:57] Figaroo: Chrome is the future web browser, I don't care who uses it, I care who's not using it.
[08:57] Jaye: well, i assume latest or near-latest version for non-ie people, and its usually fairly correct, so...
[08:57] Jaye: thank you vendors for updaters
[08:57] mikeal: i don't want any one vendor to dominate the browser space
[08:57] mikeal: we've seen that, it sucks
[08:58] Figaroo: I have a feeling that chrome might be in line for that, and it will suck
[08:58] mikeal: doubtful
[08:58] mikeal: their international numbers aren't anything to write home about
[08:58] Figaroo: for a year, chrome has had one bug on rounded borders, still haven't gotten around to it. Maybe this is just because it's CSS3
[08:58] mikeal: they've done very well int he US, but that's about it
[08:59] mikeal: Firefox has a dominant market share in Europe now, which is much harder to eat in to that IE
[08:59] ROBOd has joined the channel
[08:59] Figaroo: It's only a matter of time my friend. :P
[08:59] Jaye: chromes SVG support isnt anything to write home about either
[08:59] Jaye: ive run into a few bugs
[08:59] mikeal: i really hate SVG
[09:00] Figaroo: Once google enter's the notebook market, the rate of increase in market share will start to expand even faster than already.
[09:00] mikeal: dealing with SVG nodes reminds me of dealing with XBL nodes in XUL, just aweful
[09:00] B2oba: Figaroo: They did enter and are failing miserably
[09:00] Figaroo: B2oba, what when?
[09:00] Jaye: well, once again... a lib saves the day, raphaeljs ftw
[09:00] B2oba: ChromeOS?
[09:01] mikeal: haha, a successful market entrance in to notebooks would give them an almost unnoticable increase in relative market share
[09:01] Figaroo: Not out yet?
[09:01] mikeal: you know what market share all new computers sold in a year is?
[09:01] mikeal: about 1%
[09:01] fille12 has joined the channel
[09:01] Ratty_ has joined the channel
[09:01] mikeal: less if you include mobile in your numbers
[09:01] fille12 has left the channel
[09:01] Figaroo: I stand corrected then
[09:02] Jaye: what about all those android and ios phones running webkit?
[09:02] B2oba: webkit is only a rendering engine however
[09:02] Figaroo: that's another question, will Chrome OS be launched on a tablet?
[09:02] fille12 has joined the channel
[09:02] mikeal: smart phones will outsell all desktop computers this year
[09:02] mikeal: they beat out laptops last year
[09:03] mikeal: Apple is releasing their Q4 results soon
[09:03] Figaroo: but then again, smart phones are relatively new
[09:03] mikeal: speculation is that they sold something like 10M iPads
[09:03] mikeal: that's fuckin crazy
[09:03] Ratty_: Is there any work on something like a one-click installer for windows?
[09:03] Jaye: i doubt android tablets will beat ipad, i have an ipad and got my BF one of those new-hotness android tablets and its really not as good
[09:04] Jaye: *GF
[09:04] mikeal: android's biggest problem is how "open" it is to Carriers fucking it up
[09:04] Figaroo: Jaye, lol
[09:04] Jaye: bad typo :(
[09:05] B2oba: Ratty_: I don't think there is. I think right now you still need to install cygwin first, and from there install nodejs from bash
[09:05] Figaroo: you could have gotten away with it, I was assuming "best friend" for a second there.
[09:05] mikeal: node on windows isn't a great story right now
[09:05] B2oba: Ratty_: maybe Mikeal knows if there is a effort in progress
[09:05] Figaroo: I'm on cygwin. don't hate.
[09:06] mikeal: so
[09:06] mikeal: nobody who works on node core is working on an alternate windows version
[09:06] mikeal: so it's cygwin for a while, officially
[09:06] stephank has joined the channel
[09:07] Jaye: what does putting it on cygwin do to performance? i mean thats a big selling point for node...
[09:07] Ratty_: Shame, I'm making a web framework, currently using python to do various tasks, but would like to use node. Just a lot of users will be Windows people, and there's far too many steps involved to get node running on windows.
[09:07] mikeal: another company is suppose to be putting some of their own effort and weight behind a better port that uses Window's hot native non-blocking stuff
[09:07] mikeal: but i can't give specifics and it hasn't materialized yet
[09:07] mikeal: i woudn't run on cygwin in production
[09:08] mikeal: it's fine to develop against, but you should always run posix in production
[09:08] mikeal: Ratty_: i would like to see someone just create a one click cygwin install/env for using node
[09:08] Ratty_: Yeah
[09:08] mikeal: installing cygwin is it's own pain in the ass
[09:08] Ratty_: Can't be that hard, really.
[09:08] altamic has joined the channel
[09:09] B2oba: that would definitly get a lot more people on node.js ^^ hum... i wish i wasn't as busy these days --
[09:09] Jaye: famous last words
[09:10] Jaye: cant be that hard
[09:10] B2oba: lol
[09:10] Ratty_: I ain't a windows guy, so I'm not doing it
[09:10] Figaroo: is joyent free?
[09:10] mikeal: windows support is surprising important for large scale adoption
[09:10] Ratty_: Maybe that's why it doesn't exist.
[09:10] mikeal: Apache server made it over a huge hump once it had a windows installer
[09:10] B2oba: mikeal: why do you find it surprising?
[09:11] mikeal: when you live in bay area, it's hard to imagine a developer that doesn't have a Mac
[09:11] B2oba: ahh ok, i don't live there :(
[09:11] mikeal: actually, fuck that, a *new* Mac
[09:11] mikeal: always
[09:11] Jaye: must compile faster!
[09:11] Wizek has joined the channel
[09:11] Figaroo: god, send me a hand me down. :P
[09:11] mikeal: everyone wants the new shiny :)
[09:12] Ratty_: iPad 2 is my next purchase
[09:12] mikeal: my fiance has dibs on hand me downs
[09:12] B2oba: But yeah, Windows (xp/vista[ughh]/7) is by faaaar dominating the PC OS market
[09:12] Jaye: windows server doesnt do as bad as geeks generally assume btw, in marketshare
[09:12] Figaroo: damn it. I'm not high enough on the hand me down pyramid...
[09:13] Figaroo: B2oda, so what's new?
[09:13] Ratty_: Maybe you'll get a powerbook soon
[09:13] stride: aw nodejitstu.. couldn't you have announced winston _before_ I put my custom rabbitmq-based logging everywhere in mycodes? :))
[09:14] Figaroo: uh, not that kind of hand me down..
[09:14] B2oba: Figaroo: just saying that's why there's a direct correlation -- I didn't know about the Mac domination in the bay area
[09:14] Jaye: whats funny is developing on a mac with such a nice UI... and spending most of the time with your head in terminals and textmate
[09:14] Ratty_: Jaye: I like to use terminal vim, much cooler.
[09:14] Jaye: vim makes me rage :P
[09:15] Figaroo: Jaye, but even the terminals look great on a Mac lol
[09:15] Ratty_: iterm2 is awesome
[09:15] nook has joined the channel
[09:15] Figaroo: it's transparent for gods sake, com'on how cool is that!
[09:16] Figaroo: I wonder how fast I can crank out a CodeIgniter clone for Node...
[09:16] Jaye: why would you even... i dont even... e_e
[09:17] mikeal: i love iterm2
[09:17] Figaroo: Jaye, what?
[09:17] und3f has joined the channel
[09:17] mytrile has joined the channel
[09:18] Jaye: you must be a php guy i guess
[09:18] Figaroo: I'd say I'm more of a JS guy, but yeah.
[09:18] Figaroo: Which is why I'm doing the Node thing..
[09:19] Figaroo: I never used CodeIgniter before, but it looked like it had a pretty good MVC pattern.
[09:19] B2oba: CodeIgniter is pretty cool, and very lightweight
[09:19] Ratty_: I'm sure someone will do Node on Rails
[09:19] Figaroo: NodeIgniter, I'm going to call it :P
[09:19] Ratty_: Node on Nails
[09:19] Figaroo: lol
[09:19] Figaroo: totes
[09:20] B2oba: I used CodeIgniter + Doctrine ORM. And throw in a few Zend libraries as needed
[09:20] Figaroo: That would be epic-ly perfect
[09:20] Figaroo: Never got into Rails though
[09:20] Ratty_: Rails pays my rent
[09:21] Figaroo: I don't pay rent lol
[09:21] Ratty_: hobo
[09:21] Jaye: hobo with a laptop?
[09:21] Figaroo: I guess you could say that.
[09:22] Figaroo: haha, hobo with a laptop, and everything else.
[09:22] Figaroo: well, not *everything*
[09:22] saikat has joined the channel
[09:22] Jaye: or homeowner
[09:22] Jaye: but a programmer who owns something? HAH
[09:23] Figaroo: yeah, I own this little site..
[09:23] x_or1 has joined the channel
[09:24] Figaroo: idk if you heard of it?
[09:24] Figaroo: it's called facebook
[09:25] Figaroo: okay, nvm that was lame
[09:25] Jaye: rofl
[09:25] Figaroo: haha
[09:25] B2oba: laff
[09:26] Figaroo: laff?
[09:26] B2oba: yeah it's like lol.. "laugh"
[09:26] Jaye: well he is in california
[09:26] Figaroo: what's it stand for, Laughing And Frying Fries?
[09:27] B2oba: onomatopoeia
[09:27] Figaroo: B2oba, I just learned that word today. :P
[09:27] Figaroo: but I forgot already...
[09:27] Figaroo: lol
[09:27] B2oba: - imitation of sound in words: the formation or use of words that imitate the sound associated with something
[09:27] Figaroo: oh right...
[09:28] lintaba has joined the channel
[09:28] Figaroo: sort of like blurp
[09:28] B2oba: (source: Encarta World English Dictionary)
[09:30] devdrinker has joined the channel
[09:33] Jaye: this channel is the worst procrastination tool ever, i havent pushed a commit up to production since joining :|
[09:33] Ratty_: Jaye: Try reddit.com
[09:34] B2oba: Jaye: Try bash.org as well
[09:34] Figaroo: Jaye, yeah talking to cool ppl on irc totally sucks
[09:34] Jaye: already knew bash.org
[09:35] B2oba: I have done quite a lot actually hehe, this is on my lap... main screen is where i get work done
[09:35] B2oba: laptop*
[09:35] Jaye: well yeah, nobody i know irl gives a shit about what im working on :P
[09:35] B2oba: but im doing some photoshop, i'm not very good at it :(
[09:35] B2oba: Jaye: What are you working on?
[09:37] Figaroo: Oh you're working on a social network? :o
[09:37] Jaye: lots of things, i have problems with finishing unless its for a client, but atm something like the compass-framework but using node, have some ideas to integrate it, i actually have partially implemented a CMS using node but none of its ready for github yet
[09:37] Ratty_: That's original
[09:38] Jaye: lol "i want to make something like facebook, or ebay, or BOTH, and i have 100 bucks. should be easy right?"
[09:38] Figaroo: hey, before we get back on topic (if ever) has anyone here seen The Social Network?
[09:38] B2oba: i have
[09:38] mayfield has joined the channel
[09:38] Jaye: yeah but only because trent reznor worked on the score
[09:40] Figaroo: not that I've heard of mr reznor, but I'm sure he would be more than enough to go see a movie for...
[09:40] Jaye: Nine Inch Nails?
[09:40] Ratty_: :/
[09:41] Fullmoon has joined the channel
[09:41] Figaroo: yeah, didn't know their names...
[09:41] Ratty_: ಠ_ಠ
[09:41] void_ has joined the channel
[09:41] Ratty_: NiN is one guy.
[09:42] Figaroo: haha, I honestly don't know anything about NiN
[09:42] Jaye: so underrated, lots of people are influenced by his sound
[09:42] B2oba: NiN is a band
[09:42] B2oba: composed of one guy
[09:43] Figaroo: "a band of one" (said in trailer voice)
[09:44] sriley has joined the channel
[09:44] Ratty_: Do you folks use jsdoc-toolkit?
[09:45] Jaye: i use docco and ronn
[09:45] Figaroo: are there any Node.js forums, or is this channel the main means of support?
[09:47] Jaye: this channel was my last resort when i was looking for support so... doubt it
[09:49] jetienne has joined the channel
[09:49] Figaroo: great, I hate having to sign up on yet another forum
[09:49] adambeynon has joined the channel
[09:50] Figaroo: is there a console editor that has support for ctrl + arrow keys for word navigation? Anyone recommend?
[09:50] Ratty_: Learn vim
[09:50] clarkfischer: vim
[09:50] clarkfischer: well, not ctrl+arrows
[09:50] Ratty_: :)
[09:50] Ratty_: Arrows are for girls
[09:50] clarkfischer: vim changed my life
[09:51] Jaye: o_O
[09:51] Ratty_: I didn't lose my virginity until I learned vim.
[09:52] Figaroo: wow, that's a bit over selling wouldn't you say
[09:52] adambeynon has joined the channel
[09:52] Ratty_: Chicks love vim
[09:52] Figaroo: vim sounds like this steap hill I need to climb...
[09:52] Figaroo: are all the chicks at the top of this hill?
[09:53] clarkfischer: vimtutor
[09:53] clarkfischer: Chicks throw themself at me when I speak of my vimgolf scores...
[09:53] Figaroo: isn't there another one called emacs?
[09:53] Ratty_: nah
[09:53] clarkfischer: haha
[09:53] clarkfischer: Yeah, emacs exists
[09:54] Figaroo: now I have a pickup line "I'll use vim, not you. *winks*"
[09:54] devdrink_ has joined the channel
[09:55] devdrin__ has joined the channel
[09:55] hassox has joined the channel
[09:55] stride: with "Chicks" being a perl script you wrote? ;)
[09:56] Figaroo: I've never wrote a single line of perl in my life. :\
[09:56] Ratty_: Perl is easy. /dev/random > chicks.pl
[09:57] Figaroo: never had a need for perl
[09:59] Jaye: perl has a bad rep for being messy, not sure if its true but havent tried it regardless
[09:59] Figaroo: who needs perl when you have Node XD
[10:00] Jaye: write perl bindings for node as an april fools joke?
[10:00] Ratty_: Is seed.js still going? The site is dead
[10:01] Figaroo: Ratty_, what's that?
[10:01] Ratty_: packager for javascript/node stuff
[10:01] Ratty_: like 'gem' for ruby
[10:01] Jaye: whats wrong with npm for that?
[10:01] adambeynon_ has joined the channel
[10:01] herbySk has joined the channel
[10:02] Figaroo: yeah I thought that's what npm was for?
[10:02] Ratty_: I guess it's not specifically targeting node, but anything using commonjs.
[10:03] Jaye: node.js is hurting commonjs in that regard imo, its like rails and ruby, when you say ruby people think rails
[10:04] Figaroo: what other major projects out there use the commonjs proposal(s)?
[10:04] Jaye: narwhal
[10:05] Jaye: that js on java abomination i cant remember the name of i think
[10:06] Jaye: rhino
[10:06] Figaroo: wait, why is Node throwing type errors, I thought JS was loose about this?
[10:06] Ratty_: I implemented commonjs in a web framework I'm building.
[10:06] Jaye: did you call something that doesnt exist?
[10:06] Jaye: or isnt in scope
[10:06] clarkfischer: a TypeError can be thrown for a lot of reasons, Figaroo
[10:07] Figaroo: I'm trying res.end(req) to inspect it's contents. :D
[10:08] mytrile has joined the channel
[10:08] clarkfischer: req probably isn't a type that res.end expects as its first argument
[10:08] clarkfischer: .toString()?
[10:08] Jaye: that will just output it as one long line i think :P
[10:09] Figaroo: just outputs [object Object]
[10:09] Jaye: maybe use a proper debugger if you are going to dig into methods? :P node-inspect?
[10:09] Figaroo: I need util.inspect
[10:09] Figaroo: I saw that today, node-inspect owns
[10:10] Figaroo: actually it's node-inspector
[10:10] Ratty_: Ooh I need to steal "inspect" for my framework
[10:10] Figaroo: PHP can't touch that
[10:10] Figaroo: Also, has anyone here heard of Cloud9?
[10:10] Jaye: i already use safari dev tools to debug my client code so inspector is amazing for me
[10:10] clarkfischer: Figaroo: I wish it worked (well)
[10:11] Jaye: couldnt get it to run when i tried it
[10:11] clarkfischer: Is ulti.inspect not similar to PHP's var_dump?
[10:11] clarkfischer: util*
[10:11] Figaroo: it is very similar
[10:12] Figaroo: we need "I <3 Node.js" shirts
[10:12] Figaroo: well, at least I do...
[10:12] clarkfischer: To ensure you never get laid? ;)
[10:13] Figaroo: I'd say sometime in the future, everyone will be using Node.js
[10:13] Jaye: shirts with logos/script are low-class anyway :P
[10:13] Figaroo: yeah
[10:13] Figaroo: we need underwear
[10:14] Figaroo: hey, is joyent (no.de) a free service anyone know?
[10:14] B2oba: it should say: "I(function() { <3( function() { node.js });});"
[10:14] Figaroo: that looked like an emoticon so I'll rephrase that part (http://no.de)
[10:15] Ratty_: syntax error
[10:15] Figaroo: haha, cause all the callbacks. That would be a bit sarcastic though.
[10:15] B2oba: ok fine, this one is better
[10:15] B2oba: I(function() { node.js ;}) <3
[10:15] B2oba: :D
[10:16] Figaroo: I.heart.Node.js might be kind of cool
[10:17] mayfield has left the channel
[10:17] clarkfischer: I['<3'].Node.js
[10:18] B2oba: the one above has a sort of inside joke from the fact that it's event i/o rather than blocking... so the callback to "node.js" would happen after I, <3
[10:18] Ratty_: I['♥'].Node.js
[10:18] mayfield has joined the channel
[10:19] Jaye: function(love) {node.js;};
[10:20] clarkfischer: B2oba: Where's the if (error)?
[10:20] nook has joined the channel
[10:20] Jaye: every first arg being err really annoyed me when i started working with node :|
[10:20] Jaye: i can see the sense in it though
[10:20] B2oba: hehe
[10:21] Figaroo: Moving along, coffeescript is interesting. You can do func arg, arg. But in order to call a function of a function you use paranthesis. I solved this problem with the language I "thought up" a while back by using the ; operator as a function delimiter rather then a termination operator.
[10:21] Figaroo: so rather than foo(arg) arg, it would be foo arg; arg
[10:22] Figaroo: of couse I thought I must change the termination operator to something else, so I thought maybe . would look good with the commas. foo arg, arg, arg.
[10:22] Jaye: but we use . for calling methods of objects
[10:23] Figaroo: exactly
[10:23] Figaroo: so what would replace that I thought...
[10:23] clarkfischer: This is getting a bit abstract.
[10:23] Figaroo: naturally, objects are sort of tree like, and so are file directories. Hence / would be the object dilimeter
[10:24] Figaroo: my language wasn't meant to coat JS, rather completely idealize it.
[10:24] Jaye: that would piss people off im afraid, even the [ of obj-c annoys a lot of people
[10:24] Figaroo: so we have object/method arg, arg; arg.
[10:25] clarkfischer: Repurposing semicolons within JS would seriously cause headaches
[10:25] xla has joined the channel
[10:25] clarkfischer: Then again, even coffeescript causes headaches for me
[10:25] Figaroo: [ annoys for the same reason paranthesis annoy in lisp
[10:25] Figaroo: We already use . for ending our sentenses.
[10:25] Figaroo: sentences*
[10:25] tk has joined the channel
[10:25] Jaye: you could implement those changes with a fairly simple parser
[10:26] Figaroo: true, but I took it further
[10:26] Figaroo: function(){} is quite verbose, and wasteful
[10:26] Jaye: only problem is what if someone else needs to maintain your code? :P
[10:26] Figaroo: and they don't know my language?
[10:27] Jaye: yeah
[10:27] Figaroo: same question for coffeescript
[10:27] Jaye: i spose
[10:27] Figaroo: well, not as big of a deal with coffeescript because it's just a small einhancement
[10:28] Jaye: it outputs valid pretty-printed JS
[10:28] Jaye: you could too, with a bit more work
[10:28] tekky has joined the channel
[10:28] Figaroo: a pretty version as well as a minified one
[10:28] Figaroo: you'll have the option to choose
[10:29] Figaroo: I figured though, sense a lot of what makes JS really good is it's closures and sense we use callbacks like all the time, function is 8 characters wasted.
[10:29] Figaroo: so why couldn't it just be (){} or something?
[10:30] Jaye: cs uses -> and =>, seems neat enough to me
[10:30] clarkfischer: I'm still not sure I like CoffeeScript...
[10:30] Figaroo: then again, why couldn't it just be {}? Let the function except arguments through an arguments variable within the function.
[10:30] Figaroo: =>?
[10:30] clarkfischer: JavaScript needn't parade around as Ruby.
[10:31] Jaye: figaroo: => is a shorthand for binding functions to the current object
[10:31] Figaroo: that's pretty cool
[10:33] Figaroo: how would you do function hello() { } in coffeeScript?
[10:34] Jaye: id like CS to allow the function keyword though, sometimes i dont want to wrap a function in a variable
[10:34] Ezku\: hello = ->
[10:34] Ezku\: an empty function that accepts no arguments is just ->
[10:35] Jaye: (arg1, arg2) -> will compile to function(arg1, arg2)?
[10:35] Figaroo: well if you need to use the assignment operator what's the point of =>?
[10:35] Ezku\: yes
[10:35] Jaye: cant believe i missed that...
[10:35] Ezku\: Figaroo: it means you bind the function to the current scope, whatever that is
[10:36] Figaroo: scope? what does the 'this' have to do with scope?
[10:36] Jaye: headaches, thats what
[10:37] Figaroo: function () { this.foo = 23; } is not going to bind to that function's scope, it will still bind to the window object, because that's what "owns" the function
[10:37] clarkfischer: Because it's anonymous?
[10:38] Ezku\: http://www.robertsosinski.com/2009/04/28/binding-scope-in-javascript/
[10:38] Figaroo: not exactly
[10:38] Jaye: if you start chaining callbacks this doesnt behave as a lot of people coming from other language expect
[10:38] Figaroo: foo = function() { this.bar = 23 } would do the same
[10:39] Figaroo: and function foo() {... for that matter
[10:39] Figaroo: because the foo belongs to the window, window.foo == foo.
[10:39] clarkfischer: oh
[10:39] clarkfischer: because of the lack of the new prefix
[10:40] d0k has joined the channel
[10:41] yorick: clarkfischer: not exactly
[10:41] yorick: var obj = {}; obj.foo = function() { this.bar = 23; }; obj.foo(); obj.bar == 23;
[10:42] clarkfischer: (new foo()).bar === 23, no?
[10:42] yorick: that too
[10:43] Figaroo: mhmm, if there was a new operator before the function call, the 'this' will become the new object created and returned by the operator. new essensially does what this function accomplishes: var object = function(constructor) { var obj = {}; constructor.call(obj); return obj; }
[10:43] mytrile has joined the channel
[10:43] Figaroo: not sure if I'm right?
[10:43] yorick: Figaroo: nope
[10:43] clarkfischer: No
[10:43] clarkfischer: It refs the prototype
[10:44] clarkfischer: Object.create if I'm not mistaken
[10:44] Figaroo: what refs?
[10:44] yorick: it goes more like var object = function(constructor) { var obj = function k(){}; obj.prototype = constructor.prototype; obj = new obj; constructor.call(obj); return obj; }
[10:44] common- has joined the channel
[10:44] Jaye: the actual about for => is var a;
[10:44] Jaye: var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; };
[10:44] Jaye: a = __bind(function(arg) {}, this);
[10:44] fly-away has joined the channel
[10:45] Jaye: output*
[10:45] Figaroo: yorick, but you're using the new operator within the function which kinda defeats the purpose
[10:45] yorick: Figaroo: you can use Object.create once it is implemented
[10:45] matjas has joined the channel
[10:46] yorick: js> 10
[10:46] gbot2: yorick: 10
[10:46] yorick: js> var obj = {}; obj.foo = function() this.bar=23; obj.foo(); obj.bar == 23;
[10:46] gbot2: yorick: true
[10:46] Figaroo: Object.create is a upcoming standard?
[10:46] yorick: js> Object.create
[10:46] gbot2: yorick: function create() { [native code] }
[10:47] yorick: Figaroo: yes
[10:47] Jaye: any links for info on Object.create?
[10:47] Figaroo: what's the purpose if we have new?
[10:47] yorick: Jaye: http://javascript.crockford.com/prototypal.html
[10:47] Jaye: ty
[10:48] clarkfischer: yorick: That article exploded my mind for like a week
[10:48] yorick: Object.create = function(o) { function F(){}; F.prototype = o; return new F(); }
[10:48] yorick: clarkfischer: how so
[10:49] clarkfischer: No, it was crockford's classical inheritance that blew my mind
[10:49] Jaye: hmm, will be adding that technique to my code i think
[10:49] yorick: so the new operator does something like function new(constructor) { var obj = Object.create(constructor.prototype); constructor.call(obj); return obj; }
[10:49] clarkfischer: I come from a land where inheriting a classe's structure was as simple as class X inherits Y
[10:49] herbySk: yorick: not exactly, it has another argument, so it more like Object.create = function(o,ps) { function F(){}; F.prototype = o; var result = new F(); Object.defineProperties(result, ps); return result; }
[10:50] yorick: ACTION checks reference on defineProperties
[10:50] yorick: as soon as the mozilla dns decides it can work
[10:51] herbySk: yorick: (but the second argument is rarely used)
[10:51] yorick: it exists in like..nowhere
[10:51] yorick: js> Object.defineProperties
[10:51] gbot2: yorick: function defineProperties() { [native code] }
[10:51] yorick: almost nowhere
[10:52] daglees has joined the channel
[10:52] herbySk: clarkfisher: you come from the land where classes are needed, in js, objects are enough; if you need classes, you can mimick them easily, if not, you're free to not have them
[10:52] clarkfischer: I've since figured prototypal inheritance out
[10:53] Figaroo: doug actually reiterated over that classical inheritence model with embrassing prototypal inheritence
[10:53] clarkfischer: But, like a year ago, when I first read that article, I nearly cried.
[10:53] herbySk: yorick: it is part of ES5, v8 has it, so node.js has it
[10:53] lintaba_ has joined the channel
[10:53] yorick: v8> Object.defineProperties
[10:53] v8bot: yorick: function defineProperties() { [native code] }
[10:53] yorick: heh
[10:54] herbySk: clarkfischer: sorry for typo
[10:54] Figaroo: can't figure out whether http://no.de is free or not. :\
[10:55] herbySk: neither do I, and I'd like to know, too
[10:55] Jaye: i looked at them and couldnt either lol
[10:55] Jaye: ended up deploying on a slicehost
[10:56] clarkfischer: It looks like it is...
[10:56] yorick: no.de isn't free
[10:56] yorick: at least the domain isn't :P
[10:58] sriley has joined the channel
[10:58] Figaroo: haha, they keep you in suspense with this. Grrr...
[10:58] Jaye: heroku's node.js service is apparently going public this year, can you wait? :P
[10:58] Figaroo: are there any URL helpers included with node?
[11:00] Figaroo: Jaye, never used heroku cause I'm not a Ruby guy. I somehow got an account with them a long while back. They have a free service, but how extended is it?
[11:01] Jaye: its the same as the paid service but you only get 5mb of DB space and 1 dyno
[11:01] lintaba_: does anyone know a script to replace eg. the border-radius to -moz-border-radius, if the user-agent says it's a firefox? :)
[11:01] Figaroo: There is a URL module with Node, but I'm specifically looking to get the first directory within the request.url
[11:01] Jaye: i moved off heroku because i started using an in-process DB and they want you to use SQL
[11:02] Figaroo: in-process?
[11:03] Jaye: a database that is written in node, no IPC or network calls to a DB server, i use chaos, there is nstore and alfred (which i am looking at for a new project) as well
[11:03] stride: v8: "/foo/bar/foobar".split(/\//)[1]; // Figaroo?
[11:03] v8bot: stride: "foo"
[11:03] felixge has joined the channel
[11:03] felixge has joined the channel
[11:04] Figaroo: I always draw a blank when it comes to dealing with strings like this. That's a bad thing being a programmer, I should change that.
[11:05] Jaye: what about using regexp? i know people cringe at the mention... but they work
[11:07] Figaroo: regexpal.com has helped me a ton if you haven't heard o it
[11:07] Figaroo: *of*
[11:07] clarkfischer: man
[11:07] clarkfischer: no.de's api uses &heart;
[11:07] clarkfischer: my feeble brain can't deal with this right now!
[11:07] Figaroo: is there a PHP list() equivalent in JS?
[11:08] Figaroo: &heart?
[11:08] clarkfischer: https://api.no.de/♥
[11:08] Figaroo: You know how in PHP you can do list($foo, $bar) = array('foovalue', 'barvalue');
[11:09] Figaroo: clarkfischer, I still don't know what that means.
[11:10] clarkfischer: To get a no.de account, you have to make an api call to https://api.no.de/♥
[11:10] clarkfischer: post request*
[11:11] Jaye: if foo is 1 and bar is 2 [foo, bar] will be ['1', '2'], if its stored in a you can do a.toString() to get "1, 2"
[11:11] aklt has joined the channel
[11:11] clarkfischer: it seems that no.de is sort of invite-only.
[11:13] MattDiPasquale has joined the channel
[11:13] Jonasbn_ has joined the channel
[11:15] zorzar has joined the channel
[11:16] q_no has joined the channel
[11:17] clarkfischer: Figaroo: I'm pretty sure you can't do that in JS.
[11:17] Figaroo: fs.realpath is what I use to check if a file exists right?
[11:17] clarkfischer: path.exists/Sync
[11:18] Figaroo: clarkfischer, yeah I found out that some new version of JS is purposed like: [foo, bar] = [11, 23]; so I got confused.
[11:19] clarkfischer: v8> var foo = bar = 'hi'; [foo, bar] = ['sup', 'dog']
[11:19] v8bot: clarkfischer: ReferenceError: Invalid left-hand side in assignment
[11:19] Figaroo: awesome, what's realpath do? And why is the documentation on fs kind of left un attended? :\
[11:19] clarkfischer: :(
[11:20] Figaroo: I couldn't find path.existsSync documentated either.
[11:21] clarkfischer: Figaroo: It was added sort of recently
[11:21] brachiel has joined the channel
[11:21] clarkfischer: fs.realpath does what realpath does
[11:21] clarkfischer: man realpath
[11:21] clarkfischer: it returns the full path of the file
[11:22] clarkfischer: and it expands symbolic links
[11:22] rwhitby: clarkfischer: /heart is an alias for the no.de api
[11:23] clarkfischer: Ah, got it, thanks.
[11:23] rwhitby: ACTION just applied to
[11:23] rwhitby: too even
[11:23] Figaroo: joyent is a hosting service right?
[11:24] Jaye: yes
[11:25] Jaye: hey they changed their site, "cloud enablement" for real? lmfao
[11:28] Figaroo: wait, I npmed node-inspector and went to localhost:8080/debug?port=5858
[11:28] Figaroo: and nothing
[11:29] Ratty_ has left the channel
[11:29] Figaroo: what gives?
[11:29] Jaye: did you run node with node --debug?
[11:30] Figaroo: yup
[11:30] Figaroo: all I get is a bunch of HTTP headers writting out to the terminal console
[11:31] Figaroo: no that was just from me trying to access localhost:80
[11:31] Jaye: are you using express or something? it logs to console in dev mode
[11:32] Figaroo: oh wait, I have to run node-inspector as a child process
[11:32] Figaroo: dur
[11:32] langworthy has joined the channel
[11:32] Jaye: port 80? are you running node as root? o_O
[11:33] Figaroo: the little & after a command makes it run in a child process right?
[11:33] Jaye: yeah, it runs as a background process
[11:33] altamic has joined the channel
[11:33] Figaroo: by root you mean my main server?
[11:33] Jaye: you can use nohup if you want its output in a file instead of stdout
[11:33] Figaroo: will the bg process die when I close the terminal?
[11:33] Jaye: not if you use nohup
[11:33] Jaye: but otherwise yes
[11:34] Figaroo: Jaye, nah, seeing how this is the first time I ran a bg process I'll wait.
[11:34] Jaye: killall node in emergencies :P
[11:34] Figaroo: killall is not a node command right
[11:35] Jaye: right, neither is nohup, they are just unix apps like ls, most os have them though
[11:35] Figaroo: killall isn't in my cygwin, atleast there's not man on it
[11:36] Jaye: there is kill too if you have it, not as user-friendly though
[11:37] Jaye: if you have npm... you can use forever to manage background node processes
[11:37] Jaye: and just do forever start app.js
[11:37] Jaye: forever stopall
[11:37] Figaroo: I wont worry about it now. Is there a faster way to close the terminal than Alt+f4?
[11:38] Jaye: ctrl - c sends KILL to terminal apps, should work in cyg too i assume
[11:38] Figaroo: is forever suitable for production?
[11:38] Figaroo: yes, but I'm talking about closing the terminal window. I sometimes have multiple terminal windows to execute multiple thing like Node, and then some man pages
[11:39] Jaye: dont think so then
[11:39] Figaroo: oh okay. Would forever be ready for actually using for production stage of my app?
[11:40] Figaroo: or would I want to use linux daemons instead
[11:40] Jaye: well i used it for a month or so before moving to spark, and it never fell over, not sure on longer timeframes
[11:40] Figaroo: oh
[11:40] Jaye: forever uses the linux daemon tools
[11:40] Figaroo: sweet, I should def consider that then
[11:41] Figaroo: peculiar
[11:41] Jaye: at the time my app was unstable so i needed forever to restart it if something went haywire, it handled it pretty well
[11:42] Figaroo: why are these files in node inspector
[11:42] Max-Might has joined the channel
[11:42] Figaroo: buffer.js:0
[11:42] Jaye: they are node.js
[11:43] Figaroo: oh, they're the modules and their dependencies?
[11:43] Jaye: yup, when you pull in frameworks all of their deps also appear in inspector
[11:44] nu- has joined the channel
[11:46] Figaroo: that might get crazy
[11:47] Jaye: well sometimes the bug isnt in your code but the modules :P
[11:47] Figaroo: this is so rad though, I never done server side debuggin. Closest I've came to it was var_dump. xP
[11:47] Figaroo: yeah, but shouldn't there be a better way to view scripts than a drop-down?
[11:49] Jaye: yeah, could fork it and change that or open an issue on github and see if he will do that
[11:49] nooder has joined the channel
[11:50] Figaroo: I might.
[11:50] Figaroo: why when I return a 404 status code on my request does not my req.end message go through?
[11:51] nooder: hello. my application get stucked during mysql.querySync() after some days :( what can be the reason for it?
[11:51] Figaroo: does the browser ignore the HTTP body when there's a 404 status returned; how are 404 pages ever returned then?
[11:52] nooder: Figaroo, not always...
[11:52] Figaroo: maybe I need res.writeContinue?
[11:53] nooder: you can return any code in header, but if thert is a body then in browser body will be displayed
[11:54] mikew3c_ has joined the channel
[11:54] markwubben has joined the channel
[11:55] Figaroo: nooder, but I'm calling res.end('Missing file '+filePath) right after res.writeHead()
[11:55] nooder: Figaroo, and whats the problem?
[11:56] Figaroo: I'm getting a chrome Oops! page rather then my message
[11:56] Evet has joined the channel
[11:56] nooder: you can try dev tools in chrome to check all info that comes in
[11:56] nooder: headers and body
[11:57] matjas has joined the channel
[11:57] ron_frown has joined the channel
[11:57] Figaroo: I'm using node-inspector
[11:58] nooder: and?
[11:58] Jaye: he means the normal chrome dev tools, right click the page and do inspect, then look at the html doc in resources for the headers
[11:59] Figaroo: oh sorry, let me see
[11:59] nooder: yep
[11:59] nooder: great tool
[12:00] Figaroo: I can't seem to find the resource in Chrome Web Inspector (I kinda dislike the changes they made to it). All I see is (chromewebdata)
[12:00] Figaroo: under Frames folder.
[12:01] Jaye: oh it might be under network if you are on dev channel chrome
[12:01] Figaroo: it works perfectly once I change the status code to 200
[12:01] nooder: alt cmd i in mac
[12:02] nooder: look for network tab and refresh page
[12:03] Figaroo: well when I have 200, under network I see the resource and the header information. Under 404, I see only this chrome://chromewebdata resource, no page at all.
[12:03] nooder: you can share part of your code on pasterbin
[12:05] Figaroo: http://sammy.pastebin.com/5RMCZVgx
[12:05] Figaroo: That's my whole framework so far. lol
[12:06] nooder: res.writeHead(404, {'Content-Type': 'text/plain'});
[12:06] nooder: works perfectly, but without content
[12:06] Figaroo: oh, no content-type?
[12:08] Figaroo: still not working on mine
[12:08] sveimac has joined the channel
[12:08] nooder: he refuses body, needs googling :)
[12:09] Figaroo: who refuses body?
[12:09] nooder: http://stackoverflow.com/questions/4618012/telling-between-a-natural-http-404-and-a-php-generated-one
[12:10] Jaye: its the wrong way around
[12:10] Jaye: res.writeHead({'content-type': 'text/plain'}, 404);
[12:10] nooder: try curl
[12:10] webr3 has joined the channel
[12:12] Figaroo: not what it says in the docs http://nodejs.org/docs/v0.3.4/api/http.html#response.writeHead
[12:12] Jaye: only way it works here on v0.3.4 and chrome dev is with 404 after content type
[12:13] Figaroo: are the docs wrong?
[12:13] Jaye: no im wrong too, thats sending code 200
[12:13] Jaye: hmm
[12:14] nooder: nodejs works perfectly
[12:14] nooder: thats an browser issue
[12:15] Jaye: seems like
[12:15] Jaye: it works in safari but not chrome
[12:15] felixge_ has joined the channel
[12:15] felixge_ has joined the channel
[12:15] Figaroo: Weird.
[12:16] Figaroo: is ryan up?
[12:16] stride: have you tried sending a full, a bit longer, html document Jaye?
[12:16] nooder: )
[12:16] nooder: stride, thats chrome thing
[12:16] Jaye: minimum document body?
[12:16] nooder: just type chrome 404 in google
[12:17] Figaroo: stride, that works! ;)
[12:17] nooder: so you cant use 404 if you want your own content
[12:17] Figaroo: so must be a minimum document header?
[12:17] stride: my chrome version shows 404 pages
[12:18] Jaye: 513 bytes minimum or it hijacks 404s...
[12:18] Figaroo: This is Chrome's doing?
[12:18] Jaye: http://perso.hirlimann.net/~ludo/blog/archives/2008/09/chrome-and-404s.html
[12:18] nooder: interesting
[12:19] stride: why not? several browsers have done this over the years, makes sense for the regular user
[12:19] stride: s
[12:19] Jaye: i guess its so people dont just get a blank 404 from some lazy developer
[12:20] Figaroo: so I'll just put 513 bytes of spaces
[12:20] Figaroo: how many spaces is that?
[12:21] Country has joined the channel
[12:21] Figaroo: works, oh so beautiful
[12:22] femtoo has joined the channel
[12:23] Jaye: are you writing an MVC framework?
[12:27] ziro` has joined the channel
[12:28] Figaroo: Jaye, yup!
[12:29] Figaroo: and it is very exciting
[12:29] Figaroo: :D
[12:29] Figaroo: I already have the basic controller loading mechanics down
[12:30] nooder: why dont you use connect?
[12:31] MattJ has joined the channel
[12:31] Figaroo: use the what what?
[12:31] Figaroo: is it like express?
[12:31] Jaye: express is built on it yeah
[12:31] Jaye: its not really MVC in the same meaning as rails or something though...
[12:32] Figaroo: Agh! My adrienals are blowing!
[12:32] Figaroo: Well, I don't really like express honestly
[12:32] Figaroo: I kind of like codeigniter, because it separates the MVC files
[12:33] Figaroo: right now all I have is it loading the controller file from /controllers/ with the name as the first directory in request path
[12:34] Jaye: why are you using http to do that though?
[12:34] Figaroo: so like 127.0.0.1/ is the same as 127.0.0.1/index which is the same as 127.0.0.1/index/index. So the first index is the file /controllers/index.js and the second index is the exported function exports.index
[12:35] Figaroo: Jaye, what do you mean?
[12:36] Jaye: hmm actually thinking about it thats probably easier than using your own protocol and emitters
[12:36] Jaye: nvm
[12:36] daglees has joined the channel
[12:38] Jaye: your explanation just clicked and thats actually quite clever, so if you wanted the function index.something you would request /index/something?
[12:39] Figaroo: yeah, it's pretty simple 'cause now I can just use the first two levels of the path as a controller information. Of course extra path levels after the first two will be available for parsing as well. It might not be the most flexible system, but it's a start.
[12:39] Figaroo: Jaye, correct
[12:39] Figaroo: index.js would need to exports.something
[12:40] Figaroo: AND! Within the exported function the this variable contains some useful API such as this.load.view('filename');
[12:40] Jaye: the node module system has an export system like that, did you consider it?
[12:41] Figaroo: I have, in fact that is *exactly* what I'm using.
[12:41] Jaye: ahh
[12:42] genbit has joined the channel
[12:42] Figaroo: My server.js file is the main file that creates the HTTP server. The HTTP server is only requireing the file and then calling the exported function. If the controller isn't found, it returns 404 explaining. If the function doesn't exist in the controller, then it returns 404 explaining.
[12:43] Figaroo: I'll just plug ejs into the this.load.view('file', data) function and I'll be set. Next I'll need to figure out the way models are handled. ;)
[12:44] Figaroo: this.load.model('file') would do the trick, but I'm not sure if I'm missing something with that -- haven't thought it through.
[12:45] luke` has joined the channel
[12:46] Figaroo: Another problem, maybe you can help me with: how could I pass along the request and response objects more easily from the server.js file to the individual controller files?
[12:47] Jaye: json?
[12:48] mraleph has joined the channel
[12:49] altamic has joined the channel
[12:49] Figaroo: hmm
[12:50] Figaroo: look http://sammy.pastebin.com/Up45Gm6c
[12:50] Figaroo: line 30, I'm passing req and res to the exported function call. Is there another way to pass along these two variables?
[12:51] Figaroo: Is there an import feature for modules, where I can inject global variables to be used by the module?
[12:52] Figaroo: Maybe I could include the req and res parameters in the theThis object
[12:52] Figaroo: that way this.load.view could use the request object
[12:53] Jaye: how you are doing it is how the other http frameworks do it, you could have a constructor on modules and pass an arg object to them for vars though
[12:55] Figaroo: Jaye, could you give an example of what you mean?
[12:56] Kingdutch has joined the channel
[12:56] Jaye: if you put code in a module that is in the top-level scope it will execute when the module is required, you could use that to have them set variables and stuff like classes in another language
[12:56] Jaye: doesnt even need to be exported
[12:56] MattDiPasquale has joined the channel
[12:57] jashkenas has joined the channel
[12:58] node-bot has joined the channel
[12:58] node-bot: Hello Everyone!
[12:58] claudiu__ has joined the channel
[12:58] Figaroo: true, but how could I get, in the module, the req and res objects which exist in the script that's requiring the module?
[12:58] Kingdutch: Ooh ffs stupid bot
[12:59] Figaroo: var foo = 23; var mod = require('module'); //foo exists here but the module script doesn't have it..
[12:59] Jaye: ahh
[13:00] Imperion has joined the channel
[13:00] altamic has joined the channel
[13:00] Jaye: only way i can think of is to pass them as an arg to a method in the module that sets them privately, but then thats just new vars with the same values not global scope... hmm
[13:00] sonnym has joined the channel
[13:01] Jaye: modules are sandboxed so im not sure you can actually access vars from the parent without passing them in
[13:01] Figaroo: The best I can think of is to use the this variable to store it
[13:01] dgathright has joined the channel
[13:02] A83 has joined the channel
[13:03] Node-Bot has joined the channel
[13:03] Figaroo: Jaye, wouldn't it be nifty to have an API like this: var imports = {foo: 23}; var mod = require('module', imports); And now within the 'module' module: console.log(imports.foo);
[13:03] Jaye: maybe instead of using nodes system, have your own exports object and use eval to execute modules in the current scope
[13:03] SamuraiJack_ has joined the channel
[13:04] kingbot: All I need now is a way for stuff to get displayed a little better and I got a nice client :D
[13:04] Jaye: you could then use JS getters and setters to make sure some things are private
[13:05] okuryu has joined the channel
[13:08] Figaroo: I'm not familiar with getters and setters, do they work in V8?
[13:09] Jaye: http://ejohn.org/blog/javascript-getters-and-setters/
[13:10] Figaroo: thanks
[13:11] Figaroo: I do know that it would be the perfect inverse of exports. You can export what ever JSON you want within a module, and you can import whatever JSON you want into a module.
[13:11] Figaroo: Idk why ryan didn't think of it in the first place. :P
[13:11] Figaroo: btw, is ryan the only developer on this project, surely not so?
[13:12] Kingdutch: Nope, there's a whole team of contributors
[13:12] Kingdutch: All listed on the site/git
[13:12] Kingdutch: Ryan invented Node.JS though and I believe is head contributor
[13:15] Figaroo: oh
[13:15] mikedeboer has joined the channel
[13:15] Figaroo: ugh, why did they have to call it __defineGetter__? That's horrible syntax. They just have stuck with a get and set keyword similar to the var keyword.
[13:16] Jaye: scroll down, there is alternative syntax
[13:16] Figaroo: there is but it only works in an object literal
[13:16] stride: Figaroo: your import suggestion for require breaks when a module is reused imho as modules are cached internally
[13:16] Figaroo: we're stuck with this.__defineGetter__ for everything else.
[13:17] Jaye: =/
[13:17] Figaroo: stride, how does that caching work?
[13:17] skm has joined the channel
[13:17] Figaroo: get this.value = function(){ return this.value } would have been nice.
[13:18] stride: Figaroo: the first require resolves the filename of the script & loads it, then puts it into an array or something internally (grep the source for moduleCache for technical details). subsequent calls to request for that module will just return whatever is in that cache
[13:18] Figaroo: or this.value = get(){return this._value; } and this.value = set(val){return this._value = val; }
[13:19] Jaye: wait, if you require a module with an object/prototypes that are exported and then do new Objectname wont that be in the parent scope?
[13:19] Jaye: *module.objectname
[13:20] Figaroo: stride, so Node couldn't store the imports variable separately from the cache?
[13:21] stride: Figaroo: how would it know which import data would be suitable your current require call / the context you're using require in?
[13:22] stride: Figaroo: just design your module so it takes and stores the import data when you create a new instance of whatever is inside it
[13:22] Jaye: yeah it works, ill put something on pastebin in a sec figaroo
[13:23] Figaroo: stride, the require would have the import data as the second argument, the question is, how would you *not* know which import data is suitable for ones current require call?
[13:24] kjeldahl has joined the channel
[13:24] Figaroo: require('module', import), to be more concise
[13:24] Figaroo: I meant *imports*
[13:25] stride: Figaroo: you'd pass the import data every time you require? why don't you just put that in your module's logic (leading to require('foo').bar(import); or require('foo').import(data) if you want something reusable that is then used by the other exports)
[13:26] Jaye: but then when the module changes a variable its out of sync with the global scope right?
[13:26] Jaye: so youd have to faff around making sure things are right
[13:28] Figaroo: stride, I could very well do that, or do what I'm currently doing which is require('foo')['bar'].call(imports). I'm not saying it can't be done currently, I'm just saying that it would seem more symetric to have an imports parameter for require, as well as an imports global namespace within every module.
[13:28] stride: I don't see the benefit of "imports" actually, what are you using them for?
[13:28] Jaye: it does seem weird that we have module.exports and not module.imports
[13:30] Figaroo: stride, rather than making it necessary to have a function be called within my module in order for data to go into my module, it would be very convenient to be able to load data into my module before any exported module functions are called. This way I can actually define my module based on the imported data.
[13:31] Figaroo: stride, and I don't have a use case at the moment rather than what I already showed you 'cause this is my first *real* day of Node coding. :P
[13:32] xla has joined the channel
[13:32] Figaroo: stride, take this for example: http://sammy.pastebin.com/nKjPmrXe
[13:33] Figaroo: and the module http://pastebin.com/Z1rUCGFi
[13:33] kaichen has joined the channel
[13:34] eikke has joined the channel
[13:35] jashkenas has joined the channel
[13:36] Figaroo: rather than using the this namespace within the function call, and requiring an extra function call to begin with, I could just do this: http://sammy.pastebin.com/Cnsf7nGR http://pastebin.com/hyHehdF2
[13:36] yorick: how does node determine when to exit and how do I stop it from doing that?
[13:37] Figaroo: in other words, I can avoid exporting all together if I wanted to.
[13:37] Figaroo: yorick, exit what?
[13:37] yorick: Figaroo: when I try to run my script, node.js exits before it finishes
[13:37] stride: I don't get it
[13:38] Figaroo: yorick, maybe it did finish ;)
[13:38] Figaroo: stride, what don't you get?
[13:38] Jaye: its async, if you are using io you need to use callbacks to make sure things finish before others are executed
[13:39] yorick: Figaroo: hmm maybe I shouldn't forget to specify a callback :D
[13:39] Figaroo: yorick, if you're trying to do HTTP stuff, you'll need to create an HTTP server using the http module.
[13:40] Figaroo: the node process wont return if it doesn't have something to do. By creating a server and listening in on a port, it has something to do.
[13:40] Figaroo: stride, do you just not get why I would ever want to do this?
[13:40] stride: Figaroo: I don't get what the benefit of that module is. you want to change behaviour of your controller inside modules?
[13:40] yorick: Figaroo: do timeouts count as something to do?
[13:40] Figaroo: yorick, yup
[13:41] yorick: setTimeout(2000, function() { console.log('test'); }); is a valid timeout, right?
[13:41] Figaroo: you can do setTimeout(function(){ console.log("done!") }, 2000);
[13:41] yorick: oh
[13:41] Figaroo: ;)
[13:41] yorick: :D
[13:41] yorick: can't it error on that
[13:42] Figaroo: arguments are backwards
[13:42] Figaroo: stride, exactly. I can now define my module based on the imported data!
[13:42] jaredstil has joined the channel
[13:42] Figaroo: I can export based on the import! Which does seem a bit more dynamic.
[13:43] jaredstil has joined the channel
[13:43] Figaroo: But maybe this idea is just theoritically amazing, and not so much practically interesting..
[13:45] boaz has joined the channel
[13:45] Figaroo: alright well, I think I'm hitting the sack :P
[13:46] femtoo has joined the channel
[13:46] mytrile has joined the channel
[13:46] stride: ah well, might be I just never had a use case for that behaviour :)
[13:48] A83 has joined the channel
[13:50] Figaroo: stride, well could you pass along the idea to ryan. I don't really know the guy, but maybe you do?
[13:50] ttpva has joined the channel
[13:51] kaichen has joined the channel
[13:52] Kingdutch: Is there a + to using the var keyword? It's not required is it?
[13:54] boaz has joined the channel
[13:55] mraleph: var inside function limits scope of your variables... you don't want to leak every single var to global scope, don't you?
[13:56] Figaroo: Kingdutch, if you don't use it, the variable will become global
[13:56] Kingdutch: Eeeeeeew
[13:56] altamic has joined the channel
[13:57] Kingdutch: Funny how I even use Var in global scope though :')
[13:58] jhojho has joined the channel
[13:59] jhojho has left the channel
[14:00] Figaroo: Kingdutch, it's always good practice ;)
[14:00] Kingdutch: :)
[14:00] Kingdutch: k
[14:00] tim__ has joined the channel
[14:01] stride: Figaroo: not more than you do I guess. why don't you just implement an alternative mechanism as a module, publish it, and see if people use it? :)
[14:02] stride: or put the suggestion on the mailing list or something
[14:02] Figaroo: idk if a module could do exactly what I'm looking to do.
[14:02] Figaroo: not sure, I'm tired though, can't think...
[14:02] Figaroo: Alright, going to bed. Thanks Node community for the awesome night! XP Peace out.
[14:04] Kingdutch: Gnight Figaroo
[14:08] MikhX has joined the channel
[14:09] perlmonkey2 has joined the channel
[14:14] Kingdutch: data = String(data).replace('\\','\\\\');
[14:14] Kingdutch: Fails, why? :(
[14:15] Kingdutch: or atelast it fails when I call sys.log
[14:16] pt_tr has left the channel
[14:19] jimt_ has joined the channel
[14:20] hornairs has joined the channel
[14:21] tmzt: Jaye: these in process databases any of them that would good for creating a temporary session (like an initial signup) then pushing it to a real nosql when the user actually submits?
[14:22] stride: Kingdutch: what's data?
[14:22] Kingdutch: IRC dta
[14:22] Kingdutch: data
[14:22] Kingdutch: linebreaks in messages are killing my bot >.>
[14:22] Kingdutch: I need something like :.+:.+(\r\n)
[14:22] Kingdutch: Replace the \r\n after the second :
[14:23] stride: there are no linebreaks in messages in the irc protocol
[14:24] stride: how do they get in there in the first place? :)
[14:24] Kingdutch: freenode gets em in there =/
[14:24] Kingdutch: :barjavel.freenode.net 252 Node-Bot 30 :IRC Operators online
[14:24] Kingdutch: That's malformed
[14:25] Kingdutch: or it might not be
[14:25] Kingdutch: But then 252 and those stupid codes deviate from 90% of the IRC data
[14:26] stride: just ignore lines with codes you don't need (or emit a raw-event or something)
[14:27] Kingdutch: By registering your nickname with Nickserv you agree that you
[14:27] Jaye: tmzt: most of them are append-only so data would build up... but nstore has a command to flush the DB, so id prob use that, also it stores data in json.
[14:27] Kingdutch: <-:barjavel.freenode.net 372 Node-Bot :- are 13 years
[14:27] Kingdutch: That there is a lineberak stride
[14:27] Kingdutch: actually that's not where it chokes
[14:27] Kingdutch: it chokes on: are 13 years
[14:27] Kingdutch: <-of age, or older. For more information about the
[14:27] Kingdutch: Because the data doesn't get through in one line at a time =/
[14:28] stride: oh you mean that.. you'd have to buffer your data before parsing and only call the function that parses the next line when a full line is received
[14:28] Kingdutch: Yeh afraid so
[14:28] Kingdutch: means another function
[14:28] stride: otherwise the data you have so far is not useful anyway for IRC
[14:29] Fullmoon has joined the channel
[14:31] jspiros has joined the channel
[14:33] tmzt: Jaye: Im not sure I have a hundred bucks :) whats the goal with the cms? I just pushed a very basic one built on express and sammy with support for nojs fallback to github.com/tmzt/nodecms
[14:33] pt_tr has joined the channel
[14:36] Kingdutch: stride: My solution: http://pastebin.com/MVnsfZrc
[14:37] genbit has joined the channel
[14:37] Jaye: tmzt: 1 sec, cloning and having a snoop
[14:40] Kingdutch: stride: What do you think?
[14:43] Jaye: interesting, i thought of a pattern like that, but i am generating static files ala compass in the ruby world with a node admin app that can make changes to the data, and a seperate instance to handle sockets
[14:44] stride: why are you using string()? didn't you use setEncoding already?
[14:44] pt_tr has left the channel
[14:44] Kingdutch: Nope, but data is an object, not a string
[14:44] Kingdutch: so it doesn't have substr() etc.
[14:44] stride: for parsing IRC lines that looks okay I guess. for bigger stuff you'd probably want to put the chunks of data in an array/list until the delimiter is received
[14:45] stride: ah, I see. alright then
[14:45] Kingdutch: I'm putting the stuff in a string and it'll just send lines whenever it has 1 or more \r\n sequences
[14:45] Kingdutch: Don't see why an array/list would be better
[14:45] Kingdutch: There's only ever 1 line stored
[14:46] Kingdutch: the while loop is there because you sometimes get more than 1 line at once
[14:47] stride: yeah, that was just a hint for future stuff :)
[14:47] Kingdutch: Ok =)
[14:48] guybrush: how can I serve static files with connect.staticProvider on a specific route? i.e. i want to serve ~/bla ond http://localhost/blub
[14:49] guybrush: do i have to do a url-rewrite?
[14:49] ziro`: i'm playing around with the common tcp example, how do i get telnet to send the close connection command thus triggering end?
[14:49] Kingdutch: guybrush: Express seems to do the job quite nicely
[14:50] guybrush: Kingdutch: with url-rewrite?
[14:50] Kingdutch: http://expressjs.com/
[14:50] guybrush: yes i know about express
[14:50] guybrush: i dont know how to serve static files on a specific route
[14:51] Kingdutch: app.get('/blub/:file', function(req,res){ //serve req.params.file });
[14:51] tc77 has joined the channel
[14:51] ziro`: kingdutch, there must be something to handle the sending of mime type headers and sending the file contents to the output buffer automatically for static files...
[14:51] guybrush: app.get('/blub/:file', function(req,res){ res.send(fs.readFile(..)) }); ?
[14:52] guybrush: thats not cool
[14:52] Kingdutch: Hmm guybrush I'm not sure, I serve my static files by hand not with connect.staticProvider, so I could just check for /blub/* and rewrite that to ~/blob
[14:52] guybrush: i see
[14:52] A83 has joined the channel
[14:52] guybrush: well i have a really deep file-tree
[14:52] Kingdutch: Also fs.readfile doesn't return anything, it has a callback
[14:52] ziro`: http://thechangelog.com/post/341389622/node-paperboy-a-node-js-static-page-module
[14:52] guybrush: ye i know, i was lazy
[14:53] guybrush: ziro`: thx, will look into that
[14:54] Kingdutch: ziro`: Ooh right, yeh but I don't mind my 10 lines of JS, especially since I have 1 static page, the rest is all dynamically loaded/created
[14:54] ziro`: Kingdutch: ok :)
[14:55] guybrush: Kingdutch: it is about serving client-side js-libs
[14:55] Kingdutch: Ah
[14:55] guybrush: i have no static pages at all
[14:56] jgoulah has joined the channel
[14:56] guybrush: also it is only for development-stuff, when the project is done it will be compressed and concatet
[14:56] c4milo1 has joined the channel
[14:56] ziro`: it's a common problem when you're infact writing a light weight web server :)
[14:57] jgoulah has left the channel
[14:57] Kingdutch: My biggest problem is how to handle two types of users
[14:57] Kingdutch: Those with JS and those without
[14:57] ziro`: that's a front end issue?
[14:57] Kingdutch: Because a client side module will take over web requests after the initial request, that first request is difficult though
[14:57] Kingdutch: No, because domain.com/#bookmark Would cause two requests
[14:57] Kingdutch: index -> js req for: domain.com/bookmark
[15:01] Wizek has joined the channel
[15:03] Chris_Biscardi has joined the channel
[15:05] tmzt: Kingdutch: did you see the link I posted?
[15:05] tmzt: github.com/tmzt/nodecms
[15:05] Kingdutch: http://github.com/tmzt/nodecms no didn't see it
[15:05] tmzt: it handles the case you mentioned though if you know I cleaner way
[15:05] Kingdutch: (Now I can click it :P)
[15:06] ziro`: i've been looking at node.js this morning and it seems.. powerful
[15:07] genbit has joined the channel
[15:07] tmzt: simple, power through simplicity
[15:07] Kingdutch: Jup
[15:07] ziro`: it's revolutionary in a modern day web context, since the days of perl web servers are much forgotten
[15:07] Kingdutch: tmzt: BTW which case?
[15:07] Kingdutch: The one for guybrush, or mine?
[15:07] tmzt: case?
[15:07] tmzt: nonjs
[15:07] Kingdutch: it handles the case you mentioned though if you know I cleaner way
[15:07] Kingdutch: Oh right
[15:08] Kingdutch: The problem is, I don't like that domain.com/#bookmark makes 2 requests
[15:08] m64253_ has joined the channel
[15:08] tmzt: by the way, while it might be called a cms I mean something a little different by that
[15:08] charlenopires_ has joined the channel
[15:08] Kingdutch: content serving system?
[15:08] Kingdutch: css :')
[15:09] tmzt: just thats intended to handle the static content including of pages containing forms but not the dynamic (post, put)
[15:09] tmzt: yeah
[15:09] Jaye: tmzt: i think nodecms would fit for dynamic content pretty well, most of my content is static though so im generating files and serving them statically. they only get refreshed when changes are made which isnt often
[15:09] tmzt: it might get a editor/ide
[15:09] ziro`: now I understand the potential of node.js, I'm begining to ask the same questions as everyone else... where does it fit in (realistically) with current web stacks, without replacing the http server and scripting language that usually sits behind the server altogether
[15:09] tmzt: but I dont need one right now
[15:09] Kingdutch: Ok so my bot is working
[15:09] Kingdutch: All I need to do now is add listeners for the various events
[15:09] tmzt: ziro`: read the example code on the node website
[15:09] tmzt: copy it to a server.js
[15:09] tmzt: and type node server.js
[15:10] ziro`: tmzt: I get that - i've done it already :)
[15:10] ziro`: but it's too revolutionary
[15:10] tmzt: that should answer your question
[15:10] tmzt: my take is 'whereever you want'
[15:10] ziro`: yes, of course :)
[15:10] tmzt: I have it behind nginx (important for anyone playing with nodecms by the way)
[15:11] ziro`: many developers struggle writing good web software as it stands, let alone asking them to write the server component as well :P
[15:11] tmzt: you'll have to trap at least client.js, lib/, style.css if you have one
[15:11] tmzt: ziro`: hah, well thats why its so simple
[15:11] stride: ziro`: for web use cases it's probably new projects, realtime/websocket stuff on the integration side of things, web services as well if you don't want to deal with all the crap (and benefits, granted) more high level stacks for those applications offer
[15:12] tmzt: it's really a listen()
[15:12] ziro`: i get how simple it is
[15:12] ziro`: but lets face it, apache does that too, with all the routing and configuration you could ever want
[15:12] Jaye: apache is hooge :O
[15:12] ziro`: sure, node.js solution is much more light weight
[15:13] ziro`: but you lose functionality
[15:13] ziro`: which the dev then has to implement
[15:13] tmzt: it gives you flexibility
[15:13] ziro`: it's revolutionary, but the revolution will take time
[15:13] tmzt: you dont need a mod_node for instance
[15:13] stride: or just use one of the frameworks that take care of routing & config..
[15:14] Jaye: thing is, if apache doesnt do what you want, tough luck
[15:14] Jaye: on node you can just hack some functionality in
[15:14] tmzt: does node support listening on a unix socket by the way?
[15:15] stride: tmzt: iirc it does
[15:15] tmzt: Ill look into that
[15:15] stride: at least I believe the net.Stream docs mention(ed) it
[15:16] c4milo1 has joined the channel
[15:16] Chris_Biscardi: you can listen to unix sockets
[15:16] stride: http://nodejs.org/api.html#http-server-158 "To listen to a unix socket, supply a filename instead of port and hostname"
[15:21] xla has joined the channel
[15:23] chrischris has joined the channel
[15:27] femtoo has joined the channel
[15:27] genbit has joined the channel
[15:27] creationix has joined the channel
[15:28] ziro`: heh, apache/nginx also handle the session for you ;)
[15:29] booo has joined the channel
[15:29] Kingdutch: http://pastebin.com/P9h7FCQT <-- Yay my bot's output <3
[15:33] Kingdutch: I never noticed freenode displays my IP :O
[15:34] Imperion: Kingdutch: I guess you're not running anything on port 80
[15:34] Kingdutch: lol Imperion don't portscan me
[15:34] Kingdutch: Also, my router should have that port blocked
[15:34] Imperion: I tried you in Chromium :P
[15:34] Kingdutch: Got multiple systems with port 80 wide open and accepting
[15:34] Kingdutch: Ooh :')
[15:34] Imperion: though
[15:35] Imperion: I might go use nmap now
[15:35] Imperion: :P
[15:35] Kingdutch: Noo:$
[15:37] Node-Bot has joined the channel
[15:37] Node-Bot: Hello Everyone!
[15:37] Kingdutch: Tadaa :D
[15:39] Imperion: Kingdutch: does it do anything?
[15:39] Kingdutch: Not yet, dunno what I should make it do
[15:39] Kingdutch: I'm thinking of giving it a web interface
[15:39] Kingdutch: I can type any command I want on the console and have it passed on
[15:39] Kingdutch: but being able to write commands from the web would be nice
[15:41] Imperion: Node-Bot: die
[15:41] Imperion: meh
[15:41] Imperion: no one can even kill it :P
[15:41] Kingdutch: Nope, it'll respond to server pings
[15:41] Kingdutch: (Somehow CTCP pings look different, I think it might crash on other servers :') )
[15:42] Kingdutch: Node-Bot: Die
[15:42] x_or has joined the channel
[15:42] Imperion: heh
[15:44] Kingdutch: What should I make it do?
[15:45] tg has joined the channel
[15:46] A83 has joined the channel
[15:46] ron_frown: if I build a copy of node.js to run under windows
[15:47] ron_frown: using shittywin
[15:47] ron_frown: can I copy it to other servers, assuming I copy the necessary dlls as well?
[15:47] Node-Bot has joined the channel
[15:47] Node-Bot: Hello Everyone!
[15:47] Kingdutch: It are back :O
[15:47] thingomanatee: getting "session requires the "secret" option string for security" error from connect. What is the "secret" property and what values are proper for it?
[15:48] genbit has joined the channel
[15:49] stride: nobody knows
[15:49] stride: :>
[15:49] thingomanatee: funny
[15:49] Kingdutch: stride: What should my bot do?
[15:50] stride: uh, no idea?
[15:51] stride: thingomanatee: are you using the current connect? Fixed; session middleware throws when secret is not present. [Paul Querna]
[15:51] stride: in the 0.5.5 change notes
[15:51] thingomanatee: well I just installed it.
[15:51] thingomanatee: as in, right now.
[15:51] gartenstuhl has joined the channel
[15:51] thingomanatee: v 0.5.5
[15:52] thingomanatee: but I will (sigh) check and reinstall again.
[15:53] stride: hm. weird, can't reconstruct it right now, I'm still running an ancient version
[15:53] thingomanatee: well then it might have been a recently created / un-created bug. I can see in the code where the bug is created.
[15:53] thingomanatee: if (!options.secret) {
[15:53] thingomanatee: throw new Error('session requires the "secret" option string for security');
[15:54] genbit has left the channel
[15:55] daveyjoe has joined the channel
[15:55] thingomanatee: but yes - it does look like my connect is out of date.
[15:56] thingomanatee: how do I use NPM to update a package? or do I GIT the update myself.
[15:56] Chris_Biscardi has joined the channel
[15:57] daveyjoe: Hi, is there an equivalent of Python's virtualenv in node.js?
[15:57] softdrink has joined the channel
[15:58] thingomanatee: can you elaborte on what features you need for those unpythoned so we can help you better?
[16:04] Wizek_ has joined the channel
[16:05] Kingdutch: Guys, is there a way to subscribe to an event-emitter for command x and channel y, or when channel is *
[16:05] Kingdutch: The combo would be easy would be: on('x-y');
[16:05] thingomanatee: you can use multiple on(...)'s
[16:06] Kingdutch: Yeh but I'd get the same thing twice
[16:06] Figaroo has joined the channel
[16:06] Kingdutch: Wait nvm
[16:06] thingomanatee: no
[16:06] thingomanatee: well you would if both events wre fired off.
[16:07] Kingdutch: I'll just emit twice, once for on('x-y'); once for on('x'); and let people decide what they subscribe to
[16:07] Kingdutch: If you subscribe to x, you don't need x-y
[16:07] thingomanatee: k
[16:08] mnbvasd_: does anyone know much about child_process ? I'd like to fork my running code, can I, or do I have to execute a whole new node environment?
[16:09] tmzt: Ill look into that
[16:09] tmzt: Chris_Biscardi: okay I guess I should have mentioned Im currently using spark but I wonder if forever supports it
[16:09] tapwater has joined the channel
[16:09] thingomanatee: you can fork - I've seen it a couple of times - but I don't remember the process.
[16:10] BrianTheCoder has joined the channel
[16:10] tmzt: thingomanatee: Ive got the first verion of my cms working github.com/tmzt/nodecms
[16:10] thingomanatee: awesome.
[16:11] thingomanatee: I'll tell dingomanatee. He'll be so excited.
[16:11] tmzt: who are you tnem
[16:11] tmzt: ?
[16:12] thingomanatee: I'm screwing with you
[16:13] daveyjoe: thingomanatee: Virtualenv allows you to create new virtual environments when working on different applications/websites. Basically it means that you can start with a fresh environment of python each time with no packages installed and then switch between environments quickly.
[16:13] thingomanatee: BTW I'm finding that versions of express are shifting under me as I work. I'd advise bundling a version of it in your project to improve stabilty.
[16:13] thingomanatee: ah - see daveyjoe, this is kind of what I'm talking about.
[16:14] thingomanatee: You can bundle the entire wad with you. pyrotechnick mentioned a while ago that he does just that - check with him if you see him.
[16:14] daveyjoe: thingomanatee: you mean just bundle them in a local directory instead of using npm?
[16:15] thingomanatee: yes
[16:15] MattJ has joined the channel
[16:15] thingomanatee: However you can do this with the node executor iteself.
[16:15] thingomanatee: that, specifically, I don't know how to do - I just know others have done it.
[16:15] daveyjoe: Hmmm... I like using package managers though. I'm surprised that there isn't a virualenv equivalent in node.
[16:16] tmzt: require.path.unshift('./lib') is what I do
[16:16] Node-Bot has joined the channel
[16:16] tmzt: though with npm's --prefic or --root or whatever you could use it in a local tree under a project I think
[16:16] Kingdutch: !docs v0.2.6
[16:16] mscdex: Node-Bot: Die
[16:16] mscdex: :p
[16:16] thingomanatee: well, if you use bundled modules and a known node version you have a pretty well controlled environment.
[16:16] Kingdutch: mscdex: Meany O:
[16:17] mscdex: i couldn't resist
[16:17] adamfast has joined the channel
[16:17] Kingdutch: It doesn't listen
[16:17] Kingdutch: Not even to me lol
[16:17] tmzt: git submodules work well for pinning versions
[16:17] tmzt: this whole versions thing is pretty outmoded with tags
[16:17] mscdex: if only github automatically pulled in submodules when downloading a zip/tarball
[16:18] mscdex: :\
[16:18] tmzt: maybe we'll even see a general binary package manager based on git someday
[16:18] tmzt: mscdex: well I guess, I havent used that feature
[16:18] Node-Bot has joined the channel
[16:18] tmzt: zip doesnt have modes
[16:18] adamfast: I'd like to use date.js (primarily because I need a robust way to add intervals to the current time) inside a node project but the only mention of it I've found is this - http://comments.gmane.org/gmane.comp.lang.javascript.nodejs/14500 - and it's not working. The date.js methods aren't added to Date. Or DateJS. And the `exports` line fails. I'm on basically github master of node from this morning.
[16:19] tmzt: does that even restore .igt ?
[16:19] tmzt: .git
[16:19] Kingdutch: !docs v0.2.6
[16:19] Chris_Biscardi: is there any reason typing node app.js would stop working?
[16:19] jakehow has joined the channel
[16:19] daveyjoe: I see that there is nvm (https://github.com/creationix/nvm) for managing different node versions, pity they didn't go a step further.
[16:19] tmzt: Chris_Biscardi: is app exporting server?
[16:19] tmzt: or listening
[16:20] Chris_Biscardi: tmzt: the node command is not found
[16:20] Chris_Biscardi: i used it yesterday and all was fine
[16:20] softdrink1 has joined the channel
[16:20] Node-Bot has joined the channel
[16:20] thingomanatee: It will be a full year before Toyota will be brought for trial for the sudden accelleration charges. COS THEY'RE STILL GOIN! (haw)
[16:20] Chris_Biscardi: its the app.js in your nodecms btw
[16:21] Kingdutch: !docs v0.2.6
[16:21] Kingdutch: Ah blergh
[16:21] Kingdutch: stupid bot
[16:24] tmzt: hold on ill check my code
[16:24] mscdex: adamfast: all you should need to do is add something like this to the bottom of date.js: "exports.Date = Date;"
[16:25] mscdex: actually..
[16:25] jacobolus has joined the channel
[16:26] tmzt: thingomanatee: sorry its paths
[16:26] thingomanatee: thx
[16:28] booo has joined the channel
[16:29] mscdex: adamfast: ok, so you don't even have to change date.js, just require() it and then use Date like they show on the website
[16:29] liar has joined the channel
[16:29] adamfast: really...that didn't seem to work
[16:30] nonnikcam has joined the channel
[16:30] Node-Bot has joined the channel
[16:30] Kingdutch: !docs 0.2.6
[16:31] adamfast: at least when I do the export bit the object comes through when I require it
[16:32] thingomanatee: thanks tmzt
[16:32] foomanchoo has joined the channel
[16:32] satiricon has joined the channel
[16:32] neynenmo has joined the channel
[16:33] mscdex: adamfast: here's what i'm using: https://gist.github.com/781016
[16:33] adamfast: ah. I didn't know you could require without putting it in a variable...that is likely my problem
[16:34] foomanchoo: howdy ya'll. so, there are so many testing frameworks available, i am curious if anyone has any recommendations?
[16:34] thingomanatee: tmzt - looking at your cms
[16:34] thingomanatee: looks like its all ajax, all the time :D
[16:35] adamfast: mscdex: when I require without a var it prints out a bunch of stuff into the terminal but the methods aren't there
[16:35] thingomanatee: could use a readme ...
[16:35] mscdex: adamfast: stuff like what?
[16:36] adamfast: sorry, I know better than that... https://gist.github.com/43e87d32ea8390324c39
[16:36] kiddphunk has joined the channel
[16:36] mscdex: oh, that's because you're in the REPL
[16:37] adamfast: (that) being complaining without being helpful
[16:37] adamfast: ah. does it behave differently when in the console vs. while executing a script?
[16:37] tmzt: thingomanatee: nah, it falls back if theres no js to normal relative paths
[16:37] tmzt: and the node side serves that just fine
[16:38] mscdex: adamfast: yes
[16:39] mediacoder_ has joined the channel
[16:39] tmzt: I'm basically building it to have a common base to build a few projects on, as I need them I'll add features
[16:39] tmzt: it could be cleaned up and made middleware, a lot more robust, etc.
[16:40] tmzt: Im also doing purse json /session so the client or the server will be able to change the template based on whether its logged in or not
[16:41] adamfast: mscdex: ok, it's working in the script now. thanks for the help, definitely appreciate it. I'll keep learning.
[16:41] mscdex: np
[16:42] admc has joined the channel
[16:44] Node-Bot has joined the channel
[16:44] Kingdutch: !docs
[16:44] Node-Bot: v0.3.4 docs are found at: http://nodejs.org/docs/v0.3.4/api/
[16:44] Kingdutch: Command nr 1 is working :>
[16:45] prettyrobots has joined the channel
[16:45] A83 has joined the channel
[16:45] broofa has joined the channel
[16:45] prettyrobots: How do you pretty print JSON in the Node.js style?
[16:46] Kingdutch: Aww geez, IPv6 IPs screw up IRC parsing :O
[16:46] Chris_Biscardi has joined the channel
[16:50] dnolen has joined the channel
[16:51] tmzt: prettyrobots: inspect?
[16:51] prettyrobots: tmzt: Can it be made to emit JSON? It emits JavaScript.
[16:51] tmzt: not sure what you mean
[16:52] prettyrobots: I'm using 0.2, so maybe it is new and improved in v 0.3.
[16:52] prettyrobots: inspect emits JavaScript, not JSON.
[16:52] muk_mb has joined the channel
[16:52] prettyrobots: There's a difference.
[16:54] ROBOd has joined the channel
[16:54] mscdex: prettyrobots: there's no built-in way afaik
[16:55] mscdex: unless you copy inspect() and modify it to output a json-compatible string
[16:55] mscdex: heh
[16:55] mscdex: or use a third party json pretty printer
[16:56] tmzt: how is it lacking?
[16:56] tmzt: world tinies printer printer is good
[16:56] Yuffster has joined the channel
[16:59] thingomanatee: tmnt: for some reason when I get the git clone version of connect I still get that "secret" error even though I do see a refactored version on the github.
[17:00] Chris_Biscardi: me 2
[17:00] jacobolus has joined the channel
[17:00] thingomanatee: Im a bit of a git noob -
[17:00] polyrhythmic has joined the channel
[17:00] thingomanatee: hwo can I get the version of the connect lib I'm seeing on the github page?
[17:00] ewdafa has joined the channel
[17:00] thingomanatee: its pretty graphic - the session file isn't even in the same place.
[17:02] tmzt: thingomanatee: copy the sha1 from the url
[17:03] tmzt: and just use that with checkout
[17:03] thingomanatee: as in git checkout "20071423e301007cc230229e4a5da2366e71f35b" ?
[17:04] tmzt: yes
[17:04] matjas has joined the channel
[17:04] thingomanatee: so remove connect and then type the above?
[17:04] tmzt: basically everything in git is another way of saying a sha1, branches, tags etc.
[17:04] tmzt: why would you type connect?
[17:04] tmzt: for clone?
[17:05] thingomanatee: it is the connect library that is causing this problem.
[17:05] heavysixer has joined the channel
[17:05] tmzt: cd into the connect submodule
[17:05] tmzt: and do they command you just pasted
[17:05] prettyrobots has joined the channel
[17:06] daveyjoe has joined the channel
[17:06] thingomanatee: k
[17:07] dnyy has joined the channel
[17:08] prettyrobots: tmzt: http://www.json.org/
[17:08] prettyrobots: No quoted keys, no single quotes.
[17:08] prettyrobots: Or auto-quoted, I mean. Maybe I mean implied quotes.
[17:08] tmzt: prettyrobots: right, keys have to be quoted no single quotes
[17:08] tmzt: a replace() should handle that
[17:08] gf3 has joined the channel
[17:09] tmzt: trailing , Im not sure
[17:10] MrTopf has joined the channel
[17:11] Wizek has joined the channel
[17:11] altamic has joined the channel
[17:12] BrianTheCoder has joined the channel
[17:12] admc has joined the channel
[17:12] heavysixer has joined the channel
[17:14] EGreg_: hey guys
[17:14] Kingdutch: Hi
[17:14] EGreg_: What are you up to
[17:14] ziro`: anyone know much about jade?
[17:15] jakehow has joined the channel
[17:15] stepheneb has joined the channel
[17:15] Kingdutch has joined the channel
[17:15] EGreg_: no, what's that about
[17:15] tmzt: template engine
[17:15] Node-Bot has joined the channel
[17:16] ziro`: development on the browser version seems stunted?
[17:16] ziro`: last commit was July 2010
[17:16] EGreg_: http://stackoverflow.com/questions/1787716/is-there-a-template-engine-for-node-js
[17:16] tmzt: hope not
[17:17] ziro`: i think underscore and moustache work both clientside and have node.js implementations
[17:17] zomgbie has joined the channel
[17:17] robotarmy has joined the channel
[17:18] charlenopires has joined the channel
[17:19] tmzt: ziro`: yeah but I like jade after looking at least haml, and it has node support
[17:19] tmzt: good
[17:19] ziro`: yeah, it might have node support, but i'm thinking of using it for rendering ajax partials
[17:19] ziro`: client side
[17:19] tmzt: Im not sure if I will use client side templating though the sammy form support looks awesome
[17:20] tmzt: but if Im going to I want the same templates in the js and nonjs version
[17:20] Kingdutch: Useless bot
[17:20] EGreg_: I am listening to ryah's interviews
[17:21] EGreg_: and I really like the motivation behind node :)
[17:21] thingomanatee: tmzt - appreciate your help: the patch you noted doesn't FIX my problem - it CREATED IT.
[17:21] sivy has joined the channel
[17:21] thingomanatee: for general knowledge: you have to pass {secret: 'something random'} to app.use(express.session()) or it doesn't work.
[17:23] Kingdutch: y?:O
[17:23] thingomanatee: its a security feature from what I can gather. That's the REASON for the patch.
[17:24] davidc_ has joined the channel
[17:24] thingomanatee: the reason you have to have a secret seed now is basically, because if you don't your connect middleware will throw an exception.
[17:25] Kingdutch: Your connect middleware shouldn't care if you fail or not
[17:25] Kingdutch: >.>
[17:25] MattDiPasquale has joined the channel
[17:25] thingomanatee: two steps forward...
[17:25] Kingdutch: four steps back!
[17:25] losing has joined the channel
[17:25] marienz_ has joined the channel
[17:25] Kingdutch: Isn't that a song?
[17:25] thingomanatee: just lost an hour of my life. I'll get by.
[17:26] EGreg_: what are you guys building with node?
[17:27] thingomanatee: <-- online comic books
[17:27] thingomanatee: <-- search engine for this forum :D
[17:28] spetrea has joined the channel
[17:28] Kingdutch: I was thinking of making an IRC bot that you can order in to your room from the web and it'll monitor Twitter traffic for keywords, hashtags or users that you specify
[17:28] thingomanatee: Check out Aria's repo. That is one of the best single person repo I've seen for node to date.
[17:28] Kingdutch: But I'm too lazy for that atm, so I'm working on a problem I have for a webserver where a JS client takes over from the browser doing the requests, because domain.com/#bookmark will generate two requests =/
[17:29] mscdex: Kingdutch: one for / and one for favicon.ico right?
[17:30] markstory has joined the channel
[17:31] tmzt: patch I noted?
[17:31] Kingdutch: mscdex: No that'd make it three
[17:31] Kingdutch: one for domain.com/
[17:31] Kingdutch: And the JS would make another one for #bookmark
[17:31] Kingdutch: BEcuase the hashtag 'n contents isn't passed along to the server
[17:32] EGreg_: do you guys use express a lot
[17:32] EGreg_: or underscore?
[17:32] Kingdutch: I haven't touched a single module so far
[17:32] Kingdutch: except for the native ones
[17:32] EGreg_: imho express has one nice feature
[17:32] EGreg_: you can run node on multiple processes
[17:32] tomhsx has joined the channel
[17:32] EGreg_: and have a front process that delegates it to the vailable ones
[17:33] hij1nx has joined the channel
[17:34] jchris has joined the channel
[17:35] creationix has joined the channel
[17:38] muk_mb has joined the channel
[17:40] eee_c has joined the channel
[17:41] jchris has joined the channel
[17:43] tmzt: Kingdutch: my # got pushed to the server, but I still dont understand what you mean
[17:43] Kingdutch: Your # got pushed to the server? O.o
[17:43] Kingdutch: In what browser are you living?
[17:44] Kingdutch: tmzt: ^
[17:45] tmzt: dolphin on android right now
[17:45] tmzt: its in the logs, im not sure how
[17:45] Kingdutch: Hmm weird, then dolphin is failing
[17:45] Twelve-60 has joined the channel
[17:45] Kingdutch: If you try chrome or any desktop browser
[17:45] Kingdutch: it wont send along the hashtag
[17:46] mscdex: flipper!
[17:46] tmzt: its just webkit
[17:46] tmzt: im not sure why
[17:46] Kingdutch: oh right yeh, forgot about that
[17:47] Kingdutch: Me neither
[17:48] Kingdutch: *Whimper*
[17:49] Kingdutch: I can't be satisfied with index.html getting loaded, and then #bookmark getting loaded
[17:49] Kingdutch: =S
[17:49] dthompson has joined the channel
[17:50] tmzt: explain
[17:50] Kingdutch: User starts on index page or some other page from google
[17:51] tmzt: im not doing that, im sending out the contents in the page
[17:51] Kingdutch: This page has text that'll take over when links get clicked and dynamically load the page changing the url to url#newUrl
[17:51] Kingdutch: Now when a user would come to domain.com/#bookmark, it'd first load index, and then the correct page, that takes too long
[17:51] tmzt: then if they click a non http:// or schemed link it will fetch a partial
[17:51] Me1000 has joined the channel
[17:52] tmzt: my code is at github.com/tmmt/nodecms
[17:52] Kingdutch: http://github.com/tmmt/nodecm
[17:52] Kingdutch: http://github.com/tmmt/nodecms
[17:52] Kingdutch: You typoed
[17:52] Kingdutch: so I copied typo lol
[17:52] Kingdutch: http://github.com/tmzt/nodecms
[17:53] Kingdutch: tmzt: What would happen if I would bookmark a page like yourdomain.com/#myfavpage and then go there from an external site
[17:53] Kingdutch: ?
[17:53] yozgrahame has joined the channel
[17:54] markstory: Kingdutch: nothing happens, the browser goes back to that address including the fragment.
[17:54] tmzt: ah, if it *is* sent to the server I can add support
[17:54] markstory: fragments are not sent to the server.
[17:54] tmzt: ok
[17:54] tmzt: then you would use the / form
[17:54] Kingdutch: markstory: Exactly, so the browser goes to yourdomain.com gets served the index, and then the right page is loaded by the JS
[17:54] markstory: most people use javascript to send the fragment back to the server.
[17:55] tmzt: im trying to figure that out
[17:55] tmzt: that would work
[17:55] Kingdutch: The problem is, you want to support non-js users, so the index is a big ass static HTML page, which is unnecessarily loaded
[17:55] Kingdutch: which takes long =/
[17:55] AAA_awright_ has joined the channel
[17:55] markstory: tmzt: scan through twitter's source code see how they do it.
[17:55] Kingdutch: markstory: That won't work, you still first have to load index in the first place
[17:55] Kingdutch: It's not an in-site navigation
[17:55] tmzt: sure, is there a better way to do it?
[17:55] tomhsx has joined the channel
[17:57] markstory: Kingdutch: you could always use the browser history API's like github.
[17:57] A83 has joined the channel
[17:57] Chris_Biscardi: can't you access the hash from the request?
[17:58] Kingdutch: Chris_Biscardi: No, # don't get send in requests
[17:58] markstory: no, it never gets sent to the server.
[17:58] Chris_Biscardi: http://nodejs.org/docs/v0.3.4/api/url.html
[17:58] Kingdutch: markstory: How do you mean the browser history?
[17:58] Chris_Biscardi: theres an option for it in 3.4
[17:58] Kingdutch: Chris_Biscardi: That's a url parser used on the client
[17:58] markstory: Kingdutch: in non IE browsers you can use the history api to manipulate the browser history.
[17:58] tmzt: markstory: I was getting # from at least one brower
[17:58] markstory: tmzt: that browser is wrong then.
[17:58] Chris_Biscardi: ah ok
[17:58] Kingdutch: Chris_Biscardi: The # needs to be sent by the browser, which according to HTTP specs is not supposed to be done
[17:59] Kingdutch: markstory: But you still need to send the index page first
[17:59] Kingdutch: And making the index small (just JS) could work
[17:59] markstory: Kingdutch: or don't use fragments at all.
[17:59] Kingdutch: Since it'd take a lot of time off the delay
[17:59] Kingdutch: markstory: But I want pretty loading :')
[17:59] Kingdutch: Problem is, for non JS users you'd need a redirct
[17:59] Kingdutch: redirect*, which kills SEO
[17:59] markstory: well make it work without js, and then make it pretty.
[18:00] Kingdutch: =/
[18:00] Kingdutch: That's double work, and quite hard
[18:00] Kingdutch: to fix later
[18:00] markstory: Or make it all javascript and pretend people without js don't exist.
[18:01] Kingdutch: Wish I could
[18:01] Kingdutch: SEO is my biggest non-js client
[18:01] maushu has joined the channel
[18:01] Kingdutch: And then there's the fact that shops can't ignore 1-2% of potential customers
[18:01] markstory: Well if you look hard enough I'm sure you can find big ajax apps that pull this problem off.
[18:02] markstory: You get most of their source code, its just a matter of reading and deciphering it all.
[18:02] Kingdutch: Hmm yeah
[18:02] Kingdutch: It should be somewhere
[18:02] markstory: the internets hold the answers
[18:02] mikew3c has joined the channel
[18:03] Kingdutch: Is there a way to analyse browser requests/scripts run
[18:03] markstory: use a proxy.
[18:03] prettyrobots has joined the channel
[18:03] markstory: I like charles, it can middle man ssl which is handy
[18:04] devdrinker has joined the channel
[18:04] tmzt: the test case wont work now
[18:05] AAA_awright has joined the channel
[18:06] tmzt: Kingdutch: thats the thing I dont think it should be so complicated to support both types
[18:06] stride: I use burpsuite
[18:06] Kingdutch: Can any of you turn off JS and confirm twitter is broken?
[18:07] tmzt: at least #NewTwitter
[18:07] Kingdutch: tmzt: Well it's not complicated to support both types, but it'd mean that the first time the user lands on your page he/she will get a double page load
[18:07] Kingdutch: which imo is bad
[18:08] tmzt: why?
[18:08] markstory: Kingdutch: that's why I like the graceful enhancement approach.
[18:08] tmzt: you dont want to serve a static front page and you dont want to load something?
[18:08] markstory: you can cover the page with loading spinners if you want.
[18:09] Kingdutch: Because I want to make my platform public, and I have foreseeable users that will bloat with x^10 images, and if a page loads in 5 sec, you don't wnat to wait another 5 for it go to where you want
[18:09] Kingdutch: Can JAvascript interrupt a request?
[18:09] tmzt: right but dont you really need to choose one of those two options?
[18:09] Evet: does node.js have in-memory hashtable?
[18:09] w0rse has joined the channel
[18:10] markstory: Evet: like an plain old Object?
[18:11] Kingdutch: Hmm I guess I'll just background load a page if there's a # and kill off the content that'll be replaced
[18:11] Evet: markstory: porbably
[18:11] markstory: then yes
[18:11] mscdex: node.js rules!
[18:11] markstory: var foo = {key: 'value', key2: 'value2'}
[18:11] augustl: I remember seeing a guide on using npm programmatically. Anyone know where it is?
[18:12] augustl: Kingdutch: do you mean interrupting requests in node?
[18:12] AAA_awright_ has joined the channel
[18:12] Evet: markstory: erm. it must be cross-process
[18:12] markstory: unpossible
[18:12] markstory: you could use redis/memcache for it though.
[18:12] Kingdutch: augustl: No
[18:13] augustl: Kingdutch: XMLHttpRequest then?
[18:13] Kingdutch: No, I mean the browser request
[18:13] Evet: markstory: extra overhead
[18:13] nu-: augustl there is info in https://github.com/isaacs/npm#readme
[18:13] shaver: cross-process is always overhead
[18:13] Kingdutch: Which isn't possible without using xyz hacks and then you'll still miss Safari, so I'll just do it some other way
[18:13] markstory: Evet: well node processes don't know about each other.
[18:13] markstory: as far as i know at least.
[18:13] augustl: nu-: thanks
[18:14] augustl: Evet: you can probably use sockets for inter-process communication
[18:14] markstory: Evet: you could use Java instead, but that's more overhead too. :)
[18:14] augustl: i.e. unix sockets, not TCP sockets
[18:14] markstory: augustl: memcache uses sockets.
[18:14] Evet: i have to switch back to C :\
[18:14] augustl: raw sockets are more fun :)
[18:15] shaver: Evet: your performance tests show that?
[18:15] markstory: writing web apps in C is fun :)
[18:15] Evet: shaver: no, i just dont know how to use bsd sockets in nodejs
[18:15] Guest34089 has joined the channel
[18:15] shaver: oh, I think there are documents on it
[18:15] Kingdutch: net.createSocket('/socketname'); ?
[18:15] Kingdutch: There's a socket
[18:16] Kingdutch: ACTION just realised a cool feature for his bot :O
[18:16] augustl: Kingdutch: that's a TCP socket though
[18:16] augustl: no?
[18:16] Kingdutch: Nope
[18:16] augustl: neat it's both
[18:16] Kingdutch: dinner is ready brb
[18:17] dingomanatee: I'm seeing an odd disconnect. When I pass {locals: {foo: "bar"}} for some reason the value of "foo" is not reaching my template.
[18:17] dingomanatee: Is there a way to expose all the locals from within an ejs template?
[18:20] arrty has joined the channel
[18:21] Kingdutch: btw http://nodejs.org/docs/v0.3.4/api/net.html#net.Socket
[18:21] Kingdutch: @augustl and Evet
[18:22] zomgbie has joined the channel
[18:22] Evet: Kingdutch: thanks
[18:22] hornairs has joined the channel
[18:22] Kingdutch: the docs are your friends
[18:26] softdrink has joined the channel
[18:26] sh1mmer has joined the channel
[18:27] A83 has joined the channel
[18:28] dingomanatee: does anyone here use no.de? I think I need to use it to setp through some stuff.
[18:29] stride: huh, didn't know yammer uses node
[18:31] Chris_Biscardi: no.de requires a signup and request before you can use it
[18:31] dingomanatee: I have a key from nodecamp
[18:31] Chris_Biscardi: then go for it
[18:31] dingomanatee: I just was wondering if there were any useful docs to get me started with setup
[18:33] Kingdutch: What's no.de?
[18:34] dingomanatee: its a cloud service from Joyent for node dev
[18:34] Chris_Biscardi: theres a list of resources on the no.de site, but thats all i know of
[18:36] Kingdutch: Ooh right that
[18:42] mayfield has joined the channel
[18:45] tomhsx has joined the channel
[18:46] jae has joined the channel
[18:47] mattly has joined the channel
[18:47] dgathright has joined the channel
[18:47] Chris_Biscardi: also the videos from node camp are up and the last one pertains to no.de
[18:47] dingomanatee: yeah ... I was there, just "confused".
[18:47] dingomanatee: :D
[18:47] dingomanatee: I should revisit them.
[18:48] Chris_Biscardi: always helps me :-)
[18:48] desaiu has joined the channel
[18:48] rabc has joined the channel
[18:49] rabc: hi! anyone can help me with a question?
[18:49] mattly has joined the channel
[18:49] Chris_Biscardi: won't know until you ask :-P
[18:49] dingomanatee: yes.
[18:49] dingomanatee: But you get one, and you've used it up.
[18:49] Chris_Biscardi: haha
[18:49] rabc: LOL, yes, I figured out all this :P
[18:50] rabc: I started playing with node.js and I'm building a little module, so how do I use eventEmitter?
[18:50] lupomontero has joined the channel
[18:50] rabc: I want my module to emit the event, and call like myModule.on('foo', function(bar) {});
[18:51] ashleydev has joined the channel
[18:52] Chris_Biscardi: something like server.on('connection', function(){console.log('connection')}
[18:53] Chris_Biscardi: you have to require the events first
[18:53] rabc: this is what I tried:
[18:53] rabc: var eventEmitter = require('events').EventEmitter;
[18:53] rabc: var eventEmitter = require('events').EventEmitter;
[18:53] rabc: eventEmitter.emit('progress', progress);
[18:54] Imperion: uh, does anyone know how to tell npm to update all that it can?
[18:54] Imperion: right now it's barfing on something that requires node 0.3
[18:54] Imperion: I'd like to have it update the rest
[18:54] Chris_Biscardi: npm update?
[18:54] Chris_Biscardi: i think
[18:55] dingomanatee: rabc: var ee = new require('events').EventEmitter;
[18:55] Imperion: Chris_Biscardi: npm update fails if any of the packages-to-update can't be updated
[18:55] xSmurf: hey nodites, is this a know bug? parsed = Url.parse(url); // parsed.protocol === "https:"
[18:55] dingomanatee: then you basically add listereners via ee.on('foo', function(){});
[18:55] xSmurf: notice the extra ;
[18:55] xSmurf: * :
[18:56] xSmurf: (0.2.6)
[18:56] dingomanatee: also take care without removing listeners from ee via ee.removeAllListeners() you can't cleanly exit your script
[18:57] xSmurf: wow, it's documented
[18:58] xSmurf: srs??
[18:58] xSmurf: wth
[18:58] jae has joined the channel
[18:58] xSmurf: I'm sorry but "http:" isn't a protocol!!
[18:58] skampler: rabc: var obj = new eventEmitter(); obj.emit('event')
[18:58] Imperion: xSmurf: it's Node's notation
[18:58] Imperion: xSmurf: I don't think it will be changed soon
[18:58] dingomanatee: rabc: are you good yet?
[18:59] dingomanatee: oh well
[18:59] Chris_Biscardi: npm update package
[18:59] Chris_Biscardi: youll have to call it individually though, which sucks
[18:59] herbySk has joined the channel
[18:59] rabc: @dingomanatee yes, I'm trying what you said, let me see if it works
[18:59] dingomanatee: thanks.
[19:00] dingomanatee: https://github.com/bignomanatee/noogle/blob/master/model/lines.js# is a working example.
[19:00] dingomanatee: I am using events to stall execution of calls to mongo til the database is loaded and the connection is made.
[19:03] softdrink has joined the channel
[19:04] vineyard has joined the channel
[19:04] nonnikcam has joined the channel
[19:09] saschagehlich has joined the channel
[19:10] jae has joined the channel
[19:11] iszak has joined the channel
[19:11] iszak has joined the channel
[19:12] eirikb has joined the channel
[19:12] saschagehlich: any ideas how I can create a chart like this to track the memory usage of my node process? http://bit.ly/eb2tIg
[19:13] eirikb: Hello. What is the best way to test node.js? My previous tests are written in Jasmine, but totally unrelated to node. I essentially want to test simple requests, but resetting node each time is important, as well as testing serverside directly would be nice
[19:13] tomhsx has joined the channel
[19:15] TobiasFar has joined the channel
[19:16] daveyjoe has joined the channel
[19:16] vineyard has joined the channel
[19:22] jae has joined the channel
[19:25] rabc: dingomanatee thanks, your module helped me, I think I will can release a first version of my module today :)
[19:27] MattDiPasquale has joined the channel
[19:27] benburkert has joined the channel
[19:29] ineation has joined the channel
[19:33] warz has joined the channel
[19:33] sveimac has joined the channel
[19:33] jae has joined the channel
[19:34] sveimac has joined the channel
[19:36] jimt has joined the channel
[19:36] Ond has joined the channel
[19:37] A83 has joined the channel
[19:39] hdon has joined the channel
[19:39] perlmonkey2: Does npm update node also? I see it checks which version of node I'm on.
[19:40] vineyard: perlmonkey2: no
[19:40] perlmonkey2: vineyard: thanks.
[19:41] k04n has joined the channel
[19:41] dingomanatee: good for you rabc
[19:41] davidascher has joined the channel
[19:42] dingomanatee: what does it do?
[19:43] eazyigz has joined the channel
[19:43] eazyigz: whenever I try to install npm I keep getting an error: "npm cannot be installed without nodejs.
[19:43] eazyigz: Install node first, and then try again."
[19:43] eazyigz: what gives
[19:43] eazyigz: if I run nodejs from command line then node launches
[19:44] vineyard: eazyigz: do you have node on your PATH
[19:44] eazyigz: I don't
[19:44] eazyigz: 'node' or 'nodejs'?
[19:44] eazyigz: i can run 'nodejs' from command line
[19:44] eazyigz: but I don't understand which variable I should add to my path
[19:44] vineyard: try running `which node`
[19:45] eazyigz: which node doesn't produce anything
[19:45] vineyard: how did you install node?
[19:45] eazyigz: i am on ubuntu 10.10
[19:45] jae has joined the channel
[19:45] eazyigz: but if i run 'which nodejs' I get /usr/bin/nodejs
[19:46] eazyigz: i installed it from github. Then just for the hell of it i used package manager in Ubuntu to install it again
[19:46] vineyard: eazyigz: cd /usr/bin && ln -s nodejs node
[19:48] vineyard: eazyigz: i don't know how it's "nodejs" instead of node though if you installed it from github repo
[19:48] KungFuHamster has joined the channel
[19:48] eazyigz: vineyard: progress... However, npm install now gives me an error
[19:49] eazyigz: /tmp/npm.22316/package/lib/utils/parse-args.js:259
[19:49] eazyigz: ,["a -true -- -no-false", {true:true},["a","-no-false"]
[19:49] vineyard: eazyigz: hold on... did you install node from https://github.com/ry/node ?
[19:49] eazyigz: I may have, I don't remember, it was a while ago
[19:50] eazyigz: why?
[19:50] eazyigz: like i said, I just ran Ubuntu
[19:50] eazyigz: synaptic to install node
[19:50] eazyigz: that was 5 minutes ago
[19:50] eazyigz: i originally install node from github, like a few months ago
[19:51] vineyard: I suggest you install it from github instead of synaptic :D
[19:51] eazyigz: hmmmm.... Ubuntu guys can't get the node installation right :)
[19:51] eazyigz: its a shame, because I love Ubuntu, and I also love nodejs
[19:51] eazyigz: both go together like chemicals
[19:52] mnbvasd_: does anyone know any examples of md5digest auth serverside in js?
[19:52] eirikb: eazyigz: Just install node with apt, $which node -> /usr/local/bin/node
[19:52] mnbvasd_: I'm having trouble implementing rfc2831 :(
[19:55] jae has joined the channel
[20:00] jan____ has joined the channel
[20:02] jan____ has joined the channel
[20:02] kiddphunk has joined the channel
[20:03] skohorn has joined the channel
[20:04] eazyigz: which version of node is the github repo?
[20:04] AAA_awright: Uh, all of them?
[20:04] eazyigz: i mean if i clone the repo and install it, which version of node will i get??
[20:05] jae has joined the channel
[20:05] AAA_awright: You'll download all of them, but git will by default checkout the "master" branch
[20:05] AAA_awright: You'll have to check the version file to see what exact version that is
[20:05] AAA_awright: 0.3.5 I think
[20:05] AAA_awright: Right now
[20:07] AAA_awright: eazyigz: You know how Git works right?
[20:08] eazyigz: sure
[20:08] eazyigz: AAA_awright: what am i missing?
[20:08] eazyigz: i guess the master brach concept is what I was fuzzy on
[20:08] eazyigz: thanks
[20:10] matjas has joined the channel
[20:10] x_or has joined the channel
[20:10] SamuraiJack_ has joined the channel
[20:11] AAA_awright: eazyigz: You probably mean to ask what branches are there... I use master, that's the bleeding edge, some people use 0.2 for some reason, whatever, they can be left in the dark I don't care :p
[20:11] jetienne has joined the channel
[20:11] AAA_awright: "What branches are there?" Which branches are which
[20:13] eazyigz: right, i meant which branch I would get by default - without making any choices whatsoever
[20:13] vineyard has joined the channel
[20:13] eazyigz: i like bleeding-edge stuff too
[20:16] eirikb has left the channel
[20:16] jae has joined the channel
[20:17] A83 has joined the channel
[20:17] yumike has joined the channel
[20:18] hij1nx has joined the channel
[20:19] eazyigz: I have node v0.2.0. How do I update it to 0.3.4?
[20:19] rabc: how can I use npm for developmen? don't I just have to require the module using the same name in package.json "name" ?
[20:21] AAA_awright: eazyigz: How did you install it?
[20:21] SwiftLayer has joined the channel
[20:21] eazyigz: I just checked it out from git
[20:21] eazyigz: but I had node installed before via Synaptic manager
[20:22] AAA_awright: git checkout master && git pull && ./configure && make && sudo make install
[20:22] AAA_awright: Oh, you will need to remove the existing Nodejs first
[20:22] halfhalo: ACTION debates upgrading his node install
[20:22] ziro`: is it possible to use node.js clientside or am i completely missing the boat?
[20:23] femtoo has joined the channel
[20:23] halfhalo: its alot of effort to find the directory the git repo is in...
[20:23] AAA_awright: ziro`: How would you use it client side? What do you mean client-side?
[20:23] ziro`: ok, i'm missing the boat ;)
[20:23] ziro`: tcp client could be handy :)
[20:24] ziro`: but i suppose that's what sockets.io is for ?
[20:24] AAA_awright: Oh, well yeah, it's a general library you can use it as a TCP client yeah
[20:24] AAA_awright: You can write GUI apps even, stuff like that
[20:24] AAA_awright: I thought you meant in the browser
[20:24] ziro`: i do
[20:24] gkatsev: ziro`: you can run node on a server or locally as a scripting language.
[20:24] Kingdutch: ACTION can not sudo node :(
[20:24] charlenopires has joined the channel
[20:24] Kingdutch: >:|
[20:24] hij1nx has joined the channel
[20:26] halfhalo: ACTION notes make is failing for him after a git pull
[20:27] halfhalo: oh hey, forgot to do sudo make
[20:27] AAA_awright: ziro`: Most the functionality is implemented in C++ code so no
[20:27] ziro`: solved, thank you
[20:27] AAA_awright: halfhalo: Only for installing, not for regular building?
[20:28] ashleydev has joined the channel
[20:28] jae has joined the channel
[20:29] xSmurf: are there any facilities to serialize json to binary in order to write it to a file?
[20:29] xSmurf: or am I missing something in fs.?
[20:29] halfhalo: ACTION did it for making as well and is to lazy to fix it
[20:29] halfhalo: in other news, that computer is now acting up...
[20:30] gkatsev: halfhalo: oh, hey, it's you :)
[20:30] halfhalo: in a completely non-related way as well!
[20:30] halfhalo: yes, yes it is me
[20:30] SwiftLayer has joined the channel
[20:30] halfhalo: it just completely shut down like someone pulled the battery....
[20:31] halfhalo: and 5 seconds after hitting the powerbutton to make it boot... it did it again
[20:31] halfhalo: yet its working now while plugged into the power adapter...
[20:32] gkatsev: lol
[20:32] halfhalo: ...
[20:32] halfhalo: stupid mpb
[20:33] AAA_awright_ has joined the channel
[20:33] gkatsev: ACTION doesn't own any apple products
[20:33] halfhalo: ACTION has a personal mac mini and a work mbp
[20:33] halfhalo: because its worth it for textmate
[20:34] gkatsev: no, no it isn't
[20:34] gkatsev: vim all the way, baby.
[20:34] xSmurf: not the hardware no ;p
[20:34] halfhalo: ACTION will stab you in the neck with a coaster
[20:34] eikke has joined the channel
[20:34] xSmurf: ACTION is a 20+ apple user who will likely never buy any apple hardware ever again
[20:34] xSmurf: has 3 hackintoshes, they are fantastic machines
[20:34] halfhalo: ACTION has an equalish amount of mac and pc's
[20:35] eirikb has joined the channel
[20:35] eirikb: What is the best way to share code between browser and node?
[20:35] halfhalo: the internet
[20:35] eirikb: I saw this, http://stackoverflow.com/questions/4371196/node-js-and-client-sharing-the-same-scripts but not sure if those are the best solutions
[20:35] satiricon: halfhalo, LOL!
[20:36] eirikb: The thing is I can require the first script, but that script again uses another one - then I'm in trouble
[20:37] jtsnow_ has joined the channel
[20:37] mraleph1 has joined the channel
[20:38] nonnikcam has joined the channel
[20:39] jae has joined the channel
[20:39] claudiu_ has joined the channel
[20:39] common- has joined the channel
[20:39] naneau_ has joined the channel
[20:39] tswicegood_ has joined the channel
[20:39] ROBOd_ has joined the channel
[20:39] rickard2_ has joined the channel
[20:40] hdon- has joined the channel
[20:40] Sembianc1 has joined the channel
[20:40] _richardJ has joined the channel
[20:40] eazyigz_ has joined the channel
[20:40] stephen_mcd1 has joined the channel
[20:41] rodasc has joined the channel
[20:41] Lorentz_ has joined the channel
[20:41] dingomanatee: erikb: some would say web sockets - however node is fine using REST based communication
[20:42] chrischr_ has joined the channel
[20:42] brachiel has joined the channel
[20:42] volve1 has joined the channel
[20:42] kgf_ has joined the channel
[20:43] dingomanatee: Can anyone tell me why a local variable would evaporate somewhere between the route handler and a template?
[20:43] dingomanatee: context: express
[20:43] eirikb: dingomanatee: I don't understand
[20:43] eirikb: dingomanatee: I can get the scripts out to the browser, it's just that they need to share some code with server
[20:44] eirikb: For instance having Person on both sides
[20:44] dingomanatee: oh - as counterintuitive as it may seem node does not run or directly share code with client side javascript.
[20:44] boaz has joined the channel
[20:44] dingomanatee: Node is a Server Side language like Ruby or PHP - the fact that it uses a language that is also available on the browser doesn't mean that node runs on the browser - it doesnt
[20:45] mojombo_ has joined the channel
[20:45] Kingdutch: You guys seen Avira right? Why doesn't that just use WebGL?
[20:45] eirikb: dingomanatee: The code I have runs fine in a browser, why would it not run in node?
[20:45] dingomanatee: Node can communicate with client side javascript but it itself doesnt' run on the broswer.
[20:45] dingomanatee: I am sure you javascript will run on the browser. And the same code may or may not run on node.
[20:45] dingomanatee: However node doesn't have a DOM - so any dom based routines in your code are not going to work.
[20:46] eirikb: dingomanatee: And just having simple objects that I can send between them as JSON should be simple
[20:46] dingomanatee: Yes - you can send JSON from node to the browser.
[20:46] ewdafa_ has joined the channel
[20:46] eirikb: dingomanatee: It does not use a DOM, it runs fine in v8 as well
[20:46] dingomanatee: Just create a node based JSON server.
[20:46] nolan_d1 has joined the channel
[20:46] dingomanatee: Well I cant be more specifc without looking at source - care to gist something to look at?
[20:47] dingomanatee: what exactly are you trying to get done with this task?
[20:47] davidc_ has joined the channel
[20:48] Kingdutch: Net split woo
[20:48] halfhalo: ACTION high fives freenode
[20:48] eirikb: dingomanatee: Consider this, I send parameter 'name' to node, now node should do response.end(JSON.stringify(new Person(params.name))); Although, in Person I do Person() { this.address = new Address('random') }, now I got a problem, because I can't use require in Person
[20:48] AAA_awright_ has joined the channel
[20:48] dnolen has joined the channel
[20:49] dingomanatee: I wasn't aware that response.end() even took parameters.
[20:49] eirikb: It does
[20:49] eirikb: That is not the point though
[20:50] ashleydev has joined the channel
[20:50] rabc has joined the channel
[20:50] rabc: how can I use only require('my-module') to call my module from npm ?
[20:50] dingomanatee: ah. I always do things the long way but no mind.
[20:51] cainus has joined the channel
[20:51] dingomanatee: Okay I would suggest this:
[20:52] jae has joined the channel
[20:52] dingomanatee: don't include functions in person.
[20:52] dingomanatee: Make person a stupid static block of JSON.
[20:52] dingomanatee: make a client side factory that takes the block and returns a dynamic person object with functions etc.
[20:52] eirikb: It's a full library, with no dependencies, with code
[20:52] dingomanatee: Make a similar function in node that uses requires etc. and creates a dynamic person object for node.
[20:53] dingomanatee: Just make sure that the constructor of person can accept the JSON block with all the requisite properties.
[20:53] eirikb: So you want me to take the library, rip it apart with copy/paste and create a node and client version?
[20:53] dingomanatee: In other words - don't do things the hard way and try and share code between client side JS and node.
[20:53] dingomanatee: Yes.
[20:53] dingomanatee: sorry.
[20:53] eirikb: haha
[20:53] eirikb: I guess RequireJS is the best option
[20:54] dingomanatee: but others might have another opinion. The bottom line is that Node js is like - but not equal to - cleint side JS.
[20:54] eirikb: I find it hard to understand why this is a problem though
[20:54] dingomanatee: Node is a supersystem of javaScript.
[20:54] foomanchoo has joined the channel
[20:54] dingomanatee: It has things that JS does not and your client side JS has things that node does not.
[20:54] eirikb: I didn't think CommonJS would be a problem :(
[20:55] dingomanatee: There may be a tiny overlap of functionality that you can use to speed development but in the end in my opinion there is not enough overlap to make that kind of thing worthwhile.
[20:55] langworthy has joined the channel
[20:55] dingomanatee: You have basically three options:
[20:55] eirikb: I'm very very very sure my client code has nothing that node does not have, except for setup - but that is about modularity, not feature/content
[20:55] dingomanatee: 1) put all the intelligence in (leave it, in your case, in) client side code and just use node to record data and updates.
[20:56] dingomanatee: 2) put all the intelligence in node and communicate to it from the client with sockets and/or REST
[20:56] x_or has joined the channel
[20:56] Remoun has joined the channel
[20:56] eirikb: And as I have already stated, my code run fine in v8. As well as rhino, and both without env.js
[20:56] dingomanatee: 3) try to build a client side library that doesnt' use require, probably because it is one giant file, and use that on both sides.
[20:56] dingomanatee: well, it won't the minute you start to require('...') node modules.
[20:56] dingomanatee: and rely on the module.exports convention
[20:57] dingomanatee: and use the file system libraries.
[20:57] eirikb: Yes, that is the part about modularity and CommonJS I mentioned
[20:57] dingomanatee: Anyway - that is my advice. There are a lot of people here that have more experience and might give you a better deployment plan.
[20:57] eirikb: Which I do not use or want to use in the shared code
[20:57] rabc: anyone can help me with npm ?
[20:57] dingomanatee: well then, go forth and god bless you
[20:57] eirikb: ?
[20:57] eirikb: Oh well. Thanks for the help
[20:58] dingomanatee: if you can get it to work, then let us know how you did it later.
[20:58] rabc: how can I use only require('my-module') to call my module from npm ?
[20:58] Rv has joined the channel
[20:58] matjas has joined the channel
[20:58] dspree has joined the channel
[20:58] dingomanatee: is it saying "cannot find module" rabc?
[20:59] dingomanatee: if you use an absolute filepath to your repository you should be fine.
[20:59] Me1000 has joined the channel
[21:00] en has joined the channel
[21:00] rabc: dingomanatee yes, that message. I'm using "main": "./lib/module.js"
[21:00] en: anyone take a look at this:
[21:00] en: http://stackoverflow.com/questions/4701865/node-js-storing-gamestate-how
[21:01] en: how do I create a thread in node.js?
[21:01] dspree has joined the channel
[21:02] Imperion: en: you can't
[21:02] eirikb: Imperion: Not even with this? http://nodejs.org/docs/v0.3.4/api/child_processes.html
[21:02] w0rse has joined the channel
[21:02] en: Imperion then what is that guy talking about?
[21:02] jae has joined the channel
[21:02] Imperion: no
[21:02] eirikb: k
[21:03] Imperion: those are processes
[21:03] Imperion: threads share memory
[21:03] en: what do I do instead then?
[21:03] markstory has joined the channel
[21:03] riven has joined the channel
[21:03] perlmonkey2 has joined the channel
[21:03] Wizek_ has joined the channel
[21:04] Imperion: en: and, to answer your real question: learn OOP
[21:04] skampler_ has joined the channel
[21:04] stephank has joined the channel
[21:04] PyroPeter has joined the channel
[21:04] alloc has joined the channel
[21:04] pquerna_ has joined the channel
[21:05] Imperion: seriously
[21:05] dingomanatee: www.github.com/gameclosure/timestep have a library focused on both client/server state tracking and anticheat and sprite mechanics.
[21:05] dingomanatee: I would take a look at their accomplishments before trying to DIY
[21:05] desaiu has joined the channel
[21:05] RockShox1 has joined the channel
[21:05] Imperion: if you can't figure out how to use classes to structure your code, I can't help you
[21:05] en: imperion i do know how to use classes to structure my code lol
[21:06] Imperion: en: then what's the problem?
[21:06] DoNaLd`_ has joined the channel
[21:06] Imperion: simply associate players with shared game state
[21:06] dingomanatee: en: you can fork in node - node is single threaded by nature but forks can give you multiple (single) threads.
[21:06] Imperion: when you have to commit, do it with a db
[21:06] FMJaggy has joined the channel
[21:06] Nacho__ has joined the channel
[21:06] martigam_ has joined the channel
[21:06] dingomanatee: Imperion you are being a bit dickish today.
[21:07] dingomanatee: with all due respect.
[21:07] eikke_ has joined the channel
[21:07] MrSmurf has joined the channel
[21:07] gkatsev_ has joined the channel
[21:07] netminder has joined the channel
[21:07] en: how do i associate players with shared game state? i mean if i just see one example i'll get it, but
[21:07] Imperion: you do have something that identifies players and stores their state?
[21:07] LoRe_ has joined the channel
[21:07] mfernest has joined the channel
[21:07] en: digomanatee thanks i'm checking it out
[21:08] koning_robot has joined the channel
[21:08] Imperion: a Player class of some sort
[21:08] claudiu_ has joined the channel
[21:08] en: yeah
[21:08] perlmonkey2: How is V8's regex engine faster than Perl's? http://shootout.alioth.debian.org/u32/benchmark.php?test=all&lang=v8&lang2=perl
[21:08] Imperion: which has a reference to a GameState class of some kind
[21:08] dingomanatee: They presented at the JS meetup in Googole last Wednesday. You might be able to find video on that. The talk didn't focus on Client/Server state tracking but I talked to them off camera and they apparently have put a lot of work in that part too.
[21:09] intellectronica has joined the channel
[21:09] su_aska has joined the channel
[21:09] Imperion: perlmonkey2: I'm guessing JIT compilation
[21:09] intellectronica has left the channel
[21:09] hasenj has joined the channel
[21:10] en: the gamestate class doesn't get deleted if it's not stored in a database?
[21:10] rabc: how can I use only require('my-module') to call my module from npm ?
[21:11] Imperion: en: as long as it is referenced, and you can retrieve whatever references it, it's there
[21:11] dingomanatee: rabc if you turn it into an NPM package and install it via NPM then that should do it.
[21:11] Imperion: en: but how are you persisting your player class?
[21:11] Imperion: you're not recreating it every time, right?
[21:11] rabc: dingomanatee I did it. npm publish, npm install, but it says cannot find module :(
[21:12] dingomanatee: hum. then dunno.
[21:12] Imperion: rabc: what's it called?
[21:12] rabc: Imperion node-downloader
[21:12] rabc: http://github.com/rabc/node-downloader
[21:12] jeffmoss has joined the channel
[21:13] en2 has joined the channel
[21:13] maushu_ has joined the channel
[21:13] foomanchoo has left the channel
[21:13] Imperion: $ npm ls | grep download
[21:14] Imperion: npm info it worked if it ends with ok
[21:14] Imperion: npm info using npm@0.2.12-1
[21:14] Imperion: npm info using node@v0.2.5
[21:14] Imperion: node-downloader@0.0.1 A simple downloader using all the power from wget =
[21:14] rabc: yes, exactly this one
[21:14] sivy_ has joined the channel
[21:14] under__ has joined the channel
[21:14] Yuffster_ has joined the channel
[21:14] Imperion: fetched it fine
[21:14] mkkl_ has joined the channel
[21:15] Imperion: npm install node-downloader worked fine
[21:15] eazyigz__ has joined the channel
[21:15] jae has joined the channel
[21:16] rabc: try to require, please, and say to me if works fine
[21:16] iaurynn has joined the channel
[21:16] _jdalton has joined the channel
[21:16] Imperion: $ node
[21:16] Imperion: > require('node-downloader')
[21:16] Imperion: { NodeDownloader: [Function: NodeDownloader] }
[21:16] x_or has joined the channel
[21:16] Imperion: rabc: works fine
[21:16] MrNibblesFreenod has joined the channel
[21:17] rudebwoy has joined the channel
[21:17] rabc: Imperion thanks! maybe it's something with my npm
[21:17] jakehow has joined the channel
[21:18] rabc: well, it's there, now time to spread the module :D
[21:18] pquerna_ has joined the channel
[21:22] rphillips has joined the channel
[21:22] onar has joined the channel
[21:23] ziro`: anyone using socket.io in the browser had any issues? i'm getting jQuery is undefined
[21:23] ziro`: but as far as I'm aware it's not a dependency?
[21:24] eirikb: I can actually use fs.readFile and eval to eval my script, but since readFile is async the eval only seems to live within that scope
[21:25] eirikb: don't think process.compile will do any good either
[21:26] vineyard: hey guys, how do I get the name of the command I ran in node?
[21:26] MattDiPasquale has joined the channel
[21:26] vineyard: for example, if i run ./foo, what could I do to make it print "./foo"
[21:27] w0rse has joined the channel
[21:28] ossareh has joined the channel
[21:28] Phyllio has joined the channel
[21:29] chewbran1a has joined the channel
[21:29] en2: dingomanatee: you mentioned forking, with the web workers api? isn't that not implemented yet?
[21:30] Sami_ZzZ_ has joined the channel
[21:30] tekky has joined the channel
[21:30] nlacasse has joined the channel
[21:30] _sri has joined the channel
[21:31] dingomanatee: I didn't mention web workers.
[21:31] eirikb: Hmm, this eval actually works. Just messing up my namespace
[21:32] tk has joined the channel
[21:32] dingomanatee: looks like that might still be in the "to be done" pile.
[21:32] eirikb: So instead of App.Person, I now would have test.Person if I function(fileConent){eval(fileContent);test=App;}
[21:33] dingomanatee: ask Isaacs if you see him.
[21:33] bluegene: how can i send POST data urlencoded?
[21:33] en2: in that case how do I fork?
[21:34] dingomanatee: I might have misled you.
[21:34] pjackson has joined the channel
[21:34] eirikb: So, I can actually do test = require('myfile') and get the same result. Now I can do new test.Person()
[21:34] en2: ok, if this is too hard i might as well as use a database then
[21:34] en2: redis is pretty fast :S
[21:34] pjackson: There are lots of logging modules for node, can someone recommend which I should look at?
[21:34] dingomanatee: it might help me to understand what you are trying to do en2.
[21:35] josephhitchens has joined the channel
[21:35] en2: ok, i'm making a 2 player board game where all the game logic happens on the server
[21:35] en2: i just need to have a saved gamestate so that on each player's move the move can be validated on the server
[21:36] eirikb: Nah, require does not work. Nevermind that
[21:36] dingomanatee: I would suggest again, http://www.github.com/gameclosure/timestep
[21:36] blowery_ has joined the channel
[21:36] ziro`: node.js doesn't seem to be picking up my NODE_PATH
[21:36] aelaguiz: totally off topic, anyone have a good tweening library recommendation for canvas/html5? I'm not looking to use html entities, custom rendering - pretty much just looking for a math callback library.
[21:36] booo has joined the channel
[21:36] ziro`: echo $NODE_PATH returns a path not present in require.paths
[21:37] dingomanatee: They are good people - if you can't parse the library yourself reach out to the author.
[21:38] dingomanatee: You might be able to use Node to manage message transmission with this library - you might not -- but they have got a lot farther on this problem than we have.
[21:38] halfhalo: ACTION goes to role his own template system
[21:39] dingomanatee: too bad that jade and ejs and haml have failed you :D
[21:39] halfhalo: yeah... sadface
[21:39] ossareh_ has joined the channel
[21:39] dingomanatee: Have you considered Ruby on Rails?
[21:39] halfhalo: ACTION uses RoR at work
[21:39] Imperion: ACTION sets dingomanatee on fire
[21:40] dingomanatee: well there's your problem :D
[21:40] bluegene: how can i send urlencoded data? and why does node modify the data i intend to send using request.write()?
[21:40] tk has joined the channel
[21:40] indexzero has joined the channel
[21:40] Imperion: how does anyone survive with such a slow slow system?
[21:40] halfhalo: slow?
[21:40] dingomanatee: bluegene have you looked at the querystring library?
[21:40] en2: dingomanatee so you're saying this problem is harder than it appears?
[21:41] bluegene: dingomanatee: no, i haven't
[21:41] tmzt: aelaguiz: there are good ones for as3 you could port, not the best option but if you can't find anything else
[21:41] dingomanatee: I am saying that you are better tossing in with people who have a lead on the problem and have decided to tackle it as a team then trying to do it yourself.
[21:41] eirikb: dingomanatee: I think I got it. eval(require('fs').readFileSync('myfile.js')).toString())
[21:42] eirikb: It's ugly, but it works
[21:42] dingomanatee: that looks right.
[21:42] en2: ok, :) thank you very much
[21:42] aelaguiz: tmzt: I think I might just take an existing library and modify it to hit a render callback instead of modifying positions of entities
[21:42] tmzt: what are you trying to do?
[21:43] dingomanatee: At some point somebody might duplicate their effort in node - til that happens I would look at that, en2. I have interest in state tracking too so if you - and they - cannot solve the problem together and/or find a place in their system for node, let me know and I'll toss in and look at the solution with more diligence
[21:44] aelaguiz: tmzt: I'm just writing a card game and looking to add transitions to my UI. The entire thing is rendered on a single canvas entity, currently using transform matrices & timers, just thought I could leverege a tweening library to move that logic out of my app
[21:44] ossareh_ has joined the channel
[21:44] tmzt: on the server?
[21:44] tmzt: pbaukus says canvas is very slow, even comapred to divs and innerHTML
[21:45] jimt_ has joined the channel
[21:45] aelaguiz: yeah?
[21:45] tmzt: just to let you know, I would watch the google tech talk by the way
[21:45] aelaguiz: okay
[21:45] aelaguiz: I'll do that now
[21:45] sens3 has joined the channel
[21:45] tmzt: yeah, be amazed what the browser can do
[21:45] killfill has joined the channel
[21:46] langworthy has joined the channel
[21:46] ossareh__ has joined the channel
[21:46] Kingdutch: ACTION wants a way to keep client side javascript out of people's hands while still being able to run it
[21:46] AAA_awright: canvas is _way_ faster for me, than simple divs, for line drawing at least
[21:47] en2: @dingomanatee thank you, i was just under the impression that this was an already solved issue and all I needed was a 'use this function!' and I would've been good, but thanks i'll talk to them
[21:47] dingomanatee: Kingdutch: have you considered Flash?
[21:47] tmzt: killfill: a good way?
[21:47] Kingdutch: dingomanatee: Flash is eeeew
[21:47] tmzt: dingomanatee: don't bother, swf to as3 is possible
[21:47] tmzt: but flash isn't that bad, just don't mess with the timeline
[21:47] tmzt: and use the flex sdk
[21:47] langworthy has joined the channel
[21:47] tmzt: it's really just a newer java with faster graphics
[21:47] dingomanatee: en2 - basic REST traansmission is a "solved problem" in node - I don't believe there is a specialized game state library in node yet - at least not one that is domainant.
[21:48] tmzt: dingomanatee: solved problem in the context of connect middleware?
[21:48] Kingdutch: I'm thinking of doing some stuff with WebGL, but it'd mean the serveer would send over 3D objects to the user, however, this also means that the user can just request the object, safe it to a .obj file, and voila, you stole someone elses creation
[21:48] tmzt: orm-agnostic
[21:48] bluegene: dingomanatee: where do i find querystring?
[21:48] eirikb: dingomanatee: It really seems to work. I loop though all files now and eval them in, and they work even when they have dependencies, have prototype inheritance in different namespaces and such. It might be ugly, but for me this is a big relief
[21:48] dingomanatee: tmnt: the context was tracking game state
[21:49] ossareh_ has joined the channel
[21:50] jimt has joined the channel
[21:50] dingomanatee: my understanding is that the building blocks are in node but the problem is not solved with any single package.
[21:50] dingomanatee: so I was pushing people towards http://www.github.com/gameclosure/timestep, a library I saw showcased at Google last Wednesday which claims to have a standardized solution in this arena.
[21:51] killfill has joined the channel
[21:51] dingomanatee: bluegene: its core node.
[21:52] tmzt: maybe push the state to closure over pbufs or aqmp or something
[21:52] tmzt: at least until you can support it directly
[21:52] dingomanatee: amqp. I still can't get that straight.
[21:52] ossareh__ has joined the channel
[21:52] dingomanatee: the Timestep people seem to have a grasp on the problem.
[21:52] tmzt: advanced message queueing protocol
[21:52] tmzt: ok
[21:53] ossareh__ has joined the channel
[21:54] Aria has joined the channel
[21:54] dingomanatee: when I pull down node from Git I end up with an installeed v. 3.x; how do I check out the 0.2.6 tag?
[21:55] tmzt: git checkout v0.2.6
[21:55] tmzt: assuming that's what the tag is called
[21:55] dingomanatee: thx
[21:55] tmzt: you might need a git pull -all
[21:55] tmzt: -all
[21:55] tmzt: --all
[21:55] tmzt: or directly checkout something with git checkout -b v0.2.6 origin/v0.2.6
[21:55] daniellindsley has joined the channel
[21:56] mkkl_: hi, is there a build enviornment for node.js (something like pythons buildout oder javas maven?)
[21:58] SubStack: mkkl_: there's node-waf
[21:58] ossareh_ has joined the channel
[21:58] zonius has joined the channel
[21:59] SubStack: mkkl_: https://github.com/pkrumins/node-png for an example
[21:59] femtoo has joined the channel
[21:59] ossareh__ has joined the channel
[22:00] ossareh___ has joined the channel
[22:00] zonius: hi i'm trying to compile node.js on windows using cygwin
[22:01] tmzt: is the libeio javascript/v8 specific?
[22:01] zonius: but i keep running into the "Build failed: -> task failed (err #2): {task: libv8.a SConstruct -> libv8.a}" error
[22:01] zonius: i checked the $SHELL and it gives "/bin/bash"
[22:01] ziro`: does node provide any wrappers to loop over arrays sensibly?
[22:02] mkkl_: SubStack: thanks
[22:03] tokumine has joined the channel
[22:03] dingomanatee: ziro: array_var.forEach(function) works - fair warning though - it is not synchronized. In general if you want to keep node loops synked the for (var prop in arrayVar) { ... } is the way to g
[22:03] dingomanatee: o
[22:03] lupomontero has joined the channel
[22:04] dingomanatee: the collections module hasn't been worked out yet :D
[22:04] ziro`: it's fine, it's better async ;)
[22:04] eirikb: Careful with for in though, it will loop through prototype chain IIRC
[22:05] dingomanatee: yep.
[22:05] Thorn has joined the channel
[22:05] dingomanatee: ziro: so I think its fair to say the answer is "no".
[22:05] lupomontero: im about to create a vm to play around running node as a deamon, should I go for 32bit or 64bit architecture?
[22:06] eirikb: You can check with hasOwnProperty, but will still do the loop
[22:06] dingomanatee: If you are concerned with property leakage than just stick with integral stored arrays and do for (0..length)
[22:07] dingomanatee: but no -- its still JavaScript :D
[22:07] dingomanatee: array.forEach works.
[22:07] JusticeFries has joined the channel
[22:07] mscdex: how is forEach async?
[22:07] eirikb: dingomanatee: Yeah, but not all browsers is up to date with that - but since this is #node.js I guess that is irrelevant :D
[22:08] dingomanatee: one browser.
[22:08] dingomanatee: One consistent pile o'problems.
[22:08] dingomanatee: open up and swallow!
[22:08] ossareh_ has joined the channel
[22:08] mscdex: forEach is always sync
[22:08] mscdex: it's just slower than a for loop
[22:09] ashleydev has joined the channel
[22:10] skohorn has joined the channel
[22:11] killfill has joined the channel
[22:11] Kingdutch: Good night folks
[22:12] dingomanatee: heh- just tested - mscdex is right. it is synced.
[22:12] dingomanatee: my bad. sorry.
[22:12] dingomanatee: U2 KD
[22:12] zonius has joined the channel
[22:13] softdrink has joined the channel
[22:15] eirikb has left the channel
[22:16] chrischris has joined the channel
[22:16] zonius: so i keep getting the same error as here: https://github.com/ry/node/issuesearch?state=open&q=cygwin#issue/405
[22:16] zonius: but ive set SHELL=/bin/bash
[22:17] zonius: and make is still giving me the error
[22:17] zonius: any suggestions?
[22:17] en2: zonius
[22:17] en2: did you try ash?
[22:18] zonius: yeah, i ran into that error first and used dash to do rebaseall
[22:18] zonius: should i use ash instead?
[22:18] yozgrahame has joined the channel
[22:19] dingomanatee: I love it - the express examples don't even work any more. :D
[22:20] ziro`: in the case of complementing existing web services, how are peeps handling authentication between the two?
[22:20] en2: zonius: not sure, I remember running into that error on my windows machine and fixed it, oh wait
[22:20] en2: I remember now
[22:20] en2: that error occurs only when i installed 3.4, i ended up not installing that and installed .2.6 instead
[22:20] en2: which doesn't have that error
[22:21] dingomanatee: yep keep clear of 3.x - its odd and -- well-- very odd.
[22:21] en2: unless there's something you want in .3 might as well as use the stable for now
[22:22] zonius: ahhh, i shouldve checked that
[22:22] zonius: ill try again with .2.6
[22:22] _jdalton has left the channel
[22:22] ossareh has joined the channel
[22:23] c0nundrum has joined the channel
[22:24] jchris has joined the channel
[22:24] ossareh_ has joined the channel
[22:25] nooder has joined the channel
[22:26] tmzt: is there an async iteration?
[22:26] gkatsev: wu.js is a lazy underscore.
[22:26] gkatsev: There are also a few lazy lists available
[22:27] killfill has joined the channel
[22:27] dingomanatee: is there any way to find out which variables are in the global scope?
[22:28] gkatsev: dingomanatee: this.keys
[22:28] charlenopires has joined the channel
[22:29] dingomanatee: what part of express / connect passes variables to the express templates? I'm seeing locals "vanish" and I need to figure out where and why
[22:30] marktlang has joined the channel
[22:31] mnbvasd_: /win4
[22:32] bartmax has joined the channel
[22:32] bartmax has joined the channel
[22:32] tmzt: dingomanatee: still working with 3.x?
[22:32] dingomanatee: no back to 2.6
[22:32] dingomanatee: after a nodeocalypse
[22:33] charlenopires_ has joined the channel
[22:33] dingomanatee: I can show you the git if you have time
[22:33] ossareh_ has joined the channel
[22:36] zonius: thanks so much en2!
[22:36] zonius: have a good night everybody
[22:36] ossareh__ has joined the channel
[22:38] mscdex: node.js rules!
[22:38] halfhalo: ACTION found his problem
[22:38] halfhalo: its not jade or other layout engines messing with me, its express itself
[22:39] dingomanatee: I'm having express issues too.
[22:39] dingomanatee: Issues I wsan't having a while ago.
[22:39] ossareh__ has joined the channel
[22:39] halfhalo: its automatically creating and appending everything to body
[22:40] yozgrahame has joined the channel
[22:40] dingomanatee: do you have a layout file?
[22:40] halfhalo: nope
[22:40] halfhalo: also have layout set to false
[22:40] dingomanatee: just to be safe - switch browsers.
[22:40] halfhalo: doing res.send("pie") results in pie
[22:41] halfhalo: my browser is not the issue
[22:41] halfhalo: its the actual damn html code
[22:41] dingomanatee: thats fucked. I am also having view related issues.
[22:41] dingomanatee: try throwing echos in express/view.js
[22:42] halfhalo: wait... I think I found my issue
[22:42] ossareh_ has joined the channel
[22:42] c0nundrum: ironic, right now Node.js had 404 members ..
[22:42] dingomanatee: thats coincidental.
[22:42] dingomanatee: not ironic.
[22:43] en2: irony is all about the human interpretation
[22:43] c0nundrum: quite right sir
[22:43] Aria: Nah. It's gotta have that bitter self-reference to be ironic.
[22:43] Aria: http://rheme.net/irony
[22:44] c0nundrum: newbie here. first day with node.js
[22:45] dingomanatee: Now THAT'S ironic.
[22:45] Ond has joined the channel
[22:45] Aria: ACTION grins.
[22:45] ossareh_ has joined the channel
[22:45] dingomanatee: Actually thats not ironic either.
[22:45] dingomanatee: That was a test.
[22:45] c0nundrum: I don't see irony here
[22:45] c0nundrum: It was purely informational
[22:45] dingomanatee: "I am Ironic Man"
[22:46] dingomanatee: anyway welcome
[22:46] Aria: Actually, I think that was ironic in the Alanis sense.
[22:46] mscdex: mape: ping
[22:46] mape: mscdex: pong
[22:46] yorick: https://gist.github.com/780928 <-- small template engine I'm using that can do asynchronous stuff yet is small
[22:46] yorick: might come in handy for someone
[22:46] MikhX has joined the channel
[22:47] mscdex: mape: sorted by "updated" on npm.mape.me doesn't seem to work?
[22:47] mape: mscdex: No the modified date was removed from the npm feed
[22:47] mscdex: d'oh
[22:48] Aikar: what exactly is npm.mape.me, a diff repo than isaacs official?
[22:48] mscdex: just a registry viewer
[22:49] Aikar: so it views the official, and was before isaac had his own official list page?
[22:49] arpegius has joined the channel
[22:49] mscdex: issacs didn't have anything prior to it, just a json dump feed
[22:49] Aikar: yeah i know, but he linked some page hes working on like that recently
[22:50] mscdex: oh, i don't know about recently
[22:50] mape: mikael has one in the works
[22:50] mape: http://search.npmjs.org/
[22:50] dingomanatee: is there any way to use the require object to find out which library it will open if you require('foo')?
[22:51] Aikar: i get to learn all the npm publishing stuff soon :3
[22:51] MrTopf has joined the channel
[22:52] Aikar: working on a templating system i'm calling Nova, http://aikar.co/novatest.html will show example :D got the syntax parsing done, now gotta do the more advanced features and make it express compatable
[22:52] mscdex: hmm
[22:52] mscdex: even that page's latest updates is wrong
[22:52] Aikar: err
[22:52] Aikar: http://aikar.co/testnova.html had word order wrong
[22:55] Aikar: damnit been thinking on how to best implement onRender, doing it in scriptSrc makes things trickier
[22:56] Chris_Biscardi has joined the channel
[22:56] Aikar: (err, i mean being able to use it in the arguments)
[22:56] yorick: Aikar: your object-literal-html-notation fails to look natural
[22:57] Aikar: what do you mean
[22:58] yorick: it makes little sense when to use arrays sometimes
[22:58] yorick: {'link':[{type: 'text/css', rel: 'stylesheet', href: '/other.css'}]}, <-- why is this even an array
[22:58] Aikar: well its meant to be flexible, ill document it lol
[22:58] halfhalo: hahahahahahahahahahaha
[22:58] halfhalo: ACTION figured out his issue
[22:59] dingomanatee: halfhalo: what?
[22:59] mape: Error: Parse Error, at Client.onData [as ondata] (http.js:887:27)
[22:59] mape: till issues with https client?
[22:59] Aikar: yorick: i think ima expand it to not need an array if your only doing args like that, but cause a single dom node can have args and children nodes
[22:59] mape: *still
[22:59] MikhX has joined the channel
[22:59] yorick: Aikar: also using that scriptSrc thing will limit it to the syntax v8 implements
[22:59] Aikar: so node = {'tagname':[{args}, [childrennodes, node2]]}
[23:00] Aikar: hmm?
[23:00] Aikar: it just calls function.toString() to copy the source
[23:00] Aikar: it doesnt execute the function body
[23:00] vineyard: /wg 2
[23:00] vineyard: oops, sorry bout that
[23:00] halfhalo: the tool I was using to grab the html from the page got updated with a feature that caused my html issues
[23:01] Aikar: the idea is to make it so its valid js/json format, and your IDE or Editor can provide syntax hilighting/checking naturally, unlike other templating engines that no IDE/Editor understands
[23:01] yorick: Aikar: function() { var i = 0; while(i < 100) yield i++; }
[23:01] yorick: Aikar: this gives syntax error in v8, but works fine in spidermonkey
[23:02] c4milo2 has joined the channel
[23:03] bluegene: how can i prevent node from exiting? i have set some timers with setInterval but node just exits
[23:05] yorick: bluegene: you're setting it wrong
[23:06] bluegene: hm
[23:06] bluegene: how do i set it correct? :>
[23:07] yorick: bluegene: setInterval(2000, function(){})
[23:09] eazyigz__ has joined the channel
[23:09] bluegene: the manual says it is setInterval(function(){}, delay)
[23:09] bluegene: but i'll try
[23:10] Aikar: yorick: hmm thanks for pointing that out. ill add some special tag to handle that situation (using super new syntax things would fall into a very low percent of use cases, so it wouldnt be that much work to add a special tag), but im also going to add a scriptSrc('path/to/file.js') to include instead of inline in the template and that code wouldnt be executed.
[23:11] Aikar: something like /**[:ignore] yield 1; [/:ignore**/ would pass the initial syntax check of V8 and be stripped out after the .toString()
[23:11] yorick: Aikar: also things like