[00:03] hassox_ has joined the channel [00:06] chakrit has joined the channel [00:09] DamZ has joined the channel [00:11] DamZ: good evening! [00:12] erichocean: yo [00:14] DamZ: I have been looking at writing a mongodb module for nodejs [00:14] DamZ: it should not be *that* hard now that mongodb itself supports v8 [00:14] erichocean: someone else started on one [00:14] erichocean: search GitHub [00:15] erichocean: he announced in the last couple of days [00:15] DamZ: oh, awesome [00:17] DamZ: http://github.com/sidmitra/node-mongo/ is there, but empty [00:17] orlandov: DamZ: github.com/orlandov/node-mongodb [00:17] orlandov: it's nowhere near useable though [00:17] DamZ: great [00:17] orlandov: DamZ: patches welcome though :D [00:17] chakrit has left the channel [00:19] DamZ: orlandov: interesting approach... I started working on the other side first... ie. exporting the mongo javascript shell to nodejs first [00:19] DamZ: apparently you started working on the evented side first [00:20] orlandov: DamZ: oh interesting, how did you go about doing that? got a repo up? [00:20] DamZ: orlandov: are you aware that there are several pieces available in the mongodb repository itself? [00:20] orlandov: DamZ: wdym? [00:20] DamZ: orlandov: in scripting/ there is a v8 "engine" for MongoDB [00:21] orlandov: oh no way? really? [00:21] orlandov: wow [00:21] orlandov: ACTION facepalms [00:21] DamZ: orlandov: http://github.com/mongodb/mongo/tree/master/scripting/ [00:22] hassox_ has joined the channel [00:22] DamZ: orlandov: so I got that to compile as a nodejs module, but I bumped into an interesting challenge [00:23] orlandov: DamZ: i mean, ostensibly i did it to learn how to write evented C++ with node, but had i known this existed i probably would have done it quite differently [00:23] DamZ: orlandov: mongodb has some javascript initialization code that is written under the assumption that the Mongo object is top-level, I'm trying to figure out a way to run that into a sandboxed v8 context [00:23] orlandov: ah gotcha [00:24] orlandov: looks like the network code is blocking still [00:24] devyn has joined the channel [00:24] devyn has left the channel [00:24] orlandov: even so, probably a bunch of this could be reused... [00:24] orlandov: well thanks for the pointer =) [00:24] DamZ: orlandov: yep, it is [00:25] hassox: yay [00:25] hassox: master is fixed! [00:25] DamZ: I need to understand how v8::Context works before going further [00:26] orlandov: they seem to be using the C++ bindings too (i went with the C bindings) [00:26] orlandov: nice and they have all the bson <--> js conversion reoutines [00:27] DamZ: orlandov: yeah, that's one of the tricky (and dumb) parts [00:30] bryanl has joined the channel [00:35] inimino: does anyone else see ridiculous numbers of duplicate messages on the mailing list? [00:37] aurynn: I'm seeing that, yeah [00:53] jamiew has joined the channel [00:56] rtomayko has joined the channel [00:56] hassox has joined the channel [01:02] rictic has joined the channel [01:05] jed has joined the channel [01:15] erichocean: does anyone have node.js running with OpenSSL? [01:22] micheil has joined the channel [01:22] scudco1 has joined the channel [01:22] chakrit has joined the channel [01:26] dnolen_ has joined the channel [01:33] chakrit: Looking at http://github.com/ry/node/issues/closed/#issue/28 [01:33] chakrit: Can't get it to work w/ connection: close ... [01:34] chakrit: res.sendHeader(200, { "connection": "close" }); res.finish(); right? I'm I doing something wrong? [01:35] micheil: ryah: are you still about? [01:36] mcarter has joined the channel [01:36] jamiew has joined the channel [01:42] micheil: why do you want to send a connection closed header? [01:42] micheil: chakrit: ^ [01:43] chakrit: micheil: To close the connection? res.finish() left wget hanging [01:43] micheil: oh [01:43] chakrit: micheil: I'm using this code: http://github.com/ry/node/issues/closed/#issue/28 [01:43] chakrit: and wget 0.0.0.0:8000 will gets all the bytes but will then wait for timeout [01:44] chakrit: I can't get it to properly close the connection [01:44] chakrit: sometimes the connection would close but then there'd be repeated data from the buffer in there... like an extra 60bytes or something [01:45] micheil: you might need to use correct case.. I'm not sure though [01:45] micheil: res.sendHeader(200, {"Connection":"close"}); [01:46] micheil: actually, the Connection head is for requests [01:47] chakrit: what's the proper way to do it? [01:47] micheil: not sure [01:47] micheil: there might be a flag in wget for it [01:47] micheil: (I have to install wget first) [01:47] chakrit: oh [01:48] micheil: that'll be a little while, because I'm building v8/d8 at the same time [01:49] chakrit: I'm here allday :) [01:49] micheil: try wget --no-http-keep-alive 0.0.0.0:8000 [01:49] chakrit: This is what I got if I send {"Connection":"close"} http://gist.github.com/262250 curl also says there's a problem [01:50] micheil: umm.. [01:50] micheil: so.. what's the first and last wget's? [01:50] chakrit: ok wget --no-http-keep-alive works [01:50] chakrit: but if I *don't* send connection close [01:51] chakrit: vanilla code from the issue works w/ no keep-alive [01:51] hassox: ryah: aboot? [01:51] hassox: micheil: what is this d8? [01:51] hassox: I'm trying to work out how to get the debug statements [01:51] hassox: to print [01:52] chakrit: micheil: first and last? [01:52] micheil: hassox: It seems to be v8's remote debugger [01:52] hassox: micheil: I'm able to set the connection close header to the client without issue :| [01:53] chakrit: Not sure what ry means by "Send the "connection: close" header with the response" [01:53] hassox: it doesn't sort the problem [01:53] micheil: I'm not sure tbh [01:53] hassox: micheil: http://gist.github.com/262257 [01:54] hassox: that's what I'm putting into chain in response to ryahs suggestion [01:54] hassox: it seems to work pretty well [01:55] micheil: I haven't really been doing much with the http server parts of node, been to busy working on sessions and smtp [01:55] hassox: oh you're working on smtp :) [01:55] hassox: awesome [01:56] micheil: yeah, although, I've hit a possible snag on servers which require STARTTLS [01:56] hassox: so will it be something that accepts emails and raises appropriate events? [01:56] micheil: no [01:56] micheil: it sends emails [01:56] micheil: SMTP = Simple Mail Transfer Protocol, remember [01:58] micheil: to quote someone: "SMTP is to send mail, not receive." [01:59] hassox: oh right [01:59] hassox: le sigh [01:59] hassox: was hoping for somethign that receives emails too ;) [01:59] hassox: sending is good too though :) [01:59] hassox: micheil: yeah [01:59] hassox: but it'd be awesome to have a bit of kit that recieved emails in my apps that I could listen to as wel ;) [01:59] micheil: hassox: for receiving, you'd need to use POP3 or IMAP [01:59] hassox: ah k [01:59] hassox: yeah [01:59] hassox: those [02:00] hassox: what I really want to do is setup postfix to relay to my node instance [02:00] micheil: and quite frankly, after reading the IMAP spec, I won't be doing those [02:00] hassox: hrm [02:00] hassox: I wonder how eventmachine does it [02:00] hassox: it has an smtp server class that can receive emails and act on them [02:04] micheil: hassox: yeah, ruby has Net::SMTP, Net::POP3, Net::SMTP [02:04] hassox: nah [02:04] micheil: although, each are blocking and synchronous [02:04] hassox: not those ones [02:05] hassox: ruby EventMachine has an smtp one that is not blocking [02:07] hassox: http://github.com/eventmachine/eventmachine/blob/master/lib/em/protocols/smtpserver.rb [02:07] hassox: micheil: ^ ^ [02:09] micheil: you could port something like this out.. http://capturedsparks.com/entries/26-receiving-emails-with-ruby-on-rails [02:09] hassox: I've set that up in ruby event machine to recieve emails and save to the database [02:09] micheil: is there a non blocking IMAP implementation? [02:10] hassox: I don't know [02:10] hassox: micheil: that's not ideal [02:10] micheil: yeah, true [02:11] hassox: ideally I'd include an smtp server relay point inside my node event loop [02:11] micheil: of shit. [02:11] hassox: and setup a listener on it [02:11] micheil: I did it again. [02:11] hassox: what? [02:11] micheil: SMTP != IMAP [02:11] hassox: lol [02:11] hassox: it's just a relay point... something to point postfix at [02:11] micheil: hassox: if you look at the git logs for http://github.com/Miksago/node.js-smtp you'll see everything changed names [02:12] hassox: so it's the server implementation that's needed... we just happen to be consuming it in our application rather than putting it into a mailbos [02:12] hassox: box [02:12] inimino: chakrit: you around? [02:12] chakrit: inimino: yup [02:12] inimino: chakrit: the problem is that wget sends connection: keep-alive but is actually an HTTP/1.0 client [02:13] chakrit: inimino: Oh, I understand now what ry means now, thx :) [02:13] inimino: chakrit: unfortunately node obeys the keep-alive and also sends transfer-encoding chunked data back to wget [02:13] inimino: which is broken, and wget doesn't handle it [02:13] chakrit: yah [02:13] micheil: hassox: I suppose for recieving mail, I could use childProcesses, or ry's newer worker threads (when they come) [02:14] hassox: micheil: why not just mount it inside the same node [02:14] hassox: then listeners can be applied [02:14] micheil: to quote: [02:14] micheil: The only production worthy way to receive emails is to have an email daemon that constantly runs in a loop and uses net/imap or net/pop3 to poll the email servers for messages in a loop. [02:14] micheil: The way they show of using email piped into script/runner is useless because it has to fork a full rails process for each email and then just throw that away. As soon as you start to get any amount of email this solution falls on its face and your servers will hate you for it. [02:14] micheil: source: http://railspikes.com/2007/6/1/rails-email-processing [02:14] hassox: micheil: you can mount a full email deamon inside node [02:14] hassox: and run a full http one too [02:15] hassox: you can run two http servers inside node [02:16] inimino: you are suggesting running an SMTP server rather than a POP3 client, no? [02:16] micheil: if I write something like: Mailer = require("lib/mailer"); Mailer.start(); // forks of a new process of Node to handle a constant mail recieve loop [02:16] micheil: no [02:16] micheil: I'm currently writing an SMTP client, to send mail to an SMTP Server [02:17] micheil: but I may write something to handle POP3 or IMAP coming into the server [02:17] inimino: push is better than polling [02:17] inimino: oh, ok [02:17] jamiew_ has joined the channel [02:17] micheil: push is better then polling, but how do you push from something like a direct interface with POP or IMAP? [02:18] inimino: are you writing some sort of webmail? [02:18] micheil: no [02:18] micheil: just some general libraries [02:18] inimino: I was suggesting you'd set up an SMTP server and configure your incoming mail hub to forward to it [02:18] hassox: micheil: http://gist.github.com/262267 [02:18] micheil: because face it, most websites with some level of interactivity require user accounts, which in turn generally require email [02:19] inimino: well, ok... [02:19] inimino: depends on what you need it for :-) [02:19] hassox: I would like to be able to receive and send form inside node [02:19] hassox: inside my app [02:19] hassox: micheil: no reason why one of those couldn't be a mail server [02:19] hassox: no need to fork [02:20] binary42 has joined the channel [02:20] inimino: micheil: sure, but you certainly don't need a POP3 client for that [02:20] micheil: the only problem with doing it with an SMTP server is that you need to run an SMTP or IMAP or POSTFIX server [02:20] hassox: right [02:20] hassox: which I would do [02:20] inimino: that's pretty much the case for any serious service anyway [02:20] micheil: but most probably won't want to do that [02:20] hassox: since it's made for it it'll handle re-devlieries and stuff that I don't care about [02:20] hassox: most what? [02:20] micheil: people [02:20] hassox: why not [02:21] hassox: I don't know of anywhere where that is currently possible [02:21] hassox: that you can setup an in loop mail relay that can recieve email and emit an event directly to your app [02:21] hassox: that's pretty freakin awesome stuff [02:21] hassox: especially when you couple it with websockets [02:22] hassox: although it could get tricksy with those [02:22] hassox: but it's the potential that has me excited [02:22] chakrit: inimino: Shouldn't node handles the case automatically? detect keep-alives? [02:22] inimino: chakrit: yes [02:22] chakrit: inimino: So it's still a node bug right? [02:23] chakrit: mmm let's see what I can do.. [02:23] inimino: chakrit: yes, I'd have submitted a patch by now but I've been busy with other stuff [02:23] inimino: yay! :) [02:23] micheil: I'm gunna work on getting the sending part working first [02:23] hassox: micheil: indeed [02:23] micheil: I think that's the more used currently over the receiving in most web apps [02:23] hassox: I'm just excited about what's actulally possible [02:24] hassox: agreed [02:24] hassox: doesn't mean that receiving is not useful though ;) [02:24] micheil: true [02:24] micheil: look at posterous [02:25] hassox: interesting app [02:31] eddanger has joined the channel [02:38] jspiros has joined the channel [02:38] jamiew: IMAP IDLE allows you have a push connection of somekind [02:38] jamiew: rejoining the "lets make posterous" conversation :) [02:39] alex-desktop: jamiew: indeed it does; I get emails within 10-15 seconds of the other person sending them. [02:39] jamiew: yeah it's quite... freaky :) [02:39] hassox: an imap mailbox is for an address though right? [02:39] hassox: what if you want to receive many addresses? [02:40] hassox: like every person@yourdomain.com [02:40] jamiew: good question. I'm not sure if a catch-all fwd might play dice with that [02:40] jamiew: it'd add another layer of course [02:40] hassox: I just want a mail relay that I can point postfix at [02:40] hassox: that lives inside my node [02:41] hassox: bbiab [02:43] inimino: hassox: just write an SMTP server, it's easier than writing an IMAP client [02:44] jamiew: was going to say [02:45] jamiew: it does sound like what he wants is an SMTP server rather than a IMAP client plugged into an SMTP server via IDLE [02:48] inimino: yeah [02:58] leahculver has joined the channel [02:59] eddanger has joined the channel [03:14] Yuffster has joined the channel [03:27] leahculver has joined the channel [03:34] hassox has joined the channel [03:41] erichocean: the GNUTLS support in node.js has a bunch of issues; I do not recommend relying on it in production [03:51] Tautologistics has joined the channel [03:52] erichocean: note that gnutls is mostly fine (except for a known memory leak); it's the node.js interaction that's causing issues [03:54] micheil has joined the channel [04:01] rictic has left the channel [04:15] jamiew_ has joined the channel [04:25] chakrit: ok took me some time [04:25] chakrit: inimino: you still here? [04:33] chakrit: I suck at C but anyway, here's a fix for the keep-alive/connection close thing: http://gist.github.com/262306 can someone comment? [04:45] erichocean: did you test that with wget? [04:46] chakrit: yup [04:46] erichocean: hmm [04:51] Pilate has joined the channel [05:09] binary42 has joined the channel [05:16] Pilate has joined the channel [05:31] Tautologistics has joined the channel [05:32] keeto has joined the channel [05:33] aguynamedben has joined the channel [05:34] dnolen has joined the channel [05:38] JoePeck_ has joined the channel [05:46] isaacs has joined the channel [06:16] hassox has joined the channel [06:36] voxpelli-laptop has joined the channel [06:37] chakrit: hello? [06:38] RayMorgan has joined the channel [06:41] jamiew_ has joined the channel [06:43] micheil has joined the channel [06:46] micheil: chakrit: which patch? [06:46] chakrit: this one: http://gist.github.com/262306 [06:46] chakrit: lol, you saw my tweets? [06:47] chakrit: it fixes this: http://github.com/ry/node/issues/closed#issue/28 .. [06:48] isaacs: $ node http://github.com/isaacs/node-playground/raw/master/xmas.js [07:00] micheil: chakrit: I don't know if that patch would work [07:05] micheil: http_should_keep_alive defined on line 1426, deps/http_parser.c [07:08] chakrit: oh thanks [07:08] chakrit: looking at it now [07:12] jamiew has joined the channel [07:23] micheil: chakrit: so what was the problem? [07:24] micheil: and how many hello's should it print? [07:26] micheil: because I've just done: message_info->Set(should_keep_alive_symbol, (parser->flags & 0x0002) ? True() : False()); [07:26] micheil: replacing ln 280 of node_http.cc [07:32] micheil: chakrit: I'm not sure what you seem to think the error is [07:44] mcarter has joined the channel [07:45] chakrit: micheil: I think I understand the proble more now [07:46] chakrit: micheil: that should be the fix but I'm not sure if it's the right thing [07:46] micheil: chakrit: what's the problem first of all? [07:46] chakrit: the problem was that, if you don't specify Content-Length [07:46] chakrit: and wgets sends "Connection: keep-alive" [07:47] chakrit: it'll keep the connection 'alive' ... and won't close it even after response.finish() [07:47] chakrit: response.finish() should closes whatever connection [07:47] mcarter has joined the channel [07:47] chakrit: that's HTTP 1.0 spec I think [07:47] chakrit: to send the keep-alive thing [07:48] chakrit: so the fix was that, if a HTTP 1.0 client sends you a "keep-alive" you should sends "Connection: close" in the header to signify you're closing [07:48] chakrit: and not keeping it open indefinitely [07:52] hassox has joined the channel [07:54] micheil: oh right [07:54] micheil: and why would you not send a content-length header? [07:55] chakrit: when you don't know it [07:55] micheil: oh,okay. [07:55] mcarter has joined the channel [07:55] chakrit: so you should either send a connection:close or a content-length ... [07:59] chakrit: ACTION brb [08:13] hassox: lads [08:13] hassox: if I'm streaming to a client [08:13] hassox: how do I know if they disconnect? [08:14] hassox: is there an event I can listen out for? [08:18] chakrit: does request.complete works? [08:18] chakrit: just guessing [08:19] mikeal has joined the channel [08:20] qFox has joined the channel [08:20] hassox: I'll try it [08:22] hassox: no method [08:22] hassox: addeda listnere instead.. no good [08:22] hassox: :( [08:23] mcarter: hassox, given how tcp works, there's no true way to know the moment they disconnect... sort of depends on how they disconnect [08:29] keeto has joined the channel [08:30] hassox: so what do you do if you've got a connection that's streaming stuff [08:30] hassox: and they disconnect? [08:30] hassox: how do you clean up and remove listeners etc on that event [08:33] hassox: sorry [08:33] hassox: I missed any response [08:33] hassox: lost connection [08:33] hassox: ryah: thar? [08:37] sudoer has joined the channel [08:43] erichocean has joined the channel [09:21] qFox has joined the channel [09:33] xantus_ has joined the channel [09:49] felixge has joined the channel [09:52] inimino has joined the channel [09:52] mcarter has joined the channel [10:01] hassox has joined the channel [10:09] hassox: ryah: thar mate? [10:39] botanicus_ has joined the channel [10:46] chrisfarms has joined the channel [11:10] jspiros has joined the channel [11:30] spoob has joined the channel [11:31] ryah: hassox: hi [11:31] spoob: When I join chat.nodejs.org and look at XHR in Debugger, I see a stream of requests that indicate that WebSocket is not being used. Does node.js use WebSocket? [11:31] hassox: ryah: hey [11:31] ryah: spoob: the chat uses long poll [11:31] hassox: I've run into an issue and I wanted to go over it with you [11:32] spoob: ryah; is that just the chat, or does node.js itself use long poll? [11:32] hassox: I'm running a long open connection that's streaming constantly to the client [11:32] ryah: spoob: i think someone hsa created a websocket thing for node [11:32] hassox: buuutt... [11:32] ryah: spoob: node itself is more low-level [11:32] hassox: if the client closes the connection... how do I get notified of the event that the connection is closed so I can remove listeners and stuff [11:33] spoob: ok, thanks. I'm still working out what relates to what, so node.js is more about the event driven model [11:33] spoob: i had thought the socket being left open until socket.close() had indicated that node.js was absed on websocket itself [11:33] ryah: hassox: req.connection.addListener("close") ? [11:33] hassox: if (env.request.connection.readyState != "open") <-- how I'm checking atm [11:33] hassox: ryah: tried that... didn't work [11:38] ryah: hassox: hm.. [11:38] ryah: hassox: i think that should work [11:38] hassox: just tried it again... still not working :( [11:38] ryah: what about addListener("eof") ? [11:38] hassox: 1 sec [11:39] hassox: nope [11:39] hassox: I couldn't find one [11:39] ryah: are you sure the connection is actually being closed? [11:39] hassox: the only thing I could find was that the connection.readyState changes from 'open' to 'writeOnly' [11:40] hassox: I'm running it in curl watching server scroll, and receiving data [11:40] hassox: then I ctrl c the curl [11:40] ryah: that must happen with an "eof" event [11:40] hassox: the server keeps going [11:45] hassox: ryah: actually... looks like eof is being triggered... [11:45] hassox: something about my code isn't removing the other listener [11:48] felixge has joined the channel [11:52] hassox: ryah: quick q about listeners... I can't seem to remove it now [11:52] hassox: if i have [11:52] hassox: var theListener = myEmitter.addListener("foo", ....) [11:52] hassox: now I'm trying to do [11:53] hassox: myEmitter.removeListener("foo", theListener) [11:53] hassox: but it doesn't remove it :| [11:53] hassox: am I doing it wrong? [11:59] hassox: ryah: ? [12:03] ryah: hassox: yeah, you're doing it wrong [12:03] hassox: damn [12:03] ryah: but maybe i should change the symantics [12:03] mediacoder: hassox: addListener doesnt rturn the listener [12:03] hassox: no wonder it's not working ;) [12:03] hassox: ahh [12:03] hassox: so how do I get hold of the listener? [12:03] ryah: addListener("e", listener); [12:03] hassox: oh [12:03] ryah: removeListener(""e", listener) [12:04] mediacoder: hassox: thats basically your callbac function [12:04] hassox: so the "listener" is the fucnction [12:04] ryah: yeah [12:04] ryah: i should have addListener return the function [12:05] hassox: grr that hasn't worked :| [12:06] hassox: bah [12:06] hassox: I was doing it wrong again! [12:06] hassox: thanx for you help ryah and mediacoder :D [12:08] spoob: wow, this is painfully good stuff [12:09] spoob: I just ran a node.js ircd server by cut/pasting from a snippet. it's so painless [12:09] mediacoder: spoob: welcome to node :-) [12:10] spoob: the command line REPL is a killer app [12:11] spoob: I now have to look at jake again, as they seem to do the same things and node seems to do it better [12:11] micheil has joined the channel [12:11] spoob: jack, that is. as in the narwhal Rake clone [12:12] spoob: sigh. Rack, that is. [12:16] hassox: :( [12:17] hassox: I just spent all day explaining to my mates why a callstack based rack clone in node is imho not the right thing to do [12:17] ryah: hassox: do you still work at ey? [12:17] hassox: no mate [12:18] hassox: been away since july [12:18] hassox: are you still doing work there? [12:18] ryah: no [12:18] hassox: btw [12:18] hassox: you've caused me a great deal of sleep loss [12:18] micheil: moin all [12:18] ryah: hassox: :) [12:18] mediacoder: moin [12:18] hassox: I can't sleep from thinking about all the cool stuff node can do :D [12:20] ryah: its going to get better [12:20] hassox: ryah: indeed [12:21] hassox: I have something special I'm going to make a screencast of tonight [12:21] ryah: got funding and lots of ideas [12:21] hassox: I'd love your feedback on chain if you have got a chance [12:21] hassox: :O [12:21] ryah: but more about that later :) [12:21] hassox: that's awesome [12:21] hassox: congratulations! [12:21] micheil: ryah: hmm... I noticed that there wasn't much by the looks on initiating a secure connection, is that not available yet or is it coming? [12:21] micheil: hey, congrats on the founding [12:21] micheil: *funding [12:22] mediacoder: ryah: awesome..congrats [12:23] hassox: ryah: that's making me even more excited about node! [12:24] ryah: micheil: i think it's there but it's hacky and you'll have to discover it yourself [12:24] ryah: micheil: look in the tests, there is an example [12:24] micheil: okay [12:24] ryah: micheil: test/mjsunit/test-tcp-tls.js [12:24] micheil: ryah: I'm needing it so that I can work more on the smtp libs, the only mail server I have access to is gmail, and that requires ssl/tls [12:25] ryah: micheil: be warned, that api may change dramatically in the near future [12:25] micheil: yeah [12:25] micheil: I just want to get a proof of concept working [12:27] micheil: ryah: I suppose when you rewrite some of the http/tcp stuff, that you'll implement error events? [12:27] micheil: (I think you mentioned you were going to be rewriting it) [12:27] ryah: yeah [12:28] micheil: ryah: currently I've crudely hacked it in, but just so that I had some idea of what was happening [12:29] micheil: (turned out the server I was using didn't actually have an smtp server running >_>) [12:33] micheil: ryah: Is it possible to have added in at some stage a variable into say process, something like: process.has_tls? [12:33] hassox: haha [12:34] hassox: I just read that as process.has_tits [12:35] micheil: haha, could be interesting [12:36] micheil: hmm.. [12:37] spoob: so if I have the picture right, node.js and narwhal are both based on CommonJS, but they [12:37] spoob: are covering the same area and competing [12:40] micheil: spoob: yeah, last I knew (I may be wrong) but narwhal was not evented like node [12:40] spoob: I found this from one of the Narwhal authors, that suggests using Node as the engine for Narwhal. http://groups.google.com/group/narwhaljs/msg/c0c9abdcb3d86a58 [12:44] felixge has joined the channel [12:48] spoob: Does node.js have a WebDAV server? [12:51] micheil: ryah: do you know of anyway for me to get the required PEM file that setSecure would need? [12:59] ryah: micheil: not off the top of my head [12:59] ryah: spoob: no, but you could write on in node [13:01] bryanl has joined the channel [13:17] alex-desktop has joined the channel [13:19] DamZ has joined the channel [13:25] jspiros has joined the channel [13:26] DamZ has joined the channel [13:26] alex-desktop has joined the channel [13:26] bryanl has joined the channel [13:26] felixge has joined the channel [13:26] micheil has joined the channel [13:26] spoob has joined the channel [13:26] chrisfarms has joined the channel [13:26] botanicus_ has joined the channel [13:26] hassox has joined the channel [13:26] inimino has joined the channel [13:26] xantus_ has joined the channel [13:26] qFox has joined the channel [13:26] erichocean has joined the channel [13:26] mikeal has joined the channel [13:26] JoePeck_ has joined the channel [13:26] Tautologistics has joined the channel [13:26] Pilate has joined the channel [13:26] Yuffster has joined the channel [13:26] chakrit has joined the channel [13:26] aurynn has joined the channel [13:26] oleg has joined the channel [13:26] halorgium has joined the channel [13:26] evilhackerdude has joined the channel [13:26] sztanpet has joined the channel [13:26] Connorhd has joined the channel [13:26] voodootikigod has joined the channel [13:26] shiftb has joined the channel [13:26] brandon_beacher has joined the channel [13:26] frodenius has joined the channel [13:26] mies has joined the channel [13:26] elliottcable has joined the channel [13:26] tlrobinson1 has joined the channel [13:26] Vito` has joined the channel [13:26] mjard has joined the channel [13:26] eviltwin has joined the channel [13:26] Biscuits has joined the channel [13:26] svei has joined the channel [13:26] CraigW has joined the channel [13:26] Hannan_ has joined the channel [13:26] jan____ has joined the channel [13:26] hornbeck has joined the channel [13:26] deanlandolt has joined the channel [13:26] RJ2 has joined the channel [13:26] erikcorry|away has joined the channel [13:26] beppu_ has joined the channel [13:26] iamstef has joined the channel [13:26] skampler has joined the channel [13:26] cadorn has joined the channel [13:26] orlandov has joined the channel [13:26] rudebwoy has joined the channel [13:26] rbranson_ has joined the channel [13:26] wil_ has joined the channel [13:26] thenduks has joined the channel [13:26] jazzychad has joined the channel [13:26] nefD has joined the channel [13:26] onar has joined the channel [13:26] tlockney has joined the channel [13:26] ashb has joined the channel [13:26] mikekelly has joined the channel [13:26] tlrobinson has joined the channel [13:26] erikg has joined the channel [13:26] martyn_ has joined the channel [13:26] rektide has joined the channel [13:26] [k2] has joined the channel [13:26] intellectronica has joined the channel [13:26] Atmoz has joined the channel [13:26] zimbatm has joined the channel [13:26] Sinjo has joined the channel [13:26] mediacoder has joined the channel [13:26] Sembiance has joined the channel [13:26] CIA-56 has joined the channel [13:26] tmpvar_ has joined the channel [13:26] ryah has joined the channel [13:26] spoob: This very minimal implementation of Websocket in node looks like it does what I want: http://github.com/alexanderte/websocket-server-node.js/blob/master/server.js [13:29] FoxFurry has joined the channel [13:30] ryah: $ node http://github.com/isaacs/node-playground/raw/master/xmas.js [13:30] ryah: ^-- i love this [13:31] Connorhd: heh, awesome [13:33] micheil: it is pretty cool [13:33] hornbeck: nice [13:38] micheil: ryah: with setSecure, will node ever request a ssl certificate from a remote server? [13:39] micheil: the tcp-tls tests show that setSecure as ("X509_PEM", pemFile, 0, pemFile, pemFile) [13:44] soveran has joined the channel [13:44] spoob: ryah; thank you for doing Node.js [13:59] kriszyp has joined the channel [14:09] svei: ryah: Congrats on funding =) [14:13] hassox: ergh this upload is taking forevz [14:14] micheil: because your internet plan got scaled? I dunno :P [14:14] micheil: hassox: I pay 120$AU/mo for internet, I exceed my bandwidth for the month, 15GB, and get scaled back from 8000Kbps to 56Kbps. [14:15] hassox: I live in the country [14:15] micheil: I do too. [14:15] hassox: so I have only 1.5Mbps [14:15] hassox: :) [14:15] hassox: micheil: don't go to sleep yet mate [14:15] micheil: I'd have 1.5Mbps, although, I paid more to get 8Mbps [14:15] micheil: hmm? [14:15] hassox: I'm uploading a screencast [14:15] micheil: ah [14:16] hassox: it demonstrates why I think callstack based stuff in node is evil [14:16] hassox: but I hope in a fun way [14:17] micheil: this makes me sad: d65a31e3e50863dfe88d [14:17] micheil: erm [14:17] micheil: https://gist.github.com/d65a31e3e50863dfe88d [14:17] hassox: which repo? [14:17] hassox: hehe [14:17] hassox: ACTION looks [14:17] micheil: it doesn't handle correctly [14:17] micheil: because there's no exact response code that STARTTLS should get back [14:18] hassox: are you putting out DEBUG with puts or debug()? [14:18] hassox: I can't get the debug statements to come out [14:18] micheil: no [14:18] micheil: I wrote my own wrappers for it [14:18] hassox: oh right [14:19] hassox: it's looking positive :) [14:19] micheil: you're sure about that? [14:19] hassox: not really [14:19] hassox: but it's doing stuff [14:19] micheil: true [14:19] hassox: that's gotta be good right? [14:19] micheil: more then what I had 1 week ago?> [14:21] hassox: 9.5 of 24.5 [14:22] micheil: okay... what the funk.. my queue parser is running faster then STDIO [14:24] n8o has joined the channel [14:28] hassox: 18.3 [14:28] micheil: hassox: I've actually got something that loads in all the colors for bash [14:28] hassox: ? [14:29] hassox: oh [14:29] soveran has joined the channel [14:29] hassox: you colorize ur output? [14:32] micheil: http://emberapp.com/micheil/images/terminal [14:32] hassox: micheil: http://screencast.com/t/ZDVkYmNmOT [14:32] hassox: oh nice :) [14:33] hassox: ryah: fyi mate http://screencast.com/t/ZDVkYmNmOT [14:33] micheil: hassox: is there a direct link to that? [14:33] hassox: sec [14:33] hassox: http://www.screencast.com/users/hassox/folders/Jing/media/8beab61b-9f77-4a7e-b74d-47ae39dc9595 [14:40] spoob: I get Error: No longer accepting filename extension in module names. when trying to run node_debug [14:41] Connorhd: it needs updating for the latest node [14:41] Connorhd: actually, it doesn't [14:41] Connorhd: which node_debug? [14:42] spoob: I just checked out from github [14:42] Connorhd: yeh, from which repo? [14:42] spoob: git clone git://github.com/ry/node_debug.git [14:43] Connorhd: thats out of date, try http://github.com/Connorhd/node_debug [14:45] spoob: OK, that gets a bit further, but pauses after static file jquery.treeview.async.js loaded and doesn't show anything in the browser [14:45] Connorhd: it should just be a gray bar at the top of the page [14:45] spoob: yes it is [14:45] Connorhd: thats it [14:45] spoob: ah [14:45] spoob: i can type into it [14:45] Connorhd: try typing "process;" in that box [14:46] Connorhd: or something like setTimeout(function () { debug.log("Hi") }, 5000); [14:47] spoob: That buffer is going to get very long! [14:48] Connorhd: buffer? [14:48] spoob: The contents of the browser window as the amount of output increases after typing commands [14:49] Connorhd: oh, I guess [14:49] Connorhd: you can just reload the page if it gets too much [14:49] spoob: Ah, it's keeping the values across reloads [14:50] Connorhd: anything you run is just eval'd [14:50] spoob: a = 5; a still equals 5 [14:50] Connorhd: yeh, since that'll affect the global scope [14:50] spoob: of all of node.js? [14:51] Connorhd: of that instance of node [14:52] spoob: wow, i can load up firefox and share values between safari and firefox [14:52] Connorhd: debug.log(obj) will output to all open consoles [14:52] spoob: ok, this is amazingly easy [14:53] spoob: now I need to find out how Node handles locking and exclusive access and all of the annoying things about concurrency [14:53] Connorhd: the idea is you include this in whatever project you are working on, then you can test stuff from the browser [14:53] Connorhd: there is no concurrency in node [14:53] spoob: well multiple browsers changing the same global variables [14:53] ryah: with no concurrency comes massive concurrency [14:53] Connorhd: :) [14:54] ryah: i think Laozi said that [14:54] hassox: so awesomely tru [14:54] spoob: I'm sitting here typing a = "hello safari" and then a = "hello firefox" in the different browsers. I can suddenly see how to use this for many clients at the same tim [14:55] spoob: so now I need to find out how not to have problems with many browsers changing the same variables [14:55] hassox: spoob: did you see my screencast on streaming a twitter stream to many clients? [14:55] hassox: from a single node [14:55] spoob: hassox; no, I've only really found Node.js in the last couple of hours. [14:55] hassox: I just posted a few minutes back ;) [14:55] hassox: 1 sec [14:55] hassox: http://screencast.com/t/ZDVkYmNmOT [14:55] hornbeck: hassox: nice video [14:56] hassox: hey hornbeck :) [14:56] hassox: th [14:56] hassox: thx [14:56] hassox: how are you dude? [14:56] hornbeck: good, you? [14:56] hassox: yeah pretty good :) [14:56] hassox: on holidays till new years now :D [14:56] hornbeck: nice, I'm on holiday until the 28th [14:56] hornbeck: took 2 weeks off [14:57] alexiskander has joined the channel [14:57] hassox: nice one [14:57] hassox: going away or staying home with the fam? [14:57] hornbeck: stayed at home [14:57] hornbeck: took the time to start learning js [14:58] hassox: yeah I've been reading a lot [14:58] hornbeck: between the nosql stores having js as a query language and node I figured it was a good time to really learn it [14:59] spoob: I'm having trouble focussing on the screencast as I keep noticing that you're using that horrendous editor... VIM [14:59] hornbeck: lol [14:59] Connorhd: not this discussion :( [14:59] hassox: yeah a stack of couchdb to node to browser seems very nice [14:59] mediacoder: i love the aussie dialect :-) [14:59] hassox: spoob: :P [14:59] ryah: /ignore spoob [14:59] ryah: :) [14:59] spoob: :) I use joe, so I'm an impartial bystander :) [15:00] hornbeck: hassox: yeah, I'm using couch pretty heavily at work and looking to tie node into some of it now as well [15:00] micheil: hmm.. [15:01] elliottcable: What’s up, all [15:01] hornbeck: yo [15:02] hassox: hey elliottcable [15:03] spoob: hassox; just to let you know, the top left of the windows say "Fuckwits, LOL" at the end of their output. :) [15:03] hassox: ? [15:03] micheil: man.. almost somewhere.. [15:03] hassox: oh [15:03] hassox: in the tweets? [15:03] spoob: hassox; watch your video,... yes. :) [15:03] hassox: haha [15:04] micheil: ACTION has to probably admit he uses textmate :P [15:04] hornbeck: I use whatever is handy at the time [15:04] micheil: I <3 arguments.callee >_> [15:06] micheil: hassox: you know how I had node repeating the STARTTLS command? well, turns out I wasn't unbinding the once running event [15:06] hassox: oh right [15:06] spoob: Connorhd; by the way, cool console if you're the author. :) Can the bar be at the bottom, with the buffer scrolling up? :) [15:07] hassox: I didn't realise what the problem was ;) [15:07] Connorhd: spoob, probably, would be more effort though so I haven't gotten round to it [15:09] micheil: getting somewhere once again: https://gist.github.com/d65a31e3e50863dfe88d [15:14] micheil: hassox: if you're interested: http://github.com/Miksago/node.js-smtp/blob/master/lib/bash_colors.js [15:16] hassox: churs :) [15:17] hassox: wonder how far the guys are away from a packaging system so we can start versioning these thhings and importing them as libraries [15:19] micheil: heh heh, no idea [15:19] mediacoder: there was npm, but looks like its discontinued [15:19] micheil: (just as a note, that bash colours is a hack, it's not tidy and should be used only for sanity.) [15:22] micheil: night chaps and ladies. [15:22] hassox: yeah me too [15:22] hassox: cya guys [15:24] micheil has left the channel [15:36] spoob: hassox; that's what the integration of node.js and Narwhal would provide [15:36] inimino: $ node <(curl -s http://github.com/isaacs/node-playground/raw/master/xmas.js) // one-liner [15:37] spoob: inimino; don't need the curl as node understands http addresses [15:38] inimino: wow, I had no idea [15:38] inimino: hm... nifty [16:01] sudoer has joined the channel [16:06] jcrosby has joined the channel [16:08] nua has joined the channel [16:09] binary42 has joined the channel [16:10] nua: nice work on v0.1.23, works great so far [16:15] elliottcable: holy crap, something inimino didn’t know! d-: [16:15] inimino: hehe [16:17] jed_ has joined the channel [16:52] leahculver has joined the channel [16:52] elliottcable: leahculver: Woah, seriously? [16:54] leahculver: elliottcable: what? [16:58] Connorhd has joined the channel [16:59] elliottcable: leahculver: Aren’t you quasi-famous or summat? [16:59] RayMorgan has joined the channel [17:00] elliottcable: leahculver: or related to Bryan, maybe. Hrm. [17:02] inimino: chakrit: I don't think that patch is quite right, but there is still a bug in node, I'll see what I can come up with... [17:04] elliottcable: Hrm. This is so odd. [17:05] mcarter has joined the channel [17:05] elliottcable: My HTTp chunking problems between Node.js and NginX just … solved themselves. For *no* apparent reason. [17:06] elliottcable: Didn’t update Node or NginX at all. Didn’t even restart the processes. [17:06] elliottcable: o_O [17:06] elliottcable: voodootikigod: fuck no it’s not! [17:06] voodootikigod: are you kidding [17:06] voodootikigod: so much better [17:06] elliottcable: voodootikigod: I mean, *all* of XKCD is pretty much unadulterated awesome. That’s a well-accepted fact. But seriously, the researcher translsations one is *more* so o_o [17:06] voodootikigod: all so i can watch a cat jump off a box [17:06] voodootikigod: i am god [17:07] voodootikigod: eh [17:07] elliottcable: eh. [17:07] voodootikigod: kinda dull :) [17:07] elliottcable: Dude, your name has god in it. We already know you are. [17:07] voodootikigod: haha [17:07] voodootikigod: but hte whole description through the stack [17:07] elliottcable: wtf is riak? [17:07] voodootikigod: be-au-tiful [17:08] voodootikigod: basho's erlang based nosql impl [17:09] elliottcable: Shit. I *love*, freaking, *love* closures. Especially JavaScript’s implementation! [17:09] elliottcable: JS, have my babies v.v [17:10] inimino: hehe [17:10] voodootikigod: haha [17:11] elliottcable: Srsly. Delicious omfg. [17:11] elliottcable: I can’t believe I was missing out on this for Ruby. [17:11] botanicus_: elliottcable: tell me about it, I can't imagine to work without closures. [17:11] elliottcable: Aren’t there some faithful-subset JS implementations floating around? Without `let`/`with`/`new`/? [17:12] elliottcable: Hrm, I suppose you couldn’t make a true subset without `new`, but I’d be willing to go for a true-subset-except-`new` eh [17:12] inimino: V8 doesn't have let [17:12] elliottcable: botanicus_: You unfollowed me. I’m so *hurt*! )-’: [17:12] botanicus_: elliottcable: yeah, you tweet too much, I don't have so much time mate ;) [17:12] spoob: Ruby has closures too [17:12] inimino: `with` is generally regarded as evil and probably going away eventually [17:12] elliottcable: botanicus_: pff [17:12] botanicus_: spoob: yeah, fortunatelly. Unlike python [17:12] elliottcable: spoob: Yes, that was a separate satement [17:13] elliottcable: s/sate/state/ [17:13] elliottcable: O_O python doesn’t have closures [17:13] voodootikigod: elliottcable: but ruby.. it has ... it has [17:13] elliottcable: Seriously, botanicus_? [17:13] elliottcable: voodootikigod: Oh, don’t get me wrong, I fucking love me some fuckin’ Ruby. [17:13] voodootikigod: slow running times that allow you think [17:14] Biscuits: elliotcable: What's wrong with new ? I can understand the hate against with and let, but new is pretty useful once you try anything object oriented... [17:14] voodootikigod: or get fucknut frustrated [17:14] inimino: Biscuits: ... what's not to like about `let`?? [17:14] elliottcable: voodootikigod: Language love goes something like this, for me: Io > Objective-C > Ruby > JavaScript [17:14] elliottcable: *maybe* switching Objective-C and Ruby, they’re really close to tied [17:14] voodootikigod: i can see io [17:14] voodootikigod: but ruby > JS? [17:14] elliottcable: but JS is so unique, with its lightness/embedability/Web presence… that it sort of wins, at least in my mind, right now [17:14] Biscuits: inimino: Well, I personally think it's ok, but I could live without it. Not so with 'new [17:14] Biscuits: ' though [17:14] voodootikigod: gotcha [17:15] voodootikigod: yea it has a beauty [17:15] elliottcable: Biscuits: http://github.com/elliottcable/poopy.js#readme [17:15] botanicus_: elliottcable: yeah, that's right, no closures in Python AFAIK [17:15] inimino: Biscuits: oh, I think the language would be improved without `new` [17:15] botanicus_: IMHO Ruby & JS are pretty similar [17:15] elliottcable: botanicus_: How can you have a high-level dynamic language … without closures. What the shit? [17:15] botanicus_: In many ways [17:15] elliottcable: Biscuits: (that language is my answer) [17:15] elliottcable: Biscuits: (sorry, s/language/link/) [17:15] Biscuits: inimino: Explain ? [17:16] elliottcable: Biscuits: `new` is a horrible, horrible construct [17:16] botanicus_: elliottcable: unfortunatelly Python (resp. Guido) doesn't like functional development, I would say. But I'm not so much familiar with Python nor with Guido, I just did some projects in Django (which is awesome BTW) [17:16] elliottcable: Biscuits: the inheritance system in JavaScript is beautiful. The `new` invocation pattern, and constructor system, are *not*. One of the worst things about the language, second only to the global variable namespace, IMHO. [17:17] inimino: Biscuits: constructors should just be functions that return an object, no magical keywords needed [17:17] Connorhd: python has closures [17:17] elliottcable: inimino: Personally, I’d prefer to see no constructors at all. [17:17] botanicus_: elliottcable: I like inherintance in JS,but what's so particularly great about new, it doesn't feel very prototype-ish [17:17] elliottcable: inimino: I like the idea that functions running one way act as constructors, and another way don’t—it really is in line with JS’s inherent stupidity (said in a good way; I like my languages simple and stupid) [17:18] Biscuits: inimino: If you see it as a sort of class (even though stricly it isn't) it makes sense, at least to me (coming from a C++ world) it feels pretty right :/ [17:18] botanicus_: Connorhd: really? I know it has lambda, but it's not real working lambda if it can have just one expression in it [17:18] inimino: elliottcable: you mean you would prefer that functions be forbidden from returning objects? [17:18] elliottcable: inimino: But I’d much prefer that that special invocation pattern be `foo.constructor = myFunc; foo.beget()` instead of `new(myFunc);` [17:18] inimino: Biscuits: yes, except it's not a class, and thinking of it that way leads to all sorts of confusion [17:18] elliottcable: botanicus_: That’s just it, There *are* no classes. [17:18] elliottcable: oops,Biscuits ^^ [17:18] Connorhd: botanicus_, I don't actually know python, but I'm fairly sure it has closures [17:18] botanicus_: elliottcable: exactly and it's why I don't very like the "new" in JS [17:18] Connorhd: http://ynniv.com/blog/2007/08/closures-in-python.html [17:19] deanlandolt: Biscuits: you're thinking of anon functions which yes, lambda's kinda crappy compared to js for -- but python does have closures [17:19] elliottcable: botanicus_: that’s the point of this entire discussion [17:19] inimino: Biscuits: it's precisely that misleading analogy that is one of the main complaints I have against `new` [17:19] Biscuits: Well, I've been thinking in classes for quite a while now, and it hasn't really bothered me :/ [17:19] elliottcable: botanicus_: you should look at my solution, http://github.com/elliottcable/poopy.js#readme [17:19] elliottcable: Biscuits: Which is exactly the problem! [17:19] elliottcable: Biscuits: JS lets you get away with completely not understanding its inheritance model, and that *pisses me off* [17:19] Biscuits: ? [17:20] botanicus_: Connorhd: hmm basically it seems you're right, but I wouldn't really use closures this way :) Much better in JS/Ruby [17:20] elliottcable: Biscuits: For instance, I had to go back about a month ago… and explain to the *person who originally taught me JavaScript*, my freaking *mentor*, how the inheritance system worked [17:20] Connorhd: I don't understand how else you can use closures [17:20] botanicus_: elliottcable: cheers [17:20] Booster has joined the channel [17:20] elliottcable: Biscuits: We’re talking about an amazing JSer here, mad skillz… and yet she’d gone *all this time* without understanding how it *actually worked* [17:21] Biscuits: elliotcable: Well, if JSs inheritance system allows you to use it as if it were classes, then why not let people ? [17:21] Connorhd: because its often less elegant [17:21] botanicus_: Connorhd: I mean [1, 2, 3].map { |i| do something } rather than def (with name of course!), then you can use it ... hmmm [17:21] elliottcable: Because it’s not JS. [17:21] elliottcable: There *is* no classist inheritance system in JS. [17:21] elliottcable: It is… a… *lie*. [17:21] Biscuits: ...? [17:22] elliottcable: So, people trying to use it that way, are using it *wrong*, and *will* run into problems when doing so. [17:22] Connorhd: botanicus_, ahh ok, I would assume you can do that kind of thing with lambdas in python though [17:22] elliottcable: Not to mention, they make life harder on the rest of us, if they release open-source libraries that act that way. [17:22] deanlandolt: elliottcable: it lets you roll your own system...and why is that so wrong? [17:22] Biscuits: If I've got two simple object-types, say circle and square, and I make a class named Shape, with two classes Circle and Square that inherit from em, what the hell am I doing wrong? [17:23] deanlandolt: for instance i'm a big user of persevere, which makes heavy use of classisms to model tables...it's _incredibly_ elegant and is still very javascriptish [17:23] botanicus_: Connorhd: otherwise I have nothing against python, it still quite nice language [17:23] elliottcable: Biscuits: Thinking classically. You *should* have a shape object, from which circle, square, and wtfelse inherits, and then from which themselves *other* things inherit. [17:23] dnolen has joined the channel [17:24] rtomayko has joined the channel [17:24] elliottcable: ACTION shrugs [17:24] Biscuits: elliottcable: To me this just sounds like "There's two ways of doing this, but I can't allow anyone using another method than the one I am using" [17:24] elliottcable: The truth is, I’m a classist guy. I grew up on Ruby and Objective-C, and they’re still my true loves. [17:25] elliottcable: But, when in Rome, do as the Romans: and when writing JS, write *as the language is made to be written*. [17:25] Biscuits: Basically you're thinking shape={}; circle={__proto__:shape}; circleInstance={__proto__:circle} ? [17:25] elliottcable: JS’s biggest single strength is its prototypal inheritance system, and it makes me *angry* that people using it would entirely throw that away, and go to all the trouble of creating an inferior, faked classist inheritance system in its place [17:26] Biscuits: To me it seems like Js was just written in a way to allow a whole range of different styles... [17:26] elliottcable: And it also makes me *angry* that the language allows enough classist idioms to encourage that, things like `new` and Constructor methods that blow up in your face if you mis-use them [17:26] Biscuits: You can go all imperative in it, but also quite functional (e.g. map/reduce/etc) [17:27] elliottcable: I think Object.create() officially existing will be a great thing for the language, people might actually start using it right. [17:27] dnolen has joined the channel [17:27] elliottcable: It’s not *my* cup of tea (I already implemented my own alternative, which I obviously prefer), but its goals very much align with my own. [17:28] elliottcable: Slightly-late disclaimer: I’m an opnionated asshole. You can safely ignore me (-: [17:29] inimino: it's not hard to do better than class-based inheritance [17:29] inimino: it's one of the most ineffective programming innovations of all time [17:29] elliottcable: inimino: Yes, but it’s also very old, and very practiced [17:29] inimino: especially as implemented in Java, e.g. [17:29] elliottcable: inimino: You can’t really get better at classism than Ruby [17:29] elliottcable: inimino: I’d *love* to see a really beautiful, considered prototypal inheritance system (Io gets pretty damn close) [17:29] RayMorgan_ has joined the channel [17:30] elliottcable: inimino: but at the moment, even if prototypal is better as a concept, no existing implementation holds water in comparison to Ruby’s inheritance system, IMHO [17:30] elliottcable: Also, I may be insane, but I really like Objective-C’s as well d-: [17:31] inimino: from what I've seen, Ruby just throws out most of the constraints that a class-based system is normally assumed to impose [17:31] elliottcable: hahaha [17:31] elliottcable: sounds about right d-: [17:31] elliottcable: I really love the Constants solution, too. [17:32] elliottcable: I think a federated-compilation-unit solution might be better, but I’ve not yet seen one; of the solutions to that particular problem that I’ve seen, I think the Constants system is the best [17:32] inimino: which I guess gets rid of the weaknesses, but basically it seems to me an admission that classes are just a failure, when you start with a model and then gradually remove all the constraints it imposed... [17:32] inimino: ...keeping only the nomenclature [17:32] gwoo has joined the channel [17:32] elliottcable: inimino: Sounds about right. [17:32] elliottcable: inimino: fact is, though, that it works really well. I do love it. [17:33] elliottcable: inimino: It’s a credit to prototypal inheritance, that JavaScript’s shitty-ass prototypal inheritance implementation is nearly as usable/‘good’ as Ruby’s nearly-perfect classist impl [17:33] inimino: true [17:33] Biscuits: inimino,elliottcable: is this similar to our style differences: http://pastebin.com/m7223f9d6 ? [17:33] elliottcable: to change topics slightly, Steve has been talking about a lua implementation of Io, to make it embeddable [17:34] elliottcable: I’m thinking a JS impl might be even cooler. [17:34] inimino: for prototypes done right I still haven't seen anything better than Self [17:34] elliottcable: Then you could write Io code with the same advantages as JS: embedability, presence in the client environment *and* serverside environment (with SSJS) [17:34] elliottcable: ACTION hasn’t actually used self [17:34] elliottcable: (gasp surprise what omg) [17:34] elliottcable: Biscuits: nope [17:35] inimino: Biscuits: not exactly, no [17:35] inimino: Biscuits: I don't think I've ever once used __proto__ [17:35] Biscuits: Could you write me an example on how you guys would've done that ? [17:35] inimino: short answer: I probably wouldn't [17:36] Biscuits: Ok, let's say you need a circle and square object, and they have quite a bit of overlapping functionality, how would you do that ? [17:36] inimino: I generally eschew inheritance altogether [17:36] elliottcable: Biscuits: http://github.com/elliottcable/poopy.js#readme - read that, there’s quite a few examples of my style [17:36] elliottcable: Biscuits: There’s a STYLE.markdown document, as well, but I haven’t pushed it yet. There’s a *lot* left to write. [17:37] elliottcable: Biscuits: That’s your problem. You’re coming from a classist background, and still think in terms of ‘what will I need’ instead of ‘what do I need’ [17:37] inimino: Biscuits: probably just add the same methods to each [17:37] elliottcable: Biscuits: The huge advantage of prototypal inheritance is when you don’t plan at all, you don’t come up with classes (or prototypes, or whatever) *beforehand*: You very simply make a useful object, and when you need another object that does the same things as *that* useful object, you inherit it from that object [17:38] jed_ has joined the channel [17:39] Biscuits: Oh well, to me 'new' has been pretty helpful, and I personally am quite fond of Javascripts ability to accompany a shitload of different styles. [17:39] elliottcable: ACTION shrugs [17:39] Biscuits: I am quite interested in other approaches though, could anyone link me to that "Self" library ? I've tried googling it, but I come up with nothing else than simple JS scripts that make self-closing windows :p [17:39] elliottcable: I’ve no beef with that. I *disagree*, but… it’s the way the language is. [17:40] elliottcable: If I were to write my own language based on JS, it’d be a *lot* stricter about things like that, because I believe the language should tell you how to program in it. [17:40] Biscuits: Well, Js allows you to program exactly in the way that you feel comfortable with, and it allows me to write in a way I am comfortable with. Why would you want to force *your* style onto me if I'm perfectly happy with my own :p? [17:40] elliottcable: Biscuits: Self is a programming language, a very old one. [17:40] elliottcable: Biscuits: One of the huge inspirations for both Ruby *and* JS, afaik [17:41] elliottcable: Biscuits: http://research.sun.com/self/ [17:41] Biscuits: You honestly think a language should force a style on the programmer ? [17:41] elliottcable: Biscuits: It should make the proper style obvious. Perhaps allow for flexibility, but make it difficult. [17:41] Biscuits: Nah, style is something each programmer, or possibly his/her employer, should decide for themselves [17:42] deanlandolt: elliottcable: i'm glad you're not on tc39 :) [17:42] elliottcable: Biscuits: There’s a *reason* multiple languages exist. Not *every* language should try to make itself useful to *every* programmer. [17:42] inimino: Biscuits: every language imposes a style, except maybe machine code :-) [17:42] elliottcable: deanlandolt: I have no desire to change ES to match my own tastes. I’d probably not accept a position on any of those standards committees even if it were offered to me [17:42] deanlandolt: elliottcable: js doesn't have that priviledge as the /only/ option in the browser [17:42] elliottcable: Biscuits: You honestly decide the employer should decide it!? [17:43] elliottcable: Biscuits: I think the programmer should decide it, and choose a language that works well with that style. [17:43] inimino: hehe [17:43] Biscuits: elliotcable: If in company you need to work together in a team, and team-members should be able to quickly grasp eachothers code, then yes, the company should impose certain style guidelines. [17:43] deanlandolt: explain how a programmer /chooses a language/ in the browser? [17:43] elliottcable: Biscuits: And I think the languages themselves should be specific and written for a specific kind of programmer; so that you know the people writing the libraries and packages you use in that language, all think in a similar way to yourself. [17:44] inimino: elliottcable: you know one of the things that Crockford did with JSLint was create a profile of JavaScript and then convince a lot of people that it is the 'correct' way to write JavaScript code [17:44] elliottcable: Biscuits: Which is exactly my point. I think it’s fairly unimportant that the code styles work together inside a company, but it is *ridiculous* important that they align within the source ecology, within the economy of packages and libraries that evolves within a language. [17:44] elliottcable: Biscuits: Mind you, I’m arguing, having grown up in Ruby… where there are eighty billion mature libraries for *every* task, and *every one of them* follows a different style. It’s a huge pain. [17:45] elliottcable: Biscuits: To me, the ideal language is the opposite: where you know that all of the people using it, all of the package authors and project designers, think in a very similar way [17:45] deanlandolt: elliottcable: your pain is my pleasure...i can only /hope/ server-side js gets as much love as ruby or python [17:46] elliottcable: deanlandolt: You must be a CommonJS dude /-: [17:46] deanlandolt: heh [17:46] deanlandolt: not everyone thinks the same way...and that's fine...but with a rich package ecology /i/ can cherrypick what fits me...that's far better than now, where we just don't have the packages we need [17:47] elliottcable: deanlandolt: See, we have the same overall goals [17:47] elliottcable: deanlandolt: I think every programmer does [17:47] elliottcable: deanlandolt: to have a rich ecology of packages they can use [17:47] deanlandolt: exactly [17:47] elliottcable: deanlandolt: The difference … is in our approaches: [17:47] deanlandolt: *can use being the optimal word [17:47] elliottcable: deanlandolt: In yours, you try to get a *huge* number of programmers, that think in every possible way, so that … somewhere, in that mass of people, will be some people who think like you, and write code that you can use [17:47] deanlandolt: you'll be able to use a subset of the overall packages available...i might use a different subset [17:48] elliottcable: deanlandolt: whereas I prefer to do it the other way around: only attract people who think like me, and thus are guaranteed to write stuff I can use / like [17:48] elliottcable: deanlandolt: Yes, and I want my language to *create* that subset; I don’t want to have to search for it myself. You see? [17:48] elliottcable: deanlandolt: Really, they’re two approaches to the same goal, and equally valid… [17:48] elliottcable: deanlandolt: … except for one problem, the problem that makes me choose my way over the Ruby way, your way: [17:49] elliottcable: deanlandolt: When there’s a huge ecology of packages… people might choose to be lazy. They might want a Twitter library, and there may not be one that works they way they want it to work… but they’ll use it anyway. [17:49] elliottcable: deanlandolt: Which means that, in the end, there is actually a much *smaller* number of packages written for any particular style of programmer. [17:49] deanlandolt: we shouldn't all be reinventing the wheel [17:49] elliottcable: deanlandolt: Which means that you are much more likely to have to *settle* [17:50] Biscuits: elliotcable: But why should a language enforce a style of thinking on all programmers? isn't that what frameworks are for ? e.g. Node.js forces people to think in a purely asynchronous way, Narwhal lets you get away with blocking/PHP style, and each has it's own ups and downs and own set of modules that can be used. [17:50] deanlandolt: exactly...i'll happily settle...and roll my own libs where needed [17:50] elliottcable: deanlandolt: Wheras, if your language dictactes the style, there *will* be a package for your style, or there won’t be any prackage at all… encouraging you to create the package, for anybody else to then use. [17:50] deanlandolt: Biscuits: exactly! ...if you want to subset the language you've got a bigger problem: marketing [17:50] elliottcable: Biscuits: Yes, and I agree [17:50] elliottcable: Biscuits: Unfortunately, CommonJS threatens that [17:51] elliottcable: Biscuits: CommonJS are the people who take deanlandolt’s point of view to the extreme: they don’t even want the *framework* subsetting the language [17:51] deanlandolt: threatens what? the ability for packages to interoperate threatens your goals of fragmentation? [17:51] elliottcable: Biscuits: They want to see all the frameworks support *everybody*’s style, as well [17:51] deanlandolt: elliottcable: that's...ridiculous [17:51] elliottcable: deanlandolt: No, it threatens the ability for Node.js to be Node.js, instead of just another CommonJS implementation [17:52] elliottcable: deanlandolt: *shrugs* if you say so. [17:52] deanlandolt: heh...wow...the last thing i'd like to see is fragmentation...but oh well [17:52] elliottcable: deanlandolt: My point of view on CommonJS is *well* documented in this room, that’s not a subject I’d like to iterate my point of view on again and again, it’s too painful to discuss. On that note… going to stop arguing, and go code. [17:53] elliottcable: hah [17:53] Biscuits: Why are we suddenly treating this like a war/argument :p? [17:53] elliottcable: I realized a while back that my fragmentation goals are different of those from most Noders; that’s fine by me, I can simply work in my own little world, which is exactly what I’m doing. [17:54] elliottcable: However, CommonJS *directly* threatens that: it has the opportunity to actually destroy Node.js, make it unusable for me, by making it into yet another CommonJS implementation. [17:54] skampler: peace, love and unity [17:54] deanlandolt: how do you spell koombuya [17:54] elliottcable: I was fairly scared of that, but my fears have been assuaged; ryah seems fairly set on ‘only taking CommonJS support as far as he can without making Node.js no-longer-Node.js’ [17:54] Biscuits: And how is CommonJS a bad thing? it's exactly like the framework approach i'd talked about, except maybe they're taking it a bit too far. Still I'm pretty happy that at least they defined a generic way for JS modules, got pretty tired of libraries clogging the global namespace [17:55] elliottcable: Which means that, whatever Node.js becomes, I can continue to build my own world on top of it, safely [17:55] elliottcable: Biscuits: I hate that system more than anything, but again, that’s long-since-overdiscussed, so… [17:56] elliottcable: Biscuits: Luckily, I have process.compile(), and process.stdio.cat(); I don’t expect ryah to get rid of those anytime soon; and as long as they exist, I don’t really have to deal with that horrible ‘securable modules’ crap. Hence `from` [17:58] Biscuits: elliotcable: Well, ofcourse you'll always be able to simply do eval and file-IO, but it's nice to at least have *some* common ground to work from :) [17:58] elliottcable: Biscuits: It would be, if that common ground weren’t so insane. [17:58] elliottcable: Biscuits: the way it’s looking now, all of my work will be *completely* incompatible with anybody who doesn’t use poopy.js. That’s fairly sad, but I suppose I can survive it. [18:00] Biscuits: Hmmm, I don't really see how poopy is incompatible with CommonJS securable modules :/ You can simply do exports.widget=widget; and then from another module do require("widget").widget.beget() to create a copy, right ? [18:00] elliottcable: Biscuits: Yes, but that’s horrible. Again, this has all been covered before. [18:01] elliottcable: Biscuits: I’m not going to write all my code so it works with `require()`. It’s a ridiculous requirement; I’m going to create objects in a file, and then `return` them when I’m done with them. [18:01] elliottcable: Biscuits: It *is* possible to write a library such that it will work under both `from` and `require()`, but it’s painful. [18:02] elliottcable: Biscuits: it looks something like this: [18:02] Biscuits: elliotcable: return (exports.return = objectToReturn); ? [18:02] elliottcable: Biscuits: nope [18:03] elliottcable: hold on, writing it up to gist [18:04] inimino: hehe [18:12] elliottcable: Biscuits: http://gist.github.com/262670 [18:12] elliottcable: Biscuits: Node.js’s proprietary extensions to CommonJS’s ‘securable modules’ makes that slightly easier [18:13] elliottcable: Biscuits: but, if you’re going to go to the trouble of making your ‘module’ compatible with CommonJS, you might as well go full-bore, so that it’s compatible with more than just Node.js [18:14] inimino: quite [18:18] elliottcable: Biscuits: Of course, the best solution for compatibility is to simply make your library a ‘securable module’ instead; someone can certainly use ‘securable modules’ via `require()` inside poopy.js libraries/applications. [18:18] elliottcable: Biscuits: Only caveat being that it will look a bit ugly, to have a `require()` in a list of `from`s. [18:19] inkubus08 has joined the channel [18:22] elliottcable: Biscuits: Updated that gist with a Node.js example. As you can see, it’s a *little* cleaner: http://gist.github.com/262670 [18:26] botanicus_ has joined the channel [18:27] elliottcable: Biscuits: One final note, if the ‘root object’ is unimportant to you, you can use something like `var myThing = (typeof exports !== 'undefined') ? exports : new(Object);` (as I do in `from`’s source—you obviously have to `require()` `from` in the first place). [18:30] elliottcable: Hey, I’ll be back in a bit, all. I’m @SnowCityCafe; it’s time to go home, stop being distracted by cute waitresses, and get to work. d-: [18:32] sudoer has joined the channel [18:34] mikeal1 has joined the channel [18:36] aguynamedben has joined the channel [18:37] aguynamedben has joined the channel [18:40] DamZ has joined the channel [18:41] xantus has joined the channel [18:42] felixge has joined the channel [18:43] taf2 has joined the channel [18:43] taf2: if you want to load a configuration file what's the convention? [18:43] taf2: should i read a js file and eval? [18:45] taf2: posix could be unistd :P [18:45] eddanger has joined the channel [18:49] taf2: node does something weird to vim... it eats the lines when running... with !node my.js [18:53] PowerToExt has joined the channel [18:57] elliottcable: mmm back [19:15] scudco has joined the channel [19:16] ryanmcgrath has joined the channel [19:42] tlrobinson1 has joined the channel [19:58] mikeal has joined the channel [20:06] dnolen has joined the channel [20:20] dnolen has joined the channel [20:24] dnolen_ has joined the channel [20:25] leahculver has joined the channel [20:42] dnolen_ has joined the channel [20:44] dnolen_ has joined the channel [20:47] dnolen_ has joined the channel [20:52] elliottcable: o7 all [21:02] inimino: ryah: you around? [21:02] inimino: I have a patch for http://github.com/ry/node/issues/closed#issue/28 [21:03] inimino: chakrit's issue [21:03] inimino: I think the problem is that wget is a HTTP/1.0 client, and node is currently not closing the connection after sending the entity body, which is wrong [21:03] elliottcable: yeah, I kind of wish GitHub issue URLs were a bit better [21:03] elliottcable: for instance, showing the reporting user [21:03] elliottcable: GitHub historically has no problem with long-ass suer-semantic URLs [21:03] elliottcable: so, why not keep it up for Issues? [21:04] inimino: not putting the actual issue ID in the fragid would be nice too [21:04] elliottcable: huh? [21:04] inimino: "closed#issue/28" [21:04] elliottcable: I like the ID, but I don’t like the fact that the status is in there [21:04] elliottcable: if I change the status, the URL no longer works /-: [21:05] inimino: yes, the URI allocation scheme is made of fail [21:05] inimino: anyway [21:05] inimino: not sure if I should attach my patch to the issue or something else [21:05] elliottcable: ‘http://github.com/ry/node/issues/chakrit/28’ would be better, I think [21:06] elliottcable: inimino: I’d generally commit it, push to your remote, and make sure to include the issue ID in the commit message [21:06] inimino: actually I'm not even sure how to do attach a patch here [21:06] elliottcable: inimino: (and add a link to the discussion on the issue) [21:06] elliottcable: inimino: you don’t attach patches to issues on GitHub. It makes no sense, GitHub *itself* is a code hosting system; why would they provide mini-hosting systems just for Issues? [21:07] inimino: hm, ok [21:07] inimino: I don't really use git by choice [21:07] inimino: I'll just mail it [21:07] elliottcable: inimino: o_O what do you use? [21:07] elliottcable: inimino: or are you the dude who was talking about his HTTP POST SCM? [21:08] inimino: yep [21:08] elliottcable: If I change the value of an variable scoped‐in from the arguments, does the actual value of that element of `arguments` change? [21:08] inimino: I'm just feeling a bit unfriendly towards git at the moment since it just wasted about an hour of my life [21:08] elliottcable: I’m not sure how closely the `arguments` object is tied to the actual arguments portion of the locals scope [21:09] ryah: inimino: hi [21:10] inimino: hey ryah [21:10] ryah: what's the problem with that issue? [21:11] ryah: maybe i don't understand [21:11] elliottcable: ACTION pokes around in the repl, trying to grok how function arguments and argument scope actually *work* [21:11] inimino: the problem is that wget is an HTTP/1.0 client [21:12] inimino: if you send a response to an HTTP/1.0 client and it doesn't have Content-Length set, then you have to close the connection after [21:12] inimino: currently node doesn't do this which is what breaks lots of tests people are doing with wget [21:13] ryah: hm [21:13] inimino: you can tell people to set Connection: close but that shouldn't be necessary at all since node can see from the request version that it's going to have to close the request and can't use transfer-encoding: chunked [21:14] inimino: this is what my patch does, I'll mail it to you [21:14] elliottcable: OH SNAP BITCHES [21:14] elliottcable: Bwahahahahahahahahahahahahaha [21:14] elliottcable: It *is* directly tied into the scope! [21:15] inimino: ryah: it's probably causing some of the ab issues too, though I haven't tested that [21:16] leahculver has joined the channel [21:16] ryah: inimino: ah okay [21:17] elliottcable: fffffff— yes [21:17] elliottcable: http://gist.github.com/262805 [21:17] inimino: sent [21:17] inimino: ryah: I also changed some lines to use .test() instead of exec() which is more efficient [21:17] elliottcable: That’s the closest you ever come to a direct reference to the locals scope! Awesome! [21:17] elliottcable: ACTION is tripping [21:18] inimino: ryah: and I removed some lines that were redundant with what the previous line OutgoingMessage.call(this) did [21:18] ryah: inimino: in the test, why send Connection: keep-alive? [21:18] ryah: in the req? [21:19] micheil has joined the channel [21:19] inimino: ryah: because that's what wget does [21:19] ryah: the connection should be kept alive then [21:19] ryah: or? [21:20] elliottcable: Shit. This means I could write a JESS extension and library to give you a `locals` object inside every scope, and a `local` keyword to declare variables in it [21:20] inimino: no, not if the Content-Length is not sent [21:20] inimino: HTTP/1.0 clients don't handle chunks [21:20] inimino: so the only way to signal the end of the entity body is to close the connection [21:21] ryah: okay [21:21] inimino: that's why currently wget just gets the content and then hangs until it times out [21:21] inimino: elliottcable: uh, what? [21:22] voodootikigod_ has joined the channel [21:22] elliottcable: o_o [21:23] elliottcable: I just realized you’d even be able to set the locals object [21:23] elliottcable: or even, with `locals = this;`, duplicate Ruby’s lookups style [21:24] inimino: the arguments object doesn't let you do most of these things... [21:24] inimino: ACTION is off for some lunch [21:24] elliottcable: inimino: hehehe yes it does, if you do hacky-evil, I think [21:25] elliottcable: inimino: still nailinn=g down the specifics in my head, I *just* had all of this explode in my mind at once [21:25] inimino: ryah: let me know what you think about that patch [21:25] inimino: elliottcable: you can't really add anything to it that has a local name [21:25] elliottcable: inimino: yes I can, with JESS. I’ll write up an example, hold on [21:26] inimino: you can change the values of arguments, but... you can do that already [21:26] inimino: ACTION really is away [21:26] inimino: maybe if I knew what JESS was... [21:26] elliottcable: inimino: my ‘evil’ pre-processor, remember? [21:27] elliottcable: inimino: the whole ->{} → function(){} debate? [21:27] inimino: ACTION really, really... [21:27] elliottcable: d-: [21:29] ryah: inimino: looking at it [21:29] micheil: elliottcable: why are you writing javascript if you don't like the syntax? [21:29] elliottcable: micheil: I don’t particularily dislike it. There’s just a few bits that are annoying, for obvious reasons [21:33] micheil: elliottcable: you know, if you don't like writing so much, you could just setup some texteditor snippets [21:33] elliottcable: micheil: I have those, but that’s not really helpful. The verbosity makes it harder to scan the code, and makes it less beautiful. [21:33] elliottcable: micheil: not really worth arguing; each to their own [21:34] micheil: yeah [21:37] jspiros has joined the channel [21:37] elliottcable: jspiros: aperios? [21:40] elliottcable: haha [21:40] elliottcable: http://gist.github.com/262830 [21:42] jed has joined the channel [21:43] jspiros has joined the channel [21:44] CIA-56: node: 03Ryan Dahl 07master * rf91e347 10/ (ChangeLog doc/api.txt doc/index.html wscript): bump version - http://bit.ly/6vakgL [21:44] CIA-56: node: 03Ryan Dahl 07master * r64fe9fb 10/ src/node.js : fix whitespace - http://bit.ly/7VYDXH [21:44] CIA-56: node: 03Michaeljohn Clement 07master * r3d24e11 10/ (lib/http.js test/mjsunit/test-http-wget.js): don't chunk responses to HTTP/1.0 clients, even if they send Connection: Keep-Alive (e.g. wget) - http://bit.ly/6LCQxf [21:44] ryah: inimino: thanks --^ [21:44] ryah: inimino: you should keep the first line of your git commits under 50 columns [21:45] elliottcable: ryah: 50? I always went for 78. Why? [21:50] ryah: elliottcable: http://kernel.org/pub/software/scm/git/docs/git-commit.html#_discussion [21:51] micheil has left the channel [21:51] elliottcable: ryah: Interesting. There isn’t any discussion of *why* there, though [21:51] elliottcable: ACTION ponders [21:53] dnolen_ has joined the channel [21:54] elliottcable: It’s not due to the SHA1 hash; SHA1s are 40 chars, right? So to fit on one line of an 80 terminal (minus 2 for safety), it’d e 78 - 40 - ": ".lenghth == 36 [21:54] elliottcable: ACTION doesn’t really see the logic there [21:54] dnolen_ has joined the channel [21:57] elliottcable: Does anybody have a JavaScript sexp parser of some sort? Something that can give me a parse tree of some JS, *within JS*/ [21:57] ryah: elliottcable: long email subjects are annoying [21:58] elliottcable: ryah: But is 78 really more annoying than 50? [21:59] ryah: elliottcable: you can parse js with http://javascript.crockford.com/tdop/tdop.html [21:59] ryah: elliottcable: "Subject: ".length == 9 [22:00] elliottcable: ryah: Again, that would sort of explain an argument for 71, or 69… (hehe, 69)—but 50? [22:00] elliottcable: ACTION shrugs [22:00] elliottcable: doesn’t really matter [22:01] ryah: are you using a french keyboard? [22:02] elliottcable: Me? No, American… [22:02] elliottcable: Why? o_O [22:02] ryah: your '\'' character isn't being sent correctly [22:02] elliottcable: \'? wha? [22:03] elliottcable: It’s all plain UTF-8 [22:04] unicode_test has joined the channel [22:04] unicode_test: Testin’ lawl [22:04] elliottcable: Testin’ lawl [22:04] ryah: elliottcable: i don't think it's sending 0x27 [22:04] elliottcable: Yep, it’s all good. Must be on your end. [22:05] elliottcable: ryah: it’s not, it’s U+2019 [22:06] ryah: that's not the correct character for contractions [22:06] elliottcable: um… yeah, it is? o_O [22:06] elliottcable: U+2019, ‘RIGHT SINGLE QUOTATION MARK’ [22:09] ryah: elliottcable: you want an apostrophe [22:09] elliottcable: I reference http://en.wikipedia.org/wiki/Apostrophe#Unicode d-: [22:10] elliottcable: “‘PUNCTUATION APOSTROPHE’ (or ‘RIGHT SINGLE QUOTATION MARK’; ‘SINGLE COMMA QUOTATION MARK’), U+2019. Serves as both an apostrophe and closing single quotation mark. This is the preferred character to use for apostrophe according to the Unicode standard.” [22:11] ryah: hm, okay. well, maybe it's okay. but looks crappy on non-utf8 terms [22:11] rhys__ has joined the channel [22:11] elliottcable: Well, of course. Anything I type will; I’m a Unicode obsessee. [22:11] elliottcable: s/Unicode/Unicode & typography/ [22:13] RayMorgan has joined the channel [22:19] DamZ has joined the channel [22:31] rictic has joined the channel [22:32] inimino: elliottcable: oh [22:32] inimino: elliottcable: I thought it might be something like that [22:33] inimino: elliottcable: I actually blogged about my JavaScript parser recently, did you see it? [22:36] inimino: ryah: cool, thanks [22:50] dnolen has joined the channel [23:02] hassox_ has joined the channel [23:10] elliottcable: inimino: no, I didn’t; I don’t generally follow blogs [23:11] gwoo has joined the channel [23:11] sudoer has joined the channel [23:11] inimino: elliottcable: well I mentioned it in this channel, anyway... *looks up link* [23:12] orlandov: urlz [23:12] inimino: elliottcable: http://inimino.org/~inimino/blog/peg_first_release [23:12] elliottcable: inimino: damn, your blog is even worse than mine o_o [23:12] inimino: heh [23:12] elliottcable: inimino: Ah, I remember that. [23:12] orlandov: don't listen to him; less is more! [23:12] elliottcable: inimino: I mis-understood when I read it, I thought it was a JS generated for parsers; I didn’t realize you’d already attached a specific parser for JS itself [23:13] inimino: orlandov: I'm going with that :) [23:13] inimino: elliottcable: yeah [23:13] elliottcable: orlandov: mine’s even less. [23:13] elliottcable: orlandov: http://github.com/elliottcable/blog/tree/master/posts [23:13] orlandov: heh wow [23:14] inimino: elliottcable: I will be posting more, with nice syntax highlighting demos and stuff [23:14] inimino: heh [23:15] inimino: elliottcable: it's pretty early, but would be very well suited to doing transformations from one ES dialect to another [23:15] elliottcable: inimino: Sounds about perfect. [23:15] elliottcable: inimino: I was using regexen, but that won’t be powerful enough for `local`s [23:15] orlandov: inimino: out of curiousity what prompted you to write this? [23:15] elliottcable: inimino: I might also use it to implement a new language I’ve been thinking about [23:16] inimino: orlandov: mainly this: http://inimino.org/~inimino/blog/text_editor_requirements [23:16] elliottcable: ACTION tries to think of something other than meaningful indentation, {…}, and do … end [23:17] inimino: orlandov: but also some things I wanted to do with JavaScript [23:17] inimino: orlandov: I've also found it very nice for writing little DSLs [23:17] elliottcable: Hey, what do you all think of something like this (not for JS, for a new language): [23:17] elliottcable: (stole JavaScript keywords and stuff, though, just for the example) [23:18] orlandov: inimino: neat- i find myself nodding along to this [23:18] orlandov: even vim which i would want to have my babies is kind of crufty in a lot of ways [23:18] elliottcable: inimino: I know you hate git, but could you put that pareser generator on GitHub? [23:19] orlandov: wait [23:19] orlandov: who hates git?? [23:19] orlandov: ACTION hands out pitchforks [23:19] inimino: I wouldn't say I hate it, we just had a little spat [23:19] orlandov: that's fair... [23:20] ryanmcgrath has joined the channel [23:20] orlandov: when i was starting out with it i almost lost a month of changes in branch... i ended up having to scrape it out of my screen scrollback buffer [23:20] inimino: elliottcable: I have a lot of stuff in my own revstore, I need some kind of git compatibility but haven't figured that out yet [23:20] orlandov: we've gotten along better since then [23:20] inimino: heh [23:20] elliottcable: inimino: I know, you told me [23:20] ashb: orlandov: git reflog is your friend [23:20] elliottcable: inimino: if you’d just ship it off to GitHub, so I can fork and explore, I’d appreciate it [23:21] inimino: elliottcable: what I will probably do is write a script that wget's and pushes to git [23:21] orlandov: ashb: yeah, i mean i know that now, but as a noob i just shat a brick ;) [23:21] elliottcable: Anyway [23:21] elliottcable: Thoughts, on this: http://gist.github.com/262895 [23:21] elliottcable: If I actually implemented this, I might use a Unicode marker instead, but I’m not sure. | is a lot easier to type. [23:21] orlandov: i seem to recall it had to do with stashing changes and then blowing them away by accident. [23:22] elliottcable: The idea is to take meaningful whitespace… and make the whitespace unmeaningful. d-: [23:22] inimino: elliottcable: why not just use the whitespace itself like Python? [23:22] elliottcable: i.e. you can *actually* see what’s going on [23:22] elliottcable: inimino: Just brainstoring alternatives, I’m not sure if I like it more or less than Python at the moment [23:23] inimino: ok [23:23] inimino: it's interesting [23:23] orlandov: ugh... meaningful whitespace is painful sometimes [23:23] inimino: Haskell also has significant whitespace [23:23] elliottcable: orlandov: I haven’t actually written Python; can you summarize the downsides for me? [23:23] inimino: it's nice [23:23] elliottcable: ACTION is brainstorming for a new language, so… [23:23] orlandov: elliottcable: imagine you're refactoring, and moving around blocks of code [23:23] orlandov: indenting out dedenting [23:24] orlandov: its extremely easy to make a mistake and in/dedent the wrong part [23:24] elliottcable: orlandov: I use TextMate, so that’s not an issue… [23:24] inimino: I don't think there are any [23:24] orlandov: there's no braces to clue you in [23:24] orlandov: elliottcable: unlikely that would help you [23:24] elliottcable: orlandov: that I get, though [23:24] elliottcable: orlandov: that’s the goal of what I just posted; the |’s make it explicit [23:24] orlandov: i like python, but thats one of my smaller beefs [23:25] elliottcable: I think the |’s would be optional. I.e. would be treated the same at the start of a line as just-whitespace [23:25] inimino: do they? [23:25] inimino: elliottcable: wouldn't that have the same downside (not that I consider it worth worrying about) [23:25] elliottcable: inimino: which downside? [23:25] elliottcable: inimino: the refactoring thing? Like I said, that’s not a problem; TextMate (and any worthwhile editor) solves that for you [23:25] elliottcable: inimino: the entire point of the |’s would *only* be to make it more scan-able [23:26] orlandov: elliottcable: how would a text editor know the scope a line is supposed to be a part of? without explicit braces? [23:26] inimino: yes [23:26] elliottcable: orlandov: the same way as the interpreter; the context [23:26] orlandov: er s/scope/block/ [23:26] inimino: I agree that it's not a significant downside, just not that the "| " ameliorates it [23:26] orlandov: my point is that by indenting it's possible to leave something in the wrong place [23:26] orlandov: whereas braces would have caught that [23:27] orlandov: imagine moving the last line of a for loop in one indentation unit [23:27] orlandov: yay subtle hard to debug bugs [23:27] elliottcable: Yep, I getcha [23:27] elliottcable: again, trying to remove the subtlety [23:27] orlandov: kick implicitness in the balls [23:28] elliottcable: hahaha [23:30] Tautologistics has joined the channel [23:32] inimino: in Haskell I don't think I've ever had a program that compiled when the indentation was wrong [23:40] elliottcable: orlandov, inimino: http://cld.ly/3bvnp [23:40] elliottcable: orlandov, inimino: that example is fictitious, and the whole concept *really* doesn’t play well with JavaScript… but trying to ignore that, what do you think? [23:41] inimino: elliottcable: I think your text editor should do that for you [23:41] orlandov: elliottcable: so the |'s are equivalent to spaces? [23:41] elliottcable: inimino: deal with the indentation, yes. But I like the idea of being able to make the blocking explicit, when I think it will make the code more beautiful [23:42] inimino: also the second line in from the left should be descending from resolver, not the dot before addCallback, IMO [23:42] elliottcable: orlandov: Not exactly. In situations where the blocking is ambiguous, the language would be intelligent enough to rely on your explicit |’s (if you provide them) [23:43] elliottcable: inimino: Interesting point. I didn’t even realize that they looked like they were ‘descending’ from something. [23:43] inimino: elliottcable: I don't mean the indentation, I mean making the expression extension explicit [23:43] elliottcable: ACTION ponders [23:43] elliottcable: the ‘expression extension’? [23:43] orlandov: ACTION was getting confused by the rightmost | but realized there was a { missing right before [23:44] inimino: ACTION really needs to publish that blog post [23:44] elliottcable: inimino: what? [23:44] inimino: elliottcable: you have an expression on line 334 [23:44] voodootikigod_ has joined the channel [23:44] inimino: it extends to line 341 [23:45] elliottcable: inimino: indeed, but that’s one of those cases where it’s obvious enough that you can exclude the |’s [23:45] inimino: your text editor should be making this blindingly obvious to you [23:47] inimino: elliottcable: so the pipes there are just indicating that the dots line up? [23:47] elliottcable: inimino: Nah, that was unintentional, and actually fairly confusing. I’m trying to think of a better example right now. [23:48] orlandov: one of the things about jquery that bugs me [23:48] orlandov: or rather, when other people do that [23:49] elliottcable: orlandov: eh? [23:51] orlandov: a bunch of nested expressions [23:51] elliottcable: heh [23:51] orlandov: your example wasn't bad [23:52] inimino: ACTION points elliottcable to @@ 2500 Box Drawing 257F in NamesList.txt [23:52] elliottcable: what? o_O [23:52] elliottcable: ah lol [23:52] elliottcable: and meh, nah [23:52] elliottcable: I always hated that stuff [23:52] elliottcable: finch turned me off to it ages ago