[00:00] Tidwell: anyone know whats the name of the firebug-like package for node
[00:01] mikew3c has joined the channel
[00:02] InsDel has joined the channel
[00:03] SubStack: twitter thinks I've made 101 tweets but I've only made a little over 50 :/
[00:04] bingomanatee__: twitter thinks I've made 101 tweets but I've only made a little over 50 :/
[00:05] tim_smart has joined the channel
[00:06] sepi has joined the channel
[00:08] sepi: I'd like to write a simple http server that spawns a process, sends it a get param and returns the result as http response. This seems to be quite a synchronous process. how can I write this in node?
[00:08] bingomanatee__: what is the implication of "var View = exports = module.exports = function View(view, options) {" ... is that just boilerplate to create a quicker reference to module.exports or does that actually do two meaningful things at once?
[00:09] bingomanatee__: sepi have you looked into the express framework?
[00:10] eee_c1 has joined the channel
[00:11] sepi: bingomanatee__: nope, I'm very new with node and thaught that this task would be a nice starter. But it seems that it's not well suited for node
[00:12] eee_c2 has joined the channel
[00:12] olegp has joined the channel
[00:15] bingomanatee__: Let me put my "node starter kit" online for you.
[00:16] bingomanatee__: actually while you can DIY a server - I highly reccommend reading the good examples of express and tweaking them to suit your needs.
[00:18] jmar777 has joined the channel
[00:18] Yuffster has joined the channel
[00:20] bingomanatee__: not that I'm that far ahead - you just might find is useful.
[00:20] nbqx has joined the channel
[00:22] rchavik has joined the channel
[00:22] mscdex: SubStack: well, 101 is 5, so they're just a magnitude off ;-)
[00:23] SubStack: maybe they just changed the base!
[00:23] SubStack: they could just make it say '10'
[00:23] SubStack: then they'd always be right
[00:23] paupau has joined the channel
[00:23] SubStack: except for 1 and 0
[00:24] sepi: bingomanatee__: you mean I should use express for the server? But isn't this possible in plain node?
[00:24] paupau: Does the browser have the same event-based model as node.js?
[00:25] paupau: like, you won't have two events simultaneously running in one page?
[00:25] bingomanatee__: no
[00:26] paupau: Maybe I should ask in a more general javascript channel I suppose.
[00:26] bingomanatee__: Node's event system is stack based - the browsers is DOM based.
[00:26] bingomanatee__: Its a good question. no.
[00:26] paupau: Hmm ok
[00:26] paupau: 'cause I'm sharing code between server and client, but I have some assumptions built in about node.js's single threading
[00:26] paupau: I guess I need to fix that huh.
[00:27] paupau: what does DOM based mean?
[00:27] paupau: Got any reading material?
[00:27] bingomanatee__: Node has an actual javascript module which encodes and manages events. the browsers' event stack is kind of implicit ly welded to the DOM.
[00:28] bingomanatee__: For instance if I create in html: "

Foo

[00:28] bingomanatee__: the actual mechanic which passes signals between your click and the span (or div) is not a javascript module - it is intrinsic in the browser code.
[00:28] paupau: yeah.
[00:29] bingomanatee__: however, node's event stack is in javascript - you could even recode it if you wanted to - you can see it in the node module code.
[00:29] paupau: But will it call do_b first, wait for it to return, and then call do_a?
[00:29] paupau: (or reverse order)
[00:29] bingomanatee__: yes.
[00:29] paupau: that's good at least.
[00:29] bingomanatee__: you were right the first time.
[00:29] paupau: bubble up and stuff right
[00:29] bingomanatee__: But you see the difference - in one case its javascript + browser code
[00:29] paupau: yeah, of course
[00:29] bingomanatee__: in the other case it is wholly you calling a javascript library in node.
[00:30] paupau: I'm more worried about events happening simultaneously
[00:30] bingomanatee__: Within a given request thread I wouldn't worry -
[00:30] paupau: In my case, a race condition between socket.io receiving data and a hidden iframe calling javascript code
[00:30] bingomanatee__: keep in mind that node doesn't work in the browser context. So the two systems will never meet.
[00:30] paupau: yep
[00:31] roberthahn has joined the channel
[00:31] wdperson has joined the channel
[00:31] bingomanatee__: I'm not saying race conditions aren't possible. Just that before node is even referenced, a DOM event will have been reached, in most linear cases.
[00:31] cagdas has joined the channel
[00:32] paupau: http://stackoverflow.com/questions/39879/why-doesnt-javascript-support-multithreading aha
[00:32] paupau: just what I wanted to hear
[00:32] Wyverald has joined the channel
[00:32] bingomanatee__: paupau In reference to "bingomanatee__: you mean I should use express for the server? But isn't this possible in plain node?":
[00:33] bingomanatee__: I am not saying it is impossible. The "hello world" example does exactly what you are asking for.
[00:33] bingomanatee__: And maybe you need to do that just to say you can.
[00:33] paupau: as long as I don't use WebWorkers I should be fine woo
[00:34] chrischris has joined the channel
[00:34] paupau: my crappy big ball of state can continue to be shared yay!
[00:34] bingomanatee__: However, once you have done that you should at least look at express as it does a lot of very sophisticated things including view management, MVC, et all for you and you don't want to just toss hours into your own code operating at a very low level just because you never looked intot he xisting codebses to see if someone has already done that for you.
[00:36] bingomanatee__: It would be like learning rails without learning ruby. Or the other way around maybe - I never bothered to look at ROR It felt like .NET all over again.
[00:36] paupau: But does it ble^H^H^H^H have normalized URL routing?!
[00:36] bingomanatee__: yes.
[00:36] paupau: ooh.
[00:36] bingomanatee__: and regex interpreted routing. And variable interpolated routing.
[00:37] bingomanatee__: and get/post differentiation. And 4 different view template modules. And cookies.....
[00:37] paupau: but does it have online template rendering?!
[00:37] bingomanatee__: Just walk through http://expressjs.com/guide.html
[00:37] bingomanatee__: no - that's what jQuery is for :D
[00:38] paupau: but graceful degradation!
[00:38] bingomanatee__: You won't be able to replace jQuery with node.js.
[00:38] paupau: what
[00:38] paupau: Dammit what are you talking about
[00:38] paupau: this has nothing to do with the client
[00:39] paupau: rendering templates online i.e. streaming template rendering
[00:39] paupau: hmm yeah that's ambiguous
[00:39] bingomanatee__: It has streaming .. however I'm not too familiar with online template rendering. If you mean client side templates then no.
[00:40] bingomanatee__: And I might be too green to know the answer.
[00:40] paupau: not client side
[00:40] paupau: as in response.write('this is not buffered')
[00:40] Aria: Incremental rendering, so no more than needed is done at a time?
[00:40] paupau: but for fragments of the template
[00:40] kylixz has joined the channel
[00:41] paupau: I think so Aria
[00:41] tylergillies has joined the channel
[00:41] Aria: I'm not aware of such a thing yet.
[00:41] bingomanatee__: does this (http://expressjs.com/guide.html#res-send-body-status-headers-status-status-) look right?
[00:41] paupau: lazy templates, so if you have a slow db call or something it renders and sends template-rendered rows as it goes
[00:41] paupau: but anyway you could easily simulate that by just calling a row template over and over
[00:42] paupau: and get your desired level of granularity
[00:42] bingomanatee__: That scenario still sounds like ajax + jquery to me.
[00:42] Aria: YEah. None too hard for specific cases.
[00:42] paupau: all server side, bingomanatee__
[00:42] Aria: Not neccesarily, bingomanatee__. Browsers render HTML as it comes in.
[00:42] bingomanatee__: If you expect your DB to block your template, then it belongs on a seperate forked thread, not your rendering process.
[00:42] Aria: Send a thead and tfoot, then the rows of the table, and it'll fill them in as it gets them, even if it takes minutes
[00:43] Aria: Things like that.
[00:43] paupau: bingomanatee__: forked thread? block? in MY node.js?
[00:43] Aria: Why thread?!
[00:43] bingomanatee__: no as in:
[00:43] Aria: When you get a result, render and send!
[00:43] bingomanatee__: write your page with no data
[00:43] Aria: No need to make it a separate thread.
[00:43] bingomanatee__: include jquery
[00:43] paupau: dammit there is no jquery here
[00:43] paupau: this is all serverside
[00:43] Aria: Why jquery?!
[00:43] bingomanatee__: call your data once your page is rendered
[00:43] Aria: Why do that?!
[00:44] bingomanatee__: I am going somewhere with this.
[00:44] paupau: we're rendering templates, not creating client-side DOM views
[00:44] Aria: Search engines won't see it, it's a specific technique that doesn't always have a use, jquery and ajax.
[00:44] bingomanatee__: If your database is blocking your page render then your DB call doesn't belong in your page rendereing thread
[00:44] bingomanatee__: Ah.
[00:45] Aria: And sure, that's the problem -- if things are synchronous.
[00:45] Aria: But if you can do things incrementally, then it's not a problem.
[00:45] mohiam_ has joined the channel
[00:45] paupau: Hmm where is the normalized routing?
[00:46] paupau: Like, Django-style where you write a URL only once
[00:46] MikhX has joined the channel
[00:46] paupau: and if you want to generate a URL to that view later you pass in the name/object of that URL instead of copy pasting the URL string
[00:47] bingomanatee__: Okay, if SEO demands ... I think it will still "block" express. You could use events in node to fork the processes .. i.e., create an event to handle the pre-DB page, the DB part of the page, and the post-DB part of the page
[00:47] paupau: what?
[00:47] paupau: if you use an asynchronous DB interface there's no blocking
[00:48] bingomanatee__: yep.
[00:48] paupau: and that's a given in node
[00:48] bingomanatee__: okay I should probably shut up now ...
[00:48] paupau: ACTION shrug
[00:49] paupau: I'm still not entirely comfortable with the asynch model, flowJS is helping me cope though
[00:49] bingomanatee__: I'm still having trouble remembering not to use my php-inspired '.' to join strings :D
[00:50] SubStack: paupau: seq! github.com/substack/node-seq
[00:50] SubStack: bah stupid chrome
[00:50] SubStack: http://github.com/substack/node-seq
[00:51] paupau: ooh, interesting.
[00:51] paupau: using https://github.com/willconant/flow-js but will check this out
[00:51] paupau: looks more capable
[00:51] SubStack: also check out step and async.js
[00:51] mscdex: eh? chromium inserts the protocol portion for me when copying to the clipboard
[00:51] mohiam_ has joined the channel
[00:51] SubStack: I based the design for seq around step the most
[00:52] SubStack: except mine is chainable and has other goodies like parallel loops and resource limits :p
[00:52] mscdex: take that step!
[00:52] bingomanatee__: so what does seq do? it looks like it forces events to be executed in order.
[00:53] lin_ has joined the channel
[00:53] SubStack: mscdex: yeah chromium usually works but sometimes messes up. I think there's a race condition when I ^l^c the text too quickly
[00:53] mscdex: :S
[00:53] mscdex: SubStack: what chromium version?
[00:53] eee_c has joined the channel
[00:54] SubStack: an old one: 6.0.416.0 (48140)
[00:54] mscdex: oh
[00:54] mscdex: well, on 9.0 it works no matter how fast i copy it
[00:54] mscdex: not sure about previous versions
[00:55] SubStack: 9.0!
[00:55] SubStack: crap I need to upgrade
[00:55] mscdex: :-D
[00:55] mscdex: i download new nightlies every once in awhile and use those
[00:55] SubStack: they'll run out of numbers at this rate
[00:56] mscdex: nevar!
[00:56] bingomanatee__: There's always hex.
[00:56] SubStack: also: I hate putting multiple functions in the same function call
[00:56] SubStack: it feels... durty
[00:57] yumike has joined the channel
[00:57] SubStack: that was my main motivation for writing seq, as trivial as that is
[00:57] mscdex: multiple functions in the same function call?
[00:57] SubStack: like Step(function () {}, function () {})
[00:57] mscdex: oh that
[00:58] SubStack: all the async libs seem to do it that way
[00:58] SubStack: except for mine!
[00:58] SubStack: chains <3
[00:58] bingomanatee__: Cood be useful.
[00:58] mscdex: i cheat and just reuse named or anonymous functions as a state machine
[00:58] bingomanatee__: I'm stuck with a grandfather who's hung up on the lack of transactional control with MongoDB.
[00:58] mscdex: :p
[00:59] bingomanatee__: Now I can say, "Don't worry - we'll manage that with event chaining in Node.js's seq library"
[00:59] bingomanatee__: and watch him crap himself.
[00:59] SubStack: hah
[01:00] irclogbot_ has joined the channel
[01:00] bingomanatee__: as I slowly destroy his precious collection of PERL scripts....
[01:00] SubStack: it's very bleeding edge, I only started the project on friday night
[01:00] bingomanatee__: We don't have any clients. I can bleed a little :D
[01:00] SubStack: but 337 lines of expresso tests, so it's not so unproven
[01:01] bingomanatee__: a-some.
[01:01] sstreza: im trying to embed node.js in a custom library, i'm calling node::Start but i dont have access to the app's supplied argc/argv, and it's crashing while trying to parse args. can someone tell me what the args array is expected to be?
[01:01] rchavik has joined the channel
[01:02] cagdas has joined the channel
[01:02] irclogbot_ has joined the channel
[01:03] irclogbot_ has joined the channel
[01:03] sh1mmer has joined the channel
[01:03] Nohryb_ has joined the channel
[01:03] weng: anyone knows how i use dependencies in npm
[01:04] weng: "dependencies": { "connect": ">= 0.3.0" }
[01:04] weng: what if i want the latest version
[01:05] unomi: how would you know?
[01:05] irclogbot_ has joined the channel
[01:06] unomi: doing stuff like >= version is a bad idea
[01:06] JimBastard has joined the channel
[01:06] jashkenas: unomi: strongly disagree.
[01:06] unomi: it is the dependency management version of browser sniffing
[01:06] unomi: jashkenas, why so?
[01:07] unomi: I think you would agree that 0.4.0 is >= 0.3.0
[01:07] unomi: I think you might also agree you have no idea to what degree they will diverge
[01:08] mscdex: then you update your package version to be compatible with newer dependency versions ;-)
[01:08] unomi: heh
[01:08] jashkenas: unomi: It's better to allow new versions than to disallow them. Recently, Rails' hardcoding of version numbers has caused endless compatibility headaches that are completely unnecessary.
[01:08] jashkenas: Including a serious outstanding params-parsing bug since June!
[01:09] unomi: that goes both ways though, you can either ship something that you *know* should work as is, or you can ship something that you think oughtha hopefully work
[01:10] unomi: if you later find that the next major version works fine, then you just bump your dependency version
[01:10] jashkenas: You might *think* it works, but you don't *know*.
[01:10] unomi: well, you can test against what is here today
[01:10] jashkenas: If you find a bug, you need to allow the upstream project to fix it,
[01:10] jashkenas: And bugs by definition pass your tests without you realizing it.
[01:11] unomi: right, and if there is some bug you can either nudge the package manager to test and bump the dependency version, or do so yourself in your package.json
[01:11] jashkenas: "just bump the dependency version" is fine in theory. In practice, as I said, rails 2.3.x has been out since June, and is still hard-coded against a broken version of Rack.
[01:11] unomi: rails is made by people who should have stayed in marketing.
[01:11] mattcodes has joined the channel
[01:12] unomi: I am not sure what you mean by hard coded though
[01:12] Aria: Perhaps we need to have a separate 'tested with' and 'requires' versions.
[01:12] bingomanatee__: unomi ... they did.
[01:13] Aria: requires: 'express >= 1.0.0'; tested: 'express = 1.0.0'
[01:14] zentoooo has joined the channel
[01:14] unomi: bingomanatee__, that is quite stunning
[01:15] saschagehlich has joined the channel
[01:15] bingomanatee__: Rails is the best marketing job since Java.
[01:15] isaacs has joined the channel
[01:16] christophsturm has joined the channel
[01:16] isaacs: weng: npm help json explains it pretty well
[01:17] weng: isaacs: oh .. was looking for dependencies man page .. thanks
[01:17] bingomanatee__: I personally would rather have my dependency chain crash and burn after installing an upgrade of a dependant library than hold it on faith that function foo() 2.0 == function foo() 1.0.
[01:19] Aria: Or, perhaps, we need to separate dependencies into a separate database: "foo 1.0 works with bar 2.0"
[01:19] bingomanatee__: Unless you want to be ubercool and have your unit tests write your dependency chain for you.
[01:19] Aria: And then upvote them.
[01:19] bingomanatee__: Aria ... I guess that was kind of what I was thinking of.
[01:19] isaacs: bingomanatee__: yeah? and?
[01:20] isaacs: i mean, it's not like that's a problem in npm. just { "dependencies": { "foo" : "whatever version works for me" }}
[01:20] isaacs: it won't collide
[01:20] bingomanatee__: If you can have your unit tests validate in a black box level that a given function is valid for your purposes you could have them then say "tested under version X" and save that version some how ... but frankly that sounds like artificial stupidity.
[01:20] unomi: isaacs, we were discussing the relative merits of "dependencies": { "connect": ">= 0.3.0" }
[01:20] isaacs: oh, ok
[01:21] isaacs: the thing about different databases seems odd to me.
[01:21] unomi: personally I think it is an accident waiting to happen
[01:21] unomi: come 0.4.0 etc
[01:21] isaacs: well, it's a broken program waiting to happen. but all programs are broken programs waiting to happen.
[01:21] Aria: That ++
[01:21] bingomanatee__: I would prefer to say "connect: "0.3.0" in code and force myself to re-consider the implications across the board when I upgrade.
[01:22] bingomanatee__: So maybe I get lazy and don't upgrade just because I feel like it
[01:22] isaacs: npm states that it works with node >= 0.2.0, and it does. i've been keeping it portable as 0.3.x changes.
[01:22] bingomanatee__: and maybe that is a good thing.
[01:22] isaacs: but that's not trivial or for everyone. fixing the dependency at a specific point is a lot easier.
[01:22] sam1vp has joined the channel
[01:22] isaacs: removes a lot of problems.
[01:22] unomi: excuse my ignorance, but can you do ranges?
[01:22] isaacs: unomi: sure.
[01:23] unomi: 0.3.0 > node >= 0.2.0
[01:23] isaacs: npm supports any of these: "0.1.2 - 1.2.3" ">0.1.2 <=0.3.0" "0.1.2 || 0.1.3 || >0.2.3"
[01:23] unomi: nice
[01:23] isaacs: space is "and", || is "or"
[01:23] isaacs: the - is "special"
[01:24] isaacs: you can't do 0.1.2 - 0.2.3 >0.2.0
[01:24] isaacs: it won't recognize the structure unless it goes from start to finish
[01:24] Alex3000 has joined the channel
[01:25] jashkenas: isaacs: (curiousity) how many loc is npm these days?
[01:25] isaacs: good question.
[01:25] isaacs: a lot, probably. just a second...
[01:25] jashkenas: it's very featureful.
[01:26] SubStack: $ wc -l $(find -name \*.js)|tail -n1 6750 total
[01:26] isaacs: 6750
[01:26] isaacs: yeah
[01:26] isaacs: the focus of 0.3.x will be refactoring, i think
[01:26] isaacs: there's just a few more things to get done first.
[01:26] isaacs: and then it'll probably be feature-frozen-ish
[01:27] SubStack: sweet, that should make my automated probing of the gooey innards easier
[01:27] isaacs: hehe
[01:27] SubStack: the creamy nougat core of npm
[01:28] isaacs: jashkenas: when i strip out empty lines and // comments, it's 6594 lineas
[01:28] jashkenas: isaacs: nice.
[01:29] isaacs: oh, also, that includes several test packages...
[01:29] isaacs: 6575 of actual npm code
[01:30] isaacs: it'll probably top out around 8k and then start going down.
[01:30] bradleymeck has joined the channel
[01:30] isaacs: maybe 10
[01:30] SubStack: I wrote 1k+ lines of code this weekend
[01:31] SubStack: much higher hacktivity than usual, I like it when that happens
[01:32] Nohryb_ has joined the channel
[01:32] shirro has joined the channel
[01:35] mattcodes has joined the channel
[01:36] samfalkner has joined the channel
[01:38] mscdex: SubStack: i'm over 1k since yesterday
[01:38] mscdex: :D
[01:38] SubStack: my code is compact :p
[01:38] mscdex: i have 250 lines of constants ;D
[01:39] mscdex: so far
[01:39] mscdex: hehe
[01:40] cjmFloating has joined the channel
[01:40] ossareh has joined the channel
[01:41] mscdex: documentation for oscar sucks so bad
[01:44] SubStack: v8: [2] == 2
[01:44] v8bot: SubStack: true
[01:44] SubStack: how the fuck is that true
[01:44] SubStack: I know == was bad, but I had no idea just how bad
[01:45] jashkenas: == is real bad.
[01:45] MattJ: ...
[01:45] SubStack: it must be doing coercion to strings
[01:45] mscdex: i never use == anymore
[01:45] SubStack: assert.equal-- for using the ==
[01:45] jashkenas: v8: [2] == '2'
[01:45] v8bot: jashkenas: true
[01:45] SubStack: v8: 2 == [2]
[01:45] v8bot: SubStack: true
[01:45] lianj: haha
[01:45] jimt has joined the channel
[01:45] jashkenas: v8: [+2] == ['2']
[01:45] v8bot: jashkenas: false
[01:45] bingomanatee__: does express have a default 'defaultEngine' :?
[01:46] jashkenas: bizarre.
[01:46] mscdex: === is faster than == according to some jsperf test someone did once
[01:46] jashkenas: v8: == == ===
[01:46] v8bot: jashkenas: SyntaxError: Unexpected token ==
[01:46] mscdex: pwnt
[01:46] yenz: === doesn't do type coercion, either
[01:46] yenz: so it's "more reliable" than ==
[01:46] mscdex: i know
[01:46] mscdex: :-D
[01:46] unomi: v8:[+2]
[01:46] v8bot: unomi: [2]
[01:47] MattJ: yenz: that's why it's being discussed :)
[01:47] jashkenas: (coffeescript has no notion of "==" for this reason.)
[01:47] polotek has joined the channel
[01:47] yenz: ah so
[01:47] yenz: = "}
[02:04] isaacs: bingomanatee: "engines" : { "node" : ">= 0.2.1 <0.3.0" }
[02:04] polotek: bingomanatee: I wasn't referring to your problem. This is some local dev I'm doing
[02:05] bingomanatee: i figured that out.
[02:05] polotek: but in general yes, that's how you would prevent the version issue with npm
[02:05] bingomanatee: thx though
[02:05] atmos has joined the channel
[02:06] atmos: does anyone have an simple examples of using a cakefile with coffeescript projects for testing ?
[02:06] jashkenas: atmos: coffee-script itself has a fairly complex example of using it.
[02:06] atmos: that's what i figured
[02:07] atmos: is it advised to compile my stuff to js and require it normally from there or can i require the coffee script itself ?
[02:07] jashkenas: you can do either. It's recommended to compile to JS first.
[02:07] atmos: i looked at your pixel-ping examples but it looks like you compile stuff to lib
[02:07] atmos: right on, i'll check the coffee-script cakefile
[02:07] atmos: thanks again
[02:07] jashkenas: this is for tests for camo?
[02:08] tswicegood: isaacs: (ot from current talk) have you considered adding a ~> to npm?
[02:08] isaacs: tswicegood: hey
[02:08] isaacs: what would that do?
[02:08] jashkenas: any minor version of the number.
[02:08] isaacs: i mean, gimme some examples.
[02:08] tswicegood: ~> '0.2.1' == {"node":">= 0.2.1 < 0.3.0"}
[02:08] isaacs: what's ~>0.0.1
[02:09] tswicegood: 0.0.2, 0.0.3, etc
[02:09] tswicegood: until 0.1.0
[02:09] isaacs: ok
[02:09] hoffa has joined the channel
[02:09] tswicegood: was thinking about adding it as a patch, but wanted to check to make sure you hadn't already thought of it and/or tried to implement it
[02:09] isaacs: so generally, then, ~>X.Y.Z ==> >=X.Y.Z 2.0.0 then >=2.0.0 <2.1.0? if it's really that simple and clear cut, with zero edge cases, and can be tested and doc'ed, then sure, i have no philosophical problem with it
[02:11] isaacs: jashkenas++A
[02:11] isaacs: jashkenas++
[02:11] v8bot: isaacs has given a beer to jashkenas. jashkenas now has 1 beers.
[02:11] jimmybaker has joined the channel
[02:11] isaacs: yeah, that's why "x.y.z" is "=x.y.z" in npm
[02:12] tswicegood: isaacs: what about ~>2.x.x or ~>2.1.x
[02:12] tswicegood: then that leaves it up to the writer of the package.json to figure out what they want to use
[02:12] SvenDowideit_ has joined the channel
[02:12] isaacs: tswicegood: hmm.... starting to get sketchy
[02:12] bingomanatee: What if instead of using wheels we used hexagons with rounded corners
[02:12] bingomanatee: and rounded them til the round bits touched?
[02:13] tswicegood: isaacs: how so?
[02:13] bingomanatee: We'd have the fastest hexagons ever!
[02:13] isaacs: tswicegood: i'm all for making it terser, and that's great, but i start to worry about expectations and stuff
[02:13] isaacs: ~>x.x.x then would be *?
[02:13] JimBastard: are atmos and Atmoz the same person?
[02:14] tswicegood: ~> should be the same as a straight package requirement with a warning to the dev saying "uhh... what are you trying to do?" :-)
[02:14] weng: how do you kill a node script?
[02:14] tswicegood: ~> x.x.x that is
[02:14] JimBastard: weng: process.exit() works
[02:14] isaacs: tswicegood: i see
[02:14] atmos: JimBastard: i dunno who atmoz is
[02:14] bingomanatee: This feels like a PERL approach.
[02:14] atmos: dude's bitin' my stylez
[02:14] JimBastard: atmos: lol oops
[02:14] atmos: ;)
[02:14] weng: thanks
[02:14] isaacs: tswicegood: why the >?
[02:14] JimBastard: i sent him a pm thinking it was you
[02:14] isaacs: tswicegood: why not just ~
[02:15] isaacs: tswicegood: would there be a ~
[02:15] tswicegood: isaacs: just copying rubygems ;-)
[02:15] isaacs: tswicegood: noooooo!!!!!!
[02:15] atmos: JimBastard: lol, you still in SF ?
[02:15] JimBastard: atmos: back in NYC for techstars interviews
[02:15] tswicegood: thought it does sort of make sense "approximately this (or better)"
[02:15] atmos: ahh nice
[02:15] JimBastard: i might have to stay out here for a few more months
[02:15] atmos: i had friends do that in boulder
[02:15] atmos: they really enjoyed that shit
[02:15] JimBastard: it seems cool, all the mentors out here are good people
[02:15] JimBastard: know most of them already
[02:16] atmos: it was basically a cult of folks in CO
[02:16] atmos: if you didn't know them it was kinda mysterious
[02:16] JimBastard: yeah, the bunker
[02:16] bingomanatee: why not just have a +/- amount? "=0.1.2 +/- 0.0.1"
[02:16] atmos: jashkenas: is there verbose mode for cakefiles or anything ?
[02:16] tswicegood: isaacs: there's a pretty good breakdown from wycats on his blog: http://yehudakatz.com/2010/08/21/using-considered-harmful-or-whats-wrong-with/
[02:17] isaacs: tswicegood: ok, sure. if you wanna write the patch, i'll accept it. everything you need to do is in lib/utils/semver.js. please refer to `npm help coding-style` for guidelines, update the docs in doc/json.md
[02:17] jashkenas: atmos: I'm not sure what you mean, but no...
[02:17] JimBastard: i had a friend who went to school in boulder and actually had to leave because of all this anti-semitic stuff. people broke into her door room and put spray painted nazi related things. im sure it was an isolated incident, but still
[02:18] SubStack: !
[02:18] Aria: Yow.
[02:18] atmos: jashkenas: i guess rake has a --verbose option that shows you which tasks are being invoked etc
[02:18] isaacs: tswicegood: Hey, what about ~>1.2 to mean: >=1.2.0 2.0.0
[02:18] atmos: i think my mental model of rake is prolly fucking me over
[02:18] atmos: i'll read the docs and some more examples
[02:18] jashkenas: atmos: cake is super-minimal. there's nothing to it. http://jashkenas.github.com/coffee-script/documentation/docs/cake.html
[02:19] jashkenas: register tasks, invoke them, print a listing, nothing more.
[02:19] isaacs: nah, that's a bad idea.
[02:19] isaacs: all versions shall be semver.
[02:19] isaacs: none of this 1.x malarky
[02:20] JimBastard: jashkenas: what are you using cake for right now?
[02:20] atmos: i'm trying to avoid writing a makefile/rakefile in my js projects that use coffee
[02:20] JimBastard: ive come to the conclusion that coffeescript and related products are the RoR for javascript
[02:21] atmos: it's different enough that i like it now that i feel like i understand java better than i did a year ago
[02:21] jashkenas: JimBastard: any task that would be in a makefile, for node projects.
[02:21] JimBastard: now all we need is a three letter acronym for jashkenas
[02:22] jimt has joined the channel
[02:22] jashkenas: JimBastard: install, build, doc, bench, test ... etc.
[02:22] JimBastard: ahhh
[02:22] JimBastard: we've just been using Makefile
[02:22] tswicegood: isaacs: was digging into rubygems code to see how they handle it... looks like its explained here http://blog.zenspider.com/2008/10/rubygems-howto-preventing-cata.html
[02:23] tswicegood: scan for the version/spec table at the bottom
[02:24] isaacs: tswicegood: yeah
[02:24] isaacs: so then, ~>x.y ==> >=x.y.0 1.2 ==> >=1.2.0 <1.3.0
[02:24] richcollins has joined the channel
[02:25] isaacs: oh, no, worse
[02:25] isaacs: ~>x.y ==> >=x.y.0 is convenient when you depend on projects that release bugfixes
[02:25] isaacs: oh, that's beyond retarded.
[02:25] isaacs: can we fix this?
[02:25] tswicegood: https://gist.github.com/719520
[02:26] tswicegood: there's the base, let's play with it
[02:26] isaacs: ~>3.0 should not be different from ~>3.5 by virtue of the fact that the first uses 0 and the seoncd uses 5
[02:26] isaacs: both should be >=3.N.0 <4.0.0 or <3.(N+1).0, but not treating zero special
[02:26] tswicegood: according to that gist they are equal
[02:27] isaacs: ok... so what's ~>3
[02:27] jimt_ has joined the channel
[02:27] isaacs: 3.0.0 to 4.0.0?
[02:27] tswicegood: looks like they require ~> 3.0, but yeah
[02:27] isaacs: forget about gems
[02:28] isaacs: we can diverge. ruby is the past.
[02:28] SubStack: fact
[02:28] tswicegood: ;-)
[02:28] SubStack: let them have their `require 'rubygems'`
[02:28] tswicegood: Trying to keep the wtf factor a minimum for people who have seen these before
[02:28] SubStack: at the top of every file
[02:28] isaacs: yeah, totally
[02:28] isaacs: towards that end, it might be a good idea to drop the >
[02:29] isaacs: ~2.0 ~1.2.3 etc.
[02:29] tswicegood: my only prob with ~ is that 1.9 is approximately 2.0 ;-)
[02:29] isaacs: not here it isn't
[02:29] isaacs: actually, since you can have 1.10, 1.11, 1.23412
[02:29] isaacs: 1.9 is roughly the same distance from 2.0 as 1.0 is
[02:30] tswicegood: well, yeah... but the > adds "it is at least this or greater"
[02:30] isaacs: or you can be like node, and jump from 0.1.31 to 0.1.90
[02:31] boaz has joined the channel
[02:31] tswicegood: yeah -- it sort of breaks down once you get out of semver
[02:31] isaacs: ok, sure
[02:32] isaacs: so, whatever, i'll leave it up to you if you wanna add it.
[02:32] isaacs: just make sure it's explained in doc/json.md and tested on the bottom of lib/utils/semver.js
[02:32] mjr_ has joined the channel
[02:33] jimt has joined the channel
[02:33] isaacs: the easiest way is probably to handle it a bit like how ranges are done, where you've got a pattern to match, and then a function to replace it or something
[02:34] Nohryb has joined the channel
[02:34] isaacs: tswicegood: ^
[02:34] tswicegood: isaacs: yup - will take a look at the code and see about getting you a patch
[02:34] isaacs: kewl
[02:35] tswicegood: writing out how they'd actually work :-)
[02:35] tswicegood: it does get dicey when you do things like "~> 3" versus "~> 3.0" being different and such...
[02:36] bingomanatee: Writing code to solve problems that existing code already solves is an antipattern.
[02:36] isaacs: tswicegood: call ~>3 undefined.
[02:36] Aria: Unless it integrates poorly or has a conceptual flaw, rather than just being messy.
[02:36] isaacs: must have at least two parts, i think
[02:36] tswicegood: bingomanatee: technically C solves a problem that Assembler solves ;-)
[02:37] isaacs: unless ~>3 is just >=3.0.0
[02:37] tswicegood: I updated the gist https://gist.github.com/719520 3.0 is >=3.0.0 <4.0.0, right?
[02:37] MattDiPasquale has joined the channel
[02:37] tswicegood: isaacs: that's where it gets dicey ;-)
[02:37] isaacs: tswicegood: the >s should be >=s
[02:38] bingomanatee: I think ~> 3.0 should mean whatever you want it to mean.
[02:38] isaacs: oic
[02:38] tswicegood: see the gist - it makes sense to treat ~> 3 different than ~> 3.0
[02:38] isaacs: yeah, i agree
[02:38] isaacs: so ~>X.Y is X is 3.0 and ~>3.0.0?
[02:39] Aria: Heh. The problem with all of this is that it's having people make assertions about things that don't exist yet.
[02:39] tswicegood: Aria: +1 :-/
[02:39] isaacs: Aria: yeah, but it's good to allow people to make promises.
[02:40] tswicegood: isaacs: yeah... that's the problem... I would say X or Y are treated as significant, but Z is not
[02:40] Aria: Yeah. I'm in favor of encouraging people to separate the definite from the possible assertions.
[02:40] tswicegood: other than to say it's at least Z
[02:40] Aria: "definitely >= 3.0.0; not neccesarily >= 4.0.0"
[02:40] isaacs: if you only allow people to make promises that won't break, then you don't let them say a lot of interesting things
[02:40] isaacs: tswicegood: the simple solution is to still require a full semver version
[02:40] isaacs: even with a ~>
[02:41] tswicegood: isaacs: yeah - ~> with anything less than x.y.z causes an error
[02:41] isaacs: if you wanna say ">=3.0.0 <4.0.0" then you can do that, by saying it the way i just said it
[02:41] Fenda has joined the channel
[02:41] agnat has joined the channel
[02:41] isaacs: ~> should require all three parts.
[02:42] isaacs: note that semver in npm can also optionally contain a 4th numeric vector, and a tag
[02:42] isaacs: 1.2.3-4-beta
[02:42] CIA-54: node: 03Ryan Dahl 07master * r102b1d9 10/ (lib/securepair.js test/simple/test-securepair-client.js): Add simple securepair client test - http://bit.ly/i5mlOT
[02:42] CIA-54: node: 03Ryan Dahl 07master * r8012f2c 10/ TODO : Add some TODO items - http://bit.ly/fIFahO
[02:42] isaacs: so as to play nice with git describe --tag
[02:43] samfalkner has joined the channel
[02:43] mattcodes has joined the channel
[02:46] paulrobinson_ has joined the channel
[02:46] polotek: random question
[02:46] polotek: if you're sending chunks of data to a re-entrant parser
[02:47] polotek: would you expect the function to return the number of bytes consumed
[02:47] polotek: or the current status?
[02:47] Fenda: any recommendations for a js local storage plugin? looking into jStorage, or jquery-jstore
[02:47] Aria: Any chance it doesn't remember data it didn't consume?
[02:47] cagdas has joined the channel
[02:47] Aria: If so, then number of bytes. If not, then state.
[02:48] isaacs: Aria++
[02:48] v8bot: isaacs has given a beer to Aria. Aria now has 1 beers.
[02:49] polotek: Aria: it doesn't keep the data
[02:49] polotek: or at least I don't think it does
[02:49] polotek: I'm not 100% sure how it works yet
[02:49] polotek: which is why I'm messing with it :)
[02:49] unomi has joined the channel
[02:49] Wyverald: hey, this v8bot is cute..
[02:49] jimt_ has joined the channel
[02:50] Wyverald: v8: 'whose is it?'
[02:50] v8bot: Wyverald: "whose is it?"
[02:50] Aria: Bleah. I hate disk checks.
[02:54] Nohryb has joined the channel
[02:55] jimt has joined the channel
[02:55] boaz has joined the channel
[02:58] Nohryb_ has joined the channel
[02:59] nooder has joined the channel
[03:00] jimt_ has joined the channel
[03:02] Nohryb_ has joined the channel
[03:03] elijah-mbp has joined the channel
[03:08] jimt has joined the channel
[03:10] arrty has joined the channel
[03:10] Nohryb_ has joined the channel
[03:10] whyme has joined the channel
[03:10] mscdex: heh i love reading funny code comments in large projects
[03:10] mscdex: "This stuff is entirely too complicated. You don't know the half of it."
[03:11] mscdex: :-D
[03:11] bneil: lulz
[03:11] mscdex: s/stuff//
[03:11] mscdex: from the pidgin source ;-)
[03:15] Nohryb has joined the channel
[03:15] whyme: any frontend guy here?
[03:16] yumike has joined the channel
[03:22] weng: would you describe node.js as a framework or library
[03:23] bneil: whyme: wat did you need?
[03:23] JimBastard: whyme: sup
[03:23] whyme: JimBastard: bneil: well, i did an http server which automatically refreshes your browser
[03:24] JimBastard: whyme: okay?
[03:24] whyme: every time the file's changed, browser got refreshed.
[03:24] whyme: might be good for html/css/js quick prototyping
[03:24] JimBastard: whyme: are we talking ajax or are you retriggering the whole page to load? also, whats this for?
[03:25] whyme: JimBastard: reloading the whole page, just like live-preview
[03:25] JimBastard: whyme: i tend to only do single page applications where the client is responsible for templating. so i can achieve that functionality just by calling a few javascript methods
[03:25] JimBastard: and not reloading the entire page
[03:25] mbrochh has joined the channel
[03:25] jimt_ has joined the channel
[03:25] JimBastard: but, i could see some utility in the tool you are describing, albiet maybe a limited one
[03:25] JimBastard: you got it open-sourced?
[03:26] whyme: yep, github.com/5long/roil
[03:27] JimBastard: whyme: first node.js project?
[03:27] Nohryb_ has joined the channel
[03:27] isaacs: ever try piping from a net server to a child_process doing bash -l?
[03:27] isaacs: it's trippy
[03:27] JimBastard: whyme: i see you built a lot of things from scratch, thats pretty cool
[03:27] whyme: JimBastard: did a unit-test framework so it's the second one.
[03:27] meck has joined the channel
[03:28] paulrobinson has joined the channel
[03:29] JimBastard: whyme: uses socket.io cool
[03:29] cataska has joined the channel
[03:30] whyme: JimBastard: ye I need real-time refreshing~
[03:31] JimBastard: whyme: have you seen www.vowsjs.org ?
[03:31] whyme: JimBastard: yep, but I don't like deeply nested object literals
[03:31] aconbere has joined the channel
[03:31] JimBastard: amen
[03:31] JimBastard: we are working on a solution for that
[03:31] JimBastard: using Gherkin
[03:32] Nohryb_ has joined the channel
[03:33] yumike has joined the channel
[03:35] micheil: isaacs: ?
[03:35] isaacs: micheil: hey, i was pinging you earlier about what readinstalled not working?
[03:35] micheil: yeah
[03:35] micheil: for some reason if I use the repl, and just require() it in, then it returns no results
[03:36] isaacs: micheil: because you haven't done npm.load() yet
[03:36] micheil: hmm..
[03:36] isaacs: micheil: so the configs and such are just the defaults, not whatever you have in your .npmrc file.
[03:36] isaacs: micheil: and i'm guessing you have something like: root = ~/.node_libraries or some such, yes?
[03:36] whyme: JimBastard: I chose method-chaining rather than object literals
[03:37] isaacs: npm.load({}, function () { console.log("loaded") }) and then once you see the message, you can run whatever you want, in the repl. in scripts and such, it should be kicked off inside there
[03:38] bingomanatee has joined the channel
[03:38] cataska has left the channel
[03:38] pkrumins has joined the channel
[03:38] micheil: aha.
[03:38] pkrumins: hey guys, anyone knows if there is a DES module for node.js?
[03:39] bingomanatee: blogging my "first pokes" at node/express at http://wonderlandlabs.com/wll_drupal/os/node/day_two.html -- any flawed assumptions there?
[03:40] Spion_ has joined the channel
[03:41] isaacs: pkrumins: require("crypto")?
[03:41] Nohryb_ has joined the channel
[03:41] cafesofie has joined the channel
[03:41] isaacs: pkrumins: you can specify a variety of des things as algorithms
[03:41] pkrumins: isaacs: it doesnt seem to have DES
[03:41] pkrumins: isaacs: or am i missing it?
[03:42] pkrumins: s/am i missing it/did i miss it/
[03:42] isaacs: pkrumins: when i do "openssl -h" i see it in the list of available algorithms
[03:42] pkrumins: Ah!
[03:42] tapwater has joined the channel
[03:43] micheil: isaacs: almost there with read-dependencies
[03:43] pkrumins: isaacs++
[03:43] v8bot: pkrumins has given a beer to isaacs. isaacs now has 6 beers.
[03:43] pkrumins: v8bot: beers pkrumins
[03:43] v8bot: pkrumins: Use v8: to evaluate code or "`v commands" for a list of v8bot commands.
[03:43] pkrumins: v8bot: `v commands
[03:43] v8bot: pkrumins: Use v8: to evaluate code or "`v commands" for a list of v8bot commands.
[03:43] isaacs: wow, i've accumulated a lot of beers today
[03:43] bingomanatee: v commands
[03:43] micheil: `v commands
[03:43] v8bot: micheil: Commands: Type `v . Optionally, type `v @ to send to a specific user. `v Commands are: about, beers, commands, git, google, help, macro. Other commands: v8, `re, `pcre, `ref. Type `v help for more information. Join #v8bot for more support.
[03:43] micheil: ..
[03:43] bingomanatee: `v commands
[03:43] v8bot: bingomanatee: Commands: Type `v . Optionally, type `v @ to send to a specific user. `v Commands are: about, beers, commands, git, google, help, macro. Other commands: v8, `re, `pcre, `ref. Type `v help for more information. Join #v8bot for more support.
[03:43] isaacs: `v beers pkrummins
[03:43] v8bot: isaacs: pkrummins has 0 beers.
[03:43] isaacs: `v beers isaacs
[03:43] v8bot: isaacs: isaacs has 6 beers.
[03:44] SubStack: `v beers sugardave
[03:44] v8bot: SubStack: sugardave has 0 beers.
[03:44] pkrumins: screw beers, i dont drink them anyway ;)
[03:44] SubStack: whoops
[03:44] SubStack: `v beers SubStack
[03:44] v8bot: SubStack: SubStack has 0 beers.
[03:44] pkrumins: SubStack++ # awesome sauce
[03:44] pkrumins: didnt work.
[03:44] SubStack: pkrumins: there are good beers and not-so-good beers
[03:44] pkrumins: i know
[03:44] pkrumins: i just dont like them
[03:44] bingomanatee: `v beer @ bingomanatee
[03:44] v8bot: bingomanatee: No such command.
[03:45] pkrumins: lemonade for me plese, or water.
[03:45] bingomanatee: `v beers @ bingomanatee
[03:45] v8bot: bingomanatee: @ bingomanatee has 0 beers.
[03:46] mikeal has joined the channel
[03:47] Nohryb_ has joined the channel
[03:49] Me1000 has joined the channel
[03:51] samfalkner has joined the channel
[03:51] atmos has joined the channel
[03:52] saikat has joined the channel
[03:52] isaacs: pkrumins: i thought you were german or something, you don't drink beer?
[03:52] justin has joined the channel
[03:53] sepehr has joined the channel
[03:53] Nohryb_ has joined the channel
[03:54] Lorentz: How can you not drink beer
[03:55] chapel: isaacs
[03:55] chapel: you there?
[03:55] isaacs: chapel
[03:56] chapel: https://gist.github.com/719562
[03:56] chapel: there
[03:57] mscdex: `v about
[03:57] v8bot: mscdex: v8bot is an IRC bot written entirely in Javascript using Google's v8 Javascript engine and Node.js. Credits: eisd, Tim_Smart, gf3, MizardX, inimino. Join us at #v8bot !
[03:57] isaacs: chapel: what are you trying to do?
[03:57] Nohryb_ has joined the channel
[03:57] chapel: I added that
[03:57] chapel: npm version connect-auth
[03:57] isaacs: yeah, what do you think that does?
[03:57] chapel: uhh, check the version?
[03:57] mscdex: `v help git
[03:57] v8bot: mscdex: git Command: Searches GitHub and returns the first result. Usage: `v git . Optionally: `v git @
[03:58] mscdex: :o
[03:58] chapel: I am wrong then?
[03:58] isaacs: yeah
[03:58] chapel: ah
[03:58] isaacs: you wnana know what version(s) are installed, or what the latest version is?
[03:58] chapel: latest version
[03:58] isaacs: (npm version x.y.z bumps the version in a package.json file in your package, and then does a git commit and tag)
[03:58] isaacs: chapel: npm view connect version
[03:58] chapel: ah
[03:59] isaacs: npm view [field(s)]
[03:59] hornairs has joined the channel
[03:59] isaacs: try: npm view connect version contributors.name
[04:00] micheil: isaacs: on sync, why doesn't someone just write a quick sed/find to find all files with Sync used in them?
[04:01] isaacs: micheil: that's what i ended up doing
[04:01] micheil: calling it synclint or something, throw it on npm and blah.
[04:01] isaacs: haha
[04:01] isaacs: yeah
[04:01] Nohryb has joined the channel
[04:01] isaacs: could do that :)
[04:02] whyme: a built-in lexical parser must be good~
[04:02] micheil: isaacs: or even more jokingly: npm isSync lib. :P
[04:03] isaacs: micheil: it won't tell you if you've done something dumb like: foo = "write" + (donow ? "Sync":"") ; fs[foo](...)
[04:03] isaacs: or process.binding("fs").write( forget to put a cb here )
[04:03] micheil: true
[04:05] isaacs: tab completion is gonna rock soon.
[04:06] isaacs: evanmeagher just added completion for almost the whole npm api
[04:07] Nohryb_ has joined the channel
[04:07] Fenda: isaacs: hi, can socket:io notify server when a client has gone idle (no activity from active session for X seconds?)
[04:07] whyme: Fenda: depends on your definition of idle
[04:07] SubStack: setTimeout/clearTimeout
[04:08] Fenda: SubStack: yeah currently doing that, was just wondering if i was re-inventing the wheel
[04:08] micheil: isaacs: why might readInstalled return an ENOENT error?
[04:09] micheil: isaacs: after a npm.load was successful
[04:09] SubStack: I think rauchg_ added some ping/timeout stuff to the latest build
[04:09] isaacs: micheil: because it's looking for a file that doesn't exist?
[04:09] isaacs: micheil: it should give you more than just ENOENT
[04:09] Nohryb__ has joined the channel
[04:09] isaacs: like a stack, or a filename, or some logging
[04:09] micheil: no stack, no filename
[04:09] isaacs: try doing npm.config.set("loglevel", "verbose") first
[04:09] isaacs: and then gist the output, all of it
[04:11] micheil: still nothing.
[04:13] richcollins has joined the channel
[04:15] micheil: isaacs: looks like npm.dir after an npm.load can't be found.
[04:15] Nohryb has joined the channel
[04:15] micheil: which is just odd.
[04:16] kylixz has joined the channel
[04:17] mikeal has joined the channel
[04:18] micheil: wtf. for some reason npm.dir is /usr/local/lib/node/.npm not /Users/micheil/.node_libraries/.npm
[04:19] Blink7 has joined the channel
[04:19] SubStack: micheil: I know right? You've got to npm.load() first
[04:19] micheil: no, that's after on of those.
[04:19] SubStack: I think in the callback to load
[04:19] chapel: has anyone used connect-auth with google auth?
[04:19] isaacs: micheil: what are you passing to npm.load()?
[04:19] micheil: var npm = require("npm")
[04:19] micheil: var rd = require("./lib/utils/read-dependencies")
[04:19] micheil: npm.load({}, function(){
[04:19] micheil: ... rd({"dependencies":{"connect":"","express":">1","websocket-server":"<5"}}, function(){ console.log(arguments); })
[04:19] micheil: ... });
[04:20] SubStack: micheil: > var npm = require('npm'); console.log(npm.dir); npm.load(function () { console.log(npm.dir) })
[04:20] Nohryb_ has joined the channel
[04:20] SubStack: two different dirs
[04:20] micheil: yeah
[04:20] isaacs: micheil: what is read-dependencies?
[04:20] SubStack: hmm!
[04:21] micheil: https://gist.github.com/719577
[04:21] isaacs: micheil: well, npm works on your system. compare your code to what's being done at the end of npm/cli.sj
[04:21] hamsterspider has joined the channel
[04:22] micheil: I think I see one point of stupid failure.. but that shouldn't be affecting anything else
[04:22] isaacs: ok
[04:23] isaacs: micheil: i just did `npm config set root ~/.node_libraries` and now when i do this: "n = require("npm") ; n.load({}, function () { console.log(n.dir) })" in the repl, it prints out /Users/isaacs/.node_libraries/.npm
[04:24] weng: is there a good library for node.js and frontend to extend javascript?
[04:24] Nohryb has joined the channel
[04:24] weng: eg. deep clone of objects, find out what type of element it is etc
[04:24] weng: im using http://documentcloud.github.com/underscore/ atm but want some more functions
[04:26] Nohryb_ has joined the channel
[04:26] cagdas: hi guys, how do we know if a mongoose save operation failed because of unique id restriction?
[04:26] whyme: weng: ext.js?
[04:26] SubStack: weng: you can cherry-pick libs off on npm
[04:26] weng: whyme: that works on node.js?
[04:26] SubStack: better than buying into a religion/framework
[04:27] weng: SubStack: yeah but what libs =)
[04:27] cagdas: I've tried to give a callback like function(err) but mongoose seems to not follow this convention
[04:27] whyme: weng: yep, http://github.com/visionmedia/ext.js
[04:27] SubStack: weng: http://npm.mape.me/
[04:27] cagdas: any ideas?
[04:27] micheil: isaacs: okay. just a bunch of odd shit is happening in repl by the looks.
[04:27] isaacs: i see
[04:28] SubStack: monkey patches make me a little uneasy
[04:28] richcollins: I have code the relies on events being emitted by http.Client to continue the process. The process is ending premature because I'm (apparently), not handling an event from http.Client (Request, Response ..)
[04:28] weng: whyme: that one is broken .. doesnt work on the new npm
[04:28] Nohryb_ has joined the channel
[04:28] weng: and he doesnt fix it .. looks abandoned
[04:28] richcollins: Is there a good way to go about debugging event emitters?
[04:28] richcollins: To see which events they are emitting?
[04:28] whyme: weng: just monkey patch it :)
[04:29] SubStack: weng: https://github.com/substack/js-traverse
[04:29] richcollins: Maybe a catch all handler of some sort?
[04:29] SubStack: it doesn't do everything, but it shouldn't do everything
[04:29] weng: SubStack: that is YOU=)
[04:29] SubStack: it IS
[04:30] SubStack: you CAUGHT ME in the ACT
[04:30] Nohryb has joined the channel
[04:30] SubStack: I use that hash lib so much
[04:30] SubStack: that shit will never die
[04:32] weng: SubStack: self-promotion .. naughty!=)
[04:33] SubStack: while I'm self-promoting, also this https://github.com/substack/node-seq
[04:33] richcollins: Ah looks like I can monkeypatch the emit function
[04:34] whyme: richcollins: better `util.inherits` and extend it.
[04:34] SubStack: ACTION went waaaaay overboard
[04:34] SubStack: with sexy results
[04:34] Fenda: isaacs: rauchg_ im setting timeout to 15000, var io = io.listen(server, {timeout: 15000}); but the server is reporting client disconnects instantly
[04:34] richcollins: whyme: thanks didn't know about that fn
[04:34] Nohryb_ has joined the channel
[04:35] richcollins: whyme: looks like it isn't in the docs
[04:35] whyme: richcollins: yep, but everyone uses it and it'll appear in 0.3.1's docs
[04:36] richcollins: whyme: sounds good
[04:36] weng: SubStack: I like your straight forward, egocentric style
[04:37] isaacs: holy crap this is so exciting.
[04:37] SubStack: weng: you should follow me on github then so I can be the #3 for oakland
[04:37] isaacs: <3 evanmeagher
[04:37] SubStack: isaacs: I'm gunning for you next!
[04:37] micheil: isaacs: ?
[04:37] SubStack: https://github.com/search?type=Users&q=location:oakland
[04:37] isaacs: completion
[04:37] weng: :)
[04:38] micheil: isaacs: ah
[04:38] isaacs: found a bug in it, but still, awesome
[04:38] Nohryb_ has joined the channel
[04:38] Aria: Whoa. Location search on github turned up two people in my county.
[04:38] Aria: I didn't expect that.
[04:38] isaacs: you type: "npm ins" and it completes to "install". then you type "conn" and it expands to "connect"
[04:38] micheil: isaacs: well, yeah, almost got that code for reading dependencies working
[04:38] isaacs: kewl :)
[04:39] micheil: https://gist.github.com/719577
[04:39] micheil: all that isn't working is the max satisfying
[04:39] isaacs: micheil: please use camelCase rather than snake_case
[04:39] micheil: sure.
[04:40] jimt has joined the channel
[04:40] isaacs: micheil: also, what's up with cb(thing) where thing is not an error, and it's not cb(null, thing)?
[04:41] micheil: just simplied passing stuff a bit, because er is always or should always be null in those functions
[04:41] SubStack: that could be rewritten to be such win with seq
[04:42] micheil: SubStack: lay off passChain, I like it :P
[04:42] isaacs: micheil: any actor in npm that takes a cb, must call that cb with either an error or null. anon-null first arg to a cb is always indicative of failure.
[04:42] isaacs: s/anon/a non/
[04:42] micheil: yeah
[04:42] micheil: oh.
[04:43] micheil: you mean the third last line?
[04:43] micheil: that should be a cb(er, required)
[04:43] isaacs: it seems silly in some cases, i know, but it makes it so much easier to just rest assured that it's always the case.
[04:43] micheil: sure thing.
[04:43] isaacs: micheil: 78, 57, 46
[04:44] Nohryb_ has joined the channel
[04:44] samfalkner has joined the channel
[04:44] micheil: https://gist.github.com/719577
[04:45] isaacs: node: 03Ryan Dahl 07master * rbe2457a 10/ src/node_crypto.cc : Use SSL_MODE_RELEASE_BUFFERS by default. - http://bit.ly/feL4WU
[05:05] meder: can anyone recommend a lib to communicate w/ mongodb?
[05:05] meder: for latest stable node.js
[05:05] meder: ive heard of mongoose, then node-mongodb-native, hummingbird
[05:06] jchris has joined the channel
[05:06] jimt_ has joined the channel
[05:07] Aria: Mongodb interfaces and redis interfaces are Node's equivalent of ruby unit testing frameworks.
[05:08] yumike has joined the channel
[05:08] SubStack: I thought it was pubsub and chat servers
[05:08] meder: Aria: huh?
[05:08] meder: they're not stable?
[05:10] Aria: Everyone writes one ;-)
[05:11] feedtheaimbot has joined the channel
[05:12] indutny has joined the channel
[05:13] indutny: good evening!
[05:14] airhorns has joined the channel
[05:16] cafesofie has joined the channel
[05:18] mscdex: hexy.js rocks!
[05:18] mscdex: :>
[05:18] meder: https://github.com/isaacs/npm#readme
[05:18] meder: what option do you guys use to install npm?
[05:18] meder: im on a multi-user machine
[05:19] meder: so #1 isn't ideal for me. cant decide between 2-4
[05:20] Anti-X has joined the channel
[05:21] deepthawtz has joined the channel
[05:24] feedtheaimbot: In express are _all_ the template engines included? Is one loaded by default? (like haml.js)
[05:27] cjmFloating: Hey guys, im new to node, just wrote my first program. Do you have any reccomendations for source code i could browse through to see how to do some simple/basic stuff?
[05:29] whyme has joined the channel
[05:32] Anti-X has joined the channel
[05:33] micheil_mbp has joined the channel
[05:38] naturalethic: meder: i'm working on a new one as we speak :)
[05:40] matjas has joined the channel
[05:41] Nohryb has joined the channel
[05:43] aconbere has joined the channel
[05:43] Anti-X has joined the channel
[05:45] HAITI has joined the channel
[05:46] Nohryb_ has joined the channel
[05:47] meso has joined the channel
[05:49] mjr_: cjmFloating: there is a ton of node code out there right now. What kinds of things are you interested in doing with node?
[05:50] chapel: with express, how could I do something like, url.com/add/http://url.com and get the http://url.com
[05:50] chapel: I tried /add/:id but it doesn't work
[05:51] breccan__ has joined the channel
[05:51] cjmFloating: right now id like to look through some basic stuff working with databases, PostgreSQL or something mjr_
[05:52] JimBastard: hey whyme
[05:52] whyme: JimBastard: here~
[05:52] JimBastard: whyme: did you see https://github.com/stephenlb/nodejuice
[05:52] whyme: JimBastard: nope, checking
[05:52] tekky has joined the channel
[05:53] whyme: JimBastard: looks like I reinvented wheels.
[05:54] Wyverald: chapel: with regexps, probably
[05:54] JimBastard: whyme: sometimes that is fun!
[05:54] chapel: hey JimBastard
[05:54] chapel: nodejitsu
[05:54] JimBastard: hey chapel
[05:55] Anti-X has joined the channel
[05:55] chapel: any news on letting people test the service?
[05:55] JimBastard: you want an account?
[05:55] chapel: sure
[05:55] JimBastard: i can give out a couple right now
[05:55] JimBastard: you gotta be gentle though, its definitely minimal viable product
[05:56] JimBastard: 0.1.1 is coming soon
[05:56] indutny: yeah!
[05:56] indutny: good news!
[05:56] indutny: :)
[05:56] JimBastard: can you pm me your email and desired user name
[05:56] chapel: :)
[05:56] josephhitchens has joined the channel
[05:57] feedtheaimbot: JimBastard: still offer? :O
[05:57] feedtheaimbot: *offering
[05:57] Wyverald: nodejitsu? is it like a school?
[05:57] JimBastard: aight chapel check your email
[05:57] JimBastard: when like, something breaks, let me know
[05:58] JimBastard: we have a support wiki on lighthouse
[05:58] JimBastard: Wyverald: yes, for node.js
[05:58] JimBastard: martial arts training
[05:58] Wyverald: hehe
[05:58] chapel: awesome
[05:58] Wyverald: sounds cool
[05:58] JimBastard: feedtheaimbot: i gotta keep the invites to #node.js regulars for now, gotta be fair
[05:58] JimBastard: chapel has been asking for a while
[05:58] chapel: once I get some local code up to snuff, Ill play with it
[05:58] Nohryb_ has joined the channel
[05:58] Wyverald: it's private beta?
[05:58] chapel: :)
[05:58] vineyard has joined the channel
[05:58] feedtheaimbot: JimBastard: haha, ill try to make that happen later :D
[05:59] feedtheaimbot: fair though
[05:59] JimBastard: Yes, private beta now, but only because we don't want to release something public that isn't fucking solid.
[05:59] JimBastard: Right now, it's OK
[06:00] JimBastard: using stuff like https://github.com/nodejitsu/node-cloudservers we can make many servers
[06:00] Wyverald: just signed up. when the day comes, consider me enlisted =]
[06:00] feedtheaimbot: JimBastard: Any idea how much the plans would be? Dreamhost doesnt like you settting up node on there shared servers haha
[06:01] feedtheaimbot: *their
[06:01] JimBastard: brb, i think i need to adjust server pool
[06:01] mikew3c_ has joined the channel
[06:02] Nohryb_ has joined the channel
[06:03] josephhitchens: Anyone game to answer this question? "Is node robust enough to run the game-logic for a very large-scale facebook game ala farmville?"
[06:03] indutny: josephhitchens: yes, with load balancers
[06:04] josephhitchens: indutny: is it going to run reliably for days at a time without crashing, while processing thousands of messages per second?
[06:04] Aria: Yes, probably.
[06:05] jimt has joined the channel
[06:05] Aria: But for very large scale, failures WILL happen, often.
[06:05] shripadk has joined the channel
[06:05] josephhitchens: Hence the LBs?
[06:05] Aria: Machines die, databases crash, disks break, memory is bad, power glitches.
[06:05] Aria: So make your setup robust to that.
[06:05] sivy has joined the channel
[06:05] Aria: Hence load balancers, disaster plans, careful thought put into design.
[06:05] elijah-mbp: load balancers are required when the game is beefy enough that you can't run it on a single host anymore.
[06:05] Anti-X has joined the channel
[06:05] shripadk: JimBastard: ping
[06:05] josephhitchens: Is there still a hard 1GB heap size limitation per node process?
[06:06] JimBastard: hey shripadk
[06:06] shripadk: :)
[06:06] Aria: On x86, not on x64.
[06:06] shripadk: do i get an invite? :P
[06:06] feedtheaimbot_ has joined the channel
[06:06] tim_smar1 has joined the channel
[06:06] josephhitchens: V8 can do > 1GB heap under x64 you say?
[06:06] Aria: I believe so.
[06:07] Aria: Don't quote me.
[06:07] josephhitchens: that would help.
[06:07] josephhitchens: Thanks Aria.
[06:07] JimBastard: shripadk: its actually gonna have to be tomorrow >.< I can send you an account but we just ran outta servers until we push our next patch
[06:07] Aria: v8 issue 847, looks like. Read up -- there's devil in the details, looks like
[06:08] josephhitchens: URL?
[06:08] JimBastard: pm me your email and username and ill create one
[06:08] JimBastard: err, send you an invite
[06:08] Aria: http://code.google.com/p/v8/issues/detail?id=847
[06:08] Nohryb_ has joined the channel
[06:09] josephhitchens: Thanks again.
[06:09] Aria: Looks like 1.9gb currently.
[06:09] Aria: Sure thing.
[06:09] shachaf has joined the channel
[06:09] indutny: v8: a={};a.__noSuchMethod__ = function(a){console.log(a);}; a.a();
[06:09] v8bot: indutny: TypeError: Object # has no method 'a'
[06:09] indutny: harmony, where you are?
[06:09] indutny: :(
[06:10] rauchg_ has joined the channel
[06:10] Aria: Eww. Method missing hacks.
[06:11] indutny: yeah, that'll be cool
[06:11] Aria: Otherwise known as how to make your environment impossible to inspect.
[06:11] indutny: though
[06:11] indutny: hahaha
[06:11] indutny: yeah
[06:11] feedtheaimbot has joined the channel
[06:11] indutny: that's a problem
[06:11] indutny: but a lot of syntax sugar will come too
[06:11] Yuffster has joined the channel
[06:11] Aria: Otherwise known as how to make your language behave differently depending on who's writing it.
[06:12] Aria: (I just escaped all this in Ruby. It makes you crazy.)
[06:13] meso has joined the channel
[06:15] Nohryb_ has joined the channel
[06:17] micheil: isaacs: you about still?
[06:17] isaacs: micheil: hey
[06:18] micheil: yeah, with read-dependencies, I have it working now, although, do you think it should also grab the versions from the registry?
[06:18] ryah: ACTION wishes someone would make a fuse binding for node...
[06:18] indutny: v8: setInterval('console.log(123)', 1000);
[06:18] v8bot: indutny: ReferenceError: setInterval is not defined
[06:18] isaacs: ryah: it's near the top of my stack
[06:18] indutny: oh, forgot about this
[06:18] indutny: :)
[06:18] isaacs: micheil: yeah, it should be just like doing install or link
[06:18] micheil: well, it currently is
[06:19] cardona507 has joined the channel
[06:19] isaacs: those grab versions from the registry
[06:19] micheil: example:
[06:19] micheil: {"dependencies":{"connect":"","express":">1","websocket-server":"<5"}}
[06:19] micheil: returns: ["express@>1", "websocket-server@<5"]
[06:19] isaacs: what's with the >1? should be semver-compliant.
[06:19] micheil: because I have connect installed
[06:19] desoumal has joined the channel
[06:19] isaacs: >1.0.0
[06:20] saschagehlich has joined the channel
[06:20] Aria: 1) "npm lint" should exist.
[06:20] Aria: 2) that should be an error?
[06:20] desoumal: hello - playing with nodejs - but running into trouble with express install
[06:20] micheil: same deal though, so, should it search the registry to find the highest level of currently available package to install
[06:21] Aria: desoumal: 'npm install express' ?
[06:21] desoumal: npm installs express at /usr/local/share/npm/bin... - and when I include that in the PATH, and generate the app, running node app.js gives error
[06:21] desoumal: cannot find module 'express'
[06:22] amerine has joined the channel
[06:22] micheil: isaacs: same deal essentially though
[06:22] isaacs: desoumal: npm installs express at /usr/local/share/node/express
[06:22] isaacs: desoumal: unless you've configured npm oddly
[06:22] desoumal: nopes - didn't touch npm config
[06:22] desoumal: strange
[06:22] isaacs: desoumal: please gist the output/errors you're seeing, as well as the code
[06:22] micheil: so for express@>1.0.0, it'd actually return express@1.0.0
[06:23] isaacs: micheil: no, it'd need to be at least 1.0.1
[06:23] micheil: because that's the highest available in the registry
[06:23] isaacs: unless it's @>=1.0.0
[06:23] Nohryb_ has joined the channel
[06:23] desoumal: isaacs: thanks - give me a min
[06:23] isaacs: micheil: but anyway... yeah...
[06:23] micheil: okay, but even so, should it contact the registry to find out if that version is available
[06:24] micheil: the better example was websocket-server@<5.0.0
[06:24] isaacs: micheil: it should favor first the pkg["dist-tags"][npm.config.get("tag")] version, if that works, otherwise the highest one that does
[06:24] micheil: pkg["dist-tags"] ?
[06:24] isaacs: micheil: yeah
[06:25] isaacs: micheil: check out http://registry.npmjs.org/websocket-server and look at the "dist-tags" member
[06:25] isaacs: that's where latest/stable show up
[06:25] micheil: right
[06:26] jetienne has joined the channel
[06:26] meso has joined the channel
[06:26] micheil: so the question is, for websocket-server@<5.0.0, should it return websocket-server@1.4.01
[06:27] micheil: because that's the highest satisfying version available in the registry that is within the given range
[06:27] amerine has joined the channel
[06:28] isaacs: micheil: yes
[06:28] amerine has joined the channel
[06:28] micheil: k, currently it leaves that operation up to the registry to work out
[06:29] micheil: and just sends a request to install websocket-server@<5.0.0
[06:29] isaacs: micheil: it should favor the websocket-server@latest (where "latest" is npm.config.get("tag")) if that works, otherwise use the highest that works.
[06:29] isaacs: micheil: the logic for doing this is in lib/install.js, i believe.
[06:29] Nohryb_ has joined the channel
[06:29] micheil: should it be abstracted out into read-dependencies or not?
[06:30] masahiroh has joined the channel
[06:33] isaacs: yes.
[06:33] isaacs: wait a second... i thought the point of npm install-deps was that you'd actually *install* the deps.
[06:34] isaacs: since link needs to use that logic as well.
[06:37] arrty has joined the channel
[06:39] fangel has joined the channel
[06:41] tekky has joined the channel
[06:42] desoumal: isaacs: i think it might be homebrew messing it up - going to do the express and npm installs using git clone etc
[06:42] isaacs: kewl
[06:43] isaacs: desoumal: i don't recommend using homebrew for npm and node. use one of these methods: https://gist.github.com/579814
[06:43] Nohryb has joined the channel
[06:45] micheil: isaacs: and then you said that the finding of dependencies should be abstracted out.
[06:45] isaacs: yeah, that too
[06:45] micheil: so, now there's readDependencies(package, cb)
[06:45] isaacs: but that's just readJson plus removing the bundled ones
[06:45] desoumal: isaacs: thanks!
[06:45] micheil: and removing the already installed ones
[06:45] isaacs: ah, no
[06:46] micheil: no?
[06:46] isaacs: install will skip over specific versions of things that it already has if they're not on the "mustInstall" list
[06:46] isaacs: you can also do --must-install false
[06:46] shripadk has left the channel
[06:47] micheil: https://gist.github.com/719666
[06:47] micheil: so I don't really need filterInstalled
[06:47] isaacs: no
[06:47] Nohryb has joined the channel
[06:48] micheil: uhh..
[06:48] isaacs: otherwise it'll favor installed things that are out of date
[06:48] micheil: gotta love percieved ambiguity.
[06:48] isaacs: heh
[06:48] isaacs: sorry about that
[06:49] micheil: k, so, no readInstalled
[06:49] micheil: erm
[06:49] micheil: yeah
[06:49] evanmeagher has joined the channel
[06:49] micheil: just readJson, filter Bundled, return
[06:49] isaacs: yep
[06:49] micheil: k
[06:50] hamsterspider has left the channel
[06:50] isaacs: actually, it should also do the bit where you check the --dev config, and do devDependencies and dev-dependencies if it's truish
[06:50] micheil: line 43
[06:50] MikhX has joined the channel
[06:50] micheil: if (npm.config.get("dev")) {
[06:50] micheil: Object.keys(devDeps).forEach(function (d) { deps[d] = devDeps[d] })
[06:50] micheil: }
[06:50] isaacs: ah, yes
[06:51] isaacs: it should support dev-dependencies as well
[06:51] micheil: dev-dependencies?
[06:51] isaacs: not sure if anyone's actually using that, but yeah
[06:51] isaacs: i forget which one was first, and then i decided ot use the other
[06:51] micheil: oooh..
[06:51] micheil: right.
[06:51] Nohryb has joined the channel
[06:52] isaacs: so... readDependencies is a worthwhile thing to factor out, but it can be just a few nested functions. doesn't need passChain, even, really.
[06:53] micheil: yeah
[06:53] isaacs: the real cool thing (which should be a top-level plumbing command like build, hanging out on npm.commands) would be "npm install-deps "
[06:53] micheil: that's coming.
[06:54] Nohryb_ has joined the channel
[06:54] isaacs: you sure do like digging right into the core-est of core features, eh?
[06:54] isaacs: node's fs module, npm's install command
[06:55] micheil: haha, well, it's something that I'll be needing very shortly when I work on npm install noast
[06:56] isaacs: what's noast?
[06:56] isaacs: no abstract syntax trees?
[06:56] micheil: (also, use phonetics to know what I'm on about there..)
[06:59] fly-away has joined the channel
[06:59] Nohryb has joined the channel
[07:03] mraleph has joined the channel
[07:07] Nohryb_ has joined the channel
[07:07] nsolsen has joined the channel
[07:11] mikeal has joined the channel
[07:13] Nohryb_ has joined the channel
[07:15] MrTopf has joined the channel
[07:15] HerrTopf has joined the channel
[07:16] derren13 has joined the channel
[07:18] Nohryb_ has joined the channel
[07:19] brianmario has joined the channel
[07:19] TomY has joined the channel
[07:21] stagas: I wish node would block instead of EADDRINUSE when restarting :/
[07:22] SamuraiJack has joined the channel
[07:23] Nohryb_ has joined the channel
[07:23] stagas: at least for a couple of seconds until it's ready again
[07:24] Nohryb_ has joined the channel
[07:24] whyme: stagas: it'd be trivial to write setTimeout
[07:26] Nohryb_ has joined the channel
[07:26] CIA-54: node: 03Ryan Dahl 07master * rbf89872 10/ (lib/crypto.js lib/securepair.js src/node_crypto.cc): style - http://bit.ly/eaVE3b
[07:26] CIA-54: node: 03Ryan Dahl 07master * r97970b0 10/ src/node_crypto.cc : Default to TLSv1 - http://bit.ly/g9oehx
[07:26] stagas: it needs like a .listenBlock() or .listenReady()
[07:26] stagas: something like that
[07:29] whyme: try..catch + setTimeout + recursion should be fine.
[07:35] agnat has joined the channel
[07:36] Nohryb_ has joined the channel
[07:36] ryah: stagas: sounds like an undesirable behavior
[07:37] Nohryb_ has joined the channel
[07:37] ryah: server.on('error', function (e) { if (e.errno == require('constants').EADDRINUSE) { setTimeout(function () { server.listen() }, 1000) }
[07:38] davidc_ has joined the channel
[07:38] indutny: ryah: looks like this is a hardway :0
[07:38] V1 has joined the channel
[07:40] jetienne: to access the setsockopt on the fd seems way clean
[07:40] jetienne: cleaner
[07:41] ryah: the fd is already set SO_REUSEADDR - if that's what you're implying
[07:41] ryah: all sockets in node are
[07:41] jetienne: it is what i implied. if it is already set, how come EADDRINUSE is triggered ?
[07:41] jetienne: is that running on mac ?
[07:41] ryah: stagas has another server taking his port at the same time
[07:42] jetienne: ok then i should have read the whole thing. my bad
[07:42] stagas: ryah: no, it happens when I restart too quickly an app
[07:42] stagas: ryah: this workaround you suggested throws another error, Server already opened ?
[07:43] ryah: stagas: perhaps you are restarting while the previous one is running still
[07:44] stagas: ryah: I restart with ctrl+c, up arrow, enter. I'm on cygwin so windows might be behaving differently on closing ports
[07:44] ryah: stagas: oh, yeah maybe
[07:44] stagas: yet I have to do it 3-4 times most of the time until the port is free again :/
[07:45] stagas: which is very annoying
[07:45] whyme: stagas: implement a TCP-like slow-start :P
[07:46] stonebranch has joined the channel
[07:47] Nohryb_ has joined the channel
[07:48] stagas: ok this does the job: https://gist.github.com/719703
[07:48] stagas: ryah: thanks :)
[07:50] nolkyan has joined the channel
[07:51] mraleph has joined the channel
[07:52] elijah-mbp has joined the channel
[07:52] ph^ has joined the channel
[07:53] Nohryb has joined the channel
[07:57] Tobias| has joined the channel
[07:58] josephhitchens: Can node/v8 leak memory?
[07:59] ehaas: if you use javascript incorrectly you can leak memory...regardless of engine
[07:59] AAA_awright_ has joined the channel
[08:02] Nohryb_ has joined the channel
[08:07] delapouite has joined the channel
[08:07] jimt_ has joined the channel
[08:08] Nohryb_ has joined the channel
[08:08] mAritz has joined the channel
[08:10] MrTopf has joined the channel
[08:11] CIA-54: node: 03Ryan Dahl 07master * r105501c 10/ test/simple/test-fs-realpath.js : test-fs-realpath: Don't ceate things in /tmp; use tmpDir - http://bit.ly/eZlqFP
[08:13] Nohryb_ has joined the channel
[08:14] micheil_mbp has joined the channel
[08:15] Nohryb_ has joined the channel
[08:18] micheil_mbp has joined the channel
[08:18] JimBastard: can someone remind me why this isnt valid JSON? { 'response': 'success', 'eventstamp': 1291018612 }
[08:18] indutny: emm
[08:18] micheil: double quotes
[08:18] indutny: double quotes!
[08:18] indutny: :)
[08:18] indutny: micheil: you're amazingly rapid
[08:18] indutny: :D
[08:19] JimBastard: what the heck loggly
[08:19] JimBastard: why you no JSON right
[08:19] JimBastard: let me try a replace
[08:20] JimBastard: body = body.replace(/\'/g,'"');
[08:20] JimBastard: sigh
[08:20] JimBastard: i should open an issue for that i guess
[08:21] Nohryb has joined the channel
[08:21] stagas: there might be double quotes inside those double quotes now
[08:22] JimBastard: stagas: should be fine for now, im emailing them
[08:24] JimBastard: indutny: the number that has no quotes is valid json right?
[08:24] Nohryb has joined the channel
[08:24] indutny: yes
[08:24] JimBastard: i know some parsers are more forgiving then others
[08:24] JimBastard: cool
[08:24] indutny: that's the difference between a number and string
[08:25] indutny: "123" , 123
[08:25] JimBastard: 10-4
[08:25] indutny: what's that?
[08:25] indutny: :)
[08:25] stagas: true, false, null are also allowed without quotes
[08:26] mscdex: v8: 10-4
[08:26] v8bot: mscdex: 6
[08:26] mscdex: :>
[08:26] JimBastard: indutny: its radio code for OK
[08:26] mscdex: it's a math problem!
[08:26] JimBastard: 10–4: affirmative (OK)
[08:26] JimBastard: http://en.wikipedia.org/wiki/Ten-code
[08:26] mscdex: radio.js
[08:26] indutny: haha :)
[08:26] mscdex: !
[08:26] indutny: cool
[08:27] JimBastard: mscdex: luuuuullz
[08:27] indutny: I'm afraid asking you - why do you need this? :D
[08:27] indutny: oh
[08:27] indutny: I understand
[08:27] JimBastard: :-)
[08:27] stagas: I feel threatened by that huge banner on wikipedia
[08:28] JimBastard: jimmy wales wants your money
[08:28] stagas: why they don't just put a flattr or a paypal donate thing
[08:28] stagas: it'll work better
[08:28] stagas: :P
[08:29] mscdex: i just add a filter and it never shows up for me anymore
[08:29] indutny: you can send him money with this comment :D
[08:30] mscdex: adblock for chrome ftw
[08:30] CIA-54: node: 03Ryan Dahl 07master * r7a7feb8 10/ doc/api/net.markdown : Add note about EADDRINUSE to docs - http://bit.ly/hQYVSP
[08:30] tisba has joined the channel
[08:30] Nohryb has joined the channel
[08:32] Nohryb_ has joined the channel
[08:33] chewbranca has joined the channel
[08:33] [AD]Turbo has joined the channel
[08:35] bingomanatee has joined the channel
[08:35] justin has joined the channel
[08:36] adambeynon has joined the channel
[08:40] josephhitchens has joined the channel
[08:43] MrTopf has joined the channel
[08:45] mscdex: i wish crypto could deal with buffers directly
[08:46] mscdex: so i could do like .digest('buffer') and supply .update() with a buffer
[08:46] mscdex: :S
[08:49] MrTopf has joined the channel
[08:51] luke` has joined the channel
[08:53] slaskis has joined the channel
[08:55] Sami_ZzZ has joined the channel
[09:00] ewdafa has joined the channel
[09:00] Nohryb has joined the channel
[09:00] naturalethic: buffer.fromHex/toHex
[09:00] indutny: yep
[09:00] indutny: that would be cool
[09:01] indutny: ryah: may be write addon to buffers?
[09:02] naturalethic: https://gist.github.com/719753 (compiled from coffeescript src)
[09:02] naturalethic: i'm working on buffer extensions right now
[09:02] mscdex: ok so i was slightly wrong, .update() seems to accept buffers
[09:02] naturalethic: well, nice :)
[09:03] mscdex: still can't find out why my hash isn't being accepted by aololol
[09:03] indutny: nice
[09:04] mAritz has joined the channel
[09:04] naturalethic: oops there's a bug in that gist don't use it :)
[09:04] mscdex: :O
[09:07] naturalethic: gist fixed...
[09:09] ntelford has joined the channel
[09:10] stonebranch has joined the channel
[09:11] virtuo_ has joined the channel
[09:14] peutetre has joined the channel
[09:17] _janne has joined the channel
[09:19] caolanm has joined the channel
[09:19] V1: Does anybody happen to know if node-canvas already support ImageData arrays? eg getImageData & putImageData?
[09:22] MrTopf has joined the channel
[09:23] Jonasbn_ has joined the channel
[09:24] d0k has joined the channel
[09:25] crodas has joined the channel
[09:26] naneau has joined the channel
[09:26] mohiam_ has joined the channel
[09:27] breccan_ has joined the channel
[09:29] sveimac has joined the channel
[09:30] crodas has joined the channel
[09:30] killfill has joined the channel
[09:31] saschagehlich has joined the channel
[09:32] [AD]Turbo has joined the channel
[09:32] heap has joined the channel
[09:34] crodas has joined the channel
[09:35] dantalizing has joined the channel
[09:35] dantalizing has joined the channel
[09:37] teemow has joined the channel
[09:42] er1c_ has joined the channel
[09:42] bartt has joined the channel
[09:43] bartt has joined the channel
[09:43] bartt has joined the channel
[09:44] Max_Might has joined the channel
[09:48] bartt has joined the channel
[09:48] bartt has joined the channel
[09:49] bartt has joined the channel
[09:49] bartt1 has joined the channel
[09:49] bartt1 has joined the channel
[09:50] zinger has joined the channel
[09:50] bartt has joined the channel
[09:51] bartt has joined the channel
[09:51] bartt1 has joined the channel
[09:52] bartt1 has joined the channel
[09:53] bartt2 has joined the channel
[09:53] saschagehlich has joined the channel
[09:54] bartt has joined the channel
[09:55] bartt has joined the channel
[09:55] bartt1 has joined the channel
[09:56] bartt has joined the channel
[09:59] bartt1 has joined the channel
[09:59] bartt has joined the channel
[09:59] sveimac_ has joined the channel
[10:00] bartt has joined the channel
[10:00] jetienne: $ curl http://npmjs.org/install.sh | sh $ curl http://npmjs.org/install.sh | sh though
[18:27] isaacs: cool
[18:27] kevwil has joined the channel
[18:27] isaacs: i saw that
[18:27] cloudhead: isaacs: yea, I just want to install the deps, but without going through the command line
[18:27] micheil: not or
[18:27] jcodyl1: meder, thats correct..but you gotta start somewhere, unleashing the beast that is a proper XML solution didn't seem like something you wanted to do
[18:27] cloudhead: micheil: folder being where package.json is?
[18:28] micheil: cloudhead: yeah
[18:28] cloudhead: ok
[18:28] micheil: bbl. sleep.
[18:29] altamic has joined the channel
[18:29] meder: jcodyl1: where do you store the xml lib
[18:29] meder: im looking for information on how to install it now, not what to use
[18:29] dnolen: micheil: thx
[18:29] jcodyl1: meder, no install needed, just drop it in your project folder and require() it
[18:29] meder: and im looking to make it such that any user can access this lib, not just me
[18:29] jcodyl1: https://github.com/isaacs/sax-js/blob/master/examples/example.js
[18:29] steffkes has joined the channel
[18:30] tjholowaychuk: V1: 120k random dots in 144ms currently
[18:30] jcodyl1: meder, this should answer any questions regarding modules : http://nodejs.org/docs/v0.3.1/api/modules.html
[18:31] V1: tjholowaychuk: They are actually 120k radial gradients, which are than modified
[18:31] sh1mmer has joined the channel
[18:31] tjholowaychuk: V1: gotcha
[18:31] chrischris has joined the channel
[18:32] V1: So i guess it's probably some processing I want to run outside of my regular event loops
[18:32] tjholowaychuk: yeah for large stuff like that these should be run in workers
[18:32] HAITI has joined the channel
[18:32] HAITI has joined the channel
[18:34] dguttman has joined the channel
[18:37] aubergine has joined the channel
[18:37] res99 has joined the channel
[18:38] slaskis has joined the channel
[18:38] booths has joined the channel
[18:39] rkieffer has joined the channel
[18:39] dguttman_ has joined the channel
[18:41] fangel: cloudhead: can I ask you a Vows question? if yes, is there any way a topic can return multiple values, that in turns calls the vows with multiple arguments? or a way for the vow to access the topic for the parent scope?
[18:42] isaacs: meder: `npm install sax`, or just put the file somewhere. i think it's just a single js file.
[18:43] isaacs has joined the channel
[18:44] sepehr has joined the channel
[18:44] meder: i think it's time to roll out my own xml parser
[18:45] booths: hey, isaacs back, /wave
[18:45] meder: i really would not want to mess with sax style parsing
[18:45] Jonasbn_ has joined the channel
[18:45] meder: and the o3 ones are broken
[18:45] tjholowaychuk: meder: whats wrong with sax? you can build a tree from that
[18:45] tjholowaychuk: or libxmljs
[18:46] meder: sax is a lot of work for something that can be done more succinctly
[18:46] meder: imo
[18:47] meder: i'm supposed to define callbacks for the parser hitting every open/close tag and attributes? is that a joke?
[18:47] meder: heh
[18:47] meder: i realize for speed that's probably great
[18:47] tjholowaychuk: well you build on that... to construct a higher level implementation
[18:48] tjholowaychuk: a lot of parsers work that way
[18:48] tjholowaychuk: its a nice abstraction
[18:48] meder: yes, but id like a high level implementation to begin with
[18:49] karboh has joined the channel
[18:49] tjholowaychuk: id go with libxmljs personally
[18:49] meder: does it use standard DOM methods and all?
[18:50] isaacs: meder: sax approaches are designed to be a lowlevel way to do anything you need to do with xml, whether it's streaming or building up a DOM struction.
[18:50] meder: the only parsing example libxmljs has is var doc = libxml.parseXmlFile([filename]);
[18:51] meder: it doesnt show any example of the usage of the doc reference
[18:51] booths: meder: yeah I saw that too, the author answered some SO questoin say it's capable of it though, so maybe it works just like DOMParser?
[18:52] danzajdband has joined the channel
[18:52] tjholowaychuk: meder: its libxml2 bindings
[18:52] altamic has joined the channel
[18:53] meder: ACTION shuts up and plays with libxmljs
[18:55] cloudhead: fangel: well, if you use an event emitter or a callback, you can pass n arguments
[18:55] cloudhead: fangel: you can also set values on `this`, and access them in the callback
[18:56] fangel: cloudhead: yeah, I know.. but since it's not async tests I'm doing I just felt like that was a waste..
[18:56] cloudhead: yea, then just use `this`
[18:56] fangel: cloudhead: also you need the errors: false added to prevent false-postive errors occouring if the first argument should be not-null (or so I recall)
[18:57] isaacs: kriszyp: hey, you around?
[18:57] cloudhead: fangel: yea, if you're not using node-style callbacks
[18:58] fangel: cloudhead: enlighten me, what are the differences between the various callback styles?
[18:59] danzajdband has left the channel
[18:59] fangel: because I haven't been able to find any decent docs describing the various ways
[18:59] jesusabdullah: Anyone here know of 3-d plotting library that doesn't suck?
[19:00] jesusabdullah: I know the ajaxorg guys have one hidden somewhere but they ain't sharing :(
[19:01] jesusabdullah: If anyone does, I'd be 400 appreciatives
[19:01] korsan has joined the channel
[19:01] cloudhead: fangel: well, there's node-style, and freeform
[19:02] cloudhead: fangel: node-style is (error, [data, ...])
[19:02] cloudhead: freeform is ([data, ...])
[19:02] fangel: or well, freeform is (data, ..) - no array
[19:02] femtooo has joined the channel
[19:02] cloudhead: yea, [] means optional
[19:02] cloudhead: not array
[19:03] fangel: ahh, okay.. so I should be able to do this.callback(null, 'arg1', 'arg2') and then have 'vows': function(arg1, arg2) { .. } ?
[19:03] tjholowaychuk: V1: I will add a quality setter, might help speed up the gradients
[19:03] cloudhead: the fs module is a good example of this
[19:03] jcodyl1: agnat: ping
[19:03] cloudhead: fangel: yea
[19:03] V1: tjholowaychuk: Cool,
[19:04] tjholowaychuk: V1: drawImage() etc would be faster as well, but uglier
[19:04] maushu has joined the channel
[19:04] cloudhead: but if you're running synchronous code, I'd just set some values on `this`
[19:04] cloudhead: and yea, if you're doing async stuff, try to adopt node's style
[19:04] V1: tjholowaychuk: Doesn't really matter for, as I'm going to rewrite my canvas for node anyways
[19:04] korsan: ACTION
[19:04] agnat: jcodyl1: pong
[19:05] spion has joined the channel
[19:05] tjholowaychuk: V1: what do you mean?
[19:05] V1: tjholowaychuk: nvm, :p
[19:05] tjholowaychuk: a different implementation?
[19:06] fangel: okay, I'll play around a bit, thanks for your help cloudhead :)
[19:06] V1: tjholowaychuk: I miss understood you, but after re-reading it made sense
[19:06] rauchg_ has joined the channel
[19:07] altamic_ has joined the channel
[19:08] altamic_ has joined the channel
[19:09] mjr_ has joined the channel
[19:09] eee_c has joined the channel
[19:10] brianmario has joined the channel
[19:11] CIA-54: node: 03Ryan Dahl 07master * r1db59af 10/ lib/http.js : style - http://bit.ly/hhx2vd
[19:12] omarkj has joined the channel
[19:12] jcodyl1: agnat, where should I send patches for node_libdbus?
[19:13] cloudhead: fangel: np
[19:14] cloudhead: isaacs: any idea why I'm getting a "ENOENT, No such file or directory" when I run `npm.commands.install(["redis"], callback)`?
[19:14] isaacs has joined the channel
[19:14] cloudhead: as the error argument's stack
[19:15] ossareh has joined the channel
[19:15] cloudhead: oops
[19:15] cloudhead: isaacs: any idea why I'm getting a "ENOENT, No such file or directory" when I run `npm.commands.install(["redis"], callback)`?
[19:15] isaacs: cloudhead: perhaps you haven't done the npm.load(conf, cb) yet?
[19:15] cloudhead: ahh, didn't know bout that, ok
[19:15] agnat: jcodyl1: hmm ... pull request?
[19:16] isaacs: the README.md has the very basic intro to using npm programmatically. the cli.js file has a very complete and concrete example.
[19:16] InsDel has joined the channel
[19:16] isaacs: i should add a check on the npm.commands functions so that they'll throw if it's not loaded yet.
[19:18] cloudhead: cool, thanks
[19:18] ErikCorry has joined the channel
[19:18] jcodyl1: agant: okay will do once I have enough, thanks - right now its trivial stuff
[19:18] trentm has joined the channel
[19:18] agnat: jcodyl1: cool.
[19:18] isaacs: cloudhead: http://github.com/isaacs/npm/commit/1fe70f7cf0aebbcad463a5b432909cc3860bc61a
[19:19] trentm has joined the channel
[19:19] agnat: jcodyl1: i should point out that the libdbus binding is currently kind of on hold
[19:19] jcodyl1: agnat: yeah, why's that?
[19:20] agnat: jcodyl1: mostly because certain parts of the library don't support async operation ....
[19:20] agnat: jcodyl1: it does the b-thing
[19:20] agnat: it BLOCKS :-(
[19:21] dguttman has joined the channel
[19:21] Anti-X has joined the channel
[19:21] jcodyl1: agnat: which functions specifically ?
[19:21] booths has joined the channel
[19:21] agnat: jcodyl1: the listen-to-signal stuff IIRC
[19:22] justin___ has joined the channel
[19:22] jcodyl1: agnat, yeah okay, I vaguely remember some of those issues when I worked on ndesk-dbus
[19:23] jcodyl1: agnat, we can either do what was chosen there (pure C# impl), or use gdbus/gio
[19:23] jcodyl1: but that might not be an acceptable dependency for your use cases
[19:23] jcodyl1: agnat: http://library.gnome.org/devel/gio/2.25/ch27.html
[19:26] agnat: yeah, I was thinking about a pure js impl, too. here is a little experiment: https://github.com/agnat/node_dbus .. another option might be to talk to the libdbus folks ... they almost support fully async operation
[19:27] agnat: they might be interested to add the missing bits
[19:27] jcodyl1: agnat, my vote is for pure JS
[19:28] jcodyl1: agnat: since I've already gone that route with success.. (git://git.ndesk.org/pub/scm/dbus-sharp)
[19:28] jcodyl1: albeit in C#
[19:31] faust45 has joined the channel
[19:33] eee_c has joined the channel
[19:36] MattDiPasquale has joined the channel
[19:37] linnk has joined the channel
[19:37] deepthawtz has joined the channel
[19:38] probably_ has joined the channel
[19:38] TheEnd2012 has joined the channel
[19:38] softdrink: requirejs + jasmine = madness
[19:38] softdrink: heh
[19:38] linnk: Does anybody else have problems compiling the latest node? I get "cannot find config.h" when doing make
[19:38] confoocious has joined the channel
[19:38] confoocious has joined the channel
[19:39] bnoordhuis: linnk: did you execute ./configure first?
[19:39] agnat: jcodyl1: yeah, probably ... it's more fun, too ...
[19:39] linnk: bnoordhuis: yep
[19:40] bnoordhuis: linnk: are you trying to build a release or debug build?
[19:40] sh1mmer has joined the channel
[19:40] jcodyl1: agnat: I think we could whip node_dbus into shape without too much effort
[19:40] linnk: bnoordhuis: a debug build I guess, directly from the repository
[19:41] linnk: bnoordhuis: I was going to try to work on one of the todo items
[19:41] alexfner has joined the channel
[19:41] bnoordhuis: is there a build/debug/config.h file in node's root dir?
[19:42] linnk: bnoordhuis: yes
[19:42] bnoordhuis: linnk: it should work then
[19:42] bnoordhuis: just tried it, wfm
[19:43] linnk: bnoordhuis: hmm, must have messed something up then, I'll fool around a bit and see what happens
[19:43] linnk: (my git skills are quite minimal)
[19:44] bnoordhuis: linnk: git reset --hard origin/master
[19:44] trotter has joined the channel
[19:44] bnoordhuis: but beware, that will also nuke all your local changes
[19:44] isaacs has joined the channel
[19:44] bnoordhuis: or maybe `git clean`
[19:45] linnk: bnoordhuis: well, I'm working on my own fork, got some branches on it for playing around. So I just pulled in the latest changes with git pull master
[19:45] __florian has joined the channel
[19:45] linnk: is that the wrong way to do it, or?
[19:46] bnoordhuis: linnk: not wrong, no
[19:46] bnoordhuis: but what i do is keep a branch that is a pristine copy of the master
[19:46] bnoordhuis: so you always have a known-good baseline
[19:47] linnk: yea, that's what I wanted my "master" branch to be
[19:47] bnoordhuis: and is it? :)
[19:47] stephank has joined the channel
[19:48] linnk: it looks like it is yes, the newest commit when I type git log is also the newest commit that GitHub shows
[19:49] bnoordhuis: linnk: what does `git diff --stat origin/master` say?
[19:49] bnoordhuis: if it outputs nothing, then your branch is a clean copy
[19:50] linnk: hmm, it outputs quite a lot :/
[19:51] bnoordhuis: linnk: `git checkout -t -b pristine origin/master` will give you a pristine copy
[19:51] linnk: but `git pull ry master` (I added ryan's repo as a remote) says that it's already up to date
[19:51] derferman has joined the channel
[19:51] bnoordhuis: then you merged in ryan's changes
[19:51] bnoordhuis: what does `git status` say?
[19:52] linnk: "Your branch is ahead of 'origin/master' by 99 commits." so looks ok
[19:52] pkrumins has left the channel
[19:52] linnk: I didn't push to my own fork on GitHub yet
[19:52] ezmobius has joined the channel
[19:53] bnoordhuis: you're probably okay then
[19:53] mif86 has joined the channel
[19:53] bnoordhuis: just diverged (or ahead really) of the master branch
[19:53] micheil_mbp has joined the channel
[19:53] linnk: mine or ryans?
[19:53] bgriffith has joined the channel
[19:54] bnoordhuis: linnk: depends on what origin points to
[19:54] bnoordhuis: `git remote -v show`
[19:54] linnk: points to my own fork
[19:56] bnoordhuis: linnk: okay, then you probably want to compare it against and merge with ry/master
[19:56] langworthy has joined the channel
[19:57] linnk: hmm, I thought that was what I did: merged locally with my master branch, but didn't push to my fork on github yet?
[19:57] bnoordhuis: linnk: maybe you should do a `git checkout -t -b pristine ry/master` and try to build that
[19:57] creationix has joined the channel
[19:58] timemachine3030 has joined the channel
[19:58] bnoordhuis: linnk: if that works for you, you know the mainline is okay
[19:59] bnoordhuis: then it's a matter of pulling ryan's changes into your local copy
[19:59] linnk: bnoordhuis: heh, make still complains about the config.h file missing
[19:59] jpld has joined the channel
[20:00] bnoordhuis: linnk: really? bizarre
[20:00] linnk: it's a bit odd
[20:00] bnoordhuis: at what commit are you?
[20:00] linnk: commit 1db59afb758fa3ad497334ce3f9422269f019d96 "style"
[20:00] bnoordhuis: yeah, that's the latest
[20:01] Ori_P has joined the channel
[20:01] bnoordhuis: and what does `git diff --stat ry/master` say?
[20:01] linnk: absolutely nothing
[20:02] bnoordhuis: okay, so you're in sync with the mainline with no local modifications
[20:02] spetrea_ has joined the channel
[20:02] bnoordhuis: do you have any non-versioned files right now?
[20:02] swistak has joined the channel
[20:02] linnk: there is one: test/fixtures/cycles/folder/cycles
[20:02] linnk: I had problems adding it cause... well, it's cyclic somehow
[20:02] bnoordhuis: hah, that's a bug in one of the test cases
[20:03] danzajdband has joined the channel
[20:03] bnoordhuis: okay, can you run a `git clean` (maybe with --force) followed by a `make clean`, followed by a `./configure`?
[20:03] danzajdband has left the channel
[20:04] creationix: mkfs -t ext4 /dev/sda1 -> reinstall linux -> reclone node -> configure -> make
[20:04] creationix: that should do it
[20:04] linnk: yep, git clean removed the cyclic file, make clean complains about the .h file missing, ./configure runs as usually, make still doesn't work
[20:05] linnk: creationix: that's bizzare too
[20:05] linnk: *bizarre
[20:06] bnoordhuis: linnk: the build/debug/config.h file exists?
[20:06] linnk: yep
[20:06] creationix: linnk: make a fresh clone in a different folder just to double check it's nothing wrong with files
[20:06] creationix: if git ignores files, I'm not sure clean will remove them
[20:07] bnoordhuis: it doesn't
[20:07] linnk: creationix: but I got [node]> git clean -f -> Removing test/fixtures/cycles/folder/cycles
[20:07] bnoordhuis: linnk: maybe, just to be sure, you should run `git clean -f -d -x`
[20:08] creationix: linnk: right, but I'm saying there might be other files you don't know about
[20:08] creationix: a fresh clone is a surefire way to know it's clean
[20:08] linnk: whow! it works!
[20:09] naturalethic has joined the channel
[20:09] Nova: Anyone knows why I am getting this error while running this code https://gist.github.com/488562 : cannot find module '../' at the io = require('../')? Why is it trying to require a directory?
[20:09] creationix: if anyone in here is up to a fun CS challenge, I need help optimizing an algorithm for a game I'm making https://gist.github.com/720476
[20:09] creationix: Nova: require can load directories, it looks for index.* in the folder
[20:09] bnoordhuis: creationix: look up '2d bin packing problem'
[20:09] linnk: is there some kind of explanation for why the -f -d -x flags helped?
[20:10] bnoordhuis: linnk: it also removes untracked directories and .gitignore-ignored files
[20:10] bnoordhuis: oh, and -f forces things
[20:10] danzajdband has joined the channel
[20:10] linnk: bnoordhuis: but what was wrong with having the untracked file there?
[20:10] danzajdband has left the channel
[20:10] bnoordhuis: linnk: to be honest, i don't know
[20:10] bnoordhuis: but it apparently screwed up the build
[20:11] creationix: bnoordhuis: I think my problem is different enough that won't help
[20:11] creationix: I want them to overlap, but with the fewest rectangles
[20:11] linnk: bnoordhuis: hm, that's weird... but thanks a lot for helping me out :)
[20:12] bnoordhuis: linnk: my pleasure :)
[20:12] cnlohfin has joined the channel
[20:12] bnoordhuis: creationix: it's a special case or am i mistaken?
[20:13] bnoordhuis: creationix: by the way, 'optimal' is probably not what you want - i'm fairly sure that's NP-complete territory
[20:13] Nova: creationix: the example didn't give any index.* file, so what should I do to fix it?
[20:14] creationix: bnoordhuis: it feels NP-complete
[20:14] creationix: bnoordhuis: it's certainly easy for humans at least
[20:14] creationix: but my current implementation works fairly quickly, and I can post-process to remove unneded rectangles pretty easily
[20:14] delapouite has joined the channel
[20:15] isaacs has joined the channel
[20:15] creationix: I'm just hoping for a better solution that's not ~ 200 lines of code
[20:15] V1: rauchg_: Socket.io build fails on 0.3.1pre
[20:16] bnoordhuis: creationix: how is the grid defined?
[20:17] creationix: as nested arrays, I give a few concrete examples and solutions in the markdown above the code
[20:18] bnoordhuis: creationix: keep in mind it's past 9 pm here
[20:19] bnoordhuis: how do i read it as cartesian?
[20:19] eee_c has joined the channel
[20:20] bnoordhuis: oh wait, figured it out
[20:20] bnoordhuis: you know, this really looks like the bin packing problem
[20:20] bnoordhuis: never mind that the edges slightly overlap
[20:21] guybrush: creationix: any idea why it says 'undefined_method'? https://gist.github.com/713794
[20:21] fangel: why is it that for( var key in o ) if( o.propertyIsEnumerable( o.key ) ) { ... } can _ever_ execute the if-block? shouldn't for( .. in .. ) only traverse the enumerable properties?
[20:21] guybrush: same with db.clear()
[20:22] creationix: guybrush: that's strange
[20:22] mjr_ has joined the channel
[20:23] creationix: guybrush: Though since you're not throwing your errors the program will continue to run in an undefined state assuming things are right
[20:23] creationix: all sorts of weird things can happen
[20:24] fly-away has joined the channel
[20:24] creationix: fangel: correct
[20:24] guybrush: ah ok, i don't like throwing errors
[20:24] patricka_ has joined the channel
[20:24] creationix: guybrush: well, in step, if you throw it, it will just be re-caught by the next step
[20:24] creationix: so still not ideal
[20:24] creationix: maybe you can return after logging the error so the next step doesn't get called
[20:24] cafesofie has joined the channel
[20:25] Aria has joined the channel
[20:25] guybrush: still the error-message is odd, i will do some other tests and take a look into nstore-code
[20:26] guybrush: the example in the README doesn't work for me though (find() and clear())
[20:27] fangel: creationix: okay.. I just seem to have it do exactly that, but when I create a small test-case it doesn't do it (obviously)
[20:28] HAITI has joined the channel
[20:28] HAITI has joined the channel
[20:30] guybrush: creationix: https://gist.github.com/720554
[20:30] meder: anyone know of any dns libraries in order so i can lookup the A record of a domain? or am i just left with exec'ing a command like nslookup manually?
[20:30] Nova: Anyone knows why I am getting this error while running this code https://gist.github.com/488562 : cannot find module '../' at line: io = require('../') Should I save this to a directory that has some important files in the parent directroy?
[20:31] programble has joined the channel
[20:31] programble has joined the channel
[20:31] mh` has joined the channel
[20:31] bnoordhuis: meder: require('dns')
[20:32] Aria: Well, what's in the '..' directory from that code, Nova? Is there an index.js to read there?
[20:32] mh`: hi all. is it alright to ask a socket.io question?
[20:32] mh`: (socket.io-node, that is)
[20:32] Nova: Nothing at all
[20:32] Nova: The example doesn't provide anything about it
[20:32] bnoordhuis: mh`: yes (though i personally won't know the answer)
[20:33] creationix: mh`: but rauchg_: would ;)
[20:33] Aria: Nova: Then that's why. require('../') would look for ../index.js
[20:33] mh`: thanks guys.. it might not be specific to socket, it might be more of a scope question.. i'm wondering how i can access the serverrequest property from within socket.on
[20:34] mh`: in order to get at the request headers
[20:36] mh`: or if there's another way to get to the request headers from inside the socket.on callback
[20:36] jwl: if Im inside a setTimeout function is having a blocking code..does that still make my application asynched cause i had it inside a setTimeout function that is an asynch function?
[20:37] creationix: jwl: there is only one thread of execution
[20:37] creationix: timeouts don't spawn threads
[20:37] creationix: anything blocking blocks
[20:37] creationix: settimeout just puts it on a new stack to be executed later
[20:39] creationix: jwl: what do you mean by blocking?
[20:40] jwl: creationix: okay .. is there a blocking wait() or sleep() function i can use to see if i blocked my code?
[20:40] RevoOf1 has joined the channel
[20:41] bnoordhuis: jwl: you mean a timer that will interrupt your code? no
[20:41] jwl: creationix: i want to return something that takes time to finnish .. i thought having it in an asynch function would make it asynched as well
[20:41] fangel: creationix: if you look at this sample code http://jsapp.us/s/32, it creates a very simple objects, then does a for( var key in obj ) over it, and it includes non-enumerable options.. any idea why?
[20:41] jwl: i dont know how to create asynched functions that are taking a callback or whatever
[20:41] jwl: i know how to use asynched functions, not how to create them .. are there good libraries for it
[20:41] jwl: bnoordhuis: yeah
[20:42] bnoordhuis: jwl: async in nodejs means async i/o, anything cpu intensive will block the main (and only) thread
[20:42] bnoordhuis: jwl: so don't go calculating pi to ten million places
[20:42] Aria: Or if you do, use a webworker. Or be prepared to wait, like someone calculating pi might expect.
[20:42] creationix: fangel: ahh, it's not what you think
[20:42] bnoordhuis: jwl: if you have anything computationally expensive, you'll have to slice it into chunks with process.nextTick()
[20:43] fangel: probably not, if you wouldn't mind - enlighten me..
[20:43] creationix: js> a = {};a.propertyIsEnumerable('foo');
[20:43] gbot2: creationix: false
[20:43] BrianTheCoder has joined the channel
[20:44] jwl: okay
[20:44] jwl: asynch is pretty cool
[20:44] jwl: never had to think like this before
[20:44] creationix: js> a = Object.create({'foo': true});a.propertyIsEnumerable('foo')
[20:44] gbot2: creationix: false
[20:44] creationix: fangel: even though foo is an enumerable property of a's parent, it's not an enumerable property of a
[20:44] creationix: for..in grabs all enumerable properties of all parents
[20:45] jwl: so if something will take 10 seconds to computed .. i spawn it as a thread ?
[20:45] creationix: jwl: a seperate process, there are no user-level threads in node
[20:45] isaacs has joined the channel
[20:45] creationix: jwl: or write it as a c extension and create your thread there
[20:45] bnoordhuis: jwl: or chop it up and schedule it with process.nextTick()
[20:45] jwl: creationix: what is the difference between process and threads?
[20:45] jwl: a thread has many processes?
[20:46] creationix: jwl: the other way around actually
[20:46] fangel: the difference is how the OS handles them.. :)
[20:46] creationix: normally in node you don't ever have to think about threads
[20:46] jwl: bnoordhuis: okay .. either process.nextTick() or new process
[20:46] creationix: unless you're doing something really special
[20:46] jwl: creationix: i read something about thread pool that wil be used for cpu-intensive work
[20:46] bnoordhuis: or writing a forum
[20:47] creationix: jwl: well, nextTick is just like setTimeout
[20:47] creationix: you still need to chop up your work into parts so it doesn't block for 10 seconds solid
[20:47] bnoordhuis: aw, not even a chuckle?
[20:47] creationix: or use a seperate process and let the OS chop is for you via pre-emption
[20:47] jwl: creationix: oh now i know .. PID is for a process .. and one PID is for identifying one application instance... one process (application instance) could have many threads (that is parallel processings) .. correct?
[20:47] fangel: Node isn't threaded/multi-processed for running your code.. it has a thread-pool so it can park waiting IO there, but everything else runs in the same OS context..
[20:48] bnoordhuis: momma was right when she said i'd never be a stand-up comedian
[20:48] creationix: jwl: yep, multi-threading is the alternative to node's event style
[20:48] cnlohfin: can you bind a to a specific interface when using node.js as a client?
[20:48] stride: bnoordhuis: I kind of laughed if that makes you feel better ;)
[20:48] creationix: but even in node, some things have to be threaded internally because that's the only API the os exposes
[20:48] fangel: technically an application can consists of N processes, which can each have M threads..
[20:49] jwl: creationix: ah .. now i understand what path apache is on =)
[20:49] devinus: anybody doing an ORM for node ?
[20:49] bnoordhuis: stride: it does, thank you!
[20:49] devinus: would be sweet to have arel or w/e on node
[20:49] jwl: devinus: ORM for what in node?
[20:49] creationix: fangel: did you figure out the enumerable mess?
[20:50] jwl: you mean ORM for a database?
[20:50] creationix: Object.keys is normally what you want if you want to loop over an objects enumerable properties
[20:50] ryah: devinus: http://www.benjamincoe.com/post/1656130884/endtable-an-orm-for-couchdb-on-node-js ?
[20:50] creationix: and Object.getOwnProperties for all it's local properties
[20:50] jamescarr has joined the channel
[20:50] jamescarr: micheil, you around?
[20:51] devinus: jwl: yea
[20:51] fangel: yeah, I could tell that it made sense.. but I didn't really have a parent.. I just had a Object-prototype with a method that I made a instance of..
[20:52] dgathright has joined the channel
[20:53] lgl has joined the channel
[20:53] sugardav1 has joined the channel
[20:54] amerine has joined the channel
[20:55] benburkert has joined the channel
[20:55] jetienne has joined the channel
[20:55] danzajdband has joined the channel
[20:55] danzajdband has left the channel
[20:56] fangel: creationix: but I think I've figured it out now, so yeah, thanks.. I just thougt for( .. in .. ) behaved differently
[20:56] creationix: fangel: what are you looking for? the local enumerable keys, or all the enumerable keys?
[20:56] fangel: the local enumerable keys
[20:56] creationix: yeah, Object.keys(obj).forEach(function (key) {
[20:57] creationix: is actually faster than for..in with a .hasOwnProperty guard
[20:57] fangel: that's just not as pretty :)
[20:57] creationix: I think it's prettier
[20:57] creationix: the fastest though is a normal for loop over the Object.keys()
[20:57] creationix: but that's pretty messy
[20:57] mr_daniel has joined the channel
[20:58] fangel: for each( var key in Object.keys(obj) ) { .. should work too, right - if v8 supports it, which I don't actually know if it does..
[20:59] altamic has joined the channel
[21:00] fangel: nah, v8 doesn't support for each.. :)
[21:00] SubStack: ugly
[21:01] SubStack: var Hash = require('traverse/hash'); Hash(obj).forEach()
[21:01] SubStack: :p
[21:01] kersny has joined the channel
[21:03] fangel: SubStack: meh.. the point was to keep it in a for-loop because I like the style of those.. but that's not doing the trick - so if it's Hash(obj).forEach or Object.keys(obj).forEach doesn't really matter to me.. :)
[21:03] MikhX has joined the channel
[21:04] creationix: fangel: well, if you just want the slower for..in loops, just make sure to not et any enumerable properties on the prototype
[21:04] creationix: Object.defineProperty is your friend
[21:04] SubStack: I hate for loops
[21:04] SubStack: to each his own!
[21:05] creationix: My favorite is Object.prototype.forEach() using Object.keys and for(;;) internally
[21:05] creationix: but then that's messing with built-ins
[21:05] creationix: so I quit doing that
[21:05] yozlet has joined the channel
[21:05] SubStack: I think haskell ruined c-style for loops for me
[21:05] fangel: yeah.. I actually tried that.. it all started because I wanted a read-only, non-enumerable count property on my Queue object..
[21:06] creationix: fangel: that's not hard
[21:06] fangel: SubStack: if you're using loops in functional programming, you loose.. recursion ftw.. :)
[21:06] creationix: Object.defineProperty(Hash.prototype, 'count', {get: function () {...}})
[21:06] SubStack: fangel: actually it's more idiomatic to use higher-order functions than explicit recursion in haskell land
[21:06] creationix: fangel: read-only and not enumerable
[21:07] SubStack: map, filter and fold!
[21:07] fangel: SubStack: true, like foldl, map, etc..
[21:07] SubStack: there's even a forM{,_}
[21:07] creationix: SubStack: I did too much ocaml, same effect
[21:07] fangel: I've only used Standard ML.. :)
[21:07] SubStack: but it's just mapM . flip or something
[21:07] creationix: maybe that's why I prefer JS to PSP
[21:07] creationix: *PHP
[21:08] SubStack: awesome, ocaml is in my shortlist
[21:08] SubStack: erlang first though
[21:08] creationix: yeah, ocaml is a lot like haskel and not quite as powerful
[21:08] creationix: lower-level I think
[21:08] Nohryb has joined the channel
[21:08] creationix: it's *kinda* like comparing C++ to C
[21:09] SubStack: ML-derived right?
[21:09] creationix: yep, ocaml is the most widely used ml
[21:09] SubStack: reading the wiki page
[21:09] jamescarr: creationix, anything is better than PHP
[21:10] creationix: haXe is an interesting language, it's a mix of javascript/actionscript with ocaml
[21:10] SubStack: pattern matching is quite nice
[21:10] creationix: yes
[21:10] creationix: though after writing some c code, I think JS's switch statement is pretty nice
[21:10] creationix: try doing a switch with strings in C
[21:10] SubStack: the coolest thing I wrote in haskell: https://github.com/substack/underwater-rov-2010/tree/master/control/
[21:10] jamescarr: Rust looks unexciting
[21:11] SubStack: switch could be better
[21:11] SubStack: oh! I could whip a switch module up with chainsaw
[21:12] SubStack: Switch(x).case('x').case('y', function () {}).default(function () {})
[21:12] SubStack: something like that
[21:12] fangel: I just love pattern matching (and dereferencing)
[21:12] SubStack: probably it's been done before but whatever
[21:12] creationix: SubStack: http://haxe.org/ref/enums
[21:12] SubStack: nothing on npm yet
[21:13] isaacs: haskell is so funny looking
[21:13] SubStack: could also do it .case('x', 'y', function () {})
[21:13] mscdex: woot. i can receive aim messages now :-D
[21:13] RevoOf1: hi. i am coming from java. any document / book (print or online) you recommend for learning javascript?
[21:13] SubStack: isaacs: javascript is pretty funny-looking too
[21:13] isaacs: it's like someone said, "You know what's wrong with Erlang? The syntax!" and everyone was like "YEAH!!" and then they were like, "It's WAY too easy to read!!" and everyone was like, "...?"
[21:13] SubStack: what is all this syntax doing in my scheme? ;)
[21:14] Alex3000 has joined the channel
[21:14] isaacs: SubStack: yeah, but it's funny looking in a way that everyone can kinda get behind.
[21:14] jamescarr: what are some possible examples of Sec-WebSocket-Protocol ?
[21:14] mscdex: (lol (+ 1 3 3 7))
[21:14] jamescarr: ws and wss?
[21:14] necrodearia has joined the channel
[21:14] mscdex: :p
[21:14] creationix: ACTION wishes my node book was complete
[21:14] jamescarr: mscdex, I dable in clojure quite a bit
[21:14] SubStack: isaacs: seems more a product of familiarity and utility of being everywhere
[21:14] jamescarr: personally, I like scala the most
[21:14] mscdex: i don't remember much scheme anymore
[21:14] isaacs: SubStack: yeah, exactly, we can all be C-style chauvinists about it
[21:15] nolan_d has joined the channel
[21:15] isaacs has joined the channel
[21:15] creationix: RevoOf1: Crockford's book is pretty good I hear
[21:15] cardona507 has joined the channel
[21:15] linnk: RevoOf1: I've been looking for the same thing, didn't find it though... JS really needs a book similar to C's "The C Programming Language"
[21:15] SubStack: C does have a lot of bravado
[21:15] mscdex: crockford files!
[21:15] SubStack: so long as we're personifying
[21:16] creationix: Just beware, there is a LOT of crappy JS documentation and books out there
[21:16] mscdex: http://i27.tinypic.com/2yzn2u8.jpg
[21:16] SubStack: linnk: problem is, there is no "the" language
[21:16] Chepra: Anyone ever used postgres-pure?
[21:17] SubStack: there are various specifications running on various platforms with all manners of inconsistencies
[21:17] isaacs: linnk: you mean like the rhino book?
[21:17] isaacs: flanagan's magnum opus?
[21:18] SubStack: I learned javascript by doing view->source in middle school :p
[21:18] isaacs: Well, JavaScript has the EcmaScript Specification, and C has ANSI
[21:18] linnk: isaacs: never heard about that, I'll look it up
[21:18] isaacs: but it's important not to confound "the language" with "the platform"
[21:18] jamescarr: I learned javascript by doing things
[21:18] jamescarr: :)
[21:19] BrianTheCoder has joined the channel
[21:19] linnk: SubStack: I know, but it would be nice if there was some kind of book that just made the ECMAScript specification more accessible
[21:19] linnk: or something like that...
[21:19] isaacs: linnk: it's called "JavaScript: The Definitive Guide" amzn.com/0596101996
[21:19] isaacs: linnk: really, though, you should just read the ES5 spec
[21:19] isaacs: it's not insane.
[21:20] isaacs: or at least, not very insane.
[21:20] SubStack: linnk: mozilla puts out the mdc
[21:20] SubStack: books are boring and you can't even grep them
[21:20] mjr_: MDC++
[21:20] v8bot: mjr_ has given a beer to MDC. MDC now has 1 beers.
[21:20] RevoOf1: thx for all the pointers
[21:20] creationix: RevoOf1: oh, and checkout howtonode.org ;)
[21:21] linnk: SubStack: Yea ok, used the MDC a lot actually :D It's nice
[21:21] bentruyman has joined the channel
[21:21] linnk: a non-grepability is a clear minus
[21:22] SubStack: there is the horrible es5 spec too
[21:22] SubStack: only made available in pdf form
[21:22] creationix: actually someone on the es-discuss list posted an html version of the spec
[21:22] creationix: it's a lot easier to search and read
[21:23] langworthy has joined the channel
[21:23] _mythz has joined the channel
[21:24] jamescarr: what do you all think of some of the ES Harmony proposals?
[21:25] jcodyl1 has joined the channel
[21:26] necrodearia has joined the channel
[21:26] guybrush: https://gist.github.com/720645 http://dl.dropbox.com/u/8314617/node_cpuheavy.png node uses 98% cpu
[21:27] altamic has joined the channel
[21:27] pt_tr: How should getImageData() with external images be dealt with? Given the SOP issues?
[21:27] creationix: jamescarr: I don't think a mailing list with a panel of people is a good way to design a language
[21:27] MikeW has joined the channel
[21:28] creationix: you end up with luke-warm compromise that works for nobody
[21:28] jamescarr: creationix, ditto
[21:28] MikeW: Is npm included with node 0.2.5 or do I need to do something else with it?
[21:28] SubStack: democracy inaction!
[21:28] frodenius: guybrush: you know, you can just do Array(200).join('asdfasdf')
[21:29] frodenius: to concatenate 199 asdfasdf
[21:29] SubStack: MikeW: curl http://npmjs.org/install.sh | sh
[21:29] MikeW: doh, I knew not having curl on my system would bite my ass
[21:29] SubStack: wget -qO-
[21:29] SubStack: same thing
[21:30] MikeW: true, just that some of the node tests failed because they relied on curl, I thought there was yet more stuff broken too
[21:30] creationix: we should integrate npm into node's install script
[21:30] guybrush: frodenius: thx for the hint :)
[21:30] creationix: I think it's considered defacto-standard now
[21:30] MikeW: *nod*
[21:30] creationix: and isaacs and ryah both work together anyway
[21:30] SubStack: creationix: nah let's integrate node into npm's install script
[21:30] creationix: SubStack: I don't think that's a good idea
[21:30] SubStack: I want node versioning in node for node
[21:31] isaacs: SubStack: yo dawg!
[21:31] creationix: since npm is written in node
[21:31] SubStack: irrelevant implementation details
[21:31] creationix: SubStack: I get the feeling you like strange recursion
[21:32] hassox has joined the channel
[21:32] herbySk has joined the channel
[21:32] creationix: well, closing my irc window. I've got lots of work to do. I'll still be on freenode if anyone needs me just message direct
[21:32] creationix has left the channel
[21:33] omarkj has joined the channel
[21:34] aconbere has joined the channel
[21:35] pagameba has joined the channel
[21:36] SubStack: it would be even crazier if you could mix modules running on different versions of node
[21:37] mh`: anyone have any ideas on what the best way to watchfile() and reliably have something called to read the newly-added lines to a text file? it needs to be atomic (i.e. not overlapping changes, not missing changes)
[21:38] zorzar has joined the channel
[21:38] mh`: something like what tailing would get me, but that seems dirty
[21:39] mh`: hmm.. is that what fs.createreadstream does o_0
[21:39] mraleph has joined the channel
[21:42] Yuffster has joined the channel
[21:42] bruse_: dirty or not, tail is pretty damn stable :)
[21:42] SubStack: mh`: oh, you could createReadStream and then Lazy(stream).lines.forEach
[21:43] SubStack: http://github.com/pkrumins/node-lazy
[21:43] strmpnk_ has joined the channel
[21:43] ircretary has joined the channel
[21:44] SubStack: or Lazy(stream).lines.map(String).forEach if you don't want to buf.toString()
[21:44] isaacs: ircretary: hi, welcome back.
[21:44] ircretary: isaacs: I'm not sure what to do with that command. Ask for help in PM and I'll tell you what I can do.
[21:44] isaacs: ircretary: hello, welcome back.
[21:44] ircretary: isaacs: I'm not sure what to do with that command. Ask for help in PM and I'll tell you what I can do.
[21:44] mh`: SubStack: hm
[21:45] SubStack: ROBOTS, is it?
[21:45] arpegius has joined the channel
[21:45] SubStack: I just wrote one of those
[21:45] SubStack: fun times
[21:46] isaacs has joined the channel
[21:47] malkomal_ has joined the channel
[21:47] brianmario has joined the channel
[21:49] SubStack: mh`: annoyingly in testing the stream doesn't stay open :/
[21:50] mh`: i'm trying it now
[21:50] mh`: i'll let you know in a second what i find
[21:50] boaz has joined the channel
[21:50] patricka__ has joined the channel
[21:54] fermion: would anyone recommend anything besides node-mongodb-native for accessing GridFS files via node?
[21:55] arpegius_ has joined the channel
[21:55] cafesofie has joined the channel
[21:55] danzajdband has joined the channel
[21:55] danzajdband has left the channel
[21:56] meck has joined the channel
[21:58] doffm has joined the channel
[22:01] ircretary has joined the channel
[22:02] twoism has joined the channel
[22:02] robmason has joined the channel
[22:03] ircretary has joined the channel
[22:03] sclaflin has joined the channel
[22:04] evanmeagher has joined the channel
[22:04] yatiohi has joined the channel
[22:04] ircretary has joined the channel
[22:05] sivy: i am so not understanding how to run unit tests in node
[22:06] breccan has joined the channel
[22:06] sivy: i'm trying to fire up a basic tcp socket listener, then test that my code can connect to it; can anyone tell me what's wrong with this?
[22:06] sivy: https://gist.github.com/720716
[22:08] ircretary has joined the channel
[22:08] softdrink has joined the channel
[22:08] eee_c has joined the channel
[22:08] wink_: sivy: the callback you pass into createserver doesnt get called until a connection is made to it
[22:08] Connorhd has joined the channel
[22:08] wink_: are you connecting to it elsewhere?
[22:09] sivy: wink_: ooooh
[22:09] ircretary has joined the channel
[22:09] jashkenas has joined the channel
[22:09] sivy: wink_: so, i want to fire up createServer, then call limestone.connect
[22:10] sivy: to that server
[22:10] wink_: sivy: in your listen call, pass a function that will connect to the server you created
[22:11] wink_: the function passed into createserver should get called when that happens
[22:11] jwl: can't there be a Rails like framework that implements CouchDB ORM
[22:11] jwl: we need it!
[22:12] mh`: whats the right way to check if a file exists
[22:12] mh`: stat/statsync throws an exception if it doesn't
[22:13] sivy: wink_: reload that gist
[22:13] sivy: that's the new test, and the output
[22:13] sivy: and the server never dies
[22:14] sivy: how do you shutdown the server after the test runs?
[22:14] wink_: sivy: i dunno, i've not got any direct experience with net.* :>
[22:14] sivy: wink_: ok
[22:15] halfhalo: ACTION throws his hands in the air due to his sucess using eval instead of json.parse for this project
[22:15] SubStack: :(
[22:15] halfhalo: ON PURPOSE
[22:16] SubStack: for shame!
[22:16] isaacs has joined the channel
[22:16] sepehr has joined the channel
[22:17] halfhalo: well, its still running through JSON.parse, but one field is not on purpose
[22:18] halfhalo: and due to the nature of the script, its going to be run on a secure server anywho with the eval being done on local files
[22:18] ryah: ACTION <3 buildbot
[22:19] ryah: ACTION can't wait for the inevitable node builtbot botnet
[22:20] halfhalo: hah
[22:20] ircretary has joined the channel
[22:20] halfhalo: ACTION does go to shore up the eval situation though to make sure its only running on that one field
[22:22] ircretary has joined the channel
[22:22] CIA-54: node: 03Ryan Dahl 07master * r6057747 10/ lib/http.js : Improve HTTP debug messages - http://bit.ly/glFYHE
[22:22] ryah: CIA-54: you don't preform very well.
[22:22] ryah: CIA-54: i'm not sure if it's you or github
[22:23] CIA-54: node: 03Ryan Dahl 07master * r85827bd 10/ test/simple/test-securepair-client.js :
[22:23] CIA-54: node: Avoid cascading EADDRINUSE test failure
[22:23] CIA-54: node: See note in test-securepair-client.js - http://bit.ly/eyV6Kc
[22:23] ircretary has joined the channel
[22:25] jwl: dont you guys think we need a powerful framework like Rails/Django (not the same design, but the principle that it makes the web application development more easier)
[22:25] sivy: ryah: i'm trying to figure out how to unit test a network client (limestone sphinx client) and wondered if you'd have a sec to tell me what's brok with this? https://gist.github.com/720716
[22:26] sivy: jwl: not sure about django, but connect+express are pretty nice
[22:27] isaacs: sweet, i got ircretary directing people from #nodejs and #node into this room now.
[22:27] isaacs: also, anyone can set up watches for anything.
[22:27] ryah: sivy: is limestone on top of http?
[22:27] sivy: ryah: no
[22:28] sivy: connects via tcp
[22:28] sivy: (and limestone isn't mine, i'm just trying to write some tests for it)
[22:28] ryah: sivy: looks like there is a bug in the library
[22:29] jwl: sivy: yeah it is .. but i spent a lot of time coding the framework
[22:29] jwl: not coding the app
[22:29] jwl: but the framework .. and i feel a lot of coders are doing the same nowadays in node.js .. but its still young so .. im sure there will be a more integrated framework in the future
[22:30] ryah: sivy: somehow the library is ending the connection and then trying to write to it
[22:30] benburkert has joined the channel
[22:30] sivy: ryah: i'll look into it - thanks
[22:30] killfill has joined the channel
[22:31] technoweenie has joined the channel
[22:32] cafesofie has joined the channel
[22:33] strmpnk has joined the channel
[22:36] CIA-54: node: 03Ryan Dahl 07v0.2 * r06b600b 10/ (lib/http.js test/simple/test-http-allow-req-after-204-res.js):
[22:36] CIA-54: node: Simplify state transitions in http.Client
[22:36] CIA-54: node: Fixes new bug shown in test-http-allow-req-after-204-res.js pointed out by
[22:36] CIA-54: node: Tom Carden . - http://bit.ly/gLhxCa
[22:39] cferris has joined the channel
[22:40] strmpnk has joined the channel
[22:42] blaines has joined the channel
[22:42] killfill has joined the channel
[22:43] [[zzz]] has joined the channel
[22:43] blaines has joined the channel
[22:45] patricka_ has joined the channel
[22:46] isaacs has joined the channel
[22:46] ShiZWeaK has joined the channel
[22:47] ysynopsis has joined the channel
[22:48] killfill has joined the channel
[22:54] mikeal has joined the channel
[22:55] killfill has joined the channel
[22:56] christophsturm has joined the channel
[22:58] waqas has joined the channel
[23:06] ph^ has joined the channel
[23:06] booths has joined the channel
[23:08] sonnym has joined the channel
[23:12] bgriffith_ has joined the channel
[23:13] davidc_ has joined the channel
[23:14] MikeW: Can I load local scripts from the filesystem like this? script = document.createElement("script"); script.src = '/home/me/script.js';?
[23:14] davida has joined the channel
[23:15] waqas: Yes (as long as the browser's same origin policy doesn't interfere). You need to add the script element to the document too.
[23:16] MikeW: browser?
[23:16] waqas: Gah, sorry, that's what I get for being in too many channels
[23:16] MikeW: :-)
[23:17] isaacs has joined the channel
[23:17] ryah: MikeW: no
[23:17] ryah: MikeW: there is no 'document' object
[23:18] MikeW: ryah: Doh, sorry, reading the script I'm using it looks more like a jsdom question than a node.js question then. var document = require("jsdom").jsdom()
[23:20] [[zz]] has joined the channel
[23:21] eee_c has joined the channel
[23:22] MikeW: weyhey, solved! I can do it but I need to be able to retrieve the file from a real http location, not from the filesystem
[23:23] aconbere: ryah: thanks for responding to my pull request, I left another comment even thought it's closed, but I figured I would ping you about it here (if you're online now)
[23:23] zk has joined the channel
[23:24] Yuffster has joined the channel
[23:24] aconbere: is it worth it for me to track down cosmetic patches to Node's JS? (I'm happy to campaign for them, but not if it's a pain in the arse for you)
[23:24] dioxide has joined the channel
[23:28] ryah: aconbere: sure - but i don't like clever code
[23:29] ryah: !! = clever
[23:32] stagas: v8 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!true
[23:32] v8bot: stagas: v8 is no longer supported (except in PM). Try v8: or v8>
[23:32] stagas: v8: !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!true
[23:32] v8bot: stagas: false
[23:32] necrodearia has joined the channel
[23:32] stagas: damn :P
[23:33] jashkenas: ryah: what do you prefer to !!? Boolean() ?
[23:34] warz has joined the channel
[23:37] slloyd has joined the channel
[23:39] bbttxu has joined the channel
[23:40] hornairs has joined the channel
[23:40] isaacs: v8: Boolean(false)
[23:40] v8bot: isaacs: false
[23:40] ryah: jashkenas: *shrug*
[23:40] isaacs: i dislike the Boolean constructor
[23:40] isaacs: becasue of this:
[23:40] jashkenas: val ? true : false
[23:40] isaacs: v8: new Boolean(false) == false
[23:40] v8bot: isaacs: true
[23:41] jashkenas: !! is the least distasteful ... of those options, imo.
[23:41] ryah: isaacs: that seems okay
[23:41] isaacs: v8: !!(new Boolean(false))
[23:41] v8bot: isaacs: true
[23:41] isaacs: it's just not right for something to coerce to both true and false.
[23:41] isaacs: v8: (new Boolean(false)) ? "it's true" : "it's false"
[23:41] v8bot: isaacs: "it's true"
[23:41] isaacs: W
[23:41] isaacs: T
[23:41] isaacs: F
[23:41] waqas: ACTION laughs
[23:42] isaacs: !! is actually a much nicer operator, because it tells you what'll happen if you put it in an if() or while()
[23:43] isaacs: which is *not* the case with "false == x" or "true == x"
[23:43] isaacs: v8: (false == new Boolean(false)) ? true : false
[23:43] v8bot: isaacs: true
[23:43] justin___: v8: (new Boolean(false) == false) ? "it's true" : "it's false"
[23:43] v8bot: justin___: "it's true"
[23:43] isaacs: in fact, i think the Boolean ctor is my *least* favorite JavaScript feature.
[23:44] justin___: v8: (new Boolean(false) === false) ? "it's true" : "it's false"
[23:44] v8bot: justin___: "it's false"
[23:44] justin___: overall it seems consistent, if somewhat insane
[23:44] isaacs: justin___: it's an object that coerces to "false" when tested with ==, but coerces to "true" everywhere else that it's booleanized
[23:44] isaacs: v8: Boolean(new Boolean(false))
[23:44] v8bot: isaacs: true
[23:45] justin___: yeah, but "if" doesn't coerce
[23:45] justin___: it just thinks of lots of things as true
[23:45] isaacs: justin___: yeah, it does
[23:45] isaacs: justin___: that's the first thing it does.
[23:45] isaacs: same with && and ||
[23:45] richcollins has joined the channel
[23:45] justin___: if that's true, then it's not consistent at all
[23:46] richcollins: Is there a timeout event for http.Client or do you have to implement yourself using setTimeout?
[23:47] mraleph: ACTION thinks that we should ask skynet to send terminator back in time to prevent invention of JS.
[23:47] ryah: bnoordhuis: you here?
[23:47] isaacs has joined the channel
[23:47] bnoordhuis: ryah: i am
[23:47] isaacs: richcollins: https://gist.github.com/715781
[23:48] bnoordhuis: just
[23:48] davidascher has joined the channel
[23:48] isaacs: ACTION IS SUPERFAST HAHAHAH
[23:48] richcollins: So the latter
[23:48] ryah: bnoordhuis: regarding https://github.com/ry/node/issues/issue/457
[23:48] ryah: bnoordhuis: how is it unsafe? i assume you're refering to https://github.com/ry/node/blob/b6face1dce050f78a905ffff789744d9404ffaba/src/node.cc#L1821
[23:48] richcollins: How do I cancel the request? Close the client & request, pause the response?
[23:49] bnoordhuis: ryah: yep
[23:49] isaacs: richcollins: i think r.connection.close() will do it.
[23:49] richcollins: Ah stream.destroy?
[23:49] isaacs: or that
[23:49] bnoordhuis: ryah: exit() runs the atexit() exit handlers and those might do anything
[23:49] isaacs: sure
[23:49] isaacs: :)
[23:49] bnoordhuis: ryah: if another signal is received while those are executing, bam, you're dead
[23:49] richcollins: isaacs: That way I don't have to worry about any more events
[23:50] ryah: bnoordhuis: ah
[23:51] tj_ has joined the channel
[23:52] isaacs: SubStack: regarding that thing you were talking about before about the multiple versions of node in npm, if you have any practical ideas about how that could be made to actually work, please deposit them here: https://github.com/isaacs/npm/issues/issue/231
[23:52] ryah: bnoordhuis: are you okay with this:
[23:52] ryah: static void SignalExit(int signal) {
[23:52] ryah: - exit(1);
[23:52] ryah: + AtExit();
[23:52] ryah: + _exit(1); }
[23:52] nolkyan_ has joined the channel
[23:52] richcollins: isaacs: BTW thanks for your xml parser. Its the only one that I've found that actually works on RSS
[23:53] isaacs: richcollins: kewl, thanks. it's pretty dated and lame, actually. needs a rewrite, and then to be ported to c
[23:53] isaacs: but yes, it's very very forgiving
[23:53] SubStack: isaacs: yes sir!
[23:53] ryah: hm
[23:53] ryah: maybe we should do it in the main thread...
[23:53] bnoordhuis: ryah: yes
[23:53] richcollins: isaacs: I've used libsgml with Io
[23:53] bnoordhuis: AtExit() flushes stdout/err and that isn't safe either
[23:53] richcollins: it's pretty forgiving for html
[23:54] bnoordhuis: not much you can do from a signal handler, really
[23:54] mikeal has joined the channel
[23:54] ryah: yeah
[23:54] ryah: okay
[23:54] ryah: i'll setup a ev_async for it
[23:54] ryah: er, ev_signal i guess
[23:55] ryah: well
[23:55] ryah: it's going to make ^C feel slow
[23:55] bnoordhuis: correctness before speed, right?
[23:56] davidc_ has joined the channel
[23:56] davidascher has joined the channel
[23:56] eee_c1 has joined the channel
[23:57] Aria: How slow?
[23:58] bnoordhuis: not that slow actually, i think
[23:58] bnoordhuis: both signalfd and the pipe trick have a fd that's being polled
[23:58] sh1mmer has joined the channel
[23:58] naturalethic: v8: new Buffer '\x00'
[23:58] v8bot: naturalethic: SyntaxError: Unexpected string
[23:58] Aria: Polling itself won't be slow -- the moment there's a signal, it'd return
[23:58] naturalethic: lol coffeescript
[23:58] naturalethic: v8: new Buffer('\x00')
[23:58] v8bot: naturalethic: ReferenceError: Buffer is not defined
[23:58] mikeal: did the http streams branch merge?
[23:58] bnoordhuis: Aria: yep
[23:58] naturalethic: oh its just v8 not node
[23:58] isaacs: naturalethic: v8bot is not node
[23:59] isaacs: yeah
[23:59] Aria: Is there a reason it'd be processed later than that?
[23:59] bnoordhuis: Aria: if there are lots of other events pending maybe
[23:59] naturalethic: ok, well constructing a Buffer from string strips off all trailing 0 bytes
[23:59] bnoordhuis: otherwise, no
[23:59] Aria: Hm. Could attend to those FDs first to improve the immediacy.
[23:59] Aria: Rather than doing them strictly in order.