[00:01] perezd: dscape: yt? [00:01] nibblebot has joined the channel [00:01] tmcw has joined the channel [00:03] armando_neto has joined the channel [00:04] pquerna: tjholowaychuk: funny story about having the port in the host header [00:04] pquerna: tjholowaychuk: if (!hasHost) headers['Host'] = url.hostname; [00:04] pquerna: tjholowaychuk: guess what node.js does [00:04] ceej has joined the channel [00:05] tjholowaychuk: haha [00:05] tjholowaychuk: lame [00:05] tjholowaychuk: dont we have a prop that doesn't split them? [00:05] tjholowaychuk: maybe not [00:05] tjholowaychuk: .host [00:05] tjholowaychuk: should be ok [00:06] pig_ has joined the channel [00:07] normanrichards has joined the channel [00:09] JaKWaC has joined the channel [00:10] replore has joined the channel [00:10] replore_ has joined the channel [00:12] TooTallNate has joined the channel [00:12] mikeal has joined the channel [00:16] MUILTFN has joined the channel [00:18] issackelly_ has joined the channel [00:21] ryanj has joined the channel [00:24] ajsie: anyone here using sammy.js? [00:24] marcello3d has joined the channel [00:26] neoesque has joined the channel [00:31] meso has joined the channel [00:34] meso has joined the channel [00:34] tylerstalder has joined the channel [00:36] jollari has joined the channel [00:36] tylerstalder has joined the channel [00:37] quackquack has joined the channel [00:37] quackquack: using mongoose how do I replicate activerecord's has_many and belongs_to? that is, I have an ObjectId, but how do I turn that into a model? [00:41] cjm has joined the channel [00:43] devongovett has joined the channel [00:44] Peniar has joined the channel [00:44] sdwrage has joined the channel [00:45] pizthewiz_ has joined the channel [00:45] davidascher has joined the channel [00:47] avih has joined the channel [00:47] rchavik has joined the channel [00:48] andrewfff has joined the channel [00:50] shipit has joined the channel [00:50] rchavik has joined the channel [00:50] Corren has joined the channel [00:54] dgathright has joined the channel [00:55] JaKWaC_ has joined the channel [00:57] joshthecoder has joined the channel [00:58] ditesh|cassini has joined the channel [01:01] soapyillusions has joined the channel [01:02] Bodil has joined the channel [01:02] jzacsh has joined the channel [01:05] chance- has joined the channel [01:05] postwait has joined the channel [01:05] Tobsn has joined the channel [01:08] deedubs has joined the channel [01:09] Juan77 has joined the channel [01:09] fread2281 has joined the channel [01:10] k1ttty has joined the channel [01:11] Drakonite has joined the channel [01:11] smtlaissezfaire has joined the channel [01:12] dimroc has joined the channel [01:12] caolanm has joined the channel [01:12] dimroc: hi all [01:12] dimroc: in the web-inspector, or even node-inspector, how does one see the variables in the global namespace [01:12] dimroc: obviously 'this' doesn't always work because this changes between context [01:12] normanrichards_ has joined the channel [01:12] dimroc: i believe browser side it's 'window' [01:13] rfay has joined the channel [01:15] mandric has joined the channel [01:15] dimroc: so 'global' works but i don't think it's what im looking for [01:15] perezd: dscape: hey [01:15] ayo: http://nodejs.org/docs/v0.5.7/api/globals.html#global [01:17] jakehow has joined the channel [01:17] cdantas has joined the channel [01:18] dimroc: already there [01:18] dimroc: i guess what im looking for is the parent of global [01:18] dimroc: if that's even possible [01:19] markdaws has joined the channel [01:20] cconstantine: is there omething like websockets for two way message passing between two node servers? [01:23] enhydra has joined the channel [01:23] soapyillusions has joined the channel [01:24] secoif has joined the channel [01:24] dshaw_ has joined the channel [01:24] socialhack has joined the channel [01:25] socketio\test\51 has joined the channel [01:26] joshkehn has joined the channel [01:26] joshkehn has left the channel [01:28] boehm has joined the channel [01:29] d0k has joined the channel [01:29] briandh has joined the channel [01:30] icewhite has joined the channel [01:34] AAA_awright: cconstantine: Can't socket.io do something like that? [01:34] brianseeders has joined the channel [01:35] cconstantine: AAA_awright, so, socket.io I guess [01:35] hermanjunge has joined the channel [01:35] lepht has joined the channel [01:36] abraxas has joined the channel [01:36] jedahan has joined the channel [01:37] chance- has joined the channel [01:37] ditesh|cassini has joined the channel [01:40] Aphelion has joined the channel [01:41] andrewfff has joined the channel [01:43] perezd_ has joined the channel [01:45] cjm has joined the channel [01:45] soapyillusions has joined the channel [01:47] Murugaratham has joined the channel [01:47] boaz has joined the channel [01:48] a_suenami has joined the channel [01:52] soapyillusions has joined the channel [01:56] nerdy_ has joined the channel [01:56] minorblend has joined the channel [01:58] soapyillusions has joined the channel [01:59] hermanjunge: hi guys, recommend any good nodejs unit testing suite? [02:00] tk has joined the channel [02:01] mandric has joined the channel [02:02] bradleymeck has joined the channel [02:03] dgathright has joined the channel [02:04] amigojapan has joined the channel [02:04] michaeldeol has joined the channel [02:05] dimroc: I use vows because it makes async testing easier, but at the expense of making traditional unit testing harder. [02:05] temp01 has joined the channel [02:06] dimroc: for traditional unit testing I'd probably use node-unit with the async library, or for client side unit testing i'd opt for jasmine. [02:06] hermanjunge: ok [02:06] dshaw_ has joined the channel [02:06] hermanjunge: thx [02:07] SubStack: beh [02:07] amigojapan has joined the channel [02:07] SubStack: ACTION likes tap [02:07] SubStack: output is ugly but the api is so pretty http://github.com/isaacs/node-tap [02:07] SubStack: here's an example test: https://github.com/substack/node-stackedy/blob/master/test/deep.js [02:07] ryanfitz has joined the channel [02:08] SubStack: plus you can just execute the file or use the bin script to execute a directory [02:08] toxico has joined the channel [02:08] pixel13 has joined the channel [02:08] saikat has joined the channel [02:11] cdantas_ has joined the channel [02:11] towski has joined the channel [02:12] tk has joined the channel [02:12] willwhite has joined the channel [02:13] mandric has joined the channel [02:13] mynyml has joined the channel [02:13] skm has joined the channel [02:14] mike5w3c has joined the channel [02:15] avalanche123 has joined the channel [02:16] joshkehn has joined the channel [02:16] joshkehn has left the channel [02:17] Xano has joined the channel [02:18] JakeyChan has joined the channel [02:18] ceej has joined the channel [02:19] trotter has joined the channel [02:20] andrewfff has joined the channel [02:24] Chwoka has joined the channel [02:24] ron_frown has joined the channel [02:25] Chwoka: what is this and why does it have 645 people in it [02:25] Chwoka: something to do with javascript? [02:25] Chwoka: woo, guess was right [02:25] Chwoka has left the channel [02:26] bradleymeck: ...? [02:27] Hannspree has joined the channel [02:27] Hannspree: who wants to see me and my girlfriends get wet and strip? [02:27] MooGoo: aww [02:29] lepht has joined the channel [02:31] Vertice_ has joined the channel [02:31] hermanjunge has joined the channel [02:32] state has joined the channel [02:32] tmzt_ has joined the channel [02:34] JSManiacs has joined the channel [02:34] vidi has joined the channel [02:35] andrewfff has joined the channel [02:37] tizzo-afk has joined the channel [02:37] luke` has joined the channel [02:38] khrome__ has joined the channel [02:41] igl1 has joined the channel [02:44] skiz has joined the channel [02:45] devongovett has joined the channel [02:48] r3vd has joined the channel [02:50] kenperkins has joined the channel [02:51] smus has joined the channel [02:53] malkomalko has joined the channel [02:56] colinclark has joined the channel [02:57] mbrevoort has joined the channel [02:57] andrewfff has joined the channel [02:58] v_y has joined the channel [03:01] v_y: is there a utility for verifying whether an object matches a particular scheme? [03:02] context: http://davidwalsh.name/json-validation [03:02] overthemike has joined the channel [03:02] context: dojo has a method [03:02] overthemike has left the channel [03:03] context: looks like commonjs has a method for that [03:03] stephank has joined the channel [03:03] kuhrt has joined the channel [03:04] Sami_ZzZ has joined the channel [03:05] v_y: context: cool, thanks [03:07] CarterL has joined the channel [03:08] amigojapan has joined the channel [03:10] ceej has joined the channel [03:12] perezd has joined the channel [03:12] vidi has joined the channel [03:13] confoocious has joined the channel [03:13] confoocious has joined the channel [03:14] guillermo has joined the channel [03:14] k1ttty has joined the channel [03:15] devdazed has joined the channel [03:15] stagas has joined the channel [03:16] joshkehn has joined the channel [03:16] Tobsn has joined the channel [03:17] jmoyers has joined the channel [03:18] davidascher has joined the channel [03:26] devdazed has joined the channel [03:27] cying has joined the channel [03:27] fayce has joined the channel [03:29] spathi^ has joined the channel [03:29] Deegie has joined the channel [03:32] JakeyChan has joined the channel [03:32] chance-: hmph, mongoose doesn't handle cascade validation? [03:33] JaKWaC has joined the channel [03:38] sub_pop has joined the channel [03:39] Spion has joined the channel [03:39] binaryjohn has joined the channel [03:40] Murugaratham has joined the channel [03:46] CrypticSwarm has joined the channel [03:46] jmoyers has joined the channel [03:47] smathy has joined the channel [03:48] dominictarr has joined the channel [03:49] amigojapan has joined the channel [03:50] jchris has joined the channel [03:50] devdazed has joined the channel [03:50] luke` has joined the channel [03:51] yozgrahame has joined the channel [03:51] devdazed has left the channel [03:55] fread2281 has joined the channel [03:57] bradleymeck has joined the channel [03:58] skm has joined the channel [03:59] skiz has joined the channel [04:00] deedubs has joined the channel [04:01] c4milo1 has joined the channel [04:02] bwinton has joined the channel [04:02] ryanfitz has joined the channel [04:03] ditesh has joined the channel [04:04] fangel has joined the channel [04:06] ericmuyser has joined the channel [04:07] fread2281 has joined the channel [04:08] CIA-109: libuv: 03Ryan Dahl 07master * r2c01791 10/ common.gypi : Make libev verify itself in debug build - http://git.io/lCYVJA [04:11] vidi has joined the channel [04:13] lightcap has joined the channel [04:13] kenperkins: asdf [04:13] avih has joined the channel [04:16] xsyn has joined the channel [04:16] cognominal___ has joined the channel [04:16] luxigo has joined the channel [04:16] thepatr1ck has joined the channel [04:22] ceej has joined the channel [04:22] smus has joined the channel [04:28] elliottcable has joined the channel [04:29] caolanm has joined the channel [04:30] AAA_awright has joined the channel [04:32] Dreamer3 has joined the channel [04:35] willwh has joined the channel [04:36] herbySk has joined the channel [04:37] reid has joined the channel [04:37] skm has joined the channel [04:37] fread2281 has joined the channel [04:38] pen has joined the channel [04:38] pen has joined the channel [04:39] pen has joined the channel [04:39] sdwrage: necromancer: watch the intro video to node.js [04:39] sdwrage: woah… I was scrolled WAY up [04:40] sdwrage: sorry if I stated something that was already figured out [04:40] sdwrage: >.< [04:40] mAritz has joined the channel [04:41] tmzt has joined the channel [04:41] andrewfff has joined the channel [04:41] bradleymeck has joined the channel [04:42] dguttman has joined the channel [04:43] Wa has joined the channel [04:46] OmidRaha has joined the channel [04:47] amiller has joined the channel [04:50] fread228_ has joined the channel [04:51] meso has joined the channel [04:53] vipaca has joined the channel [04:56] jhurliman has joined the channel [04:57] yuwang has joined the channel [04:58] jtsnow has joined the channel [05:00] luke` has joined the channel [05:01] CIA-109: libuv: 03Ryan Dahl 07master * r3e5aa06 10/ (test/test-list.h test/test-timer.c): Add two timer ref count tests - http://git.io/ZQHJqA [05:01] JakeyChan_ has joined the channel [05:03] ampt has joined the channel [05:03] tylerstalder has joined the channel [05:07] torsd has joined the channel [05:10] Tobsn has joined the channel [05:11] JSManiacs has joined the channel [05:11] necrodearia has joined the channel [05:12] Aphelion has joined the channel [05:14] bergie has joined the channel [05:15] binaryjohn has joined the channel [05:17] clu3 has joined the channel [05:18] saikat has joined the channel [05:20] DennisRasmussen has joined the channel [05:23] blaenk has joined the channel [05:23] blaenk has joined the channel [05:25] tmzt_ has joined the channel [05:26] TooTallNate has joined the channel [05:27] blueadept has joined the channel [05:27] shipit has joined the channel [05:27] fangel has joined the channel [05:28] vipaca: I'm wondering is it possible that you can have intermixed writes to a stream? [05:28] ampt has left the channel [05:28] KicStart42 has joined the channel [05:28] jedahan has joined the channel [05:28] luxigo: damn [05:29] TheCode has joined the channel [05:29] vipaca: It seems like you could have two requests for the same file on the same stream and then have the first chunk of the file written to the stream [05:30] lepht has joined the channel [05:30] petrjanda has joined the channel [05:30] hermanjunge has joined the channel [05:30] blueadept has joined the channel [05:30] blueadept has joined the channel [05:34] rurufufuss has joined the channel [05:35] k1ttty has joined the channel [05:35] sid3k` has joined the channel [05:35] tmzt has joined the channel [05:39] andrewfff has joined the channel [05:40] Murugaratham has joined the channel [05:42] shipit has joined the channel [05:44] elliottcable: RangeError: Maximum call stack size exceeded [05:44] elliottcable: I get that damn near every time I use util.inspect /= [05:45] elliottcable: somebody should really re-write it to be a little more careful about recursing unnecessarily. [05:45] elliottcable: it’s basically a useless tool as it stands. [05:45] elliottcable: I’d do it myself, ’cept busy. ಠ_ಠ [05:45] Lingerance: File a BR [05:47] SamuraiJack has joined the channel [05:49] elliottcable: Lingerance › BR? [05:50] mjr_ has joined the channel [05:50] elliottcable: Lingerance › I know nothing about the current contribution process. My last commit was in 2009. [05:50] elliottcable: )= [05:50] elliottcable: holy christ, 644 people in here [05:50] Lingerance: Bug Report [05:51] vipaca has joined the channel [05:51] vipaca has joined the channel [05:51] CIA-109: libuv: 03Ryan Dahl 07master * r2ebb227 10/ (test/test-list.h test/test-tcp-close.c): Add tcp reference count tests - http://git.io/jI-KRA [05:54] ph^ has joined the channel [05:55] doffm has joined the channel [05:56] wmage has joined the channel [06:00] nforgerit has joined the channel [06:03] bergelmir has joined the channel [06:03] bergelmir has joined the channel [06:03] cnus8n has joined the channel [06:04] wmage has joined the channel [06:04] Vertice has joined the channel [06:06] fread2281 has joined the channel [06:07] pid_ has joined the channel [06:09] fdmanana has joined the channel [06:10] dgathright has joined the channel [06:16] jmoyers has joined the channel [06:17] fread228_ has joined the channel [06:17] herbySk has joined the channel [06:22] sfoster has joined the channel [06:23] Renegade001 has joined the channel [06:26] CIA-109: node: 03Ryan Dahl 07master * rfa2eaea 10/ lib/net_uv.js : [06:26] CIA-109: node: write-only streams should not shutdown [06:26] CIA-109: node: See [06:26] CIA-109: node: https://github.com/joyent/node/issues/1726#issuecomment-2207602 - http://git.io/KqfWxA [06:26] kristoferjoseph has joined the channel [06:27] cognominal has joined the channel [06:28] bluezjuice has joined the channel [06:30] fread2281 has joined the channel [06:30] fayce has joined the channel [06:38] robotmay has joined the channel [06:38] ph^_ has joined the channel [06:38] Frippe has joined the channel [06:39] fread2281 has joined the channel [06:39] meso_ has joined the channel [06:40] harthur has joined the channel [06:42] grekko has joined the channel [06:42] boltR has joined the channel [06:43] luke`_ has joined the channel [06:46] KicStart42 has left the channel [06:46] lmatteis has joined the channel [06:46] simenbrekken has joined the channel [06:46] ph^ has joined the channel [06:47] Ond has joined the channel [06:47] shanebo has joined the channel [06:48] Morkel has joined the channel [06:48] alekhine has joined the channel [06:48] ph^ has joined the channel [06:49] cying has joined the channel [06:51] ivanfi has joined the channel [06:51] davidbanham has joined the channel [06:52] mbrevoort has joined the channel [06:52] beevi7 has joined the channel [06:53] `3rdEden has joined the channel [06:55] necrodearia has joined the channel [06:56] emattias has joined the channel [06:57] mbrevoort has joined the channel [06:57] simenbrekken has joined the channel [06:58] ph^_ has joined the channel [06:59] simenbrekken: I'm packing up my project for a stable release 1.0 so a package.json seems in order, is there a nice way of auto generating a stub with my existing dependencies? [07:02] ph^ has joined the channel [07:03] lepht has joined the channel [07:03] fangel has joined the channel [07:03] andree has joined the channel [07:04] mytrile has joined the channel [07:05] petrjanda has joined the channel [07:07] fangel has joined the channel [07:11] ryanmcgrath has joined the channel [07:14] minorblend has left the channel [07:14] piscisaureus has joined the channel [07:14] vipaca has joined the channel [07:15] vipaca has joined the channel [07:15] icebox has joined the channel [07:16] raphdg has joined the channel [07:18] johnwards has joined the channel [07:19] topaxi has joined the channel [07:19] clarkfischer has joined the channel [07:20] Emmanuel` has joined the channel [07:24] jetienne has joined the channel [07:26] jacobolus has joined the channel [07:26] Jippi has joined the channel [07:30] CIA-109: node: 03Fedor Indutny 07master * rf4124e1 10/ (lib/_debugger.js test/simple/test-debugger-repl.js): [07:30] CIA-109: node: debugger: setBreakpoint('fn()') [07:30] CIA-109: node: Fixes #1777 - http://git.io/M5sI7Q [07:31] vguerra has joined the channel [07:31] mikedeboer has joined the channel [07:32] Industrim has joined the channel [07:34] max_dev has joined the channel [07:34] stonebranch has joined the channel [07:34] Druide has joined the channel [07:34] mraleph has joined the channel [07:35] nmir has joined the channel [07:35] [AD]Turbo has joined the channel [07:35] [AD]Turbo: hi there [07:37] __doc__ has joined the channel [07:37] dynacker: Fedor! [07:39] guidocalvano has joined the channel [07:39] JakeyChan has joined the channel [07:43] piscisaureus_ has joined the channel [07:46] indutny: hi there [07:46] indutny: dynacker: what's up? [07:47] vguerra has joined the channel [07:47] Lemon_BE has joined the channel [07:49] slifty has joined the channel [07:49] dmkbot has joined the channel [07:50] slifty has joined the channel [07:52] Lemon_BE2 has joined the channel [07:52] megalomix has joined the channel [07:53] megalomix: hello everybody [07:53] _kud has joined the channel [07:53] megalomix: https://gist.github.com/1244563 when someone visite example.com/ i will call my "index" function.... I would like to print something on console but i don't see the text on the shell, why? [07:54] DrMcKay has joined the channel [07:56] Aphelion has joined the channel [07:57] matyr has joined the channel [07:57] mehlah has joined the channel [07:57] Industrial has joined the channel [07:58] megalomix: https://gist.github.com/1244563 when someone visite example.com/ i will call my "index" function.... I would like to print something on console but i don't see the text on the shell, why? [07:58] uchuff has joined the channel [07:58] fuzzyone has joined the channel [08:00] whitman has joined the channel [08:00] Emmanuel` has joined the channel [08:00] dynacker: Fedor! [08:00] nforgerit has joined the channel [08:00] huskyr has joined the channel [08:01] Xano has joined the channel [08:03] FireFly|n900 has joined the channel [08:03] mc_greeny has joined the channel [08:04] adambeynon has joined the channel [08:04] TomY has joined the channel [08:05] mike5w3c_ has joined the channel [08:06] indutny: dynacker! [08:08] burningdog has joined the channel [08:09] megalomix: ? [08:10] simenbrekken: megalomix: is that your entire code? [08:11] megalomix: YES [08:11] gregmoreno has joined the channel [08:11] megalomix: i call it from: app.get('/', pages.index()); [08:13] ablomen has joined the channel [08:14] pandark__ has joined the channel [08:15] Xano has left the channel [08:16] djcoin has joined the channel [08:17] courpse has joined the channel [08:18] Sami_ZzZ has joined the channel [08:18] jbpros has joined the channel [08:20] Margle has joined the channel [08:21] skm has joined the channel [08:22] JSManiacs has joined the channel [08:22] eldios has joined the channel [08:22] newsbad_com has joined the channel [08:23] markwubben has joined the channel [08:23] temp02 has joined the channel [08:23] icebox: megalomix: pages.index vs. pages.index()... and no double function in the snippet [08:23] devaholic: megalomix: because you are calling the function [08:24] icebox: devaholic: :) [08:24] AAA_awright has joined the channel [08:24] megalomix: what? [08:24] megalomix: app.get('/', pages.index()); ---> in app.js [08:24] megalomix: https://gist.github.com/124456 ---> in pages.js [08:25] icebox: megalomix: you need to pass a function, not calling a function [08:25] megalomix: app.get('/', pages.index) <----- right? [08:25] augustl: depends wether or not pages.index() returns a function [08:26] devaholic: megalomix: right [08:26] devaholic: icebox/augustl are saying that if index.pages had return function () {} that you could call index.pages() [08:27] devaholic: express expects a function [08:27] augustl: from what I can tell, the point is that you need to pass a function as the 2nd argument to get [08:27] robotmay has joined the channel [08:28] tylerstalder has joined the channel [08:28] megalomix: page.index return a function [08:28] rmzg: megalomix: You mean it *is* a function? [08:28] megalomix: https://gist.github.com/124456 [08:28] icebox: megalomix: and I would write the entry point as exports.index = function(req, res) {... [08:28] megalomix: ops [08:28] megalomix: wrong git [08:28] rmzg: Hey look, ruby [08:28] megalomix: https://gist.github.com/1244563 <------ this [08:29] rmzg: That does appear to return a function! [08:29] megalomix: yes [08:29] courpse: There a node for dummys how-to? [08:29] megalomix: i copied a wrong git above ehehe [08:29] DrMcKay: Ruby has namespaces? [08:29] megalomix: so [08:29] megalomix: i neet pages.index() [08:30] rmzg: megalomix: Assuming you defined pages correctly, yes. [08:30] rmzg: megalomix: What is your error? [08:30] megalomix: app.js -> app.get('/', pages.index()); [08:30] kulor-uk has joined the channel [08:30] megalomix: i don't get an error i don't understand WHY console.log() prints nothing on the shell [08:30] rmzg: megalomix: If you add a console.log above the return function(); does it output anything? [08:30] rmzg: Are you restarting node when you make changes? [08:30] megalomix: yes it prints [08:31] icebox: megalomix: because when the index function is called, it returns a function [08:31] megalomix: outside return function() yes [08:31] megalomix: yes i know [08:31] megalomix: but when this function is called why doesnt print nothing ? [08:31] devaholic: courpse: docs.nodejitsu.com [08:31] megalomix: because the code inside is executed correctly [08:31] rmzg: megalomix: Can you res.send("hello") back from the returned function? [08:31] megalomix: only console.log seems not to be executed [08:31] rmzg: oh [08:32] rmzg: I have no idea.. buffering? [08:32] courpse: devaholic, Ta. [08:32] icebox: megalomix: the body of that function is not called [08:32] icebox: megalomix: correctly [08:32] rmzg: icebox: Please keep up [08:32] megalomix: i don't know.. [08:32] rmzg: icebox: He's calling a function that returns a function [08:32] megalomix: icebox, ? [08:32] rmzg: Which he is using as the handler [08:32] megalomix: app.get('/', pages.index()); <- app.js [08:32] megalomix: https://gist.github.com/1244563 <-- page.js [08:33] megalomix: obviously i do: pages = require('./pages') [08:33] rmzg: megalomix: And you've verified the code, aside from the console.log, inside the returned function is running? [08:33] megalomix: sure [08:33] megalomix: if i do [08:33] megalomix: res.render('page') [08:33] megalomix: it render the page correctly [08:33] rmzg: huh [08:33] devaholic: lolll [08:33] rmzg: megalomix: I'm just guessing wildly here.. maybe the console object gets.. changed somehow? [08:34] devaholic: magalomix: do a res.send('page'); and report back if it shows up in the browser [08:34] hotroot has joined the channel [08:34] megalomix: hmmm [08:34] megalomix: devaholic, yes it does [08:34] megalomix: i done res.end('output') [08:34] megalomix: and i see 'output' on the browser [08:34] bloodybeginner has joined the channel [08:34] devaholic: what file is app.get in? [08:35] k1ttty has joined the channel [08:35] devaholic: using cluster or something? [08:35] devaholic: (something else that cats logs to a file?) [08:35] devaholic: you are smoking crack, son [08:35] hotroot: Hey, pretty new to Node.js, any amazing tutorials as of yet? The tutsplus.com one seems nice for basics, but anything else? [08:35] bloodybeginner: how do i install nodejs on a mac ????? how do i use these terminal programming code as listed within the installation guide? [08:36] devaholic: hotroot: docs.nodejitsu.com [08:36] hotroot: "how do i use these terminal programming code as listed within the installation guide?" Best sentence of the year. [08:36] megalomix: app.js [08:36] hotroot: devaholic: Thanks [08:36] djcoin has joined the channel [08:36] megalomix: yes [08:36] megalomix: i'm using cluster <--- [08:36] shanebo: anybody here using connect-form? [08:36] devaholic: bloodybeginner: http://docs.nodejitsu.com/articles/child-processes/how-to-spawn-a-child-process [08:36] devaholic: megalomix: check your logs. [08:37] bloodybeginner: .... thanks - will take a look! [08:37] aaronmcadam has joined the channel [08:37] megalomix: ops [08:37] megalomix: :D [08:37] megalomix: workers.access.log [08:37] megalomix: has that prints [08:37] megalomix: :D [08:37] devaholic: ACTION facepalm [08:37] megalomix: ahahahahahah [08:38] hotroot: Interesting problem here. Following the install guide from the node wiki exactly. Using fedora 15 and I get "/home/hotrootsoup/node/wscript:232: error: could not configure a cxx compiler!" [08:38] devaholic: hotroot: you need to install a cxx compiler [08:38] konobi: hotroot: do you have a c/c++ compiler installed? [08:39] hotroot: Yeah, I have gcc [08:39] konobi: g++? [08:39] hotroot: "Checking for program g++ or c++ : not found" lies [08:39] hotroot: Isn't g++ part of the gcc pack? [08:39] konobi: some distros split it out [08:39] hotroot: Ah. [08:40] devaholic: you'll need some other dev packages too, but i cant remember them ottomh [08:40] _kud has joined the channel [08:40] hotroot: Any idea what it is under Fedora 15? [08:40] konobi: yum search [08:40] hotroot: I am, lotsa results [08:41] hotroot: Guess it isn't split up? [08:41] hotroot: "gcc.i686 : Various compilers (C, C++, Objective-C, Java, ...)" [08:41] DrMcKay: hotroot: sudo yum install gcc gcc-c++ -y\ [08:41] DrMcKay: without the \ at the end [08:42] Margle has joined the channel [08:42] devaholic: or groupinstall the dev packages [08:42] bloodybeginner: ... sorries - this is just too complicated for me to just install NODE on a mac needs some serious knowledge ... https://github.com/joyent/node/wiki/Installation -- Step 3a - Installing on Unix (including BSD and Mac) reads like rocket science to me :( [08:42] hotroot: Ah, thanks, I guess they call it "gcc-c++" [08:43] cognominal_ has joined the channel [08:43] aron_ has joined the channel [08:44] hotroot: Its still being strange though. "Checking for openssl : not found " Well I have it installed... [08:45] bloodybeginner: do i post these commands (e.g. git clone --depth 1 git:) within mac's terminal? if so : how? i tried it but all i get is strange messages .... there's not much of a help for this coding - probably i am just too much of a beginner [08:45] hotroot: Whoops, my bad [08:45] DrMcKay_ has joined the channel [08:46] devaholic: hotroot: i think there is a groupinstall that covers them all [08:46] devaholic: like i said before... [08:46] devaholic: maybe drmckay knows it...? [08:46] hotroot: Yeah, I found it. Its "openssl-devel" not "openssl" [08:47] hotroot: Incorrectly reports what is missing, but whatever [08:47] bloodybeginner: ok - will go back to university / take linux coding classes and try later ...... bummer :( [08:47] hotroot: Good for him. [08:47] devaholic: bloodybeginner: alternatively you can signup for a machine at #joyent but that might also be difficult if you cant run terminal commands [08:47] devaholic: lols [08:48] hotroot: Thanks for that nodejitsu link by the way, looks amazing [08:49] devaholic: np [08:49] gboesebeck has joined the channel [08:50] gboesebeck has left the channel [08:50] hotroot: I think Node sets the record for longest install with smallest end file size [08:51] hotroot: I mean shit, it takes like 30 minutes on older PC's [08:52] ecin has joined the channel [08:54] DrMcKay: devaholic: build-essentials or something [08:56] cognominal___ has joined the channel [08:57] konobi: hotroot: configure requires "dev" versions of things so that i can have header includes for the compiler [08:58] hotroot: Well I got all the prereqs now so I'm fine [08:58] HardPhuck has joined the channel [08:59] fson has joined the channel [09:06] temp01 has joined the channel [09:07] Frippe has joined the channel [09:09] criswell has joined the channel [09:10] Glenjamin: try compiling PyQt4 on os x [09:11] Glenjamin: takes hours on a brand new shiny machine [09:11] OmidRaha has joined the channel [09:12] hotroot: Jeez [09:12] hotroot: Well, I'll never use OSX so I can dodge that bullet, haha [09:12] temp01 has joined the channel [09:13] boltR has joined the channel [09:14] mikeal has joined the channel [09:14] AAA_awright has joined the channel [09:14] zastaph has joined the channel [09:15] okuryu has joined the channel [09:15] hotroot: Bah, nodejitsu docs are really scattered [09:15] mcepl has joined the channel [09:16] hotroot: Not really a tutorial. More like a small wiki or something. [09:16] mcepl: I am trying to help packaging node into Fedora and we have constant problems with crashing on i686 ... http://fpaste.org/Tzhd/ ... anybody any idea, what's wrong or whether it is a known bug? [09:16] xsyn has joined the channel [09:17] bzinger has joined the channel [09:18] hotroot: Not a Node pro, but being a Fedora user I'll volunteer if you need anything =) [09:18] ericmuyser has joined the channel [09:18] markwubben has joined the channel [09:19] ph^ has joined the channel [09:19] DrMcKay: mcepl: that happens in a mock? [09:19] blup has joined the channel [09:19] mcepl: yes [09:20] mcepl: hotroot: the bug is https://bugzilla.redhat.com/show_bug.cgi?id=nodejs ... if you can help in any way, your help will be very appreciated. [09:20] DrMcKay: mcepl: and it's rawhide? [09:20] mcepl: right [09:20] mcepl: I think, le tme check [09:20] irahgel has joined the channel [09:21] hotroot: I'm no good at that kind of stuff, I just mean if you want me to run some node diagnostic program or something, hit me up [09:21] mcepl: DrMcKay: F16 [09:21] mcepl: hotroot: OK, anyway, thanks. [09:22] DrMcKay: mcepl: so rawhide. OK, I'll try when I finally set up a VM [09:22] hotroot: Oh, F16. Yeah, I'm F15 here. [09:22] mcepl: well, not 100% Rawhide (it's branched, but yeah more or less). [09:22] mcepl: and I don't think it should be that much distro specific. There is same V8 everywhere. [09:24] saikat has joined the channel [09:25] meso has joined the channel [09:26] DrMcKay: lol, I love these rpmlint errors [09:27] bergie has joined the channel [09:27] mikeal has joined the channel [09:27] mct has joined the channel [09:27] blax has joined the channel [09:27] hotroot: Is "nodebeginner.org" any good? As in, is it updated? Still legit code? [09:28] blax: hello there gentlemen, what are the best practices to share some global object (eg. logger) between all modules in node app? [09:29] mcepl: DrMcKay: you mean spellchecking? ... yes, that's a bit silly [09:29] blax: I don't want to reinstantiate it every time, global variables are ugly, creating it once and then passing it to every single constructor doesn't look good for me too.. [09:30] augustl: hotroot: imo it's silly to build plain websites with node [09:30] augustl: which is what the book example does [09:30] hotroot: His does file uploading [09:31] augustl: hmm, that's useful actually [09:31] hotroot: I just need the basics though. Other sources may have _more_ information, but that's not what I want. I want clear and formatted information. [09:31] Glenjamin: blax: passing it is the proper way [09:31] Glenjamin: you can develop a convention throughout your codebase of passing standard object around which always has a "logger" property, for example [09:32] Glenjamin: and then you don't have to go re-write loads of signatures when you need to pass something else around [09:32] blax: Glenjamin: thanks, is that much better than "global" object though? [09:32] Glenjamin: yes [09:32] Glenjamin: because you can have more than one [09:33] Glenjamin: no magic shared state means testing is easiere [09:33] blax: well, okay then [09:33] hotroot: Well, this is interesting. Just installed node and now I can't run node from the command line... [09:33] augustl: hotroot: the docs are pretty clear and formatted [09:33] junkee[] has joined the channel [09:34] Margle has joined the channel [09:34] hotroot: I don't just mean clear, I want steps. I want a tutorial, not docs. [09:34] augustl: the docs have small tutorials [09:34] blax: Glenjamin: one last thing, any good ideas how to name that object? ;) [09:34] hotroot: Bigger problem atm though, just installed node and I can't run it from the commandline [09:35] hotroot: It ran fine right after I installed it [09:35] Glenjamin: blax: you could call it "global" :p [09:36] Glenjamin: "options" is usually good enough [09:37] hotroot: If I cd to the node folder and ./node it works fine, but I can't just run "node" from anywhere [09:37] shanebo: hey guys, any idea how to make connect-form recognize input arrays? [09:37] luke` has joined the channel [09:38] clu3 has joined the channel [09:38] devaholic: expose your express sessions within dnode/socket.io https://github.com/tblobaum/dnode-session [09:39] luke`_ has joined the channel [09:39] shanebo: for example, all my array inputs post as fields: { 'array_name[]': 'only one of the values', … } [09:40] blaenk has joined the channel [09:40] blaenk has joined the channel [09:43] piscisaureus_ has joined the channel [09:47] bicranial has joined the channel [09:48] courpse: Humm, How do you make a client inside a webserver, connect to a diff port on the same server to the nodejs server? [09:48] courpse: I would i have to put it on a frame or something? [09:48] courpse: s/^I/Or/ [09:50] luke`_ has joined the channel [09:50] luke`__ has joined the channel [09:51] paulwe has joined the channel [09:52] pandark_ has joined the channel [09:53] hotroot has left the channel [09:54] fayce has joined the channel [09:57] Industrial: I have a problem with validation (apparently) using Mongoose; https://gist.github.com/40e80bb5ecf3b69c4630 [09:57] sam350 has joined the channel [09:58] vidi has joined the channel [09:59] Wizek has joined the channel [09:59] Wizek: hi all [10:00] eldios has joined the channel [10:01] vidi has joined the channel [10:02] Industrial: DrMcKay: any idea? :S I have no idea what I'm doing wrong here ... I'm just adding some data .. [10:02] Industrial: maybe because it's a model but not really in the db. Mission is an embedded document [10:02] DrMcKay: Industrial: sup? [10:02] DrMcKay: ah, I see [10:03] Industrial: but I'm using that model initializer to validate the incoming data (no idea if that's the right way to do it, but if you put it in your model you'd expect not to have to copy the type checking behaviour to controllers) [10:04] DrMcKay: Industrial: don't use it like that [10:04] DrMcKay: Industrial: http://mongoosejs.com/docs/validation.html [10:05] Industrial: hm, on save instead, makes sense [10:05] CIA-109: node: 03Fedor Indutny 07master * r67706b8 10/ (lib/_debugger.js lib/repl.js): Export disableColors from repl, share with debugger - http://git.io/PmHGfw [10:06] mytrile has joined the channel [10:08] shanebo: I'm dumbfounded that node-formidable doesn't follow standard array conventions: https://github.com/felixge/node-formidable/issues/33 [10:09] fermion has joined the channel [10:10] Glenjamin: shanebo: as i understand the discussion there, formiddable doesn't put file uploads into magically named fields [10:10] vidi has joined the channel [10:10] Glenjamin: it emits file events [10:11] shanebo: understood, my concern is more with non file inputs [10:12] smtlaissezfaire has joined the channel [10:12] Glenjamin: or does the bug's example using file uploads cloud the issue about array-style form params? [10:13] vidi has joined the channel [10:13] shanebo: yeah if you post a form with tags[], and you have 5 text inputs formidable gives you 'tags[]' : 'uno', 'tags[]' : 'dos', 'tags[]' : 'tres' ... [10:13] shanebo: Glenjamin ˆˆ [10:14] Glenjamin: ah ok, the bug goes on about file uploads, which is misleading [10:14] shanebo: instead of tags: ['uno','dos','tres'…] [10:14] pyrotechnick has joined the channel [10:14] shanebo: Glenjamin yeah I think the posters point was regarding files, but still [10:16] astropirate has joined the channel [10:17] ixti has joined the channel [10:19] neshaug has joined the channel [10:19] pyrotechnick has left the channel [10:20] jomoho has joined the channel [10:22] ablomen has joined the channel [10:23] dmkbot has joined the channel [10:26] FireFly|n900 has joined the channel [10:26] lmatteis: hi all [10:27] Sami_ZzZ has joined the channel [10:28] fermion has joined the channel [10:28] rendar has joined the channel [10:28] lmatteis: i'm trying to build a youtube sort of website... not trying to become as big, but the community i'm building it for would looks similar to what youtube is. but i'm a bit puzzled to what database to use... i want something really simple... storing video's information and searching upon it... so something optimized for searching, and of course well tied with node... any ideas? [10:29] matyr has joined the channel [10:32] swair has joined the channel [10:32] temp01 has joined the channel [10:33] fairwinds_ has joined the channel [10:36] blueadept: anyone here using mongolian in production? https://github.com/marcello3d/node-mongolian [10:37] piscisaureus__ has joined the channel [10:37] guidocalvano has joined the channel [10:37] piscisaureus__ has joined the channel [10:40] shipit has joined the channel [10:43] CIA-109: libuv: 03Bert Belder 07wintty * rd6b4856 10/ (45 files in 10 dirs): [10:43] CIA-109: libuv: Revert "c-ares: upgrade to 1.7.5" [10:43] CIA-109: libuv: This reverts commit 083c97e28bd67f3c87ed6cb7636e423c8d18bcb6. (+9 more commits...) - http://git.io/zfYFdw [10:45] CIA-109: libuv: 03Bert Belder 07master * r8f563e2 10/ (46 files in 11 dirs): [10:45] CIA-109: libuv: Revert c-ares upgrade and includes fix [10:45] CIA-109: libuv: It broke the windows build. [10:45] CIA-109: libuv: This reverts commit 083c97e28bd67f3c87ed6cb7636e423c8d18bcb6 and commit b288afdf14a2da3bbd6a2510c043f816ec7c6a42. - http://git.io/ZRD_ZQ [10:45] CIA-109: libuv: 03Bert Belder 07master * rb0a9d60 10/ src/win/tty.c : win: tty fixes - http://git.io/I1PuCA [10:46] i9 has joined the channel [10:47] i9: hi; can someone please help me with something [10:47] i9: i'm having trouble retreiving data via node.js from mongo database [10:47] Frippe has joined the channel [10:48] i9: this is what the code looks like so far : http://paste.ubuntu.com/697802/ [10:49] i9: i think i'm doing something wrong but i have no idea what [10:49] i9: google isn't helping either [10:49] i9: :~ [10:50] blueadept: is 602 septillion a sufficiently large enough number to use for randomized id tags? [10:50] blueadept: i'm thinking so [10:50] i9: very probably so [10:52] lmatteis: what's the best library to interface with simpledb? [10:53] blueadept: i9: what's the issue with mongo? can't retrieve data? [10:53] blueadept: what's the error say? [10:53] i9: i can't find a good tutorial / example on the subject [10:53] courpse: How do i send json data back to client? [10:53] courpse: I tried sending application/json as content-type. [10:53] blueadept: i'd recommend with possibly going with an ORM instead of the native driver, i9 [10:53] blueadept: i9: have you looked at mongoose? [10:54] blueadept: or possibly something like mongolian, which is closer to the command line [10:54] i9: blueadept: yes, but I have had some serious problems getting it installed on windows (which is a necessity unfortunately) [10:54] i9: since i can't run npm on windows [10:55] i9: so i went native [10:55] blueadept: courpse: what are you using for http? [10:55] ecin_ has joined the channel [10:55] blueadept: express? [10:55] blueadept: i9: i see [10:55] blueadept: hm [10:55] courpse: Pass? i;m newb. [10:55] courpse: 'http' [10:55] blueadept: well you have to set the contentType [10:55] i9: any good suggestions? i'm kind of desperate at this point [10:56] courpse: oh, Not Content-Type? [10:56] blueadept: er i mean Content-Type [10:56] blueadept: yeah [10:56] courpse: Well, im setting it to application/json. [10:56] blueadept: i9: can you boot up a linux vm? [10:56] courpse: Resource interpreted as Script but transferred with MIME type application/json. [10:57] blueadept: i9: it's only $10 a month at places like rackspace or amazon [10:57] courpse: res.writeHead(200, {'Content-Type': 'application/json'}); res.write('"Hello, World!"'); res.end(); [10:57] courpse: Thats literally all im sending. [10:57] blueadept: courpse: and what do you see in the browser? [10:57] courpse: Nothing. [10:57] i9: blueadept: like i said, OS isn't optional unfortunately [10:57] courpse: but in dev tools, i see that resource interpreted error. [10:57] i9: it needs to run on windows [10:57] dmkbot has joined the channel [10:58] courpse: My client side never makes it to a successful ajax call to the server. [10:58] eee_c has joined the channel [11:00] blueadept: courpse: well that is correct [11:00] bombworm has joined the channel [11:01] blueadept: courpse: actually, right now i'm working on an api with all json responses [11:02] lmatteis: is there a good cloud text-search optimized database? [11:02] blueadept: i use express to abstract some of that stuff for me [11:02] blueadept: and it works for me as well [11:02] lmatteis: something like simpledb but optimized for searching, [11:02] blueadept: but i am JSON.stringify 'ing the response as well [11:03] courpse: Well, i can't even get a response, :/ [11:03] FireFly|n900 has joined the channel [11:03] blueadept: i'd try using express [11:04] replore has joined the channel [11:04] replore_ has joined the channel [11:04] blueadept: http://expressjs.com [11:04] Swizec has joined the channel [11:04] blueadept: there's no reason to reinvent the wheel [11:04] courpse: Ehe, if you're a newb, theres lots of reasons, helpful to understand it well. [11:05] courpse: Then throw away afterwards. [11:05] slifty has joined the channel [11:05] blueadept: courpse: can you post your code to pastie.org ? [11:05] blueadept: that way i can see [11:06] blueadept: are you just rewriting the hello world example on node.js's homepage? [11:06] courpse: Um almost, heh. [11:07] courpse: Very little has changed. [11:07] courpse: I'm about to try that express you speak of. [11:07] blueadept: works for me [11:08] blueadept: i just tried it [11:09] blueadept: i mean i don't see anything in the browser [11:09] blueadept: because the browser is trying to download the json document [11:09] blueadept: yeah se [11:09] r04r has joined the channel [11:09] blueadept: i see what's going on here [11:09] blueadept: that's not the right way to serve up json if you really want to do it that way [11:10] courpse: Humm, json is just plain text aint it? [11:10] Swizec has joined the channel [11:10] courpse: And that was correctly formated json. [11:11] courpse: FF handles JSON headers incorrectly, or more so, it trys to download it, instead of display as text. [11:11] blueadept: you have to stringily the object [11:12] blueadept: so for instance, don't do res.write [11:12] blueadept: do res.end(JSON.stringify({ msg: 'Hello world'})) [11:12] lmatteis: is there a good cloud text-search optimized database? [11:13] courpse: :/ [11:13] courpse: Really? [11:13] courpse: Aight. [11:13] blueadept: or use express like i said [11:13] blueadept: i'm writing a whole API right now with json responses [11:14] blueadept: express works like a charm [11:14] blueadept: you can take a look at the source to figure out how it's handling the requests [11:14] blueadept: https://github.com/visionmedia/express/blob/master/lib/response.js [11:15] murilobr has joined the channel [11:16] blueadept: like for instance, i'm taking advantage of res.send, which takes care of a lot of content types and abstracts how to serve them up appropriately [11:16] hebz0rl has joined the channel [11:18] blueadept: i think what you have to do is tell the browser the bytelength as well [11:18] jetienne has joined the channel [11:18] blueadept: yeah the Content-Length [11:19] r04r has joined the channel [11:19] blueadept: thats one thing that express will automatically calculate and include in the response [11:19] neshaug has joined the channel [11:19] neshaug has joined the channel [11:21] Remoun has joined the channel [11:23] stonebranch has joined the channel [11:23] courpse: kk, well im still getting same error with express. [11:24] courpse: http://pastebin.com/J304gtdz Thats all i have in my server file. [11:24] Margle has joined the channel [11:25] courpse: http://pastebin.com/bi8Tr7Nc And this is my clients JS, With url set to correct domain. [11:25] lmatteis: is there a good cloud text-search optimized database? [11:25] blueadept: instead of res.header, do res.contentType('json'); [11:25] dylang has joined the channel [11:26] courpse: Resource interpreted as Script but transferred with MIME type text/html. rec:1Uncaught SyntaxError: Unexpected token : [11:26] courpse: After doing your suggestion, same error, but instead of text/html, its application/json. [11:27] murilobr has joined the channel [11:27] DrMcKay has joined the channel [11:27] swair has joined the channel [11:27] blueadept: hm [11:28] blueadept: yeah this is just firefox [11:28] blueadept: works in other browsers [11:28] courpse: I'm using Chrome. [11:28] courpse: Not FF. [11:28] blueadept: yeah i checked my code in chrome and it worked [11:29] r04r has joined the channel [11:29] blueadept: http://pastie.org/private/ax2uhgtq7spdyuptruwxg [11:29] devaholic: courpse: try res.end(yourstring) [11:29] devaholic: ? [11:29] blueadept: yeah works in chrome for me [11:30] blueadept: safari too [11:30] courpse: devaholic, Yessir, no difference. [11:30] blueadept: you're all messed up courpse [11:30] blueadept: ha [11:30] courpse: Agreed. [11:30] Morkel has joined the channel [11:30] _64k has joined the channel [11:31] ph^ has joined the channel [11:31] courpse: Actually just noticed gonig directly to the server, i get Cannot GET [11:31] devaholic: maybe if the name of the file ext is .json it will fix it, but i dont know [11:32] courpse: Erm, Cannot GET / [11:32] courpse: There is no file. [11:32] blueadept: devaholic: nah that shouldn't matter [11:32] blueadept: like i said, works for me [11:32] courpse: Its just sending the json over with json headers attached. [11:33] blueadept: are you trying to do some ajax magic, is that mostly why you're going with json? [11:33] devaholic: or you could use a relative path in your ajax call [11:33] courpse: Heh, for a starters, i'd like to do anything with this, first time nodejs, and its not workign out too well. [11:33] blueadept: i was once like you [11:34] courpse: Um, Most people are at the beginning... [11:35] andrewfff has joined the channel [11:36] jbpros has joined the channel [11:37] jzacsh_ has joined the channel [11:37] blueadept: honestly i think it took me about a month or so of just hacking it to understand a lot of node [11:38] r04r has joined the channel [11:38] mcepl has left the channel [11:38] blueadept: i'd make scrapers, basic cruds, apis. been at it for about 10 months so far [11:38] blueadept: now i prefer it to most anything else [11:39] luke`_ has joined the channel [11:39] scott_gonzalez has joined the channel [11:39] blueadept: though i also use a lot of other major tools to keep my lines to a minimum, such like socket.io, coffeescript, etc [11:39] devaholic: courpse: dataType of jsonp? [11:39] courpse: Yep. [11:39] devaholic: why jsonp [11:40] courpse: Helps with crossdomain ajax calls. [11:40] luke`__ has joined the channel [11:42] robhawkes has joined the channel [11:42] _kud has joined the channel [11:43] OmidRaha has joined the channel [11:44] jbrokc has joined the channel [11:45] devaholic: well, you probably need to changed to json or no datatype so it's more forgiving [11:45] devaholic: if not, then change your response to { "msg": "Hello world" } with double quotes [11:45] courpse: A direct call to the server works, its only in the success: of the $.ajax that breaks it. [11:46] devaholic: perhaps firefox implements the jsonp more strictly/differently than chrome [11:46] hellp has joined the channel [11:46] devaholic: cant really say i know anything about that, since jsonp is generally discouraged [11:47] courpse: k, with using dataType json, and appending callback=? to my url, it does the same thing. [11:48] devaholic: also, you realize you are json.stringify'ing something that is already, more or less, stringified json [11:48] brianseeders has joined the channel [11:49] devaholic: what is the actual url? is it up on the web? [11:50] courpse: blueadept seemed to think that i needed to stringify it. [11:50] devaholic: meh, scratch that last remark [11:51] rootslab has joined the channel [11:51] courpse: Which last remark? the live test case? [11:52] xsyn has joined the channel [11:52] devaholic: no, the stringify thing [11:52] ecin has joined the channel [11:53] courpse: Um, i don't have a live test case atm, :/ [11:55] Shrink has joined the channel [11:55] Shrink has joined the channel [11:56] TheCode has joined the channel [11:59] aron_ has joined the channel [12:00] eee_c has joined the channel [12:01] whitman has joined the channel [12:03] blueadept: courpse: ah, well i stringily it so that the JSON looks nice so i can read it, i suppose you would not need to do that per se [12:03] swair has joined the channel [12:03] blueadept: stringify* [12:03] courpse: Yeah, np, im all up for suggestions, :) [12:03] blueadept: i usually give my json responses indents and such [12:05] i9 has left the channel [12:06] bshumate has joined the channel [12:06] bshumate has joined the channel [12:07] amigojapan has joined the channel [12:07] ryanmcgrath has joined the channel [12:11] Sami_ZzZ has joined the channel [12:13] jtrudeau has joined the channel [12:14] devuo has joined the channel [12:14] devuo has left the channel [12:15] ryanfitz has joined the channel [12:15] erichynds has joined the channel [12:15] amigojapan has joined the channel [12:17] luke` has joined the channel [12:17] bzinger has joined the channel [12:19] jmar777 has joined the channel [12:20] JakeyChan has joined the channel [12:20] jbpros has joined the channel [12:21] Wizek has joined the channel [12:21] micheil has joined the channel [12:21] ablomen has joined the channel [12:22] Shrink has joined the channel [12:23] bshumate has left the channel [12:25] bshumate has joined the channel [12:25] bshumate has joined the channel [12:25] darinc has joined the channel [12:27] Margle has joined the channel [12:27] swair has joined the channel [12:29] mikeal has joined the channel [12:29] fumanchu182 has joined the channel [12:30] fumanchu182 has joined the channel [12:31] heavysixer has joined the channel [12:33] davidbanham has joined the channel [12:33] bshumate has joined the channel [12:34] matyr has joined the channel [12:36] albertosh has joined the channel [12:38] scott_gonzalez has joined the channel [12:41] fumanchu182 has joined the channel [12:41] jetienne has joined the channel [12:41] pt_tr has joined the channel [12:43] jzacsh has joined the channel [12:43] wbednarski has joined the channel [12:44] ceej has joined the channel [12:45] davidsklar has joined the channel [12:49] scottschecter has joined the channel [12:50] v_y has joined the channel [12:50] c4milo1 has joined the channel [12:50] v_y: anyone know of json scheme validators other than jsv? [12:51] ckknight has joined the channel [12:51] r04r has joined the channel [12:52] misterncw has joined the channel [12:53] jldbasa has joined the channel [12:56] DrMcKay: mikeal: there you go: https://github.com/mikeal/replicate/pull/3 :) [12:57] mikeal: i don't know why it doesn't let the repo owner turn it in to a pull request [12:57] DrMcKay: mikeal: yeah, that would be pretty useful feature [12:57] mikeal: actually, this shouldn't require node 0.5+ [12:58] mikeal: it should work on 0.4 [12:58] DrMcKay: and when you look at the API, a pull request is just an issue with a code attached [12:58] DrMcKay: mikeal: k, changing [12:58] mikeal: tell me after you push and i'll hit the merge button [12:59] marcello3d has joined the channel [12:59] DrMcKay: mikeal: pushed [13:00] mikeal: done [13:00] DrMcKay: mikeal: thanks :) [13:00] mikeal: no problem, sorry it took so long to check it out [13:00] mikeal: i've been in motion or at conferences for over a week [13:01] DrMcKay: mikeal: sure, no problem. it's a great tool, btw [13:01] mikeal: thanks [13:01] DrMcKay: mikeal: replicating npm without it was a pain, couch replication just failed without an obvious reason [13:02] boaz has joined the channel [13:02] xetorthio has joined the channel [13:02] mikeal: yeah, it's pretty opaque [13:03] mikeal: that was my primary reason for writing this, it wasn't that i could *make* the couch replicator work, it was that i had no idea what the state was, if it was running, if it failed, if it think it's up to date, nothing [13:04] JakeyChan_ has joined the channel [13:04] DrMcKay: mikeal: exactly, this Futon UI doesn't really provide anything useful about replication state [13:04] colinclark has joined the channel [13:04] petrjanda has joined the channel [13:05] DrMcKay: and documents seem to be inserted in batches, so still, you have no idea if it freezed or is just collecting documents [13:05] shipit has joined the channel [13:05] adambeynon has joined the channel [13:06] EagleCoder has joined the channel [13:06] herbySk has joined the channel [13:07] torgeir_ has joined the channel [13:07] v_y has left the channel [13:07] boaz has joined the channel [13:09] guidocalvano: is it possible to wait for the net streams in a blocking way? [13:09] DrMcKay: mikeal: I'll close the original issue as well [13:10] guidocalvano: i.e. can I wait for an event? [13:10] Swizec has joined the channel [13:10] broofa has joined the channel [13:11] DrMcKay: mikeal: ah, I can't do it, seems like only author and owner can. would you? [13:11] boaz has joined the channel [13:11] mikeal: sure [13:12] mikeal: done [13:12] Wizek has joined the channel [13:12] DrMcKay: mikeal: great :) [13:13] boaz has joined the channel [13:13] bnoordhuis has joined the channel [13:13] Juan77 has joined the channel [13:14] JakeyChan: hi, need help :) [13:15] JakeyChan: how to upload large file?? [13:15] lazyshot has joined the channel [13:16] DennisRasmussen has joined the channel [13:16] SeanBannister has joined the channel [13:18] Poetro has joined the channel [13:19] justmoon has joined the channel [13:19] thomblake has joined the channel [13:21] mikeal: to where? [13:21] jedahan has joined the channel [13:21] jedahan has joined the channel [13:21] ditesh|cassini has joined the channel [13:21] ditesh has joined the channel [13:22] mikeal: JakeyChan: upload to where? [13:22] JakeyChan: to node.js server :) [13:22] JakeyChan: is there have example ? [13:22] mikeal: ok, so you have a web server and someone is posting a large file to you from a web browser? [13:23] yept has joined the channel [13:24] fly-away has joined the channel [13:24] JakeyChan: no, [13:24] JakeyChan: I just wonder [13:24] JakeyChan: and learning :) [13:25] _kud has joined the channel [13:25] JakeyChan_ has joined the channel [13:25] mikeal: https://github.com/felixge/node-formidable [13:25] mikeal: if you're taking form input from a browser you need to parse it, use formidable [13:25] AaronMT has joined the channel [13:25] devongovett has joined the channel [13:25] mikeal: if you're taking a PUT from some other kind of software [13:25] mikeal: you can just do [13:26] thomblake has left the channel [13:26] JakeyChan_: do ? [13:26] mikeal: req.pipe(fs.createWriteStream('/path/to/file/storage')).on('end', function () { res.writeHead(201); res.end;}) [13:26] mikeal: in 0.5.3+ [13:27] mikeal: in 0.4.x you'll need a temp var for the write stream because pipe() didn't return the destination stream until 0.5.3 [13:27] ksheurs has joined the channel [13:27] mikeal: and that is all if you're taking a file and storing it on the filesystem [13:27] mikeal: if you're taking a file and sending it to another web service [13:27] mikeal: npm install request [13:27] mikeal: req.pipe(require('request').put(url)).pipe(res) [13:28] JasonJS has joined the channel [13:28] mikeal: Streams FTW! [13:28] enhydra has joined the channel [13:30] JakeyChan: sounds complex :( [13:31] testeroo has joined the channel [13:32] level09 has joined the channel [13:32] zastaph has joined the channel [13:33] fread228_ has joined the channel [13:33] mikeal has joined the channel [13:33] kmiyashiro has joined the channel [13:34] devuo has joined the channel [13:34] slifty has joined the channel [13:34] normanrichards has joined the channel [13:35] khismetix has joined the channel [13:36] level09_ has joined the channel [13:36] khismetix: We currently have a server side solution which generates updates to a JSON file which mobile clients can reach via Apache [13:36] slifty_corsair has joined the channel [13:37] khismetix: As a newb to node.js.. would node.js scale better than Apache .. where we have many mobile clients potentially accessing the same JSON URL ? [13:37] ewj has joined the channel [13:37] matyr has joined the channel [13:40] shanez has joined the channel [13:40] shanez has left the channel [13:41] bnoordhuis: khismetix: depends, are these long-lived connections? [13:41] khismetix: bnoordhuis.. at the moment … no .. they are one off connections [13:42] mikeal has joined the channel [13:42] bnoordhuis: khismetix: then you probably won't see big improvements [13:42] khismetix: from the literature it seems like node.js helps by being leaner on resources for long lived connections compared to trad http servers [13:42] bnoordhuis: khismetix: yes, and it helps with slow clients too [13:43] khismetix: Ok.. sure.. slow clients because you cannot release the connection until the request/response cycle is complete ? [13:43] bnoordhuis: yes [13:43] khismetix: We played at one stage with websockets [13:43] khismetix: We used something called jWebSocket…. [13:43] khismetix: a java based server that understands the web socket upgrade mechanism [13:44] khismetix: that was when we were actually trying to do something like long poll [13:44] bnoordhuis: ah websockets... i don't understand why everyone is so enamoured with them [13:44] fread2281 has joined the channel [13:44] khismetix: me too.. It was a mistake to use them and they weren't really a good fit for mobile [13:45] boehm has joined the channel [13:45] khismetix: Ok.. well let's say we did want to move to a long lived connection model [13:45] MrNibbles: hey chaps [13:46] bnoordhuis: khismetix: yes? [13:46] khismetix: Would node.js, for example, help if say a mobile client got temporarily disconnected [13:46] MrNibbles: I'm creating a header for some js files, so that when parsed by phantomJS, it can find the path to the tests. Just wondering if there was a common format i should use for this header [13:46] khismetix: I'm guessing a trad http server would have to timeout the idle connection [13:46] MrNibbles: or perhaps someone could point me in the right direction for this [13:46] bnoordhuis: khismetix: node has the same issue, it's inherent to tcp [13:46] khismetix: oh ,.. yes you are 100% correct [13:46] bnoordhuis: khismetix: the only way to detect it is to send ping messages at regular intervals [13:47] khismetix: yes.. we had looked at that [13:47] khismetix: we were looking at a quiz show (tv) [13:47] MrNibbles: mikeal: are you @miksago? [13:47] mikeal: no [13:47] mikeal: that's Micheil Smith [13:47] mikeal: i'm @mikeal [13:47] khismetix: sending updates to a mobile app over a long lived connection [13:47] rootslab_ has joined the channel [13:47] mikeal: we will both be at JSConf.eu :) [13:47] MrNibbles: mikeal: bastards :P [13:48] DrMcKay: ksheurs: just a hint: for synchronizing things with mobile, you guys may use CouchDB and couchmobile [13:48] DrMcKay: khismetix: ^ [13:48] MrNibbles: i know Michelil vaguely, never caught him on here before thogh [13:48] DrMcKay: sorry ksheurs, tab-complete fail [13:48] mikeal: he's micheil [13:48] khismetix: must look into couchDB/couchmobile [13:48] MrNibbles: mikeal: ha, sorry bad typo [13:48] khismetix: are they like no-SQL dbs like red is ? [13:49] khismetix: redis , I mean [13:49] MrNibbles: mikeal: ta [13:49] DrMcKay: khismetix: yes, but they're very fault-tolerant [13:49] mikeal: CouchDB's data model is designed for offline data access and sync via replication later [13:49] willwhite has joined the channel [13:49] DrMcKay: mikeal++ [13:49] v8bot_: DrMcKay has given a beer to mikeal. mikeal now has 1 beers. [13:49] mikeal: so CouchDB, Couchbase Mobile, PouchDB [13:49] Karmalicious: DrMcKay triggered a karma bomb for mikeal. mikeal receives double karma! [13:49] MrNibbles: zoo, any ideas for a comment header with a file path pointer? recommended format etc? [13:50] r04r has joined the channel [13:50] r04r has joined the channel [13:50] khismetix: DrMcKay.. so in the case where a mobile client loses a connection .... [13:50] DrMcKay: khismetix: he gets resynchronized later [13:50] khismetix: it can recover lost data if using something like couchmobile [13:50] DrMcKay: khismetix: yes [13:50] mikeal: yup, you can continue to write and read to the local db [13:50] DrMcKay: also, if he made any changes to his database, they get merged, if you want to [13:50] mikeal: and then later when it's back online, you sync [13:51] khismetix: right.. I think we had used something like a protocol whereby upon explicit reconnection the server gives you the most recently issued response [13:51] khismetix: which is robust as far as losing a maximum of 1 message [13:51] khismetix: it assumes that, if the frequency of message updates is lower than the time taken to reconnect then you *mostly* can stay in sync [13:52] mehtryx has joined the channel [13:52] khismetix: sounds like couch mobile would make the chance of data loss virtually zero [13:52] DrMcKay: ksheurs: yes :) [13:52] soapyillusions has joined the channel [13:53] jscheel has joined the channel [13:53] jscheel has joined the channel [13:54] khismetix: Another thing I've read (and not sure if it is outdated info) is that node.js doesn't scale to multiprocessor [13:55] bnoordhuis: khismetix: node is single-threaded but you can fire up multiple instances [13:55] khismetix: at the time I read it .. it suggested that work was afoot [13:55] khismetix: ok [13:55] bnoordhuis: have a look at cluster [13:55] khismetix: sure [13:56] malletjo has joined the channel [13:56] khismetix: So, in terms of existing solutions for long lived connections is it a matter of fact that node.js trumps most of them ? [13:56] DrMcKay: gah, again! [13:56] DrMcKay: khismetix: this 'yes :)' was for you [13:56] nmir has joined the channel [13:56] khismetix: ah ok :) [13:57] khismetix: khismetix != ksheurs LOL [13:57] DrMcKay: khismetix: well, tab-complete fail [13:57] khismetix: DrMcK.. couchedb mobile looks very interesting [13:57] khismetix: So, what are the alternatives to node.js for doing long lived connections ? [13:58] khismetix: I assume one is to use tomcat and some extension .. but sounds resource intensive [13:58] bnoordhuis: khismetix: netty, yes [13:58] bnoordhuis: it's also somewhat painful to work with [13:58] ksheurs has left the channel [13:58] khismetix: ok… yes I've come across netty [13:58] bnoordhuis: erlang weenies will recommend erlang [13:59] khismetix: Ok.. good point [13:59] bnoordhuis: python has tornado and twisted [13:59] khismetix: ok [13:59] bnoordhuis: ruby has eventmachine (don't know it well though) [14:00] aelien27 has joined the channel [14:00] Venom_X has joined the channel [14:00] khismetix: Does couchedb work alongside node.js or is it a self-standing solution ? [14:00] DrMcKay: khismetix: self-standing [14:00] DrMcKay: khismetix: setting it up is really easy [14:00] khismetix: DrMcKay .. does it support long poll ? [14:00] khismetix: or is it pure request/response ? [14:00] bnoordhuis: it's rest-based i think? [14:02] khismetix: rest would seem to imply traditional request/wait/response ? [14:02] davidwalsh has joined the channel [14:03] bnoordhuis: oh dear, you've summoned the wrath gods of rest now [14:03] bnoordhuis: rest is not a technology, it's a religion [14:03] khismetix: oops [14:03] netlemur has joined the channel [14:04] fread228_ has joined the channel [14:04] socialhack has joined the channel [14:04] Morkel has joined the channel [14:04] bnoordhuis: khismetix: i kid, of course, but rest is a topic of much discourse [14:05] khismetix: DrMcKay.. with couchDB mobile … can I , say, connect and wait for updates to the db to be automatically synced ? [14:05] mike5w3c_ has joined the channel [14:05] bnoordhuis: but it's based on the traditional request/response cycle, yes [14:05] khismetix: or do I need to periodically sync ? [14:05] CarterL has joined the channel [14:06] Metal3d has joined the channel [14:08] cjm has joined the channel [14:09] shanebo has joined the channel [14:09] DrMcKay: khismetix: it gets synced automatically [14:09] khismetix: hmm.. that's interesting! [14:10] DrMcKay: khismetix: continuous replication [14:10] devaholic has joined the channel [14:10] khismetix: So it does use a long-lived connection ? [14:10] DrMcKay: khismetix: hmm... not sure [14:10] arpunk has joined the channel [14:11] CIA-109: libuv: 03Bert Belder 07master * rf5f005d 10/ src/win/tty.c : tty-win: fix absolute cursor positioning - http://git.io/s6Z4pQ [14:11] smus has joined the channel [14:11] DrMcKay: khismetix: http://guide.couchdb.org/draft/replication.html#continuous [14:11] colinclark has joined the channel [14:12] mandric has joined the channel [14:12] mbrevoort has joined the channel [14:12] khismetix: this gives details on long polling… http://guide.couchdb.org/draft/notifications.html [14:13] FireFly|n900 has joined the channel [14:13] hotch has joined the channel [14:13] DrMcKay: khismetix: good one as well [14:13] khismetix: Ok.. couch looks super useful [14:13] khismetix: I'm guessing it is orthogonal to node.js … [14:13] khismetix: i.e .. I mean the two don't really have any interdependence [14:14] DrMcKay: khismetix: not really, but you may found node.js useful [14:14] DrMcKay: for example: http://www.youtube.com/watch?v=a2-gHIMSnUo [14:14] misterncw has joined the channel [14:14] DrMcKay: you can listen for events from this couchdb _changes feed [14:14] khismetix: It does say this (in relation to couch db) Another general consequence of this technique is that for each client requesting a long polling change notification, CouchDB will have to keep an HTTP connection open. CouchDB is well capable of doing so, as it is designed to handle many concurrent requests. But you need to make sure your operating system allows CouchDB to use at least as many sockets as you have long polling [14:14] khismetix: clients (and a few spare for regular requests, of course). [14:15] fread2281 has joined the channel [14:15] DrMcKay: khismetix: it's about ulimit -n, I believe [14:15] khismetix: this would suggest that couch db suffers from the scalability issue that , I think, node.js addresses [14:15] DrMcKay: khismetix: no no [14:15] khismetix: ok. .go ahead [14:15] DrMcKay: khismetix: it's about limit of open files [14:15] DrMcKay: khismetix: by default (?) Linux can have 1024 open files/process [14:16] khismetix: sure. .I know that [14:16] khismetix: Is node.js not immune to that [14:16] DrMcKay: khismetix: and each long poll is an open file (socket is a file as well) [14:16] testeroo has joined the channel [14:16] DrMcKay: khismetix: no, but you can easily change this limit [14:16] brianc has joined the channel [14:17] khismetix: just to be sure.. are you saying node.js *is* immune to the u limit issue ? [14:17] normanrichards has joined the channel [14:17] khismetix: I agree it is easy to up the u limit [14:17] blissdev has joined the channel [14:17] DrMcKay: khismetix: node.js can handle even concurrent 10 k request, but OS has to let him do that [14:17] DrMcKay: khismetix: so it's all about setting ulimit -n to a higher value :) [14:18] khismetix: Am I correct in saying that node.js only needs to call on that limit if the events it is acting on are concurrent [14:18] khismetix: i.e if it has to service 10k requests all at once [14:19] khismetix: whereas with long polling you need to maintain 10k persistent connections whether or not the response is due to be sent to the clients ? [14:19] DrMcKay: khismetix: not really. node *can* hit that limit if you're handling something that opens a file, e.g. accepting a HTTP request [14:19] aheckmann has joined the channel [14:19] DrMcKay: khismetix: 10k persistent connections == 10k open sockets [14:19] khismetix: ok [14:20] DrMcKay: khismetix: so, it's pretty much all about how you set your ulimit -n :) [14:20] DrMcKay: and using cluster may help, since it fires up many processes [14:20] khismetix: Sure.. I do like the sound of couch db.. looks very useful for mobile apps in general [14:21] CIA-109: node: 03Bert Belder 07new-tty-binding * r95231b8 10/ (16 files in 5 dirs): Upgrade libuv to f5f005d51d (+6 more commits...) - http://git.io/zyHY8Q [14:21] baudehlo has joined the channel [14:22] r04r has joined the channel [14:22] DrMcKay: khismetix: sure it is :) [14:23] Vennril has joined the channel [14:23] ph^ has joined the channel [14:23] fread2281 has joined the channel [14:24] Jippi has joined the channel [14:25] softdrink has joined the channel [14:25] Swizec has joined the channel [14:27] jedahan has joined the channel [14:27] k1ttty has joined the channel [14:28] jedahan has joined the channel [14:29] zmbmartin has joined the channel [14:30] Effilry has joined the channel [14:31] brianloveswords has joined the channel [14:31] Effilry has joined the channel [14:32] temp02 has joined the channel [14:33] fread228_ has joined the channel [14:33] dguttman has joined the channel [14:33] thinkt4nk has joined the channel [14:34] mikeal has joined the channel [14:35] N0va` has joined the channel [14:36] tek has joined the channel [14:37] metellus has joined the channel [14:37] sonnym has joined the channel [14:39] __main__ has joined the channel [14:40] __main__ has joined the channel [14:40] N0va` has joined the channel [14:41] bradleymeck has joined the channel [14:43] aconbere has joined the channel [14:45] gsmcwhirter has joined the channel [14:45] fatjonny has joined the channel [14:45] joshkehn has joined the channel [14:46] dylang has joined the channel [14:46] robertfw has joined the channel [14:49] cying has joined the channel [14:49] pickels has joined the channel [14:51] muspelhe has joined the channel [14:53] avih_ has joined the channel [14:54] CarterL: what's the difference between hook.io and zeromq? [14:55] baudehlo: zeromq is a message queue. [14:55] baudehlo: hook.io isn't, but you could build one with it. [14:56] sub_pop has joined the channel [14:56] Drakonite has joined the channel [14:56] meandi2 has joined the channel [14:57] BillyBreen has joined the channel [14:58] mikeycgto has joined the channel [14:58] mikeycgto has joined the channel [14:58] joshthecoder has joined the channel [14:58] dguttman has joined the channel [14:58] colinclark has joined the channel [15:00] onur_ has joined the channel [15:00] ryanfitz has joined the channel [15:02] austinbv has joined the channel [15:02] devongovett has joined the channel [15:03] tjholowaychuk has joined the channel [15:03] pizthewiz has joined the channel [15:05] jakehow has joined the channel [15:07] scott_gonzalez has joined the channel [15:07] max_dev has joined the channel [15:08] bradleymeck: http://ejeklint.github.com/2011/09/23/hook.io-for-dummies-part-1-overview/ <- CarterL [15:10] caolanm has joined the channel [15:12] hornairs has joined the channel [15:13] benmonty has joined the channel [15:13] smtlaissezfaire_ has joined the channel [15:14] synkro has joined the channel [15:16] CoinOpeBoy has joined the channel [15:17] jaequery has joined the channel [15:21] michaeldeol has joined the channel [15:21] gwoo has joined the channel [15:21] gwoo has joined the channel [15:21] sensimevanidus has joined the channel [15:22] navaru has joined the channel [15:22] Renegade001 has joined the channel [15:24] erickt has joined the channel [15:24] CarterL: bradwright: thank you [15:25] mkrecny has joined the channel [15:25] harthur has joined the channel [15:26] eignerchris has joined the channel [15:26] skiz has joined the channel [15:26] sensimevanidus: hi there [15:26] joshkehn: sensimevanidus: Hi [15:27] CarterL: bradwright: so, why would you build a zeromq system in hook.io if you could just start w/ zeromq for that specific purpose? [15:28] ceej has joined the channel [15:29] ceej: is it possible in your npm package.json to have something install globally ? [15:29] cscade has joined the channel [15:29] bitsmix has joined the channel [15:29] level09 has joined the channel [15:30] cscade: morning everyone, I have a question about gracefully shutting down my http-server style application [15:30] bradwright: CarterL: I think you mean bradleymeck, who has left [15:30] ph^ has joined the channel [15:30] vipaca has joined the channel [15:30] tjholowaychuk: cscade what are you using to manage the server? [15:30] vipaca has joined the channel [15:31] CarterL: bradwright: doh! you're right, sorry [15:31] cscade: tj, it's an express app. In a test environment, if I tell express to close(), then I get the expected behavior; the process exists after the connections are served. however, in my production all [15:32] tjholowaychuk: cscade: use something like cluster [15:32] mikeal has joined the channel [15:33] cscade: well in my production app the process never exits. I suspect something like redis or mongoose is holding the event loop open. Is there any way I can determine the culprit? [15:33] petrjanda has left the channel [15:33] cscade: I'll look into cluster btw [15:33] tjholowaychuk: you'll likely have more than one thing keeping the event loop active [15:33] tjholowaychuk: so who knows [15:33] tjholowaychuk: it could be intervals, connections [15:33] jchris has joined the channel [15:33] pixel13 has joined the channel [15:33] pixel13 has left the channel [15:34] Corren has joined the channel [15:34] rurufufuss: how does one make authentication work with dnode? [15:34] dgathright has joined the channel [15:34] rurufufuss: talking about browser -> server dnode, that is [15:35] devaholic: rurufufuss: i just released a module for that today [15:35] rurufufuss: aha, how does it work in tl;dr? [15:35] devaholic: rurufufuss: https://github.com/tblobaum/dnode-session [15:35] devuo has joined the channel [15:35] devaholic: actually it was last night, but, same difference [15:35] cscade: sadly I have a lot of work into rolling my own deploy script tools, and I'm 90% there. At this point, getting to a graceful exit condition will close the gap. [15:36] rurufufuss: well, talk about just in time timing [15:36] cscade: can cluster create an environment to gracefully close processes, after they clear their responses? [15:36] bEEEviz has joined the channel [15:36] herbySk has joined the channel [15:36] tjholowaychuk: cscade yes [15:36] tjholowaychuk: that's what it's designed to do [15:36] devaholic: rurufufuss: the example has an authentication setup that works with mongoose-auth [15:36] tjholowaychuk: manage servers [15:36] rurufufuss: devaholic: cool, thanks, will take a look [15:36] devaholic: rurufufuss: i'm sure it'd be easy to massage into whatever else you need, though! [15:37] cscade: all right tj, thanks I'll review the docs… may have to start over here. [15:39] brianc: tjholowaychuk: I love 'tobi.' That's all. [15:39] tjholowaychuk: ahaha [15:40] bzinger has joined the channel [15:41] torsd has joined the channel [15:42] _64k has joined the channel [15:43] brianloveswords has joined the channel [15:44] tjgillies has joined the channel [15:45] cscade: tjholowaychuk: looks like exactly what I need. Now just to travel back in time and do this from the beginning... [15:45] tjgillies: i just built node 5.7 but its segfaulting though mac os lion [15:46] devaholic: rurufufuss: i just realized there is an error in the example, fixing now [15:47] ohtogo has joined the channel [15:47] sensimevanidus has left the channel [15:48] bnoordhuis: tjgillies: can you hook it up to gdb and tell me where it's segfaulting? [15:49] devaholic: rurufufuss: basically authReady should be authentication [15:50] tjgillies: bnoordhuis ⬅ https://gist.github.com/1245440 [15:51] bnoordhuis: tjgillies: ah hmm [15:51] bnoordhuis: could be anything [15:51] lz has joined the channel [15:52] bnoordhuis: what does blah.js do? [15:52] colinclark has joined the channel [15:52] tjgillies: bnoordhuis ⬅ https://gist.github.com/1245448 [15:53] bnoordhuis: tjgillies: innocent looking [15:53] testeroo has joined the channel [15:53] bnoordhuis: tjgillies: works on latest master on linux [15:54] mikeal has joined the channel [15:55] Yuffster_work has joined the channel [15:55] tjgillies: bnoordhuis ⬅ console.log(""); segfaults as well [15:56] Spion has joined the channel [15:57] smathy has joined the channel [15:58] odyniec has joined the channel [15:58] guillermo has joined the channel [15:58] stisti has joined the channel [15:59] _jhs has joined the channel [16:00] halcyon918 has joined the channel [16:00] Fabryz has joined the channel [16:01] bradleymeck has joined the channel [16:02] johnwards_ has joined the channel [16:02] irahgel has joined the channel [16:03] sivel has joined the channel [16:03] tjgillies: compiled 4.11, and no segfault [16:03] tjgillies: wtfjs [16:03] sivel: does the http.get() method actually allow for returning a body? [16:05] patcito has joined the channel [16:06] EagleCoder has joined the channel [16:06] Renegade001 has joined the channel [16:06] Corren: who thinks it's semi normal/expected to adjust width/height settings of an embedded iframe? [16:07] jesusabdullah: ACTION raises hand [16:07] darinc has joined the channel [16:08] Corren has joined the channel [16:08] rfay has joined the channel [16:08] devaholic: kenperkins: who thinks its normal to have iframes at all [16:08] kenperkins: for example: embedding a youtube vid on your blog [16:08] gr-eg has joined the channel [16:08] JSManiacs has joined the channel [16:08] kenperkins: agree re: iframes. but it seems like they're kind of the norm for embedded content [16:09] Kurotek has joined the channel [16:11] JSManiacs has left the channel [16:14] aconbere has joined the channel [16:14] Fabryz has joined the channel [16:14] smus has joined the channel [16:15] skm has joined the channel [16:15] chrislorenz has joined the channel [16:16] enekoalonso has joined the channel [16:16] pt_tr has joined the channel [16:17] robi42 has joined the channel [16:17] lz: what's the right way to structure auth for scalability? [16:18] wbednarsk has joined the channel [16:21] wbednarsk has joined the channel [16:21] lz: hmm, anyone? [16:21] einaros has joined the channel [16:21] Aikar: lz: dont rely on the file system or local system memory :P [16:22] chia has joined the channel [16:22] lz: heh [16:22] murilobr has joined the channel [16:22] lz: I'm guessing a separate auth worker? [16:22] djk has joined the channel [16:23] Aikar: prolly not needed. you should design your app in general to work multi process, not just auth, but i thought you meant scaling for multiple servers [16:23] icebox has joined the channel [16:25] lz: aikar, wouldn't happen to know how that works with everyauth do you? all the auth solutions seem tied to one process [16:25] broofa has joined the channel [16:26] ctide: lz: just store your session data in a db [16:27] `3rdEden has joined the channel [16:27] jmoyers has joined the channel [16:27] enekoalonso: express.js can store sessions in memory or on a db store like redis [16:28] rfay has joined the channel [16:28] testeroo has joined the channel [16:29] beejeebus has left the channel [16:29] lz: enekoalonso, ah, that seems like a great idea [16:30] tmcw has joined the channel [16:31] catb0t has joined the channel [16:31] louissmit has joined the channel [16:32] ianl` has joined the channel [16:32] cannedfish has joined the channel [16:33] lz: aikar, ctide, thanks :) [16:34] rfay has joined the channel [16:34] dgathright has joined the channel [16:36] Renegade001 has joined the channel [16:37] murilobr has joined the channel [16:37] lightcap has joined the channel [16:38] mandric has joined the channel [16:38] ianl` has joined the channel [16:38] sh1mmer has joined the channel [16:38] DrMcKay has joined the channel [16:40] maletor has joined the channel [16:41] blueadept: tjholowaychuk: is there a particular npm you use for validating JSON, sort of like commonjs-utils.validate? because i'm finding that commonjs validate runs into mongoose's implementation of schema validation [16:42] markdaws has joined the channel [16:42] tjholowaychuk: blueadept not personally no [16:42] te-brian has joined the channel [16:42] tjholowaychuk: just something like json-schema? [16:42] blueadept: yeah [16:42] heavensgate has joined the channel [16:42] blueadept: i see they both use the same 'type' object, i guess [16:43] heavensgate: so node js doesnt work well for windows? [16:43] ryanfitz_ has joined the channel [16:43] heavensgate: would it be better to install node js on a knoppix live cd then? [16:43] tjholowaychuk: heavensgate they're working on it :) [16:44] heavensgate: Why does Ryan Dahl call V* a 'beast' [16:44] heavensgate: V8 [16:44] pquerna: its a beast. [16:44] tjholowaychuk: because it's large [16:44] tjholowaychuk: and complicated [16:44] pquerna: its c++. you think its simple. its not. [16:45] tbranyen: its a many faced beast [16:45] xerox: it does a lot of non-obvious things :x [16:45] tbranyen: like my ex-wife am i rite fellas [16:45] xerox: haha [16:45] mikeal has joined the channel [16:45] xerox: (she's also a beast) [16:45] tjholowaychuk: ahaha [16:46] MUILTFN has joined the channel [16:46] heavensgate: Well bieng that I am on windows would a knoppix live be a good platform to play with node.js ? [16:47] DrMcKay: heavensgate: maybe linux VM? [16:48] DrMcKay: knoppix is quite limited [16:48] DrMcKay: or that's how I remember it, at least [16:49] heavensgate: knoppix runs a kernal how could it be any more limited than a linux VM? [16:50] DrMcKay: heavensgate: I'm not sure if it even has a package manager, and you may need some additional libraries to compile node [16:51] jerrysv has joined the channel [16:51] robotmay has joined the channel [16:51] dguttman has joined the channel [16:52] mkrecny: any ideas why a npm install x -g would fail while a npm install x ./ would pass? [16:52] DrMcKay: mkrecny: permissions? [16:53] mkrecny: i'm executing as root [16:54] DrMcKay: mkrecny: would you mind running it with -ddd switch and posting the log somewhere? [16:54] heavensgate: Who writes V8 ? [16:54] neilk_ has joined the channel [16:54] mkrecny: just ran sudo (as root) [16:54] mkrecny: and worked [16:55] DrMcKay: heavensgate: mainly googlers, I think [16:55] TooTallNate has joined the channel [16:56] dgathright has joined the channel [16:56] heavensgate: I think its some muslims [16:56] tmcw has left the channel [16:57] reid has joined the channel [16:58] micheil has joined the channel [16:58] alvaro_o has joined the channel [16:59] softdrink: does anyone know of any good amd alternatives to require.js that works both client and server side? [16:59] vidi has joined the channel [16:59] scott_gonzalez has joined the channel [17:00] skiz has joined the channel [17:00] heavensgate: http://en.wikipedia.org/wiki/Vincent_Rijmen [17:01] uchuff has joined the channel [17:01] Me1000 has joined the channel [17:02] simenbrekken has joined the channel [17:03] heavensgate: http://en.wikipedia.org/wiki/Joan_Daemen [17:04] darinc has joined the channel [17:04] dans has joined the channel [17:05] r04r: Does anyone know if there's something like a host for reverse shells made in nodejs? This actually is for legitimate purposes :P [17:06] Kurotek has joined the channel [17:06] mikeal has joined the channel [17:08] Aikar: reverse shells? [17:08] vicapow has joined the channel [17:08] r04r: Basically port forwarding [17:08] jtsnow has joined the channel [17:08] vicapow: anyone use thrift with Node.JS ? [17:08] erichynds has joined the channel [17:09] konobi: r04r: netcat or ssh aren't sufficient? [17:09] Aikar: r04r: you mean like ssh -R which opens a tunnel back into your system to the remote server your connecting to ? [17:09] localhost has joined the channel [17:09] Bwen has joined the channel [17:10] r04r: Aikar: Pretty much. I've got an ssh -R implementation working now but then the client system can use which port it gets to listen on, and sometimes the actual SSH connection becomes irresponsive while none of the sides know it so the client stays open [17:10] r04r: My question should be: Is it easy to hook up two sockets their streams to eachother in nodejs? [17:10] Aikar: ssh is dropping conn? there is timeout and keep alive settings [17:10] lightcap has joined the channel [17:10] sdwrage has joined the channel [17:10] Aikar: it is possible in node though yes [17:11] Aikar: but youd require 2 processes, 1 on each side [17:11] r04r: Aikar: That's fine [17:11] r04r: I'm not 100% sure what happened with the ssh -R connection but twice now both sides their binaries were running and no errors, but the port fowarding did nada [17:11] konobi: TCPKeepAlive yes, ServerAliveInterval 60, ServerAliveCountMax 60 [17:12] r04r: that goes on the sshd config? [17:12] konobi: there's also control master sort of stuff that works well [17:12] konobi: client config [17:12] r04r: I'll try :) Thanks [17:12] cognominal_ has joined the channel [17:13] adambeynon has joined the channel [17:13] CIA-109: libuv: 03Bert Belder 07master * r554cb78 10/ src/win/tty.c : win tty: Use NULL consistently, don't mix with INVALID_HANDLE_VALUE - http://git.io/9p1MAQ [17:13] CIA-109: libuv: 03Bert Belder 07master * rbdac72c 10/ (src/win/handle.c src/win/internal.h src/win/tty.c): win tty: Implement uv_close and uv_shutdown - http://git.io/o1F4pQ [17:13] CIA-109: libuv: 03Bert Belder 07master * r2c0fca9 10/ (src/win/pipe.c src/win/tcp.c): win: Fix crash when calling uv_close from shutdown callback - http://git.io/1LEhKA [17:14] r04r: ControlMaster reuses existing connections, yes? [17:14] perezd has joined the channel [17:14] jmoyers has joined the channel [17:15] lightcap_ has joined the channel [17:15] JaKWaC has joined the channel [17:16] skiz_ has joined the channel [17:18] brion has joined the channel [17:19] Bwen: I want to use javascript to "parse" a .html before node returns it. Is it possible to use querySelector and all that is available on client-side? [17:19] jhurliman has joined the channel [17:20] dgathright has joined the channel [17:21] tylerstalder has joined the channel [17:21] Swizec has joined the channel [17:21] broofa has joined the channel [17:21] TheJH has joined the channel [17:21] TheJH has joined the channel [17:22] todd-m2n has joined the channel [17:22] replore_ has joined the channel [17:22] replore has joined the channel [17:23] miccolis has joined the channel [17:24] robi42 has joined the channel [17:24] bzinger has joined the channel [17:26] EvRide has joined the channel [17:27] tjgillies: bnoordhuis ⬅ you know version webid stuff got added? [17:27] heavensgate: anyone using chrome? [17:27] hotch has joined the channel [17:27] softdrink: i am [17:28] todd-m2n: Hello all, I am working on a node.js add-on. I am wanting to know the best-practice for making a c++ structure available to node. So I can create a structure in node and pass it around as a pointer and within the c++ code reference and insert values into the structure, that is later available to node. I have not been able to find any documentation on passing pointers between node and v8. Is there such a thing? [17:28] hotch has left the channel [17:28] heavensgate: softdrink is there a support channel searching for User specified DNS server address. doesnt show where to change the dns address [17:28] joelburns has joined the channel [17:28] eee_c1 has joined the channel [17:29] enhydra has joined the channel [17:29] softdrink: did you mean to put a question mark after "channel"? otherwise, i couldn't understand what you said… hehe [17:29] japj has joined the channel [17:29] heavensgate: sorry softdrink [17:30] heavensgate: softdrink is there a support channel? ecause, searching for User specified DNS server address. doesnt show where to change the dns address [17:30] softdrink: ah ok [17:30] softdrink: there's #webkit and #chromium here on freenode that may be able to help [17:30] heavensgate: ty [17:30] joelburns: has anyone ever used mongoose and tried to create a new MySchema({ … }); and gotten not a function? [17:30] Renegade001 has joined the channel [17:31] ryanfitz has joined the channel [17:31] meso has joined the channel [17:32] StanlySoManly has joined the channel [17:33] skiz has joined the channel [17:33] whitman has joined the channel [17:33] lz has left the channel [17:33] CIA-109: node: 03Bert Belder 07new-tty-binding * r47b9962 10/ (5 files): Upgrade libuv to 2c0fca9a41 - http://git.io/HeG3qw [17:33] elliottcable: so, the `vm` tools, even when used as “runInNewContext”-pattern, share the global object with the calling context? [17:35] _64k has joined the channel [17:36] dgathright_ has joined the channel [17:37] dgathright_ has joined the channel [17:39] Kurotek has joined the channel [17:39] elliottcable: why on earth is this failing. [17:40] elliottcable: >> var context = {selfLink: context}; vm.runInNewContext('throw global === selfLink.global', context) [17:40] elliottcable: er, no bot in here, but … you get the idea. [17:40] devongovett has joined the channel [17:41] elliottcable: some of the *values* from `context` see, to *be* available in the global scope, but the `context` is not being used *as* the global scope. [17:41] elliottcable: Even more confusingly, though, *SOMETIMES* (and I completely cannot reproduce this in my own code, outside of an uber-simple testcase), [17:41] elliottcable: … it seems that modifying the context object (which, I repeat, is *not* appropriately being used as the global object) dynamically *inside the VM* results in new global variables coming into scope [17:42] elliottcable: what the hell is going on here. [17:42] jhbot has joined the channel [17:43] JaKWaC has joined the channel [17:43] danmactough has joined the channel [17:43] mkrecny: on earth and in hell are different contexts [17:43] mkrecny: that's why [17:43] TheJH: elliottcable, you know the implicit module wrapper, right? [17:43] elliottcable: TheJH › probably not; what do you mean? [17:44] TheJH: elliottcable, but maybe I just don't understand you [17:44] siculars has joined the channel [17:44] eric_b has joined the channel [17:44] elliottcable: TheJH › pop a node REPL, since there’s no bot in here, and paste this in: [17:44] TheJH: elliottcable, node.js modules automatically get wrapped in an anonymous function [17:44] elliottcable: >> var context = {selfLink: context}; require('vm').runInNewContext('throw global === selfLink.global', context) [17:44] elliottcable: that is fairly irrelevant here; this isn’t anything to do with Node modules; it’s a raw `vm` instance [17:45] TheJH: !admin eval var context = {selfLink: context}; require('vm').runInNewContext('global === selfLink.global', context) [17:45] elliottcable: at least, I whould hope it’s irrelevant … unless the vm is doing something similar [17:45] TheJH: huh? stupid bot... [17:45] mattstevens has joined the channel [17:46] siculars_ has joined the channel [17:46] elliottcable: dw about it [17:46] AvianFlu has joined the channel [17:46] drudge: anyone familiar with FastLegS [17:46] TheJH: elliottcable, I'm just getting an error: "ReferenceError: global is not defined" [17:46] elliottcable: I am going to have to crash very soon anyway, I’m really running out of steam, [17:46] elliottcable: but I think you get the idea [17:47] Swizec has joined the channel [17:47] TheJH: elliottcable, I really don't understand why you expect "global" to exist there [17:47] elliottcable: that’s what I *don’t* expect [17:48] elliottcable: basically, here’s what I’m doing: [17:48] TheJH: elliottcable, the only globals you have in the new context are the Object prototype methods and the stuff you exposed [17:48] elliottcable: I’m creating a context for new files to run in, a sandbox object, [17:48] elliottcable: I pass the sandbox object in, and modify it to add new globals [17:48] elliottcable: something along those lines. [17:48] TheJH: elliottcable, "sandbox"? you're not using it for security, right? [17:48] elliottcable: nope [17:48] elliottcable: it’s a `require()` replacement, so it’s doing a lot of similar stuff [17:49] TheJH: ah, ok [17:49] elliottcable: like the “module wrapper” that you mentioned [17:49] jsurfer has joined the channel [17:49] elliottcable: however, some very basic stuff … isn’t working, and in an inexplicable way [17:49] TheJH: elliottcable, could you paste a simple demo gist somewhere? [17:49] elliottcable: for instance, inside, `global === the_sandbox.global` is false [17:49] elliottcable: which is extremely odd. How could the global variable “global” exist, if it’s not defined on the sandbox? [17:50] SubStack: pretty sure runInNewContext doesn't give a shit about globals [17:50] context: please dont run anything inside of me [17:50] SubStack: context is just for top-level lexicals [17:50] elliottcable: I thought maybe the `vm` module was creating it, but nope; as you just discovered when running that snippet, there shouldn’t be any “global” object [17:50] eee_c has joined the channel [17:50] context: i prefer to be on top, correct. [17:50] elliottcable: SubStack › differentiate? [17:50] elliottcable: context › you must get a lot of superfluous hilights, with that name. [17:51] context: elliottcable: yes i do [17:51] elliottcable: SubStack › can you explain what you mean? It’d be *really* helpful to remotely understand what’s going on here, for my project. /== [17:51] jacobolus has joined the channel [17:51] elliottcable: I have no idea how global-variables that I didn’t put in the sandbox object are getting into the global scope of the file being vm’d [17:51] SubStack: there's no global/window object for the scope resolution to fallback on for runInNewContext [17:51] tilgovi has joined the channel [17:51] tilgovi has joined the channel [17:52] SubStack: I would guess that you're doing it wrong™ [17:52] context: unless you give the context a 'window'/'global' to look at [17:52] TheJH: elliottcable, if runInNewContext gives you a "global" variable in your scope, you either exposed it or created it yourself inside the new context - could you put up a gist? [17:52] elliottcable: SubStack › that’s what I assumed the case would be. [17:52] elliottcable: SubStack › that’s *exactly what I would want to happen* )= [17:52] context: context = {global: global}; runInNewContext(context, awesome); [17:53] TheJH: elliottcable, hard to help when I've got no code to look at [17:53] elliottcable: TheJH › the new context has no code except for “throw global === .global” [17:53] context: you PUT whatever you want in the context. [17:53] elliottcable: which prints false (have to use throw, since console isn’t available) [17:53] context: simple as that. [17:53] elliottcable: context › read that again [17:53] elliottcable: “global !== .global” [17:53] elliottcable: so it’s *not* coming in from the context object [17:53] context: :/ [17:53] elliottcable: that’s … why I’m so damn confused [17:54] TheJH: elliottcable, what does “throw global !== .global” print? [17:54] TheJH: elliottcable, I'm pretty sure the stuff you throw gets messed up [17:54] jchris has joined the channel [17:54] context: global itself looks pretty useless [17:54] skm has joined the channel [17:55] elliottcable: node.js:134 throw e; // process.nextTick error, or 'error' event on first tick ^ [17:55] elliottcable: true [17:55] fangel has joined the channel [17:55] elliottcable: context › yeah, I don’t actually need/want `global` … I ran into this while trying to debug an even weirder issue, that I mentioned in passing above [17:55] TheJH: elliottcable, really, make a working gist [17:55] cnus8n has joined the channel [17:55] vampi-the-frog has joined the channel [17:55] vampi-the-frog has joined the channel [17:56] elliottcable: context › in my original testing, in a simple one-off file just for this purpose, it seems that adding / deleting values on the context object *inside the vm’d file* “works” (i.e. adds/removes globals for you to access) [17:56] TheJH: elliottcable, or even better, one that doesn't work because of the issue you're running into :D [17:56] context: ... [17:56] context: so the problem ... [17:56] elliottcable: context › but trying it in the scope of my larger project fails, i.e. adding “blah” to the context object doesn’t result in a “blah” in the scope hierarchy [17:57] Bwen: I want to use javascript to "parse" a .html before node returns it. Is it possible to use querySelector and all that is available on client-side within node?? shouldnt V8 be able to do that... [17:57] context: elliottcable: maybe you are infact looking at two different objects [17:57] TheJH: elliottcable, are you reusing the global object across multiple contexts? [17:57] context: your context one place is not whatever object you are looking at somewhere else [17:57] elliottcable: context › yes, I am, that’s the problem [17:57] cying has joined the channel [17:57] context: maybe you are trying to 'share too much' ? [17:57] elliottcable: context › i.e. *some* things from the context object seem to be copied into the global scope, but not all of them. [17:57] elliottcable: TheJH › nope, it’s created for this sole purpose [17:57] siculars has joined the channel [17:58] elliottcable: TheJH › anyway, you asked for code … you won’t like the anser. I wouldn’t, if I were in your shoes. [17:58] context: elliottcable: try creating a simplified gist that displays your problem [17:58] elliottcable: Basically, you *can’t* help me, because the code involving the `vm` is too long and complex. [17:58] context: 'simplify' it [17:58] TheJH: !admin eval (function(){var vm=require('vm');var g={};vm.runInNewContext('a=1', g);return vm.runInNewContext('a', g)})() [17:58] jhbot: 1 [17:58] context: create a basic example that gives you the result your 'complex' project does [17:58] thurmda has joined the channel [17:58] elliottcable: I mean, if you want to look, here’s the relevant call, [17:58] elliottcable: https://github.com/elliottcable/from/blob/Fixins/lib/from-new.js#L69-85 [17:58] context: one: a project should never be 'long' 'confusing' or 'complex' [17:59] context: there is your first problem [17:59] elliottcable: context › yes, I’ve been trying for almost two days now [17:59] TheJH: elliottcable, I'm pretty sure runInNewContext takes two arguments [17:59] elliottcable: context › er, you’re seriously telling me that if you were working on a project and had an issue, any one of your projects, that you could paste a link into the middle of your code into a support channel and reasonably expect the person helping you to understand all of it at a glance? [17:59] context: thejh: depends what its being ran from [17:59] jmoyers: Bwen not directly [17:59] context: vm or script [17:59] jmoyers: the DOM is a browser implementation detail [18:00] elliottcable: I’m all for simple and understandable code, yes [18:00] context: no but's. [18:00] elliottcable: but for pasting into a support channel? that’s a whole ’nother bag of apples. [18:00] jmoyers: Bwen you can use a package like jsdom, though [18:00] context: elliottcable: GIST [18:00] context: OR PASTIE.ORG [18:00] elliottcable: context › ಠ_ಠ [18:00] context: no one ever said paste into channel. [18:00] elliottcable: I meant “paste a link into the channel” [18:00] iivvoo has joined the channel [18:01] elliottcable: nobody would be insane enough to paste raw code into the channel, unless it’s a line long perhaps, in 2011 [18:01] context: elliottcable: in my experience code speaks a lot louder than someone trying to explain said code [18:01] context: especially when they cant explain how it does not work [18:01] elliottcable: TheJH › that’s Script.prototype.runInNewContext, not vm.runInNewContext() [18:01] elliottcable: TheJH › just FYI [18:01] elliottcable: context › absolutely [18:01] TheJH: elliottcable, yes, just realized [18:01] elliottcable: as I said, I’ve already spent two days on this issue [18:01] context: elliottcable: for all you know, someone in here could look at 500+ lines of code you pastie, and find your problem within 10 seconds [18:01] elliottcable: with absolutely one purpose: reproduce the issue in a smaller codebase, so I could submit a GitHub Issue, or bring it to this channel. [18:01] elliottcable: but *I can’t*. [18:02] ryanfitz has joined the channel [18:02] ryanrolds has joined the channel [18:02] elliottcable: I cannot reproduce this anywhere else; it’s only here that the `global` object is existing, and existing *separately* from the context object being passed in [18:02] context: you cannot reproduce what already exists? [18:02] elliottcable: anyway, all of that code should be irrelevant anyway. I really cannot see how anything in that code could affect the fact that this is false: [18:02] elliottcable: `throw global === from.sandbox.global` [18:03] TheJH: elliottcable, what do you get when you do "from.sandbox.global === from.sandbox" before the runInNewContext call? [18:03] hermanjunge has joined the channel [18:03] elliottcable: TheJH › adding [18:04] jsurfer has joined the channel [18:04] elliottcable: (Also, for what it’s worth, I really just came in here to bitch once and be done with it; I realized hours ago that no-way-no-how am I going to get a reduced test case for this issue before I crash tonight) [18:04] context: > vm.runInNewContext('see = 1;', context) [18:04] context: > context [18:04] context: { global: {}, see: 1 } [18:04] elliottcable: (So I *really* appreciate the unsolicited help, TheJH) [18:04] context: not everything goes into global. [18:04] elliottcable: context › mmhmm, I’m aware; that’s not what I was trying to do. [18:04] context: if anything at all. [18:04] torsd has joined the channel [18:05] TheJH: context, I think you're wrong [18:05] jsurfer has joined the channel [18:05] elliottcable: I wasn’t trying to set global variables and retreive them from the context-object; I’m trying to *set* properties on the context-object, and have them show up in the global scope [18:05] elliottcable: TheJH: true [18:05] elliottcable: `console.log('TheJH: '+(from.sandbox.global === from.sandbox))` [18:06] TheJH: !admin eval (function(){context={};vm.runInNewContext('see = 1;', context);return context.see})() [18:06] TheJH: meh [18:06] context: heh [18:06] context: bot gone? [18:06] TheJH: !admin eval (function(){context={};require('vm').runInNewContext('see = 1;', context);return context.see})() [18:06] jhbot: 1 [18:06] TheJH: context, look [18:06] TheJH: context, no, but it silently catches errors [18:07] elliottcable: that would make sense, if it’s doing a `with()`-style thing [18:07] context: elliottcable: works on the bot. [18:07] jsurfer has joined the channel [18:07] TheJH: aaaaah [18:07] TheJH: I think I know [18:07] context: so you are setting stuff in the context, and it does not save to the context [18:08] context: so lets see the code being executing in runInNewContext [18:08] elliottcable: context › http://ell.io/dV1J [18:08] vguerra has joined the channel [18:08] elliottcable: ignore all the commented crap, that’s other stuff I was testing previously [18:08] TheJH: elliottcable, inside the VM, the root global object is always a different one than in the upper context, I think - for example, has another constructor [18:08] elliottcable: also, of interest: you can see I was iterating properties with Object.getOwnPropertyNames for the odd `global` object [18:08] elliottcable: it has *no properties*, nothing whatsoever. A completely empty object. [18:09] konobi: var bar? [18:09] elliottcable: TheJH › you mean, ah, that, `parent.global.Objet ≠ vm_child.global.Object` [18:09] elliottcable: yes? [18:09] elliottcable: konobi › metasyntatic variables. they’re great. [18:09] konobi: that's what you're looking for? [18:10] elliottcable: I once got to meaningfully use a *meta-metasyntatic-variable*. It rocked. ^‿^ [18:10] elliottcable: konobi › hm? No, that’s irrelevant. Some stuff I have to leave in there to prevent the entire library from crashing (it’s unfinished) [18:10] elliottcable: doesn’t affect the global state, though [18:10] TheJH: elliottcable, yes, I think so [18:10] elliottcable: TheJH › I’m not quite following. I *expected* that much, but I’m not sure why that would affect *this* … [18:11] sdudenhofer has joined the channel [18:11] konobi: ACTION has no idea what you're actually wanting [18:11] TheJH: !admin eval (function(){context={};context.global=context;return require('vm').runInNewContext('global', context)===context})() [18:11] jhbot: false [18:12] TheJH: !admin eval (function(){context={};context.global=context;return require('vm').runInNewContext('global', context).constructor.name+context.constructor.name})() [18:12] TheJH: meh [18:13] TheJH: !admin eval (function(){context={};context.global=context;return require('vm').runInNewContext('global', context)===context})() [18:13] jhbot: false [18:13] TheJH: !admin eval (function(){context={};context.global=context;return require('vm').runInNewContext('global.global', context)===context})() [18:13] jhbot: false [18:13] TheJH: !admin eval (function(){context={a:{}};context.global=context;return require('vm').runInNewContext('a', context)===context.a})() [18:13] jhbot: true [18:13] elliottcable: > var ctx={me:ctx};require('vm').runInNewContext('me.__proto__',ctx)===Object [18:13] elliottcable: false [18:14] elliottcable: er, my bad [18:14] elliottcable: > var ctx={me:ctx};require('vm').runInNewContext('me.__proto__',ctx)===Object.prototype [18:14] elliottcable: true [18:14] colinclark has joined the channel [18:14] dgathright has joined the channel [18:14] elliottcable: > var ctx={me:ctx};require('vm').runInNewContext('Object.prototype',ctx)===Object.prototype [18:15] elliottcable: false [18:15] elliottcable: so, we’ve established that the context object is using a foreign prototype, not something from the NewContext being created [18:16] jetienne: http://learningthreejs.com/data/node/ houra ode to node.js in webgl (not sure what to do about it) [18:16] konobi: eval var foo = (function(){context={a:{}};context.global=context;return require('vm').runInNewContext('a', context)})(); setTimeout(function(){ return foo === context }, 500); [18:16] donspaulding has joined the channel [18:17] donspaulding: are there any logs I can look at to troubleshoot segfaults while trying to install npm in 0.5.X? [18:17] jetienne: donspaulding: segfault in install ? yuck [18:18] jetienne: (i dunno about the log btw) [18:18] elliottcable: AHHAH [18:18] elliottcable: I think I solved it. [18:18] elliottcable: Can somebody evalBot this for me? [18:18] elliottcable: var scr = require('vm').createScript('me.aValue = 123; aValue'), ctx={me:ctx}; scr.runInNewContext(ctx) [18:18] CarterL has joined the channel [18:18] TheJH: v8> "Im here" [18:18] v8bot_: TheJH: "Im here" [18:19] elliottcable: v8bot won’t do Node stuff [18:19] hermanjunge: README.md question [18:19] TheJH: !admin eval (function(){var scr = require('vm').createScript('me.aValue = 123; aValue'), ctx={me:ctx}; scr.runInNewContext(ctx)})() [18:19] hermanjunge: does somebody know how to include images in a readme.md file? [18:19] baudehlo: hermanjunge: just use HTML tags. [18:19] jetienne: hermanjunge: just push normal html. it is handled in markdown [18:19] hermanjunge: var ctx={ctx:ctx}; ctx.foo = 'baz'; require('vm').runInNewContext("ctx.foo = 'bar'; foo", ctx) [18:24] elliottcable: 'baz' [18:24] elliottcable: what. what. [18:24] T0bsn has joined the channel [18:25] elliottcable: > var ctx={ctx:ctx}; ctx.foo = 123; require('vm').runInNewContext("ctx.foo = 456; bar = 789; foo", ctx); console.log(ctx.foo+','+ctx.bar) [18:25] elliottcable: 123,789 [18:25] schokocappucino has joined the channel [18:26] elliottcable: okay, so creating new global variables *does* modify the context object [18:26] elliottcable: but modifying the context object *does not* create new global variables. [18:26] jetienne: console.log(ctx.foo, ctx.bar) <- just a possible alterantive, maybe more readable [18:27] elliottcable: I thought console.log() did some crazy printf-style-stuff now [18:27] elliottcable: hence why I avoided passing it multiple arguments [18:27] elliottcable: mmm apparently not. Thanks, jetienne [18:27] cnus8n has joined the channel [18:28] todd-m2n has left the channel [18:28] CIA-109: node: 03Ben Noordhuis 07issue1330-2 * rc4eaf7e 10/ (4 files in 2 dirs): crypto: implement randomBytes() and pseudoRandomBytes() - http://git.io/dMbp_w [18:28] CIA-109: node: 03Ben Noordhuis 07issue1330-2 * r413d38c 10/ test/simple/test-crypto-random.js : test: test crypto (P)RNG functions - http://git.io/dQx-HQ [18:28] CIA-109: node: 03Ben Noordhuis 07issue1330-2 * rabfcd1f 10/ doc/api/crypto.markdown : docs: document crypto.randomBytes() - http://git.io/bPBPuA [18:28] piscisaureus_ has joined the channel [18:31] johnwards has joined the channel [18:31] fdmanana has joined the channel [18:31] Swizec has joined the channel [18:32] piscisaureus has joined the channel [18:33] darinc has joined the channel [18:33] elliottcable: mmhmm [18:33] elliottcable: er, oops [18:34] drudge: damn you fastlegs [18:34] elliottcable: drudge! [18:34] drudge: hey [18:35] elliottcable: TheJH › I need to sleep, I’m so exhausted that I can’t read the text going by in my channels [18:35] elliottcable: TheJH › but I’m going to post this to the Node issuetracker, if I can figure out a way to word it that doesn’t make me sound psychotic [18:35] elliottcable: TheJH › I appreciate your help in tracking things down. [18:36] knifed has joined the channel [18:36] Cromulent has joined the channel [18:38] postwait has joined the channel [18:38] Renegade001 has joined the channel [18:40] reid has joined the channel [18:42] maushu has joined the channel [18:43] mikeric has joined the channel [18:48] saikat has joined the channel [18:48] temp01 has joined the channel [18:49] TheFuzzball has joined the channel [18:49] enosis has joined the channel [18:50] dshaw_ has joined the channel [18:50] PhilK has joined the channel [18:51] jsurfer_ has joined the channel [18:51] dmkbot has joined the channel [18:51] saikat has joined the channel [18:53] enosis: has anyone used restify or journey and can suggest which one (or even another solution i've missed) is preferable for API development? [18:56] CIA-109: node: 03Ben Noordhuis 07master * rc4eaf7e 10/ (4 files in 2 dirs): crypto: implement randomBytes() and pseudoRandomBytes() - http://git.io/dMbp_w [18:56] CIA-109: node: 03Ben Noordhuis 07master * r413d38c 10/ test/simple/test-crypto-random.js : test: test crypto (P)RNG functions - http://git.io/dQx-HQ [18:56] CIA-109: node: 03Ben Noordhuis 07master * rabfcd1f 10/ doc/api/crypto.markdown : docs: document crypto.randomBytes() - http://git.io/bPBPuA [18:57] jetienne_ has joined the channel [18:59] harthur has joined the channel [18:59] topaxi has joined the channel [18:59] cjm has joined the channel [18:59] jakehow has joined the channel [19:00] MUILTFN_ has joined the channel [19:02] tjholowaychuk: enosis nothing beats trying them yourself, lots of people use express for web services as well [19:03] enosis: i'll probably do down that route :) although express might be an unnecessary overhead [19:04] tjholowaychuk: perhaps, but if you dont have a bottleneck, you have nothing to optimize [19:04] tjholowaychuk: so determine that first [19:04] tjholowaychuk: and benchmark everything [19:04] wbednarski has joined the channel [19:04] tjholowaychuk: restify is larger than express so dont assume things [19:05] enosis: ic [19:05] tjholowaychuk: if you really need perf just do switch (url.parse(req.url).pathname){ case '/mypath': do stuff [19:05] tjholowaychuk: with node [19:05] tjholowaychuk: and no libs [19:05] enosis: alright, thanks for the pointers [19:06] TomY has joined the channel [19:08] piscisaureus_ has joined the channel [19:08] Country has joined the channel [19:08] hasenj has joined the channel [19:09] DrMcKay: anyone with a Mac here would mind clarifying what `which -s` does? [19:09] DrMcKay: (what -s does, specifically) [19:09] guidocalvano has joined the channel [19:10] micheil: gives me /usr/local/bin/node [19:10] joshkehn: Returns 0 / 1 [19:10] micheil: for which -s node [19:10] tbranyen: i think you need a manwhich [19:10] joshkehn: As an exit code [19:10] tbranyen: man which* [19:10] joshkehn: Joshs-MacBook-Pro:~ josh$ which node [19:10] joshkehn: /usr/local/bin/node [19:10] joshkehn: Joshs-MacBook-Pro:~ josh$ which -s node [19:10] joshkehn: Joshs-MacBook-Pro:~ josh$ echo $? [19:10] joshkehn: 0 [19:10] DrMcKay: joshkehn: ah, thanks [19:10] micheil: ah [19:10] micheil: cool [19:10] Dulak has joined the channel [19:10] Dulak has joined the channel [19:10] DrMcKay: tbranyen: I'm on linux now and haven't found OS X manuals online [19:11] joshkehn: It's basically the same as which node &> /dev/null [19:11] parshap has joined the channel [19:11] DrMcKay: tbranyen: and Linux one doesn't support -s [19:11] DrMcKay: joshkehn: OK, thanks :) [19:12] olivvv has joined the channel [19:12] tbranyen: DrMcKay: fair enough :) [19:12] tbranyen: figured you were just being lazy [19:13] DrMcKay: tbranyen: no problem :). [19:13] DrMcKay: and I've done 4 pull requests today, I can't be lazy! [19:13] joshkehn has left the channel [19:14] joshkehn has joined the channel [19:14] mkrecny_ has joined the channel [19:15] jhurliman has joined the channel [19:16] piscisaureus has joined the channel [19:20] hkjels_ has joined the channel [19:21] softdrink: on the commonjs.org specs page, what's with the naming of the sections? http://www.commonjs.org/specs/ [19:22] Swizec_ has joined the channel [19:22] steffan has joined the channel [19:23] darinc has joined the channel [19:23] dgathright has joined the channel [19:25] mraleph has joined the channel [19:26] airhorns has joined the channel [19:26] skm has joined the channel [19:26] jetienne_ has joined the channel [19:26] miccolis has left the channel [19:26] nelhage has left the channel [19:30] odyniec_ has joined the channel [19:31] broofa has joined the channel [19:31] lz has joined the channel [19:31] olivvv: hi guys. I tryi ng to update my od node.js install but i get : fatal: destination path 'node' already exists and is not an empty directory. [19:32] DrMcKay: olivvv: cd node && git pull [19:32] crash82 has joined the channel [19:32] darinc has joined the channel [19:32] bartt has joined the channel [19:33] olivvv: I am really not sure of what I am doing [19:33] olivvv: olivvv@olivvv-VirtualBox:~/node$ cd .. [19:33] olivvv: olivvv@olivvv-VirtualBox:~$ cd node [19:33] olivvv: olivvv@olivvv-VirtualBox:~/node$ git pull [19:33] olivvv: fatal: Not a git repository (or any of the parent directories): .git [19:33] olivvv: olivvv@olivvv-VirtualBox:~/node$ ^C [19:33] olivvv: olivvv@olivvv-VirtualBox:~/node$ [19:34] DrMcKay: olivvv: ah, OK. then just clone node to other directory [19:34] DrMcKay: git clone git-node [19:35] crash82 has joined the channel [19:36] aheckmann has joined the channel [19:36] alekhine has joined the channel [19:37] fatjonny has joined the channel [19:38] pquerna: ah, so tom is on my flight. [19:38] lz has left the channel [19:38] lz has joined the channel [19:39] alekhine has joined the channel [19:40] liar has joined the channel [19:40] AD7six has joined the channel [19:40] mediahack has joined the channel [19:40] DrMcKay: pquerna: tom? [19:41] perezd has joined the channel [19:41] pquerna: sh1mmer [19:41] DrMcKay: ACTION fast github lookup [19:42] DrMcKay: wow [19:42] micheil: pquerna: flight to? [19:42] DrMcKay: some nice projects he has there [19:42] CIA-109: node: 03Ryan Dahl 07master * r0f8f863 10/ (src/node.js src/node_stdio.cc): Fixes #1726, hack to unref process.stdout - http://git.io/nv3mYA [19:43] pquerna: heading to baltimore. [19:43] pquerna: for the surge conference [19:43] pquerna: there is a node.js day :) [19:43] rfay has joined the channel [19:43] micheil: ah [19:43] micheil: pquerna: I thought it may have randomly been jsconf.eu [19:43] Sami_ZzZ has joined the channel [19:43] micheil: pquerna: btw, what's with your recruiters? [19:44] pquerna: good or bad :-/ ? [19:44] pquerna: guessing bad [19:44] dreamdust has joined the channel [19:44] alekhine has joined the channel [19:44] dgathright has joined the channel [19:45] scott_gonzalez has joined the channel [19:47] tauren: does browserify support lazy-loading of modules? My app has sections that users rarely go to, it would be nice if I could load those specific modules only if necessary. [19:47] DrMcKay: tjholowaychuk: SYN? [19:50] CIA-109: node: 03Fedor Indutny 07master * r95866a6 10/ lib/_debugger.js : [19:50] CIA-109: node: debugger: export port [19:50] CIA-109: node: Fixes test-debugger-client.js [19:50] CIA-109: node: Fixes #1782. - http://git.io/unsBCg [19:53] CIA-109: node: 03Ryan Dahl 07master * rf5bdce9 10/ (6 files in 2 dirs): Disable test-dgram-unix.js test-dgram-unix-anon.js test-dgram-multicast.js - http://git.io/HZAPPg [19:54] tauren: SubStack: ^ browserify question above if you have time [19:54] beeviz has joined the channel [19:54] SubStack: tauren: nope [19:54] tauren: didn't think so, thanks [19:55] Wa has joined the channel [19:55] liar has joined the channel [19:56] N0va` has joined the channel [19:56] matjaz has joined the channel [19:57] fread2281 has joined the channel [19:59] Ondreian has joined the channel [20:00] Ondreian: hello [20:00] zemanel has joined the channel [20:00] dgathright has joined the channel [20:01] fread228_ has joined the channel [20:01] boaz has joined the channel [20:02] blueadept has joined the channel [20:02] aron_ has joined the channel [20:02] nmir has joined the channel [20:05] mike5w3c_ has joined the channel [20:05] dgathright has joined the channel [20:07] CIA-109: node: 03Ryan Dahl 07new-tty-binding * r696210f 10/ test/simple/test-module-load-list.js : Fix test-module-load-list.js (+7 more commits...) - http://git.io/FRhu4A [20:07] Swizec_ has joined the channel [20:07] pNstK has joined the channel [20:08] gxdssoft has joined the channel [20:11] sub_pop has joined the channel [20:11] CIA-109: node: 03Ryan Dahl 07new-tty-binding * r41d811f 10/ test/simple/test-module-load-list.js : Fix test-module-load-list.js - http://git.io/DHOvxA [20:12] shellox has joined the channel [20:12] shellox: hi [20:13] _kud has joined the channel [20:13] shellox: how to add stuff of an array to a select list? [20:14] joshkehn: shellox: Can you clarify a bit? [20:14] fread2281 has joined the channel [20:14] brianloveswords has joined the channel [20:15] CIA-109: node: 03Ryan Dahl 07master * rf63a1f8 10/ (26 files in 9 dirs): Merge branch 'new-tty-binding' (+8 more commits...) - http://git.io/FSs0cA [20:15] level09 has joined the channel [20:16] jamenzin has joined the channel [20:16] shellox: joshkehn: yep. I want to add an title as option to a select list [20:17] shellox: so the titles are in an array, but how to add them as options? [20:17] joshkehn: Clarify “select list” [20:17] shellox: damn :P [20:17] joshkehn: I'm thinking [20:17] joshkehn: Got it. [20:17] joshkehn: So you have an array of objects, each with a title and value, right? [20:18] joshkehn: Something like [20:18] m00p has joined the channel [20:18] joshkehn: [ {"title":"January","value":1}, ….] [20:18] JJMalina has joined the channel [20:18] joshkehn: And you want to generate a list of ... [20:19] piscisaureus has joined the channel [20:22] zvart has joined the channel [20:23] fread228_ has joined the channel [20:23] broofa_ has joined the channel [20:25] CIA-109: libuv: 03Ryan Dahl 07master * r10c5293 10/ README.md : Update list of supported features - http://git.io/ctlQsA [20:25] skm has joined the channel [20:25] shellox: joshkehn: i got the useful advice to use underscore.js now :P [20:26] shellox: _.each(['foo','nar'], function(blah){console.log(blah);}); [20:26] shellox: i just have to find out how to append it :) [20:26] tjholowaychuk: shellox ['foo', 'bar'].forEach(function( [20:26] joshkehn: $('select').append [20:26] joshkehn: But you can (as TJ just pointed out) use the native forEach functions [20:26] joshkehn: You could also use Weld (weld.js) [20:26] joshkehn: Which pretty much rocks. [20:27] edenli has joined the channel [20:28] jbpros has joined the channel [20:28] schokocappucino: can I set how deep console.log prints objects? can't display a parse tree using a deepness of 2 :( [20:28] joshkehn: I'm not sure. [20:30] Lingerance: schokocappucino: console.dir uses util.inspect internally, which defaults to a depth of 2. So just do: console.log(util.inspect(...)) [20:30] AvianFlu: schokocappucino, util.inspect takes an optional integer arg of how many levels, to [20:30] AvianFlu: too [20:31] shellox: tjholowaychuk: thanks [20:31] schokocappucino: oh.. thats cool :) thanks [20:31] ShonM has joined the channel [20:31] shellox: ah, my issue. I cant use jquery on the server side if i haven't it installed over npm :P [20:32] fread2281 has joined the channel [20:34] mynameisbender has joined the channel [20:35] bipin has joined the channel [20:35] bradleymeck has joined the channel [20:36] mbrevoort has joined the channel [20:37] nmir has joined the channel [20:37] c4milo1: what's the known technique to go around circular dependencies issues in nodejs? [20:37] c4milo1: I'm getting an empty hash hehe [20:37] c4milo1: in my require [20:37] fmeyer has joined the channel [20:37] dshaw_ has joined the channel [20:38] ShonM has left the channel [20:38] broofa has joined the channel [20:39] bradleymeck: c4milo1, require early and once you have done the require wait for an event (commonly this is done by making module.exports a function) [20:40] piscisaureus has joined the channel [20:40] bradleymeck: if you have a circular dep though, you may want to restructure your code since they are often the result of forcing something into an abstraction / multiple modules [20:40] c4milo1: bradleymeck: do you have any example of what you are saying? [20:41] c4milo1: bradleymeck: got it [20:41] brannig has joined the channel [20:41] andrewfff has joined the channel [20:42] bradleymeck: var a = require('b')(function resolved(){...}); ///// var b = require('a'); module.exports = function ready(callback) {setup(); callback();} ; [20:43] else has joined the channel [20:44] ShonM has joined the channel [20:45] Renegade001 has joined the channel [20:46] Swizec has joined the channel [20:46] ShonM has left the channel [20:46] shipit has joined the channel [20:47] broofa has joined the channel [20:49] fread228_ has joined the channel [20:49] liar has joined the channel [20:50] piscisaureus has joined the channel [20:52] dshaw_ has joined the channel [20:52] dshaw_1 has joined the channel [20:53] wbednarski has joined the channel [20:53] jmoyers has joined the channel [20:54] fread2281 has joined the channel [20:55] mootrix has joined the channel [20:56] devongovett has joined the channel [20:56] jetienne_ has joined the channel [20:57] balgarath has joined the channel [20:58] igl has joined the channel [20:59] eldios has joined the channel [21:00] fread2281 has joined the channel [21:01] RK has joined the channel [21:01] RK: Hi,, Is there anyone who can help me with an issue? [21:02] sfoster has joined the channel [21:02] AvianFlu: RK you should just ask, there are 719 people who occasionally glance at this channel [21:03] AvianFlu: likely more than that, really [21:03] darinc has left the channel [21:03] RK: ok.. just new.. so catching up.. [21:03] joshkehn: RK: Short answer: Probably. :) [21:03] RK: wscript:250: error: could not configure a cxx compiler! [21:03] joshkehn: ACTION promptly pretends to ignore the channel.  [21:04] RK: this is the dreaded issue i am facing with cygwin..when trying to configure node [21:05] RK: I have tried re-installing, tried rebase.. and probably quite a few things that i found in google since yesterday.. but it wont badge [21:05] TheJH: RK, you don't have a handy linux vm somewhere? [21:05] shripad has joined the channel [21:05] TheJH: RK, I think you should either use the real windows node (although afaik npm doesn't run there) or just use a linux vm [21:06] RK: no.. I dont have a Linux VM :( [21:07] RK: and the real windows node can be run through the downloader which is on net? [21:07] TheJH: RK, huh? just download the node.exe file and run it on the windows command shell [21:07] stalled has joined the channel [21:08] TheJH: RK, http://nodejs.org/dist/v0.5.7/node.exe [21:08] TheJH: RK, no need to install it or anything like that [21:08] RK: okay.. [21:08] RK: thanks a lot.. I will try this as well.. [21:09] Venom_X has joined the channel [21:09] kalprestito has joined the channel [21:09] fread2281 has joined the channel [21:11] shellox: i setup a underscore for an project and have this code in my ejs file <% _.each(['Mr','Ms'], function(blah){}); %> [21:11] shellox: but i got always: _ is not defined [21:11] RK: TheJH, just a random question.. so even once if the node is set up, we may not be able to use npm from cygwin? [21:11] jetienne_ has joined the channel [21:12] TheJH: RK, I'm not completely sure, but I think npm doesn't run on windows yet, be it with or without cygwin [21:12] TheJH: RK, but you might want to ask isaacs or so (he's the main npm developer) [21:13] fread228_ has joined the channel [21:13] RK: okay.. will do that.. thanks again :) [21:15] blueadept has joined the channel [21:15] blueadept has joined the channel [21:16] TomY has joined the channel [21:16] mikeric has joined the channel [21:17] shellox: here the full error log: https://gist.github.com/aa428d79b25b56603c48 [21:17] Kurotek has joined the channel [21:17] shellox: I have no idea why i cant use the underscore functions [21:17] fread2281 has joined the channel [21:17] shellox: it see a folder underscore in node_modules [21:17] shellox: s/it/I/ [21:18] adambeynon has joined the channel [21:20] CoverSlide: npm kind of works on cygwin, but with tons of errors [21:20] CoverSlide: but I've installed modules through it, basically by hammering at it until all the folders get created [21:21] tbranyen: i never really had any issues with cygwin [21:21] fread228_ has joined the channel [21:21] RK: CoverSlide.. that is kind of reassuring :) [21:22] kalprestito has joined the channel [21:22] CoverSlide: I think it's a problem with cygwin's tar [21:22] CoverSlide: but it's been a while since I've used it [21:23] amiller has joined the channel [21:24] kalprestito has left the channel [21:25] kalprestito has joined the channel [21:26] hasenj has joined the channel [21:27] liar has joined the channel [21:27] tilgovi has joined the channel [21:29] metellus has joined the channel [21:29] fread2281 has joined the channel [21:30] heavensgate has joined the channel [21:30] dshaw_ has joined the channel [21:30] heavensgate: Why isnt windows supported? [21:30] xicubed has joined the channel [21:31] shellox: heavensgate: because the tech people use a *nix system :P [21:32] CIA-109: node: 03Fedor Indutny 07master * r0a42266 10/ src/node.cc : [21:32] CIA-109: node: debugger: double ctrl+break on win should exit node [21:32] CIA-109: node: Fixes #1780. - http://git.io/tphing [21:32] heavensgate: CIA-109 how are you? [21:32] RK: Thanks a lot for all those who have been of great help..Logging off [21:33] shellox: joshkehn: can you help me with an issue [21:33] joshkehn: shellox: I can try [21:33] shellox: i installed underscore.js, added it to my project, but i still get the error _ is not defined [21:34] joshkehn: Did you require() it? [21:34] shellox: if i try it in the interactive shell, then the command works [21:34] brainproxy: shellox: in the REPL you may need to require underscore as something other than _ [21:34] brainproxy: because _ has a special meaning in the REPL [21:34] brainproxy: just a heads up [21:34] shellox: joshkehn: i use express [21:34] hasenj has joined the channel [21:35] saschagehlich has joined the channel [21:35] shellox: i added it to the .json config file [21:35] shellox: , "underscore": "1.1.7" [21:35] joshkehn: shellox: I'm not that familiar with that. [21:35] joshkehn: Oh. [21:35] shellox: this is the line [21:35] joshkehn: You still need to say [21:35] tjholowaychuk: shellox you need to expose locals to views [21:35] liar has joined the channel [21:35] tjholowaychuk: they are not just magically there [21:35] tjholowaychuk: so [21:35] joshkehn: var _ = require('underscore') I believe. [21:35] tjholowaychuk: app.helpers({ _: _ }) [21:35] tjholowaychuk: for example [21:35] fread2281 has joined the channel [21:35] joshkehn: Granted I'm not as familiar with express. [21:36] simenbrekken: Is there an easier way to produce a GMT Date than this ridiculous Date.UTC(now.getFullYear(), now.getMonth(), now.getDate(), now.getHours(), now.getMinutes(), now.getSeconds(), now.getMilliseconds())? [21:36] joshkehn: Welcome to JavaScript dates simenbrekken [21:36] socialhack has joined the channel [21:37] simenbrekken: joshkehn: thanks, the hate has engulfed me a couple of hours ago and now I'm just trying to grip onto sanity [21:37] brainproxy: well just wrap it in a method and reuse :) [21:37] joshkehn: TA-DA! [21:37] saschagehlich: tjholowaychuk: ping! do you know a reason for connect setting the connect.sid cookie expire date to the current date? [21:37] joshkehn: But it's not always that easy. [21:37] saschagehlich: tjholowaychuk: so that stuff like everyauth does not work anymore? :( [21:38] dreamdust has joined the channel [21:38] joshkehn: I wrote a date format lib at one point based on the unix `date` command. [21:38] tjholowaychuk: saschagehlich not unless maxAge is 0 or something no [21:38] joshkehn: You're welcome to use if if you like. [21:38] saschagehlich: tjholowaychuk: any good point where I could start debugging it? [21:38] simenbrekken: joshkehn: links or stfu! [21:38] euforic has joined the channel [21:39] joshkehn: simenbrekken: Working on it. ;) [21:39] simenbrekken: Actually I'm fine with this for now, just as long as I make sure my servers tun GMT [21:39] broofa has joined the channel [21:39] sub_pop has joined the channel [21:39] tjholowaychuk: saschagehlich add a break point in the ./node_modules/connect/lib/middleware/session.js and go from there [21:39] joshkehn: It's got some log4js crap in there, but it should be pretty easy to rip out. [21:39] saschagehlich: alrighty [21:39] shellox: joshkehn: tjholowaychuk this was the issue, THANKS :) [21:39] joshkehn: simenbrekken: https://gist.github.com/1246327 [21:39] simenbrekken: joshkehn: even cooler? Google Chrome sets your timezone based on the servers location or some s*it, I had the same code running here in Oslo and in Ireland and Console new Date() produces two different dates. [21:39] aelien27 has joined the channel [21:40] zemanel has joined the channel [21:40] eirikb has joined the channel [21:40] simenbrekken: joshkehn: thanks, time for bed but I'll look into this tomorrow! [21:40] joshkehn: simenbrekken: Gotta love that. ;) [21:40] eirikb: Hello. I'm going to store some json, what is the best appraoch? Folders and .json-files, or are there some neat db-ish solutions that would be easier/faster? [21:40] Lingerance: MongoDB can store JSON. [21:41] joshkehn: eirikb: MongoDB runs off of BSON [21:41] joshkehn: Which is pretty close to JSON [21:41] CoverSlide: as can couch [21:41] joshkehn: I think Couch uses JSON as well [21:41] eirikb: Lingerance: Do I need to install MongoDB or will it work as a plain file in my project? [21:41] joshkehn: Depends on your uses. [21:41] joshkehn: eirikb: You would need to install it. [21:41] Lingerance: You need to install it [21:41] joshkehn: Didn't someone write a JSON in-mem database that could write out to a file? [21:41] eirikb: joshkehn: I'm not the keen on installing something, it's not anything fancy, just need to throw out json to the browser [21:41] CoverSlide: there are in-process db stores for node [21:41] CoverSlide: nstore, alfred, chaos, dirty, tiny [21:42] CoverSlide: are ones I've tried [21:42] tjholowaychuk: nedis! [21:42] tjholowaychuk: haha [21:42] eirikb: CoverSlide: I will look them up, thanks. [21:42] tjholowaychuk: jk [21:42] edenli has joined the channel [21:42] eirikb: CoverSlide: Any recommondations? [21:42] euforic: JSON question How can you build a reference to a json object with strings example http://pastie.org/2602301 [21:42] CoverSlide: nedis was broken last time i tried it [21:42] tjholowaychuk: probably [21:42] neilk_ has joined the channel [21:42] fread228_ has joined the channel [21:43] eirikb: CoverSlide: nstore seems to be popular on github, that is usually a good sign [21:43] Tobsn has joined the channel [21:43] saschagehlich: tjholowaychuk: this is strange... in cookie.js it sets this.maxAge = 14400000... but when I do console.log(this.maxAge); right afterwards, it gives me some negative number [21:43] pt_tr has joined the channel [21:43] tjholowaychuk: saschagehlich hmm interesting [21:43] CoverSlide: i personally like tiny [21:43] eirikb: CoverSlide: I will look at nstore and tiny. Thanks! [21:43] Industrial: hm, on save instead, makes sense [21:44] Industrial: err [21:44] Industrial: mt [21:44] mynix has joined the channel [21:44] eirikb has left the channel [21:44] tjholowaychuk: saschagehlich new Date(Date.now() + ms) is what it's doing so maybe [21:44] tjholowaychuk: hmm [21:44] jmoyers: euforic without understanding the crazy nature of whatever it is you're trying to do with that code there [21:44] CoverSlide: I'm not sure how ACID-compliant any of these are, however [21:44] tjholowaychuk: should still be fine [21:44] jmoyers: generally if you have a string and want json, its JSON.parse [21:44] saschagehlich: yea.. [21:44] hebz0rl has joined the channel [21:45] saschagehlich: the strange thing is that it used to work for 3 days and right now it doesnt work anymore [21:45] tjholowaychuk: nice haha that's always fun [21:46] euforic: i have json i am grabbing data from but the field names vary on the data returned jmoyers [21:46] rfay has joined the channel [21:46] jmoyers: right? so what is the goal [21:46] tjholowaychuk: use a real database [21:46] tjholowaychuk: you'll hate yourself if you dont [21:46] mootrix has left the channel [21:46] tjholowaychuk: unless it's just a little personal project thing [21:47] shellox: tjholowaychuk: <% _(['Mr','Ms']).each(function(n){ %><% }); %> [21:47] shellox: this print me the values in the log now [21:47] jmoyers: or… just .forEach [21:47] shellox: but how to insert the value in the option tag [21:47] jmoyers: es5 environment ;-) [21:47] tjholowaychuk: but using underscore [21:47] tjholowaychuk: on the server is the cool thing to do [21:48] tjholowaychuk: shellox <%= val %> [21:48] tjholowaychuk: <% }); %> [21:50] tjholowaychuk: shellox <%= [21:50] jmoyers: var obj = {some_key: 'value'}; var key = 'some_key'; console.log(obj[key]); [21:50] jmoyers: euforic ^ [21:50] jmoyers: use square bracket notation [21:50] tjholowaychuk: shellox did you read the docs at all :p [21:50] jmoyers: shellox missing = [21:50] jmoyers: = is echo [21:50] jmoyers: in most template languages [21:50] tjholowaychuk: <%= means it will buffer the expression [21:50] shellox: ah right, i remember this from erb [21:51] shellox: i just forgot it :( [21:51] sfoster has joined the channel [21:51] shellox: i need coffee.. [21:51] euforic: wow didn't even think of that sorry for the noobsie question haha jmoyers thanks again [21:51] tjholowaychuk: we all need coffee :D [21:51] tjholowaychuk: ACTION gets coffee [21:51] jmoyers: irc is for questions [21:51] jmoyers: its all good [21:51] jmoyers: well that, and fucking wasting a HUGE amount of time [21:52] TheJH: !@tjholowaychuk coffee compile print "yay" if coffee.is cool [21:52] jhbot: tjholowaychuk, if (coffee.is(cool)) { print("yay"); } [21:52] dgathright has joined the channel [21:52] tjholowaychuk: ahaha [21:53] mehtryx has joined the channel [21:53] mbrevoort has joined the channel [21:53] TheJH: !coco compile obj <<< {wtf: true} [21:53] jhbot: obj.wtf = true; [21:53] broofa has joined the channel [21:53] shellox: good night [21:53] tjholowaychuk: what the hell [21:53] jmoyers: destructuring ;-)? [21:54] shellox: thanks for your help [21:54] kalprestito has left the channel [21:55] kalprestito has joined the channel [21:55] TheJH: it's copying stuff from one object to another one [21:55] parshap: browserify's watch only watches files explicitly passed to require? not all requires found in the AST? ping SubStack [21:55] TheJH: !coco compile obj <<< x [21:55] jhbot: __import(obj, x); function __import(obj, src){ var own = {}.hasOwnProperty; for (var key in src) if (own.call(src, key)) obj[key] = src[key]; return obj; } [21:55] tjholowaychuk: i see [21:55] tjholowaychuk: why wouldnt you just use a function [21:55] Kurotek has joined the channel [21:55] cjm has joined the channel [21:56] stonebranch has joined the channel [21:56] jmoyers: suga sugar sug [21:56] TheJH: tjholowaychuk, because "<<<" is awesome :D - it immediately looked like a needle (you know, for injecting stuff) when I saw it the first time [21:56] tjholowaychuk: haha [21:56] tjholowaychuk: yes [21:56] tjholowaychuk: a needle [21:56] saschagehlich: arr [21:56] saschagehlich: i dunno where this negative numbers come from [21:57] broofa_ has joined the channel [21:59] TheJH: saschagehlich, because too many people use positive numbers in their code and the number balance is gone now. The negative numbers got angry! [21:59] saschagehlich: oooh [21:59] saschagehlich: shit, never thought about that [21:59] TheJH: saschagehlich, you could add a setter that throws when you set a negative value to see what does it [22:00] saschagehlich: oh yeah [22:00] saschagehlich: hang on [22:00] gkmngrgn has joined the channel [22:00] micheil has joined the channel [22:00] wbw72 has joined the channel [22:00] gkmngrgn has joined the channel [22:01] CIA-109: node: 03Ryan Dahl 07master * r7e62bc9 10/ (6 files): [22:01] CIA-109: node: Move process.stdout unref hack to handle_wrap.cc [22:01] CIA-109: node: See #1726 - http://git.io/9NYKQg [22:02] temp01 has joined the channel [22:03] fread2281 has joined the channel [22:03] gkmngrgn has joined the channel [22:03] aheckmann has joined the channel [22:03] edenli: jjk [22:04] CIA-109: node: 03Ryan Dahl 07master * r416c14f 10/ src/node.js : Remove a few instances of process.binding('stdio') from src/node.js - http://git.io/BPmJgg [22:07] kalprestito has left the channel [22:09] guidocalvano has joined the channel [22:09] replore has joined the channel [22:09] replore_ has joined the channel [22:12] markwubben has joined the channel [22:14] ajsie has joined the channel [22:15] crash82 has joined the channel [22:15] tylerstalder has joined the channel [22:17] lmorchard has joined the channel [22:18] eee_c has joined the channel [22:19] fread2281 has joined the channel [22:21] Venom_X has joined the channel [22:21] dominictarr has joined the channel [22:21] ryanfitz_ has joined the channel [22:21] piscisaureus_ has joined the channel [22:22] Wa has joined the channel [22:23] aho has joined the channel [22:26] fattytuna has joined the channel [22:28] Brandon_R has joined the channel [22:28] Brandon_R: Hello guys [22:28] fread2281 has joined the channel [22:29] airhorns: hey is there a way to programatically check if the dependencies listed in package.json are met? [22:29] airhorns: so i can fail a build or a test task if dependencies aren't present? [22:29] joshkehn has joined the channel [22:29] joshkehn has left the channel [22:30] markwubben has joined the channel [22:30] dandean has joined the channel [22:31] yept has joined the channel [22:32] dmkbot has joined the channel [22:34] chance- has joined the channel [22:34] mraleph has joined the channel [22:36] fread2281 has joined the channel [22:37] ecin has joined the channel [22:39] devongovett has joined the channel [22:41] blup has joined the channel [22:41] dgathright has joined the channel [22:41] chance-: tjholowaychuk: are you around by any chance? [22:42] tjholowaychuk: yup [22:43] nmir has joined the channel [22:43] chance-: hmmph, i was going to ask 'does your haml implementation in node not allow for multi-line nesting' but thats an dumbass question [22:43] chance-: i think im just running into weird scenarios [22:44] tjholowaychuk: should be fine [22:44] drudge: famous last words! [22:45] chance-: right.. but its not and i cant figure out why not, i think it may have something to do with a code line [22:45] Tobsn has joined the channel [22:46] chance-: dunno [22:46] chance-: i'll keep digging, incase you're curious: https://gist.github.com/1246468 [22:46] chance-: it's breaking the UL on the second li [22:47] tjholowaychuk: you're not indenting after -each [22:47] k1ttty has joined the channel [22:47] chance-: actually i was [22:48] bingomanatee: <-- working on a node-backed client side version of PHP [22:48] chance-: i went through a rampant undo [22:48] bingomanatee: Browser based Drupal! [22:48] chance-: and somehow managed to go too far back [22:49] dgathright has joined the channel [22:49] guidocalvano has joined the channel [22:50] chance-: hmmph, maybe that was it.. getting another error that i havent run into before [22:50] chance-: thanks man [22:50] chance-: (an error unrelated to your work, that is) [22:50] chance-: :) [22:52] nrajlich has joined the channel [22:53] fread2281 has joined the channel [22:53] edenli has joined the channel [22:54] dshaw_1 has joined the channel [22:54] sam350 has joined the channel [22:55] mikeal has joined the channel [22:55] WiltingRoses has joined the channel [22:55] dgathright_ has joined the channel [22:55] WiltingRoses: How many roses is an Angry Cat experience on Craigslist on Backpage? [22:55] mikeal1 has joined the channel [22:56] creationix has joined the channel [22:56] edenli_ has joined the channel [22:57] Spion has joined the channel [22:57] edenli_ has left the channel [22:57] sdwrage has joined the channel [22:58] luxigo has joined the channel [22:58] jedahan has joined the channel [23:00] dshaw_ has joined the channel [23:02] AAA_awright has joined the channel [23:03] Frippe has joined the channel [23:05] cognominal has joined the channel [23:06] dshaw_1 has joined the channel [23:06] dgathright has joined the channel [23:07] fread2281 has joined the channel [23:08] AaronMT has joined the channel [23:08] lmorchard has joined the channel [23:09] JaKWaC has joined the channel [23:09] dgathright_ has joined the channel [23:09] fread228_ has joined the channel [23:11] niclone has joined the channel [23:12] dshaw_ has joined the channel [23:13] hkjels_ has joined the channel [23:13] broofa has joined the channel [23:13] brianseeders has joined the channel [23:15] slajax has joined the channel [23:15] fread2281 has joined the channel [23:16] k1ttty has joined the channel [23:16] reid has joined the channel [23:17] SubStack: parshap: browserify watches every single file [23:17] ChrisPartridge has joined the channel [23:18] issackelly_ has joined the channel [23:18] parshap: SubStack: having issues then - experiencing the same as https://github.com/substack/node-browserify/issues/50 [23:18] murilobr has joined the channel [23:19] fread228_ has joined the channel [23:19] miccolis has joined the channel [23:19] SubStack: parshap: what browserify version? [23:19] JSManiacs has joined the channel [23:19] SubStack: possibly your editor is temporarily deleting the file and then replacing it [23:19] SubStack: might confuse browserify [23:21] perezd has joined the channel [23:21] jakehow has joined the channel [23:21] parshap: SubStack: 1.5.0 - using vim, i don't think it does anything odd like that [23:21] SubStack: odd! [23:21] SubStack: I'm using vim with 1.5.0 too [23:21] josch has left the channel [23:22] WiltingRoses: How many roses is an Angry Cat experience on Craigslist on Backpage? [23:22] SubStack: right now in fact [23:22] SubStack: building up a tiny app [23:22] parshap: SubStack: would it be helpful to create an isolated test case? [23:23] creationix has left the channel [23:24] WiltingRoses has joined the channel [23:24] WiltingRoses: Sorry. [23:25] dylang has joined the channel [23:25] SubStack: WiltingRoses: are you a markov robot [y/n] [23:26] WiltingRoses: yes and no yes and no [23:26] dimroc has joined the channel [23:26] slajax: window 1 [23:26] WiltingRoses: SubStack: Did I tell you I love anonymous functions? [23:26] slajax: oops [23:28] navaru has joined the channel [23:28] davidbanham has joined the channel [23:29] meso has joined the channel [23:29] slajax has joined the channel [23:29] fread2281 has joined the channel [23:32] slajax has joined the channel [23:32] necrodearia has joined the channel [23:33] fread228_ has joined the channel [23:35] ecin_ has joined the channel [23:35] ron_frown has joined the channel [23:35] CIA-109: libuv: 03Ben Noordhuis 07master * r2e4eca3 10/ (45 files in 10 dirs): c-ares: upgrade to 1.7.5 - http://git.io/jJziHg [23:35] CIA-109: libuv: 03Igor Zinkovsky 07master * ra1f98d5 10/ (6 files in 4 dirs): fix c-ares on windows - http://git.io/gtblVA [23:36] ecin__ has joined the channel [23:36] piscisaureus__ has joined the channel [23:37] fread2281 has joined the channel [23:37] cognominal_ has joined the channel [23:37] parshap: SubStack: good news, my attempt to create an isolated case failed and it is working as expected ... [23:37] SubStack: hooray? [23:38] JaKWaC has joined the channel [23:39] JaKWaC has joined the channel [23:39] mikeric has joined the channel [23:41] kbni has joined the channel [23:45] tshpaper has joined the channel [23:46] CIA-109: libuv: 03Igor Zinkovsky 07master * r9b5dfd1 10/ config-mingw.mk : fix mingw build - http://git.io/J5ap8Q [23:47] parshap: SubStack: it happens when using the connect.static middleware with a directory other than __dirname [23:47] softdrink has joined the channel [23:47] Remoun has joined the channel [23:48] sdwrage has joined the channel [23:48] pizthewiz has joined the channel [23:48] parshap: SubStack: e.g., moving `/index.html` to `/public/index.html` in your simple example in README.markdown will cause the error [23:48] parshap: SubStack: digging more [23:48] tjholowaychuk: parshap: app.use('/public', express.static('public')) [23:49] [[zz]] has joined the channel [23:49] tjholowaychuk: (didnt read the rest but you can do that if you want /public) [23:49] rchavik has joined the channel [23:49] nforgerit has joined the channel [23:50] cognominal has joined the channel [23:52] jedahan has joined the channel [23:52] jtsnow has joined the channel [23:54] jaequery: whats the best mongodb adapter for node? [23:54] jaequery: mongoose? [23:54] jtrudeau has joined the channel [23:55] joshkehn has joined the channel [23:55] joshkehn has left the channel [23:55] heavensgate: roadrunner [23:57] Sorella has joined the channel [23:57] heavensgate: meep meep [23:57] mediahack has joined the channel [23:57] tylerstalder has joined the channel [23:58] clarkfischer has joined the channel [23:58] parshap: SubStack: reproducable case: https://gist.github.com/1246605 [23:58] parshap: tjholowaychuk: nope, that's not it, but thanks