[00:12] RayMorgan has joined the channel [00:14] binary42 has joined the channel [00:16] okito has joined the channel [00:17] binary42 has joined the channel [00:19] un0mi has joined the channel [00:22] mikeal has joined the channel [00:33] steadicat has joined the channel [00:35] okito has joined the channel [00:35] orlandov: ryah: hey, i noticed that in node_postgres, in Connection::New you do a "Connection *connection = new Connection();", but I don't see a corresponding delete [00:37] orlandov: valgrind is complaining about it, and i was wondering if there was a way of cleaning up after ObjectWrap objects [00:39] orlandov: (the reason i mention this is i'm cargocult^Wfollowing the same pattern in the mongodb driver i'm writing [00:47] lvmike has joined the channel [00:49] grantmichaels has joined the channel [00:51] un0mi has joined the channel [00:57] ryah: orlandov: yeah objectwrap deletes it [00:57] ryah: when all references are lost [00:59] micheil: ryah: is there any wrappers for openssl in node? [01:00] micheil: (specifically openssl s_client) [01:01] micheil: because I've worked out the various options and how to actually do smtp with tls/ssl, I'm just wondering about implementing it: http://github.com/Miksago/node.js-smtp/blob/master/docs/smtp_notes.md [01:03] orlandov: ryah: ah great :) [01:19] jacobolus has joined the channel [01:32] jacobolus has joined the channel [01:54] un0mi has joined the channel [01:59] ryah: micheil: no [01:59] ryah: although i'm starting ot think about that [02:00] micheil: okay [02:00] ryah: in the net2 branch, i need to redo the gnutls binding. [02:00] ryah: i may just switch to openssl... [02:00] ryah: it's just i don't know how to do non-blocking openssl [02:00] micheil: (tbh, I didn't even know my mac had openssl installed by defualt) [02:00] ryah: i've heard its possible [02:00] micheil: there's a flag for it [02:01] micheil: -nbio [02:01] ryah: its been over a year since i looked at it -i should probably do that again [02:01] micheil: although, using command line I can't get that flag to work [02:02] micheil: it'd be really good to see ssl/tls clients land [02:04] micheil: the way that I'm going to implement the smtp module will be to have a couple of options, and to have a toggle to switch whether the client will automatically assume and use ssl [02:04] charlenopires has joined the channel [02:05] micheil: from the examples I've seen of ssl in action, it's needed a new connection to be spawned, hence the events would need to be rebound [02:05] ryah: yeah [02:05] ryah: i want to support that [02:05] ryah: decouple the tcp from the ssl [02:05] ryah: at least somewhat [02:06] micheil: okay [02:06] ryah: socket.startSecureSesssion() [02:06] micheil: why not use the existing socket.startSecure() [02:06] ryah: er, yeah [02:07] ryah: but at the moment, we're sitting on evcom and evcom demands the entire connection is secure [02:07] ryah: so. yeah. net2 [02:07] un0mi has joined the channel [02:09] micheil: at any rate, I'll try to make the API and code to my smtp module forward compatible [02:09] micheil: is there any existing work on github or something of net2? [02:10] ryah: micheil: yeah the branch is up there [02:10] micheil: okay [02:10] ryah: you might want to revert the last commit [02:10] ryah: the sendFD stuff. [02:11] ryah: it's not working well [02:12] ryah: yeah, maybe i'm going to do this with openssl [02:13] ryah: i forget what my problem was with it before... but it looks kind of okay now [02:15] micheil: does net2 change the javascript api much at all? [02:15] inkubus08 has joined the channel [02:15] ryah_away: not much [02:15] ryah_away: a bit [02:16] ryah_away: "receive" -> "data" [02:16] micheil: okay [02:16] micheil: hmm.. [02:16] ryah_away: binary stuff is different [02:16] ryah_away: that's the buig change. [02:17] micheil: would it be possible to add a variable into the javascript scope to let the js know that we're using net2? [02:17] micheil: because then I could have the code working with both [02:17] ryah_away: ? [02:18] micheil: eg, socket.addListener(sys.isNet2 ? "data" : "receive", function(){...}); [02:18] ryah_away: process.version [02:19] micheil: "See src/process.js for more information. " [02:20] micheil: src/process.js doesn't exist [02:27] charlenopires_ has joined the channel [02:30] jacobolu_ has joined the channel [02:56] steadicat has joined the channel [03:04] r11t has joined the channel [03:18] scudco has joined the channel [03:24] JimBastard has joined the channel [03:31] un0mi has joined the channel [03:33] pjb3 has joined the channel [03:34] micheil: JimBastard: I got node.js-smtp working [03:35] micheil: http://gist.github.com/277168 [03:35] micheil: although, I have just wiped the repository so I can start clean on implementing v1.0 [03:37] jamiew has joined the channel [03:46] inimino: ACTION encounters the syntax error exception issue ... ugly [04:02] cloudhead has joined the channel [04:05] JimBastard: micheil will it send emails now? [04:05] r11t has joined the channel [04:05] micheil: yeah, see the example I posts [04:05] micheil: *posted [04:05] JimBastard: i see [04:05] micheil: you'll need to check out the tag v0.5 [04:06] JimBastard: i saw the gist you posted [04:06] micheil: although, it is a proof of concept [04:06] JimBastard: is that the final syntax? [04:06] micheil: no [04:06] JimBastard: i would really recommend wrapping some of the more common stuff in easy to call methods [04:07] JimBastard: did you peep the snytax im using now? http://github.com/Marak/node_mailer [04:07] micheil: I'm reimplementing everything for v1.0, which will have two layers, the low-level protocol.js and a higher level mailer.js [04:07] JimBastard: awesome! [04:08] JimBastard: i was talking about smtp support at nyc.js tonight a little [04:08] micheil: protocol.js will also have forward compatibility with node's net2, which hopefully will bring in availability of tcp client ssl/tls negotiation [04:08] JimBastard: the fab guy was there too [04:08] micheil: fab guy? [04:08] JimBastard: not sure what net2 is [04:08] JimBastard: jed maybe [04:08] micheil: net2 is a branch of node [04:08] micheil: from what I can gather, it'll be merged into master when it works [04:09] JimBastard: let me know if you need any help with doing the mailer api [04:09] JimBastard: or if you want to talk about it at all [04:09] micheil: http://github.com/ry/node vs http://github.com/ry/node/tree/net2 [04:09] JimBastard: got ya [04:10] micheil: currently I'm looking at going: var mymailer = new Mailer("server", "user", "secret", port) [04:10] JimBastard: well [04:10] micheil: then: mymailer.send(to, from, subject, body) [04:10] micheil: or something [04:11] JimBastard: would you want to create multiple mailer objects on one page? [04:11] micheil: although, for now, I'm just implementing the raw protocol [04:11] JimBastard: i was always a big fan of cfmail - http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=Tags_m-o_01.html [04:11] JimBastard: but CFML is tag based of course [04:12] JimBastard: i dont think the high level call for sending emails should be more complicated then the cfmail tag, or the email.send() method i whipped up [04:12] micheil: I'm still trying to figure everything in the protocol out [04:12] JimBastard: of course [04:12] JimBastard: like i said, let me know if you want any help with the high level api [04:12] JimBastard: namespaces, syntax, things like that [04:12] JimBastard: would be glad to help / talk it over [04:13] micheil: I mean, here's a few things I worked out protocol wise last night: http://github.com/Miksago/node.js-smtp/blob/master/docs/smtp_notes.md [04:14] micheil: the biggest challenge is making the whole thing non-blocking [04:14] micheil: because the smtp protocol is a send/response style protocol [04:14] JimBastard: ummm [04:15] JimBastard: i think mediacoder handled that already? http://github.com/Marak/node_mailer/blob/master/node_mailer.js [04:15] JimBastard: by creating a promise? [04:15] micheil: yeah, although there's other issues [04:16] JimBastard: like what? im not too familiar [04:16] micheil: (I'm actually using EventEmitter on all the internals, but it makes implementation slightly messy) [04:17] micheil: man.. I should really be working on http://onthetune.com.. [04:17] micheil: + I need a coffee. [04:17] micheil: bbl. Feel free to write any ideas for the higher level api down... I'll create an issue for it.. [04:18] micheil: also, node.js-smtp is a client not a server [04:19] micheil: http://github.com/Miksago/node.js-smtp/issues/#issue/2 [04:19] micheil: add in anything you want in the comments [04:19] JimBastard: kk [04:25] quirkey has joined the channel [04:26] steadicat has joined the channel [04:31] hassox has joined the channel [04:31] Booster has joined the channel [04:35] binary42 has joined the channel [05:00] RayMorgan has joined the channel [05:01] unom1 has joined the channel [05:19] un0mi has joined the channel [05:22] sudoer has joined the channel [05:49] micheil: ryah_away: Could you add in the raising of errors in node_net.cc, so that if any error is encountered it triggers the event "error" with the data of the exception encountered? [05:50] micheil: I've got something that works locally to do that, although, it is on an older version of node [05:50] kriskowal has joined the channel [05:52] sudoer has joined the channel [05:53] gbot2 has joined the channel [05:55] gbot2 has joined the channel [05:59] mattly has joined the channel [06:02] gbot2 has joined the channel [06:07] jed has joined the channel [06:07] un0mi has joined the channel [06:07] gbot2 has joined the channel [06:11] Yuffster has joined the channel [06:13] micheil: man.. downloading the full node git tree on a 5-7KiB/s connection is not cool. [06:14] emyller has joined the channel [06:16] JimBastard: i blame au [06:18] emyller has joined the channel [06:22] micheil: hmm.. the process object is always available isn't it? [06:23] inimino: micheil: yes [06:23] micheil: good [06:24] micheil: I'm making v1.0 of node.js-smtp to be as modular as possible [06:24] micheil: so one of the major splits I'm doing is splitting the message queue off from the core [06:24] micheil: as queue's can be used else where and don't depend on smtp functionality [06:25] micheil: I'm going for something like: smtp -> tcpQueue -> Queue [06:25] micheil: or something [06:25] hassox has joined the channel [06:26] kriskowal: i don't suppose you'd object to some day having to grab the process object from a module? [06:26] micheil: huh? [06:26] inimino: sounds pretty good [06:26] kriskowal: nm. probably not relevant in this context. [06:28] inimino: anything that needs it is probably going to be non-portable anyway [06:29] kriskowal: for sure [06:29] hornbeck has joined the channel [06:32] micheil: I don't suppose there's anything like exports.__self__ where you can then just do: require("mylib"); and have direct access? [06:33] inimino: micheil: direct access? [06:33] micheil: well, if the exported symbol is a function [06:33] micheil: (ie, a constructor) [06:35] micheil: http://gist.github.com/277859 [06:36] inimino: ah, that [06:36] inimino: not currently, as far as I know [06:36] kriskowal: micheil isaacs is experimenting with module.setExports, which would do the trick. [06:36] kriskowal: but it's not likely to be picked up by commonjs [06:37] kriskowal: i'm probably going to take it out of narwhal [06:37] inimino: maybe there will be a setExports or some such function soon [06:37] inimino: yeah, I'm not that crazy about the idea [06:37] kriskowal: but, for the sake of argument, you would module.setExports(Queue) in that case, and then require() would return Queue [06:40] micheil: yeah [06:40] micheil: rather then doing require("lib/queue").Queue [06:40] micheil: I mind, I don't mind doing that, but it's a little unintuative [06:42] gbot2 has joined the channel [06:42] gbot2 has joined the channel [06:46] kriskowal: micheil what language are you coming from? [06:46] kriskowal: ruby, i presume? [06:46] micheil: frontend javascript [06:47] micheil: :P [06:47] kriskowal: i see. [06:47] micheil: I know some of each of php, ruby, python, bash, etc though [06:47] kriskowal: aye. [06:47] micheil: I'm currently a bit of a dojo contributor & in past was a jQuery UI contributor [06:48] kriskowal: i was curious what informed your intuition. [06:48] micheil: hmm? [06:49] kriskowal: "from queue import Queue" would be very intuitive coming from python or ML, but i can't think of an analog in PHP, Ruby, or Bash [06:49] kriskowal: in Ruby, require is very different. more like a "from module import *", if i'm not mistaken [06:49] steadicat has joined the channel [06:49] micheil: well, just the fact that there's so much repetition in the way I'm currently importing [06:49] kriskowal: PHP is more like a C #include or