[00:02] mikeal has joined the channel [00:06] Booster has joined the channel [00:08] rolfb has joined the channel [00:15] jed has joined the channel [00:20] scudco has joined the channel [00:27] creationix has joined the channel [00:31] kriszyp has joined the channel [00:55] jed has joined the channel [01:22] binary42 has joined the channel [01:22] LordMetroid: What happens if you simply do a require() without assigning the results to a variable? [01:36] LordMetroid: It is obviously executed but how can it export anything [01:37] inimino: LordMetroid: it can't [01:38] creationix: well, if it modifies globals like Object and Array, then those changes carry over [01:38] creationix: it can't touch local variables in your parent file as fas as I know, haven't tried [01:38] inimino: well, yes [01:39] inimino: but that's not a well-behaved CommonJS module [01:39] creationix: correct [01:39] LordMetroid: ok [01:39] LordMetroid: cause I am looking at this framework called picard [01:40] LordMetroid: And it does some unexplainable things [01:40] jed: LordMetroid: picard uses a lot of "with" magic. [01:40] inimino: what's it requiring? [01:40] inimino: :/ [01:41] LordMetroid: jed: "with" magic? [01:41] jed: yeah. look at all those methods: get, del, etc. [01:41] sudoer has joined the channel [01:41] LordMetroid: yes [01:42] keeto has joined the channel [01:42] LordMetroid: It is simply an object declaration [01:42] LordMetroid: Ahaa, it does modify GLOBAL [01:43] LordMetroid: That seems evil [01:43] jed: LordMetroid: i guess it's overriding require? [01:44] keeto has joined the channel [01:47] keeto_ has joined the channel [01:49] jed: LordMetroid: on second thought, i guess it's only using it to eval files. [01:49] LordMetroid: I don't know what it does and I am not looking all that carefully, I am trying to learn the basics for now [01:53] jed: LordMetroid: well, require basically (1) evals the contents of the file, and (2) returns an object. [01:53] LordMetroid: ok [01:53] jed: LordMetroid: picard is using (1) and not (2). [01:53] LordMetroid: jed: it is using (2) sometimes [01:53] jed: LordMetroid: it's a bit of an off usage. [01:54] jed: LordMetroid: sure sure, but sometimes not. [01:54] LordMetroid: mmm [01:54] jed: LordMetroid: you may want to check out other apps to learn the basics, like ry's node_chat. [01:55] LordMetroid: I will [01:55] LordMetroid: I just saw picard had cookie support so I thought I wanted to see how he does it [01:55] keeto has joined the channel [01:56] jed: LordMetroid: this might be a bit more intuitive for you: http://github.com/jed/cookie-node [01:57] LordMetroid: thank you [01:57] jed: LordMetroid: np. [02:02] jed: LordMetroid: cookie support is just adding a special Set-Cookie header, anyway. [02:03] LordMetroid: Yeah, but as I come to the point where I need to build complex browser-application I want a simple interface to the cookie header like $_COOKIE[] in php for example [02:03] LordMetroid: and so on [02:04] orlandov: libev question: once a connection has been opened, and we've gotten permission to write from libev, can i just write to the socket whenever i want? or do i still need to wait for write events before i can actually write to the socket? [02:04] orlandov: s/before i can/before i should/ [02:05] orlandov: /j #libev [02:11] keeto has joined the channel [02:12] keeto has joined the channel [02:35] Booster has joined the channel [02:45] kriskowal has joined the channel [02:50] creationix has joined the channel [03:41] brandon_beacher_ has joined the channel [04:01] rictic has joined the channel [04:10] ryan_a has joined the channel [04:14] siong1987 has joined the channel [04:27] Omega_ has joined the channel [04:28] Omega_ has left the channel [04:28] Omega_ has joined the channel [04:29] Omega_ has left the channel [04:32] sztanphet has joined the channel [04:33] Omega_ has joined the channel [04:34] Omega_: Greetings all! i just read an article that speaks highly of node.js, kinda interested in getting a feeling for the project. [04:35] Omega_: How is development coming and what does the future look like? [04:50] Omega_ has left the channel [05:08] grantmichaels has joined the channel [05:13] spoob has joined the channel [05:15] isaacs has joined the channel [05:15] CIA-56: node: 03Tim Caswell 07master * rfd184ee 10/ (lib/sys.js test/mjsunit/test-sys.js): Rename "Dynamic Property" to "Getter/Setter" in sys.inspect. - http://bit.ly/7R4wnq [05:18] ryah: tlrobinson: i like "process" i think argv and env should be available without loading a module. (also stdio) [05:20] hassox has joined the channel [05:27] isaacs: tlrobinson: i don't think you avoid the cf by making it harder to determine which env you're in [05:46] isaacs: (though, the point about making envs more similar is a good one, of course) [05:47] isaacs: it would be nice if all envs were 100% the same, and then the same code could always run anywhere. but since they're not, and probably won't be, it'd be nice if they had a reliable detection scheme in common. [05:47] isaacs: like platform/version, etc. [05:47] isaacs: people will abuse it, but they'll abuse feature detection, too. [05:47] ryah: imo it's too soon to worry about these things. [05:48] ryah: most of node api will change before freezing [05:52] micheil has joined the channel [05:53] ryah: well - at least i don't want to worry about these things :) [06:00] isaacs: ryah: i'm sure there will be other people to worry about them for you [06:00] Yuffster has joined the channel [06:08] spoob: I notice node code doesn't seem to use prototype... it's always object.thingy = function(){} instead of object.prototype.thingy [06:17] ryah: spoob: what do you mean? [06:18] ryah: spoob: or, what specificly? [06:18] spoob: i'm wondering if node also uses Javascript prototype chains, as I've not seen any example code use it [06:18] isaacs: spoob: prototype is used when it's creating classes. but for static objects that are bags of methods, it's not really necessary to create a prototype chain. [06:19] spoob: ok, thanks :) [06:20] ryah: yeah [06:20] ryah: :) [06:20] spoob: ryah; I know you're the author of nodejs now. All hail and much respect. It must be great to do something that worked out so well [06:21] ryah: thanks - yeah - i'm happy that people are excited about it [06:21] fynn has joined the channel [06:21] fynn has left the channel [06:22] jamiew has joined the channel [06:23] isaacs: hey, ryah, where are you from? i thought you lived in germany, and i was surprised when i didn't hear an accent in the jsconf talk [06:24] ryah: isaacs: san diego [06:24] ryah: originally [06:24] isaacs: neat. i lived there for 4 years. [06:25] ryah: just moved to the bay area, two days ago [06:25] ryah: hence the absence :) [06:26] isaacs: makes sense [06:26] isaacs: we should do a nodejs meetup [06:26] spoob: I visited the bay area a couple of years ago. It was surprisingly like Australia, except the sidewalks are made of people [06:26] isaacs: australian sidewalks are made of people? [06:27] spoob: no, sidewalks in bay area are made of homeless people, never seen so many in my life! [06:27] ryah: i just RSVPed sfjavascript [06:27] ryah: which seems nice [06:27] ryah: http://www.meetup.com/jsmeetup/calendar/12071503/ [06:28] isaacs: hey, they're still doin those? [06:28] spoob: I'm still coming up to speed on Javascript. Is there any consensus on constructor functions vs initialiser arrays for creating objects? [06:28] isaacs: spoob: it depends [06:29] spoob: I see one approach uses this.variable consistently, and the other does self = this; to avoid function rescoping [06:30] ryah: self=this; is useful for callbacks [06:38] isaacs: spoob: he's a bit of a controversial figure, but there's a lot of good stuff on http://javascript.crockford.com/ [06:39] isaacs: about closures and scoping and objects and such [06:39] spoob: Yes, it's the controversy that is making me ask... I'm seeing stuff like "Crockford is good, but here's an update on how to do it", and i'm not sure if the update is actually real or just another opinion [06:40] isaacs: they're all just other opinions :) [06:40] spoob: eg, function constructors were how it had to be done up to Javascript 1.1, so I'm not sure if their continued use is because it's still the best way [06:41] isaacs: well, there are other ways to create objects. [06:42] isaacs: constructors are good in some scenarios [06:42] isaacs: if you are only going to have one of something, then they're a bit of a waste. [06:42] isaacs: but if you need to create lots of workers, or your problem space can benefit from is-a inheritance, then constructors are the tool for the job. [06:45] spoob: I'll be able to avoid a lot of the debate as I'm using Cappuccino for traditional classes anyway :) [06:45] r11t has joined the channel [06:49] hassox has joined the channel [06:59] moosecrumpet has joined the channel [07:16] kriskowal: isaacs. you can still have is-a inheritance with crock style, w/ Object.create [07:17] isaacs: kriskowal: that's true [07:17] isaacs: but Object.create (pre-ES5) used "new" under the covers. [07:17] kriskowal: that's a problem? [07:17] isaacs: no [07:18] isaacs: but it's just that it doesn't mean you'er not using ctors [07:18] isaacs: i do rather like using prototypes as "cookie cutter" interitance. like, you have an object, and you spit out decendents, without ever "constructing" anything. [07:18] kriskowal: in any case, i'm giving es5 a run with the new events module [07:18] isaacs: neato [07:19] keeto has joined the channel [07:19] kriskowal: leads to different styles. [07:19] kriskowal: http://github.com/280north/narwhal/blob/master/lib/events.js [07:19] spoob: kris; are you the "askawizard" guy? [07:20] kriskowal: yes [07:20] kriskowal: i've been all too quiet on my blog lately. twitter. [07:20] spoob: Your blog posts really make my head hurt. :) I thought I was good at bash after 20 years, but your I/O redirection hack is amazing :) [07:21] kriskowal: what, with "xip"? [07:21] spoob: yep [07:21] kriskowal: that was a fun day [07:21] spoob: At work, I'm the guy that can pound out a 20 line bash script on my IBM Model M keyboard and it works first time, but I had to bow in respect at xip [07:22] kriskowal: model M eh? [07:23] kriskowal: i learned to type on an ibm 5001, as i recall. [07:23] spoob: I still like the Seectric keyboard the best, but the Model M will do [07:23] spoob: Selectric [07:23] kriskowal: redundant function keys on the left and a full star of directional keys, builtin lcd calculator on the numeric keypad [07:24] spoob: i remember the function keys on the left, with the original IBM PC with 8088, but haven't seen the built in calculator keyboard [07:24] kriskowal: i liked it because it was "clicky". the feedback was good when i was learning, but i had to drop it because it was (a) slow and (b) hurt my wrists [07:25] kriskowal: i still have the thing. i've been thinking of hanging it over the mantle. [07:26] kriskowal: i use the full tower's shell as a table, and have one of the 30 pin simms on my keychain [07:26] kriskowal: but, i gather you learned to type a good ten years before i did :/ [07:26] spoob: I would normally try and outnerd you as I'm extremely nerdy, but you're the 'askawizard' guy, so I concede. :) [07:26] kriskowal: oh, no. bring it. [07:27] spoob: no no, I'd like to walk around for a day feeling like I'm a jock :) [07:28] spoob: oh my ripply bulky arm muscles from hefting that copy of K&R first edition. Such a thin book, but it's the most exercise I've had :) [07:29] spoob: I've been somewhat blindsided by this eruption of Javascript competence. It seems to have flooded in from Ruby and Python, suddenly making the browser the area where interesting stuff happens instead of being a toy [07:29] kriskowal: lulz [07:32] keeto has joined the channel [07:46] nsm has joined the channel [07:53] nsm has joined the channel [08:01] isaacs: ryah: http://github.com/isaacs/node/tree/url-module-release from dae88f7 through 0c07eb65b should apply nicely on your master. [08:01] nsm has joined the channel [08:08] hassox has joined the channel [08:08] hassox: ryah: Mate you there? [08:09] hassox has joined the channel [08:17] bentomas has joined the channel [08:33] olivvv has joined the channel [08:35] johan-s has joined the channel [08:50] nsm has joined the channel [08:51] scudco has joined the channel [09:27] mikeal has joined the channel [09:43] teemow has joined the channel [09:51] felixge has joined the channel [10:30] micheil has joined the channel [11:02] micheil has joined the channel [11:04] rolfb has joined the channel [11:07] micheil_mbp has joined the channel [12:02] bryanl has joined the channel [12:22] mahemoff has joined the channel [12:26] eviltwin has joined the channel [12:31] keeto has joined the channel [12:37] un0mi has joined the channel [12:43] felixge_ has joined the channel [13:13] alex-desktop has joined the channel [13:22] botanicus_ has joined the channel [13:28] pmuellr has joined the channel [13:40] pdelgallego has joined the channel [13:58] creationix has joined the channel [14:19] charlenopires has joined the channel [14:25] tlockney_ has joined the channel [14:25] ashb has joined the channel [14:26] rudebwoy has joined the channel [14:26] FoxFurry has joined the channel [14:27] kriszyp has joined the channel [14:28] teemow has left the channel [14:40] davidsklar has joined the channel [14:41] creationix has joined the channel [14:43] robrighter has joined the channel [14:46] inimino: ryah: ping [14:47] creationix has left the channel [14:54] cloudhead has joined the channel [14:55] Booster has joined the channel [15:05] charlenopires has joined the channel [15:13] davidsklar has joined the channel [15:15] Omega_ has joined the channel [15:15] sveimac has joined the channel [15:18] Omega_: Are bindings to the various databases something that node.js will eventually come to offer, or is it the expectation that those may eventually be implemented in JS on top of node? [15:27] bryanl has joined the channel [15:28] LordMetroid has joined the channel [15:29] botanicus_ has joined the channel [15:30] bengl: Omega_: have you seen http://wiki.github.com/ry/node ? [15:30] Omega_: Well look at that ;) [15:30] Omega_: I was still browsing nodejs.org [15:30] Omega_: And the google group, reading up on past convos. [15:32] Omega_: Some really neat work being done here. Well thought out. [15:33] alexiskander has joined the channel [15:44] rolfb has joined the channel [15:47] binary42 has joined the channel [15:50] jed_ has joined the channel [16:00] LordMetroid: I have read a config file with data = posix.cat(filename).wait(); [16:03] LordMetroid: Ahaa... nm [16:09] scudco has joined the channel [16:09] pmuellr has joined the channel [16:14] pmuellr_ has joined the channel [16:16] jed has joined the channel [16:38] jamiew has joined the channel [16:41] charlenopires has joined the channel [16:43] jamiew has joined the channel [16:44] jfoutz has left the channel [16:47] jasondavies: anyone have any thoughts on adding the ability to gracefully restart i.e. hot reload without dropping any open connections? [16:47] jan____: jasondavies: felixge_ is working on hot code reloading [16:48] jasondavies: jan____: cool, that's one half of the solution then, the other half is to not drop any open connections [16:48] jasondavies: maybe I just need to write a worker supervisor to do this [16:49] felixge_: jasondavies: its pretty easy actually, the only problem right now is a mean bug with libeio [16:49] felixge_: jasondavies: I already tested http servers that reload their response logic while serving requests [16:49] jasondavies: felixge_: cool, so the reload is simply done as part of the event loop? [16:50] felixge_: jasondavies: basically you just reload individual modules and their children [16:52] jasondavies: if I can listen for SIGHUP or similar and reload all dependencies that would be awesome [16:52] rtomayko has joined the channel [16:52] jasondavies: or listen for file changes of course, for development [17:18] r11t has joined the channel [17:29] DamZ has joined the channel [17:39] scudco has joined the channel [17:42] felixge_: jasondavies: re, sorry was in client meeting [17:43] felixge_: jasondavies: basically you'll be able to reload everything except the module that creates your http/tcp server instance [17:43] jasondavies: felixge_: np [17:43] jasondavies: felixge_: that's ideal, so I can keep that as minimal as possible [17:43] felixge_: you will have to write your app with reloading in mind, but for most apps it should be rather trivial to do so [17:43] felixge_: yeah [17:44] felixge_: jasondavies: I actually am working on a file upload application where upload processes can take ~1h (big videos) [17:44] felixge_: s [17:45] felixge_: so I'm very motivated to get this functionality really solid :) [17:45] felixge_: jasondavies: what use case do you have in mind? [17:47] __botanicus__ has joined the channel [17:47] jasondavies: felixge_: essentially I'm finding myself manually reloading my apps every time I roll out new functionality, and having using nginx's graceful reload I was thinking about writing something similar to avoid clients seeing any downtime [17:48] jasondavies: so it's more about avoiding brief 502 errors for users whenever I deploy (which is fairly often at the moment) [17:48] jasondavies: I can see it's even more important if you have ~1h uploads though :) [18:00] felixge_: jasondavies: np, my current patch works already pretty well for that sceanrio [18:01] felixge_: it just has problems if massive I/O (writing big file to disk) is happening while the reload takes place [18:03] ericflo has joined the channel [18:05] jasondavies: ah, cool [18:05] jasondavies: I'll try it out then, thanks [18:06] jamiew has left the channel [18:07] ericflo has joined the channel [18:07] isaacs has joined the channel [18:08] orlandov: i'm writing a client library in C++ with libev... once i've gotten my initial write event for the socket, is it necessary to wait for other write events before doing other subsequent writes? or can i do my writes any time as long as the socket is open? [18:13] eddanger has joined the channel [18:17] felixge_: orlandov: I'd suggest posting to the mailing list, AFAIK Ryan is a libev expert but he's not online in IRC right now [18:18] orlandov: felixge_: yeah i was hopeful someone might give me a quick reply but i think i may have to do that :) [18:18] felixge_: orlandov: from my understanding you should be able to write as long as the socket is open if the writes are queued by libev, if you directly access the socket itself you'll most likely block your current thread at least and the whole event loop at worst [18:19] felixge_: (brb, dinner) [18:19] orlandov: oh hm, i wasn't aware that libev could queue my writes [18:19] orlandov: but yeah, i'm talking to the socket directly [18:20] jamiew has joined the channel [18:27] ryah: orlandov: you can write as much as you want - you'll probably get EAGAIN at some point [18:27] ryah: at which point you should wait for a "writable" callback [18:27] orlandov: oh okay, rad [18:28] jamiew has left the channel [18:28] orlandov: yeah, so far, i just write whenever i get a command, but i should probably set the enable the write watcher on a write() EAGAIN [18:28] orlandov: s/set the// [18:29] ryah: yes [18:29] ryah: usually what you do is enable the write watcher and queue that data yourself [18:29] ryah: then try again when the write watcher fires [18:29] orlandov: ohh [18:29] orlandov: gotcha [18:30] orlandov: basically same as i'm doing with input [18:30] ryah: orlandov: what are you working on? [18:30] orlandov: ryah: http://github.com/orlandov/node-mongodb [18:30] orlandov: mongo.cc has the goods [18:31] orlandov: unfortutnely buffering my writes will mean that i'll have to reimplement the mongo send functions [18:31] orlandov: wahh [18:36] ryah: orlandov: it doens't seem that mongo's api is nonblocking [18:37] orlandov: orlandov: it's not [18:38] orlandov: er [18:38] orlandov: ryah: ^^ [18:38] orlandov: i'm taking care to do all the buffering of input and parsing it [18:38] ryah: what you could do try to queue the data in js [18:38] ryah: so have the c++ layer return EAGAIN (in some form) to js [18:39] ryah: and queue up the data in js [18:39] ryah: might be easier [18:39] ryah: you'll have to expose the io watcher then [18:39] ryah: but i have some code for that already [18:40] ryah: orlandov: http://github.com/ry/node/blob/net2/src/node_io_watcher.cc [18:40] isaacs: ryah: that reminds me, what's the best place to look for examples of dealing with integrating blocking c-libs into node? [18:41] isaacs: you gave me some pointers ages ago, and instead of making a note of it, i figured i'd remember. [18:41] orlandov: oh crazy [18:41] ryah: isaacs: it's not easy - usually it will require doing a thread pool [18:41] orlandov: i need to meditate on this :) [18:42] ryah: isaacs: but that's almost as hard as rewriting the library :) [18:42] orlandov: for deblocking the mongo c driver, i basically had to rewrite/duplicate a lot of functionality [18:42] isaacs: like, if you wanted to use glob, for instance. [18:43] isaacs: it would be pretty sweet if there was a way to expose some badly blocking thing to javascript, then pass the blocking JS function to a worker or something. [18:44] ryah: yeah, that's the other way to deal with it - bind the blocking stuff and start a new process to deal with it [18:45] ryah: have it IPC back to the fast process when it's complete [18:45] isaacs: seems like a bit of a scenic route, though, no? [18:45] ryah: well, for some things that might make sense - like crypto [18:46] ryah: but things like this mongo client - it's total overkill [18:46] isaacs: right [18:46] isaacs: or glob [18:46] ryah: yes [18:46] elliottcable: ryah: officially back?! what! [18:46] elliottcable: hah [18:46] ryah: elliottcable: no, not really [18:46] stephenlb has joined the channel [18:46] isaacs: you had said that you had some code that did that for the other posix stuff, right? [18:47] inimino: ryah: ah, did you see my questions about write()? [18:47] jcrosby has joined the channel [18:47] elliottcable: ryah: aww )-: [18:47] r11t has joined the channel [18:47] ryah: isaacs: well src/node_file.cc does a thread pool for the posix file system stuff [18:47] ryah: inimino: no? [18:47] elliottcable: ryah: well, if you have time, I’d appreciate a glance at this: http://groups.google.com/group/nodejs/browse_thread/thread/cf5ae41c5add16ac/73db5f4c9dafc949 [18:47] elliottcable: ryah: it’s about a month old at this point [18:48] inimino: ryah: ah, well it was a while ago [18:48] ryah: elliottcable: oh sorry - i guess i missed that! [18:49] inimino: ryah: the problem is that write() returns a number of bytes, but if you pass it a UTF-8 string and the whole thing isn't written in the first go, then this is a problem [18:49] inimino: ryah: lib/file.js seems to have this bug, though I haven't tested it [18:49] ryah: inimino: oh right [18:49] ryah: inimino: i guess it should return how many chars have been written [18:50] inimino: ryah: I know you are working on binary support in V8 though, so maybe the whole API is going to change? [18:51] inimino: ryah: I think an explicit UTF-8 to binary conversion function would be cleaner, then the encoding parameter can be dropped everywhere [18:51] inimino: ryah: just not sure if there are performance reasons why this can't be done yet [18:51] ryah: inimino: check out this [18:52] isaacs: inimino: isn't that what the commonjs BinaryString stuff is all about? [18:52] ryah: inimino: http://github.com/ry/node/blob/net2/lib/net.js#L166-180 [18:52] inimino: isaacs: yes [18:53] inimino: ryah: looks good [18:53] ryah: ACTION gets a link to the actual commit for the irc log [18:53] ryah: (github sucks) [18:54] elliottcable: ryah: IRC bot. [18:54] elliottcable: ryah: should catch github links, and permalink them [18:54] inimino: yes [18:54] ryah: inimino: http://github.com/ry/node/blob/20eec646b3bf5681fb93475d1f2272f448bd10ea/lib/net.js#L169-180 [18:54] elliottcable: ryah: but yeah, the thread link I dropped you… don’t worry about it too much. It’s not necessary at this particular moment, just when you have time. [18:55] elliottcable: ryah: I ha dhoped somebody other than you would reply, and save you the time, but it looks like nobody but you knows how that Scons stuff works d-: [18:55] inimino: ryah: so something like that would work for now, but what do you think about doing away with the encoding parameters altogether? [18:55] ryah: inimino: so that's probably the correct way to do it [18:56] inimino: ryah: I think it would really simplify the API [18:56] ryah: inimino: well i definitely want to be able to be able to use v8's fast ascii functions [18:56] isaacs: ACTION keeps forgetting to add "binary" or "utf8" and crashes node [18:56] ryah: binary stuff will be done with process.Buffer soon [18:57] ryah: the problem is knowing if a string is all ascii or not [18:57] inimino: isaacs: yeah, I see it causing a lot of confusion [18:57] ryah: maybe we should default to utf8 [18:57] isaacs: utf8 is almost always the right decision [18:57] ryah: it's just, like, a lot slower [18:57] isaacs: true, but it avoids a whole class of very common errors [18:58] ryah: yeah [18:58] inimino: ryah: well, I figured it was there for performance reasons [18:58] inimino: ryah: here's what I'd like to see from an API perspective [18:58] grantmichaels has joined the channel [18:58] isaacs: like getting &çˇ instead of é and whatnot [18:58] felixge_: ryah: hey :) [18:58] ryah: felixge_: hey [18:59] felixge_: ryah: How is life? Ready to strike the bugs with vengeance again? :) [18:59] ryah: felixge_: i have to find a house first - then i will :) [19:00] inimino: ryah: if I'm writing some UTF-8 text to a file, I'd want to write "var bytes=UTF8_to_binary(str);" and then do the typical loop until all bytes are written [19:00] inimino: ryah: then everything that does writing just deals with bytes, and everything that deals with conversion and is slow does so explicitly [19:00] felixge_: ryah: Jan Lehnard & friends are starting the berlin user group on the 12th and I'm supposed to talk about node.js - any new stuff you'd like to get the word out about? Like the net2 rewrite? [19:00] felixge_: * lehnardt [19:01] ryah: felixge_: yeah that'd be cool - i can try to send you an email outlining some new things that i'm working on [19:01] felixge_: I've started working on some redis/couch inspired memory db with disk persistence called dirty which I might do a few slides on. But anything else would be great too [19:01] felixge_: ryah: I'd love it [19:01] ryah: okay, i'll do that tonight [19:01] ryah: inimino: so, generally i agree with you [19:02] felixge_: I think dirty will be able to do 1 mio writes/sec :) [19:02] felixge_: (redis does 110k / sec) [19:02] inimino: ryah: ok, cool [19:02] ryah: inimino: but i want memory allocation of binary buffers to be explicit [19:02] ryah: so it might be something like [19:02] ryah: b = new Buffer(1024); [19:02] ryah: b.writeUtf8(mystring) [19:03] ryah: connection.send(b) [19:03] inimino: hm, that's interesting [19:03] ryah: but i figure all "streams" can have some internal logic about how to allocate those send buffers optimally [19:04] ryah: so you can do connection.send(mystring, "ascii") [19:04] inimino: ah, so the buffer lives in C via malloc()? [19:04] ryah: and it will append it to a partially used binary buffer [19:04] ryah: yeah [19:04] felixge_: ryah: were you able to reproduce the new libeio test case I send out? [19:05] inimino: ok, cool [19:05] inimino: I can see where that would make some performance guarantees easier from JavaScript [19:05] ryah: felixge_: i haven't looked at it yet, sorry [19:05] ryah: inimino: i think the case for defaulting to utf8 is a good on ethough [19:05] ryah: the ascii stuff will be used mostly for http headers and such [19:06] inimino: ryah: alright, sounds good, I will wait for that [19:06] inimino: in general handling of JavaScript strings, probably [19:06] inimino: yes [19:06] felixge_: ryah: np, just let me know when you do. I pretty much hit a wall with debugging libeio - its crazy stuff :) [19:07] ryah: felixge_: yeah, it's hard to think about what the threads are all doing [19:08] ryah: isaacs: thanks for the reorganzing of the commits [19:08] isaacs: ryah: np [19:09] felixge_: ryah: yeah, I did find the code itself to be much more understandable than I expected and I was able to see some patterns in what seems to lead to the problem - but there is some C / Posix magic going on that keeps me from making educated guesses about the real cause of the issue [19:09] felixge_: hopefully future me will be smarter by the end of 2010 :) [19:10] felixge_: isaacs: cool work on the url stuff! [19:10] grantmichaels has left the channel [19:10] isaacs: felixge_: thanks! [19:10] felixge_: I hope to tackle promises again this week, just got a bit overwhelmed by everybodies input : ) [19:11] felixge_: so many details for so little code [19:11] felixge_: :) [19:11] isaacs: felixge_: srsly [19:11] ryah: isaacs: wow. that's a lot of tests :) [19:11] isaacs: the smaller the feature, the more feedback you get. it's the bikeshed phenomenon [19:11] felixge_: hehe [19:12] inimino: felixge_: where's your promises stuff? [19:12] isaacs: ryah: i got most of them from kriskowal, who got them from various http mailing lists and discussion groups and rfcs [19:12] felixge_: well, luckily I think doing the non-mutable promises will be much better than dojos approach [19:12] felixge_: inimino: http://github.com/felixge/node/tree/deferred [19:13] felixge_: this branch is using dojo Deferreds API [19:13] inimino: ACTION looks [19:13] felixge_: but I think I'll start a new one that is more in line with the idea behind CommonJS promises (but not their silly 'then' API, still don't like that) [19:13] isaacs: hey, guess what! i just gave my notice at yahoo. at the new job, i'm going to be working full time on building something serious with nodejs. [19:14] felixge_: I will however suggest adding the 'then' alias if thats all it takes for node.js to be in line with CommonJS [19:14] ryah: isaacs: wow cool [19:14] ryah: isaacs: where at? [19:14] isaacs: proofpoint [19:14] leahculver has joined the channel [19:14] felixge_: isaacs: rock & roll [19:14] felixge_: isaacs: http://www.proofpoint.com/ ? [19:14] isaacs: felixge_: that's the one [19:15] felixge_: I see. T-mobile is a customer, could you please make sure they get what they deserve? :) [19:15] isaacs: hahahah [19:15] sudoer has joined the channel [19:15] brianm has joined the channel [19:15] felixge_: (they have the AT&T-style iPhone monopoly over here in Germany - just as evil) [19:15] felixge_: isaacs: anyway, looks like a cool company [19:16] ryah: isaacs: so i cherry-icked 20260745f663614fe69715b2ef3c4b1236fa7552 and did "./node test/mjsunit/test-url.js" and got an error [19:16] ryah: AssertionError: resolve(http://example.com/b//c//d;p?q#blarg,http:#hash2) == http://example.com/b//c//d;p?q#hash2 actual=http://example.com/b/c/d;p?q#hash [19:16] isaacs: hrm... [19:16] isaacs: lemme see [19:20] martint-t has joined the channel [19:20] isaacs: ryah: works for me? [19:21] felixge_: isaacs: where do I find 20260745f663614fe69715b2ef3c4b1236fa7552 ? [19:21] isaacs: are you sure you got the url.js changes? [19:21] felixge_: I can run the test as well [19:21] ryah: isaacs: md5sum lib/url.js [19:21] ryah: 5675171521f2696f502e6d0add6ff80c lib/url.js [19:22] isaacs: huh. that's what i've got, too [19:22] isaacs: $ md5 test/mjsunit/test-url.js [19:22] isaacs: MD5 (test/mjsunit/test-url.js) = 8fd1ff8890e3f3b4f10ff6c752727e77 [19:22] ryah: felixge_: http://github.com/isaacs/node/commits/url-module-release [19:23] ryah: isaacs: yeah [19:23] ryah: isaacs: i have the same [19:23] isaacs: um... [19:23] isaacs: did someone divide by zero and break math? [19:24] felixge_: ryah: I can't find 20260745f663614fe69715b2ef3c4b1236fa7552 as a commit [19:25] felixge_: ryah: http://github.com/isaacs/node/commits/url-module-release doesn't list it either [19:25] isaacs: ohhh... ryah, you need to also get the updates for the path module. [19:26] isaacs: otherwise it's going to always squash empty path parts. [19:26] isaacs: $ md5 src/node.js [19:26] isaacs: MD5 (src/node.js) = fb2f4018e8aef070695cbda3a17761a4 [19:27] bry has joined the channel [19:27] isaacs: http://github.com/isaacs/node/commit/86a4e06b3df5281edb0b55850a67fc2a5a665997 [19:27] ryah: isaacs: nope- which commit ar ethe patch changes in? [19:27] ryah: *path [19:27] ryah: okay [19:28] isaacs: 1) simplified it so that some weird edge cases like .//. would resolve properly, and added a flag so that you could tell it not to auto-prune empty parts. [19:30] isaacs: if the path module wasn't so essential to module loading, it would've been a good candidate for merging with url, i think, since there's such a dependency there. [19:30] isaacs: but it sort of has to be internal, and url definitely doesn't. [19:31] isaacs: and, any way, while extra slashes are pruned on all posix systems that i know of, i don't think it's quite universal across every os. [19:32] ryah: shrug - bash does it - we can do it :) [19:33] ryah: but yeah, let's ot merge the two - at least yet [19:33] isaacs: right, that's why the default is to do it. but url's don't, since they're designed to be 100% OS agnostic. [19:33] ryah: maybe soon [19:33] ryah: ah okay [19:34] ryah: i think i need to split up the tests soon into different suites [19:34] isaacs: if we ever want to support an OS where slashes are preserved, we could make it a configurable thing or something. [19:34] ryah: taking too long to run [19:34] isaacs: huh? [19:34] isaacs: oh, the test suites [19:34] isaacs: yeah [19:35] isaacs: the http-many-clients thing is annoying. i usually disable it while i'm working. [19:37] ryah: man i love git [19:37] felixge_: ryah: Any reason why the test runner is in python not node? Would make it easier for me to hack it to show which tests take how long [19:37] felixge_: ryah: really? I have a love-hate relationship with it ;) [19:37] ryah: felixge_: because i needed something working :) [19:37] felixge_: ryah: so you'd accept a patch that adds a node runner for the suite? [19:37] ryah: plus if node is broken i can't run tests :) [19:37] ryah: felixge_: i'd rather not do that right now [19:38] ryah: maybe in the future [19:38] felixge_: ok [19:38] isaacs: having the test runner not depend on the thing being tested seems like a good idea to me. [19:38] n8o has joined the channel [19:38] isaacs: having it written in js would be nice, though. i do not love python. [19:38] felixge_: isaacs: as long as node is a moving target I agree [19:39] felixge_: If it wasn't for Linux, Rails & GitHub - I'd think git would be much much less popular :) [19:40] felixge_: submodules are horrible compared to svn externals (which already sucked) [19:40] felixge_: not being able to checkout partial trees is lame [19:41] felixge_: and git remote hates me :) [19:43] teemow has joined the channel [19:43] lattice has joined the channel [19:48] leahculver has left the channel [20:11] DamZ has joined the channel [20:24] charlenopires has joined the channel [20:29] n8o_ has joined the channel [20:35] gwoo has joined the channel [20:53] cloudhead_ has joined the channel [21:09] orlandov: is there a suggested license for node.js extensions? [21:09] orlandov: mit? bsd? [21:10] pdelgallego has joined the channel [21:15] felixge_: orlandov: I'd say MIT as that is what node uses [21:17] orlandov: kk [21:20] LordMetroid: I spit the state's artificial monopoly laws in the face [21:20] LordMetroid: All my information I create is outlawed [21:21] LordMetroid: id est outside the law [21:23] mattly has joined the channel [21:33] rtomayko has joined the channel [21:36] pdelgallego has joined the channel [21:39] onar has joined the channel [21:48] n8o has joined the channel [21:51] ryah: orlandov: mit [21:51] isaacs: i'm a fan of the crockford bsd, myself. [21:51] ryah: isaacs: "no evil" ? [21:51] isaacs: ryah: yep [21:52] ryah: isaacs: yeah, i'm not. it's incompatible with simple mit or bsd. i have to replace the jsmin because of it [21:55] deanlandolt: that clause /has/ to be legally unenforceable...it's funny but all it does is piss in a license pool that has enough urine in it [21:55] isaacs: ryah: if you ask nicely, he might give you an exclusion. [21:55] isaacs: IBM has the right to use jsmin for evil. [21:55] orlandov: lol [21:55] mattly_ has joined the channel [21:55] isaacs: i could ask him. my cube is adjacent to his (for the next few weeks anyway). he's a very nice guy. [21:56] isaacs: but it would be nice to replace jsmin with something a bit more full-featured anyhow [21:57] orlandov: huh, i wasn't aware of this whole issue... /me reads http://www.daemonnews.org/2009/12/28/dont-be-evil-google-spurns-no-evil-software.html [21:57] isaacs: deanlandolt: i think on some level it's a defense against jerks in the foss community who take things to seriously. [21:57] orlandov: isaacs: if you get a chance to tell him thanks for making javascript awesome(r) [21:57] isaacs: i mean, there's a lot of silliness and religion in the foss community. [21:58] deanlandolt: isaacs: no doubt!\ [21:59] deanlandolt: according to the article orlandov just pointed it it looks like it was more a jab at bush's axis of evil bs [21:59] isaacs: yeah, that too [21:59] isaacs: he's got a very dry sense of humor. [22:00] orlandov: zomg licenses are srs business [22:01] deanlandolt: orlandov: they can be [22:01] orlandov: deanlandolt: yeah, i guess i said it kiddingly but any time lawyers are involved it is [22:01] orlandov: blah [22:01] isaacs: i'm not sure how one would use jsmin for evil. but you never know. [22:01] orlandov: i hate dealing with that shit [22:02] orlandov: but i suppose it's good that someone is [22:02] deanlandolt: isaacs: by who's definition of evil? (e.g. hollywood's? the DoD's?) [22:02] isaacs: the license's definition, derr [22:02] deanlandolt: derr [22:02] eviltwin has joined the channel [22:02] orlandov: i think the problem is that it is ambiguous [22:02] isaacs: lots of licenses refer to "commercial use" which is at least as ambiguous [22:03] isaacs: at least the crockford lic looks as silly as it is. [22:04] deanlandolt: exactly...what if you have ads on your cat photo blog? [22:04] deanlandolt: is that commercial? crazy terms just gives lawyers a reason to screw you :) [22:04] orlandov: they need a reason now?? [22:04] isaacs: that's part of why i don't like copyleft licenses. [22:04] deanlandolt: heh :) [22:05] deanlandolt: isaacs: same here...too many open questions...what the hell is "linking" in javascript? [22:05] isaacs: right [22:05] isaacs: if your program only works on linux, does that mean it depends on linux and thus must be gpl? [22:06] deanlandolt: isaacs: ahem...i believe you mean gnu/linux ;) [22:06] isaacs: hahah [22:06] isaacs: ok, rms [22:06] orlandov: rms? is that you? [22:07] deanlandolt: it's been a while since i've shaved...and longer since i cut my hair...i think i'm starting to look like him [22:07] isaacs: deanlandolt: do you eat your foot-skin? [22:07] orlandov: ugh [22:08] isaacs: http://www.youtube.com/watch?v=I25UeVXrEHQ [22:08] deanlandolt: i could only dream for that kind of flexibility [22:09] sudoer has joined the channel [22:09] inimino: poor rms is never going to live that down [22:09] isaacs: that's the kind of thing that makes me think there is such a thing as "too free" [22:09] isaacs: inimino: i kinda get the impression he is 100% deeply unconcerned about it, might not even grok why it's gross. [22:10] orlandov: what do you expect from the author of emacs? [22:10] inimino: probably [22:10] orlandov: ACTION ducks, runs [22:11] inimino: isaacs: but I still think it's immature of people to make such a big deal about it [22:11] qFox has joined the channel [22:11] isaacs: i have lots of respect for rms as a programmer. and like a lot of great programmers, he has wacky politics and social mores. [22:13] inimino: yes [22:13] deanlandolt: i used to be a pretty normal guy...as i get older and more involved in coding both my politics and my social mores are getting wackier :) [22:14] isaacs: if anything, it makes me more comfortable about my own wacky politics and social mores. i'm glad we have foot-chewing rms and gun-toting mysogynist esr to keep us all grounded. [22:15] isaacs: it's like, great athletes are still great athletes if they cheat on their wives. you don't have to be good at all things. [22:16] deanlandolt: i guarantee rms wouldn't have been near as prolific if he was banging porn stars [22:17] isaacs: deanlandolt: depends on your definition of "prolific" [22:17] deanlandolt: ha! [22:18] hassox has joined the channel [22:25] mikeal has joined the channel [22:31] kriskowal has joined the channel [22:35] n8o has joined the channel [22:37] jed has joined the channel [22:39] isaacs: speaking of emacs, it seems it supports variable-width fonts now. http://skife.org/emacs/lol/papyrus/2009/07/30/code_in_papyrus.html [22:39] isaacs: i might have to retrain.... [22:39] orlandov: hah [22:39] orlandov: i lol'd [22:40] isaacs: ACTION misses coding in Georgia [22:40] orlandov: or comic sans [22:40] orlandov: that always cheers me up [22:40] isaacs: orlandov: wash your mouth out! [22:40] isaacs: comic sans is the devil's font. [22:40] orlandov: i definately have a love hate relationship with it [22:40] isaacs: it is the typeface that they use to print the signs and menus in hell. [22:40] orlandov: ha [22:41] isaacs: and also, lots of other awful places. [22:41] orlandov: that's what my dentist uses for all their memo print outs [22:41] orlandov: i'm not really sure why i keep going there [22:42] isaacs: allegedly textmate 2 will support variable width and also variable-font-size coding. [22:42] orlandov: do people like variable font widths? [22:42] isaacs: OMGYES [22:42] orlandov: i have a hard time if my char columns don't line up [22:42] isaacs: there's a reason you don't read books in monospace. [22:42] mattly_: i heard textmate 2 will also make my coffee for me [22:42] isaacs: orlandov: it hurts for like an hour, and then suddenly, it's just gorgeous [22:42] mattly_: that's why it's taking so long [22:42] isaacs: mattly_: it will! [22:43] isaacs: and order pizza and balance your budget and keep your teeth clean. [22:43] hassox has joined the channel [22:43] mattly: and bring world pease [22:43] mattly: er, peace [22:44] orlandov: isaacs: any recommendation for a variable width programming font? [22:45] orlandov: i'll try anything once, twice if i like it [22:45] isaacs: orlandov: i usually used either georgia or tahoma when i was using SciTE [22:45] isaacs: when i went to the mac, i started with textmate, and sadly had to return to the monospace world [22:48] isaacs: but Gotham is also really nice, or Hoeffler Text [22:48] isaacs: they're not free, or even cheap, but they are easy to find if you have flexible morals. [22:59] Sembiance: :) [23:08] mattly: gotham ++ [23:24] hassox has joined the channel [23:24] grantmichaels has joined the channel [23:25] mattly has joined the channel [23:32] hassox_ has joined the channel [23:37] hassox_: ryah: pingo [23:55] charlenopires has joined the channel