[00:02] JiMBasdtard: yeah thats the plan [00:03] creationix: that's what I would do, or fork it the first time you have a patch to make [00:03] creationix: woot, got my sandbox working better, do a hard refresh on the beta site to see all green [00:03] mattly has joined the channel [00:06] JiMBasdtard: creationix: is there git-fu for updating the location of a submodule? [00:06] JiMBasdtard: that already exists? [00:06] JiMBasdtard: can i just run add again with the new info? i was having issues [00:06] derferman has joined the channel [00:06] JiMBasdtard: i even tried reading some docs [00:06] creationix: not sure, it's just a text file anyway [00:06] JiMBasdtard: two text files [00:06] creationix: I think it's .gitmodules [00:06] JiMBasdtard: yaya thats what i was doing [00:06] JiMBasdtard: its not that fun [00:07] JiMBasdtard: .git/config too [00:07] JiMBasdtard: started to remind me of the SVN hooks folder days.....dark dark days [00:08] creationix: well, with git you're encouraged to mess with the repo directly [00:08] creationix: with svn it was a nono [00:09] creationix: hmm, how should I format the results from my snippets, I've the the stdout stream and the value of the last expression (repl-style) [00:09] creationix: right now I've for result in bold and the stdout in regular [00:09] JiMBasdtard: mjijackson: any luck with getting Mint to work in 1.9? [00:11] noonat: creationix: => seems pretty standard to indicate the result of an op for that sort of thing [00:11] creationix: ahh, good point [00:11] creationix: thanks noonat [00:13] mjijackson: JiMBasdtard: Yes. Just pushed to GitHub a few minutes ago. [00:14] JiMBasdtard: awesome! [00:14] JiMBasdtard: have you thought about removing the py dependecy? [00:14] JiMBasdtard: getting it all pure js would be a huge win for me [00:15] JiMBasdtard: unless there is a way to package the requirement? im trying to have a really simple installer [00:15] JiMBasdtard: clone the repo [00:15] JiMBasdtard: node server.js [00:16] Marak has joined the channel [00:18] creationix: noonat: It's live, I like it [00:18] _ry: creationix: how goes the 'how to node'? [00:18] creationix: getting closer [00:19] creationix: I just added live snippets http://beta.howtonode.org/prototypical-inheritance [00:19] creationix: they are read from external files and executed on the server [00:19] creationix: that should keep syntax errors and out of date code at bay [00:19] noonat: creationix: Hmm, it still shows as bold for me [00:19] creationix: do a hard refresh, I've got pretty aggresive http cache headers [00:19] _ry: are the dependencies live? [00:19] creationix: no, that's next [00:20] noonat: yeah there it goes [00:20] noonat: yeah that's much more clear now imo [00:20] creationix: I removed the fake parts from the interface, everything you see is live [00:22] creationix: the sandbox that makes it work is pure insanity, but since I control the inputs it's safe [00:23] JiMBasdtard: javascript in jails? [00:24] JiMBasdtard: :p [00:24] creationix: not hardly safe, it only overrides the sys module so I can capture stdout [00:24] JiMBasdtard: can people inject malicious code? you'd have to pull it yourself right? [00:25] creationix: yeah, it's reading from a git repo on my server [00:25] creationix: even if they push to my github somehow, the server won't run it till I fetch it from github [00:25] JiMBasdtard: of course [00:25] creationix: I plan on having a commit hook on my repo that mirrors changes to github [00:26] creationix: so I only have to push to my server to instantly publish it [00:26] creationix: the cache will see it within 100ms and it will be live [00:27] JiMBasdtard: hooks are fun [00:27] creationix: I think I'll test the hook, I just need it to re-push to github every time it receives a commit [00:32] creationix: JiMBasdtard: does this work for you "git clone http://git.creationix.com/howtonode.org.git/" [00:33] creationix: should allow anonymous read-only access [00:33] isaacs: creationix: hey, i just realized something interesting... [00:33] JiMBasdtard: cannot find module wheat, submodule update? [00:33] JiMBasdtard: i cloned it [00:34] creationix: no, you need to install wheat seperately [00:34] isaacs: creationix: prototypes usually have a .constructor pointing back at the ctor, right? [00:34] creationix: isaacs: I think so [00:34] isaacs: creationix: so you could do proper construction without using new and without paying the .apply tax [00:35] creationix: without apply? how do [00:35] isaacs: creationix: if (typeof obj.constructor === "function") obj.constructor() [00:35] isaacs: creationix: in the constructor call, "this" will be the object [00:35] isaacs: because it's a method [00:35] creationix: so Object.create followed by that? [00:35] isaacs: right [00:36] isaacs: oh, i guess you wouldn't know if there were args for it [00:36] isaacs: so it won't work in the general case. [00:36] creationix: isaacs: how's the mouse driver on your laptop btw, I had trouble with mine [00:36] creationix: ACTION misses linux [00:36] isaacs: creationix: working like a charm [00:36] isaacs: even have two-finger scrolling and the one-giant-button click-and-drag stuff workign [00:37] creationix: cool, very cool [00:37] isaacs: sound is borked, because i don't want ot go through the hassle of downgrading the kernel. [00:37] isaacs: that page i linked is pretty thorough [00:38] JiMBasdtard: creationix: my git submodule workflow borked. do you think you could take a quick look? http://gist.github.com/366549 [00:39] creationix: isaacs: are you on lucid or jaunty? [00:39] Marak: maybe i should setup some remotes? [00:39] creationix: JiMBasdtard: you need to update your "origin" remote within the submodule to use the writeable url [00:39] Marak: if i do that wont that caus an issue if someone else clones it and does a submodule update --init ? [00:39] creationix: git remote rm origin && git remote add origin git@github.com:Marak/proto.git [00:39] Marak: i thought i had an issue with that [00:40] JiMBasdtard: sorry im bipolar today [00:40] creationix: JiMBasdtard, if you do it within the submodule, then the parent repo will never know [00:40] JiMBasdtard: hrmmm [00:40] JiMBasdtard: i think i need to yell at someone who sent me a github message [00:41] JiMBasdtard: ill try again [00:41] JiMBasdtard: shit, brb gotta clean up for a few [00:41] creationix: you want the links in the parent repo to point to the public urls [00:43] isaacs: creationix: karmic. 9.10 [00:43] isaacs: creationix: just need to figure out how to map the command key to ctrl [00:43] creationix: yeah, that would be nice [00:44] creationix: now if only gedit had code folding [00:44] creationix: otherwise it's just as good as textmate [00:45] isaacs: i'm sure i'll still do a lot of stuff in textmate. [00:45] isaacs: alright, gym time. have fun, noders. [00:48] creationix: What is eating random whitespaces from my data!? [00:49] creationix: ACTION is somehow having encoding problems with ascii text [00:53] creationix: fixed it! [00:58] pkrumins has joined the channel [01:00] JimBastard_: someone should write parser tool for the node irc logs [01:00] JimBastard_: does this exist already? [01:00] JimBastard_: stats and what not [01:01] JimBastard_: ive seen them before it other languages [01:08] admc has joined the channel [01:10] pkrumins: are write calls to ServerResponse's buffered or not? [01:10] creationix: now that's cool https://gist.github.com/9c37be11f473ba17cd18 [01:11] creationix: I pushed to my server and it pushed to github for me and forwarded me the output [01:14] RayMorgan has joined the channel [01:14] pkrumins: any ideas why this simple code - http://paste.pocoo.org/show/201997/ - handles just 1 concurrent connection? [01:15] pkrumins: after the first connection I see 'New req!' printed, but if I crete another at the same time, no 'New req!' gets printed. [01:15] creationix: pkrumins: that should handle more, how are you testing it? [01:15] pkrumins: Only after the first quits, the second prints the message. [01:15] creationix: use sys.debug instead of sys.puts [01:15] creationix: puts is async and less reliable [01:15] pkrumins: creationix: just open two web browser windows quickly [01:15] creationix: same browser? [01:16] pkrumins: yes [01:16] creationix: browsers limit the number of concurrent connections to a single server [01:16] pkrumins: well, not one. [01:16] pkrumins: two i guess [01:16] pkrumins: ok, i will try it with sys.debug now [01:16] pkrumins: but it seems i only get 1 connection working at the same time. [01:17] creationix: also try moving the writeHead into the timeout [01:17] creationix: it should work either way, but that may be confusing the browser [01:20] pkrumins: creationix: works :) [01:20] pkrumins: with debug. [01:20] pkrumins: so it was just an illusion [01:20] pkrumins: creationix: I am actually trying to create a persistent connection [01:21] creationix: like a long poll? [01:21] pkrumins: yeah [01:21] pkrumins: do you have any experience with that? [01:21] creationix: a little [01:21] creationix: node-chat is a good example [01:21] paul___ has joined the channel [01:21] pkrumins: thanks for the suggestion, going to take a look at it [01:21] creationix: http://github.com/ry/node_chat [01:22] creationix: I've got my own chat sample, but it's outdated and more complicated [01:22] mjr_ has joined the channel [01:27] _ry: mjr_ are you going to send me docs for repl sockets? [01:28] mjr_: yeah, I was hoping today, but probably not until tomorrow. [01:28] _ry: ok [01:51] CIA-77: node: 03Ryan Dahl 07master * r4efe27b 10/ lib/child_process.js : [01:51] CIA-77: node: Add execFile() for Orlando [01:51] CIA-77: node: Undocumented for now, but basically like exec() with args. - http://bit.ly/aBBeQp [01:58] JimBastard_: i think i finally sorted out my submodule issues [01:58] mikeal has joined the channel [01:59] JimBastard_: i think i fixed my submodule issues [01:59] JimBastard_: anyone feel like trying to install hook.io :-D [02:00] JimBastard_: i just updated the live site to 0.1.9 too, seems to almost be working now [02:00] JimBastard_: ill be sending emails from obama based on tweets in days [02:03] charlesjolley has joined the channel [02:09] tlrobinson_ has joined the channel [02:20] charlesjolley has joined the channel [02:23] creationix: In v0.1.90, is there a way hook into require to use a userspace filesystem [02:23] creationix: I want requires in my sandbox to be able to load files from gitsubmodules on a bare git repo [02:23] creationix: I know, crazy, but if it works it will be awesome [02:24] creationix: I'm already wrapping require for the code I'm evaling, but what about sub requires in the files it requires [02:24] JimBastard: sounds tricky [02:25] JimBastard: maybe override the sub requires with a new method [02:25] creationix: yeah, basically I want to require files that don't even exist as files [02:25] JimBastard: you gotta alias require [02:25] creationix: I guess I'll just have to implement my own minimalistic require and fall-back to the real one if it fails [02:26] creationix: yeah, I'm already aliasing it http://github.com/creationix/wheat/blob/master/lib/wheat.js#L278 [02:27] creationix: I guess the real problem is how an I going to get at the content of a submodule from a bare repo [02:28] creationix: afaik, submodules don't exist in bare repos, they're just lines in the .gitmodules file [02:36] rictic has joined the channel [02:41] tmpvar has joined the channel [02:41] tmpvar: ive been listening :) [02:41] tmpvar: shit [02:46] tlrobinson__ has joined the channel [03:12] RayMorgan has joined the channel [03:30] tlrobinson_ has joined the channel [03:41] pd has joined the channel [03:46] PyroPete1 has joined the channel [03:57] bpot has joined the channel [04:15] pd_ has joined the channel [04:15] kriszyp has joined the channel [04:22] kriskowal has joined the channel [04:22] mjijackson has joined the channel [04:24] tlrobinson_ has joined the channel [04:28] fizx has joined the channel [04:30] mape has joined the channel [04:38] brapse has joined the channel [04:44] dgathright has joined the channel [04:50] gwoo has joined the channel [04:56] fizx has joined the channel [05:00] tmpvar has joined the channel [05:09] pavelz has joined the channel [05:10] RayMorgan has joined the channel [05:27] blazzy_ has joined the channel [05:27] nsm has joined the channel [05:28] admc_ has joined the channel [05:32] bmizerany has joined the channel [05:39] pkrumins has joined the channel [05:39] ithinkihaveacat has joined the channel [05:39] mediacoder has joined the channel [05:39] JshWright has joined the channel [06:03] teemow has joined the channel [06:04] mitkok has joined the channel [06:07] RayMorgan_ has joined the channel [06:16] stalled has joined the channel [06:20] JimBastard_ has joined the channel [06:26] fizx has joined the channel [06:27] towski has joined the channel [06:36] derferman has joined the channel [06:57] teemow has joined the channel [07:03] drostie has joined the channel [07:05] kjeldahl has joined the channel [07:08] kjeldahl has joined the channel [07:15] tisba has joined the channel [07:16] micheil: hey, _ry is net.Stream pretty stable now? [07:20] piranha has joined the channel [07:34] tisba has joined the channel [07:34] pilif has joined the channel [07:34] javajunky has joined the channel [07:35] javajunky: morning [07:35] tbassetto has joined the channel [07:36] javajunky: I'm doing some password stuff with node atm, I'm used to storing passwords in arrays, and zero'ing the array after usage in other platforms. a) Is there a need to do this in JS and b) Whilst I can use arrays of bytes would buffers suit me in the latest node, does anyone know ? :) [07:40] kriskowal: javajunky from a security standpoint, buffers would probably be worse since they guarantee adjacency in memory. it would be better to use something deliberately convoluted to prevent memory adjacency, like a linked list. even better would be to add each character individually from a unary buffer to a hash digest algorithm so only one character is in memory at any time and guaranteed to be overwritten. it all depends on how much you care. [07:45] felixge has joined the channel [07:46] _ry: i think you shouldn't worry about it :) [07:46] _ry: micheil: define stable [07:47] _ry: micheil: there is definitely still a bug or two [07:47] micheil: as in, api wise [07:47] _ry: yes [07:47] micheil: righteo, cool [07:47] micheil: are any api's being frozen at all, or? [07:48] _ry: not yet, but i feel good about net.Stream [07:48] javajunky: kirskowal: thanks you make very good points, my intention is not to be perfectly secure (its a framework [insert laughter here] ), to allow people to implement their own secure approaches, but to provide out of the box some 'reasonably' secure examples (http basic/digest , oauth etc.) .. I've written most of it, but now I'm self-auditing it initally, before getting the real painful feedback.. one thing I've noticed is that in a couple of places passwords a [07:48] _ry: and net.Server [07:48] micheil: okay, cool [07:49] _ry: freezing the API is like getting into a hot tub [07:49] _ry: you go really slowly [07:49] micheil: _ry: is there any way to get the current http parser to read everything (truncate) from the stream until it reaches say, [07:49] micheil: r [07:49] micheil: \r\n\r\n [07:49] _ry: and sometimes jerk your foot out if its too hot [07:49] _ry: :) [07:49] kjeldahl_ has joined the channel [07:50] _ry: micheil: no [07:50] micheil: I know there's now the hijacking, but only over http.js [07:50] micheil: not just using the raw parser [07:50] _ry: micheil: for the upgrade stuff - you should really use what i provided [07:50] _ry: you can do that with the raw parser [07:51] micheil: yeah, the reason I was using raw network interfaces was purely because what I'm aiming to build doesn't need a http frontend [07:51] kenneth_reitz has joined the channel [07:51] _ry: although i think you should just reject http requests that don't upgrade [07:51] micheil: yeah [07:51] _ry: if (!req.upgrade) req.connection.destroy(); [07:52] micheil: just like if a req doesn't send the new security headers, we should kill it [07:53] _ry: micheil: but if you want to use the parser, look at how http.js does the upgrade stuff [07:53] _ry: it uses the parser [07:53] micheil: yeah [07:53] micheil: then what was it.. this.socket.ondata = function(){} after upgrade headers [07:54] _ry: http://github.com/ry/node/blob/master/lib/http.js#L79 [07:54] micheil: can we send back arbitary http status codes atm? [07:54] micheil: (eg, the 101 code that websockets replies with) [07:54] micheil: or the 407 in failure [07:54] _ry: i forgt, i think i added that [07:55] _ry: http://github.com/ry/node/blob/master/lib/http.js#L402 [07:55] _ry: yes [07:55] _ry: http://nodejs.org/api.html#response-writehead-158 [07:55] micheil: so, that'd be: writeHead(101, "some message about websockets") [07:56] _ry: yep [07:56] felixge: _ry: what is this execFile() for? [07:56] micheil: k. [07:56] _ry: felixge: shelling out without sh [07:57] _ry: felixge: exec() creates sh which creates a subprocess (e.g. 'ls') [07:57] felixge: _ry: ah, I see. [07:57] felixge: _ry: lots of command line tools don't seem to take well when not run within a shell [07:57] felixge: so I always went through sh [07:58] felixge: but this is nice [07:59] _ry: micheil: mostly i want you to try it so you can tell me if it works or not :D [07:59] _ry: i've got a test which exercises it at the http-parser level [07:59] _ry: but not at the node level [07:59] _ry: the binding is probably broke somehow [08:00] _ry: i was also dreaming last night about how to improve that API [08:00] _ry: s = new http.Server(function (req, res) { /* normal */ }); [08:01] _ry: s.addListener('upgrade', function (headers, connection) { }); [08:01] _ry: then you'd just connection.addListener('data') like normal [08:01] micheil: _ry: I will do [08:02] micheil: hmm.. [08:02] micheil: interesting approach [08:02] micheil: would res.upgrade happen after the headers complete? [08:02] _ry: yes [08:02] micheil: because often you'll need the headers [08:02] micheil: you can pause / stop reading net.Stream's yeah? [08:03] _ry: yeah [08:06] micheil: in which case, you would emit the "upgrade" event, and pause the stream after the headers have been read, at which point the listener to the upgrade event can choose to resume reading the stream (after assuming they have maybe changed the handler for the onData event) [08:08] micheil: if the client doesn't change the onData handler, then it's just assumed to be still using http after the stream is resumed [08:08] micheil: _ry: makes sense? [08:09] _ry: micheil: sorta [08:10] micheil: think it's implementable? [08:10] _ry: yep [08:10] micheil: cool [08:10] _ry: just fake the data event [08:10] _ry: you'll find where upgradeHead is made [08:10] micheil: hmm? [08:10] _ry: instead of attaching it to the request object [08:10] _ry: do connection.emit('data', upgradeHead) [08:11] micheil: hmm.. I wouldn't do that. [08:11] _ry: after doing server.emit('upgrade', headers, connection) [08:11] micheil: actually. maybe I'm not getting the implementation level on this [08:12] micheil: just thinking about it.. [08:13] micheil: if onHeadersComplete, if the headers contains an upgrade header, then pause the stream and emit onHeaders [08:14] micheil: in the inverse, if the headers don't contain an upgrade header, just emit onHeaders, but don't pause the stream [08:14] derbumi has joined the channel [08:14] micheil: so rather then making it a callback based api, make it event based [08:14] micheil: (after all IncomingMessage is an eventEmitter) [08:16] micheil: so instead of parser.onIncoming, it'd be: parser.incoming.emit("incoming" [08:18] micheil: _ry: is that what you had in mind / make sense? [08:22] voodootikigod_ has joined the channel [08:24] _ry: you can't pause the stream [08:24] _ry: the data is already there [08:24] _ry: it's been read already [08:24] micheil: oh [08:25] micheil: can you write it back to the start? [08:25] _ry: no [08:25] micheil: hmm [08:25] _ry: you can fake a data event though :) [08:25] micheil: I'm still not sure what you mean by that though [08:26] _ry: maybe we should have some secret way to push it back into the stream [08:26] micheil: because I think it'd make more sense to pause the stream [08:26] _ry: so the setEncoding() still works properly [08:28] micheil: well, currently you can pause the read watcher [08:28] xla has joined the channel [08:28] micheil: if in the header parser in http.js, if you just called Stream.pause() (or equiv.) why wouldn't that work? [08:29] micheil: because surely the http parser wouldn't have read the full stream by the time that the onHeadersComplete event is called? [08:32] CIA-77: node: 03Ryan Dahl 07master * rac3bc2e 10/ (benchmark/http_simple.js src/node.cc): [08:32] CIA-77: node: Simplify GC idle notification [08:32] CIA-77: node: In particular, don't leave the timeout running when the heap is fully [08:32] CIA-77: node: compacted. - http://bit.ly/b1bvcA [08:32] micheil: _ry: try this out: http://gist.github.com/366842 [08:32] micheil: then make && make test [08:32] _ry: micheil: it's already read it by the time onHeadersComplete is called [08:32] micheil: the tests will take longer [08:33] micheil: hmm.. [08:33] micheil: I don't see why the stuff after the header will have already been read [08:33] _ry: because it might come in the same packet [08:34] micheil: hmm.. yeah, I suppose [08:34] _ry: http://github.com/ry/node/blob/master/lib/http.js#L524 [08:35] micheil: _ry: could it be possible to handle that some other way? [08:35] botanicus has joined the channel [08:36] micheil: because, currently from the http.js, if I do http.createServer(...) I have no access to the parser variable that's created [08:37] JoePeck_ has joined the channel [08:37] CIA-77: node: 03Ryan Dahl 07master * rd2e1b08 10/ (4 files in 3 dirs): Move two broken tests to disabled folder - http://bit.ly/cBxnQZ [08:38] _ry: micheil: the other way to do it is how it's done currently [08:38] _ry: req.upgrade, req.upgradeHhead [08:39] _ry: i guess that's not a terrible API [08:39] _ry: less magic [08:39] micheil: I like the ideas of events though :P [08:39] micheil: maybe do.. onUpgrade(req, data, start, end); [08:40] _ry: let's keep the req.upgrade thing for now [08:40] micheil: or rather, onUpgrade(req, data, start, end, bytesRead); [08:40] _ry: i think it's okay [08:40] _ry: it's kind of ugly, but whatever [08:40] micheil: okay, how should I manipulate that? [08:41] _ry: just look at req.upgradeHead for the first chunk of data [08:41] _ry: .toString('binary') it if you need to [08:41] _ry: but i'd rather you parse it as a Buffer [08:42] micheil: okay [08:42] xla has joined the channel [08:42] micheil: and is req.upgradeHead going to be the part after the headers? [08:43] _ry: yes [08:47] micheil: just working out some prototype code [08:48] N` has joined the channel [08:48] TomY has joined the channel [08:49] micheil: good damn. I shouldn't have stayed up until 5am this morning watching the Chirp talks.. [08:50] nsm has joined the channel [08:52] micheil: hmm.. this will lead to some different code.. [08:53] JimBastard_ has joined the channel [08:55] micheil: _ry: how do I access the socket?> [08:55] towski has joined the channel [08:55] micheil: this didn't work: http://gist.github.com/366864 [08:58] micheil: actually, got that working [08:58] micheil: now I have a different error [08:59] micheil: if I have two clients from the same remoteAddress connect, it crashes the server [08:59] micheil: Error: Must have start <= end [08:59] micheil: at Stream.ondata (http:527:27) [08:59] micheil: at IOWatcher.callback (net:307:31) [08:59] micheil: at node.js:748:9 [09:02] micheil: _ry: full info in: http://gist.github.com/366864 [09:09] TomY has left the channel [09:10] felixge has joined the channel [09:10] felixge has joined the channel [09:10] _ry: micheil: can't help now [09:10] _ry: sorry [09:10] micheil: k [09:14] CIA-77: node: 03Ryan Dahl 07master * r5281f29 10/ (lib/net.js src/node_buffer.cc): Use new method of getting chars written for UTF8 - http://bit.ly/9snBaa [09:14] CIA-77: node: 03Ryan Dahl 07master * r2ad587c 10/ lib/net.js : Default to UTF8 on stream write - http://bit.ly/cRRBAS [09:14] CIA-77: node: 03Ryan Dahl 07master * r311d7de 10/ (ChangeLog doc/api_header.html doc/index.html wscript): bump version - http://bit.ly/9vXmUC [09:15] javajunky: goddamit, only just updated everything [09:15] _ry: i dont think there are any api chages [09:15] _ry: ACTION sleeps [09:15] javajunky: gn [09:15] felixge: gn8 [09:16] JimBastard_: pulla the pull [09:20] mcarter has joined the channel [09:21] crodas has joined the channel [09:21] psynaptic has joined the channel [09:21] JimBastard_: hook.io reports all win on 0.1.91 [09:25] crodas has joined the channel [09:27] ahaller has joined the channel [09:30] dgathright_ has joined the channel [09:39] crodas has joined the channel [09:40] pdelgallego has joined the channel [09:50] herbySk has joined the channel [09:54] larssmit has joined the channel [09:57] FSX has joined the channel [10:00] JimBastard_: awesome, i just aliased all of underscore into the hookIO object [10:00] JimBastard_: so you can hookIO.anyunderscoremethod [10:04] JimBastard_: probaly gonna have to move it out of the global namespace though [10:06] TomY has joined the channel [10:12] FSX: How do I merge 2 {test: 'text'}'s? [10:14] JimBastard_: sup FSX [10:14] JimBastard_: you want mixin? [10:14] JimBastard_: shallow copy? [10:15] crodas has joined the channel [10:19] chrismcg has left the channel [10:32] rolfb has joined the channel [10:35] rtomayko has joined the channel [10:43] kennon has joined the channel [10:48] maritz has joined the channel [10:49] FSX: JimBastard_: Sorry, had td do some stuff (at work atm). [10:50] JimBastard_: shit me too [10:50] JimBastard_: working on my couch that is [10:50] FSX: I would like merge two {}, just like array_merge in PHP. [10:50] FSX: But I found out that {} isn't really an array in Js, right? [10:51] JimBastard_: im not sure what that method does [10:51] JimBastard_: no, its an object [10:51] JimBastard_: do you know underscore? [10:51] FSX: No [10:51] JimBastard_: lookup underscore.js Crockford demands its [10:51] CrockBot: There is no new to Douglas Crockford for he is the super constructor. tissak [10:52] JimBastard_: that has a lot of object and array methods you might want [10:52] JimBastard_: its a one liner to import [10:52] JimBastard_: javascript != php [10:52] JimBastard_: THANK GOD [10:52] FSX: I figured that out yesterday. ^^ [10:53] JimBastard_: you see, there are these things called NAMESPACES [10:53] JimBastard_: im not sure if you have ever heard of them :-D [10:53] FSX: PHP has them. [10:53] JimBastard_: sure [10:53] JimBastard_: ahahahaha [10:54] FSX: Not that it's a wonderful feature... [10:54] FSX: You have to type Crap\Like\This::somefunction() [10:54] FSX: Didn't try it out yet. [10:56] CodeOfficer has joined the channel [11:00] ssteinerX has joined the channel [11:00] FSX: JimBastard_: _.extend() was what I was looking for, thanks. [11:01] JimBastard_: huzaah! [11:01] JimBastard_: yeah i just added _ support to hook.io [11:01] JimBastard_: so its available when doing any custom hooks or protocols [11:05] FSX: Ok =o [11:06] FSX: Btw, is there a diference between minified and unminified scripts in Node.js? [11:09] mape: since you don't have the issue with max request count and network latency seems there shouldn't be a major difference [11:11] FSX: Ok. :) [11:12] FSX: And I see that some scripts don't have ; at the end of each line and some do have it. Is ; optional? [11:12] mape: It is in javascript to some extent [11:12] mape: You should used it though [11:13] FSX: Alrght [11:14] botanicus has joined the channel [11:23] JimBastard_: FSX: if you are only requiring the file once then the unmin'd is fine i would think [11:28] pavelz has joined the channel [11:35] felixge has joined the channel [11:35] felixge has joined the channel [11:36] FSX: JimBastard_: How do I actually use _? [11:37] FSX: _ = require('./underscore'); and then _.extend(options, options2); gives me an error. [11:37] JimBastard_: whats the error [11:37] FSX: TypeError: Object # has no method 'extend' [11:41] JimBastard_: ugh no more slides, time to sleep [11:41] FSX: Are there usage examples of _? [11:42] Tekerson has joined the channel [11:44] JimBastard_: rtfm [11:44] JimBastard_: there are a shit ton [11:44] JimBastard_: jfgi [11:45] derbumi has joined the channel [11:45] crodas has joined the channel [11:49] Tekerson: My node.js installation (from gitbut repo) appears to be missing the multipart module. Has it been removed? or am I missing something else? [11:52] javajunky: it has been removed [11:52] javajunky: isaacs has it over in his repo, called 'old' [11:54] Tekerson: is there something that replaces it? [12:05] JimBastard_: Tekerson: you can just use the old multipart.js [12:06] Tekerson: sure, just trying to figure out why it was removed. [12:06] JimBastard_: http://github.com/Marak/hook.io/blob/master/hookio/lib/multipart.js [12:06] JimBastard_: theres a commit message somewhere [12:06] JimBastard_: it was bloated [12:06] Tekerson: ok, fair enough. thanks. [12:08] jbrantly has joined the channel [12:09] micheil: is there a way to create a new instance of a constructor, but pass it a scope? [12:10] ashb: i can't parse that question [12:10] ashb: what do you mean? [12:10] felixge: micheil: yes [12:10] micheil: felixge: which is? [12:10] felixge: micheil: var my Obj = {}; myObj.prototype = constructor.prototype; constructor.call(myObj); [12:10] felixge: micheil: I think that should work [12:10] micheil: okay. [12:11] felixge: (not tested) [12:11] felixge: micheil: if myObj already has a prototype you may have to use a different approach so [12:11] felixge: micheil: I mean you'd have to augment the existing prototype with a for ...in [12:11] ashb: if that's what you mean the term 'scope' is wrong (at least how the impls and the ECMAScript spec talk about things) [12:12] felixge: ashb: I suppose he means context [12:12] micheil: well, currently it was just a standard eventEmitter callback [12:12] felixge: ashb: but people mix this up all the time so I always try to get the meaning out of the 'context' (no, not that other context) [12:12] felixge: :D [12:13] micheil: as in, this.addListener("connection" connectionListener); [12:14] JimBastard_: as in, this.addListener("zzzzzzzzzzz", function(e){goSleepyTime()} [12:15] micheil: I'm trying to figure out this error: http://gist.github.com/366864 [12:18] botanicus has joined the channel [12:19] alex-desktop has joined the channel [12:19] micheil: I have no idea what causes it [12:21] zol has joined the channel [12:26] micheil: I think I've found it [12:26] micheil: _ry: ping [12:26] micheil: felixge: ping [12:27] felixge: micheil: sup? [12:27] micheil: kay, did you see that issue that I was having? [12:27] felixge: micheil: some web socket stuff [12:27] micheil: this was the error back: http://gist.github.com/367031 [12:27] micheil: start <= end [12:28] micheil: I changed the code to simply out put the start, end and bytesParsed [12:29] micheil: which gave for this: http://gist.github.com/367033 [12:29] micheil: I removed the - start from the sys.p, and found that after two attempts, the connection was still stable [12:30] micheil: rather, removed the "- start" from both the slice and sys.p [12:30] micheil: this ended up giving larger numbers back as a end position [12:30] micheil: I ran it on the example code from before [12:30] micheil: and now it works fine [12:32] micheil: so far in my limited testing, I can have two clients running at once, no problems [12:32] micheil: I think the code was bugging [12:39] javajunky has joined the channel [12:39] lifo has joined the channel [12:47] micheil: _ry: I fixed the bug, as far as I can tell. [12:55] micheil: _ry: http://gist.github.com/367033 [12:56] micheil: (I'll shoot it to you as an email as well) [13:03] JAAulde has joined the channel [13:07] derferman has joined the channel [13:19] sh1mmer has joined the channel [13:20] hellp has joined the channel [13:23] davidsklar has joined the channel [13:30] FSX has joined the channel [13:34] kriszyp has joined the channel [13:45] dnolen has joined the channel [13:45] gf3 has joined the channel [13:48] bpot has joined the channel [13:53] jherdman has joined the channel [13:58] joshbuddy has joined the channel [13:59] psynaptic has left the channel [14:13] hsuh has joined the channel [14:16] Yuffster has joined the channel [14:23] creationix: _ry: Is v0.1.91 the last release before this weekend? [14:23] creationix: or will you try to get v0.2.0 out for jsconf [14:25] nefD has joined the channel [14:27] ncb000gt has joined the channel [14:27] botanicus has joined the channel [14:28] mjijackson has joined the channel [14:35] mape: Should the docs go up before jsconf? [14:40] micheil: creationix: hopefully I can get the upgrade patch in before 0.2.0 [14:40] creationix: micheil: so is your websocket working yet? [14:41] micheil: not yet, I've got a patch that makes the new upgrade header stuff work without crashing [14:41] micheil: which is: http://gist.github.com/367033 [14:41] micheil: and http://gist.github.com/367033 [14:44] bpot has joined the channel [14:44] creationix: cool, I'll look at it for sure after I'm done with the new howtonode [14:44] creationix: my next project is a websocket based game [14:44] creationix: ACTION loves working on node full time [14:45] nefD: creationix: mmm that would be nice [14:45] charlesjolley has joined the channel [14:46] creationix: now if only it was sustainable, working for myself doesn't pay well [14:46] nsm has joined the channel [14:46] mitkok has joined the channel [14:46] nefD: ive got a nginx/node/php based browser game in the works.. no web socket though :P mostly just long polling.. although, I am tempted to look more into web sockets- im just not well versed enough in the cross browser support and available solutions [14:47] micheil: nefD: currently there are no browsers or clients/servers for node which are spec compliant for websockets [14:47] creationix: nefD: I'm not sure either, I'll be researching it soon though [14:48] micheil: most, however, do support draft-hixie-75 [14:48] micheil: which has no protocol security [14:48] creationix: much easier [14:48] micheil: (or limited protocol security) [14:48] micheil: much easier, true, but probably not the way websockets will go [14:48] nefD: yeah, security has been a fairly consistent area of head scratching for me [14:49] MattJ: Just use TCP over XMPP and be done with it ;) [14:49] micheil: I am working on a few things in the websockets area to make a spec-compliant client/server for node, although, that's going to take quite some time [14:50] nefD: the best solution i've come to so far is to use quasi-session based tracking for users, where they are in the app (and thus, what actions they can currently perform), and passing & returning hash tokens following each client event [14:50] micheil: MattJ: define XMPP, there are so many plugins, there is no one true xmpp [14:50] MattJ: micheil: "plugins"? [14:51] micheil: eg, the XMPP-JSON, where by data is transfered in JSON format. [14:51] micheil: or the plugins that are used for the facebook xmpp server [14:51] micheil: (yes, iirc, facebook chat is now xmpp) [14:51] MattJ: It is [14:51] MattJ: But I know nothing of XMPP-JSON [14:52] MattJ: I'm using Strophe.js, and a lib I made around that for the TCP part [14:52] ithinkihaveacat has joined the channel [14:52] micheil: there's so many: http://xmpp.org/extensions/ [14:53] nefD: hmm.. XmlHttpRequest priority proposal looks like a neat idea [14:53] MattJ: micheil: Those are extensions to the protocol, for doing different things [14:53] micheil: either way, there is no one xmpp [14:53] micheil: with websockets, there is one websocket protocol. [14:53] creationix: nefD: If you just want to play with what works today, I have a very simple and naive implementation with examples at creationix/websocket on github [14:53] MattJ: micheil: That's nonsense :) [14:53] micheil: one way to handshake. [14:53] MattJ: micheil: websockets are a transport, not a protocol in the same sense [14:54] micheil: besides, websockets are in the browser [14:54] deanlandolt: MattJ: i don't know about that -- smells a lot like a protocol to me [14:54] nefD: creationix: Ah cool, thanks for the linkage, i'll check that out.. I'm guessing browser support is limited to, say, chrome nightly or somesuch? [14:54] creationix: nefD, It's a little better than that [14:54] deanlandolt: i got suckered into believing that at first too but it's really just the handshake that's http-like...it's a transport like http's a transport on tcp [14:54] MattJ: deanlandolt: It's a transport protocol, I'll give you that - in the same sense that TCP is [14:55] creationix: I linked to a node-based websocket game a whileback on thechangelog.com [14:55] nefD: was it wpilot? [14:55] creationix: the site explains what browsers are supported and why [14:55] creationix: nefD: yes [14:56] paul_____ has joined the channel [14:56] nefD: ah cool, yeah, very impressive example [15:00] aryounce has joined the channel [15:03] gwoo has joined the channel [15:07] TheEnd2012 has joined the channel [15:09] joshbuddy has joined the channel [15:09] joshbuddy has joined the channel [15:11] nefD: hrm.. im guessing its not really possible to monitor for changes to the node modules wiki page on github, is there? apart from seeing when it was last modified at the bototm of the page? [15:12] deanlandolt: nefD: nag JimBastard about setting up some kind of hook in his hook.io project [15:13] softdrink has joined the channel [15:13] nefD: deanlandolt: Harrr! Good call! Hadn't thought of that.. [15:17] sveisvei has joined the channel [15:17] creationix: anyone know how to alter the PATH from a sh script [15:17] creationix: or does it have to be a bash script [15:19] creationix: http://pastie.org/921372 [15:19] mape: nefD: There are services that allow you to monitor pages and that alert you on changes [15:19] creationix: after the script runs, my PATH variable isn't modified, this is on ubuntu [15:20] nefD: mape: Ah yeah, I figured there would be, just hadn't tried digging around for any yet.. any suggestions off hand? [15:20] mape: nefD: I've built one.. Only issue is that it is in Swedish [15:20] mjr_: creationix: what are you trying to do with PATH? [15:21] creationix: mjr_: I have several installs of node, this script puts the right one in PATH [15:21] voodootikigod_ has joined the channel [15:21] mjr_: You can certainly modify PATH as you go through an SH script. [15:22] mjr_: Can't you? [15:22] nefD: mape: This wouldn't be the first time where I've kicked myself for not knowing how to read Swedish, believe it or not :P [15:22] mape: Hehe [15:22] mape: It is pretty easy though.. [15:22] creationix: mape, you going to swdc? [15:23] mape: creationix: Not that I know of :/ [15:23] creationix: mjr_: I'm sure you can, but I'm not the best at bash, _ry posted a sample, but for zsh [15:24] steadicat has joined the channel [15:24] creationix: mape, well I'll be there a couple of days early if you want to meet up in Stockholm [15:24] creationix: not sure how far that is from you [15:24] mape: About 4h [15:24] mape: When is it? [15:24] creationix: first week of june [15:25] mjr_: creationix: http://gist.github.com/367214#comments [15:25] mjr_: You can change PATH the way you'd expect in sh. [15:26] creationix: mjr_: yess, but when you script ends doesn't PATH get reset to what it was [15:26] creationix: I thought that was the purpose of export, so that bash would remember it [15:26] mjr_: oh course [15:26] mjr_: of course [15:26] mjr_: No, the sh is a child process, so it inherits a copy of the parent's environment. [15:27] mjr_: export says to make that sh var available to any child processes that the sh spawns. [15:28] creationix: hmm, there must be a way [15:28] mjr_: But you can only ever change your own environment, not the environment of your parents. [15:28] mjr_: [15:28] creationix: so I have to use the source command then? [15:29] dnolen has joined the channel [15:29] mjr_: I'm not quite sure how your scripts are interconnected, but if you want the parent to change its path based on what the child did, a common way is to have the child emit some text that the parent would source. [15:30] creationix: yuck, I guess, I'll just generate files for each version that I can source [15:30] creationix: or create a new bash shell [15:30] mjr_: So like: newpath=`some_command.sh`; PATH="$PATH:$newpath" [15:31] mape: creationix: Have you heard anything regarding SWDC? Good reputation? [15:31] creationix: not much, I just know that Malte (cramforce) and I are speaking about node at it [15:32] mape: ok [15:33] kevwil has joined the channel [15:33] brapse has joined the channel [15:34] mjr_: creationix: if you are still vexed by bourne shell, I'm happy to help. [15:35] creationix: mjr_: can aliases use parameters [15:35] creationix: alias code runs in the parent process [15:35] mjr_: you need functions [15:35] creationix: I've got no clue how to do that, it took me 20 minutes to figure out an if statement [15:35] mjr_: ns () # Name servers [15:35] mjr_: { [15:35] mjr_: host -t NS $1 [15:35] mjr_: } [15:36] mjr_: That's a shell function that works like an alias with parameters [15:36] mape has joined the channel [15:36] creationix: interesting [15:37] creationix: so I could create a function called "nvm" and implement a bare "install" and "use" inside it (modeled after rvm's api) [15:38] creationix: ex: nvm install v0.1.91 [15:38] mitkok1 has joined the channel [15:38] creationix: or nvm use v0.1.33 [15:38] creationix: and just source the function from my bash profile [15:42] fictorial has joined the channel [15:42] fictorial: creationix: your drop-in websockets replacement looks great. there's no license mentioned. can I bundle it? [15:43] creationix: should be MIT, is that ok? [15:43] quirkey has joined the channel [15:43] fictorial: more than ok - thanks, great stuff [15:43] fictorial: smart to make it a drop-in replacement ... makes life *really* easy [15:44] dandean has joined the channel [15:44] creationix: fictorial: done, I pushed the license [15:44] creationix: the goal was to make it easy [15:44] fictorial: great, got it. [15:45] creationix: mjr_: so, I just figured it's bad to call exit from a script you're going to source [15:45] creationix: it kills your session [15:50] kjeldahl has joined the channel [15:53] fictorial: creationix: FYI, I think your README means socket.write not socket.send [15:53] creationix: yes, It seems I forgot to update that part [15:56] creationix: fictorial: updated, thanks [15:56] RayMorgan has joined the channel [15:56] fictorial: np [16:01] creationix: mjr_: still there? [16:04] herbySk: hello, any v8::External gurus here? [16:14] creationix: woot, node version manager prototype is done http://gist.github.com/367305 [16:14] creationix: mjr_: ^ [16:15] kjeldahl_ has joined the channel [16:17] fictorial: ah, that's a good idea. [16:19] charlesjolley has joined the channel [16:22] creationix: I'd better stop there before I go too far down the bash rabbit hole [16:29] fizx has joined the channel [16:33] samsonjs_ has joined the channel [16:34] kevwil has joined the channel [16:34] nefD: bleh, im not a fan of writing bash scripts [16:36] paul_____ has joined the channel [16:45] davidsklar has joined the channel [16:48] stephenlb has joined the channel [16:49] rictic has joined the channel [16:50] isaacs has joined the channel [16:53] isaacs: _ry: so, it looks like the lib/module.js stuff is settling down a bit. [16:53] rolfb has joined the channel [16:53] micheil: isaacs: could you do a code review on something for me? [16:53] _ry: isaacs: good [16:54] micheil: oh, and hi _ry [16:54] isaacs: micheil: sure. link? [16:54] _ry: isaacs: i'm speaking with herby right now [16:54] _ry: micheil: hey [16:54] micheil: _ry's probably the better to talk to. [16:54] isaacs: _ry: kewl. he seemed a little upset, but he did actually come up with some good feedback [16:54] isaacs: caught a tricky edge case when a module file might be deleted between the first and second load. [16:54] micheil: just wanting a sanity check on that stuff for upgrade [16:55] confounds has joined the channel [16:55] ahaller has joined the channel [16:58] mjr_ has joined the channel [17:00] mjr_: creationix: I'm back, but it looks like you probably figured out your issue, based on the mailing list post. [17:00] creationix: mostly, I have a couple of TODO's in there [17:00] herbySk: a little? well.... [17:00] RayMorgan_ has joined the channel [17:01] herbySk: did you remove that shortcut code? it really is redundant [17:02] fictorial: creationix: re: websocket, if it's really meant to be a drop-in replacement, then the "websocket" (the EventEmitter instance) should duck type net.Stream and proxy to the "socket" (e.g. setEncoding, setNoDelay, etc.) [17:02] mjr_: creationix: why didn't you just write nvm in node? :) [17:02] creationix: fictorial: probably [17:02] creationix: mjr_: chicken and egg [17:03] creationix: bash is great for bootstrapping, everyone has it [17:03] mjr_: oh right, for the initial install case [17:03] fictorial: creationix: ok, I'll patch it [17:03] creationix: fictorial: thanks [17:03] isaacs: herbySk: which shortcut code? [17:03] herbySk: cache shortcut [17:04] creationix: heh, gists support markdown readme's [17:04] creationix: http://gist.github.com/367305 [17:04] herbySk: if (searchPaths.length === 1) { ....} [17:04] isaacs: herbySk: it's not redundant. it saves a lot of lookups. [17:04] isaacs: herbySk: and it's safe. [17:04] herbySk: the whole if is redundant, since the same check is done in general code a few lines later [17:04] isaacs: herbySk: no, it isn't. it's only safe to cache-hit based on module.id if there's only one search path. [17:05] isaacs: herbySk: the other cache-hits are based on module.filename [17:05] herbySk: look at your own code: the same thing is done in the subsequent loop [17:05] quirkey has joined the channel [17:05] mattly has joined the channel [17:05] isaacs: herbySk: no, it's not the same. the second time it's based on the filename, not based on the module.id [17:05] isaacs: herbySk: there are two cache keys. [17:06] fictorial: creationix: also, is there any concern with attaching a function to each "websocket" instance (cf. a prototype)? I'm concerned that if you had 30,000 people connected it would create 30,000 functions instead of 1. [17:06] isaacs: herbySk: you're comparing line 87 and line 109, right? [17:07] herbySk: var exts = exports.extensions [17:07] herbySk: , found = null [17:07] herbySk: , searchPath [17:07] herbySk: for (var i = 0, l = searchPaths.length; i < l && !found; i ++) { [17:07] herbySk: searchPath = path.join(searchPaths[i], id); [17:07] herbySk: for (var j = 0, m = exts.length; j < m && !found; j ++) { [17:07] herbySk: var ext = exts[j] [17:07] herbySk: , file = searchPath+ext [17:07] herbySk: , index = path.join(searchPath, "index"+ext) [17:07] herbySk: found = file in this.moduleCache ? file [17:07] herbySk: : exists(file) ? file [17:07] herbySk: : exists(index) ? index [17:07] herbySk: : null; [17:07] herbySk: } [17:07] fictorial: eek, paster! [17:07] isaacs: herbySk: "shortCircuit" in that context is not a filename. [17:07] herbySk: look at searchPath = path.join(searchPaths[i], id); line [17:07] davidsklar has left the channel [17:07] isaacs: herbySk: yes, i see it. i'm trying to explain it to you. [17:07] herbySk: it is based on id same as inside if [17:07] isaacs: herbySk: try sys.debug() ing them. [17:07] isaacs: they're not the same [17:08] isaacs: herbySk: in the second loop, i'm checking for the filename in the cache, not the searchPath [17:09] isaacs: oh, dag. it does need to look for the index.js in teh cache, too. didn't fix that thoroughly. [17:10] dnolen has joined the channel [17:10] isaacs: herbySk: ok, check it now. http://github.com/isaacs/node/blob/module-refactor/lib/module.js#L102-103 [17:10] herbySk: oh, you did it that way? ok do, what you want, I'll rewrite it anyway (that is, why not checking for cache based on id in the first loop before starting the second loop in the first place? no if would be needed, then) [17:11] isaacs: herbySk: if you check for an ID hit, then you will fail in the case where require.paths has changed. [17:11] isaacs: herbySk: it is only safe to hit the cache based on ID when there is a single search path. [17:11] isaacs: herbySk: otherwise, you have to search based on filename. that's the whole point of this. [17:12] herbySk: hm, i will think of it [17:13] charlesjolley has joined the channel [17:14] isaacs: _ry: you'd be proud. my work macbook is running ubuntu. [17:14] isaacs: _ry: it felt a little like sacrificing a virgin. [17:16] herbySk: issacs: and the extensions.push("")? [17:16] nefD: isaacs: lol [17:16] herbySk: (sorry for name typo) [17:16] nefD: isaacs: 9.10, or the 10.04 beta? [17:16] isaacs: herbySk: (no prob, i'm not sensitive about spelling my name) [17:17] isaacs: herbySk: pushing "" into the extensions means that you want to load files based on the exact name specified. it's weird, but works now as i'd expect it to. [17:17] BinaryPie has joined the channel [17:17] isaacs: nefD: 9.10, Karmic [17:17] nefD: *nod* [17:18] herbySk: it means i want to be able to load files that have no extension, too [17:19] yuno_ has joined the channel [17:20] yuno_: documentation generation... any recommendations? [17:20] herbySk: I know it works, but does it not allow nameclashes between logical/physical cache key now? [17:20] micheil: there was a new one mentioned on the mailing list yuno_ [17:20] isaacs: herbySk: in that case, yes, the id would match the filename in some cases. [17:20] yuno_: yuidoc and natural docs look ok-ish for example [17:20] herbySk: your proof of their sepearation was "physical uses an extension" [17:20] isaacs: herbySk: but since they'd point at the same module, it's no problem. [17:20] micheil: _ry: any feedback on that patch for the upgrade headers? [17:20] yuno_: but some people really dislike natural docs for some reason (not really sure why) [17:20] isaacs: herbySk: that's such a rare and weird edcge case, though. [17:20] isaacs: herbySk: if you think it's relevant, we could throw upon finding a falsey extension. [17:21] herbySk: ??? [17:21] herbySk: rare or not, it is the case [17:21] isaacs: herbySk: i'm saying, it's like, "if i delete module.prototype.spawn, then require won't work" weird. [17:21] isaacs: herbySk: there's a point at which we just say, "don't do that" [17:21] isaacs: it's not likely to do by accident. [17:22] herbySk: no, it's plain user case, it's not hacking. of course when I delete Object.toString, I kill node [17:22] herbySk: (probably) [17:22] micheil: isaacs: falsey extension as in path.js/filethat_is_actually_a_file.js? [17:23] yuno_: micheil: sphinx? [17:23] isaacs: i could add a guard in module.extensions.push, i suppose. [17:23] micheil: yuno_: no idea, I didn't pay much attention to it [17:23] yuno_: http://python-smisk.org/docs/current/library/smisk.config.html <- looks very lovely though [17:23] herbySk: definitiely not... you cannot ban loading no-extension files as modules. [17:23] herbySk: you shoudl make cache keys separate, it's all [17:23] isaacs: herbySk: i don't get what your problem is with this... [17:23] micheil: isaacs: module.extensions.shift() aha! [17:24] isaacs: micheil: ohnoes! [17:24] micheil: sorry, I'm probably not helping :P [17:24] herbySk: what if they have files wiothout extesnions which they really wnat to use (with registerExitension, maybe)? [17:24] yuno_: oh wait... looks like it's only for python :l [17:25] isaacs: herbySk: that's quite a presumptuous registerExtension, then [17:25] isaacs: herbySk: i'm ok with saying that node modules must have SOME extension. [17:25] isaacs: herbySk: it's an error that will be caught early in the dev cycle, so i'm sure it's fine. [17:25] isaacs: herbySk: also, WOW, but you are one thorough dude! [17:27] herbySk: yes, I am... some call it paranoia... and I like TDD very much, with this attitude I can be pretty sure the code is _right_ after it runs my tests :-) [17:27] herbySk: Yes, if you say, they _must_ have an extension, it also solves it... a bit pragmatically, but it does [17:28] creationix: I think it's fair for register extension to require an extension [17:28] brainproxy has joined the channel [17:28] tjholowaychuk has joined the channel [17:29] sveimac has joined the channel [17:30] isaacs: node is quite pragmatic :) [17:30] isaacs: you have to be when you'er dealing with internet communication. [17:30] isaacs: it's usually not sensible. [17:31] creationix: isaacs: this whole YAGNI idea is really growing on me [17:31] creationix: I only implement the code I know I need and rafactor later if I have to [17:31] mitkok has joined the channel [17:33] mikeal has joined the channel [17:34] charlesjolley has joined the channel [17:34] isaacs: creationix: it's powerful! [17:35] creationix: isaacs: and it's really fun to just delete half baked code that I don't even use, but "might" someday [17:35] cadorn has joined the channel [17:36] creationix: the only downside I can think of is unstable apis when for when you do have to refactor, but even if you plan everything up front you're going to be wrong anyway [17:36] mjr_: now that I've gone and looked up YAGNI, I, too, agree. [17:36] creationix: I had to look it up when isaacs used it the other day [17:36] RayMorgan has joined the channel [17:37] creationix: _ry: I don't think module dependencies are going to make it into this version of howtonode [17:37] creationix: it was harder than I expected to do it right [17:37] creationix: I might just have the authors hard-code the deps in metadata for now [17:38] creationix: but none of the code examples will be able to run that use them [17:38] fizx has joined the channel [17:38] creationix: I'd have to basically implement a package manager and reimplement require to do it right [17:39] nefD: i feel slightly dumb for asking this, but in JS, is there any functional difference between surrounding a string with single quotes vs. double quotes? [17:39] creationix: nefD: not that I know of [17:39] creationix: I think the next version of JS is adding string interpolation, but it's not here yet [17:39] nefD: Gotcha, thanks [17:40] joshbuddy has joined the channel [17:41] noonat has joined the channel [17:43] creationix: _ry: you left the "v" out of the latest tag, it broke my stuff :( [17:44] tjholowaychuk: creationix: do you have a repo up for rvm? [17:44] tjholowaychuk: creationix: would love to help with that [17:44] creationix: tjholowaychuk: the gist is a repo [17:44] creationix: I haven't made it's own repo yet [17:45] tjholowaychuk: creationix: k cool, let me know if / when you do [17:45] creationix: you can fork the gist [17:45] mjr_: Should probably just make nvm be a standalone file. People are confused about putting things into their shell init files. [17:45] creationix: mjr_: it is now [17:45] piranha has joined the channel [17:45] creationix: I updated the gist [17:46] tjholowaychuk: yeah i know, but you loose lots of the features github provides (issues etc) [17:46] mjr_: wait, how did you get that readme in there? [17:46] creationix: mjr_: gist's are full repos, just with a simpler interface [17:47] mjr_: so you clone it down with real git from your computer, add a readme, then push back? [17:48] creationix: tjholowaychuk: done http://github.com/creationix/nvm [17:48] creationix: mjr_: yes, and also there is an add file button in the interface when you're editing [17:50] mjr_: I didn't understand what you were asking this morning about PATH changing, but now that I see your program, I do. [17:51] mjr_: I think most people solve this kind of problem with symlinks. [17:51] mjr_: Then you don't have to mess around with environment variables, shell functions, etc. And it works if you use one of those oddball shells like zsh. [17:52] creationix: mjr_: I thought about, but I prefer changing path [17:52] creationix: besides that how rvm does it and it works great there [17:53] creationix: the problem with symlinks is that it affects all environments, not just the current one [17:53] creationix: I want to be able to run different versions at once [17:55] mjr_: I hadn't seen rvm until just now [17:55] inimino: this channel is getting busy :) [17:55] mjr_: Some day I'll play around with ruby, unless I find something else more interesting. [17:56] creationix: tjholowaychuk: doesn't node have an environment variable you can set to control the library search path [17:56] creationix: then you can have a seperate repo of libraries per node version [17:56] rednul has joined the channel [17:57] tjholowaychuk: creationix: not sure, i think so [17:57] mjr_: NODE_PATH [17:57] creationix: does NODE_PATH come before $HOME/.node_libraries [17:58] tjholowaychuk: creationix: all I did for kiwi was symlink the "current" dir of libraries [17:58] jspiros_ has joined the channel [17:58] creationix: yeah, I can't use symlinks, I need multiple concurrent versions [17:59] mjr_: NODE_PATH does seem to prepend to require.paths [18:00] RayMorgan_ has joined the channel [18:00] creationix: sweet [18:00] tjholowaychuk: whoop [18:04] ahaller has joined the channel [18:05] _ry: creationix: oh shit [18:05] _ry: creationix: oh wait - no i didn't [18:06] _ry: http://github.com/ry/node/tree/v0.1.91 [18:06] creationix: _ry: hmm [18:06] _ry: creationix: hard coding works [18:07] creationix: maybe I'm just going crazy, but I thought process.version used to include the "v" [18:07] _ry: micheil: get back to you soon on your patch [18:07] creationix: in v0.1.91 it doesn [18:07] micheil: _ry: k [18:08] creationix: ACTION compiling v0.1.90 using nvm :) [18:11] mitkok has joined the channel [18:12] towski has joined the channel [18:12] creationix: _ry: ok, sorry, it's working the same in v0.1.90, not sure what happened [18:14] fictorial: creationix: http://github.com/fictorial/websocket/commit/a609a9556da1a1e14b60f06f3cf15c0aacb77d76 [18:15] fictorial: is there a way to throw net.Stream in the prototype chain instead of that? I know it 'is a' EventEmitter... Not sure. [18:20] CIA-77: node: 03Micheil Smith 07master * r6ad18a2 10/ lib/http.js : Fix upgradeHead bounds. - http://bit.ly/c3OIxV [18:20] _ry: micheil: thansk--^ [18:20] micheil: no worries :) [18:21] micheil: so, was my patch correct in what I guessed? [18:22] _ry: yes [18:22] charlesjolley has joined the channel [18:22] creationix: fictorial: should be a way [18:23] steadicat has joined the channel [18:23] creationix: I'm not sure about "instanceof" stuff, but you can use __proto__ on objects [18:26] piranha has joined the channel [18:26] creationix: fictorial: yes, it works "foo.__proto__ = net.Stream.prototype [18:26] creationix: now foo is instanceof net.Stream [18:26] fictorial: what about it being created via new EventEmitter? [18:27] creationix: is Stream not an EventEmitter? [18:27] fictorial: heh! [18:27] creationix: but yes, I think it will override the old prototype [18:27] fictorial: I suppose it doesn't matter; you'd need to somehow merge "websocket" with "socket" vars [18:27] fictorial: the patch I posted works [18:28] creationix: maybe chain __proto__ [18:28] micheil: _ry: good good [18:29] creationix: fictorial: so basically you want multiple inheritance? [18:29] fictorial: nope - I am confusing things w/ the prototype chain - nevermind that - I think you just need a proxy as in that commit [18:31] brapse has joined the channel [18:31] creationix: you could create a new object that proxies and insert that between your object and it's old parent [18:31] creationix: that would work like ruby module mixins [18:31] botanicus has joined the channel [18:31] fictorial: well, that's what we're doing there already with the "websocket" object, no? [18:32] creationix: fictorial, so if your object an EventEmitter with Stream abilities or an Stream with EventEmitter abilities [18:32] fictorial: you need an EventEmitter that acts like a socket and at the same proxies non-wrapped methods to the original socket. that does that now with my patch. [18:33] fictorial: you were doing it already with .end() [18:33] fictorial: for instance [18:33] dnolen has joined the channel [18:33] fictorial: s/socket/Stream/ in the above; sorry to confuse terminology. [18:33] creationix: ahh, It's easy, Stream already had EventListener in it's chain [18:35] fictorial: Emitter? [18:35] creationix: instead of new process.EventEmitter just use new net.Stream [18:35] pdelgallego has joined the channel [18:35] ahaller has joined the channel [18:35] creationix: it will still have EventEmitter stuff [18:35] fictorial: oh oh ok now I see -- let me try that. [18:36] herbySk: I see very strange node behaviour... probably something around gc... I run 'time node foo.js' many time and got only two results: 1m11s of user time or 0m8s user time... it's really big difference [18:36] fictorial: creationix: not everything will work though (remoteAddress, readyState) ... remoteAddress won't change so it can be copied up front but readyState is a wash. [18:37] herbySk: Any ideas? Maybe it has to do something with putting this periodical 2s GC out... the file reads big file in async mode, basically and does nothing else (12MB) [18:37] fictorial: creationix: we could add a readyState() method but it's no longer a drop-in replacement then. small nit. [18:38] creationix: I don't even know what readyState is [18:38] drostie has joined the channel [18:38] kixxauth has joined the channel [18:38] creationix: I assume is's the current state of the stream state machine? [18:38] fictorial: yeah [18:38] creationix: yeah, either stub it out or implement a replacement [18:39] fictorial: you can't ... it's just a property [18:39] fictorial: I don't know if it's possible to proxy a property access [18:39] creationix: sure there is [18:39] creationix: we've got magic getters and setters [18:40] fictorial: oh? nice [18:40] fictorial: from JS or from C++? [18:40] creationix: js [18:40] creationix: uses the extended stuff from mozilla, not part of ECMA5 [18:40] fictorial: oh, sure -- defineProperty? [18:40] creationix: http://wiki.github.com/ry/node/ecma-5mozilla-features-implemented-in-v8 [18:41] creationix: no, that's some other magic, but it's part of ECMA5 [18:41] creationix: __defineGetter__, __lookupGetter__, etc... [18:41] fictorial: ok [18:41] fictorial: oh man, I wish I had read this earlier. [18:41] mjijackson has joined the channel [18:41] mjr_: you can also use the get() and set() style in an object literal [18:41] kriskowal has joined the channel [18:41] mikeal: so much of the stuff mozilla added just makes things confusing [18:42] isaacs: yeah, wonderbar considered harmful. [18:42] isaacs: better to use the statics [18:42] isaacs: Object.defineProperty [18:42] mikeal: there are so many js files in Firefox that start with 3 pages of const declarations [18:43] mjr_: does const actually work in Mozilla-land? [18:43] mikeal: oh yeah [18:43] mjr_: neat [18:43] mikeal: it has for a long time [18:43] mikeal: no, it's really annoying [18:44] mikeal: the only really good things they have are let and array comprehensions [18:44] mikeal: i really miss array comprehensions [18:44] JAAulde has joined the channel [18:44] mjr_: are you hating the playa, when you should be hating the game? [18:44] isaacs: const is ok [18:44] isaacs: it's like let, but constant, right? [18:44] isaacs: at least, that's how i read the spec [18:44] mikeal: no, let is like var but done right [18:45] isaacs: yeah [18:45] isaacs: let is block-scoped var [18:45] mjr_: I thought const was just var only constant. [18:45] mikeal: const throws an exception if you ever try to use that name again [18:45] mikeal: which turns out to be one of the most annoying things you could ever do in javascript [18:45] isaacs: mikeal: you mean, it throws if you set to it, or if you name another var with that name? [18:45] mikeal: and people abuse the crap out of it [18:45] mjr_: oh, you can't shadow the definition of a const? [18:45] mikeal: isaacs: correct [18:46] isaacs: ok, that's lame [18:46] isaacs: but since it's largely a security feature, i guess that makes sense. [18:46] mikeal: worse, it throws when you try to set const on something that is already set as a var [18:47] mikeal: so we had all these tests, and everyone wished that a particular object was already there, so we started passing it in to the scope and all of a sudden a ton of tests have to be updated to remove their ridiculous use of const at the top of the test [18:47] mjr_: It seems like a useful feature, but like many features, it gets abused in annoying ways. [18:48] mikeal: let is awesome tho [18:48] mikeal: it's like var without the hoisting to the top of the function [18:48] isaacs: the hoisting is stupid. [18:48] dgathright has joined the channel [18:48] mjr_: yeah, hoisting has got to go. [18:48] isaacs: i always write my code assuming that there's no hoisting anyhow. [18:48] isaacs: but so much stuff depends on that behavior for var, you couldn't change it. adding let is wise. [18:49] mjr_: I always make the first line of all functions be a single var statement, just so that hoisting will be obvious. [18:49] drostie has joined the channel [18:49] mikeal: i used to just pretend it didn't hoist and it bit me too many times [18:49] mikeal: so now I try my best to push all my var declarations to the top [18:50] mikeal: Crockford likes let too, so it'll probably make it [18:50] CrockBot: Douglas Crockford can't use the eval function because for him, it always returns the string "sorry!" ara_p [18:50] mikeal: i think he actually said "once you have this you should just stop using var" [18:50] mjr_: I've bought into the Crockford way for almost everything. [18:50] CrockBot: Douglas Crockford's JavaScript is controlled by international arms treaties. ara_p [18:51] joshbuddy has joined the channel [18:52] isaacs: herbySk: still around? [18:52] herbySk: yes [18:52] charlesjolley_ has joined the channel [18:53] isaacs: herbySk: kewl. (was at a meeting for a while there) [18:53] kriszyp: with the default interval (0) in watchFile, is it being notified by the OS (vs polling)? [18:53] isaacs: herbySk: i'm curious about any other thoughts you have about the module loader stuff, edge cases and such. [18:53] isaacs: herbySk: i suspect that the different opinions about code style are not resolveable. but we can at least make sure the behavior is correct. [18:54] herbySk: that's why I want you to settle it down as fast as possible, so I have a base which I can rewrite [18:55] isaacs: herbySk: what's the purpose of your rewrite? if it's working, and lightweight, why rewrite it? [18:55] herbySk: it's spaghetti hardcoded ugly stuff. [18:55] herbySk: that _is_ a reason for me to rewrtite it [18:55] isaacs: i don't agree with that assessment. [18:55] isaacs: it's limited to use cases that we actually have. [18:55] herbySk: then, it magically will become more extensible and new possibilities open [18:56] isaacs: it's a class and a few functions, and it's extensible in teh ways that realy people actually intend to extend it in real life. [18:57] fictorial: creationix: I'm not sure what using Stream does since we need to proxy method calls and property accesses to the correct place. I added defineProperty and it works fine, proxying to original socket. BTW, .write() should return true/false. [18:57] fictorial: I'll have a commit up in a second in my fork. [18:57] herbySk: it's about code vs. data. I use data when I can use it, because data are first class objects, so they can be manipulated. You seem to misunderstand yagni for not letting data exist instead of code (if (ext===".node")...) I maybe misunderstood removing duplicities to spotting patterns [18:57] creationix: fictorial: thanks for the help [18:57] herbySk: I want the data be there, so I will rewrite it. [18:57] fictorial: np, thanks for the idea of a drop-in replacement. it's a good one. [18:58] kevwil has joined the channel [18:58] fictorial: _ry, what else do I care about on net.Stream. *my* code has only used readable, writable, remoteAddress, and readyState. [18:59] isaacs: herbySk: you can easily replace just pieces of the module loading system that iw rote, though. [18:59] dgathright has joined the channel [18:59] isaacs: herbySk: that's just a matter of replacing the Module.prototype.load function. [18:59] isaacs: herbySk: and it's not a very big function. [19:00] herbySk: Yes, the problem is it must be replaced whole... if I want to add some functionality to compile, for example, I must rewrite it to get them past those ifs at the beginning. [19:00] kriszyp: watchFile is not as fast as I thought i would be, seems to take a second or two to be notified of a change [19:00] deanlandolt: herbySk: perhaps /you're/ misunderstanding yagni ;) [19:00] isaacs: herbySk: you could just replace the postCompile function [19:01] isaacs: kriszyp: which os? [19:01] isaacs: kriszyp: it's kinda dumb on osx [19:01] kriszyp: osx [19:01] kriszyp: oh, ok [19:01] isaacs: kriszyp: try it on linux. it's much more real-time-ish [19:01] herbySk: So yes, it's minimal, it's extensible to some extent, but I think extensible is something else... this way everyone will be happy except I will always swear during merges... I hope they won't occur often [19:02] isaacs: herbySk: if you could put your changes in userspace (which i believe you can), you don't have to worry about merges at all. [19:04] herbySk: No, the module system is bad, so I am gonna to rewrite it completely, so merges can be painful, but on the other hand, I will have nice extensible module system. Since you will push on it being minimal, the merges will not be as a big pain. [19:05] herbySk: (that is, not rewrite, refactor, and I begin with the versioin that will be included into node, that is why I want that inclusion soon) [19:06] binary42 has joined the channel [19:06] binary42 has joined the channel [19:06] kriszyp: watchFile also seems to fire the callback a random number of times, instead of just once [19:07] kriszyp: sometimes once, sometimes twice, sometimes three times [19:08] botanicus has joined the channel [19:10] isaacs: herbySk: then, it sounds like we're kinda on the same page here. [19:10] _ry: kriszyp: yeah [19:10] fictorial: creationix: http://github.com/fictorial/websocket/commit/bb9ec833149f373d1b73d827109e171726969a20 [19:10] _ry: kriszyp: callback firing should not be assumed to be in any correspondence with file changes [19:10] technoweenie has joined the channel [19:11] fictorial: creationix: ah, so the right thing is a pull request, ok. done. [19:11] creationix: fictorial: :) [19:11] technoweenie: hey is fab/master what i want now? is it v3 [19:12] technoweenie: "first push for v4" haha [19:12] herbySk: no, i'm not happy with it, but if it looks that your version gets included in the node, do it fast so I can make the (afaict) right version... i feel forced into it... doesn't matter [19:13] _ry: herbySk, isaacs: i will include patches when you two agree on something :) [19:13] creationix: fictorial: got it, thanks [19:13] isaacs: _ry: i think we just agreed. I just need to add the requirement that extensions must be non-empty strings [19:14] isaacs: to prevent cache key collisions. [19:14] _ry: isaacs: i want one patch at a time - and they should be small [19:14] isaacs: _ry: yikes. how small? [19:14] _ry: that is, no patch bombs [19:14] _ry: like something i can understand [19:14] isaacs: _ry: at some point, this refactor removes the entire module system from node.js and puts it in another file, and then replaces it with a different one. [19:15] isaacs: _ry: there are going to be a few several-hundred-line red blobs. [19:15] mikeal: i can't think of a way to make this smaller [19:15] mikeal: but it's removing more code than it's adding right :) [19:15] _ry: isaacs: moving code i can understand :) [19:15] creationix: :D [19:15] isaacs: _ry: how do you feel about these? too big? http://github.com/isaacs/node/commits/module-refactor [19:16] isaacs: _ry: i guess the scary one is this bit: http://github.com/isaacs/node/commit/b327d77fb42ffd841d224fbdab792842c4cd8f90 [19:16] admc has joined the channel [19:18] joshbuddy_ has joined the channel [19:18] brapse has joined the channel [19:20] _ry: isaacs: they should also compile and pass the tests on each commit [19:20] isaacs: _ry: ok, that's a clearer requirement. [19:21] _ry: this http://github.com/isaacs/node/commit/65cbf31efa10455bb29e9ba12d15d796e9ef32dc for example [19:21] _ry: doesn't remove something from src/node.js [19:21] isaacs: _ry: right, it doesn't remove it until it's loading it. [19:22] isaacs: i can try to sort things around to tell a more coherent story, though [19:22] WALoeIII has joined the channel [19:22] _ry: good good :) [19:23] isaacs: i'll try to get to that this weekend. if you have any thoughts about the code itself, though, that'd be helpful. [19:23] _ry: fake but clear stories [19:23] isaacs: hehe [19:23] RayMorgan has joined the channel [19:23] _ry: okay i'll be gone at jsconf [19:23] isaacs: the only "irreducible" bit is probably the part where i move the code out of node.js and into module.js [19:23] isaacs: because any way you cut that, it's going to be a wholesale rewrite. [19:24] deanlandolt: isaacs: yo'ure not gonna be at jsconf? [19:24] isaacs: nope. [19:24] deanlandolt: wtf dude...why not? [19:24] isaacs: when it was time to buy tickets, i didn't have a job, and jsconf tickets are lots of hundreds of dollars, plus travel. [19:24] deanlandolt: ah, true [19:24] isaacs: not bad for a corporate overlord, but out of pocket, that sucks [19:25] deanlandolt: true [19:25] isaacs: but we can hang out when you all get back to CA [19:25] isaacs: ^_^ [19:25] deanlandolt: i'm out of pocket (but i don't have to travel) [19:25] crodas has joined the channel [19:25] deanlandolt: ah, yeah, true -- you CA bastards get to do this /all the time/ [19:26] crodas has joined the channel [19:31] quirkey has joined the channel [19:31] isaacs: deanlandolt: you should move to silicon valley :) [19:32] tisba has joined the channel [19:33] deanlandolt: isaacs: heh...that ship has sailed...my (very long term) girlfriend probably wouldn't like that very much :-/ [19:33] isaacs: deanlandolt: poppycock. take her with you. everyone loves california. [19:34] deanlandolt: ha...yeah, your governer said that on the tv [19:34] isaacs: it's not better in every way here. but it's better in a lot of ways that are really importan.t [19:34] deanlandolt: i wish i could but we also went and built a custom house...we're /just/ moving in this weekend after a year and a half of pain [19:34] isaacs: sell it! profit! [19:34] deanlandolt: (well, she's moving in...i have a conference to attend...but screw her -- i built her a /house/ ;) [19:34] isaacs: then use the money to buy a much smaller house in california! [19:35] isaacs: (that's not one area where CA wins...) [19:35] deanlandolt: oh if only -- a move to cali's always been one of those distant dreams [19:35] deanlandolt: just a little too distant [19:35] teemow has joined the channel [19:37] technoweenie has joined the channel [19:38] bmizerany has joined the channel [19:38] isaacs: deanlandolt: you could alwyas retire to San Diego. A lot of people do it. [19:39] deanlandolt: sounds awesome...2040's gonna be a great decade [19:40] kriskowal: deanlandolt apart from the unix epochalypse, probably yeah [19:42] tjholowaychuk: creationix: are you going to come work for Ext when your schooling stuff is done? [19:42] creationix: not planning on it, why? [19:43] tjholowaychuk: curious [19:43] mattly has joined the channel [19:43] creationix: I used to live in Anaheim, it was fun [19:50] creationix: what's the best way to get the last update in git for a while [19:50] creationix: kinda like a mtime attribute [19:50] creationix: mabe git log with some grepping? [19:50] technoweenie has joined the channel [19:51] charlesjolley has joined the channel [19:53] tjholowaychuk: git rev-list maybe? [19:53] tjholowaychuk: git rev-list master --timestamp [19:53] tjholowaychuk: not sure what you have in mind [19:56] creationix: I need to know the last time a file was modified and the commit that changed it [19:56] creationix: I'm using a bare repo, so there is no actual file to check [19:57] tilgovi has joined the channel [19:58] towski has joined the channel [19:58] tjholowaychuk: hmm not sure [19:59] demolithion has joined the channel [20:00] creationix: git --no-pager log -1 --no-color --summary -- articles/what-is-this.markdown [20:00] creationix: seems to work [20:02] tilgovi_ has joined the channel [20:03] tjholowaychuk: ah very nice! didnt even notice the -- [20:03] tjholowaychuk: you can do custom log outputs for better cutting n shit if you need [20:03] tjholowaychuk: and -n 1 if you just need the one commit [20:03] cadorn has joined the channel [20:05] cdorn has joined the channel [20:08] tjholowaychuk: anyone know what the best way to support a dependency using a Makefile with Waf is? [20:15] joshbuddy has left the channel [20:17] derferman has joined the channel [20:18] RayMorgan has joined the channel [20:19] darkf has joined the channel [20:24] tjholowaychuk: nvm [20:25] kjeldahl has joined the channel [20:26] cmlenz has joined the channel [20:26] demolith1on has joined the channel [20:30] mjijackson has joined the channel [20:32] kriszyp has joined the channel [20:33] jed_ has joined the channel [20:38] JimBastard: so i've prepared my 12 slides for scurvyconf. 4 of the 12 slides are dedicated to just drinking beer [20:38] JimBastard: voodootikigod_ [20:39] rictic has joined the channel [20:40] fizx has joined the channel [20:42] derbumi has joined the channel [20:45] _ry: i merged openssl [20:47] gwoo: ooooooo [20:53] tav has joined the channel [20:58] JimBastard: sup gwoo [20:58] gwoo: yo yo [20:59] JimBastard: ive been pushing lots of changes to hook.io over the past few days, will be continuing [20:59] JimBastard: stable version is getting close [20:59] gwoo: i noticed. thats awesome [20:59] JimBastard: feel free to drop me an message here on github if you have any questions or comments [21:00] JimBastard: or on* [21:00] JimBastard: i could defintely use some help >.< [21:02] gwoo: im gonna put in some more this weekend [21:05] nefD: JimBastard: Would it be possible to setup a hook on hook.io that monitors for changes to the modules list page of the node wiki on github? :}D [21:06] JimBastard: nefD: hook.io can poll static resources for changes [21:06] JimBastard: so, yes [21:06] nefD: wewt [21:06] JimBastard: i still need to polish up some of the Timer protocol though, thats the core protocol for doing polling [21:06] nefD: ah, gotcha [21:07] JimBastard: but polling static resources for changes is one of the core features [21:07] JimBastard: a web page, a rss feed, etc [21:07] nefD: awesome [21:07] nefD: as it stands, its somewhat difficult to stay abreast of what new node modules become available [21:09] mjr_: _ry: great news on ossl. [21:09] fizx has joined the channel [21:15] hellp has joined the channel [21:18] isaacs has joined the channel [21:19] derbumi has joined the channel [21:21] mattly has joined the channel [21:22] javajunky has joined the channel [21:30] admc has joined the channel [21:33] siculars has joined the channel [21:39] _ry: ACTION wishes felix were ehre [21:40] bmizerany has joined the channel [21:40] bmizerany has joined the channel [21:43] aho has joined the channel [21:44] shirro has joined the channel [21:46] orlandov has joined the channel [21:46] N` has joined the channel [21:49] quirkey has joined the channel [21:49] ivan has joined the channel [21:51] jbrantly has joined the channel [21:52] fictorial: kriskowal: haha [21:52] kriskowal: fictorial ? [21:52] fictorial: the unix 2038 comment [21:52] fictorial: ACTION was reading scrollback [21:53] kriskowal: ah, yeah. i would apologize, but it wouldn't be sincere. [21:53] fictorial: heh [21:53] sveisvei has joined the channel [21:53] dnolen has joined the channel [21:54] kriskowal: alternate spelling of epochalypse: ragnaclock [21:56] mattly: epochalypse? awesome, hadn't heard that one before [21:57] fictorial: unix epoch time "runs out" in 2038 [21:58] fictorial: http://en.wikipedia.org/wiki/Year_2038_problem [21:58] mjr_: I can't tell if I want to still be using Unix in 2038 or not. [21:58] mjr_: I guess I do. [21:58] fictorial: you might not but it'll certainly be around [21:59] mjr_: Unless something newer and substantially more amazing comes along. [21:59] tjholowaychuk: creationix: what was the thought behind not having nvm as an executable again? that had something to do with you running multiple versions? [21:59] _ry: i think we can switch to 64 bit by then [21:59] fictorial: _ry: yep [21:59] kriskowal: yes, there won't be a problem. most unicies have already made the switch. [22:00] kriskowal: it's just fun to make hyperbole [22:00] mjr_: tjholowaychuk: He wants to change the PATH variable in the current environment, which can only be done by shell code within your interactive shell. [22:00] fictorial: hyperbole is the best thing ever! [22:00] _ry: sing a (signed) 64-bit value introduces a new wraparound date that is over twenty times greater than the present age of the universe: approximately 292 billion years from now, on Sunday, December 4, 292,277,026,596 AD. [22:00] _ry: heh [22:00] _ry: yes! [22:01] mjr_: yeah, but what about when THAT runs out. [22:01] fictorial: here, buy it as a shirt: hyperbole is the best thing ever! [22:01] tjholowaychuk: hahaha [22:01] fictorial: http://www.mentalfloss.com/store/product.php?productid=16291 [22:01] _ry: mjr_: yeah, then we'll be really fucked [22:01] dgathright has joined the channel [22:01] mjr_: surely they could have gone with an unsigned version for another power of 2. [22:01] kriskowal: _ry, yeah. heat death of the universe probably coincides exactly. [22:02] _ry: i'm pretty sure we'll never see 128 bit computers [22:02] _ry: i can't imagine that [22:03] mjr_: I said that about 64 bit computers when I was using my commodore 64. [22:03] kriskowal: i said that about five minutes ago about being hungry [22:03] mjr_: Imagine how many instructions you could pack into just one address! [22:03] kriskowal_ has joined the channel [22:04] _ry: hypothetically - say you were going to give a talk on node - in, say, 2 days [22:04] kriskowal: the opcode for "hello world" would be "hello world" [22:04] quirkey__ has joined the channel [22:04] fictorial: haha [22:04] _ry: what would you, hypothetically, talk about ? [22:04] mjr_: _ry: this sounds too bizarre to contemplate. Can you come up with a more realistic scenario? [22:04] kriskowal: well, for one, i'd ditch slides as a medium [22:05] kriskowal: i'd go with improv a'capella [22:05] mjr_: free-form jazz exploration [22:05] kriskowal: i would probably also dress as a pirate [22:05] kriskowal: no reason [22:05] nefD: a la spinal tap? [22:05] kriskowal: it might not be necessary to sell the world on async io at this point. [22:05] mjr_: nefD: reference matched! [22:06] nefD: ACTION gains +12 xp! [22:06] mjr_: _ry: do you have a list of candidate topics that you've been thinking about? [22:07] _ry: no [22:07] _ry: hm.. going to do some benchmarks [22:07] _ry: graphs are always pleasing [22:08] _ry: cheap thrills [22:08] kriskowal: meh. [22:08] kriskowal: arcane technical details are awesome. [22:09] mjr_: You could talk about your new Buffer stuff and how you use it in node. [22:09] dgathright has joined the channel [22:09] kriskowal: _ry has anyone talked to you about the commonjs panel? [22:09] kriskowal: a roadmap would be good. [22:10] _ry: kriskowal: yeah [22:10] _ry: no no one has talked to me [22:11] kriskowal: i'm a bit in the dark about who's on it and how panel's work [22:11] _ry: me too [22:11] kriskowal: *panels [22:11] _ry: kriskowal: i've been slowly moving to your buffer/e api [22:12] tlrobinson: voodootikigod_ is in here... he should know [22:12] mjr_: I have yet to attend a panel that wouldn't have been better done as a series of short talks. [22:12] _ry: kriskowal: i need to do the s/slice/range/ [22:12] _ry: which i think is a good term [22:12] kriskowal: oh yeah? i thought slice was in there already. [22:12] kriskowal: oh, i see. [22:12] _ry: for the buffer slices [22:12] _ry: no copy slices [22:12] kriskowal: yeah, i looked at copy too… copyFrom can be done in purejs, i have a patch in the works [22:13] _ry: copy i have already [22:13] kriskowal: yeah, i saw [22:13] kriskowal: i did a switch for memcopy and memmove in my impl. not sure whether that would be beneficial for non-overlapping performance. [22:14] kriskowal: i also have a fill implementation i will probably make a patch for [22:14] _ry: the big problem i have these says is how to write(string, 'utf8') [22:14] _ry: but find out how many chars were written [22:14] kriskowal: unfortunately, the changes to node's bootstrapping necessitate a complete rewrite of the narwhal+node bootstrapping [22:14] _ry: and how many bytes [22:15] kriskowal: (so i'm a little behind on tracking node/HEAD) [22:15] kriskowal: yeah, i'm not sure how you would do that with the api provided by v8 [22:15] _ry: var bytesWritten = buffer.write(string, 'utf8', 12) [22:15] javajunky: ughhh finally finished updating my howtonode article ;) painful ! [22:15] dgathright_ has joined the channel [22:15] _ry: i recently patched v8 to give me both values [22:15] kriskowal: ah, i see. [22:16] kriskowal: well, the more useful value to return on buffer.write is the bytes written [22:16] kriskowal: for sure [22:16] kriskowal: m. yeah, troublesome [22:16] _ry: (http://codereview.chromium.org/1539013) [22:16] kriskowal: my iconv wrapper returns an object with a bunch of data [22:17] _ry: what i'm doing at the moment is storing the charsWritten as a secret variable in the Buffer class [22:17] kriskowal: the source buffer terminal offset, the target buffer terminal offset, characters transcoded, and an error if one occurred [22:17] _ry: Buffer._charsWritten [22:17] N`: haha, one of my workmates is a fan of _ry : https://twitter.com/OriPekelman/statuses/12246843319 [22:17] _ry: ^-- value of the last write(string,'utf8') [22:18] _ry: N`: oh ;) [22:18] kriskowal: transcoding is tricky. [22:19] kriskowal: particularly when it's not string to string, where you are guaranteed that it's either complete or an error [22:19] kriskowal: _ry i also figure, and need to verify, that iconv is available pretty much everywhere, so it wouldn't be an external dependency to track. [22:20] stevestmartin has joined the channel [22:21] gf3 has joined the channel [22:21] _ry: yeah, but i don't want to add that.. not right now [22:21] kriskowal: yeah, i follow [22:21] _ry: encoding/decoding utf8 solves 99% of problems [22:21] kriskowal: a similar api would probably be in order though [22:22] kriskowal: i mean, the api for wrapping iconv probably ought to have something in common with the api for transcoding utf8 [22:22] _ry: it might make sense for buffers to have a head [22:22] kriskowal: and i don't have specific ideas. but there are a lot of inputs and outputs for transcoding. [22:23] _ry: everywhere i've used them, i've been had to add a buffer.used member [22:23] _ry: to keep track of where i'm writing [22:23] kriskowal: it would make sense for a buffer-backed stream to have a head. [22:23] _ry: because if buffers had heads, then you could find out how many bytes were written [22:23] kriskowal: there need to be separate layers for those [22:23] _ry: by looking at the offset of the heads [22:23] _ry: and write() could return the characters written [22:24] _ry: like maybe jsut something free form. buffer.head - it gets updated when you write to it [22:24] _ry: but users are free to do, buffer.head = 0 [22:25] kriskowal: i highly recommend wrapping a dumb buffer with an io object. [22:26] dgathright has joined the channel [22:27] kriskowal: _ry here's an io wrapper for a buffer http://github.com/kriskowal/narwhal-lib/blob/narwhal-lib/lib/narwhal/encodings.js#L47 [22:27] kriskowal: if you expose a utf8 transcoder object instead of a general iconv transcoder, it would work for the utf-8 case. [22:27] softdrink: Flash makes me want to strangle myself [22:28] kriskowal: softdrink, ever seen MFC? [22:28] sh1mmer has joined the channel [22:29] softdrink: nope. and i never intend to hehe [22:30] kriskowal: yeah, that's kinduh how i feel about Flash. [22:30] kriskowal: most abominations can be survived simply by ignoring them for a sufficiently long time. [22:30] kriskowal: like, netscape 4.7. [22:31] softdrink: IE is one of those abomination exceptions :( [22:31] quirkey has joined the channel [22:31] kriskowal: the sin that enabled the meteoric rise of ie6 [22:31] mjr_: Windows more than IE is the thing that we all wish would go away by ignoring it. [22:32] softdrink: i mean seriously, why the hell did they make play() and play2() functions?! [22:33] softdrink: that's insanely unprofessional and not descreptive [22:33] charlesjolley_ has joined the channel [22:34] dnolen has joined the channel [22:34] creationix has joined the channel [22:51] xla has joined the channel [23:02] creationix has joined the channel [23:03] kriszyp has joined the channel [23:04] RayMorgan_ has joined the channel [23:08] Tim_Smart has joined the channel [23:18] felixge has joined the channel [23:18] felixge has joined the channel [23:20] hassox has joined the channel [23:35] jed_ has joined the channel [23:38] xla has joined the channel [23:42] sh1mmer has joined the channel [23:44] jherdman has joined the channel [23:54] cloudhead has joined the channel [23:57] RayMorgan has joined the channel [23:57] RayMorgan has joined the channel