[00:00] cesconix has joined the channel [00:00] torvalamo: jocafa, jquery makes you cry, but try working with cross-browser DOM without it [00:00] torvalamo: :P [00:00] torvalamo: that'll make you weep [00:00] jocafa: ACTION pets mootools [00:01] torvalamo: that's a very nice wrapper you have there, would be a shame if somet*boom* [00:02] rgl has joined the channel [00:02] torvalamo: i prefer doing things vanilla, because im hardcore [00:02] torvalamo: and i use angular anyways [00:03] halfhalo: HARDCORE!!! [00:03] munro: mc: I wrote my blog to use gist as a backend, github now handles my blog content administration and comments [00:03] mattgifford has joined the channel [00:04] chasefarmer has joined the channel [00:04] mc: that's really clever, honestly [00:04] isaacs has joined the channel [00:04] munro: I took it down, but I'll push it again tonight [00:05] isaacs has joined the channel [00:07] `3rdEden: Damn why does inspiration always come when you want to go to bed >_< [00:07] mc: yeah, i'd be interested to see how you did it [00:07] munro: by polling the gist api periodically [00:08] joshfinnie has joined the channel [00:11] devaholic has joined the channel [00:13] mc: https://github.com/nathan-lafreniere/node-lazydb [00:13] mc: maybe useful [00:13] mc: maybe not [00:15] lzskiss has joined the channel [00:15] jarek has joined the channel [00:15] jarek has joined the channel [00:15] context: any good page that explains how exports/require() work with everything being self contained [00:15] _jzl has joined the channel [00:15] ritch has joined the channel [00:16] peregrine81 has joined the channel [00:16] ritch has left the channel [00:17] isaacs has joined the channel [00:17] jacobolu_ has joined the channel [00:17] fzzzy has joined the channel [00:18] plutoniiix has joined the channel [00:18] [[zzz]] has joined the channel [00:19] devongovett has joined the channel [00:19] replore has joined the channel [00:19] replore_ has joined the channel [00:20] rgl has joined the channel [00:26] _jzl has joined the channel [00:26] ioparadigm has joined the channel [00:28] zanefactory has joined the channel [00:29] rgl_ has joined the channel [00:29] yozgrahame has joined the channel [00:31] aroman has joined the channel [00:32] emilsedgh has joined the channel [00:32] pauls1 has joined the channel [00:33] jarek has joined the channel [00:33] aroman: so let's say I have some async node code that takes a while to get to callback. like, some very IO driven thing that might take 35 seconds to finish. These node testing frameworks I've found all seem to think it's a good idea to fail when something takes longer than a few seconds to return. What's the point of that? [00:33] aroman: isn't the whole point that it can take as long as it damn well pleases? [00:34] sh1mmer: aroman: you still tie up resources while you are waiting for a request [00:34] sh1mmer: aroman: also TCP places assumptions on the length of time things take [00:34] booo has joined the channel [00:34] sh1mmer: You can configure that stuff though [00:34] sh1mmer: but it does have defaults [00:34] aroman: sh1mmer: not if I'm not using TCP [00:34] aroman: oh I see [00:35] te-brian2 has joined the channel [00:35] aroman: so they're assuming I'm not using something like WebSockets (which I am), and that it's unreasonable to expect a web page to take more than a second or so to render server-side [00:35] aroman: and building that assumption into the testing framework [00:35] sh1mmer: aroman: it's not a configurable? [00:36] aroman: sh1mmer: it's not that it isn't, but it took me a little while to figure out why I even needed to do it [00:36] aroman: I've settled on Jasmine and I just do `asyncSpecWait.timeout = 10 * 1000` [00:36] sh1mmer: aroman: it's a reasonable assumption for most applications [00:36] SubStack: eww jasmine [00:36] jgornick has joined the channel [00:36] aroman: I've tried vows, seemed way too cumbersome [00:37] SubStack: hahahahaha so you used jasmine instead hahahaha [00:37] aroman: I really liked node_async, but that's dead now :/ [00:37] aroman: SubStack: jasmine has more simplistic syntax imho. What would you recommend? [00:37] SubStack: tap is pretty good [00:37] SubStack: jasmine is really weird and silly and it pukes all over your namespace [00:38] maxogden: but its 'elegant' [00:38] aroman: yeah I didn't like the namespace clobbering actually [00:39] aroman: SubStack: O.o you said tap is less cumbersome? [00:39] SubStack: tap has a great api [00:39] SubStack: here's a test written in tap https://github.com/substack/node-replicant/blob/master/test/clone.js [00:39] caolanm has joined the channel [00:39] SubStack: note how the testing harness gets out of the way [00:39] strevat_ has joined the channel [00:40] SubStack: you can run that file directly as a node program or use the tap command to run it [00:40] sh1mmer: ACTION likes assert [00:40] SubStack: assert is useful for simple stuff too [00:40] sh1mmer: for i in *.js; do node $i; done [00:40] sh1mmer: tada [00:40] SubStack: I like being able to plan how many tests and issuing t.end() myself [00:41] SubStack: because your asserts might not be called at all [00:41] aroman: SubStack: that does look pretty solid [00:41] SubStack: and it would look like the tests passed [00:42] aroman: well I'll give it a shot, I've only written a few tests so far and I'm just trying to feel out the node testing libraries [00:42] joshkehn has joined the channel [00:42] SubStack: well that's good [00:42] SubStack: I used to write a lot of expresso tests but I soured on the idea of defining tests in exports [00:43] SubStack: nodeunit uses exports too [00:43] caolanm: nodeunit invented the idea of using exports ;) [00:44] caolanm: SubStack: so you definitely don't want to use it! haha [00:44] aroman: yeah not a fan of that either [00:44] joshkehn has left the channel [00:44] djMax: so if I'm in a modal view controller and I want to popup another view controller as modal such that 'dismiss' will only get rid of THAT controller, what's the dance? [00:45] fermion has joined the channel [00:45] dwhittle has joined the channel [00:48] SubStack: djMax: your question assumes a level of familiarity with your specific design choices [00:48] AvianFlu has joined the channel [00:49] Vennril has joined the channel [00:49] Skaag has joined the channel [00:49] aroman: SubStack: I like the syntax a lot. Not sure why plan() is helpful, or why `tap` doesn't exit after running tests [00:50] isaacs: aroman: plan is only necessary if you want to guarantee that a certain number of tests will run, and not some other number of tests. [00:50] isaacs: aroman: typically, i do .end() [00:50] aroman: isaacs: oh, the man himself. Gotcha, thanks. [00:50] isaacs: the reason you need that, though, is because the tests are async, so it doesn't end when the tick is over. [00:51] aroman: right, I guess that goes back to my original question about timeouts for async tests [00:51] isaacs: tap supports timeouts [00:51] langworthy has joined the channel [00:51] aroman: but are they there by default? [00:51] isaacs: test("a test that times out", { timeout: 1000 }, function (t) { setTimeout(function () { t.pass("not soon enough"); t.end() }, 2000) }) [00:52] isaacs: aroman: yeah, the default is 30 seconds [00:52] briancray has joined the channel [00:52] isaacs: which *is* crazy long. [00:52] kazupon has joined the channel [00:52] aroman: yeah that's probably enough for even my rather crazy needs [00:52] isaacs: yeah [00:52] isaacs: you can set it to whatever you want, though. if you want no timeout at all, you can set it to Infinity [00:52] aroman: some of these other testing frameworks have it set to like 4s. [00:52] aroman: right, I'll keep that in mind [00:52] isaacs: 4s is not enough [00:53] djMax: I was just confusing "make a new nav controller and present modal to flip orientation by force" with "push a view controller onto a new nav controller inside a modal to allow back" [00:53] isaacs: aroman: also, t.bailout("reason") is a bit borked right now. i'm working on fixing it. [00:54] qmx has joined the channel [00:55] djMax: wow, both those comments were not for node.js. Apologies. [00:55] jakehow has joined the channel [00:56] c4milo has joined the channel [00:56] Juan77 has joined the channel [00:58] robotmay has joined the channel [00:58] juske__ has joined the channel [00:59] aroman: isaacs: good to know as well. One other question, can I get `tap` to exit itself after all of the tests have end()'d? [01:00] jbpros has joined the channel [01:00] tilgovi has joined the channel [01:00] isaacs: aroman: you can add a tearDown function by doing tap.tearDown(function () { tear down all the things }) [01:00] isaacs: aroman: that could just do process.exit() or something, but typically you want to just server.close() or whatever. [01:00] kevinohara80 has joined the channel [01:01] SubStack: I just server.close() before I call tap.end() [01:01] isaacs: exiting nicely (and not timing out) is a part of testing the program validity, most of the time. [01:01] isaacs: SubStack: the global harness doesn't need to get end() called on it [01:01] isaacs: it's implied [01:01] SubStack: ah [01:01] SubStack: oh this is some global thing [01:01] isaacs: SubStack: or do you mean you do tap.test(function (t) { create server, do stuff, server.close(), t.end() }) ? [01:01] SubStack: I pretty much never test global things ever [01:01] aroman: oh rock on [01:02] SubStack: isaacs: I mean the thing you just said [01:02] aroman: and yeah, I probably *should* be checking my closing logic anyhow :P [01:02] isaacs: SubStack: it's pretty common to do more like this: tap = require("tap"); tap.test("setup", set up the things); tap.test("make ure the things work"...); tap.tearDown(tear down the things) [01:02] isaacs: the module.exports from tap is the GlobalHarness singleton [01:03] SubStack: I don't like that style. [01:03] isaacs: but, running each server in a nested test, that's fine, too [01:03] isaacs: sure. [01:03] neoesque has joined the channel [01:03] isaacs: it's more common when you want to organize tests, and the time to set up and tear down is non-negligible. [01:03] SubStack: I could see that being useful [01:04] isaacs: in some joyent-internal cases, the time to set up the server is highly non-negligible. [01:04] SubStack: right [01:04] raincole_ has joined the channel [01:04] aroman: isaacs: props for the `--timeout` flag. [01:04] isaacs: aroman: thanks [01:04] isaacs: it was a tough call to include nopt in tap [01:04] isaacs: i think we really do need to split it into tap and tap-core [01:06] BillyBreen has joined the channel [01:06] bshumate has joined the channel [01:06] sintaxi has joined the channel [01:07] sintaxi has left the channel [01:09] radarig has joined the channel [01:10] Arro has joined the channel [01:13] EvRide has joined the channel [01:13] ioparadigm has joined the channel [01:14] amigojapan has joined the channel [01:15] Flushot has joined the channel [01:16] eignerchris_ has joined the channel [01:16] bicranial has joined the channel [01:18] Arro has left the channel [01:18] markq has joined the channel [01:18] CIA-101: node: 03isaacs 07v0.6 * r8cca30f 10/ src/node_zlib.cc : (log message trimmed) [01:18] CIA-101: node: zlib binding cleanup [01:18] CIA-101: node: * Add assert to prevent parallel writes [01:18] CIA-101: node: * Embed request object instead of using new/delete [01:18] CIA-101: node: * Remove unnecessary WorkReqWrap in favor of uv_work_t [01:18] CIA-101: node: * Use container_of instead of req->data [01:18] CIA-101: node: Along with 2d8af39accc6e1a863aa60ed80289508f3df50e8 and [01:19] jtrudeau has joined the channel [01:21] briandh has joined the channel [01:21] cballou has joined the channel [01:22] mikeal has joined the channel [01:23] Shaunzie has joined the channel [01:23] bluebit has joined the channel [01:23] [[zz]] has joined the channel [01:24] eignerchris has joined the channel [01:25] bluebit_ has joined the channel [01:26] maru_cc has joined the channel [01:26] ryanrolds_w: I wonder if specifically not hiring people with a spouse/children is against the law. [01:27] Lingerance: Depends on the laws [01:27] ryanrolds_w: Yeah, that would probably depend on the state. [01:27] ryanrolds_w: I will have to research this if I ever start a company and plan to have employees [01:28] brngardner has joined the channel [01:28] bluebit has joined the channel [01:28] maxogden: i only want to hire single brogrammers who will stay until midnight and sleep under their desks [01:28] sorensen__ has joined the channel [01:29] ryanrolds_w: That's where I'm at. [01:29] caolanm has joined the channel [01:29] SubStack: maxogden: and who will pay for their own energy drinks? [01:29] dwhittle has joined the channel [01:29] ryanrolds_w: I only want to hire people that have "better" things to do then worry about their code quality. [01:29] ryanrolds_w: *that don't have better things to do [01:31] maxogden: SubStack: well obviously i would let monster energy drinks advertise on the side of our building in exchange for free shit [01:31] ryanrolds_w: Where I work the people that write the worst code are the ones that leave right at 5:30. All of them just happen to have families. [01:31] SteveDekorte has joined the channel [01:32] maxogden: ryanrolds_w: do you, your coworkers or your company regularly publish things on github? thats a more important indicator of programmer quality for me than family status [01:32] cballou has joined the channel [01:34] theycallmeswift has joined the channel [01:34] tonymilne has joined the channel [01:35] Lorentz: I don't stay after 5pm or so because by then (assuming I started at 9am) my brain is pretty baked and useless from being overworked, so why bother. [01:35] abraxas has joined the channel [01:36] kevinohara: I start my day at 5:30a so I can get home to see my fam. I guarantee I put more hours in than most of my peers. [01:37] context: lorentz: yupe. [01:37] mmyjona has joined the channel [01:37] SubStack: I don't keep a regular schedule at all and I work from home [01:37] context: ryanrolds_w: working more != working better. most the time it means working worse, and it doesn't help [01:38] RobWC has joined the channel [01:38] icewhite has joined the channel [01:40] abraxas has joined the channel [01:41] SteveDekorte_ has joined the channel [01:41] abraxas has joined the channel [01:46] RobWC has joined the channel [01:47] warz has joined the channel [01:47] warz has joined the channel [01:47] bicranial has joined the channel [01:51] ger^kallisti_ has joined the channel [01:52] torvalamo: dont you people have sugar [01:52] torvalamo: :P [01:52] jetheredge has joined the channel [01:54] githogori has joined the channel [01:55] torvalamo: i would make the bold statement that quality of code and passion for programming are directly related [01:56] jaequery has joined the channel [01:57] torvalamo: so those that do clock out at 5.30 may have families, but that doesn't mean they aren't passionate about programming [01:57] WTHpr0 has joined the channel [01:57] torvalamo: it just means they have different priorities [01:57] torvalamo: because they couldn't afford a condom [01:57] thalll has joined the channel [01:58] SubStack: or they didn't compute the conditional probability of a 2% failure rate extended over N sessions correctly [01:58] SubStack: or sometimes people want children even [01:58] torvalamo: :o [01:58] torvalamo: how rude of them [01:59] WTHpr0: what is the easiest to compile node (I'm doing: git pull && ./configure && make && make install but this recompiles the whole V8 engine aswell ? [01:59] torvalamo: if you leave out ./configure it won't make a clean install [02:00] torvalamo: just recompile what's new [02:00] markq: what's the difference between make clean and running ./configure beforehand then? [02:00] torvalamo: configure does other stuff too i assume [02:00] WTHpr0: oh, that was easy :) but won't the git pull remove the configuration ? [02:00] markq: so ./configure makes it "cleaner" [02:01] mmyjona has joined the channel [02:01] jaequery has joined the channel [02:01] a_suenami has joined the channel [02:01] torvalamo: no idea, i just know ./configure and make clean are the two things that makes it recompile everything [02:02] adrianF has joined the channel [02:02] torvalamo: configure configures it and make compiles it based on that config? just a thought :P [02:02] Emmanuel` has joined the channel [02:03] torvalamo: and if the configuaration is new then obviously make clean [02:03] WTHpr0 has joined the channel [02:03] aion has joined the channel [02:04] torvalamo: ryah, any plans to get rid of the python requirement some time in the future? [02:04] jgornick has joined the channel [02:07] siddhion has joined the channel [02:09] replore_ has joined the channel [02:09] replore has joined the channel [02:10] rwaldron has joined the channel [02:10] aroman: torvalamo: you mean ditch waf? [02:11] TheIronWolf has joined the channel [02:11] markq: node-waffles [02:11] skm has joined the channel [02:12] ericmuyser has joined the channel [02:12] langworthy has joined the channel [02:12] johnnychimpo has joined the channel [02:14] mikeal has joined the channel [02:14] torvalamo: aroman, probably, i have no idea why configure requires python [02:15] torvalamo: or why it's there [02:15] torvalamo: at all [02:15] aroman: torvalamo: http://code.google.com/p/waf/ [02:15] aroman: waf is analogous to autotools [02:15] aroman: or CMake or whatever [02:16] radarig has joined the channel [02:16] mikeal1 has joined the channel [02:17] torvalamo: it's not that important but it is a bit of a pain to have to install python first just for the install of node [02:17] aroman: torvalamo: well, just the same you'd be installing another build system [02:17] counterbeing has joined the channel [02:17] deedubs has joined the channel [02:18] aroman: autotools is more common than waf, so you don't even realize that's an explicit dependency [02:18] tjfontaine: actually the project was renamed autohell [02:18] torvalamo: i don't understand why a build system is 100% necessary? [02:19] torvalamo: can't it be done in the makefiles like other apps? [02:19] aroman: tjfontaine: generally I'd agree [02:19] tjfontaine: torvalamo: ... [02:19] aroman: torvalamo: ... [02:19] aroman: that's exactly what autotools is [02:19] aroman: (and CMake) [02:19] tjfontaine: autotools are a way to manage the creation of makefiles [02:19] torvalamo: so.. it makes makefiles? [02:19] aroman: yes [02:20] tjfontaine: cmake and others are also generators [02:20] aroman: and other things. it's responsible for the `configure` script, and the familiar `make && sudo make install` [02:20] tjfontaine: waf and gyp are more accurately replacements for make [02:20] tjfontaine: if my understanding of gyp is right [02:20] aroman: you COULD write a Makefile by hand, but it's only practical if it's a trivially small project [02:20] torvalamo: oh [02:21] torvalamo: then i get it [02:21] aroman: fwiw I've used all three and found that I prefer CMake > Waf > autotools [02:21] aroman: but everyone has their own opinions of course [02:21] tjfontaine: they all suck, no project markup has actually made me enjoy it [02:22] aroman: tjfontaine: +Infinity [02:22] tjfontaine: which is sadly why so many exist [02:22] meso has joined the channel [02:23] aroman: same thing with packaging formats, too. [02:23] johnmdonahue has joined the channel [02:23] tjfontaine: I suppose, though thankfully most are just glorified tarballs :) [02:24] monokrome has joined the channel [02:24] aroman: tjfontaine: which is why it's funny :P [02:24] captain_morgan has joined the channel [02:25] aroman: "My tar-based format is better than your tar-based format because it's negligibly unique" [02:25] tjfontaine: heh, indeed [02:26] jhooks has joined the channel [02:27] cballou has joined the channel [02:27] Hotroot has joined the channel [02:27] Hotroot has left the channel [02:28] gigafied: any recommendations on a package to use to restart say, express on file changes (for dev env only) [02:29] gigafied: https://github.com/shimondoodkin/nodejs-autorestart found that, any other alternatives? [02:30] maxogden: there are like nine billion filewatcher modules on npm [02:30] maxogden: wait, i believe we hit 10 billion last week [02:30] isaacs: maxogden: orly? i thought it was up to 11. [02:31] maxogden: the only things more popular than filewatcher modules are templating engines and "web frameworks" [02:31] tjfontaine: this is the internets, it's over9000 [02:32] RobWC has joined the channel [02:32] chilts: maxogden: and flow control modules :) [02:32] bradleymeck has joined the channel [02:32] maxogden: chilts: oh duh how did i forgot those [02:32] chilts: heh [02:32] captain__ has joined the channel [02:32] cballou has joined the channel [02:33] MUILTR has joined the channel [02:34] thiagopnts has joined the channel [02:35] kerang has joined the channel [02:35] gigafied: but i want the bestest… guess I'll just dig through them or man up and write 10 lines of code [02:37] kerang: in node 0.3.x, http has createClient method that's no longer there in 0.4.x [02:37] perezd has joined the channel [02:37] kerang: what's the proper way of creating http client nowadays? [02:37] maxogden: use request [02:38] kerang: ah, so it's just http.request() [02:38] kerang: thanks [02:39] subhaze has joined the channel [02:39] jan1919 has joined the channel [02:39] maxogden: i meant https://github.com/mikeal/request but your interpretation is also accurate [02:40] te-brian2 has joined the channel [02:40] CrawfordComeaux has joined the channel [02:40] bingomanatee: yeah mike's wrapper is quite nice. Pay attention to the .json and .form options - they trigger a lot of useful headers etc. [02:41] bingomanatee: I use it to unit test my express stuff. [02:41] CrawfordComeaux: What would be a reason for using mongoose to connect to mongodb? [02:42] icewhite_ has joined the channel [02:42] mikeal has joined the channel [02:43] joshsmith: ughh I think I'm having trouble grasping async programming [02:43] jesusabdullah: hacks obviously [02:44] luv5ive has joined the channel [02:46] luv5ive: hi [02:46] luv5ive: i'm new to node.js [02:46] chilts: pquerna: do you know much about the RS Cloud Identity service ... can it be used with Cloud Files and Cloud Servers yet (the docs on those still talk about the v1.1 auth service, rather than Cloud Identity which is v2.0)? [02:46] chilts: (sorry for the long question) :) [02:47] mandric has joined the channel [02:47] icewhite has joined the channel [02:47] CrawfordComeaux: Any suggestions for how to determine whether or not I should use mongoose? [02:48] devongovett has joined the channel [02:48] chilts: luv5ive: welcome :) [02:49] fbartho has joined the channel [02:51] TN has joined the channel [02:51] Aria has joined the channel [02:51] aroman: CrawfordComeaux: uh... what? [02:51] markq: joshsmith: tell me about it [02:51] joshsmith: I just freaked out about for loops [02:52] aroman: joshsmith: .each() is your friend. [02:52] markq: forEach()? [02:52] CrawfordComeaux: aroman: it was suggested I use Mongoose to connect w/mongodb in my app, but was hoping to find some guidance on determining whether or not I should [02:52] joshsmith: I did the if (i < length) pattern [02:53] aroman: CrawfordComeaux: that's like asking "I've been told lawyers make a lot of money, but I'm having trouble figuring out if I should become one" [02:53] aroman: what's your use case like? [02:53] saikat has joined the channel [02:53] CrawfordComeaux: aroman: I guess I should probably hitting up google for reasons ORM should be used [02:53] richardr_ has joined the channel [02:53] markq: CrawFordComeaux: mongoose is nice syntactic sugar [02:53] aroman: CrawfordComeaux: yeah if you don't know the scoop on ORMs, that's definitely something you want to look into [02:53] chilts: CrawfordComeaux: and there are probably between 5-10 other Mongo client libraries too [02:54] aroman: the thing about Mongoose is, as markq said, it's mostly cool because of the syntactic sugar. [02:54] chilts: best way to see if you like them, is to try them ... since everyone has different tastes [02:54] SteveDekorte has joined the channel [02:54] CrawfordComeaux: aroman: lots of tiny bits of real-time data flying about via socket.io, most coming from mobile devices... [02:54] aroman: mongodb being document-based does a lot of things ORMs for RDBMS's do by itself [02:55] CrawfordComeaux: that's what I liked about it when I first checked it out was the simplicity [02:55] aroman: CrawfordComeaux: and you need to store this in a persistent database.. why? [02:55] johnmdonahue has joined the channel [02:56] markq: CrawfordComeaux: use redis for non-persistant socket.io type stuff [02:56] aroman: also `var db = {};` works just fine O.o [02:56] aroman: since Redis is just in-memory anyhow [02:56] markq: yep exactly [02:56] CrawfordComeaux: aroman: most of the bits are votes [02:58] aroman: okay, well, that does sound like you're going to want to persist it. but my advice to you would be to research ORMs, the ones available for node, redis, mongodb, etc. [02:58] aroman: scope out your options [02:58] chjj: it is truly amazing how poorly IE implements js [02:59] aroman: basically any one of them will do what you want, the question is which is best suited. [02:59] aroman: and only you can answer that question :) [02:59] CrawfordComeaux: aroman: tight schedule + this being a prototype = running w/mongoose & persisting just about everything until I've got a proper backend engineer [03:00] CrawfordComeaux: that's my answer to the question of suitability ;) [03:00] joshsmith: aroman: where can you point me to read about .each()? [03:00] dylang has joined the channel [03:00] CrawfordComeaux: write it now, write it fast, write it to work... [03:00] CrawfordComeaux: later on: rewrite it well [03:02] aroman: joshsmith: well, if you're just using 'raw' javascript, then you're looking for https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/forEach [03:02] zodiak has joined the channel [03:02] aroman: there are some libraries that give you lovely async tools for working with data [03:02] joshsmith: aroman: I read that that's not async somewhere, though [03:02] joshsmith: yeah, that's really what I need [03:02] piscisaureus_ has joined the channel [03:02] SamWhited has joined the channel [03:02] ben_alman: npm seems to be caching its module list, is "npm cache clean" the way to fix that? [03:02] ben_alman: or am i looking at the wrong option [03:03] isaacs: ben_alman: what do you mean "caching its module list"? [03:03] ben_alman: when i do an npm search foreach i don't see the module i just published [03:03] ben_alman: called async-foreach [03:03] isaacs: ben_alman: oh, yeah, search doesn't update all that often. [03:03] aroman: joshsmith: http://search.npmjs.org/#/underscore and more directly http://documentcloud.github.com/underscore/ [03:03] ben_alman: isaacs: is that something i can clear here? or do i have to wait [03:03] isaacs: ben_alman: you can `npm cache clean --force` to really thoroughly cleanse, or just `npm view async-foreach` [03:04] isaacs: ben_alman: rest assured, if the publish worked, it's there. [03:04] isaacs: someone else with a less recent cache would see it right away. [03:04] joshsmith: oh, I didn't know underscore was async aroman [03:04] markq: or backbone [03:04] aroman: unless I'm doing that thing where I'm insane again, I think it is. [03:04] ben_alman: isaacs: ok, thanks. i just didn't want to npm cache clean if i misunderstood its use [03:05] isaacs: ben_alman: you can always clean the cache. worst case, it'll make your system slower the next time it fetches. [03:05] isaacs: it's like a browser cache. [03:05] ben_alman: sure [03:05] ben_alman: working now [03:05] isaacs: great :) [03:05] josephmoniz has left the channel [03:05] ben_alman: i'm almost ready to publish my build too [03:05] ben_alman: tool [03:05] ben_alman: in npm [03:05] ben_alman: so, yay [03:06] isaacs: sweet :) [03:06] CrawfordComeaux: anyone using nowjs? same question as before...how do I determine if it's something I should be using? [03:06] ben_alman: isaacs: tbranyen has been working on a cross-os front end to minimatch for globbing [03:07] ben_alman: (i put him up to it) [03:07] aroman: joshsmith: though this seems like it's exactly what you want: https://github.com/caolan/async [03:07] joshsmith: aroman: indeed it does [03:07] ryanrolds_w: maxogden: I try to regular publish things on github. I'm one of the only people in the company that does. [03:07] joshsmith: thanks, dude [03:08] chilts: ryanrolds_w: which company is that? [03:08] maxogden: ryanrolds_w: then you work at a sucky company. find a better company! its not a problem with your coworkers families :) [03:08] Nathan_ has joined the channel [03:08] chilts: well, better they can publish _something_ than _nothing_ :) [03:09] ryanrolds_w: context: I agree. The issue here is that we have a couple people that are PHP developers that aren't putting the effort required to move from PHP to Node.js. [03:09] isaacs: ben_alman: um... i'm writing miniglob already? [03:09] isaacs: ben_alman: it's actually just about done. [03:09] ben_alman: really? [03:09] philipd has joined the channel [03:10] isaacs: if i didn't have a talk to prepare for heroku waza, i probably would have released a new node-glob today. [03:10] isaacs: yeah [03:10] ben_alman: can you finish it for tomorrow? [03:10] isaacs: hahaha [03:10] ben_alman: because that's when i need it :P [03:10] isaacs: maybe if the conf is really boring. [03:10] broofa has joined the channel [03:10] isaacs: you can use http://github.com/isaacs/miniglob right now, probably. [03:10] ben_alman: well, tbranyen's works too… was just waiting on unit tests [03:10] isaacs: i'm probably going to just take that and call it node-glob 3.0 or whatever. [03:10] arturadib has left the channel [03:10] isaacs: that's funn [03:10] isaacs: funny [03:11] eb4890 has joined the channel [03:11] ben_alman: unit tests are fun until you have to deal wih windows [03:11] isaacs: yeah, i need to finish my tests for it. i have a script that does what i expect, even on windows, but it's good to get it formalized into a `npm test` script so that i can dev on it more in the future without worrying about breaking it [03:11] __cole has left the channel [03:12] ben_alman: so like, in your code if you're on windows and the pattern "foo/**/*.js" matches "C:\something\foo\bar\baz.js" does it return "foo\bar\baz.js" or "foo/bar/baz.js" ? [03:12] meso has joined the channel [03:12] ben_alman: or "C:\something\foo\bar\baz.js" [03:12] __cole has joined the channel [03:12] isaacs: ben_alman: it returns foo/bar/baz.js [03:12] Dillon has joined the channel [03:12] ben_alman: ok. [03:12] ben_alman: that's what i was telling tbranyen to do [03:12] lzskiss has left the channel [03:12] ben_alman: because wtf cares about getting windows-looking paths, since path.resolve will "fix" it anyways [03:12] isaacs: ben_alman: or it could be something like c:/something/foo/bar/baz.js [03:13] maletor has joined the channel [03:13] isaacs: ben_alman: actually, / works for all fs operations anyway [03:13] luv5ive has left the channel [03:13] ben_alman: isaacs: interesting [03:13] isaacs: ben_alman: it *doesn't* work for all command line utils, though. [03:13] isaacs: only programmatically. [03:13] isaacs: but like, copy will think that c:/foo is an option [03:14] isaacs: the really tricky bit came about because \ is a valid path char on unix. [03:14] ben_alman: when you say "command line utils" [03:14] isaacs: copy, move, mkdir, etc. [03:14] ben_alman: oh [03:14] isaacs: stuff you type into cmd.exe [03:14] isaacs: copy reads c:/foo as "c: /foo" and then doesn't know what the "/foo" option is. [03:14] isaacs: and gets upset. [03:14] ben_alman: so i'm using glob.globSync [03:15] ben_alman: not async [03:15] isaacs: yeah, that also will not work. [03:15] isaacs: globSync is going away, probably. [03:15] isaacs: it's pretty hazardous anyhow. [03:15] ben_alman: yeah, so we'll need tbranyen;s [03:15] ben_alman: hazardous? [03:15] isaacs: yeah [03:15] ben_alman: why? [03:15] isaacs: by necessity, glob does a pretty considerable number of system calls. [03:15] isaacs: doing that synchronously is kind of awful. [03:15] ben_alman: yes [03:15] isaacs: i guess it's not the end of the world at startup time. [03:16] ben_alman: yeah but if you're writing a blocking utility, async is overkill for coding [03:16] isaacs: i could have miniglob provide a sync option. [03:16] ben_alman: that would be very useful [03:16] isaacs: it's just that it's a lot of duplication of effort. [03:16] isaacs: basically, you have to write it twice. [03:16] isaacs: and maintain two parallel implementations. [03:16] ben_alman: well, consider this [03:16] isaacs: unless you do it the naive way, and walk the whole tree the first time, then minimatch on it. [03:16] isaacs: but that's kind of insane. [03:16] ben_alman: node.js is written primarily for highly concurrent io-driven web applications [03:17] ben_alman: but globbing is probably most commonly used in command-line utils [03:17] ben_alman: which oftendon't need to be async [03:17] ben_alman: doesn't hurt of course, but it does make coding much more complex for simple utils [03:17] isaacs: specious argument. [03:17] chjj: i dont know about you, but my command-line tools better scale [03:17] isaacs: npm is a command line util. [03:17] chjj: command-line-scale > webscale [03:18] isaacs: and it's all async. [03:18] isaacs: why? because it has to do network stuff anyway, and it means that it can do stuff in parallel. [03:18] ben_alman: what if it didn't have to do any network stuff [03:18] isaacs: ACTION loves the & operator in bash [03:18] torvalamo: && makes anything async :P [03:18] isaacs: torvalamo: just &, not &&. [03:18] torvalamo: ok [03:18] skm has joined the channel [03:18] isaacs: but yeah [03:19] torvalamo: i'm no expert, i just see goodness when i see it [03:19] isaacs: ben_alman: i did once go through and try to convert a bunch of npm's stuff to use sync fs instead of async, when that landed in node. [03:19] isaacs: it's actually really nice to have things be asynchronous and functional, once you start thinking in that style. [03:19] ben_alman: i'm sure [03:19] isaacs: i can inject functionality wherever, it's very flexible. [03:19] postwait has joined the channel [03:19] robde has joined the channel [03:20] isaacs: you can send the program flow in ways that just aren't possible in a sync world. [03:20] ben_alman: sure [03:20] isaacs: install two packages at once, clean them both up if one fails, etc. [03:20] isaacs: stuff that's kind of tricky or slow in sync world, i guess, not "not possible" [03:20] isaacs: it's all possible, it's software ;) [03:20] torvalamo: you can't kill anyone! [03:21] torvalamo: i think [03:21] ben_alman: tradeoff between current/future flexibility and writing more code [03:21] ben_alman: there's no way around the fact that in JS, async means more code [03:21] ben_alman: because everything is by necessity wrapped in a function [03:21] isaacs: ben_alman: it's easier to do functionality injection in async code. [03:21] isaacs: ben_alman: check out my node-graceful-fs util. [03:21] ben_alman: isaacs: it is if that functionality is async [03:22] ben_alman: if it's sync, it's the same level of complexity [03:22] isaacs: ben_alman: because it can hijack fs.open and fs.close to not use absurd numbers of open file descriptors, and handle EMFILE errors intelligently. [03:22] isaacs: but if you're doing an openSync, there's nothing it can do. [03:23] khrome has joined the channel [03:23] isaacs: you actually have *more* power with async code, not less. it's like a clutch vs an automatic in some ways. [03:23] ben_alman: i agree [03:23] ben_alman: much more power [03:23] isaacs: you can do *stupid* things, for sure. [03:23] ben_alman: the issue i have is that it feels horribly awkward in javascript [03:23] isaacs: that feeling is not in javascript. [03:23] isaacs: the feeling is in you. [03:24] __cole: YES! [03:24] isaacs: but of course, like most things in js, the syntax is pretty terrible and ugly. [03:24] isaacs: whatever. [03:24] ben_alman: yeah, that [03:24] isaacs: programming isn't about syntax. [03:24] isaacs: it's terrible syntax if it's sync, too [03:24] isaacs: i've spent years in php and bash, js looks pretty nice. [03:24] isaacs: :) [03:24] ben_alman: sure. [03:25] isaacs: anyway, gotta finish this talk. [03:25] ryanrolds: maxogden: Is it a companies responsibility to make sure a developer keeps their tools sharp? [03:25] ben_alman: g/l [03:25] isaacs: you going to waza tomorrow? [03:25] willwhite has joined the channel [03:26] __cole: ryanrolds: yes [03:26] brainproxy: anybody know a resource (like an academic paper or something) which looks at http/REST in view of functional programming concepts, side effects, et al.? [03:26] ryanrolds: maxogden: The employee I have in mind when I talk about this refuses to read High Preformance Javascript on their own time and doesn't pick up stuff from looking at code other coworkers have written. [03:27] __cole: tools and programming skills are two different things [03:27] ryanrolds: __cole: I disagree. It's a developers responsibilty to ensure they are still relevent. [03:27] __cole: by tools i meant hardware/software [03:28] AvianFlu: ryanrolds, as somebody who's been a manager in more than one industry, a bad attitude in an employee is one of the worst things you can have [03:28] AvianFlu: if he or she Just Won't, there ain't dick you can do to improve them [03:28] __cole: ya, ryanrolds fire him tomrorow [03:28] __cole: or her [03:28] __cole: find someone who wants to learn [03:28] ryanrolds: I will admit I'm not the easiest person to work with, but I love helping people that ask. [03:29] AvianFlu: you should like, have a talk with the person about their attitude [03:29] torvalamo: don't do it too much, because most people are average.. and will keep asking you for help [03:29] ryanrolds: Every time I try to help this person or even ask them a question about some code he wrote I get a shrug. [03:29] AvianFlu: if you're not just being a dick yourself - if what you want out of the employee has genuine merit - it can be explained if they're not just a dick [03:29] ryanrolds: And I'm the lead..... [03:29] AvianFlu: but at the end of the day, sometimes you have to admit a hiring mistake [03:30] torvalamo: whenever people at work ask me for help i ask them if they googled it.. and they say yes, and then i google it and give them the first relevant article about the problem [03:30] kerang: ryanrolds: how was he/she hired in the first place? that kind of attitude should've been screened [03:30] AvianFlu: talk about it with the other people involved in the decision, mabye have a talk with the person about the attitude [03:30] __cole: ryanrolds: this is someone on your team? or someone you hired? [03:30] ryanrolds: One issue. This is a friend of mine that I have known for years and I have this job as a result of this person. [03:30] AvianFlu: it's hard to screen attitude a lot of the time [03:30] chrisdickinson: ryanrolds: he or she is setting themselves up for future adversity by not seeking to improve. [03:30] pquerna: chilts: heya [03:30] chrisdickinson: alternatively, they could be feeling fairly burnt out. [03:30] pquerna: chilts: yes, tokens from auth 2.0 can be used against existing services [03:30] AvianFlu: ryanrolds, is there somebody above both of you that you're friendly with [03:30] AvianFlu: ? [03:31] AvianFlu: get them to chime in if it's important enough [03:31] pquerna: chilts: libcloud (in python) uses it for example [03:31] chilts: pquerna: ah sweet, that's awesome :) [03:31] ryanrolds: Yeah, another lead and the boss. I need to have a conversation. [03:31] chilts: am glad that works fine [03:31] chrisdickinson: how long has this gone on for? [03:31] __cole: ryanrolds: you could always just tell them about npm. that should change their attitude [03:31] __cole: imo [03:31] ryanrolds: Haha. [03:31] pquerna: chilts: https://github.com/apache/libcloud/blob/trunk/libcloud/common/openstack.py#L166-203 [03:31] chilts: pquerna: thanks for your help ... I'm gonna add RS Clodu stuff to awssum (to go alongside the AWS stuff) :) [03:32] chrisdickinson: ryanrolds: i ask out of curiosity, just to potentially rule out burnout. [03:32] ryanrolds: This have been going on for a while, 6 months. [03:32] chrisdickinson: were they better before? [03:33] ryanrolds: Yes, but not amazing. We were a PHP shop before. [03:33] chrisdickinson: (I tried to phrase the above more accurately, but words failed me. apologies for the hulk-speak therapist question.) [03:33] chilts: pquerna: I think I'll probably skip the auth v1.1 stuff then, since I guess it'll eventually fade away [03:33] ryanrolds: This really started becoming an issue when be moved to Node. [03:33] chrisdickinson: hm. [03:33] brainysmurf has joined the channel [03:34] torvalamo: so he's doing javascript with php mindset? [03:34] isaacs: ryanrolds: beware the "what i have now" bias. [03:34] ryanrolds: We have a big web client that is all JS. We woudl have him work on the PHP stuff when we could or old projects. [03:34] brainysmurf has left the channel [03:34] isaacs: ryanrolds: every time i've left a job, even when it sucked, it was good. [03:34] isaacs: you'er probably not doing them any favors by keeping them. [03:34] isaacs: ACTION $0.02 [03:34] ryanrolds: isaacs, thanks. [03:34] brainysmurf has joined the channel [03:34] torvalamo: shouldn't you be writing a presentation? :P [03:35] ryanrolds: Haha. Yeah I should be. [03:35] torvalamo: i meant isaacs [03:35] ryanrolds: I have part of it done. ;) [03:35] ryanrolds: Oh. [03:35] torvalamo: but you too, eh? [03:35] ryanrolds: Funny, I have a presentation on Express tomorrow. [03:35] markq: intro to express? [03:35] ryanrolds: Yeah. [03:36] markq: who are you presenting to? [03:36] ryanrolds: A group of programmers in Eugene, OR. [03:36] beseku has joined the channel [03:36] markq: sounds fun [03:36] torvalamo: sounds remote [03:36] ryanrolds: Haha. [03:36] beseku has left the channel [03:36] chrisdickinson: ACTION immediately pictured a mixed group of programmers and coyotes in the audience.  [03:37] ryanrolds: 2nd largest city in Oregon. [03:37] chrisdickinson: also, potentially, bears. [03:37] rwaldron has joined the channel [03:37] torvalamo: 2nd largest city in oregon is like saying you're the 2nd tallest dwarf, isn't it? [03:37] chrisdickinson: ryanrolds: it's actually the "oregon" that triggered the coyotes thing. not sure why. weird word association. [03:38] chrisdickinson: ACTION is in kansas, so he cannot speak about remote-ness. [03:38] pquerna: chilts: yes, at this point you can just use 2.0 as a end user; Also, you can use auth.api.racskpacecloud.com -- don'y need to use the identity endpoint, they both have 2.0 [03:38] c_t_montgomery has joined the channel [03:38] copongcopongw has joined the channel [03:38] kickingvegas: ryanrolds: does this guy have any formal CS knowledge? imho, ajax clients and REST servers are widening the divide in web development between those that have it and those that don't . [03:38] ryanrolds: torvalamo: Yeah, he may be writting PHP in JS. [03:39] torvalamo: that's an hour since i said that... [03:39] markq: so going back to the intro video after forever...wasn't @ryah's talk a slap in the face for PHP people? [03:39] ryanrolds: Yeah. [03:39] ryanrolds: It was pretty funny. [03:39] torvalamo: which talk [03:40] kerang: history of node talk? [03:40] markq: "Windows is very important. Just like php." [03:40] radarig has joined the channel [03:40] ryanrolds: http://www.youtube.com/watch?v=jo_B4LTHi3I [03:40] kerang: i thought it slapped rails more [03:40] ryan_stevens has joined the channel [03:41] ryanrolds: I wonder how many people that talk turned on to Node.js [03:41] strevat_ has joined the channel [03:41] markq: it's like walking up to a caveman and showing him a lighter [03:41] subhaze has joined the channel [03:42] torvalamo: he'd kill you for being weird [03:42] eldingraho has joined the channel [03:42] markq: all the cavemans attacks... [03:42] markq: attack* [03:42] markq: "Fire. Must. Come. From. Wood!!!" [03:42] torvalamo: but luckily with node you can have 40.000 concurrent cavemen, and put them on hold, so you're safe [03:43] torvalamo: "hang on i just gotta do this other thing first..." then you run away and they can't do anything until you stop running, because you're running synchronously [03:43] ryanrolds: kickingvegas: He is familure with AJAX. Our web client (all JS) is still using only AJAX (no sockiet.io yet) and he has worked on that some. He also done other stuff with AJAX. Some of the biggest issues I have been seeing are problems with callbacks and dealing with some of the quirks of JS and ignoring normal ways of improving in browser performance. [03:44] markq: lolz [03:45] ryanrolds: I have tried to get him to stop performing the same long lookups a donzen times in a function, but he keeps commiting the same code. [03:46] kickingvegas: ryanrolds: well, as the saying goes "if you can't fire him promote him up." [03:46] ryanrolds: We could use another QA person, but that's just as detail oriented. [03:47] markq: http://www.youtube.com/watch?v=L_JKb61EalQ [03:47] justin__ has joined the channel [03:47] dark has joined the channel [03:48] markq: I can't find the presentation in Berlin though [03:48] markq: on youtube [03:48] dark: can I use jquery $.ajax on node.js command line? It... isn't calling my success: callback [03:49] maletor has joined the channel [03:50] djMax has joined the channel [03:50] monteslu_ has joined the channel [03:51] subbyyy has joined the channel [03:52] m00p has joined the channel [03:53] ryanrolds: dark: Are you using one of the jquery modules? [03:53] djMax: is there a way to synchronously wait on a key in command line node utils? [03:54] ryanrolds: djMax: Don't believe so. Most/all of the build in sync stuff is for files. [03:55] ppcano has joined the channel [03:55] djMax: ok [03:55] ryanrolds: djMax: What are you trying to do? Any reason looking at data event wont work? [03:56] djMax: I'm iterating over an array and printing out some stuff, but in certain cases I'd like to stop and ask for input [03:56] djMax: I'm sure I could bend my head a little and rework it, but it's just a quick script so I was hoping for a quick fix [03:57] djMax: how does one typically "pause" an iteration and then pick it up where you left off after a callback? [03:59] ppcano has joined the channel [04:00] dilvie has joined the channel [04:00] Vennril2 has joined the channel [04:00] caludio has joined the channel [04:00] ryanrolds: djMax: You could write something that process the next item when you call a function like 'next()'. If the item being processed requires some input you don't call next() until the input is recieved. [04:01] dark: no. just var $ = require('jquery'). actually.. it is calling the error handler.. http://javascript.pastebin.pk/791 [04:01] djMax: and next just has a counter in its closure or is there some cuter enumerator type thing for arrays? [04:01] dark: but actually. I don't want a request with xmlhttprequest header.. I want a regular http request. maybe require('http')? [04:02] ryanrolds: Don't know if you need a closure, but you have the idea. [04:02] djMax: ok, thanks [04:02] dark: I like jquery interface though .-. [04:02] ryanrolds: Yeah. [04:02] djMax: I should say "scope" i suppose, not closure [04:02] ryanrolds: dark: http.request() is what you're looking for. [04:02] hij1nx has joined the channel [04:02] hij1nx: join regexp [04:02] hij1nx: oops [04:03] hij1nx: anyone know any good rooms in irc for regexp? [04:03] markq: lol [04:03] willwhite has joined the channel [04:03] hij1nx: #regexp looks pretty sad [04:03] azakai|2 has joined the channel [04:03] ryanrolds: What's the question? Someone here may be able to help? [04:03] khrome has joined the channel [04:03] dark: hij1nx, I ask regex questions on #sed [04:04] hij1nx: dark: nice [04:04] djMax: I wonder when there will be a quantum leap in regex syntax. [04:04] dark: hij1nx, but actually. you may ask here, I think I can help [04:04] djMax: Like "here are a couple positives and a couple negatives - go figure it out" [04:04] hij1nx: dark: ok i'll gist it up [04:04] blueadept has joined the channel [04:04] blueadept has joined the channel [04:05] hij1nx: dark https://gist.github.com/1592949 [04:05] hij1nx: i'll PM you as to not get too OT [04:06] azakai|2: node doesn't accept arguments like node -disable-crankshaft even though the v8 shell d8 does. Is there some alternative syntax in node perhaps? (-crankshaft does show up in the node help, and -crankshaft works, but not -disable-crankshaft) [04:08] subhaze has joined the channel [04:09] secoif has joined the channel [04:09] secoif has joined the channel [04:10] secoif has joined the channel [04:10] tkaemming has joined the channel [04:10] secoif has joined the channel [04:11] secoif has joined the channel [04:11] secoif has joined the channel [04:12] secoif has joined the channel [04:12] secoif has joined the channel [04:13] secoif has joined the channel [04:13] jamescarr has joined the channel [04:13] secoif has joined the channel [04:14] secoif has joined the channel [04:14] dilvie has joined the channel [04:14] secoif has joined the channel [04:14] xuyuan has joined the channel [04:15] xuyuan: hello node [04:15] secoif has joined the channel [04:15] secoif has joined the channel [04:15] gde33|2 has joined the channel [04:16] legind has joined the channel [04:16] markq: what exactly does express-mongoose do? [04:16] abraxas: has anyone here had any success with asynchronous try/catch modules, combined with modules like node-mysql, etc? [04:16] legind: markq: I believe it makes it possible to store session data in mongo [04:17] jamescarr: legind, it is possible [04:17] jamescarr: see MongoStore [04:17] xxiao has joined the channel [04:17] xxiao: npm WARN nodeunit@0.5.1 package.json: bugs['web'] should probably be bugs['url'] [04:17] ryanrolds: That's common [04:17] redir has joined the channel [04:17] xxiao: To install with C++ bson parser do [04:17] ryanrolds: Don't worry about it. [04:18] kenperkins has joined the channel [04:18] xxiao: why do I need C+= bson? [04:18] xxiao: C++ [04:18] geef has joined the channel [04:18] xxiao: var mongo=require('mongodb'); undefined -->is this typical? [04:18] xxiao: i failed to get connection.insert to work [04:19] xxiao: collection.insert() [04:19] jamescarr: insert? [04:19] jamescarr: oh, hahah [04:19] caolanm has joined the channel [04:19] jamescarr: I never used the mongodb module directly [04:19] jamescarr: I always use mongoose [04:19] xxiao: i c [04:19] xxiao: i see [04:19] markq: brave to be using it directly [04:19] markq: mongoose [04:19] xxiao: let me try mongoose then [04:20] RLa has joined the channel [04:20] legind: anyone know what the convention is in npm for conditional dependency? e.g. if you need either mongoose or db-mysql to be installed [04:21] markq: you mean to put in package.json? [04:21] legind: yes [04:21] jamescarr: markq, heh, I had to crack mongoose open to use GridStore [04:21] jamescarr: mongoose.mongo.GridStore :) [04:21] legind: yikes, that seems like a jog around the block [04:21] legind: mongoose.mongo is just the handler for the native driver [04:23] sarlalian has joined the channel [04:24] markq: i saw conditional dependencies somewhere...can't find it right now though [04:25] markq: i <3 gridstore [04:25] xxiao: maybe someday node shell can replace bash? [04:25] legind: I could just use an install script and reference it in package.jjson [04:25] legind: but I'm not sure if that's the convention [04:26] munichlinux has joined the channel [04:26] Lingerance: maybe someday node shell can replace bash? <-- I really wouldn't want it to. There's a bunch of things that bash does much more easily. [04:26] Lingerance: Same case with Python and Ruby shells. [04:27] RLa: not replace but be alternative [04:27] kazupon has joined the channel [04:28] RLa: and i think you can do that already now [04:28] markq: legind: I think that's the way to do it [04:29] RLa: just add #!/usr/bin/env node at the start of your shell script and write code :) [04:29] strevat_ has joined the channel [04:29] pksunkara has joined the channel [04:29] koo4 has joined the channel [04:29] justicefries has joined the channel [04:29] tomh has joined the channel [04:30] ben_alman: isaacs: minimatch doesn't seem to expand /**/ correctly in win32 [04:31] matjas has joined the channel [04:31] ank has joined the channel [04:31] jerrysv has joined the channel [04:32] dmitrig01 has joined the channel [04:32] heatxsink has joined the channel [04:32] beawesomeinstead has joined the channel [04:32] tshpaper has joined the channel [04:32] garann has joined the channel [04:33] ben_alman: i must be doing something wrong [04:33] iaincarsberg has joined the channel [04:33] ben_alman: i'll play with it more tomorrow. [04:34] mattly_ has joined the channel [04:34] mattly_ has joined the channel [04:34] jayniz has joined the channel [04:34] jayniz has joined the channel [04:34] jayniz has joined the channel [04:35] dscape has joined the channel [04:36] gde33 has joined the channel [04:37] JKarsrud has joined the channel [04:37] beawesomeinstead has joined the channel [04:38] tkro has joined the channel [04:38] __cole has left the channel [04:38] chunhao_ has joined the channel [04:39] matjas has joined the channel [04:40] torm3nt has joined the channel [04:42] niftylettuce has joined the channel [04:42] Aria has joined the channel [04:42] sveisvei has joined the channel [04:43] nickdc has joined the channel [04:44] mattly has joined the channel [04:44] alek_b has joined the channel [04:45] Guest44674 has joined the channel [04:46] wycats has joined the channel [04:47] jamescarr: has anyone made some simple caching mechanism in node.js? Kinda like ehcahce? [04:47] kmiyashiro has joined the channel [04:47] jamescarr: basically looking for something that can be configured to overflow to disk, with element TTL and expiration/evictions [04:47] terite has joined the channel [04:47] jstash has joined the channel [04:48] lmatteis has joined the channel [04:49] isaacs: jamescarr: i haven't seen anything like that [04:49] jamescarr: isaacs, hmph. Think I might set to work on it then [04:49] isaacs: ben_alman: got a test that fails? [04:49] BruNeX has joined the channel [04:49] RexM has joined the channel [04:49] isaacs: jamescarr: that'd be rad [04:49] RobWC has joined the channel [04:49] Lingerance: jamescarr: Ext.data.Cache from my node port might work. [04:49] jamescarr: I use ehcache and libmemcached on lots of stuff, I'd like to have it in node land :) [04:49] ncb000gt has joined the channel [04:50] isaacs: jamescarr: i write a little lru cache that i use for some things, but it's highly un-fancy [04:50] strmpnk has joined the channel [04:50] ryanseddon has joined the channel [04:50] sebastianedwards has joined the channel [04:50] Lingerance: You'll have to listen for an even to do the write-to-disk but it'll hold either: X items or items not older than X. [04:50] isaacs: no ttl, no disk overflow, no expirations [04:50] jamescarr: Lingerance, cool, I'll take a look [04:50] Lingerance: One sec [04:51] Lingerance: https://github.com/RobinStamer/Node.ExtJS/blob/master/data/Cache.js [04:51] Lingerance: If you want an example I can whip one up for you. [04:52] OmidRaha has joined the channel [04:53] jamescarr: sure [04:53] majek has joined the channel [04:54] jakehow has joined the channel [04:55] djbell has joined the channel [04:56] jamescarr: oh man... got to go read the npm docs again :) [04:56] madhums has joined the channel [04:58] owenb has joined the channel [04:59] Margle has joined the channel [04:59] jamescarr: have gone too long without releasing a node module [04:59] tiglionabbit has joined the channel [04:59] duncanbeevers has joined the channel [04:59] dnyy has joined the channel [04:59] Raynos has joined the channel [04:59] tanepiper has joined the channel [04:59] PastorBones has joined the channel [05:01] dingomanatee has joined the channel [05:02] nickdc: So I'm thinking of switching my realtime graphing app API from Zend to Node.js. I assume Node can scale a lot better when 1000 people are sending data points every second? lol [05:03] jamescarr: speaking of scaling, anyone using the new cluster module? [05:04] Prometheus has joined the channel [05:04] xxiao: nickdc: i was told node.js does not scale on multi-core system? [05:04] Lingerance: jamescarr: https://github.com/RobinStamer/Node.ExtJS/blob/master/examples/cache.js [05:04] jamescarr: I hacked a little toy server together today on my laptop during a meeting [05:04] klemenes has joined the channel [05:04] jamescarr: xxiao, http://nodejs.org/docs/latest/api/cluster.html ? [05:04] nickdc: I have heard something similar I believe, but a cluster as jamescarr said may be the trick I need [05:06] nicholasf has joined the channel [05:06] xxiao: jamescarr: not sure if i will call that scalable, for anything you can put them in many threads to 'scale' [05:06] nickdc: so clusters actually run on the same system? [05:06] xxiao: it just shows nodejs itself does not scale in multi-core system [05:06] jamescarr: xxiao, that was only in response to the multiple cores statement [05:07] jamescarr: cluster is part of node.js core [05:07] jamescarr: it just shows it doesn't do it transparently [05:07] ambroff has joined the channel [05:07] nickdc: would it be smart to maybe put a few machines running node behind a load balancer on AWS for example? [05:08] xxiao: nickdc: i think that's the way to go [05:08] jamescarr: nickdc, sure [05:08] jamescarr: nickdc, that's what I do [05:08] Overv_ has joined the channel [05:08] nickdc: ok that's probably what I'll be needing to do :) [05:08] jamescarr: nickdc, you can also load balance your websockets [05:08] joshkehn has joined the channel [05:08] screenm0nkey_ has joined the channel [05:08] fcoury has joined the channel [05:08] jamescarr: npm adduser jamescarr [05:08] ralph has joined the channel [05:08] jamescarr: wrong window [05:08] relix has joined the channel [05:08] bradwright has joined the channel [05:09] isaacs: jamescarr: just `npm adduser` [05:09] isaacs: no args necessary [05:09] jamescarr: yeah [05:09] isaacs: jamescarr: I mean, um... [05:09] isaacs: Password: [05:09] isaacs: ;P [05:10] nickdc: lol [05:10] jamescarr: ha [05:10] Xiphias3 has joined the channel [05:10] nickdc: phishing at a whole new level [05:10] jamescarr: isaacs, you know what I love? How fucking easy it is to publish a package to npm [05:10] jamescarr: you know how long it takes to get stuff published to maven cetnral!? [05:10] ryanrolds: ^ [05:10] jamescarr: *maven central [05:11] brianloveswords has joined the channel [05:11] secoif has joined the channel [05:11] jxie_ has joined the channel [05:11] tbranyen: a few seconds? [05:12] secoif has joined the channel [05:12] jamescarr: tbranyen, I mean if you never published to it before :) [05:13] jamescarr: tbranyen, https://docs.sonatype.org/display/Repository/Sonatype+OSS+Maven+Repository+Usage+Guide :) [05:15] jamescarr: tbranyen, don't you work with github? [05:15] dmitrig01 has joined the channel [05:15] tbranyen: jamescarr: bocoup in boston [05:15] dennisjbell has joined the channel [05:15] jamescarr: ah [05:16] tbranyen: i'm a backbone.js peep ^_^ [05:16] jamescarr: ah! [05:16] jamescarr: that's where I saw you before [05:16] jamescarr: the room for backbone.js [05:17] tbranyen: #documentcloud yea [05:17] chrisdickinson: belatedly: +1 on ease of publishing on npm. [05:17] idoru has joined the channel [05:17] chrisdickinson: (coming from python, where setup.py and pip rule everything around me, for better or worse.) [05:17] idoru has joined the channel [05:18] idoru has joined the channel [05:18] Destos has joined the channel [05:19] JasonSmith has joined the channel [05:19] mrb_bk has joined the channel [05:19] blissdev has joined the channel [05:19] remysharp has joined the channel [05:19] kalv has joined the channel [05:19] cmwelsh has joined the channel [05:20] [Neurotic] has joined the channel [05:20] GoldFire33 has joined the channel [05:20] criswell has joined the channel [05:21] pizthewiz has joined the channel [05:23] gavin_huang has joined the channel [05:24] willwhite has joined the channel [05:25] hij1nx has joined the channel [05:25] hij1nx has left the channel [05:26] iaincarsberg has joined the channel [05:27] chunhao_ has joined the channel [05:27] rwaldron has joined the channel [05:28] jamescarr: ah, it's out there, and it works. Gonna have to add some test coverage and do some refactoring [05:28] terite has joined the channel [05:29] heatxsink has joined the channel [05:29] Lingerance: What's out there? [05:29] amasad has left the channel [05:30] amigojapan has joined the channel [05:30] deoxxa: the new irc packet flooder, apparently [05:31] lmatteis has joined the channel [05:31] warz: irccloud has been dropping a lot, lately. [05:31] nym has joined the channel [05:31] daleharvey has joined the channel [05:31] jeremyselier has joined the channel [05:32] alessioalex has joined the channel [05:33] jamescarr: Lingerance, https://github.com/surety-bonds/express-pagination [05:33] Margle has joined the channel [05:33] HT has joined the channel [05:33] jamescarr: a guy who does work for a company I freelance for wrote it in one of our projects. Just extracted his code out and open sourced it [05:33] sdwrage has joined the channel [05:33] jamescarr: the code needs some test coverage and heavy refactoring, but it DOES work [05:34] matjas has joined the channel [05:35] blissdev has joined the channel [05:35] Shaunzie has joined the channel [05:35] context: did the company say you could do that [05:35] JKarsrud has joined the channel [05:36] silky has joined the channel [05:36] jamescarr: they're fine :) [05:36] fcoury has joined the channel [05:36] dthompso99 has joined the channel [05:36] matjas has joined the channel [05:36] dthompso99 has left the channel [05:36] dnyy has joined the channel [05:37] garann has joined the channel [05:38] rwaldron has joined the channel [05:38] ditesh|cassini has joined the channel [05:38] justicefries has joined the channel [05:38] joshfinnie has joined the channel [05:38] tiglionabbit has joined the channel [05:39] beawesomeinstead has joined the channel [05:39] Shaunzie has joined the channel [05:40] jayniz has joined the channel [05:40] jayniz has joined the channel [05:40] jayniz has joined the channel [05:41] bosky101 has joined the channel [05:41] tiglionabbit_ has joined the channel [05:41] jeremyselier has joined the channel [05:41] mattly has joined the channel [05:41] ryanseddon has joined the channel [05:41] heatxsink has joined the channel [05:42] tanepiper has joined the channel [05:42] MUILTR has joined the channel [05:42] kerang has left the channel [05:43] kerang has joined the channel [05:43] saikat has joined the channel [05:43] pradeebv has joined the channel [05:43] TooTallNate has joined the channel [05:43] pradeebv has left the channel [05:43] terite has joined the channel [05:44] jetienne_ has joined the channel [05:44] Nomon__ has joined the channel [05:44] nickdc: where is socket.io.js installed for the client side to use on a windows box? [05:45] whoops has joined the channel [05:45] nickdc: is it the one in socket.io\lib\socket.io.js ? [05:45] lwille has joined the channel [05:45] wycats has joined the channel [05:46] dscape has joined the channel [05:46] relix has joined the channel [05:46] Raynos has joined the channel [05:46] duncanbeevers has joined the channel [05:47] context: socket.io serves up the file [05:47] context: the site shows how to use it [05:48] sveisvei has joined the channel [05:48] tomh has joined the channel [05:48] chunhao_ has joined the channel [05:48] context: but it doesn't look like there is a single file it serves up. its many [05:49] kerang: maxogden: thanks for the pointer to mikeal's request... works well, but i wonder what object is being returned from request(url)... [05:49] nickdc: yea I'd rather have socket.io serve it up [05:49] t4nk073 has joined the channel [05:50] PastorBones: in Express is it possible to inject html elements during page rendering? [05:50] PastorBones: well, after it's rendered but before sent to browser? [05:51] context: uhh the server doesn't render html [05:51] PastorBones: yeah I know Jade does...just wondering if it's possible to do this [05:51] context: jade generates html [05:51] t4nk073: question in express we are using bodyparser and for a certain post we want to get the raw request and not have it parsed. looking for ideas please [05:51] context: it doesn't render it [05:52] PastorBones: the command is res.render() [05:52] PastorBones: not res.generate P [05:52] PastorBones: :P [05:52] kalv has joined the channel [05:52] warz: i think the terminology used by express is compile [05:53] PastorBones: ok, you say tomatoe I say tomato...is it possible to intercept the 'compiled' html before being sent to the browser and inject stuff like stylesheets in the ? [05:53] context: pastorbones: you'd have to ask your question a little different... you can load it in dom.js, make your changes, and re-render it, and waste a lot of time [05:53] RexM has joined the channel [05:53] context: pastorbones: or just put whatever in the html tempalte to begin with [05:54] context: pastorbones: why isn't your template putting whatever stylesheets it needs in it already? [05:54] context: or add some helper method to add said stylesheets in if they are needed [05:54] screenm0nkey_ has joined the channel [05:54] warz: if you're scraping somebody elses html, and serving it back up with modifications, then you could just wrap the compile method used by the template engine [05:54] warz: and modify the compiled markup [05:54] PastorBones: that's what I'm doing, making a module to add stylesheets, scripts, keywords, etc...but want to be able to do it per app.get() statement [05:54] warz: but like context said, if youre already using an engine [05:54] warz: why not just it in the template [05:55] owenb has joined the channel [05:55] context: pastorbones: use something like dom.js to 'render' the html, then you can use jquery or manual dom selectors and inject whatever you want [05:55] remysharp has joined the channel [05:55] context: well, he asked a question then brought up jade, which had nothing to do with what he was doing, or related to anything he really wanted or needed [05:55] majek has joined the channel [05:56] context: mmmm. what is the dom library node people use :x [05:56] stalled has joined the channel [05:56] context: as if their arent 500 of them [05:57] strmpnk has joined the channel [05:57] galaxywatcher has joined the channel [05:57] PastorBones: jsdom is the one I know of [05:57] nym has joined the channel [05:57] context: there we dgo ! [05:57] reid has joined the channel [05:57] niftylettuce has joined the channel [05:57] context: i was looking at domjs which is almost a year old [05:58] context: pastorbones: id use jsdom to render the html, and inject away to you're hearts desires [05:58] phire has joined the channel [05:58] Outsider__ has joined the channel [05:59] PastorBones: na, you're right...waste of time really...was thinking of packaging this module for others to use and was trying to simplify it some by not having them need to edit the layout differently [05:59] context: huh? [05:59] context: so... you want people to add shit to their site by editing code instead of just editing their own template? [05:59] PastorBones: :) I'll make a gist [05:59] context: that doesn't even make sense [06:00] t4nk073: question in express we are using bodyparser and for a certain post we want to get the raw request and not have it parsed. looking for ideas please [06:00] context: t4nk073: you asked that like 45 seconds ago [06:00] sharkbird has joined the channel [06:01] klemenes: what test framework do you use? [06:01] SubStack: tap! [06:02] ryanrolds: t4nk073: You are going to have to create a middleware for that. [06:02] RLa: vows here [06:02] galaxywatcher has joined the channel [06:02] Shaunzie: mocha/should [06:02] context: t4nk073: chek http.IncomingMessage [06:02] context: t4nk073: express Request extends from that. [06:03] context: t4nk073: https://github.com/visionmedia/express/blob/master/lib/request.js [06:03] context: you could see that in the source for express [06:03] t4nk073: thanks [06:03] JasonSmith has joined the channel [06:04] ryanrolds: Beaware that source isn't released. [06:04] jonbaer has joined the channel [06:04] ralph has joined the channel [06:05] context: t4nk073: looks like it has headers {} but i dont see the full raw request saved [06:05] bradwright has joined the channel [06:05] daleharvey has joined the channel [06:05] ryanrolds: Correct [06:05] Overv_ has joined the channel [06:05] wingie has joined the channel [06:05] ryanrolds: raw body used to be saved, but that changed a while back [06:06] emilsedgh has joined the channel [06:06] ryanrolds: In fact I made the change, I think. [06:06] wingie: where is functions for strings http://documentcloud.github.com/underscore/ ? [06:07] ryanrolds: Er, doh. I didn't make that change. I made the default to {} change. [06:07] dgathright has joined the channel [06:07] t4nk073: build a middleware and use app.use makes the most sense [06:07] ryanrolds: But yeah, raw body is not longer available. If you need it you have to create a middlware. [06:09] mattgifford has joined the channel [06:10] kishoreyekkanti has joined the channel [06:11] Gekz has joined the channel [06:11] Gekz has joined the channel [06:12] SamuraiJack has joined the channel [06:14] cmwelsh has joined the channel [06:15] jamescarr: holy cow [06:15] jamescarr: http://www.orau.org/ptp/collection/atomictoys/GilbertU238Lab.htm [06:15] garrensmith has joined the channel [06:15] jamescarr: A science kit that came with uranium samples [06:15] jamescarr: and a government guide on how to prospect for uranium [06:15] jamescarr: LOL [06:15] olegp has joined the channel [06:16] pksunkara has joined the channel [06:16] BruNeX has joined the channel [06:16] trotter has joined the channel [06:16] ncb000gt has joined the channel [06:17] briandh has joined the channel [06:17] jjd has joined the channel [06:20] mara has joined the channel [06:22] jocafa has joined the channel [06:22] codeclarified has joined the channel [06:22] level09 has joined the channel [06:22] bartt has joined the channel [06:23] jocafa: can anyone recommend a good adblock hosts file? [06:23] richardr has joined the channel [06:23] curtischambers has joined the channel [06:24] bartt has left the channel [06:26] lmatteis has joined the channel [06:27] mike5w3c has joined the channel [06:28] mape has joined the channel [06:28] PastorBones: context: my gist - https://gist.github.com/1593359 [06:28] tomlion has joined the channel [06:29] PastorBones: jocafa I have an excellent one, would just have to upload it somewhere [06:30] PastorBones: oh wait, it's not adblock though...it's modified to put in your hosts file and makes all the ads timeout [06:32] context: pastorbones: i dont know about you but most people i know just have a set of style sheets and they include all those style sheets in all pages [06:33] PastorBones: really? [06:33] context: yeah? [06:33] PastorBones: I only put global styles in a stylesheet that's included on all pages, like global.css, forms.css [06:33] jocafa: PastorBones: that's what i'm looking for. just redirecting to localhost [06:33] jocafa: 404 all the things! [06:33] robhawkes has joined the channel [06:33] PastorBones: jocafa: over 16,000 ad url's listed in this file http://www.mediafire.com/?uw0pfid038sbuc8 [06:33] context: pastorbones: why so many different styles for different pages? [06:34] PastorBones: I don't know [06:34] PastorBones: cuz the pages look different? [06:34] TimTim has joined the channel [06:35] PastorBones: like my chat page doesn't look like my 404 error page besides the 'main' layout of it [06:35] PastorBones: it has a chatbox on it [06:35] MatthewS has joined the channel [06:35] BillyBreen has joined the channel [06:36] context: well 404 and 500 arent really apart of your app are they [06:36] kerang: does anyone know how mikeal request piping is supposed to handle error? the example and documentation on https://github.com/mikeal/request is not clear [06:36] context: why are you rendering 404/500 ? just make them static... [06:36] PastorBones: it was just an example off the top of my head [06:36] garrensmith: kerang check the code [06:37] PastorBones: does my methods slow down rendering? [06:37] kerang: garrensmith: i did, there's a callback that passes error, but for piping, it return a Request that gets piped across, no error handling there [06:38] blissdev has joined the channel [06:38] mrb_bk has joined the channel [06:39] ollie_ has joined the channel [06:39] zanefactory has joined the channel [06:40] vIkSiT has joined the channel [06:40] vIkSiT: hello all [06:40] vIkSiT: beginner advice: i'm trying to stream a file to a number of connected clients [06:40] jan1919 has joined the channel [06:40] trodrigues has joined the channel [06:40] SrPx has joined the channel [06:40] jakeskik has joined the channel [06:40] vIkSiT: i'm also using socket.io - is there a better way than run a while loop through the file and broadcast? [06:41] PastorBones: yeah, nowJS [06:41] tomb has joined the channel [06:41] PastorBones: <3 nowJS [06:41] purr: Let it be known that PastorBones hearts nowJS. [06:41] vIkSiT: hmm [06:41] PastorBones: nowJS is a wrapper for socket.io and allows your client and server to share namespace...works like a dream IMO [06:41] vIkSiT: interesting [06:41] vIkSiT: so if i understand it right.. [06:42] vIkSiT: lets say i have a file i want to read line by line, and a function that reads it (by looping over all lines with a while !empty) called readFile() [06:42] RobWC has joined the channel [06:42] PastorBones: you can call that function directly in your clientside code [06:42] ParadoxQuine has joined the channel [06:42] vIkSiT: then using now.js, a client will call its *own* instance of the while()? [06:42] vIkSiT: so 4 browsers == 4 while loops? [06:42] SrPx: hey guys, can I use socket.io to communicate between a flash client and node.js? [06:42] PastorBones: now.readFile(function(line){ document.write(line); }) [06:43] vIkSiT: woo [06:44] firebalrog has joined the channel [06:44] PastorBones: you can pull from the server clientside or you can push from the server side...nowJS even supports groups (so assign users to groups per streamed file?) [06:45] context: srpx: pretty sure it supports flash sockets as a transport. [06:45] jocafa: that's better. hosts + empty 404 and 403 locally. [06:45] vIkSiT: PastorBones, ah. [06:45] SrPx: context: what do you mean? [06:45] context: srpx: http://socket.io/#browser-support the website even says it does. [06:45] PastorBones: yes it does support flash sockets [06:45] SrPx: context: hmm good [06:45] PastorBones: you can pick/choose in the socket.io configuratoin [06:46] SrPx: context: so just to be sure, I can use Flash's connect, send, receive etc functions without anything else to communicate with node.js and it will work as well as if I was using a javascript client? [06:47] context: srpx: no. you use socket.io's JS client. socket.io's JS client will use a flash socket. [06:48] dragon: Flash? Ew. [06:48] context: srpx: i doubt you will find any examples for using the flash socket directly yourself. [06:48] context: flash IS pretty worthless... [06:48] PastorBones: actually I think it can http://www.simb.net/2011/04/15/flash-in-the-javascript-age/ [06:48] SrPx: context: i think what i need to do can only be done in flash [06:48] PastorBones: SrPx: nonsense [06:49] PastorBones: even Adobe is pursuing other avenues besides Flash in the new HTML5 age [06:49] context: there ou go [06:49] SrPx: i want to make a webcam chat between 2 people, simple as that, but couldnt find anything for html5? [06:49] PastorBones: '...allowing for amazing mashups between html and flash clients.' [06:49] context: srpx: webcam still needs to use flash. you win. [06:49] SrPx: :/ [06:50] SrPx: damn [06:50] SomeoneWeird: lol [06:50] context: srpx: though you are still probably going to need a flash server in the back end to handle the video properly [06:50] Heisenmink has joined the channel [06:50] SrPx: context: everything else is already on node.js / socket.io / javascript. all I need is to send the client's peerid to the flash client [06:51] PastorBones: there are some js + canvas webcam solutions and here's a opensource JS + Flash webcam thingy http://code.google.com/p/jpegcam/ [06:51] SrPx: hmm interesting [06:51] context: there is html5 support for webcams in browsers already? [06:52] PastorBones: NodeJS, websockets, and Android webcams http://www.youtube.com/watch?v=cjmuwA8l1LQ [06:52] _unary has joined the channel [06:54] context: go android [06:54] PastorBones: yeah perty neat [06:54] PastorBones: and running on a cheap/slow laptop at that [06:55] context: ahh opera-pre has support. [06:56] josh-k has joined the channel [06:58] pradeebv has joined the channel [06:59] fangel has joined the channel [07:00] PastorBones: so what module to use for encrypting passwords?? [07:00] PastorBones: should I just use crypto or is there something better? [07:01] vIkSiT: PastorBones, have you used nowjs with socket.io? [07:02] PastorBones: well nowjs wraps socket.io, you only need the one [07:02] PastorBones: and I've built a chatroom with it [07:03] pV has joined the channel [07:03] SrPx: weelll [07:03] SrPx: the problem is that [07:03] vIkSiT: oh awesome! [07:03] SrPx: how would i send the image to the other client? [07:03] nickdc has left the channel [07:03] SrPx: flash already has a built in solution for this [07:03] SrPx: ;x [07:04] context: so use it [07:04] context: use both ? [07:04] SrPx: yep [07:04] stonebranch has joined the channel [07:04] SrPx: ill use flash just for the webcam [07:04] SrPx: just need to send the clients peerid to the flash client, think ill make a hppd request from flash [07:05] davetayls has joined the channel [07:06] SrPx: http.createServer(function (req, res) { res.writeHead(200, {'Content-Type': 'text/plain'}); res.end('Hello World\n'); }).listen(1337, "127.0.0.1"); [07:06] SrPx: this will create a http server that resposts with hello world, right? how can I get the ip of the client inside that callback function? [07:06] vIkSiT: PastorBones, what would you reocmmend as a good way to track connected clients using nowjs? [07:07] PastorBones: nowjs assigns a clientId whenever someone connects, but for the chat I found that wasn't that great as someone could join the chat multiple times [07:07] PastorBones: new clientId with each connection [07:07] PastorBones: so now I generate a unique ID string when they join and pass that through as a way of identifying them [07:07] Flushot has joined the channel [07:07] PastorBones: but you need the clientId also in order to identify them to nowJs [07:07] vIkSiT: PastorBones, examples of that clientID generation btw? [07:07] vIkSiT: is that the user object? [07:08] vIkSiT: ah this.user [07:08] louissmit has joined the channel [07:08] PastorBones: this is what I use: var sha1 = crypto.createHash('sha1'); sha1.update(req.sessionID); var sessId = sha1.digest('hex'); [07:09] rgl has joined the channel [07:09] PastorBones: just base it off of the req.sessionID, but prolly not good practice and I'll prolly introduce a salt of some kind [07:10] PastorBones: oh yeah, clientId is everyone.now(function(){ this.user.clientId }) [07:10] neoesque has joined the channel [07:10] Hanspolo has joined the channel [07:10] PastorBones: and to get an instance of their connection (Send only to them) it's nowjs.getClient(clientId, function(){}) [07:11] PastorBones: then you could do this.now.functionName() to call a function on their client within the scope of that ^ [07:14] Locke23rus has joined the channel [07:14] jocafa1 has joined the channel [07:15] p1d has joined the channel [07:15] tdegrunt has joined the channel [07:16] tilgovi has joined the channel [07:16] tilgovi has joined the channel [07:17] disappea_ has joined the channel [07:17] snearch has joined the channel [07:17] Margle has joined the channel [07:18] jamescarr: doh... I have an app that is blocking somewhere [07:18] jamescarr: is there a tool to find out where the app is being blocked at? [07:19] jamescarr: or do I have to litter code with console.log till I find it? :) [07:19] tuhoojabotti: node-inspectir [07:19] tuhoojabotti: or* [07:19] tuhoojabotti: i think it has experimental profiler [07:19] JKarsrud has joined the channel [07:20] kickingvegas has joined the channel [07:21] mike5w3c has joined the channel [07:22] gut4 has joined the channel [07:23] jamescarr: ejs.compile is blocking [07:23] jamescarr: huh [07:24] SrPx: guys. nobody? [07:24] tkro has joined the channel [07:24] SrPx: how do I get the client's ip on a http request? [07:24] tuhoojabotti: req.headers.host? [07:24] SrPx: let me see [07:25] tuhoojabotti: SrPx: Protip: dump req and unveil ALL THE MYSTERIES [07:25] SrPx: dump req what? lol [07:25] jamescarr: console.log(req); he means [07:25] tuhoojabotti: .dir [07:25] tuhoojabotti: well [07:26] jamescarr: I do it often to rummage around and find what I want [07:26] tuhoojabotti: and node script.js > file [07:26] tuhoojabotti: and read it [07:26] tuhoojabotti: profit [07:26] tuhoojabotti: no ??? [07:26] SrPx: oh [07:26] SrPx: ssweeet [07:27] SrPx has joined the channel [07:27] maletor has joined the channel [07:28] PastorBones: lol, he has been enlightened with var dumping [07:28] PastorBones: what's the diff between dir and log? I always use .log [07:29] tuhoojabotti: PastorBones: Dir uses util.inspect on the object [07:29] tuhoojabotti: log uses toString [07:29] PastorBones: is that why deep nests always just show {Object} [07:29] tuhoojabotti: I think yes [07:29] aroman has left the channel [07:29] PastorBones: oh cool, I'm using .dir from now on [07:30] rgl_ has joined the channel [07:30] tilgovi has joined the channel [07:30] tilgovi has joined the channel [07:32] jsurfer has joined the channel [07:32] ady_ has joined the channel [07:32] kishoreyekkanti_ has joined the channel [07:32] ady_: hi guys .. trying to get a connection going to posgtres but failing with an EINVAL exception can anyone help? [07:33] ady_: Error: connect EINVAL at errnoException (net.js:614:11) is what the error says [07:33] tilgovi has joined the channel [07:33] tilgovi has joined the channel [07:34] ericmuyser has joined the channel [07:37] PastorBones: ady_ what version of node are you runnin? [07:37] buttface has joined the channel [07:38] context: ad7six: pastie code with error [07:38] disappea_: I constantly find myself littering this all over my code: _.chain(this.users).values().each(function(user) { user.notifyState('END'); }); [07:39] mmyjona_AaJYb has joined the channel [07:40] jamescarr_ has joined the channel [07:41] jetienne_ has joined the channel [07:43] npa has joined the channel [07:45] Fuu has joined the channel [07:48] dob_ has joined the channel [07:48] groom has joined the channel [07:51] SrPx: my apache server is running normally on port 80. my node.js server is running on port 8080 and I can make http requests from firefox on localhost. no port is blocked but nobody can access it. any idea? [07:52] SrPx: 20 mins on this going nuts [07:53] Neil has joined the channel [07:53] luoluoluo has joined the channel [07:53] hipsters_ has joined the channel [07:54] Morkel has joined the channel [07:55] triptec has joined the channel [07:56] Provito has joined the channel [07:57] `3rdEden has joined the channel [07:57] PastorBones: nobody can acces your nodeJS? [07:57] SrPx: oh god, help ! even this: io = require('socket.io').listen(8080); is making http://www.canyouseeme.org/ confirm that port 8080 is open and responding, but opening a http server doesnt! [07:58] PastorBones: what port is NodeJS running on? [07:58] disappea_: Anyone know why I am getting this error? https://gist.github.com/913c3aad1818e57cf17d [07:59] disappea_: and line 14 's this is referring to engine [07:59] PastorBones: context he posted what you were asking for ^^ [07:59] garann has joined the channel [08:00] panterax_ has joined the channel [08:00] kulor-uk has joined the channel [08:00] geofridh has joined the channel [08:02] fangel has joined the channel [08:03] nail_: disappea_: should be arguments, not this.arguments [08:03] disappea_: yeah I just caught it thanks [08:03] ryan_stevens has joined the channel [08:03] BillyBreen has joined the channel [08:04] HardPhuck has joined the channel [08:07] tdegrunt has joined the channel [08:07] ablomen has joined the channel [08:08] JesusRosso has joined the channel [08:08] mytrile has joined the channel [08:09] arcanis has joined the channel [08:09] geofridh has joined the channel [08:10] slaskis has joined the channel [08:12] azeroth__ has joined the channel [08:12] TimTim has joined the channel [08:13] gde33 has joined the channel [08:14] andorraclaim_ has joined the channel [08:14] jbpros has joined the channel [08:17] disappea_: Is there a way to unwrap an array like [1, 'a', 'c'] to a function (a, b, c) so that a=1, b='a', c='c'? [08:19] dinarcon has joined the channel [08:19] slaskis: disappea_: like fn. apply(null,arr) ? [08:21] sechrist has joined the channel [08:22] zomg: Sounds exactly what he's asking =) [08:24] herbySk has joined the channel [08:24] disappea_: Do you think I am overkilling something here http://paste.pocoo.org/show/533242/ [08:25] [AD]Turbo has joined the channel [08:25] maxogden: are you a ruby programmer [08:25] [AD]Turbo: hi there [08:25] disappea_: well is it because of to_a [08:25] disappea_: it's not a big dela [08:25] disappea_: I can't believe nodejs DOESN"T have something like this [08:27] zomg: disappea_: does that call a function on all members of an array or something? [08:27] disappea_: yeah [08:27] disappea_: yeah i am just applying a function to a list of members [08:28] zomg: So uh, why not just use arr.map or .forEach or whatever? [08:28] disappea_: Oh wait isnt' that just like each? [08:28] maxogden: zomg: <3 underscore [08:28] zomg: each? [08:28] zomg: as in jquery each? [08:28] zomg: or? [08:29] zomg: maxogden: standard js has those too ;) [08:29] disappea_: each also is an alias [08:29] disappea_: for forEach fyi in underscore [08:29] zomg: Ah [08:29] salva has joined the channel [08:29] zomg: Yeah probably the same as forEach then [08:29] SubStack: tacking members onto the Object prototype without also making them unenumerable is a really bad idea [08:29] SubStack: I mean it's also a bad idea anyways [08:29] stagas has joined the channel [08:29] zomg: It is a bit verbose though I guess if you just want to call a member of each item [08:29] maxogden: double bad! [08:29] SubStack: but it's an even more bad idea that way [08:30] SubStack: INDEED DOUBLE PLUS BAD [08:30] disappea_: zomg: well yeah so the reason I wrote that is because I cannot get everyone easily. [08:30] slaskis: bad^1000 [08:30] disappea_: everyone is basically _.chain(this.users).values().each(.. [08:30] maxogden: node point javascript rule 31: dont extend native prototypes [08:30] disappea_: I took it out already [08:30] SubStack: check this: [08:30] zomg: I don't see why extending native props is such a bad idea, unless you're writing a library [08:30] zomg: I mean if it's your code, whatever [08:30] SubStack: .. Object.prototype.what = 5; var res = []; for (var key in { a : 5 }) res.push(key); res [08:30] zomg: =) [08:30] catb0t: [ "a", "what" ] [08:31] SubStack: that's why it's a bad idea [08:31] disappea_: I took that out already [08:31] maxogden: i can just do meth [08:31] SubStack: I mean, that's one reason why it's a bad idea [08:31] saesh has joined the channel [08:31] maxogden: its my body, whatever [08:31] zomg: maxogden: exactly [08:31] maxogden: node point javascript: doesnt do meth [08:31] zomg: If you implement it correctly so it doesn't break things like what SubStack mentioned above I don't really see the issue [08:31] zomg: but if you do that in a library [08:31] slaskis: oh, that's how you bot script now a days? [08:31] zomg: you should be hanged [08:31] zomg: =) [08:32] saikat has joined the channel [08:32] slaskis: maxogden: which rule is that? [08:32] hipsters_ has joined the channel [08:32] SubStack: global side effects are bad [08:32] MrTopf has joined the channel [08:32] maxogden: slaskis: thats a praxis [08:32] icewhite has joined the channel [08:33] mikeal has joined the channel [08:33] maxogden: ryan delivered the 83 node praxi on the server on the mount [08:33] salva has left the channel [08:33] slaskis: fantastic [08:34] maxogden: zomg: if you create artificial barriers between 'writing libraries' and writing 'other code' then you will probably write less libraries. how many node modules have you published? [08:34] torvalamo: 2! [08:34] torvalamo: a year ago... no updates [08:34] torvalamo: :p [08:34] yawNO has joined the channel [08:34] maxogden: #winning [08:34] SubStack: I've written several of those. [08:34] zomg: maxogden: assuming I had written something that was useful to someone else besides the immediate needs of my application, I might have =) [08:35] SubStack: EVERYTHING is useful to somebody [08:35] SubStack: you just might not know who they are yet [08:35] torvalamo: well i've seen a lot of awful crap published in my life [08:35] SubStack: I'm surprised by the crazy crap people do with my modules [08:35] zomg: Let me rephrase: If I wanted to publish the code I wrote I would have :p [08:36] SubStack: for example, curl -sSN surrender-cube.nodejitsu.com [08:37] maxogden: mostly i ask for peoples github accounts so i can judge their code quality but when you never publish anything it makes it hard to determine whether or not you are full of yams [08:38] zomg: www.github.com/jhartikainen <- Some of my boring non-nodejs code is there =) [08:38] kishoreyekkanti has joined the channel [08:38] zomg: More or less experimental things so I dunno about the quality :P [08:38] chilts: I must admit, writing my current application, I'm amazed at how many other modules I can publish [08:39] chilts: amazed in a good way, not a shocked way [08:39] zomg: I could publish maybe one [08:39] zomg: The rest is completely specific to my application [08:39] chilts: which also means it's all decoupled from what I'm writing too, so that's a winner :) [08:39] chilts: I think that's the biggest bonus to publishing modules [08:39] zomg: Unless I was to publish the entire application, the rest is pretty worthless [08:39] chilts: I fail to believe that :) [08:40] djcoin has joined the channel [08:40] zomg: Would you like an acl module which only works in the specific context of my application? [08:40] whitman has joined the channel [08:40] zomg: or perhaps express middleware which also only works in the specific circumstances? =) [08:40] snearch has joined the channel [08:40] johnhamelink has joined the channel [08:41] lperrin has joined the channel [08:41] zomg: The main useful thing I could publish is a protocol handler for the Battlefield 3 remote admin protocol, and a higher level abstraction on top of that [08:41] zomg: I suppose someone might find that useful [08:41] michaelhartau has joined the channel [08:42] zomg: The rest of the application mainly works around that to provide a user interface [08:44] RobWC has joined the channel [08:44] snearch has joined the channel [08:46] snearch has joined the channel [08:46] stonebranch has joined the channel [08:47] luoluoluo has left the channel [08:47] cognominal has joined the channel [08:47] skm has joined the channel [08:47] snearch has joined the channel [08:49] bnoordhuis has joined the channel [08:50] snearch has joined the channel [08:51] pors has joined the channel [08:55] anubhaw has joined the channel [08:55] Druide_ has joined the channel [08:55] HardPhuck: I'm developing a registration form for a website, what is the recommended way to store passwords (I'm using mongodb) [08:55] mattgifford has joined the channel [08:56] snearch has joined the channel [08:56] yawNO has joined the channel [08:57] tek: damn couchdb is taking forever to compile from source :/ think ill be giving that VM access to more resources after this :/ [08:57] torvalamo: compiling it on a wristwatch? [08:57] torvalamo: :P [08:57] alex__ has joined the channel [08:58] tek: nah, a KVM VM but it only has access to 1 2Ghz core and 1Gb ram... another 3 cores available and 7Gb ram... might as well feed it more [08:58] stagas: HardPhuck: take a look at the crypto core module [08:58] olivier2 has joined the channel [08:58] HardPhuck: I have, are there any examples out there? [08:58] snearch has joined the channel [08:59] chilts: pquerna: got my Cloud Identity service done (only two operations) ... will be moving on to one of the other services tomorrow :) [08:59] chilts: sorry, I shouldn't bug you with status updates [09:00] stagas: HardPhuck: dunno, password_to_store = crypto.createHmac('sha1', 'some secret key').update(incoming_password).digest('hex') should do it [09:00] HardPhuck: thanx! [09:00] zomg: HardPhuck: use bcrypt [09:01] zomg: bcrypt is so slow it takes forever to bruceforce the hash while you can bruteforce sha1 pretty quickly, even if you have salt [09:01] CIA-101: node: 03Andreas Madsen 07master * rc8108aa 10/ (lib/cluster.js test/simple/test-child-process-internal.js): child_process: fix typo in internal message event name - http://git.io/ZoBhZQ [09:01] aliem has joined the channel [09:01] zomg: Thus you want bcrypt. There is a better explanation of it on the internets if you're curious =) [09:01] vvo has joined the channel [09:02] Bonuspunkt has joined the channel [09:03] ccare has joined the channel [09:04] HardPhuck: yeah I found some stuff on bcrypt [09:04] jimt_ has joined the channel [09:05] brianloveswords_ has joined the channel [09:05] jldbasa has joined the channel [09:05] ziro`_ has joined the channel [09:05] vIkSiT has joined the channel [09:05] vIkSiT has joined the channel [09:05] cesconix has joined the channel [09:06] brianloveswords has joined the channel [09:07] hipsters_ has joined the channel [09:07] netmercury has joined the channel [09:08] cesconix has joined the channel [09:09] tmske: I have some string data like this: "a:0,1,2,3|b:4,5,6,c:0,2", can someone point me in the direction to convert this to an object {a:[0,1,2], b:[4,5,6], c:[0,2]}. I'm trying this now with underscore.map but this returns an array instead of an object [09:09] sproates has joined the channel [09:10] lowerkey has joined the channel [09:10] braoru has joined the channel [09:10] torvalamo: the , before the c is it supposed to be |? [09:11] zomg: tmske: no way to change the data source so it produces some sensible format? :P [09:11] passionke has joined the channel [09:11] chilts: tmske: you'll need a _.forEach() in there too [09:11] tmske: zomg: no I'm afraid not :-) [09:12] aaronmcadam has joined the channel [09:12] hackband has joined the channel [09:13] lowerkey: Greetings. In the following code ( http://pastebin.com/FxmcJ5t0 http://pastebin.com/h658nw1z ) the values of the database, of which the server code tells me there is one, isn't rendered [09:13] torvalamo: var obj, str = "a:0,1,2,3|b:4,5,6|c:0,2"; str.split('|').forEach(function(e) {var a = e.split(':'); obj[a[0]] = a[1].split(',')}) [09:13] torvalamo: tmske [09:13] torvalamo: .. var obj, str = "a:0,1,2,3|b:4,5,6|c:0,2"; str.split('|').forEach(function(e) {var a = e.split(':'); obj[a[0]] = a[1].split(',')}); obj [09:13] catb0t: Exception: TypeError: Cannot set property 'a' of undefined [09:13] torvalamo: oh [09:14] lowerkey: The example is using express and the embedded js templating engine [09:14] Fabryz has joined the channel [09:14] chilts: tmske: https://gist.github.com/1593849 [09:14] chilts: I think it's similar to torvalamo's one (but he beat me) :) [09:15] IamNothing has joined the channel [09:15] torvalamo: that's exactly what i wrote [09:15] torvalamo: save for some variable names [09:15] torvalamo: :P [09:15] torvalamo: but i got an error [09:15] torvalamo: dunno why [09:15] chilts: yeah ... sorry, did it independently then pasted, then saw yours :) [09:16] tmske: torvalamo, chilts: thanks [09:16] chilts: still, good to try these things out as a quick test of mental agility :) [09:16] CIA-101: libuv: 03Daisuke Murase 07master * re8494dd 10/ src/unix/core.c : [09:16] CIA-101: libuv: unix: use EVRUN_ONCE in uv_run_once() [09:16] CIA-101: libuv: EVRUN_NOWAIT means "poll and don't block". Use EVRUN_ONCE instead, "wait for [09:16] CIA-101: libuv: single event". - http://git.io/pJczAg [09:16] torvalamo: do you see the error? [09:16] torvalamo: cuz i don't [09:16] torvalamo: :/ [09:16] chilts: tmske: from where are you getting data like that? [09:17] chilts: torvalamo: yeah, I can't see it yet [09:17] stagas: torvalamo: var obj = {} [09:17] tmske: arcgis tracing module [09:17] torvalamo: .. var obj = {}, str = "a:0,1,2,3|b:4,5,6|c:0,2"; str.split('|').forEach(function(e) {var a = e.split(':'); obj[a[0]] = a[1].split(',')}); obj [09:17] catb0t: { a:[ "0", "1", "2", "3" ], b:[ "4", "5", "6" ], c:[ "0", "2" ] } [09:17] torvalamo: ah [09:17] wedtm has joined the channel [09:17] chilts: torvalamo: you want obj = {} [09:17] chilts: yeah, that :) [09:17] lowerkey: Could someone take a look at ( http://pastebin.com/FxmcJ5t0 http://pastebin.com/h658nw1z ) and tell me why the views aren't rendering the values from the db? [09:17] chilts: heh, I'm slow tonight [09:17] torvalamo: .. var obj = {}, str = "a:0,1,2,3|b:4,5,6|c:0,2"; str.split('|').forEach(function(e) {var a = e.split(':'); obj[a[0]] = a[1].split(',').map(parseInt)}); obj [09:17] catb0t: { a:[ 0, NaN, NaN, NaN ], b:[ 4, NaN, NaN ], c:[ 0, NaN ] } [09:17] torvalamo: hm [09:18] torvalamo: .. var obj = {}, str = "a:0,1,2,3|b:4,5,6|c:0,2"; str.split('|').forEach(function(e) {var a = e.split(':'); obj[a[0]] = a[1].split(',').map(String.parseInt)}); obj [09:18] catb0t: Exception: TypeError: undefined is not a function [09:18] tmske: chilts, most of the result is standard JSON I'm getting back from ArcGIS, but this tracing result returns something like this... [09:19] torvalamo: .. var obj = {}, str = "a:0,1,2,3|b:4,5,6|c:0,2"; str.split('|').forEach(function(e) {var a = e.split(':'); obj[a[0]] = a[1].split(',').map(function(b) {return parseInt(b)})}); obj [09:19] catb0t: { a:[ 0, 1, 2, 3 ], b:[ 4, 5, 6 ], c:[ 0, 2 ] } [09:19] chilts: oh right, weird :) [09:19] torvalamo: there you are [09:19] torvalamo: numbers [09:19] thomaschaaf has joined the channel [09:19] torvalamo: dunno why map wouldn't take parseInt though... [09:19] tmske: I'm new to javascript, node.js and I'm still getting the hang of callbacks and control flow. I first tried something with forEach but it returned undefined... [09:19] tmske: torvalamo: thanks :-) [09:20] johnhamelink has left the channel [09:20] yawNO has joined the channel [09:21] torvalamo: to get a hang of callbacks and control flow you need to distinguish between throwing and returning [09:21] mattgifford has joined the channel [09:21] torvalamo: it threw undefined [09:21] torvalamo: as in error [09:21] torvalamo: return is what it does if it's good [09:21] torvalamo: ;) [09:22] TomY has joined the channel [09:24] ppcano has joined the channel [09:24] agnat_ has joined the channel [09:25] stagas: lowerkey: you need <%= or <%- to write stuff [09:25] thomaschaaf: I am trying to use require to access socket.io from all files. How do I get this code to do what I want? http://pastie.org/3165113 [09:25] rio{ has joined the channel [09:25] LeMike has joined the channel [09:25] thomaschaaf: also this much simpler version: http://pastie.org/3165123 does not work [09:26] lowerkey: stagas: thanks [09:26] torvalamo: the first line uses socketio before it's imported? [09:26] andrewfff has joined the channel [09:27] slaskis: torvalamo: i think the reason map(parseInt) doesn't work is because it will get more than one argument, so it'll try to parse it as octal of hex or depending on the array [09:27] thomaschaaf: torvalamo: all commands in app.js work. but in /routes/index.js they stop working [09:27] lzskiss has joined the channel [09:28] torvalamo: slaskis, but it parsed 0 and 4 just fine, but not 1,2,3 [09:28] torvalamo: 4 with radix 5, but not 1 with radix 2 [09:28] torvalamo: so that doesn't make sense [09:28] booyaa has joined the channel [09:28] torvalamo: oh wait [09:28] slaskis: it would use the index in the array as radix i think [09:29] stagas: thomaschaaf: you're not returning io in the io.js function [09:29] torvalamo: yeah [09:29] torvalamo: you're right [09:29] slaskis: so it'll give interesting results [09:29] kickingvegas has left the channel [09:29] prssn has joined the channel [09:29] torvalamo: i was thinking in python there for a sec [09:29] garrensmith has joined the channel [09:29] koo4 has joined the channel [09:29] torvalamo: there's some function.. can't remember its name.. array stuff.. takes two subsequent values [09:30] davetayls has joined the channel [09:30] torvalamo: reduce [09:30] torvalamo: is the one [09:30] torvalamo: used that a lot in python [09:30] slaskis: ah yeah, used it in ruby a lot (called inject) [09:32] thomaschaaf: torvalamo: I do have socketio required before it I changed it so that it represents it better: http://pastie.org/3165113 [09:32] jimt has joined the channel [09:32] booyaa: woot [09:32] booyaa: need to go through my logs to find out who helped me get my github repo page working as a subdom [09:33] torvalamo: thomaschaaf, in routes you don't give an argument to the require [09:34] torvalamo: hm [09:34] torvalamo: i see [09:34] stagas: thomaschaaf: routes are processed first and ._io is undefined at that time. then you replace it with the io object but it's another reference [09:34] torvalamo: that's some overly complicated code you have there [09:34] booyaa: deedubs++ # thanks for the CNAME hint! :D [09:35] thomaschaaf: stagas: how could I get the io variable to the route then? (I started with node 3 days ago so everything is new :( ) [09:35] booyaa: now if i can just work out why the forkme css won't appear above the bootstrap header i'll be happy [09:36] torvalamo: thomaschaaf, http://pastie.org/3165166 [09:36] torvalamo: unless i missed something [09:36] stagas: thomaschaaf: do var routes = require('./routes') in ln 10 app.js should work [09:36] torvalamo: which i probably did [09:36] tytsim has joined the channel [09:36] stagas: thomaschaaf: and remove it from ln 4 [09:37] eldios has joined the channel [09:37] torvalamo: yeah ignore my paste [09:37] vguerra has joined the channel [09:37] lzskiss has joined the channel [09:38] Vennril has joined the channel [09:38] gavin_hu_ has joined the channel [09:39] hackband has joined the channel [09:40] hemanth has joined the channel [09:40] iaincarsberg has joined the channel [09:41] hemanth: Made a simple hack one liner to install nodejs, bash < <(http://h3manth.com/node) how dumb? [09:42] booyaa: hemanth: nice, if there's a suitable page on the nodejs wiki add it [09:42] jldbasa has joined the channel [09:43] Margle has joined the channel [09:43] booyaa: is the npm install necessary? thought it came with latest version of node? [09:43] hemanth: booyaa, thanks :) will check [09:43] level09 has joined the channel [09:43] torvalamo: should probably edit it so its origin is nodejs.org and not a third party though [09:43] torvalamo: trust and that [09:43] CIA-101: node: 03Maciej Małecki 07v0.6 * rb073989 10/ Makefile : [09:43] CIA-101: node: makefile: ignore `lib/punycode.js` while linting [09:43] CIA-101: node: `punycode` is a third party code which generates a lot of lint errors. [09:43] CIA-101: node: Upstream was contacted in order to fix it in bestiejs/punycode.js#6, but [09:43] CIA-101: node: request was denied. [09:43] CIA-101: node: Therefore, it's reasonable to exclude this file from linting process. [09:43] CIA-101: node: Ref #2456. - http://git.io/88Rr7Q [09:43] CIA-101: node: 03Mathias Bynens 07master * r8abb73e 10/ lib/punycode.js : punycode: Update to v0.3.0 - http://git.io/6PhnLQ [09:43] letsgojuno has joined the channel [09:43] booyaa: <-- has brew i never pay attention to the build proces nowadays. i know npm comes with nodejs win msi [09:44] hemanth: npm is necessary AFAIK [09:44] mike5w3c has joined the channel [09:44] SubStack: correct [09:45] booyaa: hemanth/substack - so npm doesn't come as part of new unix node tar ball? [09:45] booyaa: that's consistent then [09:45] SubStack: npm is pretty much the best package manager ever [09:45] booyaa: given it does for msi and dmg [09:45] SubStack: out of all the ones I'm familiar with [09:45] thomaschaaf: stagas: torvalamo: http://pastie.org/3165113 this is what I did now but I still can't seem to access that stuff :( [09:45] hemanth: SubStack, meow! :) [09:45] dshaw_ has joined the channel [09:45] SubStack: =^_^= [09:46] thomaschaaf: still no "asd" but an undefined in the console log [09:46] Wizek has joined the channel [09:47] torvalamo: do a console.log('here') in the first line of io.js function [09:47] torvalamo: before the if [09:48] torvalamo: if you get two then that function is the problem [09:49] thomaschaaf: torvalamo: seems to never get called [09:49] torvalamo: module.exports should be module [09:49] torvalamo: i think [09:49] torvalamo: or is that me confusing things again [09:49] yawNO has joined the channel [09:51] torvalamo: yeah that would be me [09:51] tkro has joined the channel [09:52] tcurdt has joined the channel [09:52] stagas: thomaschaaf: put it in a global and be done with it :P [09:52] thomaschaaf: stagas: :( let me google that [09:53] torvalamo: process.io = socketio... [09:53] torvalamo: :P [09:53] hellp has joined the channel [09:53] thomaschaaf: process.* is available everywhere? [09:53] torvalamo: yeh [09:54] tuhoojabotti: globals ftw [09:54] torvalamo: but expect it to break in the future [09:54] booyaa: WOOHOO! we finally have msdn :) [09:54] tuhoojabotti: booyaa: ? [09:54] `3rdEden: global.io - socket.io [09:54] booyaa: <-- at work [09:54] tuhoojabotti: ye [09:54] `3rdEden: = * [09:55] torvalamo: global is not editable by the user [09:55] larsschenk has joined the channel [09:55] torvalamo: you can assign to it, but it's gone when you want to use it [09:55] larsschenk1 has joined the channel [09:55] cognominal has joined the channel [09:56] torvalamo: like magic [09:56] larsschenk1 has left the channel [09:56] SubStack: eww globals [09:56] SubStack: I hope that goes away soon [09:56] thomaschaaf: SubStack: what would be the correct way to solve my problem then? [09:56] torvalamo: inject io directly into routes [09:57] torvalamo: routes.setIO(io) [09:57] torvalamo: or sumgen [09:57] torvalamo: sumfen* [09:57] SubStack: use the module system like normal? [09:58] thomaschaaf: SubStack: that I think is what I tried: http://pastie.org/3165113 [10:00] thomaschaaf: torvalamo: I can not find "sumfen" on google [10:00] torvalamo: because it's old school for 'something' [10:00] torvalamo: i'm from the 80s [10:00] anubhaw has joined the channel [10:00] torvalamo: forgive me [10:01] jldbasa has joined the channel [10:01] thomaschaaf: :D woops thought it was a package name [10:01] torvalamo: lol [10:02] stagas: thomaschaaf: io.js => exports.init = function (app) { exports.io = require('socket.io').listen(app) } [10:02] thomaschaaf: with routes.setIO(io) how do I access it in the routes file? [10:03] torvalamo: in routes you have a var _io; and a function setIO = function(io) {_io = io and whatever you had in that other thing [10:03] stagas: thomaschaaf: app.js => require('./io').init(app); var io = require('./io').io [10:03] kishoreyekkanti_ has joined the channel [10:03] Cromulent has joined the channel [10:03] kishoreyekkanti has joined the channel [10:04] stagas: thomaschaaf: then you do var io = require('./io').io where you want it [10:04] thomaschaaf: stagas: [10:04] thomaschaaf: stagas: awesome [10:05] torvalamo: that's not really "using the module system like normal" [10:05] torvalamo: oh it wasn't you who said it [10:05] akter has joined the channel [10:06] torvalamo: encapsulation and dependency injection! [10:06] torvalamo: now those are two things you CAN google [10:06] torvalamo: :p [10:07] IamNothing has joined the channel [10:07] thomaschaaf: torvalamo: how else should I learn :( [10:08] torvalamo: google is your best friend in learning [10:08] amasad has joined the channel [10:08] markwubben has joined the channel [10:10] booyaa: stackoverflow.com is cool too [10:11] torvalamo: you'll usually get google hits from there [10:11] torvalamo: and my answers on globals [10:11] bogomips has joined the channel [10:11] torvalamo: unless there are tons [10:12] booyaa: stupid question time [10:12] IamNothing has joined the channel [10:12] matjas has left the channel [10:12] anubhaw has joined the channel [10:12] booyaa: when you do this in repl, require('modulex') [10:13] booyaa: repl knows how to reference it, is there a global that tracks that or is some kinda callback going on? [10:13] anubhaw has joined the channel [10:13] booyaa: i know you can reference the module if yuo var module = require('modulex') but just curious how repl is able to dump the contents of the require call [10:14] stagas: booyaa: repl dumps the return value, in require's case it's module.exports [10:15] maritz has joined the channel [10:16] kazupon has joined the channel [10:19] yawNO has joined the channel [10:19] cosmincx has joined the channel [10:19] level09 has joined the channel [10:21] ph^ has joined the channel [10:22] booyaa: stagas: but it's a single use eh? so once you've dumped it you can't reference it [10:22] booo has joined the channel [10:22] rio{: If I do var foo = require('foo'), bar = require('bar'); [10:23] rio{: is there some way that I can reference foo inside bar without passing it [10:23] stagas: booyaa: yeah [10:23] zomg: rio{: put the require inside bar? [10:24] jimmysparkle has joined the channel [10:25] rio{: zomg: Ye but, theres an instance of foo that I would like to access [10:25] torvalamo: booyaa, there are internals in require() that keeps track of any loaded modules [10:25] booyaa: torvalamo: is it possible to reference them in repl? [10:25] booyaa: ref === acess [10:25] rio{: to be more specific foo connects with tcp, and I would like to use that connection in bar [10:25] torvalamo: require('stuff'); var stuff = require('stuff'); [10:26] torvalamo: the first one will initialize stuff [10:26] booyaa: damn so heroku doesn't automatically guard your app like nodejitsu? [10:26] torvalamo: the second one won't do anything other than give you the reference to the module [10:26] booyaa: ACTION just seen a post about needing to run forever on heroku [10:26] nicholasf has joined the channel [10:27] thepatr1ck has joined the channel [10:27] svnlto has joined the channel [10:29] tvw has joined the channel [10:29] rio{: torvalamo was that an answer to me? [10:30] torvalamo: no to booyaa [10:31] torvalamo: but yeah also to you actually [10:31] dannyamey has joined the channel [10:32] torvalamo: unless you don't know the name of foo [10:32] rio{: I do :) [10:32] torvalamo: if you do require('foo'), it will just reference the first (and only) instance of it [10:32] torvalamo: modules are singletons [10:32] swestcott has joined the channel [10:32] torvalamo: so to speak [10:33] otakutomo has joined the channel [10:33] torvalamo: it's not like php, where you include a file multiple times [10:33] rio{: cool, I havn't read up enough on node before starting to hack away on it [10:36] zomg: I think it was recommended than loading a module should not have side effects like opening sockets or such though [10:36] zomg: *that [10:36] zomg: And I do agree with that [10:36] hz has joined the channel [10:36] zomg: Personally I would recommend passing the stuff you need around as params, but if you're just doing something simple it's probably more straightforward to do whatever :) [10:37] torvalamo: a module can open sockets as long as that's its purpose [10:37] fangel has joined the channel [10:38] torvalamo: do you mean just loading it? [10:38] zomg: Yeah [10:38] augustl: require having the side effect of opening a socket sounds nasty :) [10:38] torvalamo: then i agree [10:38] zomg: require('foo') should not have any side effects but sure you can put a function in the foo module to open a socket or whatever you want [10:38] herbySk has joined the channel [10:38] torvalamo: yeah i misunderstood [10:39] torvalamo: it's 11.40 am [10:39] torvalamo: getting late [10:39] torvalamo: so to speak [10:39] zomg: Late? :P [10:39] torvalamo: i haven't slept today [10:39] zomg: Ah =) [10:39] torvalamo: let me put it that way [10:39] torvalamo: :P [10:40] augustl: rio{: http://pastie.org/3165395 [10:41] augustl: err, those last two lines should be myFoo, fixed [10:41] cognominal_ has joined the channel [10:43] bicranial_ has joined the channel [10:44] rio{: augustl: Yea thats what I had, I would also like to have access to myFoo.connection in bar.js [10:45] michaelhartau has joined the channel [10:46] fermion has joined the channel [10:46] panterax__ has joined the channel [10:48] augustl: rio{: what do you mean with "in bar.js"? [10:50] otakutomo has joined the channel [10:50] npa has joined the channel [10:50] mmyjona has joined the channel [10:51] Topcat has joined the channel [10:51] nicholasf has joined the channel [10:52] __doc__ has joined the channel [10:52] vnguyen has joined the channel [10:53] Margle has joined the channel [10:54] MrBenn has joined the channel [10:55] claudioc has joined the channel [10:56] otakutomo has joined the channel [10:56] fly-away has joined the channel [10:57] rendar has joined the channel [10:58] lwille has joined the channel [10:59] otakutomo has joined the channel [11:01] r04r has joined the channel [11:01] otakutomo has joined the channel [11:06] r04r has joined the channel [11:06] r04r has joined the channel [11:07] otakutomo has joined the channel [11:07] otakutomo has joined the channel [11:09] otakutom_ has joined the channel [11:11] xetorthio has joined the channel [11:11] r04r has joined the channel [11:12] mape_ has joined the channel [11:13] otakutomo has joined the channel [11:13] caludio has joined the channel [11:14] fangel has joined the channel [11:14] logicalparadox has joined the channel [11:14] logicalparadox has left the channel [11:15] Roon has joined the channel [11:16] niloy has joined the channel [11:17] otakutomo has joined the channel [11:17] r04r has joined the channel [11:19] mbrevda_ has joined the channel [11:20] dharmesh has joined the channel [11:20] otakutomo has joined the channel [11:21] mbrevda_: Got a general question about node: in other runtime languages (say php), most object live only as long as the session, and 1 session = one http request. Being that node is also a server, dose that change object persistency in this regard? [11:22] r04r has joined the channel [11:22] r04r has joined the channel [11:22] yatesy has left the channel [11:23] joshfinnie has joined the channel [11:24] otakutomo has joined the channel [11:25] augustl: mbrevda_: yep [11:26] augustl: mbrevda_: a node server = one process, unless you write code that spawns subprocesses [11:26] augustl: with php don't you typically configure apache to shell out to fcgi for every request? [11:26] mbrevda_: cool. Then I take that, by extension, the objects are shared amongst sessions? [11:27] mbrevda_: augustl: iirc, that more or less how apache dose it. [11:27] mbrevda_: *thats [11:27] r04r has joined the channel [11:28] mbrevda_: btw, I'm using the term sessions loosely here, to mean 1 http request [11:29] rio{: augustl: I meant in yet another module/file [11:32] otakutomo has joined the channel [11:32] level09 has joined the channel [11:32] otakutomo has joined the channel [11:32] r04r has joined the channel [11:32] r04r has joined the channel [11:32] jondot_ has joined the channel [11:34] otakutomo has joined the channel [11:35] augustl: rio{: sounds to me like you think of it in the wrong terms [11:36] tomasztomczyk has joined the channel [11:36] augustl: rio{: when you run your code, it doesn't run in files.. It's just functions and objects and values that live in the same process [11:36] augustl: rio{: doesn't matter which file it's in, really [11:36] augustl: mbrevda_: there aren't "sessions" in node [11:36] swestcott has joined the channel [11:36] r04r has joined the channel [11:36] augustl: mbrevda_: there's just events that gets fired, and it all happens in the same process [11:36] mbrevda_: right, I realize that [11:37] mbrevda_: cool, thanks [11:37] augustl: there are obviously dangers associated with sharing the same object across requests but you probably know that ;) [11:37] niloy has joined the channel [11:37] augustl: as in, stuff you didn't predict might end up happening, corrupting your shared state [11:38] HardPhuck: ok, I think it's good enough to show it to the public: http://carmivore.com/~Node.js [11:39] HardPhuck: there are some things missing which will be done in a week or so [11:40] HardPhuck: then I'll need some beta testers :) [11:41] r04r has joined the channel [11:41] Cromulent has joined the channel [11:42] brainysmurf has joined the channel [11:46] piscisaureus_ has joined the channel [11:47] Takumination has joined the channel [11:47] r04r has joined the channel [11:47] r04r has joined the channel [11:47] MrBenn has joined the channel [11:47] Margle has joined the channel [11:47] mmyjona has joined the channel [11:47] michaelhartau has joined the channel [11:47] anubhaw has joined the channel [11:47] pors has joined the channel [11:47] icewhite has joined the channel [11:47] tomlion has joined the channel [11:47] richardr has joined the channel [11:47] Nomon__ has joined the channel [11:47] terite has joined the channel [11:47] monteslu_ has joined the channel [11:47] ken-ignite has joined the channel [11:47] dodo_ has joined the channel [11:47] CrypticSwarm has joined the channel [11:47] zilch_ has joined the channel [11:47] voodootikigod|aw has joined the channel [11:47] Sami_ZzZ has joined the channel [11:47] przemoc has joined the channel [11:47] ljackson has joined the channel [11:47] nrltd has joined the channel [11:47] cainus has joined the channel [11:47] txdv has joined the channel [11:47] jgallen23 has joined the channel [11:47] _mdp has joined the channel [11:47] paulbaumgart has joined the channel [11:47] psino has joined the channel [11:47] smgt has joined the channel [11:47] russfrank has joined the channel [11:47] Gregor has joined the channel [11:48] vvo has joined the channel [11:48] __doc__ has joined the channel [11:48] SomeoneWeird has joined the channel [11:49] ger^kallisti has joined the channel [11:49] kazupon has joined the channel [11:50] hz has joined the channel [11:50] otakutomo has joined the channel [11:50] mc_greeny has joined the channel [11:51] otakutomo has joined the channel [11:52] r04r has joined the channel [11:52] secoif has joined the channel [11:53] secoif has joined the channel [11:54] secoif has joined the channel [11:54] otakutomo has joined the channel [11:54] Pierrot has joined the channel [11:54] secoif has joined the channel [11:55] secoif has joined the channel [11:55] secoif has joined the channel [11:56] niloy has joined the channel [11:56] secoif has joined the channel [11:56] mmyjona has joined the channel [11:56] booyaa: carmivore? that's not another blue waffle/goatse site is? [11:57] secoif has joined the channel [11:57] booyaa: my trolldar is going off the scale atm [11:57] secoif has joined the channel [11:57] r04r has joined the channel [11:58] secoif has joined the channel [11:58] satyr has joined the channel [11:58] secoif has joined the channel [11:59] McMAGIC--Copy has joined the channel [11:59] broofa has joined the channel [11:59] raincole_ has joined the channel [11:59] secoif has joined the channel [11:59] secoif has joined the channel [12:00] secoif has joined the channel [12:00] ppcano has joined the channel [12:01] secoif has joined the channel [12:01] HardPhuck: what does blue waffle/goatse mean? :) [12:01] secoif has joined the channel [12:02] secoif has joined the channel [12:02] jbpros has joined the channel [12:02] otakutomo has joined the channel [12:03] r04r has joined the channel [12:03] secoif has joined the channel [12:03] replore has joined the channel [12:03] replore_ has joined the channel [12:03] secoif has joined the channel [12:04] secoif has joined the channel [12:04] otakutomo has joined the channel [12:04] robi42 has joined the channel [12:04] otakutomo has joined the channel [12:04] secoif has joined the channel [12:05] secoif has joined the channel [12:05] Margle: wow, this # is busy now. [12:06] secoif has joined the channel [12:06] booyaa: HardPhuck: don't search for them on google, see if there's a sfw entry in wikipedia [12:06] Margle: well, not busy, just full. [12:06] booyaa: Margle: yeah no actual work taking place ;) [12:06] otakutomo has joined the channel [12:06] secoif has joined the channel [12:07] thax has joined the channel [12:07] secoif has joined the channel [12:07] Margle: anyone know why? [12:07] Margle: like… where are you all coming from? [12:07] Margle: ror, php, django? [12:07] booyaa: ACTION *coughs*c#*coughs* [12:08] secoif has joined the channel [12:08] r04r has joined the channel [12:08] secoif has joined the channel [12:08] plutoniix has joined the channel [12:08] Margle: booyaa: or that. [12:09] Margle: really cool. [12:09] secoif has joined the channel [12:09] stride: qbasic [12:09] secoif has joined the channel [12:10] secoif has joined the channel [12:10] Juan77 has joined the channel [12:11] secoif has joined the channel [12:12] secoif has joined the channel [12:12] amigojapan has joined the channel [12:13] r04r has joined the channel [12:16] cjm has joined the channel [12:16] dstufft has joined the channel [12:16] dstufft: Anyone have any data on statically compiling node.js? [12:17] larsschenk has joined the channel [12:18] Flushot has joined the channel [12:18] r04r has joined the channel [12:19] thalll has joined the channel [12:20] d0k has joined the channel [12:22] SomeoneWeird_ has joined the channel [12:22] cjroebuck has joined the channel [12:23] r04r has joined the channel [12:23] niloy has joined the channel [12:25] bnoordhuis: dstufft: what do you want to do? [12:26] dstufft: bnoordhuis: trying to get node.js onto a system where I can't install libraries ;) I can drop static binaries there though np [12:26] replore has joined the channel [12:26] replore_ has joined the channel [12:26] Hanspolo has joined the channel [12:27] zitchdog has joined the channel [12:28] akujin has joined the channel [12:29] r04r has joined the channel [12:29] bnoordhuis: dstufft: you can hack the wscript and add -static to LINKFLAGS [12:30] dstufft: bnoordhuis: cool i'll try that [12:31] ZeepZop has joined the channel [12:34] piscisaureus_ has joined the channel [12:36] JJMalina has joined the channel [12:37] booo has joined the channel [12:38] dylang has joined the channel [12:38] break57382 has joined the channel [12:39] stagas has joined the channel [12:40] lowerkey has joined the channel [12:40] lowerkey: Greetings, What do i have to do to serve static js and css files from an express webserver? [12:41] hipsters_: lowerkey: http://expressjs.com/guide.html#configuration [12:42] lowerkey: I tried app.use(express.static(__dirname + '/js')); app.use(express.static(__dirname + '/css')); but the browser reports file not found for my jquery file [12:43] lowerkey: does the app.use(express.static(... have to be in an app.configure block? [12:44] kulor-uk has joined the channel [12:44] bogomips has joined the channel [12:44] RLa has joined the channel [12:44] hipsters_: yes lowerkey [12:45] lowerkey: hipsters_: did that, but it's still not working [12:45] hipsters_: then i'm afraid this is out of my level :v [12:45] lowerkey: :( [12:45] k1ttty has joined the channel [12:45] qsobad has joined the channel [12:46] captain_morgan has joined the channel [12:46] davetayls has joined the channel [12:48] HardPhuck: lowerkey: http://pastebin.com/giAN4mrt [12:48] HardPhuck: this is the express config for http://carmivore.com/ [12:49] HardPhuck: it's in coffeescript but you should get the idea [12:50] lowerkey: I'll try and throw a app.router in there and see what happens [12:50] adambeynon has joined the channel [12:50] adrianF has joined the channel [12:51] HardPhuck: public folder then contains folders like images, javascripts and stylesheets [12:52] SomeoneWeird_ has joined the channel [12:52] teadict: neat https://github.com/vesln/moni [12:52] teadict: although the ASCII art is kind of disturbing, dunno why [12:54] mightym has joined the channel [12:55] negrete has joined the channel [12:55] mightym: hey guys, I'm new to node.js and using cradle for couchdb. i wonder if someone give me a hint how i can get the object I'm saving to the db as a callback: db.save(object, function(err, res) {.. <- but there res is only the id and revision [12:59] davetayls has joined the channel [13:00] negrete: In the API documentation says that I can specify the cwd, but I'm wondering if is possible to spawn a new child_process specifying the uid of some other user... or do I have to do that with a bash script? [13:01] arcanis has joined the channel [13:01] mekwall has joined the channel [13:02] appr: process.setgid(..), process.setuid(..) [13:02] negrete: @appr: THANKS!!! [13:03] lowerkey: HardPhuck: http://pastebin.com/PnNyvQ0L [13:03] qsobad has joined the channel [13:03] lowerkey: app.use(app.route didn't solve the problem [13:03] HardPhuck: lowerkey: make a folder called public [13:03] HardPhuck: and put js and css inside [13:03] jscheel has joined the channel [13:03] jscheel has joined the channel [13:03] HardPhuck: then set static just to that public folder [13:04] dephex has joined the channel [13:04] scott_gonzalez has joined the channel [13:05] jasonkuhrt has joined the channel [13:06] _rockbot_ has joined the channel [13:06] lowerkey: the not found disappeared, (I think I had the paths mixed up), but now the get('/', ... content isn't showing anymore [13:08] _rockbot_: Can anyone explain databases? How do I make an informed decision on which one to use for my node project? [13:08] RLa: oh, using databases first time? [13:08] enmand has joined the channel [13:09] stephank has joined the channel [13:09] _rockbot_: Yep! Well, I've used MySQL before, but im pretty sure that's the best one for node apps :-P [13:09] RLa: if you have complex data and simple queries, use nosql, if you have simple data but complex queries, use sql [13:09] _rockbot_: How does one define complex v simple? [13:10] _rockbot_: I mean, I think I've got simple queries and simple data, but how can I really be sure? [13:10] RLa: do you have many many-to-many relationships? [13:11] SomeoneWeird_ has joined the channel [13:11] amasad has joined the channel [13:11] _rockbot_: I don't think so? [13:11] RLa: then you could try nosql solution [13:11] LeftWing has joined the channel [13:12] _rockbot_: Basically, I'd have multiple entries that are categorized and time-stamped [13:12] augustl: _rockbot_: complex = intertwined, basically. [13:12] _rockbot_: Then I'd pull those entries based on category, in chronological order [13:12] Jalava: mongodb + node works quite nicely [13:12] augustl: so practically it's about whether your data is stand-alone or intertwined [13:13] _rockbot_: That should be pretty simple, right? [13:13] Jalava: mongodb + redis cache layer + node is what we do currently [13:13] subbyyy has joined the channel [13:13] augustl: _rockbot_: so it's just one collection of data? [13:13] augustl: sounds like a job for a tabular database [13:14] Jalava: mysql should work fine for that [13:14] mightym: well thank you anyway! [13:14] claudio has joined the channel [13:15] _rockbot_: Can I use MySQL with node? [13:15] lowerkey: HardPhuck: When using coffeescript with node, do you still have to compile the coffee or does node "know" coffeescript? [13:15] erichynds has joined the channel [13:15] lowerkey: _rockbot_: Yes, check out http://sequelizejs.com/ [13:15] _rockbot_: I got the impression that the big DBs were CouchDB and MongoDB. I have no experience with either and wanted to figure out which would be better for my project [13:15] jomoho has joined the channel [13:16] louissmit has joined the channel [13:16] _rockbot_: Oh, neat! Thanks, lowerkey [13:16] HardPhuck: lowerkey: I run the app like: coffee myapp.coffee [13:16] HardPhuck: whereas without cofee you use: node myapp.js [13:17] _rockbot_: augustl: What do you recommend? [13:17] HardPhuck: so yes, you can run .coffee files directly [13:17] sand^ has joined the channel [13:18] level09 has joined the channel [13:18] lowerkey: HardPhuck: So how does node come into play then? Do you still have to call it somewhere in your code? [13:18] niloy has joined the channel [13:18] HardPhuck: no [13:19] HardPhuck: you just save all files like somefile.coffee and that's it [13:19] augustl: _rockbot_: I like postgresql [13:19] HardPhuck: when you require your won module you do require('modulename') [13:20] HardPhuck: without .js or .coffee [13:20] tristanpemble has joined the channel [13:20] HardPhuck: so even if the module is in CS it's ok [13:20] yawNO has joined the channel [13:20] ljackson has joined the channel [13:21] CrawfordComeaux has joined the channel [13:22] tristanpemble: does anyone know if I can configure NPM to use HTTPS when connecting to GitHub? [13:22] tristanpemble: rather than git:// [13:22] augustl: when does npm connect to github? [13:23] tristanpemble: well, I'm assuming it's a package configuration [13:23] josh-k has joined the channel [13:23] davemo has joined the channel [13:23] augustl: I'm pretty sure npm doesn't know about github, perhaps some package has a dependency specified as a git url? [13:23] jetheredge has joined the channel [13:23] fly-away has joined the channel [13:23] tristanpemble: hm, I just realized I can just clone it manually then npm install . [13:23] herpderpasdf has joined the channel [13:24] jondot_ has joined the channel [13:25] subbyyy has joined the channel [13:26] heatxsink has joined the channel [13:27] ryanseddon has joined the channel [13:29] socketio\test\16 has joined the channel [13:30] arturadib has joined the channel [13:30] panterax__ has left the channel [13:30] fumanchu182 has joined the channel [13:31] socketio\test\39 has joined the channel [13:34] letsgojuno has joined the channel [13:35] bshumate has joined the channel [13:35] bshumate has joined the channel [13:36] _rockbot_ has joined the channel [13:37] panterax has joined the channel [13:43] vkareh has joined the channel [13:44] Cromulent has joined the channel [13:44] stagas has joined the channel [13:45] jondot_: hi all, when you need to merge 2 dictionaries (or objects) what would you use in node without introducing too many deps? [13:46] booo has joined the channel [13:46] pauls1 has joined the channel [13:48] barberdt has joined the channel [13:49] jomoho has joined the channel [13:49] jetienne_ has joined the channel [13:50] kazupon has joined the channel [13:51] bradleymeck has joined the channel [13:52] tomlion_ has joined the channel [13:53] joshfinnie has joined the channel [13:53] jomoho has joined the channel [13:53] fly-away: ор [13:54] brianloveswords has joined the channel [13:56] astropirate has joined the channel [13:56] zomg: jondot_: a for loop [13:56] niloy has joined the channel [13:56] jondot_: yep. thats what i eventually did [13:57] astropirate: like.. OHH... My.. GOD!!! node is soooooo coool [13:57] mc_greeny has joined the channel [13:57] maritz: jondot_: underscore.js doesn't have any other dependencies and provides quite a few utilities :) [13:57] maritz: astropirate: RIGHT?! [13:57] maritz: npm is down [13:57] jondot_: not sure i want to introduce underscore as a dependency for a connect middleware [13:57] maritz: npmjs.org i mean [13:58] polymar has joined the channel [13:58] maritz: jondot_: that's reasonable. thought it was about an application. yeah in middleware/modules i'd suggest looping as well. [13:58] mmalecki: maritz: oh, damn, right [13:58] deedubs has joined the channel [13:59] jondot_: now i'm wondering whats a way to GET a url's content without dependencies.. [13:59] maritz: mmalecki: yey, quick response! :) [14:00] maritz: jondot: require('http').request() [14:00] maritz: jondot_: http://nodejs.org/docs/latest/api/http.html#http.request [14:01] brianloveswords has joined the channel [14:01] jondot_: maritz, downside is that with http module i have to break a URI into components [14:01] wink_ has joined the channel [14:01] maritz: jondot_: http://nodejs.org/docs/latest/api/url.html :D [14:02] tristanpemble: that ^ [14:02] mmalecki: I WANT MY REGISTRY BACK. #kthxbai [14:03] pdodde has joined the channel [14:03] maritz: mmalecki: it's back?! :D [14:03] maritz: slow, but there. [14:05] Hanspolo has joined the channel [14:06] wink__ has joined the channel [14:06] lackac has joined the channel [14:06] aliem_ has joined the channel [14:07] dstufft has left the channel [14:08] otakutomo has joined the channel [14:09] AaronMT has joined the channel [14:09] teadict: I thought I understood server sessions but I don't think I do [14:09] brianloveswords has joined the channel [14:10] lazyshot has joined the channel [14:10] thomblake has joined the channel [14:11] thomblake has left the channel [14:11] ljackson has joined the channel [14:11] zomg: teadict: server sessions? [14:11] teadict: zomg: sessions, whatever [14:12] zomg: Yeah just wanted to check if you meant something else :) [14:12] zomg: What do you not understand about that? [14:12] theycallmeswift has joined the channel [14:12] teadict: although.. [14:12] teadict: I've just figured out what app.use is all about [14:12] brianloveswords has joined the channel [14:12] otakutom_ has joined the channel [14:12] teadict: so now I know what you "use" in the "app", is available to all routes responses... [14:12] gbatcisco has joined the channel [14:13] teadict: I hadn't seen that before [14:13] teadict: I was lost because of express, not sessions... [14:13] otakutomo has joined the channel [14:13] zomg: Heh :) [14:13] teadict: does that mean that if I want to have say, the MySQL ORM instance, in every route I create... I should app.use() the ORM? [14:14] teadict: or whatever I'll need all over the place [14:14] fumanchu182 has joined the channel [14:14] teadict: like nowjs [14:15] devdazed has joined the channel [14:15] teadict: or am I off? [14:16] jasonkuhrt has joined the channel [14:16] otakutomo has joined the channel [14:16] TheFuzzball has joined the channel [14:17] otakutomo has joined the channel [14:18] Venom_X has joined the channel [14:18] broofa has joined the channel [14:19] otakutomo has joined the channel [14:19] eb4890 has joined the channel [14:20] jondot_: hmm trying to perform HTTP GET with http and url is annoying (i.e. https, querystring). whats a reasonable http library i can include in my deps? [14:22] letsgojuno has joined the channel [14:22] otakutomo has joined the channel [14:22] jakehow has joined the channel [14:22] lperrin: jondot_: do you know request ? [14:22] lperrin: https://github.com/mikeal/request [14:23] jondot_: sounds good. is it reasonable to include in a connect-middleware as a dependency? [14:23] lperrin: it's already a dependency of connect [14:23] AaronMT has joined the channel [14:24] bogomips has joined the channel [14:24] jondot_: ah, great!. any idea how to pick a version that won't cause trouble? [14:24] lperrin: wait no, sorry, it's not a dep [14:25] otakutomo has joined the channel [14:25] brianloveswords has joined the channel [14:25] jondot_: well in any case i'm wondering how to pick a version that would fit something that might already exist on the user's stack [14:25] tmartiro has joined the channel [14:26] urlisse has joined the channel [14:27] carlyle has joined the channel [14:27] maritz: teadict: no, i think you're still confused about use. do you know what a middleware is? [14:28] zitchdog_ has joined the channel [14:28] willwhite has joined the channel [14:29] hz has joined the channel [14:29] lperrin: jondot_: a lib like 'curl' requires request >= 1.0.0 [14:29] jondot_: i see. [14:30] lperrin: perhaps you could try that, but I'm really not a npm expert :) [14:30] maritz: jondot_: pick the latest one and assume that at the point of someone using your library it won't be the latest anymore. [14:30] c4milo has joined the channel [14:30] jondot_: but then if someone is using an older one, i'll force him/her to use 2 versions [14:31] otakutomo has joined the channel [14:31] maritz: so what? you can't possibly prevent that except by using the oldest one and accepting all older ones. [14:31] geekbri has joined the channel [14:31] otakutomo has joined the channel [14:31] maritz: there is a reason for new versions after all, so you should always pick the latest version. [14:31] teadict: maritz: I understand is something you put inthe middle of two things :P [14:31] bradleymeck has joined the channel [14:31] maritz: teadict: kind of, yeah. but middleware can incidentally also be put at the start and end of it. xD [14:32] teadict: like when you have a route request and you use a function to check for something before the handle [14:32] replore has joined the channel [14:33] maritz: basically if you do app.get('/', function () {}); you create a middleware that is only called on the url /. connect/express goes through all middlewares that are valid for a url and executes them in their defined order. assuming that the middleware calls next() it goes to the next middleware. [14:33] geekbri: Is there an official node PPA ? [14:33] maritz: app.use is a special middleware that is url agnostig and works on every request [14:33] maritz: *agnostic [14:34] teadict: then what I said happens? [14:34] teadict: what you app.use() is available in all requests? [14:34] joestein has joined the channel [14:34] rwaldron has joined the channel [14:34] teadict: whatever available means there [14:34] maritz: that is, if it is a middleware [14:34] teadict: what's NOT a middleware? [14:34] teadict: for example [14:34] maritz: app.use(function (req, res, next) { this.test = 1; next()}); [14:34] maritz: that's a middleware [14:35] maritz: arg, change this.test to req.test [14:35] maritz: and all middlewares after it will have access to req.test [14:35] teadict: mmhmmm... [14:35] maritz: app.use(require('somerandommodule')); will probably not work because it probably doesn't call next() ;) [14:36] teadict: so next() is more important than I thought.. [14:36] teadict: is not a stupid redirect method for routes [14:36] teadict: is a freaking environmental function to keep the middlewares working... [14:37] CarterL has joined the channel [14:40] mightym has joined the channel [14:41] zarex has joined the channel [14:41] Wizek has joined the channel [14:43] spleeze has joined the channel [14:43] maritz: teadict: well, it tells express: ok, i'm done, you can call the next middleware. [14:44] teadict: maritz: I see [14:44] jetienne_ has joined the channel [14:44] maritz: afaik next should not be called if you finish the response in that middleware, becuase other middlewares might try to respond as well which will cause an error [14:45] andree has joined the channel [14:45] teadict: makes sense [14:45] teadict: I guess with practice, one would perfectionate the use of next [14:45] teadict: so... Express is more routing than anything? [14:46] teadict: because that's what a server is, essentially [14:46] CarlosC has joined the channel [14:47] snearch has joined the channel [14:47] diogogmt has joined the channel [14:47] chasefarmer has joined the channel [14:47] robotmay has joined the channel [14:48] snearch has joined the channel [14:48] koo4 has joined the channel [14:48] teadict: res.redirect('home')... is that some kind of constant? [14:48] cosmincx has joined the channel [14:48] eeemsi: hi there [14:48] teadict: or alias for '/'? [14:49] eeemsi: i am still running into a getaddrinfo ENOENT error [14:49] k1ttty has joined the channel [14:49] lduros has joined the channel [14:49] teadict: sorry, I forgot this was #node.js, I'm asking #express things [14:50] kishoreyekkanti has joined the channel [14:51] Poetro has joined the channel [14:52] dodo has joined the channel [14:53] napperjabber has joined the channel [14:54] tdegrunt_ has joined the channel [14:57] fangel has joined the channel [14:58] bkaney has joined the channel [14:58] wink_ has joined the channel [14:58] kyonsalt has joined the channel [14:59] HammerT has joined the channel [15:01] mightym has joined the channel [15:03] jtikalsky has joined the channel [15:04] niloy has joined the channel [15:04] Construct has joined the channel [15:06] chrisvwebdev has joined the channel [15:07] benvie has joined the channel [15:07] teadict: express questino: I don't understand what those dynamicHelpers do... they don't seem to be used anywhere in here: https://github.com/visionmedia/express/blob/master/examples/auth/app.js [15:07] agnat has joined the channel [15:08] Nathan_ has joined the channel [15:08] tcurdt has joined the channel [15:09] teadict: oh, they're used in the views... [15:09] vkareh has joined the channel [15:09] teadict: no, wait... [15:09] teadict: mmm [15:10] teadict: oh yes they are! [15:10] teadict: so, they become Jade locals? [15:10] teadict: that's awesome [15:10] fantastikibne_ has joined the channel [15:10] fantastikibne_: hi [15:11] fantastikibne_: i want to ask something [15:11] teadict: don't ask for permission [15:11] fantastikibne_: i need to call an api for millions of times [15:11] fantastikibne_: i tried many solution [15:11] fantastikibne_: php curl multi curl c# java perl blabla [15:12] fantastikibne_: my friend got a solution with node.js but he doesn't tell me about it :D [15:12] fantastikibne_: what may he be using for making https api calls very fast? [15:12] jondot_: can anyone recommend a connect middleware project with decent tests (prefer BDD/spec) so i can learn from and implement? [15:13] tristanpemble: http://nodejs.org/docs/v0.6.7/api/https.html#https.request [15:13] Edy has joined the channel [15:14] bogomips has joined the channel [15:14] benvie: why is your friend so non-helpful [15:14] benvie: this is the real question [15:14] teadict: so, this example is great, I got it now: https://github.com/visionmedia/express/blob/master/examples/auth/app.js , but what about the other routes in the app? don't you need to check the session state inside them too? [15:15] eeemsi: M( argh oh my god … these pains … that error drives me crazy [15:16] eeemsi: var host = config.urls[i].host; [15:16] eeemsi: var path = config.urls[i].path [15:16] fantastikibne_: benvie: not sure about that :( [15:16] errordeveloper has joined the channel [15:16] errordeveloper: hey .. [15:16] eeemsi: this is correct and works … i had them host = ….path and path = ….host [15:16] fantastikibne_: exaclty i dont need response of the requests [15:16] booo has joined the channel [15:16] errordeveloper: I have to avoid 'Transfer-Encoding: chunked', so I need to set 'Content-Lenght' manually [15:17] errordeveloper: how can I calculate it ? [15:17] marcello3d has joined the channel [15:17] errordeveloper: I need the byte lenght of a string, isn't it? [15:17] benvie: yeah [15:17] slaskis: body.length ? [15:17] benvie: you need to create a buffer from the string [15:17] slaskis: or Buffer.byteLength(body) [15:17] Hanspolo has joined the channel [15:17] benvie: and do that [15:18] errordeveloper: ok [15:18] benvie: new Buffer(theString).byteLength [15:18] kevinohara80 has joined the channel [15:18] benvie: if it's not already a buffer [15:19] wink_ has joined the channel [15:19] errordeveloper: thanks! [15:20] kevwil has joined the channel [15:21] scoates has joined the channel [15:21] benvie: np sir [15:21] stephank has joined the channel [15:22] thax has joined the channel [15:22] eeemsi: could someone explain me how the dns part of nodejs works? [15:23] eeemsi: like how many requests can it resolv at the same time [15:23] brianc1 has joined the channel [15:23] jaha has joined the channel [15:24] benvie: most dns requests use this library http://c-ares.haxx.se/ [15:24] benvie: which may be a good starting point [15:24] otakutomo has joined the channel [15:24] drekaus has joined the channel [15:24] wink__ has joined the channel [15:24] otakutomo has joined the channel [15:25] benvie: or https://github.com/bagder/c-ares [15:26] JustinCampbell has joined the channel [15:26] JustinCampbell has left the channel [15:27] ecto has joined the channel [15:27] eeemsi: benvie: i am having a for loop within which i am getting host and paths from a json file and give these to the http.get thing [15:27] rauchg has joined the channel [15:27] benvie: hitting some sort of limit? [15:27] kitt has joined the channel [15:27] eeemsi: i think so… [15:28] benvie: the basic dns.lookup function will start with using the system's getaddrinfo [15:28] benvie: you can force it to use c-ares which should work better with larger number of requests [15:28] benvie: using something like [15:29] otakutomo has joined the channel [15:29] benvie: dns.resolve instead of dns.lookup [15:30] fantastikibne_: i got error outputs may they give me an idea? [15:30] eeemsi: benvie: http://ricochen.wordpress.com/2011/11/15/a-simple-node-js-rss-parser-using-sax-js/ [15:30] satyr has joined the channel [15:30] eeemsi: this was what i used to get started with my main goal … [15:30] AndreasMadsen has joined the channel [15:30] benvie: most of the basic built in functions from like http will use dns.lookup and not use ares unless I've misread how this works [15:31] eeemsi: please look at the http.get thing [15:31] benvie: so you may have to do the lookup part manually outside of the http module [15:31] carlyle has joined the channel [15:31] wssr has joined the channel [15:31] fantastikibne_: http://pastebin.com/raw.php?i=fWkJNzMZ [15:31] ecto has joined the channel [15:32] benvie: ' C-Ares is much faster than getaddrinfo but the system resolver is more constant with how other programs operate. When a user does net.connect(80, 'google.com') or http.get({ host: 'google.com' }) the dns.lookup method is used. Users who need to do a large number of look ups quickly should use the methods that go through C-Ares.' [15:33] sriley has joined the channel [15:33] Hanspolo has joined the channel [15:33] MatthewS has joined the channel [15:33] otakutomo has joined the channel [15:33] benvie: so basically you'd do the lookup using require('dns').lookup directly [15:33] benvie: and then feed the ip address into http.get [15:33] benvie: instead of the hostnamw [15:35] wink_ has joined the channel [15:36] otakutomo has joined the channel [15:36] hackband_ has joined the channel [15:37] tmcw has joined the channel [15:38] deoxxa: https://github.com/progman/node-sleep << gold [15:39] Aikar: anyone know ETA on .7 branch stabalizing? [15:39] Aikar: and why is that gold [15:39] Aikar: that looks 100% useless [15:39] otakutomo has joined the channel [15:39] emilis_info has joined the channel [15:39] fatjonny has joined the channel [15:39] deoxxa: Aikar: exactly [15:40] deoxxa: but it made me lol [15:40] Aikar: deoxxa: oh sorry didnt detect the sarcasm :P [15:40] mattstevens has joined the channel [15:40] joestein has joined the channel [15:40] emilis_info: What is the "export" object in node? When I enter it into console it hangs [15:40] Aikar: emilis_info: var export = module.export essentually in modules [15:40] Aikar: REPL is not a module [15:40] Aikar: but it shouldnt hang... [15:41] dipser has joined the channel [15:41] emilis_info: hm [15:42] Aikar: I get the ..., not sure why that is though [15:42] emilis_info: Aikar, node hangs even if I touch the var inside a function: > function() { var export=123; } [15:42] Aikar: ctrl + C o nthe ... will resume back [15:42] emilis_info: Aikar, yup [15:42] Aikar: that is weird behavior [15:42] meso has joined the channel [15:42] fangel has joined the channel [15:43] emilis_info: Aikar, should I report it somewhere? I have got "v0.7.0-pre" from GitHub [15:43] anubhaw has joined the channel [15:43] sorensen__ has joined the channel [15:43] fantastikibne_: ok new guy s:/ [15:43] fantastikibne_: does anyone know whats fastest way to make http requests? [15:43] Aikar: fantastikibne_: npm install request [15:43] emilis_info: fantastikibne_, curl :PPP [15:43] Aikar: not curl :P [15:43] fantastikibne_: curl is not enough fast [15:43] teadict: there are no tricks when it comes to basic stuff [15:43] fantastikibne_: multi curl not too [15:44] teadict: what's the best way to sum 2 numbers? [15:44] Aikar: this isnt php [15:44] teadict: sum the 2 numbers! [15:44] Aikar: multi curl is useless in node [15:44] fantastikibne_: my friend shown me he could do 5000 requests in 28 seconds [15:44] emilis_info: ab? [15:44] fantastikibne_: and its not possible to do as much as that much fast in multi curl [15:44] niloy: is XMLHttpRequest avaliable in node? [15:44] dthompso99 has joined the channel [15:44] Aikar: multicurl was a way to do async parrallel requests in other synchronous languages [15:44] Aikar: node is already async [15:45] _dc has joined the channel [15:45] Poetro has joined the channel [15:45] niloy: is XMLHttpRequest avaliable in node? [15:45] warz has joined the channel [15:46] fantastikibne_: can i do http requests async in node.js? [15:46] aelien27 has joined the channel [15:47] kriszyp has joined the channel [15:47] fantastikibne_: make a http request without wait another's end [15:47] Aikar: niloy: no, no point [15:47] bnoordhuis: fantastikibne_: yes [15:47] psjinx has joined the channel [15:47] bnoordhuis: i'd even go so far and say it's impossible to do it any other way [15:47] Aikar: you guys are either extremely new or trolling ~.~ [15:48] otakutomo has joined the channel [15:48] Aikar: about the only thing you can do thats synchronous (currently) is file system access [15:48] Aikar: bnoordhuis: did CP.execSync ever see the light of day? [15:48] bnoordhuis: Aikar: no [15:48] Aikar: bnoordhuis: going to? [15:48] aheckmann has joined the channel [15:49] larsschenk has joined the channel [15:49] bnoordhuis: Aikar: probably not, there were issues and i personally don't see the point [15:49] Aikar: while its going to lead to ugly hacks of synchronizing all the built in functions, i still think it has possible uses [15:50] Aikar: stuff like executing other apps to get configuration elements are possible use cases [15:50] Aikar: on process start [15:50] monteslu__ has joined the channel [15:51] coreb has joined the channel [15:51] larsschenk1 has joined the channel [15:51] bnoordhuis: Aikar: hrm, not convinced [15:52] otakutomo has joined the channel [15:54] larsschenk1 has left the channel [15:54] VladGh has joined the channel [15:54] altivec has joined the channel [15:54] icrazyhack has joined the channel [15:55] tdegrunt has joined the channel [15:55] Topcat has joined the channel [15:55] xxiao: node.js installation by default is 18MB, pretty heavy [15:56] niloy: Aikar, please tell mehow to make https calls? [15:56] wink_ has joined the channel [15:57] icebox has joined the channel [15:57] otakutomo has joined the channel [15:58] altivec has joined the channel [15:58] piscisaureus_ has joined the channel [15:59] Aikar: xxiao: HD space is ridicously cheap now, why does it matter? [15:59] Aikar: 18MB is nothing [15:59] xxiao: Aikar: thinking about putting it to low-end embedded devices, that is [15:59] lperrin: Aikar: some people (like me) are shipping node as part of an app [16:00] xxiao: or like lperrin said, wraps it in an app [16:00] niloy: node runs as standalone? [16:00] Aikar: well, I guess for that. [16:00] sorensen__ has joined the channel [16:01] xxiao: 18MB is indeed something, consider i could put a linux kernel, file system, a router application with simple web server, in about 4MB flash [16:01] _unary has joined the channel [16:02] TheJH has joined the channel [16:03] altivec has joined the channel [16:04] joshfinnie has joined the channel [16:04] wink__ has joined the channel [16:04] lduros has joined the channel [16:05] jakehow has joined the channel [16:06] jondot_: trying to test connect middleware with expresso and should, i'm getting TypeError: Object # has no method 'request' -- any idea? [16:07] LeMike has joined the channel [16:07] fzzzy has joined the channel [16:09] Destos has joined the channel [16:10] tmske: How can I enter some input data to a process with child_process? [16:11] booo has joined the channel [16:11] lperrin: tmske: like on its stdin ? [16:12] pdodde has joined the channel [16:12] tmske: lperrin: yes [16:12] eee_c has joined the channel [16:12] cognominal has joined the channel [16:12] lperrin: there's a good example in the doc [16:12] lperrin: http://nodejs.org/docs/latest/api/child_processes.html#child_process.spawn [16:13] robde_ has joined the channel [16:13] lperrin: basically, proc.stdin.write("something\n"); [16:14] fantastikibne_: while sending multiple https request will it check for the cert. things many times or it will just build the query for 1 time and send as many as you need? [16:14] rio{{ has joined the channel [16:14] letsgojuno has joined the channel [16:14] jondot_: hmmrgh. trying to test connect middleware isn't fun. [16:15] kmiyashiro has joined the channel [16:15] Aikar: fantastikibne_: cert checks is part of an SSL handshake. itll have a "keep alive" agent, so if you make a req after 1 request has finished, it may reuse an open connection [16:15] Aikar: but if you open multiple requests at same time, itll use multiple agents/connections (to a certain limit) [16:15] Aikar: which all will initiate an SSL handshake [16:16] deedubs has joined the channel [16:17] Morkel has joined the channel [16:17] level09 has joined the channel [16:17] arturadib has joined the channel [16:18] level09 has left the channel [16:19] level09 has joined the channel [16:19] amasad has joined the channel [16:19] neurodrone has joined the channel [16:19] PeteDaGuru has joined the channel [16:20] PeteDaGuru has left the channel [16:20] niftydigits has joined the channel [16:20] captain_morgan has joined the channel [16:21] joshkehn has joined the channel [16:21] brianloveswords has joined the channel [16:21] theycallmeswift has joined the channel [16:21] cole_gillespie has joined the channel [16:21] kyonsalt has joined the channel [16:21] satyr has joined the channel [16:21] theycallmeswift: Anyone have an thoughts about the best way to create a fake http request? [16:22] joshkehn has left the channel [16:22] theycallmeswift: I'm thinking creating a fake agent class that never actually creates a socket would be the best way to do it [16:23] unomi has joined the channel [16:23] theycallmeswift: and then just passing that along as the request's agent [16:24] letsgojuno has joined the channel [16:24] mightym_ has joined the channel [16:25] autarch has joined the channel [16:26] autarch: is there a way to have npm publish a tarball for me to look at without actually uploading it? [16:27] TheFuzzball has joined the channel [16:27] jetienne_ has joined the channel [16:27] wink_ has joined the channel [16:28] jaequery has joined the channel [16:28] pizthewiz has joined the channel [16:28] warz has joined the channel [16:28] warz has joined the channel [16:32] e-1 has joined the channel [16:32] e-1 has joined the channel [16:33] kenperkins has joined the channel [16:34] dharmesh has joined the channel [16:34] tmske: lperrin: I tried the example with spawn and cmd.stdout.on('data', ....) but this doesn't gives any output, stderr outputs something like: . If I use child instead of spawn then I do get valid stdout [16:34] fangel has joined the channel [16:35] lperrin: tmske: have you tried child.stderr.setEncoding('utf8'); ? [16:35] lperrin: this should tell node to convert the buffer you get into a string [16:37] jondot_: anyone knows if mocha supports response helpers like expresso does (being its successor and all)? (https://github.com/visionmedia/mocha) [16:37] brianloveswords has joined the channel [16:37] Lingerance: Alternatively, do cmd.stdout.on('data', function(buff) { console.log(buff.toString()) }) [16:37] blueadept has joined the channel [16:37] blueadept has joined the channel [16:37] rio{{: Whats the best way to set context of interval callback according to you guys? [16:37] nphase has joined the channel [16:38] ryanrolds: rio{{: Closure? [16:38] autarch: how do people handle publishing code to npn that is written in coffeescript? [16:38] iammerrick has joined the channel [16:39] cognominal_ has joined the channel [16:39] ryanrolds: autarch: They publish it and then people avoid using the module. [16:39] autarch: haha [16:39] iammerrick has left the channel [16:39] autarch: I was thinking that I should publish both the CS source and the generated JS [16:39] tmske: lperrin: Ok, now I get some valid output... "CreateProcessW: The system cannot find the file specified." This is on windows btw (and child_process.exec does work...) [16:40] rio{{: ryanrolds ? [16:40] slloyd_air has joined the channel [16:40] maletor has joined the channel [16:40] Lingerance: tmske: What are you feeding spawn for args? [16:41] ryanrolds: rio{{: http://stackoverflow.com/questions/111102/how-do-javascript-closures-work [16:41] lperrin: autarch: if it helps, here's a module that's on npm with cofeescript https://github.com/dodo/node-bufferstream [16:42] lperrin: * coffescript [16:42] rio{{: yeah I know how closures work [16:42] redir has joined the channel [16:42] tmske: Lingerance: for example spawn('dir') [16:42] Lingerance: spawn('dir') works for you then? [16:42] rio{{: but there are several ways of making "this" what you want in the timeout callback [16:42] tmske: Lingerance: doesn't work, exec('dir') works [16:43] rio{{: wondered what people prefer [16:43] tmske: spawn('dir') doesn't work [16:43] ryanrolds: Has anyone done a poll to find out how many people avoid using modules that use JS compiled from CS? [16:43] lperrin: tmske: exec runs in a shell, which spawn does not [16:43] lperrin: something like spawn('c:\\windows\system\dir.exe'); should work [16:43] synkro has joined the channel [16:44] lperrin: (not sure where dir.exe is actually located) [16:44] tmske: lperrin: ok, so to use spawn and feed input to stdin I will have to use the exact path? [16:45] moshen has joined the channel [16:45] lperrin: yes, but if you're just looking to run dir, you should use exec instead [16:45] blueadept has joined the channel [16:46] madhums has joined the channel [16:46] tmske: lperrin: I was just using dir to see if the error was not in the command [16:46] alvaro_o has joined the channel [16:46] tmske: I'm looking to run: runas [16:46] benvie: http://ss64.com/nt/ is really useful [16:46] benvie: for windows command line stuff [16:47] lperrin: tmske: oddly enough, running "ls" without any path works on OSX [16:47] lperrin: maybe requiring the full path is a windows thing [16:47] hz has joined the channel [16:47] mandric has joined the channel [16:47] tmske: lperrin: yeah I guess so, I've run into the same problems with python... [16:47] benvie: windows actually exposes quite a lot of stuff to command line programs similarly to unix [16:47] theycallmeswift: Anyone know a good way to create a fake socket for a request? [16:48] EyePulp has joined the channel [16:49] caolanm has joined the channel [16:49] hydrozen has joined the channel [16:49] langworthy has joined the channel [16:50] devaholic has joined the channel [16:51] klemenes has joined the channel [16:51] jocafa has joined the channel [16:53] kmiyashiro_ has joined the channel [16:54] meandi7 has joined the channel [16:54] Stephen has joined the channel [16:55] wink_ has joined the channel [16:56] dannyamey has joined the channel [16:56] gde33|2 has joined the channel [16:57] i42n has joined the channel [16:58] otakutomo has joined the channel [16:59] stelleg has joined the channel [16:59] GrizzLyCRO has joined the channel [17:00] galaxywatcher has joined the channel [17:01] silky has joined the channel [17:02] isaacs has joined the channel [17:04] jmalina has joined the channel [17:05] perezd has joined the channel [17:05] perezd has joined the channel [17:06] sorensen__ has joined the channel [17:06] perezd has joined the channel [17:06] wink__ has joined the channel [17:06] erichynds has joined the channel [17:06] andorraclaim has joined the channel [17:07] diversario has joined the channel [17:08] jocafa has joined the channel [17:09] _dc has joined the channel [17:10] joqueonr has joined the channel [17:10] dannyamey has joined the channel [17:10] jomoho has joined the channel [17:11] joqueonr: How can I define the require function when testing with mocha and zombie? I am using node.js and express [17:12] peregrine81 has joined the channel [17:13] theycallmeswift: joqueonr: why do you need to define require? [17:13] erichynds_ has joined the channel [17:13] erichynds_ has joined the channel [17:14] josh-k_slides-ti has joined the channel [17:14] jerrysv has joined the channel [17:14] devaholic has joined the channel [17:14] doki_pen: is the punycode module included in node.js? I don't remember installing it, but it seems to work [17:14] joqueonr: I am getting an error in my tests saying require is not defined [17:15] ericmuyser has joined the channel [17:15] NetRoY has joined the channel [17:16] tdegrunt has joined the channel [17:16] joqueonr: theycallmeswift: Here is the error: require is not defined referencError require is not defined [17:17] letsgojuno has joined the channel [17:18] devongovett has joined the channel [17:18] RobWC has joined the channel [17:18] sharkbird has joined the channel [17:19] otakutomo has joined the channel [17:19] devongovett has joined the channel [17:19] ismell has joined the channel [17:19] stonebra_ has joined the channel [17:19] davidsklar has joined the channel [17:19] JJMalina has joined the channel [17:19] snearch has joined the channel [17:21] khrome has joined the channel [17:22] theycallmeswift: joqueonr: is there a line reference or anything like that? perhaps youre trying to run something in the browser that should be node only [17:23] autarch: how can I print to std{out,err} without adding newlines or anything? [17:23] autarch: console.log adds a newline, I just want to output some data as-is [17:23] Skaag has joined the channel [17:24] benvie: process.stdout.write [17:24] autarch: ah, thanks [17:25] BillyBreen has joined the channel [17:25] EhevuTov has joined the channel [17:27] arturadib has left the channel [17:28] bardu has joined the channel [17:28] jocafa has joined the channel [17:28] autarch: with npm it seems like the prepublish script doesn't actually affect what gets published [17:28] autarch: in other words, I want to use it to generate JS from CS source, but the JS isn't being included in the tarball [17:29] bardu has left the channel [17:29] anubhaw has joined the channel [17:29] ismell has joined the channel [17:29] isaacs: autarch: are you ignoring the js files with a .gitignore or .npmignore? [17:29] autarch: also, the postpublish script couldn't find the cake executable even though prepublish could [17:29] autarch: isaacs: ah yes, with .gitignore [17:29] isaacs: there ya go. [17:29] isaacs: put an empty .npmignore there. [17:30] jnbek has joined the channel [17:30] isaacs: (or at least, one that is the same as the .gitignore, except it doesn't ignore js) [17:30] autarch: ok [17:30] Dregond has joined the channel [17:30] willwhite has joined the channel [17:30] autarch: any ideas about why it can't find cake in the postpublish step? [17:30] isaacs: autarch: not sure. postpublish is kind of an odd step, i forget when exactly that occurs. [17:31] mmalecki: isaacs: hey, in node-tar, are all entry events guarenteed to fire before stream ends? [17:31] EyePulp: can someone double-check my logic? I have a server.js that calls to a module which builds a bunch of worker processes listening to incoming web requests. at the server.js level I have a process.on('unhandledException',function(){…}); handler set up. When a worker encounters an unhanded error, the handler gets called, but on my ubuntu box that's running server.js through upstart, it still restarts the whole thing, even though I th [17:31] EyePulp: I was capturing the error. [17:31] isaacs: autarch: it ought to be *after* you've already published, so, too late to do anything [17:31] autarch: isaacs: it may not be necessary for what I'm doing, I just wanted to clean up the generate .js files [17:31] isaacs: mmalecki: yes. [17:31] mmalecki: isaacs: thanks! [17:31] autarch: but if it's not actually happening in my working dir it doesn't matter [17:31] mmalecki: bradleymeck: ^ [17:31] autarch: it'd be _really_ nice to have some sort of --no-upload option so I could test this stuff out [17:32] AndreasMadsen: EyePulp: What do you use to create the cluster [17:32] EyePulp: AndreasMadsen: I'm on 0.6.6, so the built in cluster module [17:32] EyePulp: (if that's what you were asking =) [17:32] AndreasMadsen: It is [17:32] wink_ has joined the channel [17:32] autarch: I'll file an issue [17:32] isaacs: autarch: i see. [17:32] isaacs: autarch: bonus: this approach means that you can put coffee-script as a "devDependency" instead of a "dependency" [17:32] isaacs: autarch: since it's only required on your machine, not on mine when i'm using your thing. [17:33] autarch: isaacs: that's my goal [17:33] autarch: I figure there's no reason to _not_ publish JS [17:33] autarch: but I sure as hell don't want to write it if I don't have to ;) [17:33] isaacs: autarch: thank you for being responsible. [17:33] isaacs: :) [17:33] autarch: heh [17:33] EyePulp: AndreasMadsen: locally on my dev box (osx/0.6.6) the error gets handled correctly, the worker gets restarted and the master chugs on. [17:33] isaacs: autarch: the more we can remove unnecessary compilation from install time, the better. [17:34] autarch: yeah, I agree [17:34] isaacs: i didnt' see how awful this was until it got too bad [17:34] isaacs: but it's really quite bad. [17:34] AndreasMadsen: EyePulp: process.on is only used in isMaster right [17:34] autarch: it might be nice if eventually npm itself supported compiling on install [17:34] isaacs: autarch: it does. [17:34] autarch: oh, I had no idea [17:34] isaacs: autarch: don't tell anyone! [17:34] isaacs: autarch: :) [17:35] isaacs: autarch: we're going to do pre-compile-on-publish for platform-specific binary packages very soon [17:35] EyePulp: AndreasMadsen: I've moved it to a few different places to pin the behavior down. One was under an isMaster if/then. same problem [17:35] EyePulp: I can move it back to re-verify though. [17:35] AndreasMadsen: EyePulp: You how do detect when a worker is dead [17:35] tomasztomczyk has joined the channel [17:35] AndreasMadsen: EyePulp: or falling [17:35] lazyshot has joined the channel [17:36] jocafa has joined the channel [17:36] AndreasMadsen: EyePulp: How do detect when a worker is dead or falling [17:36] wssr has joined the channel [17:36] autarch: in general, it'd be nice if npmjs was more like metacpan.org [17:36] autarch: I guess I'll file some more issues [17:37] tauren_ has joined the channel [17:37] EyePulp: AndreasMadsen: mmmm…. I don't explicitly detect it (though I have a cluster.on('death', function to start a new worker) [17:37] EyePulp: AndreasMadsen: and then I have the unhandled exception handler [17:37] AndreasMadsen: EyePulp: The unhandled exception handler how do you use that to restart? [17:38] broofa has joined the channel [17:38] xxiao: running node as CLI, is ctrl-D the only way to quit cleanly? [17:38] EyePulp: AndreasMadsen: I don't do any restarts under it - I use it to capture errors and send them to admins (via e-mail) and to our event logger (mix panel) [17:39] tbranyen: xxiao: ctrl+c ctrl+c [17:39] AndreasMadsen: EyePulp: Do you kill the worker process after the "exception handler" has been called? [17:39] AndreasMadsen: In a worker [17:39] xxiao: tbranyen: ctrl=c is normally a panic button to me [17:40] isaacs: autarch: yeah, please file suggestions about the website here: https://github.com/isaacs/npmjs.org [17:40] CrabDude has joined the channel [17:40] EyePulp: AndreasMadsen: like with a process.exit() ? No sir. [17:40] isaacs: autarch: we'll be redoing that this year. [17:40] autarch: isaacs: yep, found it [17:40] tbranyen: xxiao: oh ctrl+d is panic for me i rarely use it [17:40] tbranyen: i guess its preference [17:40] xxiao: tbranyen: for ctrl-c i need do it twice [17:40] raincole_ has joined the channel [17:41] eee_c has joined the channel [17:41] tbranyen: xxiao: right but you asked if there was any other way, and there is... so i told you ;-) [17:41] tbranyen: you didn't ask what the quickest way was [17:41] AndreasMadsen: EyePulp: That could be your problem, if the worker do a total crash the web worker might be half running (not working) but it will not be restarted because on('death') isn't called in Master. [17:41] xxiao: tbranyen: ok. thanks [17:41] xxiao: under certain python shell i could not even do ctrl-c [17:42] dshaw_ has joined the channel [17:42] curtischambers has joined the channel [17:42] xxiao: and exit/quit did not quit either, so it's either ctrl-c followed by another ctrl-c, or ctrl-d [17:42] AndreasMadsen: EyePulp: Try keeping it simple and then advance. 1: no exception handler but on('death') restart. 2: add an exception handler in master (this must not die). 3: add an exception handler in workers but kill the process with process.exit(1). [17:43] AndreasMadsen: EyePulp: Have to go, look at .autoFork in ndreasMadsen/node-1/blob/master/lib/cluster.js [17:43] autarch: isaacs: basically, copy metacpan.org for npmjs.org ;) [17:43] isaacs: autarch: heh [17:43] cognominal_ has joined the channel [17:43] autarch: obviously a big task [17:43] isaacs: autarch: just as the npm client's goal is to make the cpan client look dated, slow, and awful by comparison, the goal of the website is to make metacpan seem like a thing of the past. [17:43] autarch: I think support for Changes files and documentation are pretty key starting points [17:43] isaacs: we learn from the best, and be better. [17:44] mmalecki: isaacs: are you even planning to use my code? [17:44] autarch: the cpan client _is_ slow, awful and dated! [17:44] autarch: but it works [17:44] isaacs: mmalecki: not sure yet. [17:44] EyePulp: AndreasMadsen: can I let you look at a paste to see if there's an obvious logic problem with placement? I'll remove all the goto commands so as not to embarrass myself. [17:44] autarch: but the great thing about cpan isn't the client, it's the whole infrastructure [17:44] mmalecki: isaacs: k. btw, there's one thing I like about cpan [17:44] mmalecki: isaacs: running tests on installation [17:44] isaacs: mmalecki: but the more i poke at this, the more i think a ground-up node website is best. [17:44] autarch: the fact that I can go to metapcan and browse the docs for basically _every_ Perl module ever written is amazing [17:44] isaacs: mmalecki: npm config set npat true [17:44] isaacs: mmalecki: and you get tests on install. [17:45] isaacs: enjoy your terrible slow installations that fail half the time for unreasonable reasons :) [17:45] autarch: the other important thing is that showing Changes & docs, running tests, etc. all create a _cultural_ expectation [17:45] isaacs: it was the default for a little while, and we all hated it. [17:45] autarch: the Perl community expects modules to include docs, a Changes file, to have tests, etc [17:45] qbit_: anyoen have any advice on troubleshooting a native module linking problem? [17:45] jgornick has joined the channel [17:45] te-brian has joined the channel [17:46] mmalecki: isaacs: well, I'll take your word for that [17:46] isaacs: autarch: yes, we are going to push for cultural changes. but we can't improve on perl by JUST copying perl. we have to grok why that makes perl great, and target it better. [17:46] autarch: well, I'm talking big strokes [17:46] isaacs: qv: JSAN [17:46] isaacs: it's terrible. [17:46] isaacs: no one uses it. [17:46] jnbek has joined the channel [17:46] isaacs: yeah [17:46] autarch: yeah, JSAN died a long time ago [17:46] isaacs: big strokes :) [17:46] isaacs: autarch: there are like 3 users who are super super into it. [17:46] autarch: I was really into it for a while but it never took off [17:46] isaacs: autarch: even have shims so that they can publish to npm and to jsan at the same time. [17:47] Wizek has joined the channel [17:47] iRoj has joined the channel [17:47] Aikar: the Joose system still ties to it [17:47] autarch: but otoh the website is a lot more useful than npmjs (except for a complete lack of libraries ;) [17:48] autarch: well, I shouldn't say a _lot_ more useful, but it does some things right [17:48] isaacs: autarch: yeah, that's cuz we focused on the relevant content first :) [17:48] isaacs: but there's some catch-up to do [17:48] reid has joined the channel [17:49] slaskis has joined the channel [17:50] ismell has joined the channel [17:51] erichynds has joined the channel [17:51] trentm has joined the channel [17:51] dilvie has joined the channel [17:52] mattgifford has joined the channel [17:52] trentm_ has joined the channel [17:54] lperrin has joined the channel [17:54] tjbell has joined the channel [17:54] arcanis has joined the channel [17:54] NetRoY has joined the channel [17:54] dnjaramba has joined the channel [17:57] trentm has joined the channel [17:58] kmiyashiro_ has joined the channel [17:59] nadirvardar has joined the channel [17:59] Poetro has joined the channel [18:00] MatthewS has joined the channel [18:00] c_t_montgomery has joined the channel [18:01] ryan_stevens has joined the channel [18:01] hipsters_ has joined the channel [18:02] gsmcwhirter has joined the channel [18:02] wink_ has joined the channel [18:02] eldingraho has left the channel [18:03] Dregond has left the channel [18:03] Heisenmink has joined the channel [18:05] zanefactory has joined the channel [18:05] Aikar: is there any length limit on npm module names? [18:06] teadict: it doesn't hurt to do some Sync things , rite? [18:06] Aikar: I might be building a system on top of node.js and would want to prefix every module thats specific to this system [18:06] Aikar: teadict: should avoid it after process start [18:06] teadict: what process? [18:06] Aikar: use it when the process is first starting to read configs and stuff [18:06] josh-k has joined the channel [18:06] Aikar: the node process [18:06] teadict: oh great [18:06] Aikar: like, reading an SSL cert to start your HTTPS server, no reason to use async there [18:06] firebalrog has joined the channel [18:06] teadict: meanning the servers listenning? [18:07] Lingerance: Yes [18:07] teadict: great.. I used readdirSync() to load some database models before http server start [18:07] Aikar: thats fine [18:07] teadict: but inside express routes should be all async [18:07] teadict: gotcha [18:09] thirdknife has joined the channel [18:09] DonkeyHot has joined the channel [18:09] cjlicata has joined the channel [18:09] letsgojuno has joined the channel [18:10] Salam has joined the channel [18:11] patcito has joined the channel [18:11] kmiyashiro has joined the channel [18:11] captain__ has joined the channel [18:11] teadict: mmm, this Sequelize doesn't have M <=> N support ): [18:12] teadict: and I haven't seen another MySQL ORM [18:12] Lingerance: :/ ORMs [18:12] DonkeyHot: Good evening. Faced a problem with nodejs' basic example. After running simple "hello world" in terminal once, second time i can't run the same app cause port is already busy. [18:13] teadict: Lingerance: it's a model-heavy app ahead, kind of need it [18:13] DonkeyHot: How i can avoid it? [18:13] DonkeyHot: can i* [18:13] Lingerance: Is the old one running still? [18:13] teadict: which port? [18:14] DonkeyHot: Nope. I closed the app and i can't run in after that. [18:14] p1d has joined the channel [18:14] teadict: if 80, kill apache [18:14] AndreasMadsen: EyePulp: are you there [18:15] carlyle has joined the channel [18:15] EyePulp: si [18:15] DonkeyHot: Any port. In fact i can't run any app twice and have to change prot everytime. [18:15] DonkeyHot: port* [18:15] teadict: are you killing them after running? [18:15] DonkeyHot: Yes. [18:15] teadict: ps ax | grep node [18:15] reid has joined the channel [18:16] sdwrage has joined the channel [18:16] aGHz has joined the channel [18:16] DonkeyHot: Yes, they running :) How can i turn them off. [18:16] DonkeyHot: ? [18:16] DonkeyHot: they are* [18:17] firebalrog: kill pid [18:17] teadict: killall node [18:17] teadict: or kill pid, yes [18:17] firebalrog: pkill node [18:17] DonkeyHot: Sorry for such silly qustion, but linux is not my native OS. [18:17] teadict: don't sweat it [18:17] firebalrog: use forever [18:18] firebalrog: npm install -g forever [18:18] willwhite has joined the channel [18:18] firebalrog: forever -o myout.log -e myerr.log start app.js [18:18] firebalrog: forever stop app.js [18:18] DonkeyHot: One more silly question. How should i close script to avoid manual process killing? [18:18] firebalrog: see forever above [18:19] t0mmyvyo has joined the channel [18:19] DonkeyHot: Already looking at. [18:19] DonkeyHot: Thanks. [18:19] vkandy has joined the channel [18:19] tmartiro has left the channel [18:19] teadict: well, node-orm doesn't look THAT bad [18:19] firebalrog: also can create init.d script with forever that will launch node script on system boot [18:19] teadict: doesn't have many to many either, though [18:19] EyePulp: AndreasMadsen: yessir, still here [18:20] AndreasMadsen: EyePulp: Do you have some code [18:20] firebalrog: pm me for init.d script example [18:20] niftydigits has left the channel [18:20] zpao_ has joined the channel [18:20] vkandy: guys does winston roll log files? if so how do i enable/configure that? [18:20] jimmysparkle has joined the channel [18:21] TooTallNate has joined the channel [18:22] thiagopnts has joined the channel [18:22] thiagopnts has joined the channel [18:23] firebalrog: init.d to start two node scripts with forever http://pastebin.com/5eysWkgZ [18:23] firebalrog: also uses nvm [18:23] dudeinthemirror has joined the channel [18:24] jetienne_ has joined the channel [18:24] donahue has joined the channel [18:25] firebalrog: one note on forever make and using init.d though make sure your paths are absolute to any files or that you use __dirname in express. [18:25] mc: anyone having to manage multiple node installs for multiple applications on the same server? [18:25] StanlySoManly has joined the channel [18:25] NetRoY has joined the channel [18:25] firebalrog: no but if you use nvm and create multiple user accounts it shouldn't be a problem [18:26] admc has joined the channel [18:26] firebalrog: you can specify which user to run things as in your init.d [18:26] TheJH: someone did millions of connections to a node server somewhere, right? does anyone have a link? [18:26] firebalrog: use nvm [18:26] mc: that's more or less what i was looking to do [18:26] fbartho has joined the channel [18:26] barberdt has joined the channel [18:26] jmar777 has joined the channel [18:26] gregpascale has joined the channel [18:27] brngardner has joined the channel [18:27] _rockbot_ has joined the channel [18:27] TheJH: ah, found it [18:27] firebalrog: my app that the init.d above is for is for a app that runs on the client so i just setup as root because the machines are stripped down debian kiosks with chromium [18:28] DonkeyHot: firebalrog: It's not already nodejs-about question, but problem hasn't gone. Firstly i can't kill node process even under root. Secondly, i can't install 'forever'. [18:28] dgathright has joined the channel [18:29] teadict: mm, Sequelize doesn't seem to have transactions, that's nto good... [18:29] brianloveswords has joined the channel [18:29] firebalrog: kill -9 pid [18:29] DonkeyHot: OS is Ubuntu, installed about an hout ago with no changes. Nodejs is installed from Chris Lea repository. [18:29] satyr has joined the channel [18:29] firebalrog: you may need to do sudo kill -9 pid [18:30] DonkeyHot: What is '-9" in this command& [18:30] DonkeyHot: ? [18:30] PhilK has joined the channel [18:30] DonkeyHot: I'm under root right now. [18:30] qbit_: http://sprunge.us/QYIE node-expat - U Y NO LINK ev_default_loop_ptr?!? [18:30] sarlalian has joined the channel [18:31] Lingerance: DonkeyHot: It's telling kill to send SIGKILL instead of SIGTERM [18:31] Lingerance: A process can catch SIGTERM and still run after, nothing can catch a SIGKILL though. [18:32] bnoordhuis: chuck norris could [18:32] firebalrog: chuck wouldn't even notice [18:32] DonkeyHot: :) [18:33] DonkeyHot: Node's processes was killed successfully. [18:34] DonkeyHot: How can i avoid this later? [18:34] DonkeyHot: I'm closing node's server by Ctrl+Z. Am i doing something wrong? [18:34] firebalrog: yes [18:34] firebalrog: ctl z is suspend to background [18:35] firebalrog: ctrl c is close [18:35] sand^ has joined the channel [18:35] firebalrog: after ctrlz you can do fg to run in foreground or bg to run process in background [18:36] firebalrog: for example start gedit from terminal terminal is now frozen but gui editor is focused press ctrl z in terminal and the editor is now frozen type bg and the editor will now work again and so will the terminal [18:36] firebalrog: start your node like this node app.js & [18:37] firebalrog: that will start the app as a background process to start with then when you want to stop it you will need to do a kill pid or pkill node [18:37] mightym: hey guys I'm new to node.js, and maybe I'm not getting the concept right. i have a couchdb running and this part of the script http://pastie.org/3167697 this method should create a new user in my db, afterwards create a initial message for the user in the db, and afterwards in the last cb return the created user so that i can use it in my session in express. but i don't get it how to solve the last part, where i need the new created user object. [18:37] DonkeyHot: Already tryed this with node-process. Thank you very much :) [18:37] mightym: now i just get the id of the last callback, which is wrong … do i have to pass through a object trough all callbacks or how would one solve this? thx in advance! [18:39] wink__ has joined the channel [18:40] ryanfitz has joined the channel [18:41] firebalrog: donkey I usually have a couple of terminals open and just run node app.js then when I need it reloaded I do ctrlc to stop it. there are also some tools that watch your app for changes and restart node on changes. [18:43] `3rdEden has joined the channel [18:45] wink_ has joined the channel [18:46] langworthy has joined the channel [18:47] DonkeyHot: firebalrog: While i'm just learning nodejs basics, i can launch scripts manually. Problem was with busy ports, but it was only my ignorance. Once more: thank you very much. [18:48] JmZ_ has joined the channel [18:48] kevinohara80 has joined the channel [18:49] jimmysparkle has joined the channel [18:50] joshfinnie has joined the channel [18:51] qbit_: anyone have any troubleshooting suggestions for node-expat not linking with libev correctly? : http://sprunge.us/QYIE [18:51] mehlah has joined the channel [18:52] kevinohara80: Does anyone know what would cause a package installed with npm to fail with this message - ERR! couldn't unpack /var/folders/Fy/FyWhCmQCGL0JiwsYISssKU+++TI/-Tmp-/npm-1326306867914/1326306867914-0.6828923975117505/tmp.tgz [18:52] qbit_: kevinohara80: try with a different tar [18:53] djbell has joined the channel [18:53] broofa_ has joined the channel [18:53] kevinohara80: qbit_: OK, will try that [18:54] CarterL has joined the channel [18:54] zhware has joined the channel [18:54] autarch has left the channel [18:54] jgaui has joined the channel [18:54] qbit_: kevinohara80: in your .npmrc put "tar = /path/to/diff/tar" [18:56] slloyd_air has joined the channel [18:56] ericmuyser has joined the channel [18:56] brianc1 has joined the channel [18:57] elijah has joined the channel [18:58] c_t_montgomery has joined the channel [18:59] robotmay has joined the channel [18:59] hz has joined the channel [18:59] slloyd_air has joined the channel [19:00] mightym: well thank you anyways! [19:01] firebalrog: what ver linux kevin? [19:01] firebalrog: permissions could also be an issue kevin [19:02] kevinohara80: mac os x [19:02] mikeal has joined the channel [19:02] kevinohara80: never had a problem with any other package [19:03] kevinohara80: 12 other packages install fine [19:03] npa has joined the channel [19:03] mark_azevedo has joined the channel [19:04] qbit_: kevinohara80: could be an issue with that package too [19:05] vguerra has joined the channel [19:06] kevinohara80: qbit_: I think it is. Any idea what could be wrong in the package that would cause this? [19:06] qbit_: nope :P [19:07] jgaui: is the new cluster api any different than me running multiple instances on different ports and load balancing? (besides the obvious maintenance headache) [19:08] pixel13 has joined the channel [19:08] pixel13 has left the channel [19:08] qbit_: kevinohara80: try different versions maybe? [19:09] qbit_: or straight from the repo: "npm install git://lablablab/bla.git" [19:09] deoxxa: does npm care about versions if you give it a git url? [19:10] `3rdEden has joined the channel [19:10] qbit_: don't think so [19:10] deoxxa: dang [19:10] deoxxa: that'd be neat [19:10] EyePulp: jgaui: which version of node's cluster? [19:10] qbit_: but once you have the git repo - i think you can jus do "git checkout v0.yermom" [19:10] markq: is there a way to hide redirects from the address bar? [19:11] deoxxa: yeah, but i'm thinking more for automated deployments [19:11] qbit_: mm [19:11] deoxxa: we've got some stuff at work that is currently being handled with git submodules [19:11] deoxxa: i'd rather it use semver [19:11] deoxxa: it's a pain to go through and update every single dependent project when an internal library is updated [19:11] qbit_: yeah [19:12] qbit_: i have been using npm link [19:12] qbit_: which is still a pain :P [19:12] deoxxa: yeah [19:12] deoxxa: not easily automated, either [19:12] patrickgamer has joined the channel [19:12] patrickgamer has left the channel [19:13] jgaui: EyePulp: 0.6 [19:13] adrianmg has joined the channel [19:13] mikeal has joined the channel [19:13] jgaui: I'm using ti's cluster lib on 0.4 now and I wonder if there's a good reason to update to 0.6 [19:14] Treffynnon has joined the channel [19:14] jgaui: tj* [19:14] insin has joined the channel [19:15] adrianmg has left the channel [19:15] kenperkins: does anyone run an app that has been invite only during private beta? [19:15] mnutt has joined the channel [19:17] qsobad has joined the channel [19:17] djazz has joined the channel [19:17] wink__ has joined the channel [19:17] djazz: Error: connect Unknown system errno 10060 [19:18] djazz: at errnoException (net.js:640:11) [19:18] djazz: at Object.afterConnect [as oncomplete] (net.js:631:18) [19:18] djazz: on 0.6.7 [19:18] djazz: 10060 looks like it cant connect to a server, seen that error in php [19:19] remysharp: is it possible for me to send a signal (like SIGINT) to a child process created using spawn? [19:19] djazz: full error: http://pastebin.com/2TrZKJc0 [19:19] remysharp: I'm listening for the exit event on the child, and my main process is catching the SIGINT, but I can't quite work out how to pass it along to the child spawned process [19:21] mnutt: remysharp: can't you just call childProcess.kill('SIGINT') ? [19:21] brryant has joined the channel [19:21] ccare_ has joined the channel [19:21] geoKe has joined the channel [19:21] remysharp: mnutt: yeah, that's what I tried, but it's killing the child and the child isn't receiving the signal [19:21] sgfgdf has joined the channel [19:21] remysharp: mnutt: hense being a bit confused :-\ [19:22] mnutt: remysharp: and the child process does the right thing if you manually send it a SIGINT? [19:22] sgfgdf: hello, guys! how can i see where are all default preinstalled modules that come with node.js? [19:22] remysharp: mnutt: yep - I've got an event listen that chucks on the console and exits [19:23] bnoordhuis: sgfgdf: in the api documentation? [19:23] jxson has joined the channel [19:24] EyePulp: jgaui: we were on 0.4.12 with ti's cluster, and I got concerned with our ability to upgrade and improve other modules while sticking on 0.4.12 - so I decided to swap out cluster and move up to 0.6.6 [19:24] djazz: help, someone? [19:24] EyePulp: ti's, that is [19:24] EyePulp: dang it - autocorrect keeps making "tj" into "ti" [19:24] arcanis has joined the channel [19:25] mnutt: remysharp: sorry, I don't know much more than that. I send kill("SIGQUIT") through and it works properly, I wonder why SIGINT would be special. [19:25] aaronmcadam has joined the channel [19:25] jgaui: hah [19:25] jgaui: EyePulp: did you see any performance boosts? [19:25] remysharp: mnutt: but you've had success with other signal - that's something I can test I guess. Maybe try other signals [19:25] remysharp: mnutt: might be something special... [19:26] mnutt: EyePulp: I'm working on the same thing, 0.6's cluster lacks a lot tj-cluster's nice features [19:26] bradleymeck has joined the channel [19:26] EyePulp: jgaui: I don't have metrics to verify, but yes, it does seem more responsive overall. [19:26] sgfgdf: bnoordhuis: do you mean this -- https://github.com/joyent/node/wiki/modules ? [19:27] shinuza has joined the channel [19:27] bnoordhuis: sgfgdf: no, this: http://nodejs.org/docs/latest/api/ [19:27] Fuu` has joined the channel [19:28] remysharp: mnutt: yeah, there's something peculiar about SIGINT - SIGQUIT carries through [19:28] mnutt: EyePulp: this is messy, but replicates most of what I need from tj-cluster: https://gist.github.com/1596313 (zero-downtime restarts don't quite work yet) [19:28] EyePulp: mnutt: Yeah, we let it do a bunch of things which can be handled separately. the plugins were nice. [19:28] EriksLV has joined the channel [19:29] maushu has joined the channel [19:29] AndreasMadsen: EyePulp, mnutt: Look at https://github.com/joyent/node/pull/2038 for inspiration it has a zero downtime restart method too. [19:29] sgfgdf: bnoordhuis: so the link i gave contains external modules, right? are they only to be installed from npm? [19:30] slaskis has joined the channel [19:30] bnoordhuis: sgfgdf: no, but installing with npm is usually easiest [19:31] _rockbot_: hiya! Can someone please explain to me why this code snippet (http://pastebin.com/KnwYnYQf) is allowed? (Is it allowed? I found it in the mongoose documentation) [19:31] zomg: _rockbot_: why would it not be allowed? [19:31] sgfgdf: bnoordhuis: but what modules are those that i linked? [19:32] tjfontaine: _rockbot_: method chaining [19:32] zomg: _rockbot_: well, besides the obvious part on line 5 [19:32] _rockbot_: zomg: I don't know - I'm new to node.js; it's not something I've ever seen before [19:32] zomg: It's just javascript [19:32] mnutt: AndreasMadsen: awesome, I can't wait until that stuff makes it into the next release [19:32] zomg: Nothing node-specific to it [19:32] _rockbot_: (i'm a python/c++ person) [19:32] tjfontaine: _rockbot_: http://en.wikipedia.org/wiki/Method_chaining#JavaScript [19:32] _rockbot_: ah, new to JS, too :-) [19:32] peregrine81 has joined the channel [19:32] zomg: Yeah it's basically just chaining methods, tjfontaine's link will prob explain it [19:33] AndreasMadsen: mnutt: perhaps not all will, but I will make module if not - I'm currently wanting on final review on setupMaster. [19:33] _rockbot_: ahhh, ok, thanks tjfontaine & zomg! [19:33] tjfontaine: _rockbot_: aside from the anonymous function thrown in at the end, there's nothing there that can't be done in python and C++ [19:33] socketio\test\99 has joined the channel [19:33] EyePulp: AndreasMadsen: you expect this to land in … 0.8 ? [19:34] AndreasMadsen: mnutt: you can always follow me on https://github.com/AndreasMadsen/ I don't do much else that cluster stuff :) [19:34] zomg: Doesn't python have lambdas? Sorta like that =) [19:34] _rockbot_: fair enough, but it's done differently :-) [19:34] mnutt: AndreasMadsen: does the zero-downtime restart reload the code, or just restart all of the child processes? how does that work? [19:34] tjfontaine: zomg: emphasis on the sorta [19:34] ccare__ has joined the channel [19:34] zomg: Yeah... :D [19:34] bnoordhuis: sgfgdf: a big list of modules that people have created over time [19:34] AndreasMadsen: EyePulp: Yes, a lot has already landed in v0.7 [19:35] _rockbot_: now, the snippet I had doesn't include commas between links in the chain, while the wikipedia version does - does it matter? [19:35] AndreasMadsen: mnutt: It start a new worker from the file, so yes it will reload the new code. [19:35] tjfontaine: _rockbot_: the . is the link [19:35] bnoordhuis: sgfgdf: it's to give people a quick means to look for a module [19:35] _rockbot_: ah, ok, so either have a . or a , ? [19:35] bnoordhuis: sgfgdf: search.npmjs.org is another option [19:35] tjfontaine: _rockbot_: ignore the fact that whitespace in python is a problem [19:35] sgfgdf: bnoordhuis: one more question. can i found in my file system where does the default modules remain? [19:36] _rockbot_: hey now, no need to hate on python here :-P [19:36] tjfontaine: _rockbot_: the point is that python and whitespace are an exception not generally the rule [19:36] _rockbot_: ah, ok [19:36] CarterL has joined the channel [19:37] EyePulp: AndreasMadsen: there's some really cool stuff in here: https://github.com/AndreasMadsen/node-1/blob/master/doc/api/cluster.markdown [19:37] mnutt: AndreasMadsen: perfect, just what I need. borrowing that for my app until it gets into master. [19:37] EyePulp: I look forward to the upgrade. [19:37] chrisvwebdev has joined the channel [19:38] hz has joined the channel [19:38] ioparadigm has joined the channel [19:39] hellp has joined the channel [19:39] AndreasMadsen: EyePulp: mnutt: Thanks I'm a hard working kid [19:40] EyePulp: heh [19:40] jgaui: EyePulp: other than cluster, any issues updating to 0.6? [19:41] AndreasMadsen: EyePulp: May I ask what company this is. [19:41] whitman has joined the channel [19:43] EyePulp: jguai: Nope - I unfroze my package.json modules to use "latest" and ran the npm upgrade to catch up to 0.6.6 versions of each module (if any existed). Then did all my testing. Everything worked. Then I re-froze things at their new versions, and away we went. [19:43] EyePulp: AndreasMadsen: My company? We're a small software shop in Illinois, USA [19:44] bingomanatee: Cheeseware? [19:44] bingomanatee: :D [19:44] sgfgdf: bnoordhuis: anyway, i found this require,paths, but it appears to be removed. the doc says to use node_modules dir. thanks for your help! [19:44] EyePulp: bingomanatee: most of the time. [19:44] CIA-101: node: 03Fedor Indutny 07v0.6 * r07701e7 10/ src/node_zlib.cc : zlib: C++ style fixes - http://git.io/mtfjJw [19:44] EyePulp: bingomanatee: It's a good day when it reaches that level. [19:45] AndreasMadsen: AndreasMadsen: Okay some big companys has asked about cluster stuff as well, so now I ask about it gently. [19:46] Neil has joined the channel [19:46] khrome has joined the channel [19:46] bingomanatee: cheese.on('hole', function(err, radius){ if (radius > 0.15) { /* mm */ cheese.type="swiss" }); [19:46] AndreasMadsen: EyePulp: Okay some big companys has asked about cluster stuff as well, so now I ask about it gently. [19:46] AndreasMadsen: I'm so smug that I write to my self :) [19:47] EyePulp: heh - We're 10 people, with 4 devs. Our size is small, but our code is mighty (mighty questionable). [19:48] bnoordhuis: sgfgdf: my pleasure. re: location of built-in modules, they're compiled into the node binary [19:48] raja has joined the channel [19:48] EyePulp: as a side note, is it just me, or is Amazon Prime about the coolest thing ever? [19:48] wink_ has joined the channel [19:48] tiglionabbit_ has joined the channel [19:49] hydrozen has joined the channel [19:49] aGHz has joined the channel [19:50] AndreasMadsen: EyePulp: Cool [19:50] josephmoniz has joined the channel [19:50] Fuu has joined the channel [19:52] chirag has joined the channel [19:52] chirag: Is this IRC channel used to get help with Node.js by chance? [19:52] AndreasMadsen: YES [19:52] dthompso99 has joined the channel [19:52] EyePulp: chi rag - mostly we share recipes for nachos. [19:53] mightym: hey guys I'm new to node.js, and maybe I'm not getting the concept right. i have a couchdb running and this part of the script http://pastie.org/3167697 this method should create a new user in my db, afterwards create a initial message for the user in the db, and afterwards in the last cb return the created user so that i can use it in my session in express. but i don't get it how to solve the last part, where i need the new created user object. [19:53] mightym: now i just get the id of the last callback, which is wrong … do i have to pass through a object trough all callbacks or how would one solve this? thx in advance! [19:53] chirag: any recs on help with node.js errors? stackoverflow? [19:53] rio{ has joined the channel [19:53] bnoordhuis: chirag: most people seem to visit the irc channel [19:54] EyePulp: chirag: post your error [19:54] chirag: node hello-console.js FATAL ERROR: v8::Debug::SetDebugMessageDispatchHandler Error initializing V8 [19:55] steveoh has joined the channel [19:55] liar has joined the channel [19:56] bnoordhuis: chirag: what node version? [19:56] bnoordhuis: `node -v` should tell you [19:57] chirag: node -v v0.6.6 [19:58] bnoordhuis: chirag: odd... what does hello-console.js look like? http://gist.github.com/ [19:58] mmalecki: bnoordhuis: I'm pretty sure it doesn't have that kind of UI [19:59] bnoordhuis: mmalecki: you do standup comedy too? i'll come watch [19:59] simfoo has joined the channel [20:00] mmalecki: bnoordhuis: I prefer to sit [20:00] simfoo has left the channel [20:00] mmalecki: *ba dum tsss* [20:00] rio{: I made a really simple example of a question [20:00] rio{: http://pastie.org/3168132 [20:00] rio{: what is best practice in this case [20:02] otakutomo has joined the channel [20:02] Lingerance: rio{: On line 6 in vim do: :s/data/this/ [20:03] rio{: thats the stream object [20:03] Lingerance: Line 12: s/handler/handler.bind(self)/ [20:04] rio{: I mean two solutions are, 1) use bind 2) Create the handler inside the scope of connect [20:04] rio{: neither I like really [20:04] astropirate has joined the channel [20:04] kevwil has joined the channel [20:04] brianloveswords has joined the channel [20:04] aandkjar has joined the channel [20:04] Lingerance: Well have fun not having a valid solution then. [20:04] rio{: So I was hoping someone could teach me a better way [20:04] Lingerance: Use .bind() [20:05] methodT has joined the channel [20:05] astropirate: I am the greetest! [20:05] torvalamo: greetiest of them all! [20:05] EyePulp: _.bind() ? [20:05] Lingerance: If you still want access to the stream: .bind(null, self) and handler = function(room, data) { [20:06] cyborg has joined the channel [20:06] jimmysparkle has left the channel [20:06] Lingerance: No, Function.prototype.bind() [20:07] napperjabber_ has joined the channel [20:07] josephmoniz: as long as the callback doesn't expect any args you can curry the Room context as the first arg [20:07] davetayls has joined the channel [20:08] Lingerance: Curry is what .bind(null, ...) does right? [20:08] djazz: yay i solved it! [20:08] djazz: forgot an error listener [20:08] djazz: :P [20:08] josephmoniz: Lingerance: unfortunately yes [20:09] josephmoniz: i can't stand how .bind has two very different major use cases though [20:09] isaacs has joined the channel [20:10] josephmoniz: bind should just be for context binding, partial function application should have been it's own function [20:10] josephmoniz: :( [20:11] rio{: But so the best practice is actually using bind() ? [20:11] Lingerance: Pretty much [20:11] josephmoniz: it's the native way [20:11] Lingerance: Anything else is just extra lines of code. [20:11] josephmoniz: i'd be hesitant to call it the best practice though [20:11] isaacs: EyePulp: why not just leave your dependencies flexible in package.json, and commit the stuff into git? [20:13] LeMike has joined the channel [20:13] EyePulp: isaacs - not sure I follow. I freeze them to keep them at versions I know are working, and… we use mercurial for dvcs… =) [20:13] isaacs: EyePulp: oh, then check into mercurial :) [20:14] isaacs: EyePulp: this is something you deploy to production, like an app or something? [20:14] josephmoniz: rio{: you could refactor it into an object factory [20:14] ljackson has joined the channel [20:14] EyePulp: isaacs: yessir. It's an app on a bunch of boxes behind a loadbalancer [20:14] isaacs: EyePulp: yeah, you should definitely be checking deps into source control then [20:14] isaacs: ACTION is about to give a talk on this... [20:14] cainus has joined the channel [20:15] EyePulp: isaacs: ah, you mean rather than installing via npm? [20:15] isaacs: EyePulp: well, use npm in development to update, test, etc etc [20:16] isaacs: EyePulp: but on your production machines, then you can just take a snapshot of what's in source control, and it's one step [20:16] isaacs: you might have to `npm rebuild` to build any binary deps [20:16] isaacs: so npm might have a place in the process. [20:16] HardPhuck has joined the channel [20:16] isaacs: but fetching from a registry (or even more than one git remote) at deploy time is super hazardous. [20:16] EyePulp: isaacs: I see - I was trying to avoid the bloat of storing all that stuff in my repo [20:16] isaacs: EyePulp: it's not much bloat, really [20:17] EyePulp: I can see your point. [20:17] crodas has joined the channel [20:17] isaacs: or rather, the trade-off between a few KLoC in source control vs randomly breaking builds is heavily tilted in one direction. [20:17] _dc has joined the channel [20:17] EyePulp: anyone know where the in the process object I'll find the command line args being passed in? [20:18] isaacs: EyePulp: process.argv [20:18] chadskid_ has joined the channel [20:18] EyePulp: ah -- cool [20:18] isaacs: EyePulp: the first is always process.execPath and the second is always require.main.filename [20:18] isaacs: so, the good stuff starts at process.argv[2] [20:18] stefpb has joined the channel [20:18] isaacs: but 0 and 1 are occasionally interesting. [20:18] martndemus has joined the channel [20:19] isaacs: also, stuff like --expose-gc is stripped off, if it's an arg that node responds to [20:19] isaacs: (or v8) [20:19] EyePulp: understood - I think I'm using your nopt(is that yours?) [20:19] mmalecki: isaacs: is this stuff accessible somewhere later? [20:21] satyr has joined the channel [20:21] deedubs: "jashkenas: for the record (although I'm sure you've heard already) Ryan has said that he wishes he hadn't gone with a pseudo CommonJS api for Node's requires, and that they worked more like script tags." [20:21] dubenstein has joined the channel [20:21] deedubs: is that true? [20:21] CIA-101: node: 03Fedor Indutny 07master * r07701e7 10/ src/node_zlib.cc : zlib: C++ style fixes - http://git.io/mtfjJw [20:21] CIA-101: node: 03Fedor Indutny 07master * r9e6957b 10/ (10 files in 4 dirs): [20:21] CIA-101: node: Merge branch 'v0.6' [20:21] CIA-101: node: Conflicts: [20:21] CIA-101: node: src/handle_wrap.cc [20:21] CIA-101: node: src/node_zlib.cc [20:21] CIA-101: node: src/process_wrap.cc - http://git.io/FJmlLA [20:21] deedubs: ryah: ^^ [20:21] Skaag has joined the channel [20:21] Brandon_R has joined the channel [20:21] Brandon_R: hey guys [20:22] Brandon_R: haven't been on lately [20:22] Brandon_R: what did i miss? [20:22] astropirate: not is no longer hip :( [20:22] astropirate: *node [20:22] wedtm has joined the channel [20:22] astropirate: HN has forsaken us [20:23] qbit_: ha [20:23] tauren_ has joined the channel [20:23] dschn has joined the channel [20:23] tauren_: i just installed node on my work osx system behind the Nike firewall. doing an npm install whatever fails. if I do a wifi tether to my cell phone, it works. [20:24] tauren_: but i can bring up https://registry.npmjs.org/whatever in my browser. isn't just port 80 and 443 used by npm? [20:24] tvw has joined the channel [20:24] qbit_: node:/usr/local/lib/node_modules/hook.io/node_modules/weak/build/Release/weakref.node: undefined symbol 'ev_default_loop_ptr' [20:24] qbit_: sonofa [20:25] qbit_: nm /usr/local/lib/node_modules/hook.io/node_modules/weak/build/Release/weakref.node | grep ev_default_loop_ptr U ev_default_loop_ptr [20:25] qbit_: h9 [20:26] qbit_: so - i think something is borked with libuv on openbsd [20:26] qbit_: or something [20:26] wink_ has joined the channel [20:27] jj0hns0n has joined the channel [20:27] torvalamo: if node is no longer hip that just means it's mature enough to take seriously [20:27] qbit_: every compiled module I try to load bombs out with ev_default_loop_ptr being an undefined symbol [20:28] astropirate: torvalamo: nay sir, it means it is to be abandoned with the other great faliars like JSP and RoR every one back to PHP! [20:28] isaacs: tauren_: you may need to set a proxy or something? i duinno. [20:28] isaacs: EyePulp: yes, nopt is mine. [20:28] torvalamo: astropirate, you are right, let us all go back to 2004, promptly [20:29] josh-k has joined the channel [20:29] astropirate: I made a time machine with node.. but unfortunately can't use it for obvious reasons :( [20:30] ovnicraft has joined the channel [20:30] tauren_: isaacs: thanks, i found the NPM docs. didn't have to do this at home, so missed it before. [20:31] xtianw has joined the channel [20:32] harthur has joined the channel [20:32] khrome has joined the channel [20:33] monokrom_ has joined the channel [20:33] mikeal has joined the channel [20:33] cjm has joined the channel [20:35] subhaze has joined the channel [20:35] JesusRosso has joined the channel [20:35] churp has joined the channel [20:35] mwahab has joined the channel [20:37] crodas has joined the channel [20:38] tauren_: isaacs: yep, just needed to set HTTP_PROXY and HTTPS_PROXY. thanks! [20:38] ccare has joined the channel [20:39] fermion has joined the channel [20:39] sebastianedwards has joined the channel [20:40] dwhittle has joined the channel [20:40] bnoordhuis: qbit_: what does `node -v` say? [20:40] qbit_: v0.6.7 [20:41] bnoordhuis: we probably turned on -fvisibility=hidden [20:41] hz has joined the channel [20:41] qbit_: bnoordhuis: not sure what that is [20:41] larsschenk has joined the channel [20:42] qbit_: ah - the v8 setting [20:42] bnoordhuis: and not just v8 [20:42] qbit_: 'visibility%': 'hidden', # V8's visibility setting [20:42] qbit_: yep [20:43] qbit_: so that would prevent things from linking correctly? [20:43] brianloveswords has joined the channel [20:43] adrianmg has joined the channel [20:43] bnoordhuis: yes - only i don't remember us turning that on... [20:43] adrianmg has left the channel [20:43] qbit_: heh [20:44] zomg: My app collects some statistics and stuff which would need some aggregation and cleanup of old items, would you recommend running a separate node process for this purpose of having a setInterval or something? [20:44] geekbri has joined the channel [20:45] astropirate: zomg: either will do [20:45] bnoordhuis: qbit_: it wfm on linux btw [20:45] carlyle has joined the channel [20:45] geekbri: Is there an official PPA for node.js? [20:45] qbit_: bnoordhuis: me too :P [20:45] zomg: astropirate: yeah will probably keep it in the same process since it's easier to manage. Just thought perhaps someone smarter than me has some opinions on it =) [20:45] bnoordhuis: geekbri: official? no [20:46] pizthewiz has joined the channel [20:46] kickingvegas has joined the channel [20:46] qbit_: bnoordhuis: should I just remove that line? or set it to something else? [20:46] qbit_: ( for testingh ) [20:46] colinclark has joined the channel [20:47] qbit_: seems like "default" is a real option [20:47] brianloveswords has joined the channel [20:47] bnoordhuis: qbit_: how are you compiling? `./configure && make`? [20:47] amasad has joined the channel [20:47] geekbri: bnoordhuis: ok how about.... unofficial but totally awesome and up to date :) [20:47] jldbasa has joined the channel [20:47] qbit_: bnoordhuis: basically.. it's from openbsd's ports [20:48] bnoordhuis: geekbri: chris lea puts out ppas from time to time [20:48] geekbri: bnoordhuis: ah ok thanks, i suppose i can just build by hand :) [20:48] bnoordhuis: qbit_: maybe try compiling from joyent/node (git checkout v0.6.7 first) [20:48] qbit_: yeah .. same issue [20:49] qbit_: the port is downloading the tarball straight from nodejs.org [20:49] thejefflarson has joined the channel [20:49] bnoordhuis: does it apply patches? [20:49] qbit_: yeah - but non that set that [20:49] qbit_: ACTION is the maintainer of said port [20:50] bnoordhuis: ah :) [20:50] joshsmith: if someone could offer some help on this, I'd be most appreciative: http://stackoverflow.com/questions/8826371/module-exports-function-undefined-when-passing-in-a-variable [20:50] bnoordhuis: hmm, maybe add -fvisibility=default to the wscript? [20:50] tjfontaine: I don't know ports, but visibility is one of those cflags that seem like they would be inherited from an obsd policy [20:52] tjfontaine: for instance http://code.google.com/p/v8/issues/detail?id=889 [20:52] adambeynon has joined the channel [20:52] booyaa: greets [20:52] fantastikibne has joined the channel [20:52] qbit_: tjfontaine: yeah.. I am verifying that now [20:53] pors has joined the channel [20:53] fantastikibne: does freenode keep logs [20:53] qbit_: heh [20:54] booyaa: no not really [20:54] tjfontaine: not if they know what's best for them [20:54] booyaa: fantastikibne: but debuggable.com may have the logs for this help [20:54] qbit_: but you can bet people in the channel are logging :P [20:54] booyaa: fantastikibne: http://nodejs.debuggable.com/ [20:54] bnoordhuis: fantastikibne: http://nodejs.debuggable.com/ [20:54] fantastikibne: i was pasted a pastebin.com [20:54] bnoordhuis: damn! [20:54] booyaa: <--- won [20:54] fantastikibne: link i search for it [20:54] booyaa: hahaha [20:55] mandric has joined the channel [20:55] booyaa: bnoordhuis: well your commit-fu on nodejs kinda eclipses me anyhoo [20:55] bnoordhuis: thanks, that's at least some consolation [20:55] qbit_: commit-fu - i like it [20:55] level09 has joined the channel [20:55] booyaa: anyone else on geekli.st? [20:55] booyaa: look for peeps to follow [20:55] Poetro has joined the channel [20:55] booyaa: qbit_: you've seeen the high score table right? [20:56] fantastikibne: http://pastebin.com/raw.php?i=fWkJNzMZ oh yeah [20:56] sharkbird has joined the channel [20:56] qbit_: don't think so [20:56] qbit_: i hav efor npm stuff [20:57] franciscallo has joined the channel [20:57] booyaa: qbit_: http://github-high-scores.heroku.com/joyent/node/high_scores/ [20:58] qbit_: nice [20:58] qbit_: that is an awesome font [20:58] booyaa: <3 github high scores [20:58] purr: Let it be known that booyaa hearts github high scores. [20:58] booyaa: arf [20:59] mAritz has joined the channel [20:59] booyaa: .. eval('var woot=\'woot\'; console.log(woot)') [20:59] catb0t: Exception: ReferenceError: console is not defined [21:00] otakutomo has joined the channel [21:00] booyaa: ;) [21:00] CoverSlide: .. eval('var woot=\'woot\'; print(woot)') [21:00] catb0t: "woot" [21:00] Poetro has joined the channel [21:00] CoverSlide: .. console = {log: print} [21:00] catb0t: { log:[Function: print] } [21:00] CoverSlide: .. eval('var woot=\'woot\'; console.log(woot)') [21:00] catb0t: "woot" [21:01] booyaa: CoverSlide: is it your bot? [21:01] CoverSlide: .. 'use strict' [21:01] catb0t: "use strict" [21:01] CoverSlide: nope [21:01] eignerchris_ has joined the channel [21:01] Margle has joined the channel [21:01] CoverSlide: .. v = 10 [21:01] catb0t: 10 [21:01] CoverSlide: .. ''use strict'v = 10 [21:01] catb0t: Exception: SyntaxError: Unexpected identifier [21:01] CoverSlide: .. ''use strict';v = 10 [21:01] catb0t: Exception: SyntaxError: Unexpected identifier [21:01] CoverSlide: .. 'use strict';v = 10 [21:01] catb0t: 10 [21:02] booyaa: CoverSlide: ah, wanted to know if someone saves the variable state [21:02] CoverSlide: apparently it does [21:02] willwhite has joined the channel [21:03] fantastikibne: http://zgadzaj.com/benchmarking-nodejs-basic-performance-tests-against-apache-php [21:03] cangeceiro_ has joined the channel [21:03] amasad_ has joined the channel [21:04] Roon has left the channel [21:06] ben_alman: is there any way to disable the automatic setting of the "_" variable in the REPL? [21:06] ben_alman: it's wreaking havok with async code that uses underscore [21:06] CoverSlide: what sets _ ? [21:06] warz: undefined for me [21:06] ben_alman: CoverSlide: http://nodejs.org/docs/v0.3.1/api/repl.html#rEPL_Features [21:07] ben_alman: result of the last expression [21:07] ben_alman: wish it was $_ [21:07] warz: ah, i see. [21:07] ben_alman: to be more like every other language i've ever used :P [21:07] ben_alman: and to not conflict ith _ [21:07] ben_alman: :/ [21:07] fantastikibne: i need date tools for check my script how much time takes? [21:07] CoverSlide: except node doesn't have sigils [21:07] djazz has left the channel [21:07] fantastikibne: any example sources? [21:07] warz: i just think its dumb that libs choose to use symbols, like underscore and $ [21:07] larsschenk has left the channel [21:08] CoverSlide: so technicall,y in perl, the variable would really be _ [21:08] ben_alman: CoverSlide: $ is a valid named identifier character [21:08] ben_alman: so $_ would work just fine [21:08] ben_alman: at least, it would be nice if there was an option [21:09] chilts: heh, $_ looks like Perl :) [21:09] astropirate: I wouldn't but if the lib requires you to keep using its name often it is handy. If you write apps on jquery its annoying to write jQuery('FOOO') everywhere as apposed to $('FOOO') [21:09] astropirate: chilts: or php server vars :( [21:09] chilts: ah true, though I'm less versed with PHP :) [21:11] saesh has joined the channel [21:11] CoverSlide: but you can always do this: (function($){$("blah")}(jQuery)) [21:11] Poetro has joined the channel [21:12] ben_alman: yeah in this case i happen to be setting a global _ for convenience across multiple files [21:12] ben_alman: too keep people from having to constantly require it [21:12] ben_alman: guess i can't do that :P [21:12] ben_alman: i'll just call it "underscore" then [21:12] mAritz has joined the channel [21:12] martndemus has joined the channel [21:13] CoverSlide: (function(_){_(whatever)}(underscore)) [21:13] CoverSlide: yay! [21:13] CoverSlide: gg ben [21:13] localhost has joined the channel [21:13] igl has joined the channel [21:13] ben_alman: again, this is a global, intentionally [21:13] CoverSlide: btw bbq rox [21:13] fffffat has joined the channel [21:13] ben_alman: thanks [21:13] lipek3 has joined the channel [21:14] fffffat has left the channel [21:16] michaelhartau has joined the channel [21:16] spleeze has joined the channel [21:16] EyePulp: bbq? [21:16] EyePulp: ACTION looks at the chips he's eating [21:17] mara has left the channel [21:17] qbit_: hm.. -fvisibility=default doesn't seem to help [21:17] CoverSlide: EyePulp: http://benalman.com/projects/jquery-bbq-plugin/ [21:18] Cromulent has joined the channel [21:19] qbit_: ohlol the wscript has visibility=default [21:19] EyePulp: ACTION is enjoying the narratives regarding bbq's use. [21:19] ben_alman: heh [21:19] CIA-101: node: 03Fedor Indutny 07master * r71ae175 10/ (3 files in 3 dirs): [21:19] CIA-101: node: zlib: reset() method for deflate/inflate streams [21:19] CIA-101: node: * ammended test-zlib-dictionary to cover reusing streams - http://git.io/NRBwnQ [21:19] CIA-101: node: 03Fedor Indutny 07master * r89556f5 10/ src/node_zlib.cc : zlib: C++ style fixes for dictionary - http://git.io/Pef9Xw [21:20] qbit_: well crap [21:20] booyaa: i approve of that plugin's name [21:20] booyaa: ben_alman++ # bbq [21:20] donahue has left the channel [21:20] nicholasf has joined the channel [21:21] ccare has joined the channel [21:21] wink_ has joined the channel [21:21] jklabo has joined the channel [21:22] level09 has joined the channel [21:24] mandric has joined the channel [21:26] LeMike has joined the channel [21:26] mateodelnorte has joined the channel [21:28] mwahab has joined the channel [21:28] wink_ has joined the channel [21:28] errordeveloper has joined the channel [21:29] devinus has joined the channel [21:30] devinus: is everybody using nvm, nave, or n these days? [21:30] cyborg: nvm personally [21:31] booyaa: nvm [21:31] devinus: unsure how to even use n if you dont already have npm [21:31] devinus: kind of sucks that i can't do nvm install latest [21:31] skm has joined the channel [21:32] EyePulp: nave! [21:33] CoverSlide: nave has lastest [21:33] EyePulp: though I don't have a reason [21:33] CoverSlide: n seems to want to install in /usr/local or something, haven't tried it but once [21:33] CoverSlide: nvm i don't like having to source it every time [21:34] CoverSlide: personally I have a ~/bin/node symlink that points to whichever version I want to use [21:34] joestein has joined the channel [21:34] fantastikibne: hi as example [21:35] fantastikibne: console.log('Su kadar surdu %d',(new Date().getTime()/1000)-baslama); %d i float whats integer and other data types? [21:35] booyaa: %j for json? [21:35] booyaa: gah can't remember [21:35] fantastikibne: i want to learn how much secs passed [21:36] fantastikibne: while running script [21:36] fantastikibne: var start=new Date().getTime() / 1000; ... codes .. console.log('got that much %d',(new Date().getTime()/1000)-start); [21:37] fantastikibne: %d shows float so whats the integer [21:39] joshwines has joined the channel [21:40] sharkbird has joined the channel [21:41] cognominal has joined the channel [21:41] fantastikibne: how can i convert a float data to int? [21:42] ryanrolds_w: fantastikibne: I assume you're wanting to round it. [21:43] errordeveloper has joined the channel [21:43] velts has joined the channel [21:43] sdwrage has joined the channel [21:43] ryanrolds_w: fantastikibne: Math.floor or Math.ceil should work. [21:43] stonebranch has joined the channel [21:43] velts: i am having issues installing node.js [21:43] richardr has joined the channel [21:43] velts: i have tried doing to the make way and i got one error, tried with a package manager and got another erorr [21:43] ryanrolds_w: fantastikibne: Oh and Math.round() [21:44] ryanrolds_w: velts: What were the errors? [21:44] velts: http://pastebin.com/JVuNtj0v <-- error from make [21:45] velts: http://pastebin.com/JspGZwJW <-- error from PM [21:45] piscisaureus_ has joined the channel [21:46] mikeal has joined the channel [21:46] velts: i followed both instruction from the wiki on github [21:46] ryanrolds_w: velts: What distro? [21:46] ger^kallisti has joined the channel [21:47] Sorella has joined the channel [21:47] velts: CentOS release 6.1 (Final) [21:48] jetienne_ has joined the channel [21:50] fantastikibne: how can i [21:50] ryanrolds_w: If I remember correctly that message means you need libz [21:50] fantastikibne: how can i execute func on script is finished need to exit? [21:51] qbit_: bnoordhuis: -fvisibility=default doesn't seemto help [21:52] ryanrolds_w: velts: Try installing zlib-devel [21:52] velts: ahh [21:52] velts: i have zlib, but not zlib-devel [21:53] ryanrolds_w: :) [21:53] velts: bam! [21:53] velts: worked [21:53] velts: thanks [21:53] jamesbathgate has joined the channel [21:53] fantastikibne: process.on('exit', onExit); ok works [21:53] ryanrolds_w: np. [21:53] mandric has joined the channel [21:54] joshgillies has joined the channel [21:55] dwhittle has joined the channel [21:55] wink_ has joined the channel [21:56] evanpage has joined the channel [21:56] secoif has joined the channel [21:56] dob_ has joined the channel [21:56] secoif has joined the channel [21:57] secoif has joined the channel [21:58] secoif has joined the channel [21:58] evanpage: is there away to get the hostname of hte server a script is executing on? The DNS API doesn't appear to support it. [21:58] secoif has joined the channel [21:59] ryanrolds_w: evanpage: http://nodejs.org/docs/latest/api/all.html#os.hostname [21:59] secoif has joined the channel [21:59] aandkjar has left the channel [21:59] evanpage: ty. [21:59] ryanrolds_w: That will get you the hostname, are you looking for the FQDN? [21:59] mikeal has joined the channel [22:00] secoif has joined the channel [22:00] kevwil has joined the channel [22:02] jocafa: popcorn jellybellys are foul. [22:02] jocafa: that is all. [22:02] fantastikibne: whats different betweent http.get - http.request [22:02] NothingMan65 has joined the channel [22:03] NothingMan65: Hey y'all, g'evenin'. [22:03] secoif: fantastikibne .get is a helper for .request [22:03] CrabDude has joined the channel [22:03] stride: fantastikibne: as the docs say, get is request + end [22:03] secoif: .request you can do post/get/delete/ etc [22:03] evanpage: ryanrolds_w: no, just the hostname, thanks! [22:03] NothingMan65: I was wonderin'. What's the best way run/interface with a subprocess via node.js? [22:03] secoif: fantastikibne http://nodejs.org/docs/latest/api/all.html#http.get [22:03] Vince_ has joined the channel [22:04] liar has joined the channel [22:05] stride: nothingman65: personally I like dnode and the built-in messaging http://nodejs.org/docs/latest/api/child_processes.html#child_process.fork [22:05] adambeynon has joined the channel [22:05] dob_: Do you know any project / taskmanagement software written in node? [22:05] stride: (the latter only works when your child process is also a node script) [22:05] NothingMan65: Lovely stride, suits me great! [22:05] NothingMan65: I'll check out dnode. [22:06] Vince_: Hi! I'm quite new to node.js and I'd like to write a chat app. I think node can be a good choice, but what should I choose as backend database? I know SQL (mysql, etc) and read a bit about noSQL... is Mango or Couch databases a better choice? Why? [22:06] fantastikibne: is there any way to dont wait to response for make faster requests? [22:06] EyePulp: Vince_: any of those will work. we use mongodb and redis. [22:06] Vince_: thx eyepulp. Why 2 databases? [22:07] secoif: Vince_ think of redis a bit like you'd think of memcached [22:07] davidwalsh has joined the channel [22:07] eee_c has joined the channel [22:07] stride: fantastikibne: http.get/http.request are async, you don't really wait for anything there. you could close the connection as soon as data arrives but some servers might hate you for doing that [22:07] EyePulp: Vince_: we use redis for session data and mongo for longer term more structured storage. [22:07] agnat_ has joined the channel [22:07] Vince_: Unfortunately I don't know memcached. Is it about sharing info between several instances of node? [22:08] Carmivore has joined the channel [22:08] jesusabdullah: memcached is an in-memory caching layer [22:08] astropirate: memcached is soooo yesterday [22:08] secoif: Vince_ you can use redis as a kind of smart caching layer [22:08] EyePulp: Vince_: it can be used like that. the point being there are a lot of DB options. redis is nice because it's in-memory and very fast for reads [22:08] jesusabdullah: right, memcachedb is obvs where it's at [22:09] secoif: fantastikibne what do you mean don't wait for a response to make faster requests? [22:09] urlisse has joined the channel [22:09] secoif: fantastikibne just start a new request, and don't wait for the response :/ [22:09] jerrysv: Vince_: http://pragprog.com/book/rwdata/seven-databases-in-seven-weeks might be a good resource [22:10] Vince_: so mongo would be used for logging, whereas redis would store latest posts from every client? [22:10] sebastia_ has joined the channel [22:10] colinclark has joined the channel [22:11] fantastikibne: for(i=0;i gist sharded filesystem [22:49] jesusabdullah: the cd said, "fuck you microsoft" [22:49] NothingMan65: I use lynx for my desk tests [22:49] markq: hahaha [22:49] firebalrog: Chuck Noris desn't need an editor the code writes itself [22:49] wi43 has joined the channel [22:49] NothingMan65: The paperclip actually helps with my css. [22:50] cha0s has joined the channel [22:50] cha0s has joined the channel [22:50] firebalrog: yah clippy knows where to div [22:50] panterax has joined the channel [22:50] NothingMan65: What's a div? [22:50] markq: :O [22:50] warz: im writing my first module that i intend to be reused, and hopefully it can help others too, but when im writing async functions, i notice the common callback params are usually something like (error, result). [22:50] firebalrog: 6 div 3 = 2 [22:50] NothingMan65: Ah! Thanks FIQ [22:50] warz: whats the common way for specifying an error return? [22:50] sechrist: what's a what? [22:50] NothingMan65: Whoops, firebalrog [22:51] tbranyen: warz: i usually send back a message [22:51] warz: callback(new Error('some error'), undefined) ? [22:51] stride: warz: yep [22:51] NothingMan65: I think node should change the standard name for "callback" to "beeper" [22:51] firebalrog: my code knows better than to call back Chuck N. [22:52] NothingMan65: Okay though, seriously, who had a beeper when they were a kid? [22:52] cballou has joined the channel [22:52] markq: hwo many people listen to music while coding? [22:52] NothingMan65: Spotify ftw? [22:52] warz: i usually cant listen to music. i just get distracted. [22:52] NothingMan65: No lyrics [22:53] Carmivore has joined the channel [22:53] markq: yea no lyrics for sure but most of the time i can't listen to anything... [22:53] markq: inception soundtrack in the background lol [22:54] panterax has joined the channel [22:54] NothingMan65: Deadmau5, Skrillex, Pendelum, Calvin Harris for lots of actual coding [22:54] EyePulp: BWAAAAH [22:54] EyePulp: ! [22:54] zomg: WUBWUBWUBWUB [22:54] stagas: markq: http://radioplz.com/deep-mix-moscow all day long [22:54] sechrist: every time somebody mentions beepers [22:54] sechrist: I think of Hey Arnold [22:54] NothingMan65: Maybe more Explosions in the Sky, Brian Eno, NIN for when "developing" [22:55] NothingMan65: Omg Hey Arnold!! [22:55] otakutomo has joined the channel [22:55] NothingMan65: You're in your mid 20s sechrist [22:55] stride: markq: inception soundtrack? doesn't that make you code backwards and leave out all closing brackets? [22:55] sechrist: that's an interesting AI trick, determining age based on popular age-specific pop culture references [22:56] monokrome has joined the channel [22:56] severla has joined the channel [22:56] NothingMan65: Nice segue [22:57] ste99162 has joined the channel [22:58] ste99162: hi [22:58] NothingMan65: Hi [22:58] ste99162: how are you? [22:58] NothingMan65: Well, and you? [22:58] ste99162: how i get the list ? [22:58] ste99162: good [22:58] NothingMan65: I usually get it carefully. [22:58] _dc has joined the channel [22:58] ste99162: i get? [22:58] ste99162: !list [22:58] ste99162: ?? [22:59] NothingMan65: I'm sorry ste99162, could you be a bit more specific? [22:59] markq: lol is this written in node [22:59] fantastikibne: http://pastebin.com/FGciB1r9 it just writes 10.txt [23:00] mAritz has joined the channel [23:00] NothingMan65: Gotta start somewhere? fantastikibne [23:00] ste99162: !movies [23:00] Nathan has joined the channel [23:01] fantastikibne: nothingmang65 i couldnt understand :( [23:01] NothingMan65: ste99162, which list are you looking for sir/madam? [23:01] stride: fantastikibne: http://pastebin.com/0HghHPyg [23:02] allanca has joined the channel [23:03] Carmivore has joined the channel [23:03] fantastikibne: stride: yours worked but i couldnt understand what was wrong at mine [23:03] lwille: fantastikibne, stride is right - you have to use the value of i before opening another closure. read more at http://www.javascriptkata.com/2007/04/11/a-common-problem-with-the-powerful-javascript-closures [23:04] Carmivore has joined the channel [23:04] allanca has left the channel [23:04] jldbasa has joined the channel [23:04] allanca has joined the channel [23:05] lwille: anyone here interested in a libgphoto2 wrapper for node.js? Still far away from complete, full of memory leaks (this is my first v8 project), but you can capture photos and get previews ... just great for web-based controlling of a camera. https://github.com/lwille/node-gphoto2 [23:06] NothingMan65: I would bind hack that :P [23:07] fantastikibne: is there any way to write to existing end of file [23:08] NothingMan65: Try this fantastikibne, http://pastebin.com/aAdZixXX [23:08] NothingMan65: Might be ugly as heeellll but could do what you want [23:08] NothingMan65: Forces the copy instead of using a ref [23:08] tjfontaine: fantastikibne: you want to APPEND which means opening the file with the 'a' flag [23:08] lzskiss has joined the channel [23:09] fantastikibne: sorry i ask many questions this is my first script i know php & js just want to give a try to nodejs [23:09] kitt has joined the channel [23:09] kitt has joined the channel [23:09] NothingMan65: fantastikibne, this is what I meant http://pastebin.com/v9VpqzRd [23:11] springmeyer_ has joined the channel [23:11] lwille: what about using https://github.com/caolan/async ? [23:11] Poetro has joined the channel [23:11] lwille: (async.forEach) [23:11] Vespakoen has joined the channel [23:12] fantastikibne: NothingMan65: it works already but i want to write to end of existing file [23:12] slloyd_air has joined the channel [23:12] lwille: fantastikibne, use fs.open with mode="a" http://nodejs.org/docs/latest/api/fs.html#fs.open [23:13] lwille: sry, flags="a" :) [23:13] errordev1loper has joined the channel [23:13] tjfontaine: sounds quite similar to what I just said [23:13] qbit_: bnoordhuis: so.. I don't get the linking error on i386.. just amd64.. /me dies a little inside [23:13] lwille: uh, sry tjfontaine [23:14] tjfontaine: lwille: not a slight so much against you per se [23:14] DTrejo has joined the channel [23:14] dubenstein has joined the channel [23:16] cognominal has joined the channel [23:18] jjido has joined the channel [23:18] fantastikibne: fs.writeFileSync('data.txt',d,{ flags: 'a' }); doesnt works [23:19] aGHz has joined the channel [23:19] markschaake has joined the channel [23:19] Vespakoen: Hey noders! I am playing with this thought in my head for quite a while now, and i think i know enough about this "idea" to check out what you guys think of it. [23:19] Vespakoen: The best way i can describe it at the moment is: a single-page website, that loads "partials" via ajax (or a socket), when changing a page, i am going to "add", "move" or "remove" some "partials". [23:19] Vespakoen: Now, when changing to another page, the "framework" should "know" what elements it's going to need, loads the ones it doesnt have and "moves" or "removes" others that it doesn't need anymore. [23:19] Vespakoen: Another cool feature would be, since we can also "build" this page on the serversize (jsdom or domjs, not sure wich one it was) we can also render the page server-side for example for mobile & google (bot / SEO) [23:20] Vespakoen: oh, changing pages would go this way, since i know whats being added, moved or removed, i can "rollback" to the "previous / initial" state, and then preform actions that make my "new" page [23:21] Vespakoen: what do you guys think about it ? [23:21] torm3nt has joined the channel [23:21] localhost has joined the channel [23:22] wink_ has joined the channel [23:22] jacobolus has joined the channel [23:23] chrisvwebdev has left the channel [23:24] tomlion has joined the channel [23:24] nicholasf has joined the channel [23:25] takeout has joined the channel [23:25] cognominal has joined the channel [23:26] bnoordhuis: qbit_: hrm. does the output of `nm /path/to/node | grep ev_default_loop_ptr` look very different for the i386 and the amd64 binaries? [23:26] qbit_: bnoordhuis: nope - exactly the same [23:26] qbit_: ohwait [23:26] qbit_: ha [23:26] qbit_: yes - very different [23:27] bnoordhuis: U for amd64, T for i386? [23:27] lwille: fantastikibne, writeFileSync doesn't take any options. try this: http://pastie.org/3169248 [23:27] HardPhu has left the channel [23:27] fantastikibne: lwille ty [23:27] Vespakoen: Oh, and does anybody know if something similar to what i describe already exists? i am still hoping for some feedback too =D [23:28] qbit_: was U for amd64.. but now it's snowing B for ev_default_loop_ptr [23:28] mateodelnorte has joined the channel [23:28] qbit_: but i get the undefined symbol still [23:28] bnoordhuis: qbit_: B as in bss? [23:29] qbit_: correct [23:29] qbit_: 00ca7b20 B ev_default_loop_ptr [23:29] qbit_: was U ev_default_loop_pt [23:29] qbit_: before [23:29] fantastikibne: fs.writeSync(fd, "data", -1); lwille is -1 required? [23:29] dubenstein has joined the channel [23:30] lwille: fantastikibne: well, I just tried it that way - if you specify 0, the beginning of the file would be overwritten [23:30] bnoordhuis: qbit_: what do you see when you grep for default_loop_struct? [23:30] geoffeg has left the channel [23:30] peregrine81 has joined the channel [23:30] qbit_: 0067ccc0 T ev_default_loop [23:30] isaacs has joined the channel [23:31] qbit_: T on i386 as well [23:31] Poetro has joined the channel [23:32] bnoordhuis: qbit_: i think you're building one binary with EV_MULTIPLICITY=0 and the other without [23:33] bnoordhuis: is that possible / plausible? [23:33] mightym: hey guys, I'm new to node.js and wonder what is a common way to deploy node.js. i just have experience with php or python applications where i just would create a virtual server on apache and root my domain xyz.com to my docs using mod_phpoder mod_wsgi [23:33] qbit_: hm.. i will check .. there isnt' a place where i said "EV_MULTIPLICITY=0" [23:34] jjido has joined the channel [23:34] mightym: do i need some kind of proxy rooting to the ip of the node server? [23:34] fantastikibne: lwille whats wrong at me http://pastebin.com/c2KMdaD1 [23:35] DTrejo: mightym: you could just run plain node bound to port 80 [23:35] DTrejo: or you can have it behind nginx [23:35] yozgrahame has joined the channel [23:35] piscisaureus__ has joined the channel [23:35] bicranial has joined the channel [23:36] DTrejo: mightym: I recommend googling around, there's a bunch of different options, which if I can tell you more about if you have questions, I'm most familiar with only node, and no nginx [23:37] eignerchris has joined the channel [23:37] mightym: but using port 80 i still have to catch the domain and root it to that port right? [23:38] gr-eg has joined the channel [23:39] mdel__ has joined the channel [23:39] wink__ has joined the channel [23:39] shinuza: mightym: unlike python, node doesn't have a gateway interface [23:40] al3xnull has joined the channel [23:40] Vespakoen: if you run it on port 80, all requests will go to your node process [23:40] firebalrog: see this article mightym: http://www.freshblurbs.com/install-node-js-and-express-js-nginx-debian-lenny [23:40] mikeal has joined the channel [23:40] Vespakoen: if i am correct [23:40] Vespakoen: actually, i might not be, never tested it [23:41] mightym: firebalrog: ill check, thx a lot [23:41] iammerrick has joined the channel [23:42] firebalrog: np ;) [23:42] mightym: Vespakoen: yes, but i might collide with apache it think [23:42] mike5w3c has joined the channel [23:42] Vespakoen: thats true, so if your server is node-only it would be fine [23:42] mightym: i have several projects hosted on my server [23:42] Vespakoen: if you need more node apps or node & other apps on 1 server you need nginx [23:42] TheFuzzball_ has joined the channel [23:43] Vespakoen: or at least, i suggest using nginx =P [23:43] TheFuzzball_ has left the channel [23:43] DTrejo: mightym: Vespakoen or you can use node-http-proxy, or something like that [23:43] DTrejo: or bouncy [23:43] DTrejo: npm docs http-proxy, npm docs bouncy [23:43] Vespakoen: haproxy [23:43] Vespakoen: have fun checking them out =P [23:43] DTrejo: Vespakoen: does it handle websockets? [23:43] DTrejo: something to keep in mind [23:43] Vespakoen: i am not sure [23:44] DTrejo: if using websockets, not all proxies work with them [23:44] mightym: Vespakoen: k, thx for that info, but i was a little irrupted cause i read apache or nginx mighty produce overhead which collides with the origin sense of node.js [23:44] lzskiss has joined the channel [23:44] CoverSlide: bouncy uses raw sockets, http-proxy forwards a new http request [23:44] Vespakoen: haproxy works with websockets [23:44] mightym: irrupted … irritated [23:45] Vertice has joined the channel [23:45] firebalrog: actually the nginx will server static files better than node [23:45] Vespakoen: hmmz not sure about that, i know that nginx works very fast though, cant you dedicate another server to act as a proxyserver ? [23:46] colinclark has joined the channel [23:46] Vespakoen: or a VM ? [23:46] mightym: Vespakoen: or maybe i use a small amazon was ec2 instance [23:47] mightym: aws not was :) [23:47] firebalrog: your node is single threaded and will have to open those files to serve them. nginx has cacheing and is multi threaded so it should in all likely hood handle the static files better. [23:47] firebalrog: you can also use heroku [23:47] Poetro has joined the channel [23:47] firebalrog: or azule [23:47] Vespakoen: heroku is nice to have indeed! [23:47] Vespakoen: azure [23:48] firebalrog: I like azule better than azure [23:48] Vespakoen: https://github.com/einaros/GitAzure [23:48] firebalrog: MS naming mistake [23:48] Vespakoen: ah ok didnt know that existed [23:48] firebalrog: lol [23:48] Vespakoen: =D [23:49] firebalrog: I am using a small vps in cali that only costs 2.49 a month. [23:49] ovnicraft has joined the channel [23:49] firebalrog: 128mb ram debian with 250gb of storage [23:49] firebalrog: runs node just fine. [23:50] Vespakoen: it it speedy? i had a cheap vps once that sucked ballsack [23:50] redir has joined the channel [23:50] tonymilne has joined the channel [23:50] jocafa: i love my linode instance [23:50] level09 has joined the channel [23:50] firebalrog: its fast enough. installed node, forever, ssh, npm, and mongodb. [23:51] Vespakoen: okay [23:51] firebalrog: only really hard part was setting the firewall up but there were plenty of articles on that [23:51] vkandy has joined the channel [23:52] jasonkuhrt has joined the channel [23:52] Vespakoen: So i am going to try once more =) : Hey noders! I am playing with this thought in my head for quite a while now, and i think i know enough about this "idea" to check out what you guys think of it. [23:52] Vespakoen: The best way i can describe it at the moment is: a single-page website, that loads "partials" via ajax (or a socket), when changing a page, i am going to "add", "move" or "remove" some "partials". [23:52] Vespakoen: Now, when changing to another page, the "framework" should "know" what elements it's going to need, loads the ones it doesnt have and "moves" or "removes" others that it doesn't need anymore. [23:52] Vespakoen: Another cool feature would be, since we can also "build" this page on the serversize (jsdom or domjs, not sure wich one it was) we can also render the page server-side for example for mobile & google (bot / SEO) [23:53] Vespakoen: the code should be similar to backbone.js, models, partials, collections etc [23:53] firebalrog: csstricks.com has a podcast where he does exactly that and explains the downfall of that idea. he just uses jquery.load [23:54] Vespakoen: really, ill go and find that now =D [23:54] firebalrog: sorry wrong .com give me a sec [23:54] remysharp: css-tricks.com [23:54] firebalrog: thanks just found it [23:55] insin: my quick hack while playing around with that idea was to use template inheritance - the client side code knows where it needs to insert the generated content and the server side changes the parent template to include the full content [23:55] fantastikibne: how can i include my settings.js? [23:56] firebalrog: it was a podcast on why you want to start with html pages and a menu then add fuctionality if jquery and javascript are available to just replace the content div with a $('#content').html( jquery.load("http://my.com/page.html#content")); [23:56] HardFu has joined the channel [23:57] firebalrog: obviously if you are doing the replacement server side you could just use express and templating. [23:57] remysharp: Is there a way to test an npm install? I thought I imagined it ... ? [23:57] isaacs: remysharp: npm install foo --dev; npm test foo [23:57] isaacs: remysharp: is that what you mean? [23:57] Vespakoen: firebalrog, so you support the "idea" ? [23:57] isaacs: remysharp: or, npm install foo --npat [23:57] remysharp: isaacs: perfect, cheers [23:57] isaacs: to do it in one command [23:57] Vespakoen: oh w8 [23:58] Vespakoen: what was the downfall =P ? [23:58] insin: uh.. wow, the proof of concept page I was going to link to crashes firefox now O_o [23:58] kmczn has joined the channel [23:58] firebalrog: Vespakoen: yes in concept [23:59] errordeveloper has joined the channel [23:59] larsschenk has joined the channel [23:59] tkro has joined the channel [23:59] larsschenk has joined the channel [23:59] larsschenk has left the channel