[00:00] daveluke has joined the channel [00:00] CIA-39: node: 03Ryan Dahl 07v0.4 * ra2f498a 10/ lib/tls.js : [00:00] CIA-39: node: Revert "Add extra debug print statement to tls.js" [00:00] CIA-39: node: This reverts commit 340291c085f629050bd66668dba7cb006f896d89. [00:00] CIA-39: node: sometimes circular. would break node_g tests. - http://bit.ly/fW3Gi2 [00:02] ratsbane has joined the channel [00:02] dustinwhittle has joined the channel [00:02] gf3 has joined the channel [00:03] KRBssa has joined the channel [00:03] slickplaid: iszak: I had to catch the response. res.on('data', function(chunk) etc... :D [00:03] eric_f has joined the channel [00:03] iszak: slickplaid, next time read the manual :) [00:04] iszak: not to be rude. [00:04] slickplaid: http.request makes it clear you have to. With the way that http.get is worded, it made it sound like you don't. [00:05] johnnywengluu: iszak slickplaid : thanks! it worked :) [00:05] nejucomo has joined the channel [00:05] murz has joined the channel [00:05] evanmeagher has joined the channel [00:05] iszak: johnnywengluu, eh? [00:05] nejucomo has left the channel [00:05] johnnywengluu: iszak slickplaid: do you guys know how to do this on the browser side? [00:05] johnnywengluu: iszak: the sha1 thing [00:06] iszak: oh right [00:06] iszak: johnnywengluu, you need to get a function that does it. [00:06] slickplaid: johnnywengluu: sure; http://www.movable-type.co.uk/scripts/sha1.html#code [00:06] Adman65 has joined the channel [00:07] johnnywengluu: okay .. thought it there was some library for that [00:07] slickplaid: johnnywengluu: nope, openssl isn't in the browser [00:08] johnnywengluu: okay .. then i can make a HTTP server listening for requests and spits out sha1 hashed passwords =) [00:08] johnnywengluu: kinda like the uuid thing on couchdb [00:11] adrian_berg has joined the channel [00:13] SubStack: npm, why you gotta be like that [00:13] SubStack: all empty and such [00:13] isaacs: huh? [00:13] isaacs: what's empty now? [00:13] christophsturm has joined the channel [00:14] SubStack: `npm ls` is only showing my installed packages [00:14] SubStack: ACTION `npm update npm` [00:14] isaacs: oh, did i kill the registry or something? [00:14] SubStack: just to be sure [00:14] SubStack: could be! [00:14] hunterloftis has joined the channel [00:15] matyr has joined the channel [00:15] gf3` has joined the channel [00:15] isaacs: SubStack: there ya go [00:16] CIA-39: node: 03Felix Geisendörfer 07v0.4 * r66601f1 10/ (lib/module.js test/simple/test-require-exceptions.js): [00:16] CIA-39: node: Do not cache modules that throw exceptions [00:16] CIA-39: node: If a module throws an exception on load, it should not be cached. [00:16] CIA-39: node: This patch shows the problem in a test case and also fixes it. [00:16] CIA-39: node: See: https://groups.google.com/forum/#!topic/nodejs-dev/1cIrvJcADbY [00:16] CIA-39: node: Closes GH-707 [00:16] CIA-39: node: Closes GH-710 - http://bit.ly/fHzn9Q [00:16] SubStack: crap, now the latest npm tells me about a bunch of parse errors before it does its thing [00:16] zachsmith has joined the channel [00:16] isaacs: SubStack: sounds like you got bad json in your folders. [00:16] SubStack: well the json parser sucks at tell you where the errors are [00:17] SubStack: *telling [00:17] p_nitsch has joined the channel [00:17] pkrumins: node-json-parser [00:17] pkrumins: on it [00:17] pkrumins: with error reporting [00:17] pkrumins: jk [00:17] YesIDoHTML5AJAX has joined the channel [00:18] YesIDoHTML5AJAX: Is this reasonable: [00:18] YesIDoHTML5AJAX: Controller and view implemented in JavaScript mostly with some PHP. Model implemented in node.js [00:19] Aikar: no [00:19] Aikar: you said with php [00:19] pkrumins: drop that shit [00:19] Aikar: correct that with 'MVC all in JS' then yes [00:19] ShizWeaK_ has joined the channel [00:19] pkrumins: drop mvc bullshit! [00:19] Aikar: you cant intermix JS and PHP [00:19] Aikar: PHP is synchronous, JS is not [00:19] Aikar: (talking server side that is) [00:20] YesIDoHTML5AJAX: Aikar: The view/controller could be both PHP and client-side Javascript [00:20] Aikar: YesIDoHTML5AJAX: sure if you put your server code all in PHP [00:20] YesIDoHTML5AJAX: Server-side ECMAScript (node.js) would be used for the model [00:20] Aikar: but thats not what this channel is for [00:20] Aikar: that wont work [00:21] leedo_ has joined the channel [00:21] Throlkim has joined the channel [00:21] CIA-39: node: 03Aria Stewart 07v0.4 * rfd713e1 10/ (deps/libeio/wscript wscript): [00:21] CIA-39: node: libeio and http_parser build with PIC code [00:21] CIA-39: node: Fix building as a shared library [00:21] CIA-39: node: Closes GH-708. - http://bit.ly/h83vby [00:21] leedo_: /n [00:21] Aikar: PHP is synchronous/blocking. Node.JS is not. [00:21] YesIDoHTML5AJAX: Aikar: Why not? The PHP is only being used to concatenate HTML together [00:21] YesIDoHTML5AJAX: And 90% of the time, PHP won't even be used [00:21] SubStack: there, /finally/ got rid of all the parse errors [00:21] Aikar: you mean View only then [00:21] colinsullivan has joined the channel [00:21] SubStack: pesky stale packages [00:21] YesIDoHTML5AJAX: Yes, view [00:22] seivan has joined the channel [00:22] Aikar: and trying to pass data from js to PHP to render a view sounds silly [00:22] YesIDoHTML5AJAX: And even then, view will be usually rendered with client-side JS [00:22] charlenopires has joined the channel [00:22] Aikar: theres plenty of template engines in node [00:22] YesIDoHTML5AJAX: Aikar: Umm, no [00:22] MrNibbles: anyone played with many of the following frameworks: https://github.com/joyent/node/wiki/modules#web-frameworks-full [00:22] MrNibbles: considering re-doing my blog and site all in node [00:22] Gregor has joined the channel [00:22] matyr_ has joined the channel [00:23] MrNibbles: Express seems pretty neat [00:23] MrNibbles: ive mostly only used node for websocket and service esque projects so far [00:23] Aikar: YesIDoHTML5AJAX: you asked if what your trying to do is reasonable, im answering no its not lol. if mixing PHP into the scope of a web page request is a solution to a problem, found another solution [00:23] Aikar: find* [00:23] Aikar: for one youd have to execute PHP as CGI [00:23] YesIDoHTML5AJAX: Most of the view and controller will be client-side, so PHP's being synchronous isn't relevanty [00:24] Aikar: yes it is [00:24] Aikar: on web page request, you either do all your code in js, or you pass the request to PHP which will drastically slow your app down, you cant go back and forth [00:24] YesIDoHTML5AJAX: xmlhttprequest() calls are used to render all dynamic parts of the page, not server-side PHP [00:24] Aikar: so if you pass it to PHP, you cant do any work in node [00:24] YesIDoHTML5AJAX: It won't be passed to PHP at all [00:25] gf3 has joined the channel [00:25] YesIDoHTML5AJAX: It will be passed directly to the node server [00:25] Aikar: i dont think you know what node.js is lol, maybe your looking for ##javascript ? [00:25] YesIDoHTML5AJAX: xmlhttprequest() (it will be grabbing JHSON objects) directly from node [00:25] MrNibbles: Aikar + YesIDoHTML5AJAX : er, dont feed the trolls? [00:25] MrNibbles: sorry, just to Aikar [00:25] YesIDoHTML5AJAX: No, I know what node.js is [00:25] YesIDoHTML5AJAX: For sure [00:25] Aikar: lol [00:26] YesIDoHTML5AJAX: I wrote a C++ library binding for node.js, in fact [00:26] Aikar: POIDH [00:26] leedo_ has joined the channel [00:26] YesIDoHTML5AJAX: Aikar: You mean GOIDH [00:27] YesIDoHTML5AJAX: Here's my github: https://github.com/prodigylink/node-spell [00:28] gf3` has joined the channel [00:29] YesIDoHTML5AJAX: So here's what I am thinking about doing: render the mostly static page in PHP, then use xmlhttprequest() to ajax the dynamic parts directly from my node server (model) [00:29] CIA-39: node: 03Aria Stewart 07v0.4 * r8a50f23 10/ wscript : [00:29] CIA-39: node: Add support for specifying the libdir [00:29] CIA-39: node: Some OSes use "lib64" rather than "lib", and this lets them override [00:29] CIA-39: node: in waf to accomplish this. [00:29] CIA-39: node: Closes GH-712. - http://bit.ly/hlX9QU [00:30] Aikar: a model represents data, usually a database. so your controller would be in node not php if the page is mostly static. it still makes no sense to bring php into the picture at all. just use Node completely [00:30] MrNibbles: Aikar +1 [00:30] Aikar: its ++ :P [00:30] jesusabdullah: YesIDoHTML5AJAX: Why not just use express and ejs? [00:30] Aikar: ACTION wants moar beer. [00:31] MrNibbles: Aikar ++ [00:31] MrNibbles: Aikar ++1 [00:31] Aikar: no space! lol [00:31] MrNibbles: Aikar + + [00:31] jesusabdullah: aikar++ [00:31] v8bot: jesusabdullah has given a beer to aikar. aikar now has 1 beers. [00:31] Aikar: >:( [00:31] Aikar: yay [00:31] MrNibbles: ah [00:31] MrNibbles: Aikar++ [00:31] v8bot: MrNibbles has given a beer to Aikar. Aikar now has 2 beers. [00:31] Aikar: O.o is the ++ case sensitive? [00:31] Aikar: i guess it is [00:31] MrNibbles: neat bot feature [00:32] MrNibbles: MrNibbles++ [00:32] v8bot: MrNibbles: Don't cheat! You can't give a beer to yourself. [00:32] MrNibbles: :< [00:33] dve: ++MrNibbles [00:33] ceej2 has joined the channel [00:33] jesusabdullah: MrNibbles-=1 [00:33] ceej2: MrNibbles++ [00:33] v8bot: ceej2 has given a beer to MrNibbles. MrNibbles now has 1 beers. [00:33] ceej2: ceej++ [00:33] v8bot: ceej2 has given a beer to ceej. ceej now has 1 beers. [00:33] MrNibbles: \:D/ [00:33] ceej: haha [00:33] Aikar: hax [00:34] ceej2: ceej +100 [00:34] ceej2: ceej ++ [00:34] ceej: :( [00:34] ceej: I'm thirsty :) [00:34] MrNibbles: i have read that webkitRequestAnimationFrame() exists now [00:35] MrNibbles: doesnt appear to exist for me under either chrome/webkit nightly [00:35] Gregor has joined the channel [00:37] CIA-39: node: 03Nathan Rajlich 07v0.4 * ra9a252f 10/ (lib/child_process.js test/simple/test-child-process-env.js): [00:37] CIA-39: node: Read up the prototype of the 'env' object. [00:37] CIA-39: node: Closes GH-713. - http://bit.ly/hv8Nja [00:37] CIA-39: node: 03Ryan Dahl 07v0.4 * r839fb8e 10/ (9 files in 2 dirs): typos - http://bit.ly/ihN5Bx [00:37] MrNibbles: oh well i will just have to assume my code works for now >:( [00:38] shaver: you can test in firefox nightlies, mozRequestAnimationFrame has been there for a while [00:38] lukegalea_ has joined the channel [00:39] MrNibbles: yeah, but i cant confirm it in webkit [00:39] MrNibbles: works fine in FF4 though :) [00:39] shaver: ah [00:41] lukegalea_: Hey.. is Damian Suarez around? (Don't know his IRC nick) [00:41] dancor has joined the channel [00:41] johnnywengluu: it seems impossible to code on node.js without a asynchronous library like async .. isn't that right? [00:41] stagas_ has joined the channel [00:41] tjholowaychuk: lukegalea_: hes comin [00:42] lukegalea_: tjholowaychuk: sweet! Thanks. [00:42] zomgbie has joined the channel [00:42] p_nitsch has joined the channel [00:43] Aikar: johnnywengluu: no [00:43] Aikar: you write code, it works [00:43] Damian has joined the channel [00:44] MrNibbles: johnnywengluu: you learn quite quickly that building large pyramids of callbacks isnt the way to go... [00:44] Aikar: step libraries help yes but its 'possible' to work with it still... [00:44] MrNibbles: lukegalea_: no relation to Daniel Suarez i assume? [00:44] Aikar: even w/o stepping libs [00:45] johnnywengluu: MrNibbles: what do you mean..that async is not a good way of doing it? [00:45] johnnywengluu: how should i code then? [00:45] SubStack: I want a script that tells me where exactly my json is broken [00:45] MrNibbles: johnnywengluu: not in the slightest, just that you need to learn to structure your code a bit better in node if you are struggling [00:45] johnnywengluu: since without it im pretty lost in the async coding style djungle [00:45] johnnywengluu: MrNibbles: yeah im doing it with async [00:46] johnnywengluu: and wondering how else you are going to make it [00:46] johnnywengluu: cause all functions take callbacks .. without that one its difficult to have a good overview of what is happening [00:46] SubStack: ACTION still doesn't get why people think async is hard [00:46] tjholowaychuk: SubStack: me nethier lol [00:47] tjholowaychuk: callbacks dont bother me [00:47] SubStack: I think sync code is harder [00:47] YesIDoHTML5AJAX: I don't get why the technology used to serve the page has any affect on whether node.js can be used to handle ajax requests. I think you guys are confused. [00:47] tjholowaychuk: same [00:47] YesIDoHTML5AJAX: Aikar: Did you check out my github? Not exactly a new am I? :) [00:47] YesIDoHTML5AJAX: *newb [00:47] SubStack: since you can be less sure about which pieces will block [00:48] SubStack: and then you pretty much have to cobble up your own thread pool when you have slow blocking pieces [00:48] SubStack: much harder [00:48] Aikar: YesIDoHTML5AJAX: it doesnt, but its really silly to run apache and php as another layer just to do a mind numbing dull task of serving a page [00:48] Aikar: why would you NOT do it under node [00:48] YesIDoHTML5AJAX: Aikar: Okay, I was asking for theoretical purposes. I am actually using node.js right now [00:48] p_nitsch has joined the channel [00:48] SubStack: and then it's insane to reason about multiple instruction pointers modifying the same data structures [00:49] Aikar: YesIDoHTML5AJAX: you didnt ask us if it was doable lol, you asked was it reasonable, which its not [00:49] SubStack: and re-entrant functions and stacks [00:49] YesIDoHTML5AJAX: Aikar: Which is what I wanted to know. [00:49] SubStack: and you have to second-guess the thread scheduler if you're doing performance-intensive tasks [00:49] SubStack: so much pain [00:50] YesIDoHTML5AJAX: Aikar: For example, you may be working on a legacy site that is PHP-based [00:50] YesIDoHTML5AJAX: Which is yucky because it mixes model, view, and controller together [00:50] SubStack: MVC is overrated [00:50] Aikar: to do php you have to make sure 1) apache is running and stays running and monitor it for problems, 2) php is installed correctly, running correctly, and monitor it for problems, and 3) make sure nodes runnining and monitor for problems. 3 things to watch vs 1 if you just use node [00:50] mlncn has joined the channel [00:51] YesIDoHTML5AJAX: SubStack: Why? [00:51] perlmonkey2 has joined the channel [00:51] SubStack: it's super nice to just have some data structures you can modify as necessary [00:51] SubStack: instead of going out to a database for everything [00:51] SubStack: MVC tends to encourage the latter [00:51] unomi has joined the channel [00:51] SubStack: especially threaded environments like rails [00:51] SubStack: because doing RPC among workers or setting up shared memory is painful [00:52] Aikar: yeah i typically dont follow the M portion of mvc, just seperate out presentation from logic, and somewhat try to keep database interaction organized, and your good to go [00:53] Aikar: and with node you have to seperate presentation from logic, unless your into sadomasochism [00:53] YesIDoHTML5AJAX: Aikar: What would you call that separation of concerns? Logic-Presentation? [00:53] SubStack: I like process separation with rpc between the nodes [00:53] YesIDoHTML5AJAX: Aikar: How do you separate it in node? [00:53] SubStack: it's harder to cheat [00:53] jesusabdullah: maybe view-controller? [00:53] Aikar: view = presentation, controller = logic of what to present. in node unless you was to manually build strings of html into variables, you have to use a template engine [00:53] SubStack: and then if you need some transient state you can just go var state = {} [00:53] YesIDoHTML5AJAX: SubStack: A different node for the business side? [00:53] SubStack: serializing that to a db if you like [00:54] Aikar: which that there usually seperates your presentational code out of logic code [00:54] adrian_berg has joined the channel [00:54] stewars has joined the channel [00:54] dipser has joined the channel [00:54] pkrumins has left the channel [00:54] SubStack: YesIDoHTML5AJAX: what is a 'business side'? [00:54] Aikar: in php, its a template engine in that itself, so you can very easily mix logic with presentation (and most rookie php devs do) [00:54] YesIDoHTML5AJAX: With ajax, the controller can be totally in the browser [00:54] SubStack: I want a json debugger :( [00:54] redmind has joined the channel [00:54] Aikar: YesIDoHTML5AJAX: sure a client side controller, but theres server side controller too [00:55] YesIDoHTML5AJAX: Aikar: right [00:55] jesusabdullah: SubStack: I thought jslint had a json thing in it [00:55] YesIDoHTML5AJAX: But less and less [00:55] softdrink has joined the channel [00:55] Aikar: the code that processes your ajax request and decides what it should do, thats a controller [00:55] squeeks: SubStack: I do like how npm handles json parsing, I must say [00:55] SubStack: squeeks: you like how it just says: npm ERR! Unexpected token } [00:55] SubStack: ? [00:55] YesIDoHTML5AJAX: Aikar: Why couldn't the ajax request be directly to the model? [00:55] SubStack: that is very unhelpful of it [00:55] squeeks: SubStack: .. I don't get that... [00:55] hipe: hello wat is currently the most popular unit testing f/w for node.js, according to you. [00:56] squeeks: nodeunit? [00:56] SubStack: hipe: that is a fact about objective reality, not an opinion [00:56] Aikar: YesIDoHTML5AJAX: cause a model is not logic, a model is an interface to data, you need some controller to decide what model to interact with on the ajax call [00:56] jesusabdullah: The "best" is opinion [00:56] SubStack: thus 'according to you' doesn't agree with the former part [00:56] hipe: :D pick one for me then i'mm sure i'll switch it out , and note i didn't say "best" i hate questions like that ;) [00:56] jesusabdullah: I think expresso is most popular, followed by vows [00:56] jesusabdullah: or maybe vice versa [00:56] jesusabdullah: and there are a few others [00:57] colinsullivan has joined the channel [00:57] squeeks: SubStack: poor guy might not be english native, on other languages of SOV, that would be valid grammmar [00:57] hipe: oops wrong conf. wow i haven't been in a channel this active since, like #ubuntu [00:57] tjholowaychuk: expresso is definitely not the best, they are all lacking [00:57] tjholowaychuk: in their own special ways [00:57] tjholowaychuk: lol [00:57] hipe: s/conf/conv # shutting up now [00:57] SubStack: I like expresso too [00:57] jesusabdullah: I actually liked expresso [00:57] Aikar: unless you make an ajax call directly to a static text file, then that could be considered directly to a model i guess lol [00:57] YesIDoHTML5AJAX: Aikar: Yes, but the server-side controller can be generic RPC [00:57] jesusabdullah: quite a bit [00:57] SubStack: it's not so much that I like expresso, it's more that I dislike vows [00:57] YesIDoHTML5AJAX: Aikar: Is a model the middleware that touches the database? [00:58] zemanel: must see, tractor beams, http://www.youtube.com/watch?v=ojJUzv88Els&feature=player_embedded#at=72 [00:58] tjholowaychuk: haha yeah, its not great, its just less bad [00:58] tjholowaychuk: than others [00:58] jesusabdullah: I liked that it was really easy to write tests in expresso [00:58] tjholowaychuk: right now [00:58] jesusabdullah: that don't get in the way [00:58] YesIDoHTML5AJAX: <-- Computer Science PhD learning how to actually code [00:58] jesusabdullah: Maybe it's just me [00:58] tjholowaychuk: they all have flaws, vows is verbose and annoying, nodeunit is serial only, expresso does not support parallel/serial at the same time [00:58] SubStack: vows makes me indent too far to the right [00:58] SubStack: how superficial is that? [00:58] tjholowaychuk: so setup/teardown dont really work [00:58] YesIDoHTML5AJAX: A model could be written in node, no? [00:59] jesusabdullah: Sure, why not? [00:59] Aikar: YesIDoHTML5AJAX: at risk of an mvc nutjob biting me for not being perfectly right, mostly yes. a model usually represents a table or collection in a database. then sometimes you go into an ORM to represent a row/document [00:59] SubStack: eww, databases [00:59] Aikar: YesIDoHTML5AJAX: http://mongoosejs.com [00:59] jesusabdullah: YOU USE DATABASES SUBSTACK WHAT YOU EEWING FOR [00:59] YesIDoHTML5AJAX: So there's zero logic in the model? [00:59] SubStack: why can't I just use native language data structures and have them be transparently serialized to disk already? [01:00] squeeks: Because disks are fucking slow. [01:00] jesusabdullah: SubStack: Because you haven't perfected permafrost yet? [01:00] SubStack: could be [01:00] lakin has joined the channel [01:00] tjholowaychuk: SubStack: with harmony proxies we could [01:00] tjholowaychuk: easily [01:00] SubStack: need a solid pure-javascript graph database [01:00] tjholowaychuk: not saying it would be super fast or something [01:00] SubStack: tjholowaychuk: already doing it [01:00] Aikar: YesIDoHTML5AJAX: usually no, but you dont have to fully follow MVC, your site may not need a database and then you have the VC portion only (like my day job :P) [01:00] tjholowaychuk: but it would work [01:00] tjholowaychuk: SubStack: great :) [01:00] tjholowaychuk: awesome [01:00] jesusabdullah: tjholowaychuk: check out node-permafrost [01:00] tjholowaychuk: where is that at [01:00] SubStack: and node-sesame does the same trick [01:01] jesusabdullah: orly? [01:01] jesusabdullah: neato [01:01] SubStack: except slightly less general-purpose [01:01] Aikar: the main goal is seperating logic from presentation, models are just for more organization so your db interaction is also organized and when you need to update a query you know exactly where to look [01:01] jesusabdullah: Does pf still break, substack? [01:01] slickplaid: need to figure out how to use node-seseme with redis [01:01] Aikar: goal is to use w/e makes the most sense though and keeps your code tidy and organized [01:01] slickplaid: haven't taken the time to look at it [01:01] SubStack: jesusabdullah: well you can blame the shitty database modules for that [01:01] jesusabdullah: MAYBE I WILL [01:01] jesusabdullah: but are they better? [01:01] tjholowaychuk: SubStack: sesame stores on each set or something? [01:02] SubStack: tjholowaychuk: it hooks on to sets and writes all the sets in its buffer on a process.nextTick() [01:02] tjholowaychuk: SubStack: ah good call [01:02] tjholowaychuk: wish we had them in v8 so I could use them for connect [01:03] jesusabdullah: Isn't sesame connect middleware? [01:03] SubStack: yep [01:03] Plouj: do I have to Buffer.copy() to concatenate Buffers, or can I just do buf += anotherBuf? [01:03] tjholowaychuk: i mean in core [01:03] SubStack: ah [01:03] tjholowaychuk: i dont want compiled stuff [01:03] YesIDoHTML5AJAX: So is a table in an SQL database a model? [01:04] tjholowaychuk: i guess on end() is not really all that different [01:04] ShizWeaK_: tjholowaychuk: are there any plans to support the https module in connect? [01:04] eaton has joined the channel [01:04] eaton has joined the channel [01:04] tjholowaychuk: ShizWeaK_: yup [01:04] tjholowaychuk: im taking a tiny break from the rewrite [01:04] tjholowaychuk: but [01:04] tjholowaychuk: I got like 200 commits in connect for 1.0 [01:04] tjholowaychuk: soon [01:05] ajashton has joined the channel [01:05] ChrisPartridge: sweet! [01:05] dustinwhittle has joined the channel [01:05] tjholowaychuk: sessions even have test coverage this time hahaha [01:05] tjholowaychuk: YAY [01:05] ChrisPartridge: woohoo! [01:06] zzak: ACTION whips tj, back to werk! [01:06] tjholowaychuk: ahahah [01:06] tjholowaychuk: :D [01:06] zzak: i want to play with new connect api :( [01:06] slickplaid: same :D [01:07] ChrisPartridge: I forked connect and made https work, but now it obviously doesn't support http - i'm guessing your solution handles this nicely tjholowaychuk? [01:07] CIA-39: node: 03Ryan Dahl 07master * r360885a 10/ lib/http.js : deprecate http.cat - http://bit.ly/hGpqZv [01:07] tjholowaychuk: ChrisPartridge: my solution? [01:08] ChrisPartridge: tjholowaychuk: well, when you implement https support - i'm guessing you will be able to pass either http or https to connect? [01:08] tjholowaychuk: ChrisPartridge: yea it's still createServer() [01:08] tjholowaychuk: just one takes options [01:08] tjholowaychuk: and one doesnt [01:08] tjholowaychuk: if options are passed, it will be https [01:08] losing has joined the channel [01:09] stewars has joined the channel [01:09] tjholowaychuk: ChrisPartridge: I need https test cov, if you want to work on that in my fork [01:09] tjholowaychuk: I have a bit more session stuff to change [01:09] tjholowaychuk: some docs [01:09] tjholowaychuk: and then I think we are good to go [01:09] ChrisPartridge: tjholowaychuk: Sure thing [01:09] colinsullivan has joined the channel [01:09] tjholowaychuk: ChrisPartridge: appriated, anything helps. I'd like to get 1.0 out tonight or early tomorrow morning [01:11] ChrisPartridge: sounds like a plan to me! [01:15] ToyotaRepublic has joined the channel [01:16] ToyotaRepublic: Last newb question, I promise: Why isn't a relation (table) in an SQL database a model? [01:16] SubStack: because sql sucks [01:16] ToyotaRepublic: So a model abstracts a bit from the database relation [01:17] zentoooo has joined the channel [01:17] SubStack: I hate how programmers are still in 2011 writing code that conforms to how the database works instead of the database conforming to how programmers write code [01:17] ToyotaRepublic: SubStack: I agree. [01:18] tjholowaychuk: SubStack: is that permafrost one yours? [01:18] tjholowaychuk: where is it at? [01:18] tjholowaychuk: I think that would be ideal for smaller sites [01:18] SubStack: https://github.com/substack/node-permafrost [01:18] tjholowaychuk: even now, I have a tiny app to write but I dont want to use mongo or anything like that [01:18] SubStack: still a bit broken [01:18] tjholowaychuk: and node's suck [01:19] SubStack: with supermarket it works reasonably well [01:19] tjholowaychuk: awesome [01:19] sivy: is there an npm packaging guide somewhere? [01:19] ToyotaRepublic: Supermaerket? What's that? [01:19] tjholowaychuk: I had something like this without proxies [01:19] tjholowaychuk: but [01:19] tjholowaychuk: it was so hacky [01:20] matyr has joined the channel [01:20] tjholowaychuk: it uses sqlite? [01:20] tjholowaychuk: :( [01:20] SubStack: yeah because sqlite does all the locking and works reasonably well [01:21] tjholowaychuk: ACTION knows what I'm building tonight [01:21] tjholowaychuk: haha [01:21] SubStack: build a pure-javascript key/value store that doesn't suck (as much) [01:21] SubStack: perhaps bind bdb [01:22] SubStack: oh snap, node-ffi would be pretty boss for that [01:22] Aikar: i think someone started on that [01:22] Aikar: a nodejs based db with indexing etc [01:22] tjholowaychuk: I just want something super easy, coudlnt care less about performance in this case [01:23] ToyotaRepublic: Is supermarket an e-commerce platform for node? [01:23] SubStack: ToyotaRepublic: no [01:23] SubStack: it's a key/value store bolted onto sqlite [01:23] ToyotaRepublic: sweet [01:23] ToyotaRepublic: ACTION uses pg atm [01:25] jesusabdullah: supermarket's nice for a quick n' easy db [01:25] jesusabdullah: imo [01:26] chrischris has joined the channel [01:26] jesusabdullah: ACTION goes home [01:26] ChrisPartridge: tjholowaychuk: memory or peristent store? [01:26] tjholowaychuk: ChrisPartridge: persistent, otherwise you might as well just use an object :p [01:26] arpegius has joined the channel [01:26] leedo_ has joined the channel [01:27] konobi: SubStack: programmers should understand how databases work... there's a reason it has a DSL [01:27] NuckingFuts has joined the channel [01:29] konobi: ACTION stabs datamapper in the fucking face [01:29] ToyotaRepublic: omg [01:29] ToyotaRepublic: MADONNA [01:29] SubStack: konobi: usually I don't care about the database [01:29] Twelve-60 has joined the channel [01:29] SubStack: I just want some data structure to persist across restarts [01:30] matyr_ has joined the channel [01:31] ToyotaRepublic: How can node.js be made more profitable for software companies? [01:31] tjholowaychuk: SubStack: errors on something like this would suck though [01:31] tjholowaychuk: with no callback [01:31] tjholowaychuk: but [01:31] tjholowaychuk: meh [01:31] tjholowaychuk: would be awesome for a little micro db [01:31] bentruyman has joined the channel [01:32] SubStack: tjholowaychuk: meh just have those propagate up in an 'error' event [01:32] tjholowaychuk: yeah [01:32] pifantastic_ has joined the channel [01:33] larsemil has joined the channel [01:35] zachsmith: ToyotaRepublic: it needs more buzzwords associated with it [01:35] ToyotaRepublic: zachsmith: YES! [01:35] ToyotaRepublic: zachsmith: Maybe call it the AJAX server [01:35] zzak: poor datamapper :( [01:35] askhader: Do stream objects have the 'on' method? [01:35] squeeks: I AM GOING TO MAKE A NEW SERVER AND CALL IT "TOILET DUCK" BECAUSE "AJAX" IS TAKEN [01:36] ToyotaRepublic: Call it Madonna-Lady Gaga (MLG) [01:36] Evet_ has joined the channel [01:36] zachsmith: ToyotaRepublic: it needs to be more hipster than that [01:36] ToyotaRepublic: Hipsters love Madonna and Gaga [01:37] squeeks: I"LL WRITE IT IN PROLOG, YOU'VE PROBABLY NEVER HEARD OF IT BEFORE ITS SO OBSCURE [01:37] pyrotechnick1 has joined the channel [01:37] askhader: Do stream objects have the .on() method? [01:37] ToyotaRepublic: squeeks: I WILL WRITE IT IN A FIELD PROGRAMMABLE GATE ARRAY (FPGA) CHIP [01:37] squeeks: That's actually a noble endeavour in my mind. Xilinix? [01:37] sivy: hrm [01:38] sivy: npm doesn't like my package.json [01:38] ToyotaRepublic: NodeOnAChip anyone? [01:38] sivy: but it looks fine to me: https://github.com/sivy/node-statsd/blob/master/package.json [01:38] sivy: anyone see the error. [01:38] sivy: ? [01:38] isaacs: sivy: extra comma after dependencies [01:38] isaacs: sivy: :14$x [01:39] isaacs: sivy: :wq [01:39] squeeks: no index.js? [01:39] isaacs: squeeks: doesn't matter, has a main module [01:39] isaacs: that's just as good [01:39] sprout has joined the channel [01:40] squeeks: you know, this counters things you've said before, but you probably operate on the paradox of "I'm always right even when I'm wrong". [01:40] sivy: isaacs: thanks! [01:40] isaacs: squeeks: what does? main module vs index.js? [01:40] squeeks: nevermind i'm drunk [01:40] sivy: heh. "Literally. Spit. I'm so not kidding." [01:41] jesusabdullah: squeeks: Awesome :D [01:41] jesusabdullah: I already had my binge of the month :/ also I'm sick [01:41] isaacs: squeeks: no, it's a valid objection, though I disagree. it's important to have an illusion of flexibility and developer control so that they can feel empowered. it's also important to have packages be predictable and not so disorganized that users can't figure them out and new devs can't figureout what to do. [01:41] isaacs: so there's a balancing act there. [01:42] CIA-39: node: 03Ryan Dahl 07v0.4 * rea9f5b1 10/ (lib/http.js test/simple/test-http-abort-client.js): [01:42] CIA-39: node: Add 'close' and 'aborted' events to Agent responses [01:42] CIA-39: node: Closes GH-722. - http://bit.ly/f9Ujyk [01:42] CIA-39: node: 03Russell Haering 07v0.4 * r7276ff9 10/ (lib/http.js test/simple/test-pipe-file-to-http.js): http: fix missing 'drain' events - http://bit.ly/hxLOtu [01:42] squeeks: I agree with that. [01:42] isaacs: "index.js" alone is not flexible enough. directories.lib is too flexible. "module" hash is batshit fucking crazy. a "main" field kinda is a nice medium [01:43] isaacs: sometimes you have to do the weird thing to find out that it's actually as stupid as it seems. [01:43] isaacs: occasionally, not often, but once in a while, you're wrong, and it's great, and you're glad you did the stupid thing. [01:44] squeeks: Something tells me you've really put a lot of thought into the zen of making code other people (who may or may not be psychotic killers who know where you live) might use. [01:45] sivy: ACTION published his first module [01:45] sivy: in npm [01:45] isaacs: huuray! [01:45] sivy: wheeeee [01:45] sivy: an afternoons's work [01:45] SubStack: and now browserling is down on account of all the npm insanity [01:45] isaacs: SubStack: ohnoes! [01:46] isaacs: SubStack: anything i can do to help? [01:46] sivy: if anyone's seen etsy's statsd server, written in node; I wrote a client (in npm as node-statsd) [01:46] jacobolus has joined the channel [01:46] SubStack: I guess next time we should have a staging account [01:46] nornagon_: how do i convince node to do transfer-encoding: identity? [01:46] nornagon_: instead of chunked [01:46] SubStack: and then just cp -r ~/.npm into production [01:47] TooTallNate: nornagon_: res.setHeader('Transfer-Encoding', 'identity') [01:48] nornagon_: hm. I'm doing res.writeHead(200, {'Transfer-Encoding': 'identity'}) [01:48] nornagon_: is that different? [01:49] askhader: Do stream objects have the .on() method? [01:50] matyr has joined the channel [01:51] nornagon_: hm, maybe nginx is at fault (again...) [01:52] pauls has joined the channel [01:53] sprout has joined the channel [01:53] ako has joined the channel [01:53] mikeal has joined the channel [01:54] pengwynn has joined the channel [01:55] blueadept has joined the channel [01:57] mikeal: ryah: you around? [01:57] ryah: mikeal: yes [01:58] mikeal: i need to get a list from you [01:58] mmattozzi has joined the channel [01:58] mikeal: of people that you'd like to sit down with the day between jsconf and nodeconf [01:58] mikeal: to talk about node core stuff [01:58] mikeal: cause i need to book a room [01:58] ryah: ok [01:58] mikeal: so if you send me a list of people then I can figure out if they will be at nodeconf and work out a space [01:59] mikeal: btw, watching this now [01:59] mikeal: http://vimeo.com/15444727 [01:59] mikeal: because of you [02:00] mbrochh has joined the channel [02:00] mbrochh has joined the channel [02:01] strmpnk has joined the channel [02:01] tux21b has joined the channel [02:05] Yuffster has joined the channel [02:10] jesusabdullah: tjholowaychuk: You around? I'm trying to play with jade and I'm herping the derp [02:11] nornagon_: ryah: is it a bad idea to expose a node.js https server directly to the web, without an nginx or $reverse_proxy in front of it? [02:12] BillyBreen has joined the channel [02:12] johnnywengluu: is it possible to set a header on the response and then redirect the user to another site? [02:12] johnnywengluu: with express.js [02:17] alex_b has joined the channel [02:17] langworthy has joined the channel [02:17] dnolen has joined the channel [02:21] larsemil has joined the channel [02:21] luke` has joined the channel [02:22] rfay has joined the channel [02:22] NuckingFuts has joined the channel [02:22] davidc_ has joined the channel [02:22] sechrist has joined the channel [02:23] sechrist: anybody know how to count duplicate keys in a couchdb reduce func? [02:24] ajashton has left the channel [02:26] ChrisPartridge: johnnywengluu: I don't see why not [02:27] luke` has joined the channel [02:28] AAA_awright: What happened to ry's node.git [02:29] Gregor has joined the channel [02:29] sechrist: https://github.com/joyent/node [02:30] AAA_awright: Can't we just get ryah to clone from that? [02:30] sechrist: if he forks it [02:30] sechrist: that will be interesting [02:30] zzak: maintain 2 forks? [02:30] gf3` has joined the channel [02:30] zzak: sounds redundant [02:31] AAA_awright: zzak: Every clone is a fork... [02:31] AAA_awright: and a branch, at least one branch [02:31] johnnywengluu: ChrisPartridge: how do you do that in express? there are two apis [02:31] johnnywengluu: res.send(body|status[, headers|status[, status]]) [02:31] johnnywengluu: res.redirect(url[, status]) [02:31] johnnywengluu: the first one is sending a body, headers etc ... and the second one is redirection .. how do you send headers and redirect in the same response [02:32] zzak: ok [02:32] AAA_awright: Yeah doesn't that defeat the purpose of social coding? [02:32] zzak: having it under a different account? [02:32] tjholowaychuk: johnnywengluu: res.header(field, val); then redirect [02:33] sivy has joined the channel [02:33] AAA_awright: zzak: Yeah [02:33] AAA_awright: What's the point of publishing your commits to someone else? [02:33] matyr_ has joined the channel [02:33] AAA_awright: That kinda defeats the whole design of Git [02:33] zzak: licensing? idk [02:34] AAA_awright: I thought it was a liberal license [02:34] zzak: contributor licensing is different tho [02:35] zzak: i think it needed to originate from a legal entity, or corporation [02:35] rogerat has joined the channel [02:35] zzak: im not entirely sure tho [02:35] zzak: ryah would have a better answer for sure [02:36] AAA_awright: I wonder what the possibility of getting the project to move to public domain is [02:36] AAA_awright: There's still external libraries of course, v8 most notably [02:38] johnnywengluu: tjholowaychuk: thank you! [02:39] daveluke has joined the channel [02:40] Ziggorata has joined the channel [02:41] namelessnotion_ has joined the channel [02:41] zentoooo has joined the channel [02:43] xandrews has joined the channel [02:43] rot13 has joined the channel [02:45] mbrochh has joined the channel [02:45] mbrochh has joined the channel [02:50] eyesUnclouded has joined the channel [02:55] jimt_ has joined the channel [02:58] itsTodd has joined the channel [02:58] zemanel has joined the channel [02:59] hij1nx has joined the channel [02:59] yhahn has joined the channel [03:00] itsTodd: Where can I find a list of projects that use node.js in production? [03:00] sechrist: why would you want such a list [03:00] jimt has joined the channel [03:01] itsTodd: Mainly curiosity, but also to see if it has come along far enough for me to dive back into it [03:01] sechrist: On April 1st I am going to post my article about how Facebook is switching from PHP to Node.JS [03:02] itsTodd: nice, what is your website? I would like to read that [03:02] Ratty_: For the lulz [03:02] sechrist: Comes out on April 1st [03:03] freakyfractal has joined the channel [03:03] Ziggorata has left the channel [03:04] randallagordon: itsTodd: https://github.com/joyent/node/wiki/Projects,-Applications,-and-Companies-Using-Node [03:05] itsTodd: thanks, I actually just stumbled onto that page just now [03:05] randallagordon: There are also decent lists on the project sites for Express and Socket.IO for sites which are using those specifically [03:06] chrischr1s has joined the channel [03:07] JulioBarros has joined the channel [03:07] randallagordon: Also, http://nodeknockout.com/ [03:10] jimt_ has joined the channel [03:12] chrischris has joined the channel [03:14] rfay has joined the channel [03:14] Yuffster_work has joined the channel [03:16] sirkitree has joined the channel [03:16] wilmoore has joined the channel [03:17] miccolis has joined the channel [03:21] jconstan has joined the channel [03:22] gravyrobber has joined the channel [03:24] matyr has joined the channel [03:27] matyr_ has joined the channel [03:27] EyePulp has joined the channel [03:29] gravyrobber has joined the channel [03:29] jakehow has joined the channel [03:30] chrischris has joined the channel [03:32] mike5w3c has joined the channel [03:34] Emmanuel_ has joined the channel [03:35] rpflo has joined the channel [03:37] adrian_berg has left the channel [03:37] Chunk has joined the channel [03:37] gravyrobber has joined the channel [03:41] chrischr1s has joined the channel [03:42] rchavik has joined the channel [03:44] redmind has joined the channel [03:48] sivy has joined the channel [03:51] gagaforgaga has joined the channel [03:51] sechrist has joined the channel [03:51] gagaforgaga has left the channel [03:52] vilsonvieira has joined the channel [03:55] perezd has joined the channel [03:57] rburhum has joined the channel [03:58] dspree_ has joined the channel [03:59] chrischris has joined the channel [03:59] matyr has joined the channel [04:00] EyePulp: bah [04:02] itsTodd has left the channel [04:04] dspree has joined the channel [04:04] dspree has joined the channel [04:05] kriszyp has joined the channel [04:06] murz has joined the channel [04:06] saikat_ has joined the channel [04:07] Gregor has joined the channel [04:08] ChrisPartridge: Off topic, does anyone know of a decent, free web based "remote support/dektop" app? [04:08] noahcampbell has joined the channel [04:08] pyrony has joined the channel [04:09] doubletap has joined the channel [04:11] saikat_ has joined the channel [04:14] jacobolus has joined the channel [04:14] sprout has joined the channel [04:16] gravyrobber has joined the channel [04:19] dspree has joined the channel [04:19] dspree has joined the channel [04:20] gravyrobber has joined the channel [04:20] saikat_ has joined the channel [04:24] dnolen has joined the channel [04:24] retrofox has left the channel [04:24] bilalhusain has joined the channel [04:25] rfay has joined the channel [04:25] gravyrobber has joined the channel [04:25] bentruyman has joined the channel [04:26] davidwalsh has joined the channel [04:27] saikat_ has joined the channel [04:27] daveluke has joined the channel [04:28] brapse has joined the channel [04:29] SubStack: and we're back up! [04:29] SubStack: my recon package still has some stupid bugs it seems [04:30] SubStack: time-consuming, infuriating bugs [04:30] ajnasz has joined the channel [04:31] andrewfff has joined the channel [04:32] saikat_ has joined the channel [04:36] sholmes has joined the channel [04:37] sholmes: Hey, so I was wondering if anyone here has done any kind of logging/statistics for their application? That is, do what statcounter.com does? [04:39] raidfive has joined the channel [04:39] doubletap1 has joined the channel [04:39] doubletap has joined the channel [04:40] doubletap has left the channel [04:40] sholmes: I suppose I could just create some middleware for this. [04:42] zorzar has joined the channel [04:42] andrewfff has joined the channel [04:43] Twelve-60 has joined the channel [04:44] SubStack: sholmes: I just use google analytics [04:46] gravyrobber has joined the channel [04:47] hornairs has joined the channel [04:50] matyr_ has joined the channel [04:54] gagaforgaga has joined the channel [04:54] gagaforgaga has left the channel [04:57] perlmonkey2: Is line 40 in this express example correct? https://github.com/visionmedia/express/blob/master/examples/blog/models/post.js [04:58] perlmonkey2: Is that how you call a class method inside the instance? [05:00] SubStack: that's calling an export, not a prototype method [05:00] samcday: Hi all. Does anyone know of a library providing git api (probably via libgit2) bindings? [05:00] samcday: Or is anybody working on one? (: [05:00] ChrisPartridge: samcday: I saw someone mention it in the past few days [05:00] ChrisPartridge: perhaps check the logs [05:01] dancor has joined the channel [05:01] samcday: ChrisPartridge: you got it! cheers ;) [05:01] SubStack: samcday: `npm ls git` says there's git, git-fs, github, gitter, gitweb, and npm-github-service [05:01] SubStack: oh and tempis, a native github client [05:02] SubStack: github and gitter claim to be github apis [05:02] samcday: SubStack: Looking to manage a bare git repo specifically, not a github repo. [05:02] samcday: But sigh, I google'd and checked modules wiki on joyent/node... didn't think to check npm. Derp. [05:02] SubStack: there's also http://search.npmjs.org/ [05:03] samcday: Yeah I've been there a few times, just didn't click. [05:03] samcday: <--- fails [05:04] cjm has joined the channel [05:04] softdrink has joined the channel [05:06] Flybyme has joined the channel [05:12] zzak: samcday: does git use libgit2? [05:15] forzan has joined the channel [05:16] ncb000gt has joined the channel [05:19] dthompson has joined the channel [05:20] dnyy has joined the channel [05:20] brianc: hai [05:20] brianc: I have this really hard question [05:20] brianc: it hurts my brain [05:20] brianc: because I suck @ c++ [05:21] ncb000gt: brianc: whats up? [05:21] brianc: I want to convert from a v8::Local full of strings into a char ** c array of strings. [05:21] SubStack: you want Buffer::Data() [05:21] SubStack: and Buffer::Length() [05:21] brianc: but I wanna call something like this: [05:21] SubStack: at least for the individual elements [05:22] brianc: nativeFunction(['one', 'two', 'three']); [05:22] brianc: where nativeFunction binds to a c++/node binding function [05:22] SubStack: you can always write a javascript layer to wrap around the c++ part [05:23] samcday: zzak: No, libgit2 is an afterthought [05:23] zzak: :( [05:23] brianc: I'm tring to call libpq and it takes a "const char * const *paramValues" as a parameter [05:24] brianc: the type declaration alone blows my mind [05:24] SubStack: brianc: node-ffi! [05:24] SubStack: much easier than the v8 api [05:24] samcday: zzak: I can see a few bindings using it though, so it must be fairly usable [05:24] brianc: on the up side I haven't learned so much about programming in such a short time since I can't remember when [05:24] SamuraiJack has joined the channel [05:24] brianc: SubStack: oh good call! I will check out the node-ffi source [05:25] SubStack: I mean you can just use node-ffi [05:25] zzak: samcday: yeh ive heard really good things, great team behind it [05:25] SubStack: like this https://github.com/substack/node-bigint [05:25] brianc: SubStack: problem with using node-ffi is I'm trying to write libpq -> node bindings (in ryah's own image) and think the node-ffi overhead would introduce too much overhead [05:26] zzak: samcday: i see someone has started one too [05:26] samcday: Where? [05:26] zzak: https://github.com/tjfontaine/node-libgit2 [05:26] zzak: uses node-ffi too [05:26] SubStack: brianc: bigint is pretty fast [05:27] SubStack: all the tests run in ~1sec [05:27] SubStack: and that includes lots of looping over ranges to ensure consistency with builtin arithmetic operators [05:27] brianc: SubStack: I shall totally investigate just using node-ffi. It's just everything else I've done directy binding to libpq, I just suck too hard at C to convert a javascript string array into a C string array [05:28] zzak: samcday: oh check out extension branch [05:29] samcday: zzak: Holy shit ffi is hot, I didn't know about it :D [05:29] brianc: SubStack: in other news, and totally unrelated, I'm really late to the "dnode" party and it _blew my mind_ when I read the docs. Mucho congrats on that. [05:29] zzak: :D [05:29] iszak has joined the channel [05:29] SubStack: haha [05:29] SubStack: awesome [05:29] samcday: And yeah the extension branch is getting a lot of love, gonna keep a very close eye on that. [05:30] SubStack: the 0.6.0 docs will be far more clear [05:30] eaton has joined the channel [05:30] SubStack: and the codebase a lot simpler too [05:30] razvandimescu has joined the channel [05:30] SubStack: working on that right now in fact [05:30] brianc: it's what it opens up [05:30] SubStack: also distributing the browser source won't suck as much [05:30] jesusabdullah: Did tj come back? [05:30] zzak: definitely [05:30] brianc: it's like "hey! you like functions? RUN THIS FUNCTION WHERVER YOU WANT!!?!?!?!" [05:30] saikat_ has joined the channel [05:30] jesusabdullah: Dawg I *love* functions [05:31] SubStack: yeah pretty much! [05:31] jesusabdullah: Actually: ANYBODY here good with jade? [05:31] zzak: yo dawg [05:31] SubStack: jesusabdullah: oooh pick me pick me [05:31] iszak: SubStack, 0.6.x is agesss away [05:31] jesusabdullah: Awesome. [05:31] zzak: i herd u lyke functions [05:31] brianc: I saw a blog post about using dnode & backbone and I felt so happy inside [05:31] jesusabdullah: Basically, I'm just trying to include javascript files [05:31] SubStack: iszak: dnode 0.6.0 [05:31] SubStack: it's at 0.5.6 right now [05:31] iszak: i don't even know what that is [05:31] jesusabdullah: a la,