[00:00] Lingerance: No, if it were there'd be an offical driver for it [00:00] Lingerance: ... and it'd have started with C8 [00:00] Lingerance: v8* [00:00] willwhite has joined the channel [00:00] eastc: why are all the shell operations in js though? [00:00] marcello3d: eastc: actually I believe the company that made mongodb had their own version of node.js [00:00] marcello3d: prior to node.js's creation [00:00] eastc: wow [00:00] marcello3d: then they decided to focus on the DB [00:00] Lingerance: Because it uses spidermonkey [00:01] al3xnull: eastc: Most likely because JS can easily represent a document structure. [00:01] eastc: ah [00:01] AndreasMadsen has joined the channel [00:02] eastc: most definitely seems that the people behind mongodb had a node.js type implementation already [00:02] quackquack has joined the channel [00:03] Lingerance: Not really, the shell is all syncronious (except when using M/R) [00:03] richardr has joined the channel [00:03] marcello3d: I use node.js loosely [00:03] marcello3d: it was a server-side JS web app engine [00:03] ambroff has joined the channel [00:04] replore has joined the channel [00:04] replore_ has joined the channel [00:09] disappearedng: Anyone here familiar with what pattern I could use on server.js? https://gist.github.com/e349d5c063c689bb6177 [00:10] c4milo2 has joined the channel [00:10] broofa has joined the channel [00:10] phluffy has joined the channel [00:11] RLa: what is Engine supposed to do? [00:11] RLa: or rather what would be its responsibilities [00:11] disappearedng: Engine is a class that will handle all the game logic [00:12] disappearedng: Basically I broke down my app into the following: server which handles the socket io, web server stuff [00:12] RLa: so why it has reference to server [00:12] disappearedng: and then an Engine class which is like oh user X killed user Y, what happens next [00:12] disappearedng: RLa: because the engine will have to have the ability to fire callbacks [00:12] disappearedng: aka user X casts a spell. 10 seconds later, Engine will fire a packet to user Y [00:13] disappearedng: you get what I mean? [00:13] RLa: i would just call the callback that fires it [00:13] disappearedng: RLa: what do you mean by that [00:14] disappearedng: but what if the Engine has an action that doesn't require any input action? then how are you gonna callback [00:14] disappearedng: aka every 1 minute fire a call to everyone telling there's only 1 minute left [00:14] roozed has joined the channel [00:15] RLa: i would use something like User prototype for that [00:15] RLa: then you can use in engine: users.forEach(send1MinuteLeft) [00:16] CrypticSwarm has joined the channel [00:18] sorensen__ has joined the channel [00:23] baoist__ has joined the channel [00:24] hipsters_ has joined the channel [00:25] mattgifford has joined the channel [00:25] replore has joined the channel [00:30] TimTim has joined the channel [00:33] Nathan_ has joined the channel [00:36] RLa: god damn how broken eclipse indigo is, even basic javascript tools do not work [00:39] mandric has joined the channel [00:40] sorensen__ has joined the channel [00:41] Cromulent has joined the channel [00:41] bobTheBuilder has joined the channel [00:41] bobTheBuilder: gentlmen! [00:41] bobTheBuilder: happy new year [00:42] Sorella: RLa, hasn't Eclipse been always broken? [00:42] RLa: Sorella, no, sometimes it works [00:42] Sorella: Using a non-deterministic IDE sounds fun :3 [00:42] insin: I always have to turn all the syntax checking off every time I check if the JS tools are still shit with every Eclipse release [00:42] RLa: i have 6 eclipses installed so various plugins do not mess up each-other [00:43] jredville: no thanks.... i'll just use emacs [00:43] insin: and the outline view... have they ever written JS? [00:43] jredville: it's got it's own issues, but.... [00:43] RLa: i never used outline views [00:43] mikeric has joined the channel [00:43] insin: I never use them or need them either, but you get something new every release :) [00:43] RLa: anyway, looks like helios has working tools [00:44] RLa: php tools were broken in indigo too [00:44] RLa: and svn tools [00:44] [[zzzz]] has joined the channel [00:44] Sorella: jredville++ [00:45] plutoniix has joined the channel [00:46] synkro has joined the channel [00:46] replore has joined the channel [00:47] isaacs has joined the channel [00:51] TridenX has joined the channel [00:51] TridenX has left the channel [00:52] joshfinnie has joined the channel [00:54] kitt has joined the channel [00:54] kitt has joined the channel [00:55] kickingvegas has joined the channel [00:58] bnoordhuis has joined the channel [01:02] fangel has joined the channel [01:04] kazupon has joined the channel [01:07] kickingvegas has joined the channel [01:07] replore has joined the channel [01:08] TheFuzzball: Who knows if it's possible to send an audio stream with socket.io? [01:10] richardr: Anyone know of an open-source example of a working Opentok implementation in Node.js [01:10] richardr: (or any group real-time video/audio web solution) [01:13] cmr: TheFuzzball: Hrm, it should be possible to send the audio as base64-encoded binary data [01:14] cmr: TheFuzzball: what would you do with it? [01:14] kazupon has joined the channel [01:18] skmidry has joined the channel [01:18] mattgifford has joined the channel [01:20] mara has left the channel [01:23] plow has joined the channel [01:23] plow: hi can someone tell me if it's still true that in socket-io there isn't a good way of getting by id, as this says https://github.com/LearnBoost/socket.io/issues/503 [01:24] tomlion has joined the channel [01:25] TheFuzzball: cmr Play it with sm2 [01:25] ircdearia has joined the channel [01:26] tuhoojabotti: why is node still listening for sigint when I call process.stdin.destroySoon(); [01:27] Skaag has joined the channel [01:27] lukegb has joined the channel [01:28] maushu_: tuhoojabotti, makes more sense to use that on stdout, since it wais for the *write* queue to be drained. [01:29] tkaemming has joined the channel [01:29] replore has joined the channel [01:29] replore_ has joined the channel [01:29] maushu_: Maybe its waiting for the drain event and it doesn't fire because its stdin? [01:29] tuhoojabotti: could be [01:29] tuhoojabotti: stdout cannot be closed :D [01:29] maushu_: Why destroySoon anyways? Why not destroy? [01:30] tuhoojabotti: Why is that method created anyways [01:30] jmar777 has joined the channel [01:30] maushu_: For writable streams. [01:30] tuhoojabotti: but it doesn't fix the problem. [01:30] towski has joined the channel [01:31] maushu_: With that method you can basically write to a stream and call that method right after. The stream will be destroyed after it sent everything. [01:31] tuhoojabotti: process._events still has SIGINT: function which stops it from going down, right? [01:31] tuhoojabotti: shouldn't stdin.destroy get rid of it [01:32] maushu_: Hmmm. [01:32] maushu_: I think you need to catch it. [01:32] lukegb_ has joined the channel [01:32] tuhoojabotti: catch what? [01:32] maushu_: The signal. [01:32] tuhoojabotti: hmm [01:32] tuhoojabotti: I might actually know now [01:33] maushu_: http://nodejs.org/docs/latest/api/all.html#signal_Events [01:33] tuhoojabotti: I do that [01:33] maushu_: The first example there. [01:33] admc has joined the channel [01:33] tuhoojabotti: I do exactly that [01:34] tuhoojabotti: but shouldn't process.stdin.destroy() remove that listener? [01:35] tuhoojabotti: I would rather not call process.exit() because I want to allow other modules to uninitialize freely [01:36] maushu_: Doesn't it fire the exit event when you call that? [01:36] tuhoojabotti: hm? [01:36] maushu_: http://nodejs.org/docs/latest/api/all.html#event_exit_ [01:36] tuhoojabotti: true [01:36] tuhoojabotti: :D [01:37] ChrisMatthieu has joined the channel [01:37] tuhoojabotti: I guess I can use that [01:37] tuhoojabotti: maushu_: Thanks for your help [01:39] swanky has joined the channel [01:40] tytsim has joined the channel [01:41] npa has joined the channel [01:44] tomlion has joined the channel [01:45] mikeal1 has joined the channel [01:45] devongovett has joined the channel [01:45] jakehow has joined the channel [01:47] ryanfitz has joined the channel [01:50] replore has joined the channel [01:50] stonecobra has joined the channel [01:51] otakutomo has joined the channel [01:51] lukegb has joined the channel [01:56] brianseeders has joined the channel [01:56] deeprogram has joined the channel [01:57] amigojapan has joined the channel [01:58] KiNgMaR has joined the channel [02:03] mikeric has joined the channel [02:05] swanky: i have submit form and when user adds parameters and hits submit(via ajax post) it fetches the data, the idea is for user too look over it and confirm, but i cant think of way for user to confirm it without leaving the page and refetching data to save it in database. how would i trigger function save? should i use jquery modules, or is there way i am a noob dont know? [02:07] admc has joined the channel [02:09] skm has joined the channel [02:10] tomlion has joined the channel [02:11] tomlion_ has joined the channel [02:11] replore_ has joined the channel [02:13] skm has joined the channel [02:16] towski has joined the channel [02:22] MatthewS has joined the channel [02:23] tomlion has joined the channel [02:24] Skaag has joined the channel [02:25] NothingMan65 has joined the channel [02:26] joshthelovablera has joined the channel [02:28] mraleph has joined the channel [02:29] jocafa has joined the channel [02:31] brl0 has joined the channel [02:31] plow has joined the channel [02:31] jredville has joined the channel [02:32] plow: hey guys, I'm using XHR polling in socket.io and find that the performance is much worse, will this change in production? [02:32] replore has joined the channel [02:33] replore_ has joined the channel [02:34] jocafa1 has joined the channel [02:35] jocafa has joined the channel [02:42] [[zz]] has joined the channel [02:44] Cromulent has joined the channel [02:45] devongovett: happy new year everyone! [02:46] ernie_r: happy new year, devongovett! [02:50] boehm has joined the channel [02:54] replore has joined the channel [02:54] replore has joined the channel [03:00] ryan_stevens has joined the channel [03:00] admc has joined the channel [03:00] tmpvar has joined the channel [03:05] davehamptonusa has joined the channel [03:05] davehamptonusa has left the channel [03:06] maushu__ has joined the channel [03:06] boltR has joined the channel [03:08] maushu has joined the channel [03:09] TroyMG has joined the channel [03:09] isaacs has joined the channel [03:10] maushu has joined the channel [03:11] maushu_ has joined the channel [03:11] MatthewS has joined the channel [03:11] KiNgMaR has joined the channel [03:14] Vennril has joined the channel [03:14] c4milo1 has joined the channel [03:15] replore has joined the channel [03:15] replore has joined the channel [03:16] skm has joined the channel [03:18] kmiyashiro has joined the channel [03:18] isaacs: whoa, it looks like heroku cedar explicitly does not allow you to bundle dependenceis. [03:18] isaacs: like, if they're in the git repo, they get removed. [03:25] Shaunzie has joined the channel [03:26] baoist has joined the channel [03:27] brl0 has joined the channel [03:32] frogstarr78 has joined the channel [03:32] benvie: why does jimmy wales look so sad [03:33] cmr: Because not enough people give him money :( [03:33] benvie: he has that sad face down to a science [03:33] systemfault: Then I should be sad too [03:33] cognominal has joined the channel [03:35] jetheredge has joined the channel [03:38] ChrisMatthieu has joined the channel [03:40] avi_flax has joined the channel [03:44] amigojapan has joined the channel [03:45] Shaunzie has joined the channel [03:48] warz has joined the channel [03:48] warz has joined the channel [03:53] cjus has joined the channel [03:53] tuhoojabotti: how do I generate a string of n-width of some char like white-space [03:53] benvie: Array(n+).join(char) [03:53] tuhoojabotti: thanks [03:54] benvie: n+1 that should be [03:54] tuhoojabotti: ye [03:54] tuhoojabotti: n++ ;) [03:54] tuhoojabotti: it's 6am [03:54] benvie: tty is lots of funtimes with strings [03:55] cognominal_ has joined the channel [03:55] tuhoojabotti: I'm doing console command line stuff :D [03:55] tuhoojabotti: I mean commands [03:55] tuhoojabotti: it's working out pretty well [03:55] tuhoojabotti: just need to make a simple padding function [03:55] tuhoojabotti: well, it makes it look nicer :D [03:56] benvie: oh yes [03:57] benvie: https://github.com/Benvie/Node.js-Ultra-REPL/blob/experimental/lib/string-utils.js there's a few utilities at the bottom for that stuff [03:57] benvie: pad, repeat, chunk, indent, align [03:58] tuhoojabotti: thanks [04:03] tuhoojabotti: Nice it works. :P [04:03] tuhoojabotti: benvie: http://tuhoojabotti.com/r/prsc/cmd.png (438x98) [04:04] pyparadigm has joined the channel [04:04] benvie: sweet, check this https://raw.github.com/Benvie/Node.js-Ultra-REPL/experimental/docs/ss7.png [04:04] benvie: that is some columns [04:04] tuhoojabotti: Yeah, it's nice [04:04] benvie: boo ya [04:04] benvie: need more color [04:05] benvie: I need to get mintty working with node on windows [04:05] tuhoojabotti: .rainbow [04:05] benvie: so I can do some xterm 256 [04:05] tuhoojabotti: Hehe [04:05] benvie: then we will see colors [04:05] criswell has joined the channel [04:08] dmojoryder has left the channel [04:10] cognominal_ has joined the channel [04:10] euoia has joined the channel [04:11] tomlion has joined the channel [04:13] tuhoojabotti: http://tuhoojabotti.com/r/prsc/cmd_001.png (448x98) That's more like it [04:14] benvie: yes, now [04:14] benvie: colors [04:14] tuhoojabotti: ah yeah [04:14] benvie: I need to see more color [04:14] tuhoojabotti: True [04:14] benvie: the {string/id} part is perfect [04:14] benvie: for highlighting types by color [04:14] benvie: or something [04:14] tuhoojabotti: yeah [04:14] tuhoojabotti: benvie: http://tuhoojabotti.com/r/prsc/chatolog.png this was for other test :D [04:14] benvie: yeeees [04:15] skm has joined the channel [04:15] benvie: you can't even handle what I'm about to show you though [04:15] tuhoojabotti: don't worry, I'm colorblind [04:16] benvie: http://bbenvie.com/img/relaxing_with_rainbows_on_thursdays.jpg [04:16] benvie: if you weren't colorblind before you are now [04:16] benvie: in the background is an xterm256 thing I was playing with for finding nearest colors [04:16] tuhoojabotti: image too small [04:16] benvie: in the front is my paper machete duck [04:17] tuhoojabotti: mind !blown [04:17] benvie: all you need to know is there's a duck and 4 rainbowsd [04:17] benvie: so yeah this repl thing I'm making [04:18] benvie: customizable keybindings and paging now [04:18] bitwalker has joined the channel [04:18] tuhoojabotti: Ok. [04:18] benvie: need to redo tab completion now [04:18] tuhoojabotti: benvie: I like windows cmd.exe [04:18] benvie: well it runs in that [04:18] tuhoojabotti: eww [04:19] benvie: I'm testing it in it now [04:19] tuhoojabotti: Man, I was just joking. [04:19] benvie: it's a node library [04:19] benvie: no I hate it too [04:19] tuhoojabotti: That's so gay. [04:19] benvie: I'm going to get mintty working with node [04:19] tuhoojabotti: no, just weird. [04:19] benvie: cmd sucks but if you know how to tickle it just right [04:19] replore has joined the channel [04:19] benvie: you can make it less bad [04:19] benvie: anyway it's node node's repl++++ it's not platform specific [04:20] benvie: it's node specific [04:20] tuhoojabotti: ye ye [04:20] benvie: I even made it say "command" ket instead of "ctrl" when it's on os x [04:20] benvie: I care [04:21] benvie: point is though [04:21] benvie: when you say type [04:21] benvie: "this" [04:21] benvie: and get the whole context [04:21] benvie: you instead get it paged, with page numbers, and you can browser through at your leisure with page up down, or whatever custom bindings you so choose [04:22] benvie: or perhaps F3 to show non-enumerable properties [04:22] benvie: or F2 to hide all builtins [04:22] jimt_ has joined the channel [04:23] tuhoojabotti: hmm [04:23] benvie: or switch between different isolated global contexts using ctrl shift arrow keys [04:23] benvie: or .r lib to require things [04:23] benvie: or just type "fs" to get fs [04:28] dubenstein has joined the channel [04:29] jimt has joined the channel [04:29] EhevuTov has joined the channel [04:31] MatthewS has joined the channel [04:35] jimt_ has joined the channel [04:35] brainproxy: benvie: nothing's happening when I try to use the command+.. stuff listed by f1 [04:35] benvie: what platform? [04:35] benvie: it's still in very early dev, not tested cross platform too much. [04:36] benvie: also I may have gotten something backwards on macs [04:36] benvie: page up and down work without modifiers [04:36] tuhoojabotti: benvie: http://tuhoojabotti.com/r/prsc/spam.png (808x404) [04:36] benvie: as do most of the f2 keys [04:36] benvie: fkeys [04:36] tuhoojabotti: oops [04:36] tuhoojabotti: spamming alot [04:37] benvie: lol [04:37] tuhoojabotti: I hate those things [04:37] benvie: for the contexts it's ctrl+shift+arrows by default, but you can change the bindings easily in the keybind file if they're broken or something [04:38] brainproxy: benvie: mac, lion [04:38] brainproxy: iTerm2 [04:38] benvie: yeah latest mac is where I haven't been able ot test [04:38] benvie: in the settings folder is a controls.js file. You can change it from like [04:38] benvie: 'Create Context' : ctrl_shift('up') [04:39] benvie: to say 'Create Context' : key('f6') [04:39] brainproxy: cool, I'll take a look [04:39] benvie: or if all else fails, a repl command [04:39] benvie: Create Context' : dor('commandname'), [04:39] benvie: for .commandname [04:39] dubenstein has joined the channel [04:39] brainproxy: I like the concept .. dreaming of integration with swank-js [04:39] benvie: Create Context' : dot('commandname'), [04:40] benvie: I've been building it with the goal of attaching mods/add-ons to it as the norm [04:40] replore has joined the channel [04:40] benvie: so making some parts extra verbose but for allowing easy hacking on it [04:41] benvie: like the thing I just starting doing is "mounts" [04:41] brainproxy: swank-js is a mechanism for integrating the nodejs repl with emacs [04:41] benvie: like for the page display, it's mounted to top center [04:41] benvie: so the idea is things can just be mounted to a specific spot and then it'll handle the TTY rendering stuff [04:42] benvie: to make it into a heads up display kind of GUI interface instead of just a console [04:42] brainproxy: i like the idea of being able to fire up independent contexts inside a single REPL process; swank-js already supports the notion of being able to switch between driving a node repl and brower repl [04:42] brainproxy: if you connect browsers to the swank server [04:43] benvie: yeah that's like exactly what I was thinking. Actually I was thinking of, once I do some of this other stuff [04:43] benvie: making my own webpage basically just be a client for this [04:43] benvie: ultimately it's just a tty [04:43] benvie: but the contexts are key [04:43] brainproxy: what editor/ide do you use for nodejs dev? [04:44] tuhoojabotti: notepad [04:44] benvie: right now sublime 2 [04:44] euoia has joined the channel [04:44] cmr: vim [04:44] benvie: the thing that annoys me about every one of them is the distance between them and the js [04:44] brainproxy: cool ... i was a macvim guy, but saw some sweet stuff being done with emacs and clojure [04:44] benvie: I've always wanted my editor to be an extension of the programming language itself [04:44] cmr: emacs is a great editor too [04:44] brainproxy: kind of inspired me to switch to emacs, though its early days yet [04:45] brainproxy: and a friend of mine is working on repl integration for vim [04:45] benvie: the thing I do is [04:45] cmr: benvie: but then we'd have an editor for every language! [04:45] benvie: I spend all day writing programs to automate 5 minutes of work because I'm the most stubborn lazy person ever [04:45] benvie: I really dislike having to do things [04:45] benvie: so my goal is so make code to do everything for me [04:45] brainproxy: this is a video my friend made of integration between vim and regular node repl [04:45] brainproxy: http://vimeo.com/34184155 [04:46] benvie: I know and like [04:46] OmidRaha has joined the channel [04:46] benvie: emacs is probably the epitome of what I would like except for a couple things [04:46] benvie: the first being that I use my mouse occasionally [04:46] cmr: I don't really like lots of things integrated into my editor. If I want a node repl, I just pop open a shell and 'node' [04:46] benvie: and the second being that I want to use js not lisp [04:47] benvie: and the third is that everything must have a lot of colors and the syntax highlighting must be incredibly specific with a lot of colors [04:47] brainproxy: cmr, but wouldn't it be nice to highlight a group of statements and with a keystroke send them off for evaluation to a repl [04:47] brainproxy: maybe a new context, or an existing one, just depending on what you want [04:47] cmr: brainproxy: that it would be. [04:47] cmr: ACTION watches video [04:48] benvie: I hate loading up something like Aptana even though I know it's useful [04:48] brainproxy: benvie: GNU Emacs works with a mouse :) [04:48] brainproxy: benvie: what's your desktop env? [04:48] brainproxy: just curious [04:48] benvie: basically I want something that always does exactly what I want when I want it without me indicating I want it [04:48] cmr: brainproxy: Oh, that's neat. Do you know how modular it is, because I use tmux and not screen [04:49] cmr: And wouldn't mind hacking that in myself. [04:49] benvie: https://lh5.googleusercontent.com/-LE9RqI0Bmz0/Tvo1MAwWaEI/AAAAAAAAASo/h-ocmdP-j80/s1600/jscolors.png [04:49] brainproxy: cmr: not sure, but the guy who made the vid is CrypticSwarm here on freenode [04:49] cmr: benvie: brain control [04:49] benvie: sublime text 2 on windows [04:49] brainproxy: cmr: i'm a tmux user myself [04:49] cmr: benvie: so many colors! [04:50] benvie: I have spent a lot of time customizing various language syntaxes and color schemes [04:50] cmr: I dislike lots of colors of like that. [04:50] benvie: yeah it gets to a point where you can have an idea of what the code is composed of by looking at the colors [04:50] benvie: because it's not just random [04:50] brainproxy: benvie: any thoughts on the ultra repl playing nicely with coffee-script? [04:51] benvie: I don't think it'd be much of an issue [04:51] brainproxy: i mean, do you think it would be hard to make it into a coffee repl, like a "coffee mode" [04:51] benvie: no it wouldn't [04:52] benvie: in order to facilitate the whole context thing I had to organize it in such a way that evaluation of code is pretty well contained [04:52] tuhoojabotti: how can I handle keypresses with stdin [04:52] benvie: completelt separated from rendering [04:52] tuhoojabotti: like up/down for browsing command history [04:52] benvie: and completely separated from the functioning of the repl [04:52] skm has joined the channel [04:52] benvie: so hooking it up to arbitrary components for one part or another is a pretty defined task [04:52] tuhoojabotti: hm [04:53] benvie: in order to make separate contexts render out the inspector correctly they each have to have their own inspector instance [04:53] benvie: like run their own code [04:54] skm has joined the channel [04:54] benvie: so right now the part where it turns a a js result into visible colors is [04:54] benvie: context._ = someObj [04:54] benvie: print context._ [04:54] benvie: it's a getter/setter kind of black box in each context [04:55] tuhoojabotti: I hope you're not talking to me [04:55] benvie: and every line of code is run in a vm context so if you were to put a step in between to convert from coffee it'd be no problem [04:55] brainproxy: benvie: gotcha [04:55] tuhoojabotti: but I wish you did [04:55] tuhoojabotti: that's a weird statement [04:55] benvie: haha sorry what was the question [04:55] tuhoojabotti: up and down [04:55] tuhoojabotti: how [04:56] benvie: how can I handle keypresses with stdin ? [04:56] tuhoojabotti: ye [04:56] brainproxy: tuhoojabotti: have you done process.stdin.resume() [04:56] benvie: node's tty interface [04:56] benvie: yeah you need to resume, node needs to have the tty module initiated on top of it [04:56] tuhoojabotti: benvie: So I set it to hidden, and then pipe writing back to stdout but block the keyhits? [04:56] tuhoojabotti: I've done resume yes [04:56] tuhoojabotti: and I can read input [04:57] tuhoojabotti: but I need to handle keypresses [04:57] brainproxy: ah, i c [04:57] tuhoojabotti: what's the best way to do taht? [04:57] benvie: sec [04:57] tuhoojabotti: I bet there's a module [04:57] benvie: yes [04:57] tuhoojabotti: ;) [04:57] benvie: it's built into node [04:57] tuhoojabotti: :o [04:57] benvie: that's tty [04:57] tuhoojabotti: ah [04:57] benvie: when you seee stuff like [04:57] tuhoojabotti: I got it [04:57] tuhoojabotti: :D [04:57] benvie: \033[[ [04:58] tuhoojabotti: well kind of [04:58] brainproxy: benvie: sorry if you said before, but will the colors stuff be themeable? [04:58] tuhoojabotti: process.stdin.on('keypress', function(char, key) { [04:58] benvie: that's a tty escape sequence that node translates into stuff [04:58] benvie: currently all colors are separated from the main code and are in the settings directory like the keybindings are [04:58] tuhoojabotti: benvie: No need for that aye? [04:58] benvie: right now it only supports node's builting 16 colors but I plan to come up with a better way so I can have my 256 colors cross platform [04:59] benvie: no you need to have tty on it first [04:59] benvie: to translate for you [04:59] benvie: sec [04:59] tuhoojabotti: I have it [04:59] jeremyb has joined the channel [04:59] benvie: and then readline adds some more [04:59] benvie: so this bit [05:00] benvie: new ReadLineInterfacte(inputStream, outputStream, completer) [05:00] benvie: with process.stdin, process.stdout [05:00] benvie: I've been going down the stack and rebuilding each node builtin library to suit my pleasures [05:01] benvie: so I've reimplemented the REPL, then ReadLine, and getting close to doing TTY though I might be able to get by with my hacky method for now [05:02] replore has joined the channel [05:02] benvie: I grab the source from Object.getPrototypeOf(ttyStream)._emitKey. Splice in new code, run it in a next context to compile a function, and then overwrite the existing one [05:02] brainproxy: Happy New Years! to those in EST :-) [05:02] systemfault: TY :) [05:02] benvie: oh shit [05:03] tuhoojabotti: benvie: So yeah, I guess on keypress doesn't work well when you want to receive input too [05:03] tuhoojabotti: like lines [05:03] benvie: from where? [05:03] benvie: so this is that I have going on [05:04] benvie: rli.on('line', function(cmd){ ----> evaler [05:04] benvie: rli.on('close', stream.input.destroy.bind(stream.input)); [05:04] benvie: rli.input.on('keypress', function(v, key){ [05:04] tuhoojabotti: ah let me read [05:04] tuhoojabotti: benvie: Can you just gist the code? [05:05] tuhoojabotti: or link [05:05] benvie: sec [05:05] benvie: https://github.com/Benvie/Node.js-Ultra-REPL/blob/experimental/lib/UltraRLI.js#L33 [05:06] benvie: https://github.com/Benvie/Node.js-Ultra-REPL/blob/experimental/lib/UltraREPL.js#L92 [05:07] tuhoojabotti: hmm [05:07] benvie: so the input stream is the user's inpuit stream, handled mostly by readline [05:08] tuhoojabotti: I can't focus :D [05:08] benvie: the output stream is the screen, handled mostly by tty converting escape sequences into actual screeen stuff [05:08] benvie: readline takes keys, converts to escape sequences, and tty the inverse [05:08] tuhoojabotti: benvie: Could you write me a small example *puppy eyes* [05:08] tuhoojabotti: :D [05:08] plantain has joined the channel [05:08] plantain has joined the channel [05:08] benvie: well [05:09] benvie: the thing is that this is mostly handled for you so I guess yeah [05:09] benvie: gimme a sec [05:14] brainproxy: cmr: hey, the README for vim-slime indicates that tmux works as well as scree [05:14] brainproxy: *sdreen [05:15] brainproxy: errr screen [05:15] brainproxy: https://github.com/jpalardy/vim-slime [05:15] cmr: brainproxy: Nice! I'll defintely have to check it out when I get this confounded computer up to standards. [05:15] RLa: how one gets current timestamp or date in node? [05:16] brainproxy: Date.now() [05:16] brainproxy: will give you an "epoch" value [05:16] RLa: thanks [05:16] tuhoojabotti: Does that work :O [05:16] tuhoojabotti: cool [05:16] RLa: aww, why call it date when it's timestamp [05:16] cmr: RLa: the Date object is rather flexible [05:17] RLa: anyway, it will work for me [05:17] tuhoojabotti: RLa: new Date().toUTCString() [05:17] brainproxy: you could also do `new Date()` [05:17] cnu_ has joined the channel [05:18] tuhoojabotti: brainproxy: I always did new Date().getTime(). ;D [05:18] cmr: Me too [05:19] brainproxy: (new Date).valueOf() [05:19] brainproxy: works also [05:20] tuhoojabotti: And who knew ([][[]]+[])[++[++[++[++[++[[]][+[]]][+[]]][+[]]][+[]]][+[]]] = i [05:20] tuhoojabotti: .. ([][[]]+[])[++[++[++[++[++[[]][+[]]][+[]]][+[]]][+[]]][+[]]] [05:20] catb0t: "i" [05:20] tuhoojabotti: :D [05:20] brainproxy: there's a cool module called node microtime which can give you accuracy down to the microsecond [05:20] brainproxy: if you need that :) [05:21] tuhoojabotti: brainproxy: Are computer clocks really that accurate? [05:21] cmr: Yup [05:21] cmr: Some of them, not all. [05:21] brainproxy: tuhoojabotti: depends on the CPU [05:21] cmr: Most nowadays I think [05:21] tuhoojabotti: ok [05:21] brainproxy: the microtime module has a test script you can run to measure your cpu's accuracy [05:22] cmr: brainproxy: Which OSs does it have support for? [05:22] brainproxy: i've used it on linux and mac [05:22] brainproxy: haven't tried windoze [05:22] cmr: Good enough for me :) [05:23] brainproxy: if involve a node addon written in c++, maybe c, don't recall [05:23] yorick has joined the channel [05:23] tuhoojabotti: .. print((![]+[])[!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]); [05:23] catb0t: "lol" [05:23] tuhoojabotti: asd [05:23] cmr: brainproxy: it would have to [05:23] replore has joined the channel [05:23] benvie: https://gist.github.com/1546343 [05:23] tuhoojabotti: \o [05:23] tuhoojabotti: benvie: What took you so long? :D [05:24] brainproxy: cmr: right, i noted that more in reference to the windows compatibility ... i think there's still not a "blessed" path for doing addons for windows env [05:24] benvie: I couldn't think of a way to make it simple and not terribler [05:24] tuhoojabotti: haha [05:24] tuhoojabotti: Fair enough [05:24] tuhoojabotti: benvie: I see you use tabs [05:25] benvie: er well my editor decides to on whims [05:26] brainproxy: benvie: can I point ultra-repl at a custom controls.js or do i need to edit the one that ships w/ the package? [05:26] tuhoojabotti: benvie: That seems overly complex [05:27] benvie: well it's two parts [05:27] benvie: tty basically handles converting escape sequences for you which there's a lot of [05:27] benvie: readline has some utilities for managing the screen [05:27] benvie: I agree though [05:28] benvie: I've tried a couple different abstraction layers working on this [05:28] tuhoojabotti: all I wanted was a simple up/down command history :D [05:28] brainproxy: might be nice to have the ability to indicate a non-default controls.js with a --ctrl flag, so that way one's customizations can survive across a runtime upgrade with nvm [05:28] benvie: and I'm going to flesh out one shortly after I fix bugs in this [05:28] benvie: yeah for settings what I want to do is kind of follow the same philosophy of contexts [05:29] benvie: and make them transportable and self contained [05:29] benvie: and easily runnable, savable [05:29] benvie: changeable [05:29] tuhoojabotti: benvie: Removing your cursor move makes it nice. :D [05:29] benvie: I have part of a scheme set up to even customize the initialization for VM contexts [05:29] benvie: so you can create different profile for scopes [05:30] benvie: say boot directly into a specific app enbironment [05:30] benvie: or a coffescript env, or a node env, or a bare env, or a browser fake env [05:30] hardik has joined the channel [05:31] tuhoojabotti: benvie: It does not recognize ctrl+f1 on windows [05:31] benvie: hmm [05:31] benvie: that's probably related to the node bug [05:31] tuhoojabotti: but that's not a problem [05:31] tuhoojabotti: for me [05:31] benvie: I had to hack a fix in for F1-F5 to work at all [05:31] benvie: that's in fixEmitKey.js [05:31] russfrank: tuhoojabotti: if you're trying to write a shell interface, try node-shell [05:32] russfrank: tuhoojabotti: will give oyu up/down command history for free [05:32] benvie: I have a pull request in so hopefully it'll get fixed [05:32] ditesh|cassini has joined the channel [05:33] benvie: ultimately I want to make an environment useful enough to develop in, focused on node dev [05:33] benvie: like direct access to npm and local module lists and stuff [05:33] benvie: as well as running js itself [05:33] benvie: now that I have the output using virtualized paging I can actually make real gui bits [05:33] tuhoojabotti: benvie: I forgot all about readline api [05:34] benvie: yeah readline has the stuff like [05:34] benvie: cursorTo, clearLine [05:34] tuhoojabotti: I have to docs open [05:34] cmr: Are there no node bindings for gnu readline yet? [05:35] benvie: I saw an ncurses thing recently but stuff doesn't work on windows usually [05:35] benvie: I don't feel like screwing with mingw these days [05:35] benvie: although I'm willing to for xterm-256 [05:38] brainproxy: benvie: what is reset context supposed to do? [05:39] brainproxy: btw, edited controls.js as you suggested, working nicely :) [05:39] benvie: it creates a new context object but maintains the wrapper object [05:39] benvie: like any settings and whatnot on it [05:39] benvie: excellent =D it'll take some work to get all the keybindings fully functional cross platform [05:39] benvie: that is a shitstorm [05:39] tytsim_ has joined the channel [05:39] brainproxy: okay, maybe it's naive, but I assumed that if i did say `var x = 7` [05:39] brainproxy: then reset context [05:40] brainproxy: that x would be wiped out [05:40] benvie: was it global? [05:40] kmiyashiro has joined the channel [05:40] benvie: the global context basically is useless [05:40] brainproxy: hmm, let me start over, maybe something is stuck in global [05:40] benvie: if you're actually in a context and everything works [05:40] benvie: and there's not some bug where it doesn't get reset [05:41] benvie: I'm probably going to drop the global context entirely as an option for stuff [05:41] brainproxy: no, this time I made sure to create a new context, then do var x - 7 [05:41] brainproxy: x = 7 [05:41] benvie: since you can't reset it or do anything with it [05:41] brainproxy: then tried reset, but x is still there [05:41] benvie: I probably just broke that process [05:41] benvie: cause at the actual node/v8 part, it'll work [05:42] brainproxy: np, i realize it's a work in progress :) [05:42] benvie: I've been changing stuff so much so fast [05:42] benvie: it's still a bit funky now cause I just did the overhaul that basically redid half of the builtin node stuff [05:43] benvie: oh hah yeah [05:43] benvie: I see it [05:43] tmpvar has joined the channel [05:44] benvie: hmmm [05:44] replore has joined the channel [05:45] benvie: ok so when I create a new context, it creates it but at first I'm still in the global one [05:45] benvie: it basically just has screwed up togglging between them, not actually running [05:45] benvie: I'll fix that now [05:51] ricepuddin has joined the channel [05:52] neurodrone has joined the channel [05:52] ricepuddin: so for some reason my npm globally installed modules aren't being detected by my node environment (either from a script or in the interactive shell) and yet my locally ones are... any thoughts? [05:52] tuhoojabotti: benvie: Thanks, it's awesome now. [05:53] tuhoojabotti: Just replaced stdin.on data with the readline [05:53] tuhoojabotti: works like a charm [05:53] benvie: aye [05:54] tuhoojabotti: also autocompleter! [05:57] tuhoojabotti: benvie: But what is that process.stdin.destroy.bind(process.stdin) [05:57] tuhoojabotti: I mean [05:57] tuhoojabotti: What is it supposed to do? [05:57] benvie: when the rli closes it closes stdin [05:57] benvie: it's just a more succint way of saying [05:58] benvie: function(){process.stdin.destroy()} [05:58] tuhoojabotti: ah [05:58] tuhoojabotti: I see [05:58] benvie: instead of creating a function literally I bind it [05:58] tuhoojabotti: Well I'm overriding it [05:58] tuhoojabotti: D: [05:58] benvie: yeah if you're actually doing something with it then that's right [05:59] tuhoojabotti: I sure am [05:59] benvie: in REPL type cases their lifetimes are linked [05:59] tuhoojabotti: server.close(); :P [05:59] benvie: but if you're doing net stuff or whatever then that's not true [05:59] tuhoojabotti: yeah [05:59] tuhoojabotti: Now it's pretty awesome [06:00] tomlion has joined the channel [06:00] tuhoojabotti: I should just implement the commands. ;D [06:00] tuhoojabotti: like kick, ban etc. [06:00] benvie: another binding I like [06:01] benvie: Function.prototype.call.bind.bind(Function.prototype.call) [06:01] benvie: callbind in one statement instead of creating a function [06:01] cmr: Whaaaaaa [06:01] tuhoojabotti: benvie: Have you checked with your doctor lately? [06:02] benvie: callbind = Function.prototype.call.bind.bind)Function.prototype.call); slice = callbind(Array.prototype.slice) [06:02] benvie: haha my doctor doesn't know javascript well enough to diagnose me [06:02] benvie: slice(arguments) [06:02] cmr: "well enough" <-- he knows it at all? [06:02] benvie: no lol [06:02] tuhoojabotti: lol was denied. [06:03] tuhoojabotti: benvie++ [06:03] catb0t: benvie now has 1 beer [06:03] gavin_huang has joined the channel [06:03] benvie: .. sup catb0t [06:03] catb0t: Exception: SyntaxError: Unexpected identifier [06:03] tuhoojabotti: Well it's not 8am and I've been up all night :D [06:04] benvie: ..{ toString: { __proto__: Function } } [06:04] benvie: .. { toString: { __proto__: Function } } [06:04] catb0t: [Function: Function] [06:05] benvie: .. delete Object [06:05] catb0t: true [06:05] tuhoojabotti: Nuck! [06:05] cmr: !!! [06:05] purr: cmr: stop fucking doing that [06:05] tuhoojabotti: lol [06:05] cmr: !!! [06:05] purr: cmr: stop fucking doing that [06:05] cmr: Heh [06:05] tuhoojabotti: ping [06:05] cmr: ! [06:05] cmr: !! [06:05] purr: cmr: stop fucking doing that [06:05] cmr: !!!!! [06:05] tuhoojabotti: asd!!! [06:05] cmr: purr: you need a better regex :P [06:05] tuhoojabotti: oh well [06:06] replore has joined the channel [06:06] benvie: delete Object.getPrototypeOf({ __proto__: {} }_ [06:06] benvie: .. delete Object.getPrototypeOf({ __proto__: {} }) [06:06] catb0t: Exception: ReferenceError: Object is not defined [06:06] benvie: haha it sure isn't [06:06] cmr: .. {} [06:06] catb0t: [06:06] tuhoojabotti: benvie: Y U break our toy? :/ [06:06] benvie: delete Object blows node up [06:07] cmr: benvie: catb0t isn't running node, it's running an almost-vanilla v8 (last I heard) [06:07] catb0t: almostvanilla running [06:07] benvie: well it's a v8 thing [06:07] benvie: works in chrome too [06:07] benvie: and you know what blows Chrome up [06:07] tuhoojabotti: what now? [06:07] benvie: Proxying anything in the DOM blows Chrome up [06:07] tuhoojabotti: omg I have chips [06:07] benvie: that is going to be a long road [06:08] tuhoojabotti: om nom nom [06:08] tuhoojabotti: or crisps [06:08] Nuck: tuhoojabotti! [06:08] tuhoojabotti: Nuck: What's up?<3 [06:08] cmr: Nuck: are you also NuckOff? [06:09] Nuck: tuhoojabotti: Writing code. Got a goal set for 2 hours [06:09] Nuck: cmr: No, that's my cousin. [06:09] tuhoojabotti: Nuck: Stop using idle-nick [06:09] tuhoojabotti: Thank you [06:09] benvie: Proxy(window, { get: function(t, prop, r){ console.logprop) } }) [06:09] tuhoojabotti: we have /away [06:09] Nuck: tuhoojabotti: :C It's not idle-nick. It's me-logged-off nick [06:09] tuhoojabotti: jredville: That goes for you too. [06:09] tuhoojabotti: Nuck: There's no logging off in irc, just join/part/connect/disconnect [06:09] Nuck: tuhoojabotti: I use it for extended periods, never for five-minute aways. In fact, I set a timeout of like 30 seconds disconnection before it does that. [06:09] cmr: Ah, didn't notice the nick change [06:10] Nuck: tuhoojabotti: There is when you use a bouncer ;) [06:10] tuhoojabotti: I have automatic /away [06:10] tuhoojabotti: it's cool [06:10] jredville: i use a client, i'll see if it supports /away [06:10] tuhoojabotti: Nuck: The fact is, no one cares if you're not around, you can read the backlog. [06:10] tuhoojabotti: I use irssi, the client of the future. ;) [06:11] Nuck: tuhoojabotti: lol I would set it back, but it's buried somewhere in ZNC's settings and I'm extremely lazy :P [06:11] Nuck: Anyways, I have a code to finish [06:11] Nuck: so bai [06:11] tuhoojabotti: Nuck: Not if I keep distracting you. [06:11] Nuck: tuhoojabotti: Goal's in 2 hours [06:11] tuhoojabotti: Tell me about your goal [06:11] ovaillancourt has joined the channel [06:11] Nuck: tuhoojabotti: Phase 0 of my startup [06:12] Nuck: internal testing [06:12] Nuck: so yeah bbl [06:12] tuhoojabotti: Nuck: Is it like http://urly.fi/xS [06:21] benvie: .. Proxy [06:21] catb0t: Exception: ReferenceError: Proxy is not defined [06:24] cjm has joined the channel [06:27] replore has joined the channel [06:29] thalll has joined the channel [06:31] subbyyy has joined the channel [06:33] simoon has joined the channel [06:33] simoon: happy newyear #node.js [06:34] simoon: I'm working on writing a module for the first time and I ran into something I didn't expect [06:35] simoon: console.log() doesn't output anything when inside the "required" module.js [06:35] simoon: is there anything I have to do to let that happen? I'm trying to debug passing a callback function for the first time :) [06:38] simoon: omg. [06:38] simoon: sorry guys [06:38] simoon: vi was saving to my original file, not the one I cp'd to node_modules [06:43] innociv has joined the channel [06:46] ghilly has joined the channel [06:48] replore has joined the channel [06:48] replore has joined the channel [06:49] ricepuddin: for some reason node isn't looking for modules where npm installs them globally, but it finds them just fine when installed locally.... can someone help me? [06:50] RLa: modules you "require" are installed locally [06:50] RLa: http://blog.nodejs.org/2011/03/23/npm-1-0-global-vs-local-installation/ [06:52] chot has joined the channel [06:55] ryan_stevens has joined the channel [06:55] ricepuddin: RLa: why would I want to install some of my really commonly used modules locally for all my different projects? [06:55] ricepuddin: smacks of wastefulness as well as being harder to maintain [06:56] ricepuddin: not to mention I have other people's module's code changes polluting my git [06:56] cmr: ricepuddin: npm link [06:57] ricepuddin: cmr: why though? surely it should be able to find them when globally installed? [06:57] ricepuddin: what's teh point of globally installing them if they can't actually be used there? [06:57] otakutomo has joined the channel [06:57] cmr: ricepuddin: works fine here [06:57] simoon has left the channel [06:58] ricepuddin: not for me, and this is my problem :) [06:58] cmr: I know, I was just giving you a solution [06:58] cmr: s/solution/workaround/ [06:59] ricepuddin: technically you're giving me a workaround, not a solution :) [06:59] ricepuddin: aye :) [06:59] ricepuddin: the workaround works, for sure, but I'd quite like a way of solving the actual problem [06:59] cmr: ricepuddin: what's your NODE_PATH ? [07:00] warz has joined the channel [07:02] ricepuddin: cmr: I... don't have one? [07:02] ricepuddin: when was I supposed to set that? [07:02] ricepuddin: >_> [07:03] cmr: When you installed npm. [07:03] cmr: You shouldn't need to do that for recent npm versions. [07:03] cmr: I think 1.0+ [07:03] ricepuddin: 1.1.0-beta4, apparently [07:04] cmr: ricepuddin: what os are you using? [07:04] ricepuddin: ubuntu 11.10 [07:04] cmr: Open a terminal and type "echo $NODE_PATH" if you haven't already [07:05] CarterL has joined the channel [07:05] richardr has joined the channel [07:05] ricepuddin: yeah, it's unset [07:05] cmr: Set it in ~/.bashrc [07:06] fangel has joined the channel [07:06] ChrisMatthieu has joined the channel [07:07] plantain has joined the channel [07:07] richardr has joined the channel [07:07] ricepuddin: cmr: to the install prefix of my node build, right? [07:08] cmr: ricepuddin: to wherever it is that you have told npm to install global modules [07:08] ricepuddin: cmr: I never told it what to do :P [07:08] thirdknife has joined the channel [07:08] cmr: Sure you did, if you installed it. [07:08] brainproxy: ricepuddin: node favors portability, that's why require involves local modules rather than global ones [07:09] brainproxy: that way, when you're installing, migrating, deploying, you don't end up dealing with global environment wonkiness [07:09] replore has joined the channel [07:09] brainproxy: the idea is that you declare your dependencies in package.json [07:09] replore_ has joined the channel [07:10] benvie: so what's the trick to get node to intialize a stream into a tty [07:10] benvie: like when started non-interactively [07:10] brainproxy: then when you clone your little project somewhere else, you can do `npm install` in the project dir to pull in the deps [07:10] benvie: been through all the source and the best I see is it hard initing it in native module land [07:11] ricepuddin: brainproxy: I see the advantages to that, but they're not really applicable to my current situation which is that the globally installed packages don't work _at all_ [07:11] ricepuddin: brainproxy: regardless of whether I should be using global or local, both should at least work ;) [07:12] ricepuddin: brainproxy: so it's down to a misconfiguration on my part and I'll save the debate about whether I should use global modules for another day :) [07:12] brainproxy: well, require simply doesn't look for global modules [07:12] brainproxy: so you can't really fix it with a config [07:13] brainproxy: it's just not the way that node_modules recursive lookup is engineered [07:14] brainproxy: and in fact, just to emphasize that global modules aren't a node-ism, the ability to modify require.paths was squashed [07:14] ricepuddin: brainproxy: if require doesn't look for global modules then what's the point in them? :s [07:15] brainproxy: global modules are so you can create command line utilities [07:15] ricepuddin: *sigh* great... [07:15] ricepuddin: ok, that explains it then... [07:15] brainproxy: i think you can still hack something into the processes module path lookup with a shell environment variable [07:16] ricepuddin: brainproxy: nah, I was just bothered that it didn't work. The fact that it's engineered not to work explains why it wasn't. I get the reasons behind why local modules are prefered [07:16] ricepuddin: due to the whole deployment thing [07:16] k1ttty has joined the channel [07:16] cmr: Pretty sure this is in 'npm faq' [07:16] ricepuddin: so I guess I'll switch to using local modules with package.json :) [07:17] ricepuddin: cmr: who reads the faq? ;) [07:17] brainproxy: lol [07:17] cmr: All the smart people. [07:17] cmr: Guess what set that puts you in? :P [07:18] richardr has joined the channel [07:19] ricepuddin: :( [07:23] jesusabdullah: Are most faqs actually frequently asked? [07:25] cmr: jesusabdullah: not after they are published :P [07:26] jesusabdullah: haha [07:26] jesusabdullah: you got me there [07:30] replore has joined the channel [07:31] replore_ has joined the channel [07:32] stagas has joined the channel [07:32] mattgifford has joined the channel [07:38] tytsim has joined the channel [07:40] TroyMG: what. the. heck. [07:40] TroyMG: Date.parse('2012-01-01') === 1325476 [07:40] stagas has joined the channel [07:40] TroyMG: Date.parse('1/1/2012') === 1325394 [07:41] cmr: TroyMG: Do it again in a few more minutes [07:41] cmr: Or are those results consistent [07:41] TroyMG: consistent [07:41] cmr: Odd. [07:42] TroyMG: Sun, 01 Jan 2012 00:00:00 GMT vs Sun, 01 Jan 2012 05:00:00 GMT [07:43] eliasp: TroyMG: wild guess: does it assume a timezone based on the provided format? [07:43] TroyMG: thats what it looks like... [07:43] TroyMG: not really a fan of that kind of magic [07:43] eliasp: yep, me neither [07:43] CrypticSwarm has joined the channel [07:44] tuhoojabotti: don't use wrong formats [07:44] tuhoojabotti: it's 1.1.2013 [07:45] eliasp: TroyMG: if that'd be the case, it's IMHO bullshit... you ask for the timestamp representation of a provided value when using Date.parse() but nothing more... there should be no timezone magic at all [07:45] eliasp: TroyMG: but maybe take a look at the src what actually happens [07:46] TroyMG: yeah, reading up on the spec right now [07:46] boltR has joined the channel [07:47] blueadept has left the channel [07:47] TroyMG: re-verified by executing in Chrome's dev tools [07:47] TroyMG: gonna try firebug and see if its a v8 thing [07:47] tuhoojabotti: I don't understand how it could be a timezone magic [07:47] Jon__ has joined the channel [07:48] tomlion has joined the channel [07:48] cmr: It consistently uses the timezone in firebug. [07:48] tuhoojabotti: how could the format tell anything about the timezone [07:48] cmr: sounds like a v8 bug [07:49] TroyMG: Date.parse('2012-01-01') and Date.parse('1/1/2012') return different things to me in Firebug too [07:49] TroyMG: is that not the case for you cmr? [07:49] cmr: Oh, I read it wrong. [07:49] cmr: TroyMG: nope, same results. [07:50] TroyMG: cmr: what OS are you running? [07:50] cmr: TroyMG: Linux [07:50] TroyMG: hmm, wondering if its a locale thing in OSX [07:50] tuhoojabotti: I can try windows [07:50] tuhoojabotti: you want me to? [07:50] TroyMG: if you wouldn't mind please [07:50] cmr: TroyMG: When I said "nope, same results" I meant that I read it wrong and the results are lined up with yours [07:51] TroyMG: oooh [07:51] tuhoojabotti: ah [07:51] TroyMG: ok [07:51] TroyMG: so its across browsers & os's [07:51] TroyMG: guessing its spec... [07:51] TroyMG: infuriating! [07:51] cmr: The "date" program doesn't do it. [07:51] tuhoojabotti: .. print(Date.parse('2012-01-01'), Date.parse('1/1/2012')); [07:51] catb0t: 1325376000000 1325394000000 [07:52] tuhoojabotti: I get different time too [07:52] replore has joined the channel [07:52] replore has joined the channel [07:52] cmr: http://paste.kde.org/180026/raw/ [07:52] tuhoojabotti: oooh [07:52] tuhoojabotti: it's sunrise here :) [07:53] tuhoojabotti: It's making my monitors invisible >:( [07:53] TroyMG: cmr: so must be a js spec thing, I'm guessing? [07:53] tuhoojabotti: I'm calling it a bug [07:53] cmr: TroyMG: Maybe, I'll check the spec. [07:54] Skaag has joined the channel [07:55] tuhoojabotti: http://urly.fi/xT [07:55] tuhoojabotti: relevant [07:56] TroyMG: yikes... [07:57] cmr: It's valid ECMAScript-262 behaviour [07:58] cmr: It can be parsed in whatever timezone the implementation pleases, depending on the string you use. [07:58] TroyMG: looks like I'll have to delve into some regex shenanigans to warp my input to be consistent. :-( [07:58] tuhoojabotti: if you want to parse something properly, write your own parser. [07:58] eliasp: TroyMG: I'd rather keep using Date.parse() and then adjust the results according to the spec [07:58] cmr: (That was a lot less painful to find than I thought; I've read some painful specs before) [07:59] TroyMG: eliasp: I have an algo for determining the number of working days between date A and date B, but this throws it off entirely [07:59] eliasp: hmm, ok [07:59] cmr: TroyMG: Why don't you use a more explicit date string? [07:59] cognominal has joined the channel [07:59] TroyMG: this is input from users (from a calendar picker) [07:59] TroyMG: I can validate a specific string, but I'd rather accept both formats [08:00] TroyMG: I'm thinking I'll detect that the string starts with 4 numbers (the year) and in that case convert it into the american style before passing it into Date.parse [08:00] cmr: You can use both formats; just transform them into the full Day-Month-Day-Year-*-Timezone format [08:03] TroyMG: yay for manual parsing :-/ [08:03] tuhoojabotti: TroyMG: Make a module of it and put it to npm. :D [08:09] monokrome has joined the channel [08:11] tytsim has joined the channel [08:15] kazupon has joined the channel [08:18] tuhoojabotti: wait [08:18] tuhoojabotti: it's still 2011 somewhere [08:18] tuhoojabotti: or not [08:18] tuhoojabotti: hmm [08:18] tuhoojabotti: no [08:18] tuhoojabotti: not anymore [08:19] erikzaadi has joined the channel [08:21] dubenstein has joined the channel [08:25] mattgifford has joined the channel [08:25] nicholasf has joined the channel [08:26] Druide_ has joined the channel [08:27] lingfei has joined the channel [08:28] dubenstein has joined the channel [08:32] Jon__ has left the channel [08:32] Poetro has joined the channel [08:35] replore has joined the channel [08:35] confoocious has joined the channel [08:35] confoocious has joined the channel [08:36] tmpvar has joined the channel [08:38] joshfinnie has joined the channel [08:43] Shaunzie: Anyone used swig (http://paularmstrong.github.com/node-templates/benchmarks.html)? [08:45] tuhoojabotti: Shaunzie: Learn how to link. :E [08:46] Shaunzie: tuhoojabotti: -.- [08:46] tuhoojabotti: Shaunzie: Where is hogan.js from that list? [08:46] Nassosdim has joined the channel [08:47] Shaunzie: sooo yah… has anyone used swig? [08:47] tuhoojabotti: I use hogan. :e [08:47] tuhoojabotti: Shaunzie: so anyways, why are you asking? [08:48] richardr has joined the channel [08:56] HT has joined the channel [09:00] kmiyashiro: isn't hogan just pre-compiled mustache? [09:00] tuhoojabotti: kmiyashiro: pre-compiled? [09:00] tuhoojabotti: hmm [09:01] tuhoojabotti: I guess yeah [09:01] aliem has joined the channel [09:03] kmiyashiro: I want to see the benchmarks on how much faster it is than handlebars [09:03] secoif has joined the channel [09:03] kmiyashiro: oh, here it is http://jsperf.com/t-bench2/7 [09:04] tuhoojabotti: hogan wins \o [09:04] kmiyashiro: somewhat minor compared to the added features of handlebars though [09:04] tuhoojabotti: hehe [09:04] secoif has joined the channel [09:05] ryanrolds: We swapped from the "mustache" module to hogan last week. It's so much faster. [09:05] tuhoojabotti: I swapped dustjs to hogan, because it was dead [09:06] ryanrolds: :( [09:06] secoif has joined the channel [09:06] tuhoojabotti: it didn't even work well when I started using dustjs :D [09:06] kmiyashiro: I use dustjs [09:07] mikeal has joined the channel [09:07] kmiyashiro: it's actually pretty nice, just not as fast [09:07] kmiyashiro: even pre-compiled [09:07] tuhoojabotti: It was nice yeah [09:07] tuhoojabotti: but not maintained too well [09:08] kmiyashiro: meh [09:08] tuhoojabotti: you need to have active developers on a bleeding edge tech like node [09:10] kmiyashiro: I might switch to handlebars [09:10] kmiyashiro: I like the delimited partial name support in dusts though [09:11] rgl has joined the channel [09:11] kmiyashiro: I mean the … what's it called [09:11] kmiyashiro: interpolated names [09:11] lzskiss has joined the channel [09:12] kmiyashiro: I guess you can do anything with handlebar helpers though [09:13] lzskiss: happy new year noders [09:13] synkro has joined the channel [09:13] kmiyashiro: weirdly, handlebars is much faster then hogan in iOS5 https://twitter.com/#!/hshoff/media/slideshow?url=pic.twitter.com%2F7nPdmcBv [09:15] insin: happy noders year! new [09:16] joshfinnie has joined the channel [09:16] tuhoojabotti: sdasd [09:17] tuhoojabotti: My uptime is 27h [09:17] brianloveswords has joined the channel [09:20] tuhoojabotti: asd [09:20] tuhoojabotti: gotta love github 70msg limit for commit messages ;D [09:20] tuhoojabotti: "Servercommands, autocompletion and loggin improvements -- all the goo…" [09:20] tuhoojabotti: goo! [09:20] tuhoojabotti: 70 char* [09:21] dubenstein has joined the channel [09:22] Shaunzie has joined the channel [09:22] TheJH: tuhoojabotti, I also wrote a streaming template renderer :D [09:22] tuhoojabotti: Well, we all know you. [09:23] tuhoojabotti: I couldn't imagine how that works [09:27] TheJH: tuhoojabotti, = [09:27] TheJH: ? [09:27] jimt has joined the channel [09:28] TheJH: tuhoojabotti, https://github.com/thejh/node-vacuum , usage example at https://github.com/thejh/node-forum [09:28] skm has joined the channel [09:29] tuhoojabotti: ah [09:29] tuhoojabotti: it's that [09:31] synkro has joined the channel [09:31] synkro: HAPPY NEW YEAR !!! [09:32] james has joined the channel [09:33] jredville has joined the channel [09:34] jredville has joined the channel [09:36] skoom has joined the channel [09:36] jimt_ has joined the channel [09:36] Shaunzie has joined the channel [09:36] tomlion has joined the channel [09:40] SamuraiJack has joined the channel [09:43] mara has joined the channel [09:45] mara__ has joined the channel [09:47] NathanDavid has joined the channel [09:47] ph^ has joined the channel [09:48] herbySk has joined the channel [09:54] NathanDavid has joined the channel [09:59] lingfei has left the channel [10:10] deeprogram has joined the channel [10:12] `3rdEden has joined the channel [10:12] richardr has joined the channel [10:14] rmoriz has joined the channel [10:14] madhums has joined the channel [10:15] rmoriz: hi [10:15] dubenstein has joined the channel [10:17] rmoriz: I'm playing with node on a linux driven ARM-based board with limited RAM (256MB in total) e.g. for running a webservice for a workgroup. what do you suggest as data storage? even redis needs afaik 50MB+ RAM. I currently play with node-gdbm but it looks not very async to me (which is okay for that usage i guess) [10:17] tuhoojabotti: flat-file [10:17] tuhoojabotti: :u [10:18] cmr: Yeah, do you really need a database? [10:18] rlinfati has joined the channel [10:18] cmr: (Does node have bindins to berkeley db?) [10:18] rmoriz: i've around 8-10 "models" so … yes [10:19] rmoriz: cmr: i couldn't finde any so I looked for gdbm…. kyoto cabinet has also an adapter [10:20] rmoriz: of course sqlite might be a solution. couldn't find a orm for that and really don't want to build SQL queries by hand ;-) [10:20] cmr: rmoriz: nosqlite is a simple "orm" in that you can push an object to it and it will do the magic. haven't used it though, it's something to try [10:21] cmr: Or you could write a little simple orm for your own stuff; it isn't hard [10:21] pors has joined the channel [10:21] replore has joined the channel [10:21] rmoriz: does it support relations? [10:22] cmr: No [10:23] smgt has joined the channel [10:23] rmoriz: ok no big issue for my use case [10:23] rmoriz: cmr: do you mean this? https://github.com/mrjjwright/NoSQLite ? looks a bit stale? [10:24] cmr: rmoriz: no, it's github.com/pksunkara/nosqlite [10:24] cmr: Sorry for confusion [10:24] rgl has joined the channel [10:25] rmoriz: cmr: thanks! that looks very slick. will give it a try :) [10:25] cmr: rmoriz: it's not much, but it's something [10:26] rmoriz: cmr: coming from the Rails-world is there something like "database migrations"? [10:27] rmoriz: ah several. nice! [10:28] rmoriz: https://github.com/visionmedia/node-migrate and https://github.com/nearinfinity/node-db-migrate at least [10:28] cmr: Never used rails and I don't know what they are... if they exist, then great [10:36] whitman has joined the channel [10:36] smgt has joined the channel [10:37] Morkel has joined the channel [10:39] richardr has joined the channel [10:44] __doc__ has joined the channel [10:46] cognominal_ has joined the channel [10:50] braoru has joined the channel [10:56] Nuck has left the channel [10:56] mike5w3c has joined the channel [10:56] tytsim has joined the channel [11:03] cognominal___ has joined the channel [11:04] rmoriz: cmr: they provide an organized way of applying DSL (structure) changes of databases. [11:04] jetienne has joined the channel [11:04] rmoriz: cmr: especially useful if you have several active app deployments and want to change the database structure [11:05] cmr: rmoriz: Oh, nice! [11:05] d0k has joined the channel [11:06] rmoriz: cmr: every step/migration has a "up" and "down" function to either apply or rollback its change. the node versions mentioned above seem to be database-independent. even with k/v storages you have to reorganize your database+contents e.g. when you add new queries [11:08] rendar has joined the channel [11:11] jimt has joined the channel [11:12] jhbot has joined the channel [11:12] tauren has joined the channel [11:12] framlin_: is there any solution for the following error: https://gist.github.com/1469394 [11:17] marak_ has joined the channel [11:17] marak_: happy new year [11:17] marak_: here is something awesome: https://github.com/hookio/hnet [11:18] jbpros has joined the channel [11:19] martndemus has joined the channel [11:19] mikeal has joined the channel [11:24] robhawkes has joined the channel [11:28] mikl has joined the channel [11:31] djazz has joined the channel [11:37] jimt has joined the channel [11:38] Wizek has joined the channel [11:39] pekim has joined the channel [11:41] tomasztomczyk has joined the channel [11:41] sylvinus has joined the channel [11:43] tytsim has joined the channel [11:45] mehlah has joined the channel [11:49] framlin_: is here anybody who can answer questions concerning npm-installing forever? [11:50] sechrist has joined the channel [11:50] framlin_: or the deamon-package of npm? [11:50] framlin_: `sh "-c" "node-waf configure build"` failed with 127 [11:53] tomlion has joined the channel [11:55] mmalecki has joined the channel [11:56] tomlion has joined the channel [12:01] zomg: framlin_: forever is broken as of 0.6.x [12:01] zomg: Unless they've fixed it recently [12:02] zomg: looks like they have a 0.6 branch for it, not sure if that one works [12:05] framlin_: zomg: do you know any alternative? My website is crshing tooo often :( [12:05] framlin_: its node-based ... [12:08] plow has joined the channel [12:09] plow: hi guys, I'm managing to upload and persist an image with mongodb, just wondering how do I then serve it, can I do it as a file stream in express? [12:10] plantain has joined the channel [12:10] plantain has joined the channel [12:10] cmr: framlin_: fix the bugs? [12:11] framlin_: yes, that may be one option ;) [12:11] framlin_: but for the first step I would prefere to restart it, if it crashes [12:12] framlin_: thaen I would like to add some kind of log-mechanism and then I would fox it [12:12] framlin_: because currently I do not know, why it is crashing, because I do not have any logging [12:13] framlin_: does anybody know, what th eproblem is, if node-waf is not found? [12:13] k1ttty has joined the channel [12:14] framlin_: I just tried to install inotify, but it doesnt succeed [12:14] framlin_: since node 0.6 there are a lot of things, that does not run any more :( [12:15] framlin_: I hope, that this "windows-port" is it worth ..... [12:15] framlin_: ... where I do never use ms-windows ... ;) [12:18] mraleph has joined the channel [12:24] framlin_: so before fixing my own bugs, I should be able to update the used module, but many of them seems not to run anymore ... eg. jsdom ... its crashing, although I have run npm update on it :( [12:25] framlin_: is there any site/forum/etc, where all that imcompatibilities are collected? [12:27] framlin_: is ther any documentation, where I can see, what this node-waf may be and what I have to do, that it ist founf by npm? [12:28] framlin_: There are many modules, that cannot be installed or updated, becaus this node-waf could not be found :( [12:28] cmr: framlin_: iirc you need to compile node from source to get that. [12:28] framlin_: oh :( [12:29] k1ttty has joined the channel [12:29] cmr: but I haven't used node on windows (or windows in quite some time for that matter) to know for certain [12:29] framlin_: thanks! [12:29] framlin_: I only use linux [12:29] cmr: Oh, you're using linux, not windows/ [12:29] framlin_: so this should be no problem concerning windows [12:29] cmr: Debian{,-derivative} or what else? [12:30] cmr: (You mentioned something about a windows port earlier, thus confusion) [12:30] framlin_: yep, but since this "windows-port" 0.6 nothing does run anymore on my system :(( [12:30] cmr: Right, there was a major breakage in things between 0.4 and 0.6 [12:31] framlin_: sorry, I call 0.6 a "windows-port" becaus it seems to me, that this was the major-change form 0.4 to 0.6 ... [12:31] cmr: On debian and the ilk you can "apt-get install git build-essential" and have everything you need to compile node. [12:31] AndreasMadsen has joined the channel [12:31] cmr: I don't know about fedora/other rpm [12:32] framlin_: cmr: yes, but until now i prefered to use apt-get install nodejs [12:32] framlin_: and that has run until .... you know .... 0.6 ... ;) [12:32] cmr: Yeah, don't do that. [12:32] framlin_: thats sad :( [12:32] Drakonite has joined the channel [12:33] Sorella has joined the channel [12:33] framlin_: again, I hope really that all that hussle is it worth, only to get running node nativly on windows ... [12:33] cmr: There were lots of changes besides windows support for 0.6 [12:33] cmr: Node got better, don't worry :) [12:33] cmr: It's easy to compile too. [12:34] cha0s has joined the channel [12:34] cha0s has joined the channel [12:34] framlin_: ok, I will belive you and have a look how to build (complie) it on my own ... [12:34] framlin_: ;) [12:34] framlin_: thanks!! [12:35] piscisaureus_ has joined the channel [12:35] cmr: Essentially it's "git clone http://github.com/joyend/node.git; cd node; git checkout v0.6.6; ./configure; make; sudo make install" [12:35] cmr: (Warning: from memory) [12:35] cmr: s/joyend/joyent/ [12:36] cmr: You can get the git clone url from http://github.com/joyent/node/ [12:36] boehm has joined the channel [12:36] cmr: By default it install to /usr/local, you can change that with ./configure --prefix=/usr (to install into /usr) or set it wherever you like [12:37] akter has joined the channel [12:40] framlin_: I asume, I have to run apt-get remove before? [12:40] cmr: apt-get purge [12:40] framlin_: ah ok ..... thanks a lot for your hints [12:40] cmr: np [12:40] cmr: purge removes all configuration files. [12:41] cmr: And you don't want stale config [12:41] framlin_: ah, I see [12:45] piscisaureus__ has joined the channel [12:46] westc has joined the channel [12:47] joshfinnie has joined the channel [12:50] disappea_ has joined the channel [12:51] frnkkpp has joined the channel [12:53] Morkel has joined the channel [12:53] frnkkpp has left the channel [12:53] frnkkpp has joined the channel [12:55] tomasztomczyk has joined the channel [12:56] hipsters_ has joined the channel [12:56] frnkkpp has joined the channel [12:57] hal has joined the channel [13:02] IrishGringo has joined the channel [13:07] IrishGringo has joined the channel [13:10] fairwinds has joined the channel [13:12] stagas has joined the channel [13:12] fairwinds has joined the channel [13:13] framlin_: may I become nervous, becaus make test is reporting some errors? [13:13] framlin_: after making node.js [13:15] framlin_: the errors refere to debugger-features ... but debugging within eclipse was one of THE highlights using nodejs ... [13:15] TheJH: framlin_, could you gist the errors? [13:15] framlin_: yes, I will try [13:16] jomoho has joined the channel [13:16] framlin_: https://gist.github.com/1547307 [13:19] shinuza has joined the channel [13:21] npa has joined the channel [13:22] stagas has joined the channel [13:22] socketio\test\94 has joined the channel [13:23] AndreasMadsen has joined the channel [13:24] LarsSmit has joined the channel [13:26] hal: can someone tell me whether there is an ideal place to install node on a linux machine, please? For example, /opt/node, /usr/local or /usr/local/bin or some other place? [13:26] cmr: hal: /usr/local [13:27] cmr: unless you are on opensuse, in which case the convetion is indeed /opt/ [13:27] hal: cmr: /usr/local/node ? Why do you prefer that? [13:27] skm has joined the channel [13:27] pyparadigm has joined the channel [13:27] cmr: hal: No, not /usr/local/node, when you are compiling, ./configure --prefix=/usr [13:27] cmr: --prefix=/usr/local, sorry [13:28] cmr: hal: that is where the FHS says you put local packages, and that is the only system-wide directory that the package manager will not touch [13:28] cmr: It is also convention [13:28] hal: will it create a node directory in /usr/local automatically? [13:29] cmr: No, there is no node directory. [13:29] hal: cmr: what is FHS? [13:29] cmr: hal: "man hier" [13:29] thalll has joined the channel [13:29] cmr: See pathname.org for more explicit docs [13:30] cmr: hal: it will create /usr/local/{bin,etc,share} and whatever else it needs. /usr/local is essentially a local copy of /usr (which itself is essentially a copy of /) [13:30] hal: ah interesting [13:31] cmr: hal: make sure you add "/usr/local/bin" to your PATH [13:32] goshakkk has joined the channel [13:32] hal: cmr: I think it already is, but I will check it. Thank you for all your advice :) [13:32] cmr: any time [13:36] mariusz has joined the channel [13:38] framlin_: has anyone had a look at https://gist.github.com/1547307 and any idea how to resolve the errors? [13:38] framlin_: .. if they are "serious" ... [13:40] cmr: framlin_: I wouldn't worry about them [13:41] cmr: framlin_: is that the result of the test suite? [13:41] kmurph79 has joined the channel [13:42] framlin_: thats the result of make test after makeing and installing node.js "manually" [13:42] jimmyy111 has joined the channel [13:42] cmr: Yeah, don't worry about it. [13:42] framlin_: I did not try yet, if its still possible to debug from eclipse-debugger [13:43] cmr: Does eclipse-debugger tie into the tcp interface v8 exposes? [13:43] mariusz: Hello, anyone here using zombie.js? [13:43] framlin_: but if I saw the errors I feared that ther may be problems now [13:43] framlin_: yes, there is an eclipse-module, that uses the v8 interface [13:44] cmr: Nothing to worry about, should work fine. [13:44] liar has joined the channel [13:44] davetayls has joined the channel [13:44] framlin_: ok, fine ;) [13:44] tomlion has joined the channel [13:45] amigojapan has joined the channel [13:45] framlin_: now npm update runs without looking for that node-waf [13:45] framlin_: thanks again [13:45] framlin_: now I will move all my sources to the node_modules directory .... cause of the require.path change ... [13:45] kyonsalt has joined the channel [13:46] framlin_: where I asking myself, what the good part of that change may be ... ;) [13:47] jxie_ has joined the channel [13:47] framlin_: I found it comfortable to manipulate the require-path from within the sources ... [13:48] stephank has joined the channel [13:50] thirdknife has joined the channel [13:53] jimt has joined the channel [13:53] socketio\test\63 has joined the channel [13:53] r04r has joined the channel [13:54] replore_ has joined the channel [13:54] clarkfischer has joined the channel [14:01] shapeshed has joined the channel [14:04] mariusz has left the channel [14:05] Morkel has joined the channel [14:06] satyr has joined the channel [14:08] neurodrone has joined the channel [14:11] letsgojuno has joined the channel [14:17] Dreamer3 has joined the channel [14:18] Dreamer3 has joined the channel [14:19] fwg: win 5 [14:19] fwg: fail [14:32] hal: how can I get node to run as a nonadmin user? [14:32] deoxxa: try typing "node" [14:33] hal: deoxxa: sorry, how do I get it to run as a service and nonadmin user ;) [14:33] hal: I am told that I need to run npm install forever -g [14:35] arcanis has joined the channel [14:38] scriptle has joined the channel [14:40] scriptle: need documentation support for writing cpp modules for node .. ! .. [14:41] maushu has joined the channel [14:41] deoxxa: hal: depends what you mean by "service" [14:41] tuhoojabotti: aaahh [14:41] tuhoojabotti: node-inspector is pure lust [14:42] cmr: tuhoojabotti: the chrome integration? [14:42] deoxxa: i have a bunch of node "services" running as a non-admin user, i wrote a short wrapper script that starts/restarts/logs node (or really any) applications [14:42] hal: deoxxa: a daemon. To run automatically at startup and to be ready to serve incoming requestions [14:42] deoxxa: those scripts are started from cron should the server ever restart [14:42] tuhoojabotti: cmr: I don't even [14:42] hal: *requests [14:42] churp has joined the channel [14:42] HardP: what's the best way to register custom events application wide? [14:43] HardP: I have two modules (files) and I want to register each other's custom events [14:43] gavin_huang has joined the channel [14:45] TroyMG: for those that were up earlier wondering about this with me: http://stackoverflow.com/questions/8692334/why-do-date-parse2012-01-01-and-date-parse1-1-2012-return-different-valu [14:45] cmr: TroyMG: I don't have a browser right now; could you summarize in a few sentences? (You don't have to if you don't want to) [14:46] mmalecki: hal: forever start script.js [14:46] mmalecki: hal: if you're on node v0.6, use forever's HEAD (from `master` on github) [14:46] braoru has joined the channel [14:50] `3rdEden has joined the channel [14:50] V1 has joined the channel [14:51] tytsim_ has joined the channel [14:53] NetRoY has joined the channel [14:53] mc_greeny has joined the channel [14:53] Cromulent has joined the channel [14:53] scriptle1 has joined the channel [14:55] joshfinnie has joined the channel [14:55] jlank has joined the channel [14:56] skm has joined the channel [14:57] N0va` has joined the channel [14:58] otakutomo has joined the channel [15:01] jakehow has joined the channel [15:02] martin_sunset has joined the channel [15:03] HardP: http://pastebin.com/i58fuNVz [15:03] HardP: why is this not working [15:04] HardP: there is no errors, the script ends without the emitted event being captured [15:04] HardP: it's in coffeescript [15:04] jsj has joined the channel [15:05] jsj has joined the channel [15:05] mbrevoort has joined the channel [15:07] otakutomo has joined the channel [15:09] herbySk has joined the channel [15:13] tomaw has joined the channel [15:21] `3rdEden: any jade `experts` here? [15:21] martin_sunset has joined the channel [15:21] OmidRaha has joined the channel [15:24] TheJH: HardP, uhm, don't call "send" from the prototype like that [15:24] TheJH: HardP, do it on a new instance of "Sender" [15:25] HardP: I know, I just made this example up for the purpose of presenting my problem [15:25] TheJH: HardP, well, then at least one problem is in your example [15:26] TheJH: HardP, also, there's no place where you make a new _CoreHandler, so there's no call to its constructor, so you never call on() [15:26] TroyMG: `3rdEden: I'm not an expert, but I've used it plenty. whats up? [15:26] TheJH: HardP, that file looks weird and like a big pile of dead code, sorry [15:26] HardP: Trej, line #2 creates a new instance of CoreHandler [15:27] HardP: the .get() part [15:27] `3rdEden: TroyMG i want to create a object inside a jade template [15:27] `3rdEden: but having multiple lines with dashes ( - ) breaks it for some odd reason [15:27] HardP: TrejH I can add console.log in the Handler constructor and it gets called just fine [15:27] TroyMG: can you do what you want on a single line? -var foo = {bar: 'baz'} [15:28] erichynds has joined the channel [15:28] TheJH: HardP, ah, ok - but where do you emit on _instance? [15:28] `3rdEden: TroyMG: yes but that would become a really long line [15:28] HardP: That's the problem, I do emit in another module [15:29] TheJH: HardP, you make a _CoreHandler, ok, I misread your code. But there's no place where you're emitting stuff on it [15:29] TroyMG: have you considered passing a factory func to the view in locals? then you could do -var foo = factory(input)? [15:29] HardP: Line 8 [15:30] TheJH: HardP, there's no giant fat magic event emitter in node, and line 8 surely doesn't magically emit on stuff you never reference [15:31] HardP: I thought loading the Handler class in line 2 was enough [15:31] TheJH: HardP, there is no place where you use "Handler", right? You just require() it. Which has no effect. [15:31] HardP: apparentrly not [15:31] `3rdEden: TroyMG yes / no, but this piece of code is only used when the mixin is called. So that would mean I need to include it in every single template call [15:31] `3rdEden: which is not really improving the maintainability [15:32] TroyMG: hmm. you could make it a helper then [15:32] tomlion has joined the channel [15:33] HardP: TrejH so what would be best to approach event based communication across, say, 5 different modules? [15:34] stagas has joined the channel [15:36] TroyMG: `3rdEden: app.helpers{ mixinFactory: function(input){ return {bar: 'baz'}; } }; [15:36] TroyMG: that would then be available on each view for you, without having to pass it via locals [15:36] `3rdEden: TroyMG yes that might work [15:38] hung has joined the channel [15:38] hung: hi all [15:39] Renegade001 has joined the channel [15:39] bshumate has joined the channel [15:39] bshumate has joined the channel [15:41] satyr has joined the channel [15:45] plow has joined the channel [15:45] plow: hi, can someone please tell me how to send a binary file using express js? [15:45] plow: thanks ;) [15:46] djazz has left the channel [15:48] criswell has joined the channel [15:49] tomlion has joined the channel [15:49] satyr has joined the channel [15:49] tomlion has joined the channel [15:50] tomlion has joined the channel [15:50] dubenstein has joined the channel [15:51] tomlion_ has joined the channel [15:51] mikl has joined the channel [15:52] hal: what version of node should I be using? mmalecki mentioned 0.6 - is this the stable version? [15:52] AndreasMadsen has joined the channel [15:53] cmr: hal: yes, 0.6.6 is stable [15:54] mbrevoort has joined the channel [15:55] wingie has joined the channel [15:55] hal: it's strange, but when I ran ./configure on master, there wasn't a problem, but with 0.6 it gives a summary of checks that it has performed and alerted me that openssl dev packages are not installed [15:56] hal: doesn't master do the same checks? [15:56] hal: what ssl dev packages specifically are required on ubuntu? [15:56] hal: is it libssl-dev ? [15:56] cmr: Yes [15:56] MatthewS has joined the channel [15:56] hal: ah thank you cmr :) [15:56] scriptle1: where can i find documentation for writing c++ modules for nodejs ????? [15:57] euoia has joined the channel [15:58] subbyyy has joined the channel [16:00] purr has joined the channel [16:01] madhums has joined the channel [16:01] TheJH: scriptle1, http://nodejs.org/docs/latest/api/addons.html [16:02] TheJH: scriptle1, but reading real code is better than documentation [16:04] tbranyen: unless the real code sucks :-/ [16:05] MatthewS has joined the channel [16:05] scriptle1: @TheJH ... I saw that one. But its definetly not all the functions that node provides [16:05] TheJH: scriptle1, right [16:05] TheJH: scriptle1, there's no real list of them all [16:05] QaDeS has joined the channel [16:06] TheJH: scriptle1, you'll probably have to read in node core stuff if you want to do more than the basic stuff [16:07] scriptle1: hmm. Why wouldn't many ppl write c++ code for modules.... where even a helloworld program runs 3 times faster approx.. [16:08] c4milo1 has joined the channel [16:08] blup has joined the channel [16:08] TheJH: scriptle1, huh? node has a huge startup time, but it's not intended to be restarted all the time [16:08] TheJH: node is for long-running stuff [16:09] scriptle1: I din't quite understand that [16:09] TheJH: and v8 optimizes stuff at runtime, you won't see anything of that if you just let it run for parts of a second [16:09] TheJH: I'll be back in 5min or so, restarting so that virtualbox works [16:10] ncb000gt: scriptle1: There are a number of modules written in c++, there could likely be more, but they are typically a bit harder to maintain. (I know first hand) [16:11] `3rdEden: TroyMG: decided to build a filter for it :) [16:12] `3rdEden: TroyMG but thanks for your advice [16:12] omry has joined the channel [16:15] TheJH has joined the channel [16:16] tomlion has joined the channel [16:17] martin_sunset has joined the channel [16:19] vicapow has joined the channel [16:22] scriptle1: I'm using nowjs in my application. Is express framework good to be used with it. I'm asking this because, right now my HTTPServer handles only the url request and echoes appropriate content with headers. Since I use nowjs in my application. All other asynchronous requests from the browser is through now object ... which is inturn handled by nowjs at the server. Also there is no relation between the request object and the now object. Both are not accessib [16:24] herbySk74 has joined the channel [16:24] mbrevoort has joined the channel [16:25] ncb000gt: scriptle1: not sure, but I believe there is a nowjs irc channel (double check the website). someone there would likely have more experience than I do there. [16:27] saesh has joined the channel [16:30] scriptle1: tried ... its quite un-responsive .. [16:31] ncb000gt: hmm [16:32] ncb000gt: Maybe try the mailing list? [16:32] ncb000gt: I will say that I have used now and express before [16:32] ncb000gt: But I wont be able to appropriately answer questions you might have. [16:33] ncb000gt: And, I haven't used it in anything large. [16:34] hackband has joined the channel [16:35] chadskidmore has joined the channel [16:36] _jzl has joined the channel [16:36] scriptle1: Hmm. Even I've nt used it any larger ... And I've not used express before .. So could you tell me how it was to use express with now .. [16:37] N0va has joined the channel [16:37] okee has joined the channel [16:39] ncb000gt: It was fine when I used it. I'm not sure what more you are looking for. [16:39] Nss has joined the channel [16:39] criswell has joined the channel [16:40] scriptle1: ok .. could you provide me the link to your app src ? I'll look into it and understand [16:42] Morkel has joined the channel [16:42] NetRoY has joined the channel [16:43] Renegade001 has joined the channel [16:43] ncb000gt: erm, i don't recall if it is open. [16:43] ncb000gt: let me look [16:44] ncb000gt: it is not [16:44] ncb000gt: sorry [16:53] Helloer has joined the channel [16:54] eastc has joined the channel [16:57] eastc: ghost town [16:58] cmr: 650 people is a ghost town? [16:58] eastc: only few are active today though [16:58] eastc: but that's expected [16:58] eastc: 2012 and all [16:58] TheFuzzball: If you want a ghost town go to #lfs-support [16:59] cmr: TheFuzzball: that's not even on this server. [16:59] cmr: And it's quite an active channel. [16:59] frisbee has joined the channel [16:59] TheFuzzball: LFS is on freenode isn't it? [16:59] TheFuzzball: ACTION checks... [16:59] cmr: No. [16:59] cmr: irc.linuxfromscratch.org [17:00] nerdy_ has joined the channel [17:00] TheFuzzball: Oh, it was a while ago that I did LFS, I remember it being quiet though. [17:01] cmr: ACTION is in an LFS right now [17:01] TheFuzzball: OS or channel? [17:01] cmr: OS [17:02] TheFuzzball: It's quite a lot of fun doing it, I spend more time doing OSx86 now though. More fun :) [17:02] cmr: OSx86 you say? [17:02] cmr: ACTION investigates [17:03] scriptle has left the channel [17:03] cmr: Oh, lame. [17:03] TheFuzzball: Oh? [17:03] scriptle has joined the channel [17:04] scriptle has left the channel [17:04] cmr: Who cares about OSX :P [17:04] brianloveswords has joined the channel [17:04] TheFuzzball: lol, cool peoples :D [17:05] TheFuzzball: For Linux, I like Arch these days. [17:05] cmr: Arch is alright, as long as you keep it maintained constantly. [17:06] pyparadigm has joined the channel [17:07] cmr: When I want binary rolling release I much prefer debian. When I don't, I like exherbo (or gentoo, if need be). This LFS is for giggles and teehees. [17:07] criswell has joined the channel [17:07] mraleph has joined the channel [17:07] TheFuzzball: Yeah, I just did LFS to get more familiar with Linux [17:08] TheFuzzball: Shamefully, I've never actually tried Debian, just distributions derived from it. [17:09] cmr: They dilute the goodness (although crunchbang is alright) [17:10] TheFuzzball: I do like #! [17:10] ryanfitz has joined the channel [17:10] cmr: It's just raw debian with openbox and pypanel and a few other things, it doesn't really do much. [17:11] TheFuzzball: ACTION likes minimalism [17:12] cmr: Me too. Which is why I love exherbo and I'm really liking LFS too. If something breaks, it's my own damn fault. Few abstractions, easy to hack, very exposed to my manipulating hands. [17:12] cmr: Debian is for when I'm feeling lazy :D [17:13] MatthewS has joined the channel [17:14] CarterL has joined the channel [17:15] graham_ has joined the channel [17:16] okee has left the channel [17:16] V1 has joined the channel [17:17] jarek has joined the channel [17:17] jarek has joined the channel [17:18] scriptle has joined the channel [17:18] `3rdEden has joined the channel [17:19] krnlyng has joined the channel [17:19] synkro has joined the channel [17:19] jarek__ has joined the channel [17:20] ChrisMatthieu has joined the channel [17:20] scriptle: exit [17:20] koo3 has joined the channel [17:26] cognominal has joined the channel [17:32] orospakr has joined the channel [17:33] cjm has joined the channel [17:33] thirdknife has joined the channel [17:39] lzskiss has joined the channel [17:43] SirFunk: hi there. I have a problem i can't figure out. I have a node project using mongoose. My main app does a bunch of socket.io stuff. My mongoose models are in modules. I need some way for my models to access BACK to the main app to have access to the io. variable (so i can push messages when models are removed and such) any idea how? [17:44] boltR has joined the channel [17:44] stagas has joined the channel [17:45] jarek__ has joined the channel [17:45] cmr: SirFunk: don't push messages, I would turn exports into an EventEmitter and emit events, have the main app install handlers. [17:45] cmr: (which is pushing messages, just not how you thought of it (I think)) [17:48] TheJH: any native module that's widely used and I can mess with? [17:48] cmr: TheJH: it's a tiny one, you might not have heard of it, "node" ;) [17:48] TheJH: I can't get mine to work, so I want to see how I can get another one to stop working [17:48] TheJH: cmr, an addon :/ [17:49] jarek has joined the channel [17:49] jarek has joined the channel [17:49] mbrevoort has joined the channel [17:49] TheJH: cmr, sorry, I guess "native module" is misleading. I'm talking about c++ addons [17:50] cmr: TheJH: right, node is one of those to v8 (but I suppose it isn't quite what you're looking for ;) [17:50] TheJH: cmr, heh, right :D [17:50] cmr: I honestly don't know of one off the top of my head besides node-microtime [17:50] cmr: It shouldn't be too larget but I haven't messed with the source [17:50] cmr: s/larget/large/ [17:51] Squeese has joined the channel [17:51] TheJH: hmm, hiredis-node should work [17:52] enmand has joined the channel [17:53] davetayls has joined the channel [17:53] brianseeders has joined the channel [17:57] ovaillancourt has joined the channel [18:02] neurodrone has joined the channel [18:03] Vennril has joined the channel [18:04] stagas has joined the channel [18:05] thirdknife has joined the channel [18:06] RLa has joined the channel [18:12] vol4ok has joined the channel [18:12] fbartho has joined the channel [18:12] herbySk has joined the channel [18:13] jarek__ has joined the channel [18:14] stagas has joined the channel [18:14] spartango has joined the channel [18:15] Cheery has joined the channel [18:15] spartango: hey anyone used/using sequelizejs? [18:15] Cheery: I'd need wiki syntax into node. [18:16] RLa: spartango, it only supports mysql? [18:16] spartango: right [18:16] spartango: so i've been playing with it [18:16] blup_ has joined the channel [18:16] Cheery: one of a kind I can restricts to just certain kind of elements. so that html injections aren't available. [18:16] spartango: and theres one weird thing [18:17] RLa: Cheery, isn't that restriction? [18:17] RLa: Cheery, otherwise you could look at textile module [18:17] TheJH: Cheery, would markdown work for you, too? [18:17] dgathright has joined the channel [18:17] Cheery: well I can look on it. [18:17] spartango: for some reason when i build objects with integer fields, instead of assigning values sequelize decided to create N (assignment) attributes in the object [18:18] RLa: maybe you can show code [18:18] spartango: yes [18:18] spartango: lemme pull up a gist [18:18] TheJH: Cheery, I built something that can take unsanitized output of a markdown parser (e.g. marked) and sanitize it, but it's not sooo tested yet and I didn't put it in a module yet [18:19] RLa: spartango, have you also looked at alternatives [18:19] spartango: a little. there's persistencejs...and then theres the option of moving off of mysql [18:19] erichynds has joined the channel [18:19] spartango: which i'm actually really cool with [18:19] TheJH: Cheery, https://github.com/thejh/node-forum/blob/master/functions.js#L57-159 - this function takes escaped HTML and unescapes safe stuff [18:20] spartango: cause mysql is annoying in others ways. i'm building something quick and dirty tho... [18:20] RLa: Cheery, http://search.npmjs.org/#/stextile <- textile module [18:20] TheJH: Cheery, it uses a whitelist for tags and a whitelist per attribute. also, it does extra checking on "href" to make sure it's not a javascript: link or so [18:21] RLa: spartango, what about query builders? [18:21] TheJH: s/whitelist per attribute/attribute whitelist per tag/ [18:21] spartango: RLa suggestion? i was hoping to get away with ORM but... [18:22] Cheery: RLa: is textile available for clientside as well? [18:22] RLa: spartango, depends what orm features you want [18:22] heatxsink: anyone know of a good offline documentation source for express and node? [18:22] TheJH: heatxsink, for node, the documentation folder int he node repo [18:22] TheJH: *in the [18:22] spartango: RLa, well my use case is nearly as simple as it gets [18:23] heatxsink: TheJH: thx [18:23] justmoon has joined the channel [18:23] chadskidmore has joined the channel [18:23] pandeiro has joined the channel [18:23] heatxsink: TheJH: any idea for express? [18:24] TheJH: heatxsink, no [18:24] heatxsink: thx [18:27] baudehlo1 has joined the channel [18:28] dshaw_ has joined the channel [18:29] ghilly has joined the channel [18:29] spartango: issue with sequelize -> https://gist.github.com/1547986 -> thoughts? [18:30] ChrisMatthieu has joined the channel [18:30] kmiyashiro has joined the channel [18:30] jbpros has joined the channel [18:31] MatthewS has joined the channel [18:31] jarek__ has joined the channel [18:32] RLa has joined the channel [18:32] RLa: aww, got disconnected [18:32] RLa: 2012: year of shitty internet [18:33] RLa: Cheery, i think that textile module was originally client-side solution [18:33] hal: is this the repo I should be using? git://github.com/joyent/node.git [18:34] spartango: RLa https://gist.github.com/1547986 [18:34] objectiveous_ has joined the channel [18:35] Martz has left the channel [18:36] RLa: spartango, you mean those attributes 0, 1, 2? [18:36] spartango: yea wtf. [18:36] spartango: haha [18:36] spartango: oh and if i set y to 200 [18:36] spartango: i get 200 attributes :| [18:37] RLa: i guess you gotta dig in its source [18:37] spartango: yea [18:37] SirFunk: cmr: sorry i just saw your message. I tried doing that before and couldn't figure it out.. got any good docs on that? I think part of the problem was it exports an instance of Mongoose.model or something I coulnd't figure out how to turn that into an event emitter [18:37] spartango: workin on it bleh [18:38] cjm has joined the channel [18:41] Nopik has joined the channel [18:42] EvilPacket has joined the channel [18:43] RLa: spartango, does it support specialized fetching techniques [18:43] spartango: RLa, such as? [18:44] kmiyashiro has joined the channel [18:44] mikl1 has joined the channel [18:45] spartango: rla [18:45] RLa: i.e can you fetch some specified subset of images and their rois without doing rois query for each image in the set [18:45] spartango: RLa, what're the chances that my "length" field name is killing things [18:45] spartango: yes [18:46] spartango: i can [18:46] RLa: is there an example? [18:46] jarek__ has joined the channel [18:46] glen has joined the channel [18:46] RLa: this is one of the things that many orms do not get right [18:46] mraleph has joined the channel [18:46] spartango: yea i know [18:47] spartango: 1 se [18:47] spartango: c [18:50] mandric has joined the channel [18:50] mattkime has joined the channel [18:51] path[l] has joined the channel [18:51] mattkime: has anyone succeeded in installing the async module globally? [18:52] path[l]: hi, can anyone tell me where the source gets installed? Im facing a strange issue with require and I want to look at module.js and what it's doing [18:52] monokrome has joined the channel [18:52] criswell has joined the channel [18:52] jsj has joined the channel [18:52] 50UAAAMQK has joined the channel [18:52] hellp has joined the channel [18:52] dnyy has joined the channel [18:52] xandy has joined the channel [18:52] txdv has joined the channel [18:52] npa has joined the channel [18:52] mattkime: hm, i guess everyone is hungover [18:53] cmr: mattkime: it's only been a minute since you asked... give it some time [18:53] RLa: mattkime, what problem is there with installing it [18:54] mattkime: i'm attempting to install async globally. the install appears to succeed but its not found when used in a script [18:54] mattkime: it found if i install locally [18:54] path[l]: or anyone knoww where node.js gets installed on an linux system? [18:54] cmr: path[l]: how did you install it? [18:54] cjm has joined the channel [18:55] path[l]: via a dmg [18:55] cmr: There are no dmg on linux [18:55] mc: so a mac [18:55] T-Co has joined the channel [18:55] mc: which i believe puts it in /usr/local/bin [18:55] mattkime: that sounds right [18:55] cmr: You'll probably find stuff in /usr/local/lib too though (unless os x is really wonky) [18:56] path[l]: yeah but that's the node executable. Im trynig to find module.js [18:56] Aria has joined the channel [18:56] path[l]: I have /usr/local/lib, but there I only seesome node modules [18:56] RLa: spartango, this is API i usually use: http://pastebin.com/K4vqriA4 [18:56] ph^ has joined the channel [18:56] spartango: RLa ok thanks! [18:56] arcanis has joined the channel [18:57] patcito has joined the channel [18:57] RLa: mattkime, http://blog.nodejs.org/2011/03/23/npm-1-0-global-vs-local-installation/ [18:57] path[l]: cmr: where would module.js be? [18:58] cmr: path[l]: I don't know, I don't use a mac. Why don't you use find? "find / -name module.js" [18:58] hal: I am still no closer to getting node + forever working after trying most of the day :/ Would someone help me please? [18:58] isaacs: path[l]: what is module.js? [18:58] isaacs: path[l]: are you talking about the node builtin require("module") thing? [18:58] RLa: spartango, for all my projects i have found that kind of api sufficient [18:59] spartango: ok [18:59] path[l]: isaacs: yes, Im trying to require 'compress' and it failes [18:59] path[l]: and the last line of the stacktrace is from module.js [18:59] hal: I have cloned https://github.com/joyent/node, performed configure and make install. I have run npm install forever -g [18:59] spartango: RLa, my rails days have made me a bad person [19:00] isaacs: path[l]: require("module") is compiled into node. [19:00] path[l]: ah hmm [19:00] isaacs: path[l]: you can view the source via console.log(process.binding("natives").module) [19:00] isaacs: path[l]: or go here: https://github.com/joyent/node/blob/v0.6/lib/module.js [19:00] neubi_ has joined the channel [19:00] hal: I am running this script and get the error underneath http://pastebin.com/ZWuSTsKq [19:01] path[l]: require('compress') is not working from the node repl in a folder. where I have node_modules/compress/compress.node [19:01] isaacs: path[l]: what's your error, though? [19:01] RLa: spartango, i come from java shop and i have developed bad feelings against complex solutions, including most orms [19:01] mattkime: RLA - thanks, reading.... [19:01] isaacs: path[l]: can you gist it? you might get better results that way [19:01] path[l]: sure think [19:01] path[l]: thing* [19:02] isaacs: hal: looks like daemon.node isn't there. [19:02] spartango: java makes you think that way, and that is decidedly a good thing :) [19:02] hal: isaacs: why would that be do you think? [19:02] isaacs: hal: what does this output? ls -laF /usr/local/node_modules/forever/node_modules/daemon/build/Release/daemon.node [19:02] isaacs: hal: not sure [19:02] isaacs: hal: maybe you could just use upstart and monit. [19:02] hal: -rwxrwxr-x 1 root root 88755 2012-01-01 16:20 /usr/local/node_modules/forever/node_modules/daemon/build/Release/daemon.node* [19:02] isaacs: hal: hm. it's there. [19:03] isaacs: i dunno [19:03] RLa: spartango, and optimizing fetching strategies/partial fetches in orms is way way harder than simply writing specialized view in the db and pulling data from it (as it were normal table!) [19:03] isaacs: hal: can you go into the node repl, and try to require() it directly? [19:03] spartango: yes yes i know [19:03] spartango: RLa, this is me being lazy not building something properly. which i am now reversing :P [19:04] path[l]: isaacs: https://gist.github.com/1548058 (requiring compress) [19:04] martin_sunset has joined the channel [19:04] hal: isaacs: thank you - I deleted that whole node_modules directory and am going to reinstall to see if it makes a difference [19:04] hal: will let you know in a few [19:04] RLa: spartango, orm libs are quite nice for generating initial schema tho, i have been using standalone activerecord and datamapper scripts for that [19:04] spartango: ya [19:05] isaacs: path[l]: compress's main module is defined as build/default/compress.node [19:05] mattkime: hm, perhaps its easier to install async locally but i'd prefer to install it globally [19:05] isaacs: path[l]: is that file there? [19:05] isaacs: path[l]: try `npm rebuild compress` [19:05] path[l]: hmm no it isnt. that is odd [19:06] isaacs: path[l]: there ya go [19:06] isaacs: path[l]: maybe it's in build/Release/compress.node instead? [19:06] path[l]: yeah it is [19:06] NathanDavid has joined the channel [19:06] path[l]: this used to work though [19:07] npa has joined the channel [19:07] isaacs: path[l]: did you change your version of node from 0.4 to 0.6? [19:07] path[l]: yes I did [19:07] isaacs: k [19:07] isaacs: looks like the compress package maintainer didn't :) [19:07] path[l]: so do I just fork compress and change that line in the package.json if I want to make this work? [19:07] path[l]: ah [19:07] isaacs: lesson of today: binary modules are a huge pain int he ass. [19:07] path[l]: thanks a lot [19:08] isaacs: a neverending shit show of terror and fail. [19:08] isaacs: just use javascript. avoid compiled npm modules at all costs. [19:08] mmalecki: daemon.node is going away. [19:08] isaacs: see what I mean? ^ [19:08] mmalecki: already gone on master [19:08] path[l]: hmm. I need a replacement for compress though. Im making an http call which gives me gzipped response data [19:09] isaacs: path[l]: just use the zlib bindings in node itself, if you're using 0.6 [19:09] path[l]: ah ok [19:09] isaacs: http://nodejs.org/docs/latest/api/zlib.html [19:09] path[l]: cool, thanks. Let me figure this out [19:11] mikeric has joined the channel [19:11] spartango: RLa, fixed [19:11] spartango: it was the length thing [19:11] spartango: but thanks for the help! [19:11] spartango: and yea. no more ORM crutches :P [19:12] RLa: so those extra "attributes" do not appear anymore? [19:14] T-Co has joined the channel [19:16] towski has joined the channel [19:18] Renegade001 has joined the channel [19:19] Cheery: I think I design the markup myself. [19:20] hotroot has joined the channel [19:21] agnat_ has joined the channel [19:23] andrewfff has joined the channel [19:23] shapeshed has joined the channel [19:25] ryanfitz has joined the channel [19:26] tmpvar has joined the channel [19:26] BrianE has joined the channel [19:28] astropirate has joined the channel [19:29] spartango: RLa yp [19:29] spartango: i found a lazy bug in the ORM [19:31] tkaemming has joined the channel [19:31] towski has joined the channel [19:32] adambeynon has joined the channel [19:33] kitt has joined the channel [19:33] kitt has joined the channel [19:34] EvilPacket has joined the channel [19:35] Morkel has joined the channel [19:35] criswell has joined the channel [19:35] kmurph79 has joined the channel [19:36] disappearedng has joined the channel [19:38] shanez_ has joined the channel [19:39] davetayls has joined the channel [19:39] hal: please someone look at this error - I can't get forever to work :/ http://pastebin.com/Y5fK8Sq5 [19:40] hal: I am using master [19:40] marcello3d has joined the channel [19:40] hotroot: "Error: Unable to load shared library /usr/local/lib/node_modules/forever/node_modules/daemon/build/Release/daemon.node" [19:41] hotroot: That sort of sums it up =P [19:41] hal: hotroot: sorry, I'm afraid it doesn't to me :/ [19:41] hal: the file exists [19:42] AndreasMadsen: hal: deamon.node and v0.6 do not work together [19:42] hal: AndreasMadsen: but I have installed master [19:43] AndreasMadsen: hal: master (as in 0.7) same issue [19:43] hal: is there a reliable way to set node up. I just cannot get it to work :/ [19:43] Cromulent has joined the channel [19:44] koo3 has joined the channel [19:45] igl1 has joined the channel [19:45] cjus has joined the channel [19:45] AndreasMadsen: hal: I'm afraid you will have to wait, as it looks forever will skip 0.6 and support node 0.7, but the forever guys are not there yet. [19:46] snearch has joined the channel [19:46] hal: AndreasMadsen: what do you use to keep a script running? [19:47] AndreasMadsen: hal: I don't have anything running continuously [19:47] Wizek-other has joined the channel [19:48] hal: AndreasMadsen: I don't understand - how do you run a webservice with node? [19:48] hotroot: Node apps run constantly [19:48] hotroot: It's not like PHP [19:48] hal: hotroot: you will need to spell it out. I really don't know what you mean [19:49] hotroot: Here's an example using expressjs, the node web module everyone uses [19:49] hotroot: https://github.com/visionmedia/express/blob/master/examples/helloworld/app.js [19:49] MatthewS has joined the channel [19:49] AndreasMadsen: hal: introduction video to node: http://www.youtube.com/watch?v=jo_B4LTHi3I [19:49] cha0s has joined the channel [19:50] hotroot: That runs constantly. Every time a get request calls "/" (the base path of the site, like google.com) it sends back "Hello World" [19:50] flip_digits has joined the channel [19:50] towski has joined the channel [19:50] hal: AndreasMadsen: I watched that, although admittedly a while ago. I don't think that covers what I mean [19:50] strevat_ has joined the channel [19:50] hal: hotroot: but what listens on a designated port, if no process is running? [19:50] hotroot: So you could do app.get('/about') and have it res.send("Thanks for visiting the about page! etc") [19:51] mdel has joined the channel [19:51] hotroot: Last line [19:51] hotroot: app.listen(3000); [19:51] hotroot: What do you mean "if no process is running" [19:51] AndreasMadsen: hal: It simple as long there is thinks there can happen, the program won't quit [19:52] hal: I am really sorry to interupt this conversation ... I have to go for a bit..can we pick this up in a little while? Sorry about that? [19:52] hotroot: I gtg anyway, ttyl [19:52] hal: *sorry about that [19:52] AndreasMadsen: hal: The fact that a client can connect is enough to keep the node process alive [19:52] hal: ok thanks for the info hotroot [19:52] hal: bbiab [19:53] tomlion has joined the channel [19:54] mandric has joined the channel [19:55] shinuza has joined the channel [19:55] strevat_ has joined the channel [19:56] marcello3d: anyone using mongolian deadbeef, please test out v0.1.15 and see if you have any compatibility problems [19:58] majek has joined the channel [20:00] thalll has joined the channel [20:02] jgornick has joined the channel [20:03] kyonsalt has joined the channel [20:04] martin_sunset has joined the channel [20:05] savid has joined the channel [20:06] savid: When I install npm on ubuntu oneiric (apt-get install npm), what user am I supposed to use to install npm packages, since "root" is not recommended? [20:07] Aria: root is recommended. [20:07] savid: Aria, npm ERR! sudon't! Running npm as root is not recommended! [20:07] Aria: Is that an NPM from this century? [20:08] Aria: what version? [20:08] savid: Soo, I'm getting mixed signals here ;-) [20:08] savid: Whatever is installed by oneiric... one sec [20:08] Aria: I suspect that's "apt-don't" then. [20:08] Aria: npm 1.0 is a very new paradigim, and much improved (And works on current node ...) [20:08] c4milo1 has joined the channel [20:09] savid: oh. bummer. [20:09] savid: I'm just trying to simplify my configuration management system. It sucks when I can't use default package providers. [20:09] savid: I wonder if there's a PPA with the latest npm [20:09] Aria: Possibly. [20:10] cmr: Just compile it, it isn't hard. [20:10] Aria: npm at least, post-1.0, now installs packages locally into an application, so it does play nice with system package managers. [20:10] Aria: cmr: compiling it isn't hard. Automating it into a distribution system that works with system packages is less easy. [20:11] eephillip has joined the channel [20:11] Renegade001 has joined the channel [20:12] cmr: I am too unconscious to discuss that but believe me, I would like to [20:12] Aria: Hehe. Of course, the right answer to that in my mind is "make your own PPA if one doesn't exist" -- that's why we have those tools. [20:13] cmr: Yup [20:13] cmr: Gentoo also seems to do it pretty well, Just sayin' [20:13] Aria: Heh. Well. Their native package management is 'compile it' [20:13] cmr: A great system, in my mind :) [20:14] Aria: I personally can't stand it -- I'd rather have something that's verifiable with cryptographic signatures. But to each their own! [20:14] Aria: (And has fewer install-time entailments that can affect the outcome) [20:15] cmr: Aria: you can verify tarballs, they usually provide hashes (not as secure, true) [20:15] Aria: Yeah, that's verifying source, not outcome. [20:15] Aria: If you compile a good tarball with a hacked compiler, you're still screwed. [20:16] cmr: Well of course you need to ensure the integrity of the toolchain [20:16] Aria: (I've used RPM rather a lot to verify a system after an attack.) [20:16] isaacs: Aria: if you hack the tarball, you can hack the checksum [20:16] isaacs: unless the checksums are distrubited and the tarballs aren't [20:16] Aria: isaacs: Yes. But RPMs have signatures, not checksums. [20:16] Cheery: using express to get json and upload files seems tricky. :/ [20:16] isaacs: right [20:16] isaacs: it'd be nice to start putting sigs in npm packages. [20:17] Aria: I'd love to help test that! [20:17] isaacs: pita to do in a way that doens't require pgp/gpg installed on every system, though [20:17] Aria: Yeah. [20:17] Aria: Unless we implement enough of gpg to do it ourselves. [20:19] Aria: And it's be good to have the installed copies be equally verifiable -- bittorrent style hashing. [20:19] Aria: Or... well, there's another system that can give a good checksum of a set of files. [20:19] Aria: git. [20:20] mraleph has joined the channel [20:24] Swizec has joined the channel [20:24] heavysixer has joined the channel [20:29] plow has joined the channel [20:29] plow: hi, can anyone tell me if 'cure' hosting is any good for node? [20:29] joshfinnie has joined the channel [20:29] plow: http://cure.willsave.me/ [20:30] cha0s has joined the channel [20:30] cha0s has joined the channel [20:35] chadskidmore has joined the channel [20:36] Shaunzie has joined the channel [20:40] mattgifford has joined the channel [20:41] c4milo2 has joined the channel [20:41] cjus has joined the channel [20:41] hal: does anyone use nvm? It just doesn't seem to work for me - even just running "nvm" at the shell it should print out the help file, but it does not [20:43] path[l] has joined the channel [20:46] insin: I use it [20:46] insin: did you add it to your bash profile? [20:47] hal: insin: ah, thank you, it works now :) [20:48] rgl has joined the channel [20:48] RLa: what is the use of it? [20:49] hal: RLa: it manages versions, a bit like nave [20:49] RLa: making your own environment more complex? [20:49] RLa: is that like rvm? [20:49] context: yes [20:49] RLa: uh, horror [20:49] isaacs has joined the channel [20:49] jstash has joined the channel [20:50] hal: RLa: what is wrong with it? [20:50] context: im more a fan of rbenv over rvm [20:50] context: but they are both awesome [20:50] insin: nvm is nice [20:50] RLa: i hope we do not reach into point where running multiple node js apps requires all different node installation per app [20:51] hal: RLa: you may have missed the point! :p [20:51] slajax has joined the channel [20:51] RLa: well, i see rvm only as temporar solution for ruby gem mess [20:51] context: I always just run latest node. [20:52] RLa: context, yeah, but will we have apps that become very popular but will refuse to run with latest? [20:52] hal: RLa: what happens when there is a new release of node and you upgrade to it, and then find that it causes problems with your app? [20:52] hal: RLa: how can that not happen, in time? [20:52] RLa: hal, you first update in testing environment, not directly in production :) [20:53] hal: RLa: yes, that's true, but sometimes it just cannot be foreseen [20:53] hal: even in a testing env it's useful [20:53] RLa: it has happened a lot (not yet with node for me tho) [20:53] hal: to confirm that it's definitely compat with new version that is doing it, you can switch back and forth [20:53] redir_ has joined the channel [20:54] mikedeboer has joined the channel [20:54] RLa: oh ok, i just fear complexity it might add [20:54] RLa: i.e some env variable gets not cleaned up [20:55] booo has joined the channel [20:55] RLa: btw, module assert is only for unit tests? [20:56] NothingMan65 has joined the channel [20:56] RLa: not for using in actual code? [20:56] _hipster has joined the channel [20:56] RLa: i see it just throws exception [20:56] hotroot: hal: You still not understanding node? I can answer more questions [20:56] hal: hotroot: oh hi - thank you :) [20:57] RLa: hotroot, answer mine :) [20:57] hotroot: Haha, well I'm not a node expert, but ask here and I'll see what I can do =P [20:57] briancray has joined the channel [20:58] hal: hotroot: for node to respond to a request, it has to have a system process running. I can understand how to do this by running node myscript.js, but I want to be able to log out of the system. How do I do that - ie keep it running forever? [20:58] hal: hotroot: and what happens when there is an exception? I want it to recover [20:58] _riman_ has joined the channel [20:59] RLa: hal, you need to daemonize it [20:59] cmr: hal: well, with exceptions you can have a try/catch at the outer level and try and handle it kindly. [20:59] cmr: And what RLa said [20:59] hotroot: Yeah, you write custom error catchers depending on the possible error [20:59] hal: do you have any references of the best way to daemonize it? [20:59] cmr: What OS? [21:00] hotroot: Eg SQLstuff() { if (err) {console.log("SQL error from " + user);} etc. [21:00] hal: you can't cover all errors specifically. How do you catch them on the outer level? [21:00] hal: ubuntu [21:00] NothingMan65 has left the channel [21:00] RLa: a quick solution for daemonizing is nohup [21:00] cmr: I belive ubuntu uses upstart [21:00] hotroot: Yeah, you sorta can catch all errors [21:00] hotroot: With try catch [21:01] hotroot: Unless its an error that causes the server to crash, in which case error handling doesn't really do much [21:01] RLa: i would not catch all errors [21:01] RLa: not fatal ones at least [21:01] andrew12: 677 nicks [21:01] andrew12: almost 700 [21:02] MatthewS has joined the channel [21:02] RLa: one simple way is to log all errors and assume everything works ok [21:03] RLa: trying to recover from database errors/disk full/out of memory and such seems pointless [21:03] cmr: Yeah [21:04] cmr: At that point you should die, you've got a bug somewhere [21:04] igl has joined the channel [21:04] hotroot: It can gracefully end though [21:04] jbrokc has joined the channel [21:05] hotroot: If you're past development, and a user's SQL query fails, you don't want the whole thing to die immediately, it should resolve all further SQL queries, etc. [21:05] jbrokc: is there a super easy npm package that just runs a server on a directory on localhost or something? [21:05] RLa: i would die immediately tho [21:05] hotroot: jbrokc: What does it need to do? [21:05] igl2 has joined the channel [21:05] RLa: or log big fat error [21:06] RLa: well, depends [21:06] jbrokc: hotroot: i have an index.html file I want served up on localhost. that's pretty much it [21:07] hotroot: I think expressjs can do static fileserving [21:07] context: jbrokc: file:/// [21:08] jbrokc: context: won't work for zombie.js [21:08] context: why not? [21:08] mikeal has joined the channel [21:09] RLa: connect can do it as well [21:09] CarterL has joined the channel [21:09] RLa: with static route or whatever it was called [21:09] igl has joined the channel [21:10] jbrokc: https://github.com/remy/servedir hope this works... [21:11] jbrokc: yay [21:12] jbrokc: what the hell zombie… Error: connect EHOSTUNREACH [21:13] mmalecki: https://github.com/nodeapps/http-server/ is fine too [21:14] jbrokc: mmalecki: i'll check it out, thanks man [21:14] mmalecki: jbrokc: :) [21:16] eviltwin_ has joined the channel [21:16] jbrokc: dammit, i'm getting the same thing... [21:16] jbrokc: maybe zombie's being weird [21:18] aGHz has joined the channel [21:19] jbrokc: any good alternatives to zombie.js? [21:20] jbrokc: it seemed too good to be true and I can never get it to work for me [21:23] redir_ has joined the channel [21:23] Aria: zombie's pretty good. [21:24] Aria: Host unreachable sounds like perhaps you got bogus DNS and now your computer's connecting to the wrong IP for the site. [21:24] SubStack: testling of course! [21:25] mmalecki: SubStack++ [21:25] catb0t: SubStack now has 1 beer [21:26] Nopik: hi SubStack ;) [21:27] jbrokc: Aria: well, here's what's happening… http://cl.ly/3o1X0n0b3X3I3E3k0618 [21:27] Shaunzie: anyone have an example of how to run tests on routes for express? [21:28] context: what editor is that [21:28] jbrokc: vim [21:29] Aria: That looks right, jbrokc -- what's the error? [21:29] jbrokc: Aria: nothing - just nothing happens at all. if i go in chrome to localhost:3000/index.html, everything works fine [21:30] brianloveswords has joined the channel [21:32] savid: Does npm have an "uninstall" command? I've tried npm remove and npm uninstall, but it doesn't seem to remove it [21:32] blup has joined the channel [21:32] Shaunzie: savid: remove what? [21:32] hotroot: Pretty sure npm uninstall worked for me [21:32] savid: Oh, hmm. NPM is installing in my home dir even though I'm using sudo [21:33] savid: I'm trying to install less css [21:33] c4milo1 has joined the channel [21:33] savid: (er, re-install less) [21:33] Shaunzie: savid: in a local project? [21:33] Aria: jbrokc: can you gist that to play with? [21:33] savid: Shaunzie, no, just need lessc binary installed on my server [21:33] jbrokc: Aria: if you make a dummy page in a directory and serve it up with servedir or http-server, do you get zombie to report? [21:33] jbrokc: Aria: sure [21:33] Aria: savid: add -g [21:34] devongovett has joined the channel [21:34] martin_sunset has joined the channel [21:34] savid: Aria, why is it installing in my home dir even when I'm using sudo? I'm using npm 1.0.105 [21:34] jbrokc: Aria: https://gist.github.com/336c48bf838c0fd12b05 but i'm also running it with mocha. i'm sure if you took it out of the describe / it block and just ran it with node you'd get the same result [21:34] Aria: savid: Because npm installs in the current directory. [21:34] savid: Or is that what the -g option does [21:35] savid: Ah, I see. -g is global [21:35] Aria: savid: -g means 'global' -- -g is to install commands and tools; usually you install libraries into the app that uses them [21:35] jbrokc: oh whoa nevermind… [21:35] jbrokc: Aria: now it's working. don't know why [21:36] Aria: Well weird! [21:36] Aria: Keep an eye on that! [21:36] jbrokc: Aria: no, i know why [21:36] jbrokc: mocha and zombie don't play nice ;_; [21:37] blup_ has joined the channel [21:37] Aria: Orly? [21:37] jbrokc: yea, node on that file with the browser.visit function outide of the describe function will work fine [21:37] jbrokc: mocha on that file and it doesn't do anything [21:38] MatthewS has joined the channel [21:38] mrpound has joined the channel [21:38] davidbanham has joined the channel [21:39] path[l]: is it possible for me to treat a string like a stream? And pipe a stream to a string? [21:39] Aria: Ah weird, jbrokc [21:39] jredville has joined the channel [21:39] Aria: path[l]: Not directly, but it's not hard to make a stream that writes to a string. The interface is pretty simple. [21:40] path[l]: hmm. maybe Im doing this wrong. I'm making a http request and I want to use zlib to gunzip the response and get back a string [21:40] liar has joined the channel [21:41] tomlion has joined the channel [21:42] jetheredge has joined the channel [21:42] Sami_ZzZ_ has joined the channel [21:43] Aria: Sounds like you should just build the string as it comes in [21:44] Aria: Got enough memory to buffer the compressed string? [21:45] path[l]: yeah, hmm [21:45] Aria: Actually, that's not even needed. [21:46] devongovett has joined the channel [21:47] BrianE has joined the channel [21:47] mikeric has joined the channel [21:47] isaacs has joined the channel [21:48] letsgojuno has joined the channel [21:49] martin_sunset: Guys, I am looking for an analytics store based on mongo, some simple NPm that lets me track events. [21:50] Cromulent has joined the channel [21:50] jetheredge has joined the channel [21:51] caffine has joined the channel [21:53] richardr has joined the channel [21:53] jetheredge_ has joined the channel [21:54] euoia_ has joined the channel [21:56] olivier has joined the channel [21:57] Juan77 has joined the channel [21:57] mraleph has joined the channel [21:58] tomtomaso has joined the channel [21:59] mara has left the channel [22:01] mandric has joined the channel [22:02] TimTimTim has joined the channel [22:04] EhevuTov has joined the channel [22:07] cjus has joined the channel [22:09] tomtomaso has joined the channel [22:09] caolanm has joined the channel [22:10] NathanDavid has left the channel [22:11] NathanDavid has joined the channel [22:12] NathanDavid has left the channel [22:13] nathanieldavid has joined the channel [22:14] EuroNerd has joined the channel [22:14] bnoordhuis has joined the channel [22:17] nathanieldavid has left the channel [22:17] adrianmg has joined the channel [22:17] jstash has joined the channel [22:18] adrianmg has left the channel [22:20] kenperkins has joined the channel [22:22] nathanieldavid has joined the channel [22:27] caolanm has joined the channel [22:28] ChrisMatthieu has joined the channel [22:29] stagas has joined the channel [22:33] chjj has joined the channel [22:33] Wa has joined the channel [22:34] hexploit has joined the channel [22:35] euoia has joined the channel [22:35] subbyyy has joined the channel [22:36] hexploit: Am planning to create a nmap like scanner using node.js , whats the best modeule / library available for packet creation and manipulation? [22:36] boltR has joined the channel [22:36] joshthecoder has joined the channel [22:39] CIA-109: node: 03Ben Noordhuis 07v0.6 * rc2fb062 10/ doc/community/index.html : docs: fix typo on community page - http://git.io/mveBdA [22:43] NathanDavid has joined the channel [22:43] omenar has joined the channel [22:45] maushu has joined the channel [22:46] nebiros has joined the channel [22:47] hexploit: whats the best modeule / library available for packet creation and manipulation? [22:49] aGHz has joined the channel [22:51] devongovett has joined the channel [22:56] EvRide has joined the channel [22:58] disappearedng: is there an underscore.js channel? [22:58] wookiehangover: disappearedng: #documentcloud [22:59] stagas has joined the channel [23:03] brianseeders has joined the channel [23:05] richardr has joined the channel [23:13] jdparker has joined the channel [23:13] barberdt has joined the channel [23:14] stagas has joined the channel [23:15] eastc has joined the channel [23:18] eastc: hello world [23:19] ryanrolds: hello eastc [23:20] tommyvyo has joined the channel [23:23] joshfinnie has joined the channel [23:24] stash has joined the channel [23:24] Juan77 has joined the channel [23:26] jstash has joined the channel [23:26] jbrokc has joined the channel [23:26] monokrome has joined the channel [23:26] briancray has joined the channel [23:26] jbrokc: Aria: found out what the problem was http://cl.ly/3f2T1j3n1w2O2E3D1d3z :'( [23:27] Aria: Oh fun. CSSOM stuff? [23:27] Aria: (Any reason you screenshot things instead of pasting them?) [23:27] Aria: (IT makes it a LOT harder to copy and paste from to google for and in the case of code, to run) [23:28] arthurdebert has joined the channel [23:29] tomlion has joined the channel [23:33] jbrokc: Aria: well, this is an error output from minified js, i doubt that's very helpful [23:34] jbrokc: Aria: and no, I'm really just trying to test an index.html page that has mootools on it and zombie won't let me. dunno what CSSOM is [23:34] jbrokc: (oh now I see what you mean by copy & paste) [23:34] Aria: "property style of ____" -- that's the CSSOM [23:35] Aria: The CSS object model, that lets you read and write styles of elements. [23:35] richardr has joined the channel [23:35] jbrokc: Aria: i figued it out =\ [23:35] jbrokc: Aria: zombie was breaking on the LiveReload script [23:36] Aria: Aaah! [23:36] Aria: Interesting. [23:37] criswell has joined the channel [23:38] ChrisMatthieu has joined the channel [23:40] iRoj has joined the channel [23:41] Wizek-other has joined the channel [23:44] dragon has joined the channel [23:47] mraleph has joined the channel [23:53] SirFunk: cmr: you here? [23:53] cmr: Yes sir. [23:53] caffine has joined the channel [23:53] mikeal has joined the channel [23:54] jsj has joined the channel [23:54] SirFunk: cmr: do you have any details on how I could take care of that problem i asked about before with EventEmitter? [23:54] cmr: SirFunk: could you repeat it? [23:54] cmr: It's been a long day [23:54] SirFunk: haha, sure [23:55] SirFunk: I have some mongoose models (Which are in modules) that need to send some data back to my main app (to .emit some socket.io events) when things happen like when the model is updated [23:55] SirFunk: i attempted to implement it before but i couldn't get it to export the event emitter [23:55] cmr: Can you gist some source? [23:56] SirFunk: yup hangon [23:56] dnyy has joined the channel [23:56] cmr: I've never worked with mongoose btw, so someone who has might have more specific advice than I can give [23:57] AndreasMadsen has joined the channel [23:58] gfosco has joined the channel [23:58] SirFunk: cmr: this is what one of the models looks like https://gist.github.com/1548712 [23:58] richardr_ has joined the channel [23:59] salva has joined the channel [23:59] vicapow has joined the channel