[00:00] blaines: oh but I finally found it in fu [00:00] blaines: bleh no docs [00:00] blaines: no wonder i'm having trouble [00:00] mscdex: yeah, those are custom functions [00:00] jsilver: hmm [00:00] jsilver: mscdex: thx [00:00] blaines: mscdex: bleh, with no docs - ew ew ew ew ew [00:01] mscdex: blaines: i think node_chat is mostly just an example application [00:02] blaines: mscdex: is there a node console? [00:02] bradleymeck: just node w/o args [00:02] mscdex: blaines: just type node [00:02] bradleymeck: starts up a rpl [00:02] mscdex: *type: [00:02] bradleymeck: *repl [00:02] mscdex: heh [00:02] blaines: "No script was specified." [00:03] mscdex: blaines: upgrade to a newer version of node [00:03] mscdex: heh [00:03] mscdex: unless you're on heroku i guess [00:03] blaines: yessir [00:04] blaines: but what's the current neway? [00:04] mscdex: 0.1.100 [00:04] blaines: ahh [00:05] blaines: node use doesn't switch - weird [00:05] blaines: err "nvm use" [00:05] mscdex: eh? [00:05] mscdex: oh [00:05] blaines: "nvm use (Use the latest stable version)" - didn't switch to the latest [00:05] blaines: kinda strange [00:05] mscdex: maybe it has to be downloaded first [00:06] jsilver: hey guys [00:06] jsilver: you're gonna like this [00:06] mscdex: jsilver: free coffee? [00:06] jsilver: it transforms && to and and || to or, !== to not and === to is [00:06] jsilver: and !== to isn't [00:06] jsilver: lol [00:06] jsilver: yes more free coffee [00:06] blaines: mscdex: already had it installed [00:06] jsilver: in your conditionals [00:06] jsilver: more processing [00:06] mscdex: blaines: not sure then, never used nvm [00:07] jsilver: actually any binary expression [00:07] blaines: oh [00:07] jsilver: actually any binary expression [00:07] mscdex: creationix was just in here too [00:07] jsilver: whoops [00:08] gb|work: is anybody using connect? [00:08] mscdex: jsilver is in ur javascripts changing ur bits [00:08] mscdex: huhu [00:10] mscdex: ./afk [00:12] pavan_ has joined the channel [00:13] jsilver: huhuhu [00:13] bradleymeck: a simple wiki at work, and play with it for something in the works [00:13] jsilver: it's trying to change "true" to 'no' now [00:13] jsilver: also [00:13] jsilver: :) [00:14] jsilver: lol [00:14] jsilver: now it changes true/false to yes/no [00:21] mmurz: what folder does a .js file need to be in to be able to require( ) it? [00:22] jesusabdullah: Holy shit, I just realized node has like 50+ branches o_o [00:22] jesusabdullah: that's a lot! [00:24] gwoo has joined the channel [00:27] stagas has joined the channel [00:28] mklappst1hl has joined the channel [00:30] jsilver: yay [00:30] jsilver: it converts this.something to @something now [00:31] hpoydar has joined the channel [00:32] mmurz: I don't understand where I put a .js file so it will be picked up when I do require( ).. I keep getting an error that says "Error: Cannot find module '../lib/redis-client'" [00:33] sechrist has joined the channel [00:36] mmurz: nvm, found require.paths [00:39] mklappstuhl has joined the channel [00:40] _announcer: Twitter: "@chriscorcoran Node.js is _awesome_. Async stuff ftw. #erlang #eventmachine #twisted" -- Marc Held. http://twitter.com/m_held/status/18395258607 [00:42] steadicat has joined the channel [00:42] beelzabub1: twitter needs to die a horrible horrible death [00:42] jesusabdullah: but [00:43] jesusabdullah: but [00:43] jesusabdullah: they like node :( [00:44] blaines: omg i did it! [00:45] bpot has joined the channel [00:46] jsilver: unary ! to not now [00:46] jsilver: trying to do "unless" [00:46] jsilver: it's gonna not do that if it's "if not" [00:47] jsilver: its gonna use unless [00:47] jsilver: :PP [00:48] blaines: jsilver: i can't wait [00:48] hassox has joined the channel [00:48] blaines: next up, jquery => coffeequery [00:50] jsilver: :D [00:50] jsilver: im trying to make it 100% spec [00:50] jsilver: well [00:50] jsilver: really show off coffee features [00:50] jsilver: not just the syntax [00:50] jsilver: ive found i can hook into the node processing really easily [00:50] gb|work: can i dump any kind of configuration in connectEnv? [00:51] gb|work: for connect [00:54] jsilver: YAY [00:54] jsilver: unless works [00:56] programble has joined the channel [00:58] mscdex: jesusabdullah: 50+ branches? you mean tags? [00:58] jsilver: http://gist.github.com/473301 [00:58] jsilver: unless working [00:59] jsilver: anytime it comes across an IfStatement with a UnaryExpression ! inside, it skips that node and parses it's children and just says "unless" [00:59] beelzabub1: it would be interesting to modify v8 to understand coffeescript [00:59] beelzabub1: :) [00:59] jsilver: yea [00:59] jsilver: coffee is legal [00:59] jsilver: legit [00:59] jsilver: too [00:59] jsilver: lol [00:59] beelzabub1: really? [00:59] jsilver: no [01:00] beelzabub1: didn't think so [01:01] jsilver: im making it understand conditional expressions (?), loops, and stuff now [01:01] jsilver: my thing is just a recursive AST transformer [01:01] jsilver: kinda cool tho, i enjoy writing it [01:01] mscdex: i enjoy drinking it [01:02] mscdex: coffee [01:02] mscdex: i could use some too [01:03] Yuffster has joined the channel [01:06] jsilver: can I hashbang my node scripts [01:06] jsilver: #! [01:07] jsilver: /*#!/usr/bin/node*/ [01:07] jsilver: ? [01:08] malkomalko: this is a pretty neat post http://davidwalsh.name/mootools-nodejs [01:09] dnolen has joined the channel [01:10] mscdex: you should be able to [01:12] steadicat has joined the channel [01:14] rnewson has joined the channel [01:14] aheckmann has joined the channel [01:16] markwubben has joined the channel [01:16] malkomalko has joined the channel [01:17] grahamalot has joined the channel [01:18] robertslifka has joined the channel [01:19] technoweenie: blogged about nodeload: http://github.com/blog/678-meet-nodeload-the-new-download-server i plan to do some more in depth posts about the code at some point [01:22] Blackguard has joined the channel [01:22] _announcer: Twitter: "Meet nodeload, our new Download server. Hello node.js! http://github.com/blog/678-meet-nodeload-the-new-download-server" -- GitHub. http://twitter.com/github/status/18398125197 [01:23] mklappst1hl has joined the channel [01:24] _announcer: Twitter: "@ Medinamanuel I would use one in Node.JS scriptcito that is monitoring the BDD and run the Java program when necessary." [es] -- Jair Trejo. http://twitter.com/jairtrejo/status/18398255791 [01:27] _announcer: Twitter: ""Meet nodeload, our new @github Download server. Hello node.js!" http://bit.ly/9bHtNu -- just after I talk about downloads from github! ;)" -- Dion Almaer. http://twitter.com/dalmaer/status/18398506143 [01:28] stepheneb has joined the channel [01:31] jsilver: rolleyes at the unimaginative uses of node [01:35] WALoeIII has joined the channel [01:36] _announcer: Twitter: "github's new archive server is written in node.js. Simple logic to avoid duplication and provide a JSON API authentication. Ministry of memory instance 1 Tsuyori Sinatra. With the added bonus that can be used socket.io monitoring." [ja] -- Hiroki Yoshioka. http://twitter.com/irohiroki/status/18399114492 [01:37] mape: Wow the japanese really get more into twitter then the westeners [01:37] danzb has joined the channel [01:37] _announcer: Twitter: "Was not interesting EventMachine node.js. Know the history of the study" [ja] -- Hiroki Yoshioka. http://twitter.com/irohiroki/status/18399207691 [01:43] technoweenie: jsilver: what, my download server? [01:44] mape: technoweenie: He's to cool for school :P [01:44] mape: technoweenie: Really nice to see node being used in reall world scenarios :) [01:44] technoweenie: ha. well i admit its not the most mind blowing node app :) the original idea was to stream to the file system (for caching) and the outgoing web response from the `git archive` command [01:45] technoweenie: but hey, its a nice way to test the waters [01:45] mape: Like I said, great to have node being used for real life stuff, not just toy projects [01:48] jashkenas has joined the channel [01:48] jbrantly1 has joined the channel [01:51] _announcer: Twitter: "Tring coffee-script, but i don't have node.js..." -- Sora Harakami. http://twitter.com/sora_h/status/18400123629 [01:51] _announcer: Twitter: "node.js make is very slowly..." -- Sora Harakami. http://twitter.com/sora_h/status/18400140464 [01:52] jsilver: technoweenie: lol [01:52] jsilver: im just trolling [01:52] jsilver: ive been at this for hours [01:52] jsilver: still adding tokens to js2cs.ks [01:52] jsilver: .js [01:52] jsilver: im being an ass dont mind me [01:53] technoweenie: 2nd comment asking why i didnt use ruby/eventmachine. ha [01:53] _announcer: Twitter: ""One of the other bonuses of using Node.js: a socket.io (http://bit.ly/de37Ph) web socket server for monitoring" http://bit.ly/9bHtNu" -- Dion Almaer. http://twitter.com/dalmaer/status/18400298292 [01:56] _announcer: Twitter: "@jdegoes That would be a great IoC system. Alternatively, GWT -> node.js :)" -- Spencer Tipping. http://twitter.com/spencertipping/status/18400490371 [01:57] khug has joined the channel [02:01] _announcer: Twitter: "github EventMachine the reason I chose not node.js: node.js to try out. But we should EventMachine well. Instead, Ruby 1.9 and the fiber is so beautifully written. Maybe use elsewhere EventMachine somewhere." [ja] -- Hiroki Yoshioka. http://twitter.com/irohiroki/status/18400800450 [02:01] jashkenas: is it possible to force an npm update. [02:01] jashkenas: ? [02:01] jashkenas: of a package that already exists? [02:01] jsilver: technoweenie: hah [02:02] technoweenie: wtf are they just tweeting all my paragraphs and comments [02:03] itodd has joined the channel [02:04] kersny has joined the channel [02:05] blackdog_ has joined the channel [02:06] mape: hehe, good way to spam/get users? [02:07] bradleymeck: lol [02:07] bradleymeck: that is love [02:07] pkrumins: just ported js minifier to node.js: http://github.com/pkrumins/node-jsmin [02:08] polotek has joined the channel [02:08] mape: pkrumins: hmm what did you change? I use jsmin on my project and I just added exports.jsmin = jsmin; at the bottom [02:09] pkrumins: yeah that [02:09] mape: ah k [02:09] pkrumins: also fixed argument order [02:09] pkrumins: if you used that jsmin.js? [02:09] pkrumins: it had some weird arg order [02:09] _announcer: Twitter: "Should I build http://twich.me/ browser-based chat from scratch in #nodejs, or build upon something like #irc or #xmpp? opinions welcomed." -- Isaac Su. http://twitter.com/isaacsu/status/18401369141 [02:09] mape: Really just do jsmin(string) so haven't looked to much into it [02:09] richcollins has joined the channel [02:10] bradleymeck: !tweet @isaacsu you can use nodejs and connect to those protocols without needing a chat proxy with some socket.io magic, also freenode.net#node.js says hi [02:11] _announcer: Twitter: "Ported Doug Crockford's javascript minifier to node.js http://bit.ly/aSF63p (basically just added export.jsmin = jsmin). `npm install jsmin`" -- Peteris Krumins. http://twitter.com/pkrumins/status/18401485133 [02:12] bradleymeck: god bless !tweets auto splitting [02:12] kersny has joined the channel [02:13] mape: Bah, who wakes up to take a smoke at 04:13, damed neighbours [02:15] pkrumins: who stays up until 4am, damaged hackers. [02:15] pkrumins: oh damned. [02:15] pkrumins: damned hakers. [02:15] bradleymeck: idk but someone always seems to bomb _utility around 2am [02:15] steadicat has joined the channel [02:16] hassox has joined the channel [02:17] jashkenas: open JS question: does anyone know a way to call a constructor function with a variable number of arguments, using `apply` ? [02:18] bradleymeck: yes [02:18] bradleymeck: but its a bit odd since you need a 2nd statement to fully emulate that [02:19] bradleymeck: and are we limited by any browsers? [02:19] jashkenas: make a fake constructor that wraps the apply call? [02:19] jashkenas: yes, we are limited by IE6. [02:19] bradleymeck: mmmm [02:20] bradleymeck: could do that or eval or (goes to dig up something) [02:20] jashkenas: how about this: say we have a class Klass() that takes a variable number of arguments.... [02:21] jashkenas: Klass.apply(new Klass([]), args) [02:21] bradleymeck: that is applicable as long as you check for empty array and dont accidentally hit a recursion [02:21] jashkenas: I would only see that breaking if you threw an exception from your constructor in the presence of too few args. [02:21] bradleymeck: ie6 is a pain for this but i had something a while back [02:21] mattly has joined the channel [02:21] jashkenas: I want like an "initialize", but without actually running the constructor ... "allocate" in ruby. [02:22] bradleymeck: so you basically just want an object w/ the right prototype? [02:22] isaacsu has joined the channel [02:22] jashkenas: basically. I can do it by creating an empty constructor that inherits from the one I"m trying to use... [02:22] aurynn: Is this people trying to make JS do class-based OO? [02:22] _announcer: Twitter: "Ow with CouchDB adapter, Geddy Node.js Framework: http://wiki.github.com/mde/geddy/the-two-minute-geddy-app" -- Sebastian Senf. http://twitter.com/mustardamus/status/18402302817 [02:23] richcollins has joined the channel [02:23] jashkenas: aurynn: this is just trying to make a regular constructor take a variable number of arguments. [02:23] aurynn: jashkenas, there's an arguments variable implicitly created [02:23] aurynn: is that what you want? [02:23] aurynn: note: I may be missing something obvious [02:23] aurynn: :) [02:23] bradleymeck: hes trying to Supply the variable number which is a beastie [02:24] jashkenas: aurynn. try to use "apply" with a constructor call. [02:24] aurynn: That'd be what I missd. [02:24] aurynn: :) [02:24] jashkenas: bradleymeck: what's the problem with ie6 for this? [02:25] bradleymeck: basically in anything else you can fudge a prototype, creating an empty function causes issues w/ constructor / extra prototype in the chain being modified / an extra ptr for mem use. [02:26] jashkenas: bradleymeck: I guess that __proto__ would make it easier, in non-IE. You could just do an object literal and set it. [02:26] _announcer: Twitter: "@ Jairtrejo I'm going too so asynchronous. Let's see what you say of node.js and work queues (that's why I thought of the sockets). Thanks!" [es] -- Manuel. http://twitter.com/medinamanuel/status/18402570638 [02:27] bradleymeck: think nested checks where you use arguments.callee.caller to test it might be way to go, but that is ugly [02:27] jashkenas: isn't that deprecated anyhow? [02:27] bradleymeck: it is but supported by all. and not going anywhere to my knowledge, it was deprecated in like 2002 [02:28] jashkenas: they should re-precate that sucker then. [02:28] bradleymeck: .caller is nice, callee is still valid [02:29] jashkenas: bradleymeck: one more question for you then. you think the extra constructor in the chain is a real problem? [02:29] bradleymeck: ive used it a couple times and ended up w/ infinite looks w/o checking callee.caller, just check that w/ a chain and it should be ok [02:30] jashkenas: it'll only be created if you actually call a constructor with varargs... [02:30] bradleymeck: s/looks/loops/ [02:30] jashkenas: ok. thanks much for the advice. I appreciate it. [02:32] bradleymeck: js really craves multiple inheritance but ppl fight it. I wish i had it...its a prototyped language, let the prototype chains roam free! :( [02:32] isaacsu has left the channel [02:33] bradleymeck: anywho i give it 5 years and ill be able to fudge whole chains [02:33] donspaulding has joined the channel [02:33] jashkenas: bradleymeck: amen to that. [02:45] jashkenas: bradleymeck: if you're curious to see the solution I'm using, the patch is here: http://github.com/jashkenas/coffee-script/commit/534e2a25de5dc6afcdaebd999093d609df726a74 [02:46] bradleymeck: nice, i might get to hacking a lil on coffeescript myself, try to throw in some of the Interface's fancy closure management [02:47] bradleymeck: still not too sure on the defer idea for it [02:47] jamescarr has joined the channel [02:47] jashkenas: well, that's probably not going to make it in, sadly enough. [02:47] jashkenas: interface's fancy closure management? [02:48] jakehow has joined the channel [02:48] jashkenas: http://github.com/bmeck/interface ahh. [02:48] bradleymeck: id prefer not to have continuation style, i think it encourages codeblocks too big for their britches [02:48] jashkenas: ha. that's a new one. [02:49] bradleymeck: plus hidden async is still making things somewhat unreadable when it comes to debugging [02:49] ThePub has joined the channel [02:51] rauchg_: bradleymeck: actually v8 makes it really easy to debug async code imho [02:52] brianmario has joined the channel [02:52] bradleymeck: the stack traces are good but if you suddenly create functions from seemingly procedural code to use as callbacks, what do you do w/ return values? what do you name the function? will the programmer understand that it is async (in the case of the defer keyword yes, but most programming languages w/ continuation:no) [02:53] bradleymeck: and how do you know what to turn into the arguments of the callback's callback to return to the previous point. I see continuation as a kinda hidden goto [02:53] jashkenas: bradleymeck: yep ... what to do about "return" is one of the major sticking points without a satisfactory answer. the best one perhaps being to convert it into a call to the callback, but that's getting awfully strange. [02:53] jashkenas: did you see this post: http://gfxmonk.net/2010/07/06/dealing-with-return-in-deferred-coffeescript.html ? [02:54] bradleymeck: not yet *reads* [02:54] _announcer: Twitter: "Kiwi is dead, long live NPM! One step towards "stable" in the #nodejs community http://j.mp/ds5JF9" -- Chris Williams. http://twitter.com/voodootikigod/status/18404479463 [02:55] mjard has left the channel [02:55] bradleymeck: yea, was having a long argument w/ creationix today about my hatred of callback and return function signature ambiguities... think that fits the bill. I have learned a lot from "principle of least surprise" being the most surprising when python pulls that on me [02:56] ThePub has joined the channel [02:56] Aria has joined the channel [02:59] bradleymeck: just seems confusing, chaining async is actually quite elegant if we could find a way to make the treelike structure of program control flow more readable than a linear list :/ [02:59] ben_alman has joined the channel [02:59] _announcer: Twitter: "Nodeload is GitHub's new download server http://github.com/blog/678-meet-nodeload-the-new-download-server #nodejs" -- skim. http://twitter.com/skim/status/18404751781 [03:00] jamescarr: hmmmm... anyone else using vows? [03:00] bradleymeck: switch statements look pretty similar w/ the cases falling through (of course i would think instead of cases it would be calls), but they seem to be missing something from that style when falling through and returning values... (rambling) [03:01] bradleymeck: havent used vows beyond basic test cases to try it out :/ [03:01] jashkenas: bradleymeck: a bit part of the idea here was to make the synchronous-order-via-asyn-calls pattern an easy one. [03:02] jashkenas: where if you loop a bunch of async calls, it creates the recursive instead of parallel version for you. and if you have async logic inside of if/else statements, it can recover and continue the conditional execution without getting tangled. [03:02] jashkenas: how often those circumstances actually arise in real code is a whole 'nuther question. [03:03] bradleymeck: true enough, but you are missing return values from callbacks which can be somewhat brutal if you get somekind of logical construct that branches your program based upon data available before async [03:03] bradleymeck: just dunno if there is a clear solution [03:04] jashkenas: nah, the whole point is that it delays the conditional branch until after the return of the async call comes back... that's precisely the valuable part. [03:04] jashkenas: Normally, you can't use an async call from inside of an if/else, if the condition depends on the value. this would have let you. and reconstructed the if/else on the other side. [03:06] derferman has joined the channel [03:06] bradleymeck: im not talking about the async return im talking more like ... x = getResource() {if allocated more than 4 return false; else async...callback(blah)} if(x) { ... } [03:07] kriszyp: does node support setting and getting extended file attributes? [03:09] bradleymeck: not to my knowledge... [03:09] bradleymeck: !api stat [03:09] _api: bradleymeck: (File System) method: stat(path, callback) -- Asynchronous stat(2). The callback gets two arguments `(err, stats)` where `stats` is a `fs.Stats` object. [ http://nodejs.org/api.html#fs-stat-108 ] [03:09] _announcer: Twitter: "Introducing DNode, a node.js library for asynchronous bidirectional remote method invocation. http://bit.ly/c7yOxW #kb" -- sourcode. http://twitter.com/sourcode/status/18405450803 [03:09] polotek: damn. I didn't know about the [bang]api method on announcer [03:09] polotek: can you get a list of the features? [03:09] bradleymeck: only chmod [03:10] polotek: a list of the announcer features I mean [03:10] aheckmann: yeah, that's neato [03:11] bradleymeck: dont think so... ask mscdex when hes around [03:12] bradleymeck: if you want triggers go bother my _utility repo [03:12] bradleymeck: once again for my own sanity i just dont want any solution to take away features when making async look sync [03:13] jashkenas: agreed. it's not going to happen. fun to talk about though. [03:15] bradleymeck: yea, and ill keep trying to think of a way to preserve that damn use case that ruins it all [03:15] BrianTheCoder has joined the channel [03:15] mscdex: eh? [03:15] jashkenas: bradleymeck: if you feel like sharing any of those thoughts, I'm sure they'd be appreciated on the active ticket for it. [03:16] bradleymeck: does _api have a list feature mscdex? [03:16] mscdex: yeah [03:16] mscdex: !list methods in file system [03:16] mscdex: er [03:16] mscdex: lol [03:16] bradleymeck: nah, i just like to ramble, i lose debates in programming all the time so i gave up [03:16] mscdex: !api methods in file system [03:16] _api: mscdex: File System methods: rename(path1, path2, callback), renameSync(path1, path2), truncate(fd, len, callback), truncateSync(fd, len), chmod(path, mode, callback), chmodSync(path, mode), stat(path, callback), lstat(path, callback), statSync(path), lstatSync(path), fstatSync(fd), link(srcpath, dstpath, callback), linkSync(dstpath, srcpath), symlink(linkdata, path, callback), symlinkSync(linkdata, path), readlink(path, callba [03:17] mscdex: i need to modify it as you can see [03:17] mscdex: gets cut off [03:17] bradleymeck: i mean like all... !api * in * [03:17] benburkert has joined the channel [03:17] bradleymeck: 256 char limit is pain [03:17] satori: ACTION needs a better ide. [03:17] satori: What do you guys use when doing node dev [03:17] satori: ? [03:17] mscdex: bradleymeck: !api * in * would be a lot of output... [03:18] bradleymeck: wasnt my question, just learning for the next time its asked [03:18] mscdex: i mean, you can get a list of modules [03:18] mscdex: !api modules [03:18] _api: mscdex: Buffers, EventEmitter, Readable Stream, Writable Stream, Global Objects, process, sys, Timers, Child Processes, Script, File System, fs.ReadStream, fs.WriteStream, http.Server, http.ServerRequest, http.ServerResponse, http.Client, http.ClientRequest, http.ClientResponse, net.Server, net.Stream, Crypto, DNS, Assert, Path, URL, Query String, REPL [03:18] bradleymeck: text-wrangler cause im a cheapo on a mac, or gedit on linux cause could never get used to console editors' shortcuts [03:18] mscdex: you can do a global search, search by type (events, methods, properties), etc [03:21] bradleymeck: !api help [03:21] jashkenas: !api !api [03:21] mscdex: no help section yet heh [03:22] mscdex: !api properties in request [03:22] _api: mscdex: http.ServerRequest properties: method, url, headers, httpVersion, connection [03:23] mscdex: !api exit:events in process [03:23] _api: mscdex: (process) event: exit() -- Emitted when the process is about to exit. This is a good hook to perform constant time checks of the module's state (like for unit tests). The main event loop will no longer be run after the 'exit' callback finishes, so timers may not be scheduled. [ http://nodejs.org/api.html#event-exit-52 ] [03:25] mscdex: gonna update _api soon though, after i make some more headway on grappler [03:26] victorstan has joined the channel [03:27] satori: grrr. everytime I think I'm on the home straight I hit another problem I don;t know how to solve :( [03:29] jashkenas: It's not possible in JS to set a function name from the outside, right? it has to be a named function to begin with. [03:29] mscdex: from the outside? [03:29] jashkenas: how do you run Node from this IRC? [03:29] jashkenas: !node fn = function(){}; fn.name = "Bob"; fn.name; [03:30] mscdex: :S [03:30] jashkenas: that's not it. [03:30] mscdex: new Function() ? [03:30] jashkenas: anyway, running that line would return an empty string. [03:33] mape: > 5+5 [03:33] victorstan: !help [03:33] victorstan: doh! [03:33] victorstan: where the irc man pages! [03:34] bradleymeck: our repls are down since ppl abused em [03:34] mape: js> 5+5 [03:34] gbot2: mape: 10 [03:34] bradleymeck: and yes you cannot rename funcs [03:34] mape: thanks [03:34] bradleymeck: but that is where eval is love, and your only savior [03:34] softdrink has joined the channel [03:35] jashkenas: bradleymeck: since you seem to have all sorts of tricks up your sleeve this evening... do you have a technique for doing named functions in IE without clobbering your scoped variables and leaking memory? [03:35] mape: js> Math.ceil(Math.pow(2,8)*Math.random()); [03:35] gbot2: mape: 250 [03:35] jashkenas: js> fn = function(){}; fn.name = "Bob"; fn.name [03:35] gbot2: jashkenas: "" [03:36] bradleymeck: jashkenas, can i use eval? [03:36] jashkenas: nope. [03:36] bradleymeck: then no, cant be done [03:36] jashkenas: thanks. [03:36] bradleymeck: even Function cant :( [03:36] victorstan: so no metaprogramming? [03:37] bradleymeck: well you could do something nasty like Function("return function foo(...){}") ewwwww [03:37] mscdex: heh [03:37] bradleymeck: there is plenty of metaprogramming, i love that junk but ppl avoid eval like plague [03:37] victorstan: i hear its slow [03:37] satori: slow and sometimes tough to debug [03:38] satori: sometimes useful though [03:38] bradleymeck: i would like to get D's compile time rules built into js, and eval is slow when invoked, most modern engines run it just as fast as precompiled code once it is done [03:39] dnolen has joined the channel [03:48] satori: Doh! I modified my c++ classes to use copy ctors and manual v8 wrapping, but I didn't remove the ObjectWrap Superclass. Fail. [03:48] bradleymeck: :O [03:48] satori: I wasted 3 f'ing hours [03:48] satori: ACTION slaps forehead. [03:50] mscdex: The Crockford Files! [03:51] benburkert has joined the channel [03:51] mscdex: facepalms ftl [03:54] hassox: Are the Connect guys in here? [03:58] satori: ACTION slaps forehead. [03:58] freakazoid has joined the channel [03:58] satori: oops [03:58] freakazoid: hiya [03:59] satori: hi [03:59] freakazoid: satori: how's it going? [03:59] satori: bad [03:59] satori: ACTION *** glibc detected *** /usr/local/bin/node: double free or corruption (!prev): 0x099a2ed8 *** [04:00] freakazoid: ouch [04:00] satori: that can't be good right? [04:00] liucougar has joined the channel [04:00] freakazoid: yup [04:00] freakazoid: you get a core dump? [04:00] satori: Yeah, but it's my own shit code [04:00] satori: I fix one thing and find that something has broken [04:01] freakazoid: well sure but I don't think js can crash that way [04:01] freakazoid: unless you've linked in some c code [04:01] satori: I am working with js from the c++/v8 side [04:01] freakazoid: aah [04:02] zapnap has joined the channel [04:03] satori: I am trying to get ext library-created object pointers wrapped and exposed to js, rather than create new objects with the 'new' kw. [04:03] satori: the latter is easy. the former is somewhat trickier [04:04] _announcer: Twitter: "One of the other bonuses of using Node.js: a socket.io web socket server for monitoring http://bit.ly/9vBEub #github #nodejs" -- dirs. http://twitter.com/dirs/status/18409239513 [04:07] satori: ACTION has new found appreciation for garbage collection. [04:10] jamescarr has joined the channel [04:16] satori: \o/ found my double-free and fixed another mem lk. [04:16] satori: this c++ stuff ain't that hard. [04:16] satori: heh [04:18] beelzabub1: can someone help me understand the stream documentation? [04:18] beelzabub1: the server can listen on a path [04:19] beelzabub1: how do i create a stream to connect to that server? [04:19] satori: you mean unix sockets? or a tcp stream? [04:19] beelzabub1: unix sockets [04:20] satori: it's the same really. Just use a path instead of port/host [04:20] satori: use net.createClient still. [04:20] beelzabub1: i'm not using the http stuff [04:20] beelzabub1: raw stream [04:20] hassox: anyone looked at getting 0mq going on node? [04:21] satori: sry meant net.createConnection [04:23] _announcer: Twitter: "mnutt / hummingbird @ GitHub: a real-time (real time, refreshed 20 times per second) site traffic analysis tool, based on Node.js. http://bit.ly/cKLkLW" [zh-CN] -- UXfeeds. http://twitter.com/uxfeeds/status/18410430251 [04:24] SubStack: hassox: looked at it, decided against [04:24] hassox: SubStack: any reason why? [04:24] SubStack: wrote dnode instead [04:26] hassox: ah yeah I saw this the other day :D [04:26] hassox: it does look sweet [04:28] SubStack: 0mq looks overly concerned with performance at the expense of usability for my tastes [04:28] SubStack: although I didn't look too deeply into it [04:29] gb|str has joined the channel [04:30] jsilver: check it out guys [04:30] jsilver: this is js2cs converting a for statement [04:30] jsilver: http://gist.github.com/473447 [04:30] jsilver: and then coffee converting it back [04:30] jsilver: had to force it to while because of technical issues [04:31] SubStack: jsilver: you so crazy [04:31] SubStack: :p [04:31] jsilver: ^_^ [04:31] jesusabdullah: hassox: I've been thinking about it [04:31] jsilver: tyvm [04:31] jesusabdullah: hassox: Never used 0mq, but it does seem to be all the rage [04:31] dnolen has joined the channel [04:31] hassox: SubStack: jesusabdullah it seems to be a socket protocol for messages rather than a full blown broker like rabbitmq [04:33] SubStack: hassox: interesting then [04:33] jesusabdullah: hassox: The scipy guys are really excited about it, for reasons like you said [04:33] hassox: SubStack: I may have misinterperated it, but from what I read that's what it seems like it is [04:33] jesusabdullah: I think it'd be nice for talking to other processes [04:33] hassox: yeah [04:33] hassox: me too [04:33] luddep: does anyone know of any thrift libraries for node? [04:33] jesusabdullah: That, and I don't think dnode and zmq are mutually exclusive [04:34] hassox: the thread requirement threw me a bit, but the guys in #0mq or #zeromq whichever it is said that it could be done with libenv but I couldn't get low level enough for the discussion [04:34] hassox: jesusabdullah: agreed [04:34] SubStack: well if somebody writes a nice clean node-zmq I could hack in a transport backend for dnode [04:34] Aria: Hehe. Maybe if I finish some other projects. [04:35] dgathright has joined the channel [04:36] jsilver: i did it that way so that it would have something that worked [04:36] jsilver: the other options weren't good [04:36] jsilver: the for(... stuff is too drastically different from coffee's syntax [04:36] jsilver: that one couldnt be transformed easily [04:37] gb|str: any connect guys online? [04:37] hassox: gb|str: I'm wanting to know that too ;)- [04:38] mape: what is the issue? [04:38] hassox: mape: I just have some questions [04:39] hassox: the biggest one is how does error catching work [04:39] hassox: especially if there is an async request, how the hell does the error get caught [04:40] jsilver: with try...catch.. [04:40] jsilver: actually [04:40] hassox: jsilver: that's fine if the error occurs within the method, but what about in the callback [04:40] jsilver: look in api.html [04:40] jsilver: it provides a error callback [04:40] jsilver: not really 100% sure [04:41] Aria: Usually, the first argument to the callback is an error [04:41] Aria: (null in normal use) [04:41] hassox: k so it's up to the callback to use a try / catch and supply next() with the error? [04:43] Aria: Usually. (Next()?) [04:44] _announcer: Twitter: "Interesting: GitHub has a node.js micro-app in production: http://bit.ly/bgCBE6" -- Jamie Flournoy. http://twitter.com/jamieflournoy/status/18411683911 [04:44] hassox: Aria: yeah next() is the usual call, or if there was an error then next(error) [04:45] hassox: just wanted to confirm that it's up to me to catch it [04:45] Aria: Yeah. [04:45] hassox: and how does it determine that a component didn't match? [04:46] hassox: i.e. use("/", WhatDetectsIfThisIsNotRelevant) [04:47] gb|str: hassox: i was just wondering if there was a connect bug related to configuration [04:47] hassox: gb|str: wha choo mean? [04:48] gb|str: hassox: there is a connect.connectEnv object that's native to connect, and it doesn't seem like the values get read properly [04:49] hassox: I could only find a couple of items that are set by connect in there. How are you setting them? [04:50] gb|str: hassox: i have a json config file, and as i read the file, as set values in connectEnv [04:50] gb|str: hassox: i want to set it for connect, not by connect [04:50] hassox: ah right [04:51] hassox: when I read the code the other night I didn't see exactly how to set that... but I remember that there was a 'default' object that's used [04:51] hassox: http://github.com/extjs/Connect/blob/master/lib/connect/index.js#L31 [04:51] gb|str: so yah, i think there is a bug in it [04:51] hassox: tha'ts an || { though [04:52] gb|str: to start with, i think there is a typo [04:52] gb|str: post: 3000, [04:52] gb|str: should be port [04:52] gb|str: not post [04:52] ThePub has joined the channel [04:52] hassox: yup [04:52] hassox: do you use the connect binary? [04:52] gb|str: yup [04:53] gb|str: also, i don't think listen function gets fired properly [04:53] hassox: http://github.com/extjs/Connect/blob/master/bin/connect#L50 [04:53] gb|str: anyway, i'll have to talk to connect guys tomorrow [04:53] hassox: ja [04:53] hassox: can you use the connect binary with coffee? [04:53] gb|str: i'm not using coffee [04:54] hassox: kk thx [04:56] dgathright_ has joined the channel [04:56] wilmoore has joined the channel [04:59] jsilver: crap [05:03] blaines has joined the channel [05:04] micheil: hassox: that reminds me.. I haven't had any coffee today D: [05:04] dgathright_ has joined the channel [05:06] jsilver: micheil [05:06] jsilver: yo [05:06] micheil: hi [05:06] jsilver: u seen my thingy yet? [05:06] jsilver: http://gist.github.com/473447 [05:07] jsilver: i'm doing SwitchStatement, Clause, break and default right now [05:07] jsilver: sorry to flood with coffeetalk [05:07] jsilver: i'll move to #coffeescript [05:07] jsilver: ;p [05:10] micheil: jsilver: lulwut? [05:14] jesusabdullah: coffeetalk you say? [05:14] christkv has joined the channel [05:14] jesusabdullah: Man I hope npm and coffeescript make up :S [05:16] BrianTheCoder has joined the channel [05:17] blaines has joined the channel [05:17] hassox: jesusabdullah: ? [05:17] hassox: what happened? [05:17] jesusabdullah: Oh, nothing really [05:18] jesusabdullah: There's a bug in the coffeescript npm script [05:18] jesusabdullah: It calls sudo inside itself [05:18] jesusabdullah: At least, it's a bug imo [05:18] hassox: gotcha [05:18] blaines has joined the channel [05:19] jesusabdullah: What I should do is just install it normal [05:27] Clooth has joined the channel [05:30] TS_ has joined the channel [05:32] Aria has left the channel [05:32] Aria has joined the channel [05:34] jesusabdullah: Oh sweet it got fixed [05:36] dgathright has joined the channel [05:39] huyhong has left the channel [05:42] beelzabub1: question about addListener for streams [05:42] beelzabub1: why is the 'this' object for the function the streams object [05:42] beelzabub1: i'm trying to wrap it using another object [05:42] beelzabub1: e.g. MyStream.prototype.foo = function(data) {} [05:43] beelzabub1: function MyStream { stream.addListener('data', this.foo); } [05:43] beelzabub1: is this expected JS semantics or an oversight in how node does things? [05:47] liucougar has joined the channel [05:54] mtodd has joined the channel [05:56] jsilver: micheil: [05:56] jsilver: you still here [05:56] micheil: yeah [05:56] jsilver: okay [05:56] jsilver: i'll show you something real fast [05:59] jsilver: takes me a while sorry [06:00] jsilver: http://gist.github.com/473507 [06:01] jsilver: still working on switch [06:01] jsilver: almost there with it [06:01] mikeal has joined the channel [06:04] Validatorian has joined the channel [06:05] mattly has joined the channel [06:05] tisba has joined the channel [06:05] jsilver: yay [06:05] jsilver: just fixed it to use "then" [06:13] _announcer: Twitter: "NodeJobs.com - Where NodeJS Opportunities Are Listed" -- Lola. http://twitter.com/latobatele/status/18416367202 [06:14] mikeal has joined the channel [06:18] jsilver: NodeJS ... job opportunities? [06:18] jsilver: LuL [06:18] mape: ? [06:19] brianmario has joined the channel [06:19] jsilver: idk [06:19] jsilver: seems like a young community [06:19] jsilver: to have job opps [06:21] pquerna: http://github.com/blog/678-meet-nodeload-the-new-download-server [06:21] pquerna: okay, is whomever wrote that in here :) ? [06:21] mape: jsilver: so its bad there are? [06:23] pquerna: ACTION has questions about if they used sys.pump / gzip etc [06:23] paulwe_ has joined the channel [06:24] technoweenie has joined the channel [06:24] ryah: pquerna: technoweenie --^ [06:24] technoweenie: hm? [06:25] mape: gzip? they zip/tar the files? [06:26] pquerna: are you using a sys.pump gzip filter, or just piping git archive to gzip [06:29] technoweenie: piping, but i'm using bin/sh and tee to do it all [06:29] technoweenie: http://techno-weenie.net/2010/6/28/tee_and_child_processes/ [06:29] pquerna: ah [06:30] pquerna: do you have a pause event or antyhing for slow clients? [06:30] technoweenie: git archive cant output tar.gz files, and optionally nesting some child processes in a gzip child process took some nasty code [06:30] technoweenie: no, i use nginx to stream to the client [06:30] technoweenie: i was seeing a mem leak with streaming,but i'm not any more and may switch to doing everyting in node [06:30] technoweenie: my goal is to serve the whole thing from node w/ no redirects [06:31] pquerna: yeah, we were just talking about doing things like gzipping streams inline [06:31] pquerna: using a new filter abstraction [06:31] jsilver: idk [06:31] jsilver: not getting inbolved [06:31] jsilver: lol [06:31] pquerna: kinda built on top of sys.pump, along with some changes to pause/resume events. [06:31] jsilver: trying to figure out how to do SwitchCase [06:31] jsilver: CaseClause is being unweildy [06:32] pquerna: technoweenie: somewhat related, but unfinished is node-archive / bindings to libarchive, though it only does read streams so far. [06:33] ryah: http://nodejs.org/illuminati0.pdf [06:33] technoweenie: cool [06:33] technoweenie: node and unix pipes seem to go well together [06:34] pquerna: ryah: http://people.freebsd.org/~sson/thrworkq/pthread_workqueue.3.txt [06:34] pquerna: (is the newer super fast work queue api in osx / freebsd 8) [06:34] _announcer: Twitter: "A small slide deck on a new patch I'm working on http://nodejs.org/illuminati0.pdf" -- Ryan Dahl. http://twitter.com/ryah/status/18417346732 [06:34] pquerna: i guess it would be best to just implement a port of lib eio on it. [06:35] ryah: pquerna: cool [06:41] rgl has joined the channel [06:47] _announcer: Twitter: "How are the experiences in deploying Node.js code, i.e. release new versions of your app? Got any links to share on the hows and the whys?" -- Mathias Meyer. http://twitter.com/roidrage/status/18417908660 [06:48] ChrisPartridge has joined the channel [06:49] jsilver: the experiences are terrible. they give me roid rage. [06:50] lachlanhardy has joined the channel [06:50] pufuwozu: ryah: I love those stack traces [06:50] pufuwozu: Great idea [06:51] virtuo has joined the channel [06:53] _announcer: Twitter: "Node.js is the New Black http://bit.ly/9e99Ra" -- SitePoint. http://twitter.com/sitepointdotcom/status/18418142796 [06:53] jsilver: Black? why is it Black? [06:54] jsilver: was Black not doing enough of a good job being Black? [06:54] technoweenie: ugh, because it jumped the shark [06:54] mjr__ has joined the channel [06:54] technoweenie: i still havent worked up a good deployment strategy. i want something like unicorn where i can just start a script up and send some unix signals at it [06:54] jsilver: that's not asynchronous [06:54] jsilver: ;p [06:54] jsilver: ;o [06:55] technoweenie: might be able to do something where i spin up another process, send a signal to stop listening on the old process and start on the new [06:55] technoweenie: yea, or just throw haproxy in front i guess [06:55] lachlanhardy has left the channel [06:56] lachlanhardy has joined the channel [06:57] pquerna: well, ideally, its something that sits above you [06:57] pquerna: and you get called via the web worker api [06:57] pquerna: you get passed in a listening socket thats yours [06:58] technoweenie: i havent messed w/ web workers [06:58] pquerna: at some point the master sends a message, hey stop serving new requests [06:58] technoweenie: that's an idea too though [06:58] pquerna: and the master has spun up a new listener [06:58] technoweenie: yea thats more how unicorn works [06:58] pquerna: you close() the listerner in the odl one, finish old clients.. and then exit [06:58] technoweenie: master process w/ workers [06:58] blaines has joined the channel [06:58] technoweenie: my kill command does that actually [06:59] technoweenie: process.addListener 'SIGQUIT', -> server.close() [07:01] SamuraiJack has joined the channel [07:02] _announcer: Twitter: "Node.js is doing very well. It's great to see so many early adopters from such a young project." -- Arnout Kazemier. http://twitter.com/3rdEden/status/18418546709 [07:04] lachlanhardy: Anyone able to help out with an NPM issue? Such as it successfully installed but the command isn't registered? [07:04] mjr__: Has isaacs been on tonight? [07:05] mjr__: I suspect he is the only one that really understands npm. [07:08] _announcer: Twitter: "@jasperdebruijn @jasper Node.js is the New Black - http://www.sitepoint.com/blogs/2010/07/13/node-js-is-the-new-black/" -- Maikel. http://twitter.com/xeggie/status/18418809194 [07:08] jsilver: case "BreakStatement": [07:08] jsilver: /* not used */ [07:08] jsilver: break; [07:08] jsilver: lul [07:08] jsilver: get it [07:08] jsilver: it's ironic [07:09] polyrhythmic has joined the channel [07:09] lachlanhardy: mjr__: yeah, I guess I'll just raise an issue [07:10] mjr__: I only just barely have it working for my package, and I'm still not sure how it all works. [07:10] _announcer: Twitter: "node.js is the new black. A web server written in JavaScript, and why you might want one. http://bit.ly/bdZjBM" -- Scot Hacker. http://twitter.com/shacker/status/18418907016 [07:10] mjr__: But it all seems like good stuff. isaacs is working hard on fixing all of the issues. [07:10] _announcer: Twitter: "@mikelorant Node.js is the New Black http://bit.ly/9e99Ra (via SitePoint)" -- Ben George. http://twitter.com/benz001/status/18418921345 [07:11] pquerna: what is the prefered patch format btw? git format-patch on gist? [07:11] _announcer: Twitter: "Node.js is the New Black: node.js is the cool new kid on the web development block, but what's behind all the hype... http://bit.ly/aeZrKM" -- Darren Apostolik. http://twitter.com/DarrensTechWire/status/18418938996 [07:11] sveimac has joined the channel [07:12] kepheus has joined the channel [07:12] mjr__: pquerna: a long time ago, ryah said that he wanted format-path emailed to him or the list. I suspect this was to prevent people from sending github pull requests, which he doesn't want. [07:12] mscdex: pquerna: git format-patch yeah [07:12] tyfighter has joined the channel [07:12] pquerna: and so, lets say Im a dumbass gmail user; I can't just pipe those to mail [07:12] pquerna: so, upload them to a gist? [07:12] mscdex: pquerna: fwiw i just gist my patches and send a link to the ML [07:13] mjr__: You should confirm this with him, but I'm guessing that he wants an email to manage the workflow of patches and discussion around them, but that he's fine with a link to a gist or even a link to a commit in a gh repo. [07:14] mjr__: Some clear guidance on this submission process would be good for the website. [07:14] mjr__: I've just been sending him links to commits in my repo. [07:14] pdelgallego has joined the channel [07:15] pquerna: i like my projects the use subversion, its not a question, you just give everyone commit access so its not a problem :x [07:15] mscdex: http://nodejs.org/#contributing [07:15] pquerna: yeah, thats what I just re-read. [07:15] mscdex: heh [07:15] SubStack: subversion -_- [07:15] pquerna: it doesn't help with the 'i'm a gmail user situation much :) [07:16] mscdex: i've never been able to find out how to attach files in google groups though [07:16] mscdex: guess you can only do it through email [07:16] mscdex: to the ML [07:16] mjr__: links to gist. Problem solved. [07:16] mscdex: yeah [07:16] mscdex: ok, back to grappler! [07:16] creationix has joined the channel [07:17] blaines: would anyone be willing to have a gander at my basic chat app and help me understand why it stops running after a minute [07:19] mjr__: Have a link? [07:20] blaines: mjr__: yes, 1 sec [07:23] creationix: so after I couldn't get colloquy to work while uploading the video to Vimeo, I installed irssi [07:23] creationix: hopefully I can get used to this interface [07:23] _announcer: Twitter: "@shacker it's a great system. we are actually running our adserver in node.js. The non blocking is great for e.g. clicks. redirect then save" -- Oliver Thylmann. http://twitter.com/othylmann/status/18419479334 [07:26] _announcer: Twitter: "Thanks to @shacker for a great article introducing the wonderful node.js which we are using at adcloud http://j.mp/9wuqU6" -- Oliver Thylmann. http://twitter.com/othylmann/status/18419601821 [07:30] MattJ has joined the channel [07:32] blaines: mjr__: http://github.com/blaines/coffee-chat [07:33] blaines: mjr__: http://chatlet.heroku.com/ [07:38] _announcer: Twitter: "@github's download server is now powered by #nodejs. http://bit.ly/9bHtNu <- very cool" -- Felix Geisendörfer. http://twitter.com/felixge/status/18420078486 [07:38] rektide: holy fuck [07:38] rektide: ^--- [07:39] rektide: excuse my french [07:39] mjr__: Yeah, github is all, check out the node. [07:39] mjr__: blaines: so what's the issue with this chat thing? [07:39] rektide: powering their download server though [07:39] mjr__: server stops after a while? [07:39] rektide: ryahs "joking" about never running anything in prod [07:39] rektide: well [07:40] rektide: github apparently didnt get the memo [07:40] blaines: mjr__: it appears so, if you start chatting you won't be able to after about a minute of inactivity [07:40] rektide: is this chat app perhaps powered by websockets? [07:40] blaines: but no disconnection or other events get logged [07:40] mjr__: I think he mostly suggests that you not expose it to port 80 / run as root because there are likely some security issues that could be exploited. [07:40] rektide: cause lol, what a horrible fucking idea, that spec. [07:41] blaines: rektide: http [07:41] rictic has joined the channel [07:41] blaines: rektide: http/ajax/json [07:41] rektide: ah ok [07:41] blaines: yea, it's nifty and speedy [07:42] blaines: I made a chat app ten years ago that used sockets, at that time it was the way to go ;) [07:42] mjr__: blaines: have you tried running it not on heroku? [07:43] rektide: i just think its fucking criminal that the resopnse to "http has a hanging request issue" was "throw out http" [07:43] rektide: actually prosecutably criminal [07:43] blaines: mjr__: not really, it seems okay locally though - I'd really like to make it work on heroku [07:43] rektide: not to mention a host of less serious violations such as arrogant, mean spirited, fool hearty, and just plain stupid [07:43] blaines: if you want I can add you to the app [07:44] blaines: rektide: it's okay, I'm not using sockets ;) [07:44] rektide: yaay. :) [07:44] rektide: forgive me, its late, i'll stop ranting at you, and apologies and good night. [07:44] mjr__: blaines: I get 502 errors [07:44] mjr__: That's probably some heorku thing [07:44] mjr__: Unless you are returning those somehow. [07:44] blaines: mjr__: 502 is a server error [07:44] blaines: nope [07:45] mjr__: Yeah, so I'm guessing this is the issue. [07:45] blaines: that'd be weird, I can't remember what exactly 502 is but 500's are server errors [07:45] mjr__: Or at least, a issue. [07:45] blaines: how can I ask the app to reconnect? [07:46] jsilver: hey guys look now... [07:46] jsilver: http://gist.github.com/473586 [07:46] jsilver: it knows try catch... and switch! [07:46] jsilver: yay [07:47] blaines: timing out isn't really a bad thing [07:47] mscdex: http://en.wikipedia.org/wiki/List_of_HTTP_status_codes#5xx_Server_Error [07:47] blaines: jsilver: how much further until you convert jquery? [07:47] blaines: haha [07:47] jsilver: not sure [07:48] jsilver: it's a bit finnicky sometimes [07:48] blaines: thanks mscdex, not sure where that'd happen in heroku, probably in routing [07:48] jsilver: it's getting there [07:48] jsilver: i have no idea what % of JS it can convert [07:48] jsilver: im gonna try a real library when i feel confident [07:48] jsilver: :P [07:48] mjr__: blaines: I think the heroku layer is sending back badness to you, and also your client code isn't handling it well. [07:48] blaines: jsilver: does it convert strings with code in them? i.e. if "if this converts, that's bad, isn't it?" [07:48] mjr__: http://ranney.com/chat_error.jpg [07:49] blaines: nice screen :) I need a larger screen [07:50] mjr__: Yeah, I've got an older computer, but a 30" monitor. [07:50] jsilver: blaines... no [07:50] blaines: jsilver: :) [07:50] jsilver: it seems to be solid [07:51] blaines: jsilver: what about hash keys? [07:51] blaines: i.e. {if:"blah"} [07:51] _announcer: Twitter: "@itsnotvalid Yes Scala play is a lot more fun than Java play - and if Play gets async like Node.js - were very near heaven :-)" -- Stephan Schmidt. http://twitter.com/codemonkeyism/status/18420612956 [07:51] blaines: not sure that's even valid [07:51] blaines: that'd be horrible if it were [07:52] blaines: mjr__: weird I don't have so much information in my console [07:52] blaines: just lots of polling... fail... [07:52] mjr__: That's the output from Safari 5, which does console.error if you get an XHR with a non 200 series status. [07:53] blaines: ah, running chrome [07:53] mjr__: But I first just ran my http_trace program and watched the requests go by, and saw lots of errors. [07:53] _announcer: Twitter: "Github's repo .zips and tarballs are now served through node.js! w00t! http://bit.ly/9vBEub" -- Rakesh Pai. http://twitter.com/rakesh314/status/18420714519 [07:54] jsilver: blaines: it's fine [07:54] jsilver: lemme try it [07:54] mjr__: You can get it with "npm install pcap" and then run: sudo http_trace en1 "host chatlet.heroku.com" [07:54] mjr__: Pretty useful for debugging stuff like this. [07:54] sveisvei has joined the channel [07:54] blaines: mjr__: wow that's so cool [07:55] blaines: mjr__: is it requesting /recv with id=null? [07:55] mjr__: yeah. GET /recv?callback=jsonp1279007166897&_=1279007247558&since=1279006928355&id=null [07:57] mjr__: I need to put some more time into http_trace. It's on track to be better than HTTPScoop, but it's got a ways to go still. [07:57] Validatorian: anybody know how much space a bare-bones node install takes up? [07:58] mjr__: Validatorian: -rwxr-xr-x 1 root staff 4900944 Jul 10 22:08 /usr/local/bin/node [07:58] mjr__: 4.7 MBytes? [07:58] blaines: mjr__: any idea what might be happening woth heroku? [07:58] mscdex: hmm [07:58] Validatorian: thanks mjr_ [07:58] mjr__: blaines: I dunno, sorry. I've never used heroku, but it seems super cool. [07:59] blaines: mjr__: if you want I can share the app with you [07:59] mscdex: 4.43 megabytes here [07:59] mjr__: blaines: sorry, I need to get to bed. [07:59] blaines: mjr__: ah well thanks for your help [07:59] mjr__: mscdex: what OS? [07:59] mscdex: 64-bit ubuntu server [07:59] blaines: jsilver: did you try it? [08:00] mscdex: on ry-node-b1901cd [08:01] _announcer: Twitter: "Writing a Redis client library for Node.js - Throwing functions to clear the stack. Pretty interesting... http://tumblr.com/xv0dboc0z" -- Sebastian Werner. http://twitter.com/wpbasti/status/18421031526 [08:03] pquerna: wtb, String::New taking a format string [08:03] Validatorian: wonder what's wrong with redis-node-client? [08:03] teemow has joined the channel [08:04] mjr__: Isn't redis-node-client lacking some of the newer things in redis? [08:04] satori: pquerna: That'd be handy [08:04] Validatorian: yea, a few things [08:04] blaines: mjr__: you're on wargamez? lol [08:05] Validatorian: but seems to me that would be a good reason to fork it, not create a new one [08:05] jsilver: no [08:05] jsilver: not yet [08:05] Validatorian: I think the module itself has a great api [08:05] jsilver: super tired [08:06] derferman has joined the channel [08:06] pydroid has joined the channel [08:08] kloeri has joined the channel [08:08] jsilver: blaines: [08:08] jsilver: that gave us LabelledStatement [08:08] jsilver: which i dont know what that is [08:08] jsilver: its this apparently: [08:08] blaines: haha i c [08:09] jsilver: something: "something" [08:09] jsilver: hows that used in JS [08:10] blaines: jsilver: you want to know how that's used? [08:10] jsilver: https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Statements/label [08:11] blaines: would you mind writing a sentence? haha not sure what we're talking about [08:12] jsilver: label: statement [08:12] jsilver: break(label); [08:12] blaines: right? [08:12] jsilver: might not have a coffee equivelent [08:13] jsilver: yeah [08:13] jsilver: not implemented for sure [08:13] blaines: jsilver: ah well this is another thing I was thinking [08:13] blaines: var variable = {if:"blah"} [08:13] blaines: but that's definitely a syntax error [08:14] blaines: though your script shouldn't touch it still [08:14] jsilver: it sees the if:"blah" as a LabelledStatement [08:14] blaines: oh oh oh i c [08:14] jsilver: its not 100% perfect [08:15] jsilver: and the parser can crash if u feed it fucked up shit [08:15] blaines: haha nice [08:15] blaines: if) this is } fucked up { ;) [08:15] robinduckett: morning [08:15] blaines: hola [08:17] jsilver: there's gonna be an online verious soon [08:17] jsilver: version* [08:17] robinduckett: Anyone got Node working in an ARM environment? [08:18] spot|3 has joined the channel [08:18] pquerna: i think i remember a few people talking about it [08:18] pquerna: assuming you are running linux arm, i think any work would be in the build scripts [08:19] pquerna: (ie, v8 already runs on it) [08:19] robinduckett: how about with the Android NDK? [08:21] pquerna: i'd rate the project as feasible, but I've not seen anyone say its been done. [08:22] pquerna: though I'm by no means an NDK expert [08:26] TomY has joined the channel [08:31] N` has joined the channel [08:33] bjartek has joined the channel [08:34] b_erb has joined the channel [08:35] ollie has joined the channel [08:42] blaines: ping [08:42] blaines: nide [08:42] pquerna: i guess i should just git diff ry/master and squash some of these. [08:42] blaines: nice [08:45] towski has joined the channel [08:48] mitkok has joined the channel [08:50] markwubben has joined the channel [09:07] _announcer: Twitter: "NodeJobs.com - Job Board for NodeJS Opportunities http://bit.ly/9yK2sI" -- Feedmyapp. http://twitter.com/feedmyapp20/status/18423677927 [09:07] _announcer: Twitter: "NodeJobs.com - Job Board for NodeJS Opportunities: NodeJobs ia a job board dedicated to the popular NodeJS: No http://url4.eu/5jGsI" -- SocialMediaInEdu. http://twitter.com/SocialMediaInEd/status/18423678002 [09:08] ph^ has joined the channel [09:13] _announcer: Twitter: "I want to build a node.js / CouchDB app. Now!" -- Gregor. http://twitter.com/gr2m/status/18423937481 [09:14] olegp has joined the channel [09:15] _announcer: Twitter: "@gr2m Do it then #node.js :)" -- Robin Duckett. http://twitter.com/robinduckett/status/18423982282 [09:15] Lazesharp: is it possible to override http.createServer to return a derivitive of http.Server? [09:15] hassox has joined the channel [09:20] blaines: OMGOMG ITS WORKING [09:20] blaines: jsilver: my chat bookmarklet works amazing! [09:28] borior has joined the channel [09:29] jsilver: you guys [09:29] borior: hey all. is there any way of putting the result of a require() in the global namespace? do I have to extend GLOBAL or something? [09:29] jsilver: yo [09:29] jsilver: enjoy [09:29] jsilver: http://github.com/jsilver/js2cs [09:29] jsilver: it is released [09:29] jsilver: live demo included [09:30] blaines: cool [09:30] jetienne has joined the channel [09:31] blaines: jsilver: does it overwrite? [09:31] jsilver: what do you mean [09:31] borior: jsilver: did you forget to commit your stylesheets for the demo? [09:32] jsilver: there is not one [09:32] jsilver: why do i need a stylesheet [09:33] borior: jsilver: of course you don't, but you reference several in example.html [09:33] blaines: jsilver: does it overwrite your file? [09:33] blaines: I don't see an output, just an input [09:34] jsilver: borior: oh it was a shell file [09:34] jsilver: ill take that out [09:34] jsilver: blaines: it writes to stdout [09:34] jsilver: carret or pipe if you want output [09:34] jsilver: :) [09:34] blaines: ok [09:34] jsilver: it's not perfect [09:34] jsilver: infact [09:34] jsilver: it's very imperfect [09:34] borior: it appears to be a bit broken [09:34] jsilver: it is [09:34] jsilver: :) [09:34] blaines: already [09:35] borior: I can't get it to parse anything with braces in [09:35] jsilver: in different ways [09:35] jsilver: it doesnt like this: [09:35] jsilver: if (condition) { [09:35] jsilver: it prefers this [09:35] jsilver: if(condition) [09:35] jsilver: { [09:35] jsilver: parser limitations [09:36] borior: it also can't deal with strings!? [09:36] jsilver: yes it can... [09:37] borior: ah, no, it can't deal with strings in return statements [09:37] borior: I can't do "return 'foo';" [09:37] jsilver: return statements are broken [09:37] jsilver: they arent dealt with at all right now [09:37] _announcer: Twitter: "@aral @adactio We often break apps into small, procedural scripts with minimal-to-zero OO, or a DSL. See: Node.js, Sinatra. Useful at times." -- Dan Glegg. http://twitter.com/angryamoeba/status/18424902581 [09:37] jsilver: http://github.com/jsilver/js2cs/blob/master/test.js [09:37] jsilver: add whatever's broken to that file [09:37] jsilver: you'll see return is there [09:38] _announcer: Twitter: "Bespin is a server-side node.js, was changed to the client side jQuery. Decisions about its design. / Bespin fresh start: SproutCore / Python from jQuery / Node.js to - Sa ... http://htn.to/3CQyas Clients" [ja] -- Takuto Wada. http://twitter.com/t_wada/status/18424934691 [09:38] teemow has joined the channel [09:38] _announcer: Twitter: "Are there node.js coding contest. Interesting. / Node.js coding contest held: Node.js Knockout - Client-side scripting with Web Standards http://htn.to/xnGH5e" [ja] -- Takuto Wada. http://twitter.com/t_wada/status/18424949745 [09:38] jsilver: repairs to the parser grammar might help to converter [09:41] fermion has joined the channel [09:43] fermion has joined the channel [09:43] _announcer: Twitter: "# NodeJS a brief explanation of its purpose and use @ sitepointdotcom" [pt] -- Joao Dubas. http://twitter.com/joaodubas/status/18425137629 [09:43] _announcer: Twitter: "Free Web Apps: NodeJobs.com - Job Board for NodeJS Opportunities http://dlvr.it/2Zp9W" -- thefarmproject. http://twitter.com/thefarmproject/status/18425148067 [09:43] _announcer: Twitter: "At #WebWorkersCamp I asked @ryah what kept him up at night and it was http://nodejs.org/illuminati0.pdf - Soon you'll be able to sleep ;)" -- Damien Mathieu. http://twitter.com/dmathieu/status/18425155594 [09:49] _announcer: Twitter: "feedmyapp: NodeJobs.com - Job Board for NodeJS Opportunities: http://bit.ly/bpX2Dk: http://bit.ly/9OKCZi" -- PetrBuben. http://twitter.com/dovoz/status/18425367656 [09:52] DarthShrine has joined the channel [09:55] tyfighter has joined the channel [09:56] _announcer: Twitter: "@DamonOehlman @pamelafox I'm giving a talk on nodejs you should come :p" -- jared wyles. http://twitter.com/rioter/status/18425679237 [10:02] chrischris has joined the channel [10:10] maushu has joined the channel [10:10] blaines: what is a js prototype exactly? [10:12] stagas: blaines: http://howtonode.org/prototypical-inheritance [10:13] c4milo has joined the channel [10:15] blaines: thanks stagas [10:16] stagas: blaines: though that doesn't elaborate that much, you should google for it there are many articles describing [10:16] blaines: Well I just want to make an instance variable [10:17] blaines: and I didn't understand what exactly prototype meant [10:17] blaines: makes sense now [10:21] stagas: you can also do: this. = <...> inside the constructor [10:23] stagas: prototype is useful when you want to inherit whole objects like this: John.prototype = new Person(); [10:23] blaines: hmm I missed something [10:23] blaines: If I have Person, how can I set their name? [10:24] blaines: p = Person.new() [10:24] blaines: p.name = "John"; [10:24] blaines: p.name => "John" [10:24] blaines: like that [10:24] ryan[WIN]: why do the => [10:24] ryan[WIN]: p.name = "John"; is fine [10:24] stagas: var p = new Person(); p.name = 'John'; [10:24] blaines: ryan[WIN]: the => indicates output [10:25] ryan[WIN]: k [10:25] blaines: stagas: and then can I access this.name within Person? [10:25] ryan[WIN]: javascript isn't an OOP language - it helps to think of it more like a slightly dopy lisp [10:25] Rik` has joined the channel [10:25] blaines: hard [10:25] _announcer: Twitter: "Clojure's edge on Node.js -- http://dosync.posterous.com/22397098" -- Shantanu Kumar. http://twitter.com/kumarshantanu/status/18426904925 [10:26] stagas: no it doesn't go backwards [10:26] blaines: hmm [10:26] ryan[WIN]: you don't need to inherit "has a" in order to masquerade "as a" [10:26] ryan[WIN]: since it's not statically analyzed [10:26] _announcer: Twitter: "[Sitepoint] Node.js is the New Black - node.js is the cool new kid on the web development block, but what's behind a... http://ow.ly/1872J2" -- tweet_pro. http://twitter.com/tweet_pro/status/18426942617 [10:27] stagas: p in your case is a new object containing all Person's properties [10:27] stagas: and you set a var on that one [10:28] ryan[WIN]: you can also change method implementation [10:28] ryan[WIN]: if you have a function that returns methods like this.action = function() {}; [10:28] ryan[WIN]: you can still do [10:28] _announcer: Twitter: "nice slides about node.js and Riak http://bit.ly/9T8GeK cc : @lynxluna" -- Fachry Bafadal. http://twitter.com/fachrybafadal/status/18427016467 [10:28] stagas: if you wanted all children of Person to have that var you'd have to use Person.prototype.name = 'John' or declare it in the function Person() with this.name='John' [10:28] ryan[WIN]: var p = new Person(); p.action = function() { /*whatever you want*/}; [10:29] blaines: wow confusing [10:30] ryan[WIN]: js is not c++/java [10:30] stagas: it's simple really you just need to read a bit more [10:31] ryan[WIN]: it's a dopy lisp with c syntax [10:31] ryan[WIN]: like you took lisp and tied its hands behind its back and put a bag over its head and whapped it with a pipe a few times [10:31] blaines: ha alright [10:32] blaines: still confusing [10:32] ryan[WIN]: but the nice part about js [10:32] ryan[WIN]: is that it's really very simple once you get down to the cores [10:32] ryan[WIN]: which is that var is = an int, a float, a string, or an anonymous function [10:32] blaines: it's almost easier not to even try oop [10:33] ryan[WIN]: and an object is just a collection of vars [10:33] ryan[WIN]: there's no such thing as a class structure or a hierarchy [10:33] ryan[WIN]: you can fake it as much as you want but why fake it when you can yield to the simplicity of js [10:33] stagas: blaines: found a better one http://www.coolpage.com/developer/javascript/Correct%20OOP%20for%20Javascript.html [10:34] ryan[WIN]: and stop having to do things like implement dopy design patterns that don't need to be implemented [10:35] blaines: hmm [10:36] stagas: yes use JS on what it does "good", which is inheritance and use it [10:36] ryan[WIN]: js is great at stringing all sorts of nonsense data together [10:37] ryan[WIN]: doing wild things like passing off functions as data [10:38] ryan[WIN]: js is great for events/callbacks for that reason [10:39] ryan[WIN]: you can also do wild and fun things with objects like runtime method replacement [10:40] ryan[WIN]: wanna debug an object? replace one of its methods runtime! [10:40] ryan[WIN]: it's all data anyway just get in there with your hands [10:40] mape has joined the channel [10:41] blaines: so if I have Person, and two instance vars; firstname, and lastname [10:41] ryan[WIN]: you can just go apeshit on that [10:41] ryan[WIN]: and be like myvar.middlename = "whoa"; [10:42] ryan[WIN]: so you can do wacky things like have one-off objects without having to implement all sorts of handler and type id crap [10:43] ryan[WIN]: stuff that would make C++ and java throw up [10:43] blaines: so what about this... Person = function() {this.firstname; this.lastname; this.fullname = function(){return this.firstname+" "+this.lastname}} [10:43] blaines: this.firstname and lastname are probably not necessary [10:43] blaines: right? [10:43] ryan[WIN]: sure that's legal and yes you don't have to declare before assignment [10:43] ryan[WIN]: so like [10:44] ryan[WIN]: you might do if(this.firstname!=null && this.lastname!=null) to make sure you're not going nuts but yeah [10:44] blaines: right [10:44] blaines: didn't want it too long [10:45] stagas: sorry there is a difference in using this. and using the prototype. way as in when you change a prototype. of the constructor, all children will inherit the change, they all point to the same var, instead using this. is more like a private var, ie it will be copied instead of inherited [10:45] ryan[WIN]: let's say you make a special person [10:45] blaines: but in reality person could be like this... Person = function() {this.fullname = function(){return this.firstname+" "+this.lastname}} [10:45] ryan[WIN]: someone can do this blaines [10:45] pufuwozu has joined the channel [10:45] blaines: huh? [10:45] stagas: does that make sense? :P [10:46] ryan[WIN]: var a = new Person(); var b = new Person(); b.middlename = "johnson"; b.fullname = function() { return this.firstname + this.middlename + this.lastname }; [10:46] mklappstuhl has joined the channel [10:46] c4milo: stagas: s/private var/instance var/i [10:46] stagas: yes [10:46] charlesjolley- has joined the channel [10:46] ryan[WIN]: everything is subject to change in js [10:47] ryan[WIN]: unles you define it as a const [10:47] blaines: okay [10:47] blaines: so what if I have a prototyped function, does it affect all children? [10:47] blaines: i.e..... [10:47] c4milo: all instances yes [10:48] c4milo: s/all/all the/i [10:49] blaines: ahhh [10:49] blaines: okay [10:49] blaines: so cool [10:49] blaines: ACTION getting this [10:50] c4milo: ACTION playing http://www.lordofultima.com/en , a game made with qooxdoo (a javascript framework) [10:50] ryan[WIN]: blaines the reason C++ and Java have classes is because you have to tell the compiler what the relationship between your data and functions are [10:50] blaines: hmm [10:50] ryan[WIN]: because it has to translate from your code to machine code once [10:51] ryan[WIN]: but in javascript that information is inferred at runtime [10:51] _announcer: Twitter: "@jcoglan Are there any major performance differences between the rack and nodejs version of your faye server?" -- Ryan Oberholzer. http://twitter.com/ryan_za/status/18428007892 [10:51] c4milo: ryan[WIN]: I need your help on my wscript :$ [10:52] ryan[WIN]: which is why you can have a variable that is a string and then it's a float and then it's a function and whatever [10:52] ryan[WIN]: because right when your code is executed the js interpreter asks the variable "what are you" [10:52] tmedema has joined the channel [10:53] hpoydar has joined the channel [10:53] ryan[WIN]: the variable might go "herp durp i'm an integer" but the interpreter might want it to be a string [10:53] ryan[WIN]: so it will just change that integer to a string representation [10:53] c4milo: strong typed vs loosely typed [10:53] ryan[WIN]: that's why you can do alert("lol: " + 4); [10:54] ryan[WIN]: and it figures out all that nonsense for you [10:54] aheckmann has joined the channel [10:54] ryan[WIN]: c4milo, exactly [10:54] ryan[WIN]: what's wrong with your wscript [10:54] _announcer: Twitter: "Just Posted: Node.js is the New Black: If you’ve been paying attention to news about web technology in the last ye... http://bit.ly/aPSStL" -- InnerSeduction. http://twitter.com/innerseduction/status/18428162645 [10:57] bradleymeck has left the channel [10:57] c4milo: ryan[WIN]: http://gist.github.com/473720 [10:57] stagas: ryan[WIN]: which can lead to many mistakes like: alert(5 + 5 + 'lol' + 5 + 5) ==> 10lol55 [10:57] blaines: omg ryan[WIN], stagas ty so much [10:57] c4milo: ryan[WIN]: It doesn't find inotify.h :S [10:57] ryan[WIN]: stagas, exactly [10:57] blaines: :) :) :D http://chatlet.heroku.com/ [10:57] c4milo: ryan[WIN]: I have the same conf_cc that libev has in its wscript [10:57] blaines: check out my chat bookmarklet [10:57] ryan[WIN]: var a = "lol" + 5; [10:58] ryan[WIN]: is different than [10:58] stagas: it's better to put ( ) in vars that are integers so you can do math afterwards and get the actual eval'ed result [10:58] ryan[WIN]: var a = 5 + "lol"; [10:58] ryan[WIN]: er [10:58] ryan[WIN]: var a = "lol" - 5; [10:58] c4milo: ryan[WIN]: I'm forgeting something ? [10:58] ryan[WIN]: sorry [10:58] ryan[WIN]: i use a dumb trick to hint that a variable should be an integer by doing | 0 [10:58] ryan[WIN]: var a = 32; [10:58] ryan[WIN]: a = a | 0; [10:59] blaines: http://chatlet.heroku.com/ - Now when you click the bookmarklet you're sent to that domain's channel [10:59] ryan[WIN]: because the bitwise operator is only used by the integer type [10:59] blaines: instead of a global messaging system [11:00] stagas: blaines: but where is the room? [11:00] blaines: stagas: ? [11:00] blaines: is it missing? [11:00] blaines: maybe refresh? [11:01] blaines: stagas: is it working? [11:02] ryan[WIN]: c4milo, does /usr/include/sys/inotify.h exist? [11:02] c4milo: ryan[WIN]: yes [11:02] c4milo: ryan[WIN]: look at the end of my gist [11:02] ryan[WIN]: oh there it is [11:03] ryan[WIN]: c4milo, see what happens if you fully qualify the path [11:03] ryan[WIN]: /usr/include/sys/inotify.h instead of sys/inotify.h [11:03] c4milo: ryan[WIN]: ok [11:04] c4milo: the strange thing is that with libev it works ! it finds the header [11:05] ryan[WIN]: hm [11:05] c4milo: ryan[WIN]: I tried with the full path and it still doesn't work :( [11:06] _announcer: Twitter: "What, kiwi ended as a package manager? Well, in the end was only one "- npm:) # nodejs" [ru] -- Serge Shirokov. http://twitter.com/kurokikaze/status/18428692233 [11:06] c4milo: ryan[WIN]: I think, I am missing something in my wscript but I don't know what is it. [11:07] ryan[WIN]: weiiird [11:08] ryan[WIN]: the correct line is if conf.check_cc(header_name="sys/inotify.h"): [11:08] ryan[WIN]: conf.check_cc(header_name="sys/inotify.h", function_name="inotify_init") [11:08] c4milo: ryan[WIN]: I've tried with includes and libpath and still it doesn't work :'( [11:08] ryan[WIN]: and your line is if conf.check_cc(header_name="sys/inotify.h"): [11:08] ryan[WIN]: conf.check_cc(header_name="sys/inotify.h", function_name="inotify_init") [11:08] ryan[WIN]: which is correct [11:09] ryan[WIN]: hold i think there's an issue with this [11:10] hojberg has joined the channel [11:11] pavan_ has joined the channel [11:11] _announcer: Twitter: "Node.js gains traction as GitHub's new Download Server http://bit.ly/9bHtNu" -- Anthony Mann. http://twitter.com/MrNibbles/status/18428941061 [11:12] blaines: ryan[WIN]: did you check out chatlet? [11:12] ryan[WIN]: c4milo, what distro and do you have gnutls [11:12] c4milo: ryan[WIN]: ubuntu 10.04 [11:12] c4milo: ryan[WIN]: camilo@macbooksito:~$ dpkg --list | grep gnutls [11:13] c4milo: ii libcurl3-gnutls 7.19.7-1ubuntu1 Multi-protocol file transfer library (GnuTLS [11:13] c4milo: ii libgnutls-dev 2.8.5-2 the GNU TLS library - development files [11:13] c4milo: ii libgnutls26 2.8.5-2 the GNU TLS library - runtime library [11:13] c4milo: ii libneon27-gnutls [11:14] ryan[WIN]: ok [11:14] ryan[WIN]: blaines, what's chatlet [11:14] blaines: http://chatlet.heroku.com/ [11:15] ryan[WIN]: ah i see what you did there [11:16] ryan[WIN]: hay c4milo try this [11:16] ryan[WIN]: change it from sys/inotify.h to linux/inotify.h [11:17] gary_r has joined the channel [11:17] c4milo: ryan[WIN]: I did that change yesterday and it doesn't work :''( [11:17] ryan[WIN]: ok [11:17] c4milo: ryan[WIN]: but I will try it again today [11:18] ryan[WIN]: well the day changing won't make it work lool [11:18] c4milo: ryan[WIN]: ahahaha [11:19] ryan[WIN]: grep inotify.h for inotify_init [11:19] c4milo: ryan[WIN]: I thought that maybe there is some path or variable in wscript that I have to define ? [11:20] c4milo: camilo@macbooksito:/usr/include/sys$ grep inotify_init inotify.h [11:20] c4milo: /* Flags for the parameter of inotify_init1. */ [11:20] c4milo: extern int inotify_init (void) __THROW; [11:20] c4milo: extern int inotify_init1 (int __flags) __THROW; [11:21] c4milo: my wscript works for you ? [11:24] ryan[WIN]: nah i'm buggered [11:24] ryan[WIN]: no idea what's wrong [11:25] blaines: stagas: broke it - oops! [11:25] ryan[WIN]: c4milo, waf uses standard include dir iirc for conf.check_cc [11:25] stagas: blaines: :P [11:26] mklappst1hl has joined the channel [11:26] blaines: fixing... [11:28] c4milo: due this issue I'm thinking on let it as no mandatory that check [11:28] ryan[WIN]: http://gist.github.com/473752 [11:28] ryan[WIN]: put that right before the conf.check_cc [11:28] blaines: stagas: fixed ;) http://chatlet.heroku.com/ [11:29] ryan[WIN]: c4milo, insert it right before line 11 on your gist [11:30] ryan[WIN]: what happens after that code's in there [11:32] c4milo: ryan[WIN]: http://gist.github.com/473755 [11:32] c4milo: nothing :( [11:32] virtuo has joined the channel [11:32] ryan[WIN]: you gotta keep the is_check_cc_present() andp ut it before line 16 [11:34] c4milo: ryan[WIN]: yes [11:34] ryan[WIN]: ok [11:34] ryan[WIN]: so it's present [11:34] ryan[WIN]: i don't know man the only thing i can suggest is comment out check_cc for inotify [11:35] c4milo: what about mandatory=False ? [11:35] ryan[WIN]: that works [11:35] c4milo: ok [11:35] c4milo: I'll let it but not mandatory [11:35] c4milo: thank you for your time ryan[WIN] [11:36] ryan[WIN]: no problem i have no idea what's goign on there [11:36] ryan[WIN]: probably some wacky ubuntu/python/waf brew [11:36] c4milo: no problem, I waste many hours with this issue as well [11:36] rolfb has joined the channel [11:36] c4milo: it doesn't deserve more [11:37] ryan[WIN]: yep [11:38] pufuwozu has joined the channel [11:38] _announcer: Twitter: "@garrett This is true... I really quite like JS, it's just the browser APIs that have sucked forever. #nodejs is *wonderful*!" -- Jeff Waugh. http://twitter.com/jdub/status/18430190634 [11:39] _announcer: Twitter: "@jdub: Agreed. Browsers are finally getting better. I've heard lots of great things about #nodejs & look forward to trying it out soon." -- Garrett LeSage. http://twitter.com/garrett/status/18430275525 [11:40] ryan[WIN]: some day these twitter feeds on nodejs are going to be flooding [11:40] SubStack: little do they know there is a secret cabal watching their every move [11:40] ryan[WIN]: i know rite [11:40] SubStack: ALL IS GOING ACCORDING TO PLAN [11:41] x_or has joined the channel [11:42] c4milo: ryan[WIN]: like happened with amazon and the bell :P [11:42] ryan[WIN]: lol [11:45] c4milo: ryan[WIN]: are you taken a look at Native Client of Chrome ? [11:57] jherdman has joined the channel [11:58] hassox has joined the channel [12:00] pufuwozu has joined the channel [12:00] ryan[WIN]: c4milo, yeah but it doesn't excite me all that much [12:00] c4milo: ryan[WIN]: good to know :) [12:01] ryan[WIN]: the idea is cool [12:01] ryan[WIN]: the execution is nice [12:02] ryan[WIN]: but it's kind of like Go where unless you're google you don't get a whole lot out of using it [12:04] ryan[WIN]: one interesting usage of google native client will be for plugin wrapping [12:04] ryan[WIN]: you'll basically be able to get native code performance in a jailed environment behind a jailed environment [12:04] pufuwozu has joined the channel [12:12] mklappstuhl has joined the channel [12:15] romainhuet has joined the channel [12:16] c4milo: ryan[WIN]: nice [12:17] phiggins has joined the channel [12:17] ryan[WIN]: c4milo, imagine being able to extend canvas or various tags as you want [12:18] Elamaton has joined the channel [12:18] ryan[WIN]: that'll be pretty neat when you can just update the user's experience to whatever you want by hooking various parts of the browser structure [12:18] ryan[WIN]: but not in such a way that it affects other tabs or the whole user experience [12:19] pufuwozu has joined the channel [12:22] _announcer: Twitter: "Very concise description of node.js. Even a caveman like me can understand it. http://bit.ly/d1SsqV" -- Denton Gentry. http://twitter.com/dgentry/status/18432598182 [12:26] Elamaton: Humm. Excuse my extreme newbie confusion, but if someone could look at what I'm doing wrong: http://gist.github.com/473786 [12:26] Elamaton: I'm trying to update the value of a variable from a callback and failing at it :) [12:26] Elamaton: (where the variable lives outside the callback) [12:27] Elamaton: I'm pretty sure I can do that in browser javascript, but the scoping here is confusing me [12:27] mape: and stdout is? [12:27] blaines: How would I serve audio through node [12:27] jetienne: ryan[WIN]: this is what gear was about [12:28] Elamaton: mape, stdout should be 0 for the exec'd command [12:28] dnolen has joined the channel [12:28] Elamaton: (and is) [12:29] mape: Oh, k well the console.log at the end is suppose to be 123 [12:29] pufuwozu has joined the channel [12:29] mape: since the exce is async by the time you console.log at the end it hasen't returned the value from your id -u root command [12:29] pavan_ has joined the channel [12:30] Elamaton: but I'm running this whole thing in REPL; the final console.log isn't run until the async exec has returned [12:30] mape: It isn't afterwards, it is before uid = *** runs [12:30] SamuraiJack has joined the channel [12:30] Elamaton: the comment at the end is trying to convey a pause in action :) [12:31] mape: so what is the issue then? "stdout should be 0 for the exec'd command" console.log(uid) // prints 0 [12:32] Elamaton: the issue is that the uid = ... inside the callback isn't updating the uid variable outside the callback [12:32] Elamaton: is it even possible? [12:32] Elamaton: like I said, I'm confused about the scoping here [12:32] mape: It should update it yes [12:32] mape: but when are you running the console.log to verify that it has changed? [12:33] Elamaton: well after I've seen the console.log(uid) output, so after the callback is finished [12:34] mape: Elamaton: http://gist.github.com/473792 [12:34] mape: if you run that, it outsputs as expected right? [12:34] polotek has left the channel [12:36] Elamaton: prints 0 twice yes [12:36] mape: Then that isn't the issue, rather that repl doesn't fetch the variable [12:36] pufuwozu has joined the channel [12:37] Elamaton: is REPL scoping explained somewhere in detail? [12:37] mape: Have you read the docs? [12:37] Elamaton: to a large extent [12:38] mape: Sorry to say but I don't have any experience with using REPL so can't really be of much use [12:38] mape: The REPL provides access to any variables in the global scope. You can expose a variable to the REPL explicitly by assigning it to the scope object associated with each REPLServer. [12:38] mape: repl.start().scope.m = msg; [12:39] Elamaton: yeah I saw that, thought it has to do with "embedding" REPLs in runnable scripts [12:39] ThePub has joined the channel [12:39] mape: so you are just running the node command and try stuff out? [12:39] Elamaton: yeah [12:40] dnolen has joined the channel [12:40] mape: hmm seems it doesn't remember the state besied the last expression being saved to _ [12:41] mape: or sorry, sure it does, just me being slow [12:41] _announcer: Twitter: "Developing a killer blog application using #NodeJS and #PersistenceJS. Wordpress eat your heart out!" -- Zef Hemel. http://twitter.com/zef/status/18433696265 [12:42] pufuwozu has joined the channel [12:43] victorstan has joined the channel [12:43] victorstan: Morning [12:44] victorstan: Anyone have suggestions on what the best mongoDB driver is for nodejs? [12:44] mape: People seem to go with the native one [12:45] mtodd has joined the channel [12:47] _announcer: Twitter: "Software Craftsman, Jim Suchy of 8th Light will present on Node.js and Heroku. Come out for the content, stay for the …http://lnkd.in/325Cem" -- Michael D. Hall. http://twitter.com/just3ws/status/18434075317 [12:48] kriszyp has joined the channel [12:48] _announcer: Twitter: "July Meeting - Node.js with Heroku to flavor http://post.ly/n0BL" -- Michael D. Hall. http://twitter.com/just3ws/status/18434145193 [12:50] Elamaton has left the channel [12:51] pufuwozu has joined the channel [12:54] jashkenas has joined the channel [12:54] jashkenas has left the channel [13:01] blaines: Ka pow! http://chatlet.heroku.com/ Lovin' node! [13:01] chrischris has joined the channel [13:02] _announcer: Twitter: "McHenry Cloud Developer's Group, July Meeting - Node.js with Heroku http://post.ly/n0BL" -- Iron Languages. http://twitter.com/ironlanguages/status/18434977162 [13:02] x_or has joined the channel [13:03] pufuwozu has joined the channel [13:06] _announcer: Twitter: "Tonight, a hacking party # nodejs http://bit.ly/bjx27I we are sure that this is not just for drinking bobylito @ & @ glenux?" [fr] -- af83. http://twitter.com/af83/status/18435249580 [13:07] steadicat has joined the channel [13:08] mklappstuhl has joined the channel [13:09] pufuwozu has joined the channel [13:12] virtuo_ has joined the channel [13:15] pufuwozu has joined the channel [13:16] ceej has joined the channel [13:21] Ori_P has joined the channel [13:22] pydroid has joined the channel [13:23] pufuwozu has joined the channel [13:24] cloudhead has joined the channel [13:25] _announcer: Twitter: "I'm doing a lightning talk at tomorrow's AmsterdamJS meetup http://bit.ly/aYFsHd - #bigdata #nodejs #nlp" -- dominiek. http://twitter.com/dominiek/status/18436531160 [13:26] mtodd has joined the channel [13:26] virtuo has joined the channel [13:28] Ori_P has joined the channel [13:28] N` has joined the channel [13:29] davidsklar has joined the channel [13:30] _announcer: Twitter: "mnutt/hummingbird @ GitHub http://goo.gl/fb/lDLQI #javascript #nodejs #realtime #statistics #tracking #traffic" -- Delicious Over 50. http://twitter.com/readelicious/status/18436833309 [13:30] _announcer: Twitter: "ServerSide JavaScript with MooTools and NodeJS http://bit.ly/d4pzLQ #css-html #design" -- Jessyka. http://twitter.com/yummymashup/status/18436850341 [13:33] pufuwozu has joined the channel [13:35] ben_alman has joined the channel [13:35] _announcer: Twitter: "I love questions like this on .net rocks: Lua? How do you spell that? js?...Node.js? Tell us about it." -- scitesy. http://twitter.com/railcar88/status/18437178177 [13:36] _announcer: Twitter: "...maybe I missed it....but what does it do exactly? (.net rocks on node.js)" -- scitesy. http://twitter.com/railcar88/status/18437252018 [13:38] chrischr1s has joined the channel [13:41] hpoydar has joined the channel [13:41] pufuwozu has joined the channel [13:42] donspaulding has joined the channel [13:42] _announcer: Twitter: "@just3ws i was really excited about talking some node.js. hopefully i'll see something at the js.chi meetup" -- Brian Mavity. http://twitter.com/bmavity/status/18437675274 [13:45] sechrist has joined the channel [13:46] _announcer: Twitter: "DNode: asynchronous RMI for Node.js and the browser. Looks potentially useful... http://icio.us/4e3dpp" -- Kevin Dangoor. http://twitter.com/dangoor/status/18437914174 [13:46] zomgbie has joined the channel [13:49] pufuwozu has joined the channel [13:50] zapnap has joined the channel [13:57] mklappstuhl has joined the channel [13:58] pufuwozu has joined the channel [13:58] _announcer: Twitter: "#NodeJS #MySQL support comes to #PersistenceJS http://bit.ly/99XA0w" -- Zef Hemel. http://twitter.com/zef/status/18438795666 [14:03] pufuwozu has joined the channel [14:05] _announcer: Twitter: "Just finished most of the work on my first NodeJS app which is now ready to be beta tested :)" -- Dennis Blöte. http://twitter.com/dbloete/status/18439247695 [14:06] _announcer: Twitter: "Woot! Just got my port of Jade from node.js to the browser working." -- Micheil Smith. http://twitter.com/miksago/status/18439354684 [14:08] _announcer: Twitter: "YES, we've just launched transloadit.com!!! http://bit.ly/bAwn0a #nodejs #saas" -- Felix Geisendörfer. http://twitter.com/felixge/status/18439472439 [14:08] felixge has joined the channel [14:08] felixge has joined the channel [14:09] pufuwozu has joined the channel [14:09] CIA-76: node: 03Paul Querna 07master * r480164f 10/ (4 files in 2 dirs): [14:09] CIA-76: node: Move node version to a single static header file. [14:09] CIA-76: node: Some compile time variables like the cflags and prefix have been moved to [14:09] CIA-76: node: the node_config.h.in, in the anticipation that they will be removed at [14:09] CIA-76: node: somepoint. - http://bit.ly/dzsTuR [14:09] CIA-76: node: 03Paul Querna 07master * r4906604 10/ src/node.h : Add basic structure and macros for node modules. - http://bit.ly/ackSzR [14:09] CIA-76: node: 03Paul Querna 07master * r367b87d 10/ src/node.cc : Add support for the module structure to process.dlopen. - http://bit.ly/d8LnhA [14:11] felixge has joined the channel [14:11] meder has joined the channel [14:12] mape: felixge: Congrats on the launch :) [14:12] gf3 has joined the channel [14:12] maushu: Launch? [14:12] felixge: mape: thanks :) [14:12] felixge: maushu: http://debuggable.com/posts/announcing-transloadit-com:4c3c6a45-3950-4b13-a044-44a0cbdd56cb [14:12] felixge: maushu: We just launched the first commercial node.js app :) [14:12] mape: felixge: Just one minor thing, there seems you don't have an expires set for any asset on the site. [14:12] maushu: I remember this name. Somehow. [14:13] felixge: mape: yeah, we should : ) [14:13] blaines: Node.js chat in a bookmarklet: http://chatlet.heroku.com/ [14:13] mape: Well the images have, but the js/css doesn't [14:13] pufuwozu has joined the channel [14:13] blaines: let me know what you think [14:13] felixge: mape: you mean E-Tag's or ? [14:14] mape: felixge: http://mape.me/trans.png [14:14] _announcer: Twitter: "Transloadit (service for video transcoding with backstage on node.js) launched:) http://bit.ly/bAwn0a # nodejs" [ru] -- Serge Shirokov. http://twitter.com/kurokikaze/status/18439915498 [14:14] mape: felixge: http://mape.me/cache.png [14:15] felixge: mape: so what's the problem with that? [14:15] mape: It isn't optimal [14:15] felixge: we'll probably add timestamps to the urls if we want to change those files [14:16] mape: Yeah well now they get fetched more then they need to since they have no expires set [14:16] mape: And prefferably move the scripts in the header to the bottom [14:17] stepheneb has joined the channel [14:21] mape: felixge: What are you running the website on? [14:21] mitkok has joined the channel [14:21] felixge: mape: CakePHP [14:21] mape: Ah k [14:21] mitkok: Hey, guys. How I can install the man pages, because there's something wrong when I hit man node [14:22] felixge: mape: I'd love to use node, but as this point it is much easier this way. The website is really just marketing bla, docs and a little dashboard ; ) [14:22] mape: Yeah, just one more thing, have you though about moving the robot graphics up over the balsamiq sketch? They look great and the balsamiq isn't quite as hot [14:23] _announcer: Twitter: "Bespin node.js s server-side system rewritten in. What is What node.js http://bit.ly/bJYIkB" [ja] -- Yoshito Komatsu. http://twitter.com/yoshitokomatsu/status/18440550913 [14:23] maushu: felixge: So, you are using rbs worldpay? I'm having tons of problems finding a working payment solution for me. [14:23] mape: Plus they are a great 4 step process for the user to get an idea of what the service does [14:23] felixge: maushu: well, there are tons of problems with all payment solutions, especially in europe :) [14:24] maushu: Tell me about it. [14:24] felixge: maushu: We are using ipayment + worldpay [14:24] maushu: ipayment? [14:24] felixge: maushu: worldpay provides the merchant account, ipayment is the API [14:24] mape: Just use paypal and wait for rapeage? [14:24] felixge: maushu: https://ipayment.de/ [14:24] felixge: maushu: not sure they work outside germany [14:24] felixge: maushu: but worldpay may have a list of other gateways that do [14:24] maushu: ...damn it. [14:25] maushu: Wait, doesn't worldpay come with a gateway? [14:25] _announcer: Twitter: "The #nodejs IRC channel has around 210-250 users constantly. The Google group has 1728 people." -- Ryan Dahl. http://twitter.com/ryah/status/18440699815 [14:25] maushu: ryah: I thought you didn't want so many fans. :p [14:26] nrstott has joined the channel [14:26] nrstott has joined the channel [14:26] CIA-76: node: 03Ryan Dahl 07eventsource * rfd0345b 10/ src/node_events.cc : simpler stack trace output (+599 more commits...) - http://bit.ly/dpogQm [14:26] _announcer: Twitter: "(Probably half of those #nodejs irc users are node bots though :D)" -- Ryan Dahl. http://twitter.com/ryah/status/18440788725 [14:26] mape: felixge: Do you guys have an api so the site owner can limit peoples uploading? [14:26] pufuwozu has joined the channel [14:26] mjijackson has joined the channel [14:27] felixge: mape: we provide a max_size parameter to limit the individual upload size [14:27] felixge: mape: we will add overage caps soon, for now people can contact us and we'll manually make sure they are not billed more than they want to be billed for [14:27] _announcer: Twitter: "Man, I'm way too stupid for async programming. #nodejs" -- JK Laiho. http://twitter.com/jklaiho/status/18440846764 [14:27] mape: Ok, so if I have an indie movie site and have 100 users, is there any way of making sure 1user doesn't upload hundreds of GB? [14:27] _announcer: Twitter: "Node.js is the New Black http://bit.ly/ddygdk #programming #javascript" -- Alexander Torrijos. http://twitter.com/stormwild/status/18440881190 [14:28] maushu: Woah, twitter storm. [14:28] mape: Hmm.. to stupid for async programming - jklaiho - His bio: Web developer (Django/jQuery), Mac faithful, (retro)game [14:29] mape: How can people use jQuery and have an issue with async programming [14:29] felixge: mape: well, you can sign each upload and put an expire on it. Together with the max_size you can throttle a single user that way [14:29] mape: felixge: Ah k, neat [14:29] felixge: mape: but an IP based cap is something we can do as well [14:29] maushu: mape: There are callbacks and then there are ASYNC PROGRAMMING (with caps). [14:29] zaach has joined the channel [14:30] mape: maushu: Well if you write an ajax heavy application it is more or less the same [14:30] mape: Only that more things are async in node [14:30] maushu: mape: Know any web developer (with jquery in the bio) that have made an ajax heavy application? [14:31] mape: Twitter bio or cv? [14:31] pufuwozu has joined the channel [14:31] maushu: Any bio besides cv. [14:32] maushu: felixge: ipayment is 1&1? [14:32] maushu: ACTION twitches. [14:32] c4milo: can anybody tell me the porpuse of persistent: false in fs.watchFile ? [14:32] mape: Hehe well then I guess no [14:32] felixge: maushu: yeah ... [14:33] maushu: ACTION twitches again. [14:33] _announcer: Twitter: "In the Twi-tape flurry of support from the Node-run community Transload.it (which is actually not only re-encodes video) # nodejs" [ru] -- Serge Shirokov. http://twitter.com/kurokikaze/status/18441268532 [14:34] felixge: maushu: it ain't pretty in the world of payment systems ... I hope we the finance gods have mercy with us :) [14:35] felixge: maushu: the problem is that we needed a service that offers credit card storage, those are difficult to come by [14:35] _announcer: Twitter: "NodeJobs.com - Where NodeJS Opportunities Are Listed http://tinyurl.com/2552rbe - Social Media Marketing News, Stun Media" -- stun media. http://twitter.com/stunmedia/status/18441390896 [14:35] maushu: felixge: Even the russians are talking about you. [14:35] maushu: felixge: Yeah, my case is the exact same. [14:35] maushu: Do you receive the number on your page? Or is it in an external page? [14:36] pufuwozu has joined the channel [14:37] maushu: I also checked realex. [14:37] felixge: maushu: number? [14:37] felixge: maushu: no, the credit card form is directly submitted to ipayment, we get a response with a storage_id as a redirect [14:38] maushu: Hmm. [14:38] _announcer: Twitter: "Nice article @sitepoint http://ow.ly/2aMvh #node.js . On my list of things to look into." -- tim arney. http://twitter.com/timarney/status/18441629291 [14:38] maushu: I checked and I have PCI DSS level 4, enough to receive payments directly on my website. [14:39] maushu: But not to save the card numbers. [14:40] _announcer: Twitter: "Too loud www.sarien.net, they are 2D games in the Police Quest multiplayer separately the while JS node.js thank you! Retrogaming # # js" [fr] -- Sylvain Peigney. http://twitter.com/volpeo/status/18441758345 [14:40] hoffmanc has joined the channel [14:41] hoffmanc: hello; how do I make sure all errors are being thrown when using node-redis-client? the callback takes an error parameter, but I think I'm hiding something in my implementation [14:42] ajpiano has joined the channel [14:42] _announcer: Twitter: "Node.js is "the new black" according to SitePoint: http://www.sitepoint.com/blogs/2010/07/13/node-js-is-the-new-black/" -- Buck Sommerkamp. http://twitter.com/bucksommerkamp/status/18441917297 [14:44] hoffmanc: i'm using express as the framework; is there a canonical way to throw errors from the redis client, such that I get as much detail as possible on what's happening? [14:49] felixge: maushu: you have a PCI certification? [14:50] Yuffster has joined the channel [14:50] maushu: On my hand? No. I just read their checklists and so on. [14:51] bvleur has joined the channel [14:51] teemow has joined the channel [14:52] maushu: So, I basically need a "Merchant Service Agreement", how am I getting something like this? [14:53] hoffmanc: anyone see node fail with a stack trace consisting of IOWatcher.callback and node.js alone? [14:53] hoffmanc: I don't even see a proper error, it just stops [14:53] felixge: maushu: first of all, you need a company. Like a real Gmbh/Limited/whatever, individuals probably can't get a merchant account [14:53] pufuwozu has joined the channel [14:53] felixge: maushu: worldpay can give you the merchant service agreement (merchant account) [14:54] hoffmanc: but it is exiting with an error status (i.e., node app.js && "yep" doesn't return "yep") [14:54] robinduckett: hoffmanc: gdb node_g [14:54] felixge: maushu: but they don't provide a web API themselves, so you need to find one of their partners who does [14:54] robinduckett: then "run app.js" [14:54] hoffmanc: robinducket: is that a package I need to install? [14:54] _announcer: Twitter: "more traction for #nodejs http://bit.ly/bW8RGm" -- Jake McGraw. http://twitter.com/jakemcgraw/status/18442787027 [14:54] maushu: felixge: They don't? I thought I saw some code on their website. [14:54] robinduckett: gdb is the gnu debugger [14:54] _announcer: Twitter: "Major congrats! — @felixge: YES, we've just launched transloadit.com!!! http://bit.ly/bAwn0a #nodejs #saas" -- Jan Lehnardt. http://twitter.com/janl/status/18442805178 [14:54] maushu: So, that is why you are using 1and1? For the api? [14:54] _announcer: Twitter: "http://transloadit.com/ is pretty sweet. Congrats @felixge. #node.js" -- Marco Rogers. http://twitter.com/polotek/status/18442812225 [14:55] felixge: maushu: I think they provide you with a "checkout" page where you can redirect people to [14:55] felixge: maushu: not sure about their other integration options [14:55] jstewart has left the channel [14:55] hoffmanc: robinduckett: i was referring to the node_g part [14:55] felixge: maushu: they were definitley not able to handle our dynamic monthly billing use case by themselves [14:56] maushu: Yeah, [14:56] maushu: Btw, thanks for the twitter storm. :p [14:56] maushu: Chargify response to worldpay: "Thank you for your interest in Chargify, this is one of the gateways we are looking at adding in the future but not at this point." [14:57] joshbuddy has joined the channel [14:57] robinduckett: node_g should come if you compile node in debug node [14:57] robinduckett: *mode [14:57] robinduckett: lol [14:57] _announcer: Twitter: "4 web geeks only: node.js is the new black. http://bit.ly/ddPFWo" -- Joel Vergun. http://twitter.com/jvergun/status/18442988821 [14:57] hoffmanc: robinduckett: okay, i'll try doing that, thanks [14:58] sh1mmer has joined the channel [14:58] felixge: maushu: what country are you in? [14:59] jan____: felixge: go go go! [14:59] hoffmanc: robinduckett: I'm not seeing an applicable make directive; is there an environment variable I have to pass? [15:00] felixge: jan____: thanks for the RT man :)! [15:00] maushu: felixge: Portugal. [15:00] felixge: jan____: and congratz on the coming 1.0 already :) [15:00] jan____: felixge: major congrats on launching :) [15:00] felixge: jan____: how much longer? [15:00] jan____: felixge: a few more hours before it is official :) [15:00] felixge: jan____: launch day! [15:00] felixge: jan____: my other iphone app was also approved a few minutes ago [15:00] jan____: noice! [15:00] felixge: crazyness :) [15:00] jstewart has joined the channel [15:00] jan____: amazing horse week :) [15:00] maushu: It only has a *single* payment processing (redunicre) that I know of. [15:01] maushu: Monopoly at its best. [15:01] felixge: jan____: hehe, yeah [15:01] felixge: maushu: well, finding payment gateways is hard work - they all compete for the worst support and lacking docs :) [15:02] maushu: In Europe. [15:02] maushu: I've seen some on the USA and it makes me cry. [15:02] micheil: felixge: hmm.. try chargify and giact [15:03] hoffmanc: robinduckett: nvm, google to the rescue... [15:03] micheil: felixge: I've worked on ruby gems for both those, and both those have really good api docs. [15:03] felixge: micheil: we have a working provider - but it's hard. those you mentioned probably don't do europe [15:03] pufuwozu has joined the channel [15:03] micheil: felixge: don't they? [15:03] felixge: micheil: very unlikely, *every* US payment gateway I checked so far only does business in the US, maybe Canada [15:03] felixge: if it wasn't for that, this whole thing would be much easier [15:03] micheil: hm.. [15:03] micheil: okay [15:04] jakehow has joined the channel [15:04] micheil: felixge: a few useful things here: http://support.chargify.com/faqs/merchant-accounts-payment-gateways/details-payment-express [15:05] felixge: maushu: best of luck, wish I could recommend a "universal" solution : | [15:05] maushu: felixge: The funny part? We could make a payment solution for Europe and get filthy rich. Thats a startup idea right there. [15:06] maushu: Of course then the bureaucracy would show up. [15:06] felixge: micheil: sounds interesting, maushu you should check it out [15:06] felixge: maushu: you will need some *major* funding for that [15:06] felixge: The main problem with this kind of business is fraud [15:06] felixge: there is a *ton* of CC fraud on the web [15:06] felixge: and you'd be in the middle of it all the time [15:07] Shorrockin has joined the channel [15:07] felixge: maushu: also, you would probably have to integrate with tons of legacy / bad systems [15:07] hoffmanc: there a pastie-bot in this chan? [15:07] felixge: but yeah, if you pull it off - money !! [15:07] blackbrrr has joined the channel [15:07] maushu: felixge: Thanks for destroying/burning/wreck my dream. [15:08] maushu: :p [15:08] hoffmanc: robinduckett: http://gist.github.com/474005 shouldn't I be getting more of a stack trace? [15:08] maushu: Well, someone is trying to make a bank startup: banksimple.net [15:08] jstewart has left the channel [15:08] maushu: Only in the USA though. As usual. [15:09] blaines: maushu: yes! love it! [15:09] maushu: blaines: Go away you non-EUan. [15:09] maushu: :p [15:09] maushu: You make me a sad panda. [15:10] pufuwozu has joined the channel [15:10] hoffmanc: is there something else i can check to see if I'm accidentally hiding exceptions? [15:10] steadicat has joined the channel [15:11] _announcer: Twitter: "http://tinyurl.com/2emru7s Node.js is the New Black" -- desk_stage. http://twitter.com/desk_stage/status/18444011589 [15:11] maushu: I will attempt to send some emails tonight. [15:11] _announcer: Twitter: "You can install the Homebrew node.js with http://bit.ly/cJuJaS" [ja] -- Yoshito Komatsu. http://twitter.com/yoshitokomatsu/status/18444037846 [15:13] maushu: felixge: funnily the biggest problem is that I don't know how to translate "merchant account" into my language. [15:13] nrstott: maushu, what language? [15:13] maushu: The closest thing means something else. [15:13] maushu: Portuguese. [15:14] jstewart has joined the channel [15:14] nrstott: interesting [15:14] felixge: maushu: well, the german word for "Merchant Service Agreement" is "Kreditkartenakzeptanzvertrag" [15:14] felixge: maushu: ~credit card acceptence contract [15:14] felixge: maushu: maybe something like that translates better [15:15] maushu: Hmm. [15:15] maushu: Yeah, that is basically what I've been asking. [15:15] blaines: OMG Just had a client pop onto my very-alpha node app and they used it without a problem, whew! Thanks node.js! :) [15:15] bradleymeck_ has joined the channel [15:16] pufuwozu has joined the channel [15:16] blaines: very unexpected! [15:16] maushu: blaines: Murphy heard you. The app is going to explode any moment now... [15:17] blaines: maushu: That's fine now haha! let it explode! [15:17] bradleymeck_: yello all [15:18] mklappst1hl has joined the channel [15:18] blaines: blue you [15:18] hoffmanc: does gdb node_g break on debugger statements? [15:19] hoffmanc: nvm [15:20] maushu: felixge: "Worldpay has been rejected as a payment gateway for Shopify for lack of quality reasons." [15:20] felixge: maushu: :) [15:21] pufuwozu has joined the channel [15:21] felixge: maushu: as long as they process our payments, I'm happy [15:21] khaavren has joined the channel [15:21] keeto_ has joined the channel [15:21] felixge: maushu: well, "happy" as in: more important problems to fix [15:21] felixge: ;) [15:22] maushu: This guy says that they don't even have an api... I thought they had a *bad* api. [15:22] maushu: Well, the thread is a year old.. [15:24] _announcer: Twitter: "Node.js is the New Black: http://www.sitepoint.com/blogs/2010/07/13/node-js-is-the-new-black/" -- Brent Graham. http://twitter.com/brentg/status/18444962614 [15:26] lief has joined the channel [15:26] captain_morgan has joined the channel [15:26] mindeavor has joined the channel [15:26] pufuwozu has joined the channel [15:27] lief has left the channel [15:29] maushu: felixge: Realex is €29 per month for 350 transactions and 1000 saved cards. [15:29] bradleymeck_: oi ryah "error: Unable to find 7b72de0719067998ba0c6fd0f8f23f99fd96fae9 under http://github.com/ry/node.git" off of a git pull [15:32] _announcer: Twitter: "immensely psyched for @felixge, who just officially launched his #nodejs upload service, transloadit: http://bit.ly/bAwn0a" -- Jed Schmidt. http://twitter.com/jedschmidt/status/18445532032 [15:32] markwubben has joined the channel [15:32] felixge: maushu: that seems reasonable [15:33] pufuwozu has joined the channel [15:34] felixge: maushu: might need to check them out in the future [15:34] maushu: felixge: I will try to work with them, I will tell you how it goes. [15:34] gb|str has joined the channel [15:35] bradleymeck_: felixge you sneaky sneak love the transloadit biz [15:35] felixge: maushu: good luck, keep me posted [15:35] felixge: bradleymeck_: ? :) [15:35] bradleymeck_: just like the upload service that can do transcoding [15:36] bradleymeck_: can it do hard dubbing and soft dubbing though? [15:37] felixge: bradleymeck_: you mean subtitles? [15:37] bradleymeck_: yub [15:37] bradleymeck_: looks like it would strip em right now [15:38] pufuwozu has joined the channel [15:38] felixge: bradleymeck_: seems like ffmpeg has some support for them: http://www.ffmpeg.org/ffmpeg-doc.html#SEC10 [15:39] felixge: bradleymeck_: http://feedback.transloadit.com/ feel free to suggest this as a feature with some details on how you'd like it to work [15:39] maushu: Yes, ffmpeg has some support. I've played with it some time ago. [15:39] mjijackson has joined the channel [15:39] felixge: btw. sorry @everybody for spamming the channel, I'll try to switch to PMs from now [15:39] tjholowaychuk has joined the channel [15:40] maushu: felixge: If you don't mind telling, how many users did you get until now? [15:41] felixge: maushu: not many : ), but I might post some numbers in the next few days [15:41] felixge: we didn't expect lots of signups, it's not an impulse purchase kind of product [15:42] mape: felixge: Remeber us talking about you having an example on the site? [15:42] mape: To get an idea of how the widgets work/look? [15:42] christkv has joined the channel [15:42] felixge: mape: we'll bring that back, it's one of the things we had to scrap before launching [15:42] felixge: (we used to have a demo) [15:42] mape: Ah ok [15:44] pufuwozu has joined the channel [15:44] maushu: mape: I'm going to do something crazy like that. [15:44] mape: A demo? [15:44] donspaulding has joined the channel [15:45] maushu: Basically, but it will work exactly like the product and not be persistent. [15:45] felixge: mape: where you can upload a file [15:45] maushu: All this in the landing page. [15:45] Rik` has joined the channel [15:45] mape: Weren't you starting a hosting service? [15:45] maushu: Yeap. [15:45] _announcer: Twitter: "non-blocking event-driven node.js http://www.sitepoint.com/blogs/2010/07/13/node-js-is-the-new-black/" -- Takeshi Takatsudo. http://twitter.com/Takazudo/status/18446475720 [15:45] maushu: You need to see it get it. Seriously. I had this idea at night while looking at the ceiling. [15:45] mape: But also video transloading? [15:46] maushu: I was like "woah, that is so insane that it might work". [15:46] mape: *transcoding [15:46] Rik`: anyone know an async module for a simple database ? (sqlite or others) [15:46] maushu: Hmm? No. [15:46] khaavren: can someone take a quick look at this <25 line file and let me know if my node-redis-client usage is at all sane? [15:46] amerine has joined the channel [15:46] khaavren: http://github.com/hoffmanc/quiz/blob/stripedDown/quiz-provider-redis.js [15:46] _announcer: Twitter: "Node.js Is The New Black - http://b2l.me/aabg5H remains JavaScript!" [nl] -- Hein van der Wal. http://twitter.com/heinvanderwal/status/18446541839 [15:46] maushu: Well, the users can do that but better use transloadit. :3 [15:47] maushu: Actually, they would better use transloadit, since it uses ffmpeg, making a trans-coder in JavaScript is still insane enough. [15:48] mape: maushu: So the idea is? [15:48] maushu: mape: Javascript hosting? [15:49] mape: What does that have to do with the demo? [15:49] christkv has joined the channel [15:49] mscdex: Rik`: http://wiki.github.com/ry/node/modules#database [15:50] maushu: mape: Well, basically the user when arrives at the landing page they can insert some code and watch it run. [15:50] mape: Oh k [15:50] mape: Thats the crazy part? :P [15:50] maushu: No, the crazy part is that most of the framework would be implemented. [15:51] Rik`: mscdex: oh thanks [15:51] maushu: Including the http server. [15:51] mape: maushu: Would be handy if I ever need to spam someone or host illegal content [15:51] Epeli has joined the channel [15:51] maushu: mape: True, I'm taking precautions against that. [15:51] micheil: tjholowaychuk: you about? [15:51] bpot has joined the channel [15:51] micheil: tjholowaychuk: I've got a jade question for you. [15:52] khaavren: nevermind, i was not getting a good stack trace from malformed json passed to JSON.parse [15:52] tjholowaychuk: micheil: somewhat yup [15:52] indexzero has joined the channel [15:52] khaavren: what a waste of time [15:52] micheil: tjholowaychuk: why do I need to pass my locals into the jade.render() function [15:52] maushu: Like, no sockets or requests and the server will shutdown when the user leaves or an interval of time has passed. [15:52] micheil: tjholowaychuk: like, with haml.js, I could render to html and then get it to update [15:52] micheil: meaning I could cache the rendered haml [15:52] x_or has joined the channel [15:52] Shorrockin has joined the channel [15:52] tjholowaychuk: micheil: jade caches for you, cache: true [15:53] micheil: okay [15:53] tjholowaychuk: micheil: its not easy to just chuck back a function with jade ATM due to the baked in error reporting in render() [15:53] tjholowaychuk: not that it has to remain that way but thats how it is now [15:53] micheil: okay [15:54] tjholowaychuk: I just want it to be usable standalone as well [15:55] _announcer: Twitter: "Next item to try? node.js for non-blocking web app" -- Nicholas Ilyin. http://twitter.com/nicktacular/status/18447131122 [15:55] _announcer: Twitter: "@revans nah, felix is a node.js hacker, wrote a great multipart form parser http://j.mp/9zJLg2" -- technowürst. http://twitter.com/technoweenie/status/18447138885 [15:55] micheil: tjholowaychuk: currently I had something nice going where I was doing: [15:55] micheil: haml.render(str)(data); [15:55] micheil: which looked awesome [15:55] micheil: but the haml parser was a bugger of a thing [15:56] tjholowaychuk: micheil: I have more options than just locals though, so that only works so well [15:56] tjholowaychuk: there is no reason you cant wrap it in a function though that just accepts locals [15:57] micheil: yeah [15:57] micheil: anyway, now I need to convert this haml to jade [15:57] tjholowaychuk: I do plan on abstracting out render() a bit because it will speed things up, and then that can expand the public api a bit as far as the compiled function goes [15:57] micheil: is there a Jade textmate bundle? [15:57] tjholowaychuk: nope not yet :( [15:57] micheil: :( [15:58] tjholowaychuk: someone was saying the css bundle works ok with the templates lol havent tried it though [15:58] tjholowaychuk: looks like a bitch to make custom syntaxes in TM though [15:58] micheil: btw, html(attr=val, attr=val) right? [15:59] tjholowaychuk: micheil: yup, or html(attr: val) [15:59] micheil: so.. (attr: val, attr: val) [15:59] tjholowaychuk: ya [16:00] micheil: what about for: (data-attr: val) [16:00] pufuwozu has joined the channel [16:00] micheil: does data-attr need quotes? [16:00] kuya: tjholowaychuk: can i ask you about connects session middleware when you have a moment [16:00] tjholowaychuk: micheil: nope, hypens and namespaces should be fine [16:01] _announcer: Twitter: "Node.js is the New Black http://tinyurl.com/27hwevr - Social Media Marketing News, Stun Media" -- stun media. http://twitter.com/stunmedia/status/18447550189 [16:01] tjholowaychuk: micheil: and it supports booleans like this input(type="checkbox", checked) [16:01] micheil: tjholowaychuk: okay.. testing. [16:01] tjholowaychuk: kuya: yup! whats up [16:01] blackbrrr has joined the channel [16:01] kuya: tjholowaychuk: i have this Connect.cookieDecoder(), [16:01] kuya: Connect.session({ store: new MemoryStore({ reapInterval: minute, maxAge: minute * 5 }) }), [16:01] kuya: Connect.cookieDecoder(), [16:01] kuya: Connect.session({ store: new MemoryStore({ reapInterval: minute, maxAge: minute * 5 }) }), [16:02] kuya: sorry [16:02] kuya: anyway those two lines [16:02] tjholowaychuk: looks fine [16:02] kuya: and i do req.session.regenerate(function(err) { req.sesssion.something = true; }) in my login function [16:02] micheil: *hopes for the best* [16:02] kuya: but i can never read that back [16:02] kuya: am i meant to save the session or something? [16:03] o_o has joined the channel [16:03] micheil: woah. [16:03] tjholowaychuk: kuya: req.sesssion? is that straight from your code, if so you have to many s's [16:03] micheil: crashed safari. [16:03] tjholowaychuk: micheil: bahaha shit lol [16:03] Guest70533: yo - anyone update brew since npm's last change? [16:03] kuya: tjholowaychuk: ah no thats not it :) [16:03] micheil: tjholowaychuk: I blame the while(1) loop [16:03] Guest70533: the md5 is out. [16:03] kuya: oh! [16:03] kuya: ACTION thinks he sees.. [16:04] tjholowaychuk: micheil: hehe yeah :) [16:04] micheil: take 2! [16:04] tjholowaychuk: micheil: are you using the SSJS jade? or the one your porting? [16:04] micheil: the port. [16:04] davidwalsh has joined the channel [16:04] micheil: and... crash. [16:04] kuya: tjholowaychuk: sorry - found it - a different typo somewhere [16:05] tjholowaychuk: kuya: ah k fewf :) haha, if your interested I have http://github.com/visionmedia/connect-redis [16:05] micheil: tjholowaychuk: when would this happen? while (this.peek().type !== 'outdent') { [16:05] tjholowaychuk: if you need true persistence, its not uber tested yet though [16:05] kuya: oh nice [16:05] tjholowaychuk: micheil: not sure out of context, probably parseBlock() [16:05] kuya: tjholowaychuk: dont need that yet but ill keep it mind :) [16:06] micheil: no, rather, when would that be true [16:06] mklappstuhl has joined the channel [16:06] tjholowaychuk: when you are nesting more [16:07] _announcer: Twitter: "descriptive clarity! Node.js is the New Black - http://b2l.me/aabg5H" -- Hilary Cheyne. http://twitter.com/hilsatlvsonline/status/18447982016 [16:08] pufuwozu has joined the channel [16:08] _announcer: Twitter: "File upload as a service. FUAAS? built on node.js: http://bit.ly/9iZXWq" -- Paul Dowman. http://twitter.com/pauldowman/status/18448093992 [16:09] micheil: tjholowaychuk: is jade two space indent? [16:09] tjholowaychuk: micheil: yup, I would like to detect / support tabs possibly, but im not a fan of tabs [16:09] tjholowaychuk: or possibly detect the user-defined number of spaces per indent [16:10] micheil: and classnames [16:10] dmcquay has joined the channel [16:10] micheil: ^(\w*).\W [16:12] tjholowaychuk: I wouldnt use \W [16:12] tjholowaychuk: you can have several [16:12] tjholowaychuk: #foo.bar.baz [16:12] tjholowaychuk: .foo#bar.baz.something-else(blah="blah") [16:12] towski: how do I figure out what code an npm package uses [16:12] towski: is oauth-client the same as node-oauth [16:12] micheil: tjholowaychuk: okay.. check this error out.. [16:13] micheil: https://gist.github.com/8b9725b9a9029c372c65 [16:14] micheil: it always dies in the first few lines now [16:14] tjholowaychuk: hmm [16:16] tjholowaychuk: micheil: probably not related but you dont need )/ [16:16] pufuwozu has joined the channel [16:16] micheil: huh? [16:18] bradleymeck_: any one have problems w/ labelled continues/breaks in v8? [16:18] tjholowaychuk: you dont need input()/ for self closing stuff [16:18] tjholowaychuk: I think there is a bug with hypenated attrs though one sec ill check [16:18] tjholowaychuk: ah shit i tihnk i know what it is [16:19] sh1mmer has joined the channel [16:21] micheil: tjholowaychuk: what's the problem? [16:21] aho has joined the channel [16:21] micheil: okay, it bombs at the return fn.call line now [16:22] mscdex: i wonder why sarien.net didn't implement their multiplayer backend using something like node [16:22] tjholowaychuk: micheil: just pushed it, my positive lookahead for parsing the attrs didn't have a hyphen [16:22] micheil: k' [16:22] mscdex: doesn't seem like asp would scale well [16:23] towski: do I have to do something special to require oauth with npm [16:23] tjholowaychuk: micheil: your template works fine for me now though on node [16:23] Ori_P_ has joined the channel [16:23] tjholowaychuk: really needs a pretty print option lol [16:24] micheil: tjholowaychuk: okay, awesome [16:29] bradleymeck_: whats the least resource hungry websocket server do you guys think? [16:29] micheil: fu-yeah! [16:29] micheil: That just worked. [16:29] bradleymeck_: towski how did you install node [16:30] _announcer: Twitter: "internet marketing n 'Node.js is the New Black' - 'SitePoint' Newsletter: Brendon Sinclair has released issue 299 ... http://bit.ly/9ou8D2" -- harveysegal. http://twitter.com/harveysegal/status/18449549327 [16:30] _announcer: Twitter: "'Node.js is the New Black' - 'SitePoint' Newsletter http://bit.ly/9ou8D2 #googlesniper" -- Jamie 'GoogleSniper'. http://twitter.com/GetGoogleSniper/status/18449550698 [16:30] tjholowaychuk: micheil: wahoo! [16:30] tjholowaychuk: let me know if you find bugs or if its solid I can link to your repo for people who want client stuff [16:30] micheil: oh. damn. [16:30] micheil: tjholowaychuk: I used two spaces, you used four [16:30] micheil: >_> [16:31] towski: bradleymeck_: source. make install [16:31] tjholowaychuk: micheil: what do you mean [16:31] tjholowaychuk: i use 2 [16:31] towski: bradleymeck_: fab seems to work when installed as a package [16:31] tjholowaychuk: indents = tok.val.length / 2; [16:31] micheil: tjholowaychuk: no, in jade.js [16:32] _announcer: Twitter: "Node.js is the New Black http://goo.gl/fb/SAbLg social media market" -- stun media. http://twitter.com/stunmedia/status/18449681519 [16:32] towski: but require 'oauth' just bombs [16:32] tjholowaychuk: micheil: ohhh :) haha. yeah.. sencha's rules, so now im just kinda using it all over [16:32] bradleymeck_: then just npm install oauth, then require("oauth/oauth") (oauth really needs to set it's main in package.json) [16:32] tjholowaychuk: I dont mind 4 but its annoying to switch back and forth [16:32] towski: ah ok thanks [16:33] bradleymeck_: dont forget use add .OAuth at the end of that since it is the export of OAuth [16:35] _announcer: Twitter: "Node.js is the New Black http://www.sitepoint.com/newsletter/viewissue.php?id=3&issue=299&format=html#5 #nodejs" -- Esa-Matti Suuronen. http://twitter.com/EsaMattiS/status/18449952546 [16:36] Epeli: oh, shit that was fast [16:36] Epeli: I posted like second a go on twitter [16:37] bradleymeck_: at least we arent !tweet bombing back [16:37] creationix has joined the channel [16:37] _announcer: Twitter: "@tonycarrera sweet, I'll probably write up a blog post after I get it working cross-browser, it's using node.js + socket.io, iphone for gps" -- ben bloch. http://twitter.com/benbinary/status/18450067293 [16:38] qschzt has joined the channel [16:38] siculars has joined the channel [16:42] bradleymeck_: who has got a js Diff algorithm lying about [16:42] creationix: tjholowaychuk: so, how do I use the new session stuff [16:42] creationix: I'm trying to update a connect app that was using memory store [16:43] tjholowaychuk: creationix: http://github.com/visionmedia/connect-redis/blob/master/index.js [16:43] tjholowaychuk: that is about as basic as the implementation can get [16:43] tjholowaychuk: only get / set are required [16:43] creationix: tjholowaychuk: nice [16:43] tjholowaychuk: but set is passed null for destroying sessions, but its more practical to just define #destroy() instead of inherit it and check for null [16:44] MattJ: bradleymeck_: May or may not be what you're looking for, but I've always been curious to play with http://code.google.com/p/google-diff-match-patch/ [16:44] Shorrockin has left the channel [16:45] bradleymeck_: mmm it will work [16:45] bradleymeck_: ty mattj [16:45] benburkert has joined the channel [16:45] admc_ has joined the channel [16:45] admc has joined the channel [16:46] mape: MattJ: that one works fine, I've used it to have document editing on a site and then create a mail for the user containing the patch [16:46] MattJ: mape: Good to know, thanks [16:46] stagas has joined the channel [16:46] MattJ: I've been looking for an excuse to use it for something for a while [16:48] bradleymeck_: google code is soo terrible for docs [16:49] creationix: tjholowaychuk: nice "RedisStore.prototype.get = function (hash, fn) { this.db.get(hash, fn);};" [16:49] creationix: that's my whole get function [16:49] Ori_P has joined the channel [16:50] tjholowaychuk: huh [16:50] tjholowaychuk: oh [16:50] tjholowaychuk: confused me since it still said RedisStore lol [16:51] tjholowaychuk: creationix: its nice on both ends though, easy for us to define these stores, but still some sugar for the developer [16:51] Aria has joined the channel [16:52] tjholowaychuk: better than what I had before in that regard too. now you can just do req.session.destroy() etc instead of req.sessionStore.destroy(req) blah blah [16:52] _announcer: Twitter: "Functional programming got a comeback with node.js. I love asynchronous socket programming! :-) #nodejs #functional #async" -- Bjarke Walling. http://twitter.com/walling/status/18451048808 [16:52] tjholowaychuk: could still use some refactoring but at least the api is defined [16:52] V1 has joined the channel [16:53] creationix: tjholowaychuk: yeah, it seems nice so far [16:53] creationix: this will probably stress test my nStore thing when the site goes live and it's used for the session data [16:54] stepheneb_ has joined the channel [16:54] creationix: tjholowaychuk: does it call set on every request, or only if the session data has changed? [16:54] creationix: (I guess it doesn't matter since the timestamp always changes) [16:54] jedschmidt has joined the channel [16:54] tjholowaychuk: creationix: every request ATM [16:54] felixge has joined the channel [16:55] tjholowaychuk: i think we should add the favicon bouncer back lol its so annoying even in the examples [16:55] sh1mmer has joined the channel [16:56] charlesjolley- has joined the channel [16:57] pufuwozu has joined the channel [16:57] creationix: tjholowaychuk: how is it annoying, it just emits 404 currently right? [16:57] stepheneb__ has joined the channel [16:57] tjholowaychuk: creationix: yeah but it goes through the cookie / sess etc [16:57] tjholowaychuk: so you get a session hit just for the favicon [16:57] tjholowaychuk: unless we manually check for /favicon.ico in our middleware [16:58] mscdex: fork queue takes so long to check for clean commit applying for node [16:58] mscdex: :/ [17:00] creationix: tjholowaychuk: how does this look http://gist.github.com/474165 [17:01] tjholowaychuk: creationix: looks about right to me :) [17:01] creationix: now to see if it works [17:02] mape: doing session storage for all major db modules? [17:02] creationix: tjholowaychuk: so how do I hook this into my app now? [17:02] tjholowaychuk: creationix: connect.session({ store: new nStoreSession }) [17:02] tjholowaychuk: creationix: if you dont have expire support you will want a reaper like I have for the MemoryStore [17:02] tjholowaychuk: or similar [17:04] Guest70533: cool - ryan's giving a talk in sf at 44 montgomory [17:04] mape: The Digg one? [17:04] Guest70533: Redfin's office [17:04] mape: oh k [17:05] Guest70533: My facebook name is Kumplour Smashing Wonderkind - i hope they don't expect my id to match that. [17:05] tjholowaychuk: node is to fast :( I cant see if my progress bar works lol [17:05] mape: Glad to see him talking to companies, even nicer if those companies help with contribs to node [17:05] mape: tjholowaychuk: timeout? ;) [17:05] Guest70533: mape: werd [17:07] tjholowaychuk: yay had to use a huge movie [17:07] _announcer: Twitter: "Finishing my consisted hashing / hashring library for node.js. It's part of the memcached client I'm currently working on. #nodejs" -- Arnout Kazemier. http://twitter.com/3rdEden/status/18452065970 [17:08] _announcer: Twitter: "node.js - Evented I/O http://post.ly/n23u #javascript #python #scalability #tornado" -- shirishgoyal. http://twitter.com/shirishgoyal/status/18452109138 [17:08] qschzt: heh I just did consistent hashing and forked node-memcache today [17:08] V1: lol [17:09] qschzt: V1, did you github something yet? [17:09] creationix: tjholowaychuk: what's your default expire length, and is it configurable? [17:09] micheil: k, tjholowaychuk I've pushed those changes up-stream [17:09] V1: http://github.com/3rd-Eden [17:09] V1: Which node user doesn't have a github account ;) [17:10] DracoBlue has joined the channel [17:10] _announcer: Twitter: "http://bit.ly/c3ZfhD - Node.js. Javascript Server." -- Matt Slavin. http://twitter.com/mattslav/status/18452254680 [17:10] rauchg_ has joined the channel [17:10] tjholowaychuk: creationix: default maxAge I have at 4 hours right now, totally arbitrary, should probably be lower [17:11] sechrist has joined the channel [17:11] creationix: tjholowaychuk: it's working btw, I have persistent sessions now! [17:11] tjholowaychuk: creationix: but when you do Store.call(this, options) you can change maxAge within your constructor or just allow it as an option and utilize it that way [17:11] tjholowaychuk: wahoo! [17:11] mape: is nStore persistant now? caches to disk? [17:11] creationix: mape: nStore it very persisent [17:11] creationix: it ALWAYS reads from disk [17:11] V1: qschzt: I haven't pushed my hashring to my memcached project yet, but I'll give you a poke when it's up [17:11] tjholowaychuk: mape: I added a redis session store too [17:11] V1: Needs a bit more cleaning ;$ [17:12] mape: oh? doesnt it cache them in memory? [17:12] qschzt: V1, cool! [17:12] creationix: mape: the index is in memory, but all the actual data is on disk [17:12] brianmario has joined the channel [17:12] creationix: the OS does the caching for you [17:12] mape: tjholowaychuk: mongo and memcache to come? :) [17:12] tjholowaychuk: mape: worken on it [17:12] mape: creationix: ah k [17:13] tjholowaychuk: trying to get methodOverride to support connect-form without blocking [17:13] creationix: tjholowaychuk: so if I set maxAge, will it call destroy for me after an interval? [17:13] zum has joined the channel [17:14] qschzt: V1, shall I watch your node-memcached? [17:14] tjholowaychuk: creationix: not the abstract Store nope, but look at the MemoryStore implementation and just copy that [17:14] tjholowaychuk: you could maybe even just subclass MemoryStore in that case, kinda awkward though [17:14] creationix: tjholowaychuk: ok, I'll look at Memory Store [17:15] V1: qschzt: I don't know what your needs are for memcached but feel free to contribute. I basically want to have multi server support + implement most of the supported features of memcached (multi get/set etc ), not just the basics. [17:15] V1: But feel free to contribute ;) [17:16] qschzt: V1, I just need the basics for now and consistent hashing, for now my _very_ simple ch + node-memcache works. But I'll definitely take a look :) [17:16] CIA-76: node: 03Ryan Dahl 07master * r6bf294d 10/ src/node.js : JSON is %j not %f - http://bit.ly/bXYZq4 [17:16] mape: creationix: what kinda performance does nStore have, vs redis/mongo/memcache? [17:16] creationix: mape: so far it seems quite fast [17:17] Astro has joined the channel [17:17] mape: and all in js so no dependencies [17:17] creationix: mape: I haven't done any real benchmarks, but simple ones give nice numbers [17:17] creationix: yes, all js [17:17] mape: k [17:17] creationix: no fancy querying or btrees though [17:17] creationix: it's really simple [17:17] Astro: hello creationix [17:17] creationix: Astro: hello [17:18] Astro: creationix: http://github.com/astro/Connect/commits/master [17:18] mape: just straight up key/value? [17:19] creationix: mape: yes, plus streams and a single callback for everything [17:19] mape: ok [17:19] tjholowaychuk: Astro / creationix: can we allow patches yet? or do we need the CLA [17:19] creationix: tjholowaychuk: sadly we need Sencha labs set up first [17:19] creationix: Astro: great work though [17:19] tjholowaychuk: creationix: also I think daemonization is a no go, so anything left unimplemented like the setuid() etc we can add in but no -D, --daemonize :( [17:20] Astro: I'm having more in my mind... [17:20] Astro: and I'm ok with MIT [17:20] creationix: Astro: since connect is sponsored by Sencha inc (AKA ext.js) we can't accept patches till the CLA is set up [17:20] qFox has joined the channel [17:20] creationix: but you're of course welcome to keep your own branch till then [17:20] creationix: it is MIT after all [17:21] Rik` has joined the channel [17:21] pufuwozu has joined the channel [17:21] Astro: doh [17:22] liucougar has joined the channel [17:22] Astro: that means I've got to push astro-connect to npm in the meanwhile :/ [17:22] creationix: Astro: hmm [17:23] ryah: legal reality lands in the node community [17:23] ryah: :( [17:23] creationix: ryah: you started it :P [17:23] mape: hehe [17:23] ryah: creationix: no, i didn't :) [17:23] creationix: ryah: it's fine, it's a good think in the long run considering the world we live in [17:24] ryah: github should just get CLAs built in [17:24] ryah: really necessary for MIT projects [17:24] creationix: ryah: that would be nice [17:24] creationix: if I ever run out of projects to work on, I'll make a github in node [17:24] mscdex: gitnode [17:24] mscdex: ! [17:24] mscdex: nodehub? [17:24] mape: ryah: considering you are talking to digg, do you think there are chances digg will invest in node and contribute to the community? [17:24] mscdex: :-D [17:24] ajpiano has joined the channel [17:25] mklappst1hl has joined the channel [17:25] creationix: Astro: I'm asking people now, we might be able to accept the patches for now and then straighten it out once the CLA is in place [17:25] mape: or talking at, rather [17:26] Astro: why are MIT licenses requiring CLAs? [17:27] mape: if they in the future want to change license I guess? [17:27] tjholowaychuk: creationix: looks like setuid() etc are not in bin/connect anymore since I tore out --daemonize we should get those back in too [17:27] gb|work has joined the channel [17:28] creationix: tjholowaychuk: I do want setuid() and setguid() [17:28] creationix: Astro: well for sencha's case it's just to make enterprises more comfortable to use stuff based on connect [17:29] ryah: Astro: to make explicit the terms of the contribution [17:29] ryah: in GPL projects it's clear [17:29] _announcer: Twitter: "Have you got some useful links to learn Node.js? Thanks!" -- Camille Roux. http://twitter.com/camilleroux/status/18453477128 [17:29] creationix: yeah, MIT is pretty weak legally speaking [17:29] pufuwozu has joined the channel [17:29] Astro: thanks for the explanation [17:29] creationix: but I think that's why it's so popular among people who don't care about legal stuff [17:29] WALoeIII has joined the channel [17:29] mape: then can't they just dual license it? [17:30] gb|work: creationix/tjholowaychuk: are host, and port in process.connectEnv get read automagically? we couldn't get it to work. the port would get set by default to 3000, and the server is not set to localhost [17:30] Ori_P has joined the channel [17:30] ryah: Astro: so basically to say 1) you are legally able to contribute the code (you're not stealing it) 2) you allow the project maintainer to do whatever they want with it royalty free [17:30] ryah: 2) basically = you assert your code is MIT licensed [17:30] tjholowaychuk: gb|work: there are a few bugs / unimplemented features in there [17:30] ryah: 1) doesn't prevent you from actually contributing stolen code - but hopefully makes yout hink twice about it [17:31] gb|work: :) [17:32] ryah: Astro: :) [17:32] Kiba: client side code doesn't like the exports method [17:32] Kiba: how to fix? [17:32] tjholowaychuk: Astro: connect is just a middleware framework [17:33] ryah: Astro: V8, for example, is BSD licensed - but Google forces you to sign http://code.google.com/legal/individual-cla-v1.0.html before contributing [17:33] creationix: tjholowaychuk: I'm finishing nStore as a session store for my demo app, then I'm finishing the reference implementation for a grain template library, then I'm back on getting connect released [17:33] Kiba: http://gist.github.com/474212 [17:34] Astro: oh wait, I need to wander to the physical post office and use snail mail just to contribute to open source? [17:34] Kiba: my canvas HTML5 game client does not like exports [17:34] Kiba: but my server needs it [17:34] Kiba: how to fix? [17:34] tjholowaychuk: creationix: k cool, im getting connect-form to play nice with methodOverride, express stuff, and hopefully get some of those bin/connect things implemented [17:34] ryah: Astro: usually electronic signatures are acceptable [17:34] Astro: cool [17:34] Astro: ~ [17:35] gb|work: : awesome, thanks for great work [17:35] Kiba: my client is doing some calculation similiar to what the server is doing [17:35] dgathright has joined the channel [17:35] mjijackson has joined the channel [17:35] sh1mmer has joined the channel [17:35] softdrink has joined the channel [17:35] creationix: gb|work: thanks for using it [17:35] ryah: this is the whole point of apache.org btw [17:35] Kiba: to compensate for the lateness of network [17:35] stepheneb has joined the channel [17:35] Kiba: but [17:36] Kiba: it share the same code..so I decided to make them share rather than duplicate/waste time [17:36] ryah: to somehow give some legal backing to projects - they're a bit insane about it though [17:36] Kiba: but client code doesn't like exports method [17:36] Kiba: how to fix? [17:38] paul__ has joined the channel [17:38] Kiba: hello? [17:38] mape: Kiba: echo [17:38] Kiba: echo? [17:39] mape: yeah seems like there is something wrong with your irc client, it echoes [17:39] Kiba: it's not echoing? [17:39] mape: for sure it is [17:40] Kiba: right now? [17:40] kennethlove has joined the channel [17:40] mape: not just now [17:40] kennethlove has left the channel [17:40] Kiba: mape: probably repeating my question [17:40] mape: yeah, probly [17:40] Kiba: so..can anybody help me? [17:41] mape: just check if exports exists and if it doesn't dont use it? [17:41] dgathright has joined the channel [17:41] Kiba: exports do not exist in client side javascript [17:41] gb|work: : yes, it worked via CLI, but not when i populate connectEnv var [18:07] gb|work: : going in the meeting [18:07] creationix: gb|work: ahh, that I haven't tested, thanks [18:07] jesusabdullah: Anyone mind answering a total noob question for me? [18:07] jesusabdullah: How do I get a value out of a callback? [18:07] jesusabdullah: :S [18:08] creationix: jesusabdullah: what do you mean? [18:08] creationix: it's the second parameter usually [18:08] creationix: callback(err, data) [18:08] jesusabdullah: Here, let me post a gist [18:08] jesusabdullah: and then I can point to things [18:09] TommyM1 has joined the channel [18:09] _announcer: Twitter: "Interesting read on Javascript on the server side - Node.js is the new black http://is.gd/dqDSX" -- My Nokia World. http://twitter.com/mynokiaworld/status/18455984834 [18:09] jesusabdullah: oh, maybe I could just put what I actually want to do inside the callback >_< duh? [18:10] tjholowaychuk: gb|work, creationix: both work for me http://gist.github.com/474268 and via the commandline as well of course [18:10] creationix: interesting [18:10] tjholowaychuk: gb|work: ./config.js is detected and loaded automatically or you can use --config to supply a path [18:11] pufuwozu has joined the channel [18:11] jesusabdullah: creationix: http://gist.github.com/474272 [18:11] jesusabdullah: That's kinda what I mean [18:11] benburke_ has joined the channel [18:11] jesusabdullah: Be gentle. I'm really new to javascript [18:12] creationix: jesusabdullah: which line is in question? [18:12] jesusabdullah: The third var [18:12] jesusabdullah: var oldCommitId [18:12] jesusabdullah: which, as I commented, obviously doesn't work [18:12] jesusabdullah: Of course, it took me a while to realize that ;) [18:12] donspaulding1 has left the channel [18:14] jesusabdullah: ACTION needs to clear his head's cobwebs :S [18:17] paul__ has joined the channel [18:17] joshbuddy has joined the channel [18:19] jesusabdullah: ! cool! That might've worked! [18:19] kriszyp_ has joined the channel [18:19] jxson has joined the channel [18:20] aconran has joined the channel [18:22] tjholowaychuk has left the channel [18:23] tilgovi has joined the channel [18:27] _announcer: Twitter: "After one night of node.js framework http://is.gd/dqETW research I have to say Geddy http://geddyjs.org by @mde feels super good." -- Sebastian Senf. http://twitter.com/mustardamus/status/18457084101 [18:30] pufuwozu has joined the channel [18:32] sh1m has joined the channel [18:35] augustl has joined the channel [18:35] augustl: does node have file globbing of any kind? I.e. get a list of files by doing fs.something("**/*_test.js") [18:37] riottaba has joined the channel [18:37] _announcer: Twitter: "ServerSide JavaScript with MooTools and NodeJS http://goo.gl/fb/Tv2FW" -- WEB+ME. http://twitter.com/webplusME/status/18457642701 [18:38] meder has joined the channel [18:39] mscdex: augustl: i don't believe so [18:41] _announcer: Twitter: "Taking node.js for a spin on @heroku. Loving their PAAS" -- Cody Swann. http://twitter.com/cody_swann/status/18457871631 [18:41] ryah: Object.freeze [18:42] ryah: :D [18:42] bradleymeck_: can i get if an object is frozen from c++ yet? [18:43] mscdex: ryah: latest V8 has that? [18:43] mscdex: in the js layer? [18:43] ryah: mscdex: yes [18:43] mscdex: awesome! [18:44] ryah: bradleymeck_: i don't think so [18:44] mischief has joined the channel [18:44] bradleymeck_: darn property descriptors in v8 need a c++ api, tis the disadvantage of the ecma5 stuff being impl w/ js macros [18:44] mischief has joined the channel [18:45] mischievious has joined the channel [18:45] mscdex: grappler is 75% finished! \o/ [18:45] ryah: bradleymeck_: you can always call the js stuff from v8 [18:45] bradleymeck_: they are hidden in a closure [18:45] ryah: bradleymeck_: also - might be evidence that you need a wrapper layer [18:45] bradleymeck_: so i dont want the perf hit [18:46] pufuwozu has joined the channel [18:46] bradleymeck_: plus when setters are applied in c++ they vanish from Object.defineProperty [18:46] ryah: *shrug* perf hit is debatable [18:46] ryah: v8 is pretty fast. [18:46] bradleymeck_: true but still a problem w/ setters/getters in c++ [18:47] bradleymeck_: can double wrap to emulate what i want but id rather put in a ticket and bother the v8 ppl [18:51] bradleymeck_: plus it is a bit odd that you cant see the propertyDescriptor from c++ anyway when you can set them blindly [18:53] augustl: I have a list of file names. I want to require them. But I can't since they're file names ending in .js. What shold I do? [18:54] augustl: `file.substr(0, file.length-3);`feels kind of lame.. [18:56] ryah: augustl: i think you can require the filename, that works too [18:57] bradleymeck_: ryah it used to complain about .js at the end [18:57] augustl: ryah: in 0.1.99 I get throw new Error("No longer accepting filename extension in module names"); [18:57] augustl: oh, I'll upgrade then [18:57] ryah: oh [18:57] ryah: augustl: nm then [18:58] mischievious has joined the channel [18:58] admc has joined the channel [18:58] admc_ has joined the channel [18:59] mischievious has joined the channel [18:59] augustl: oh hey, node.js uses both my cores when compiling [18:59] augustl: for some reason most compiles only use one core [19:00] augustl: 0.1.100 still throws that same error [19:00] augustl: so there's no way to require/load files by file name? [19:01] bradleymeck_: just strip off the .js, its the easiest way instead of reimpl require [19:02] bradleymeck_: arr.forEach(function(file){x=require(file.slice(0,-3))}) [19:02] bradleymeck_: where x is what you want [19:03] creationix: nStore + connect sessions http://github.com/creationix/nstore-session [19:03] creationix: Astro: mape ^ [19:05] romainhuet has joined the channel [19:06] rolfb has joined the channel [19:06] _announcer: Twitter: "Pushed ipfavela to Github. It's a tiny port forwarder daemon using node.js. http://github.com/jdrowell/ipfavela" -- John D. Rowell. http://twitter.com/jdrowell/status/18459373931 [19:07] _announcer: Twitter: "Github's new download server uses node.js: http://github.com/blog/678-meet-nodeload-the-new-download-server" -- Matthew Shanley. http://twitter.com/arkadyan/status/18459407401 [19:08] brandon_beacher has joined the channel [19:09] augustl: is there anything in node to print to stdout with colors? [19:09] zapnap has joined the channel [19:09] nuba has joined the channel [19:10] jesusabdullah: augustl: Maybe http://github.com/Marak/colors.js ? [19:10] creationix: augustl: nothing built-in, but it's not hard to do [19:10] creationix: Marak's lib works [19:10] creationix: I've seen others [19:10] augustl: ah, that was pretty easy :) [19:10] jesusabdullah: heh [19:12] Astro: creationix: what about mape? [19:13] creationix: Astro: that was a link for you and mape [19:13] creationix: http://github.com/creationix/nstore-session [19:13] Astro: hah [19:13] Astro: I wanted to write one for redis [19:13] creationix: http://github.com/visionmedia/connect-redis [19:13] Astro: exploiting redis' expire feature... [19:13] creationix: :) [19:13] creationix: good idea [19:13] creationix: the nStore exploits the onCompact filter feature [19:14] Astro: ha, connect-redis already does that, perfect! [19:14] creationix: since nStore is append-only, deletes actually bloat the db, so I only prune on compaction [19:14] Astro: now if we could have a redis library that supports MULTI/EXEC... :) [19:14] creationix: yeah, that would be nice [19:14] _announcer: Twitter: "@cfyves node.js is pretty cool. Lift also looks quite interesting http://liftweb.net/" -- Alexander O'Neill. http://twitter.com/alxp/status/18459841291 [19:15] Astro: this function throwing guy bragged with that feature, but his code is not yet polished & public [19:15] creationix: publishing something is harder than writing it in the first place I think [19:16] derferman has joined the channel [19:16] blaines: http://chatlet.heroku.com/ [19:16] blaines: try it, I dare you [19:21] TS__ has joined the channel [19:23] jsilver has joined the channel [19:24] jsilver: yo guys [19:25] blaines: hey js [19:25] jsilver: :) [19:25] blaines: you're missing the action at http://chatlet.heroku.com/ [19:25] jsilver: kk [19:26] stagas has joined the channel [19:26] mjr_: hot, hot, web chat action. [19:27] jesusabdullah: blaines is totally whipping off his shirt [19:27] blaines: hahaha [19:27] blaines: 6 pack!~ [19:27] bradleymeck_: ok, trying to mix websockets and connect... [19:28] blaines: haha someone's on facebook with the chat [19:28] figital has joined the channel [19:28] Avius has joined the channel [19:30] micheil: bradleymeck_: try node-websocket-server then [19:30] micheil: bradleymeck_: I added a feature to be able to take a http.Server instance in as the last argument [19:30] bradleymeck_: ooo [19:30] micheil: worked with a previous version of connect, not sure about the latest [19:31] bradleymeck_: so it can work on the server but it eats up all the requests? [19:31] micheil: all the upgrade requests [19:31] _announcer: Twitter: "Node.js is the new black. http://1l.to/sa1 - why you should pay attention to words like non-blocking and event-driven" -- handrus. http://twitter.com/handrus/status/18460835952 [19:32] tjholowaychuk has joined the channel [19:32] bradleymeck_: ah, just kinda wondering how to upgrade based upon a route, but that might be impossible [19:34] _announcer: Twitter: ". Http://goo.gl/fb/Nvrsm node # j # javascript # # # http # programming framework webdev web server # # # # development nodejs" [de] -- Delicious Over 50. http://twitter.com/readelicious/status/18460973165 [19:36] Sou|cutter has joined the channel [19:36] _announcer: Twitter: "Good short article explaining what #node.js is http://bit.ly/ddPFWo" -- Tim Caswell. http://twitter.com/creationix/status/18461126526 [19:36] _announcer: Twitter: "A simple blog engine in less than 200 lines of code using #NodeJs and #PersistenceJs http://bit.ly/aWUcD2" -- Zef Hemel. http://twitter.com/zef/status/18461132854 [19:39] micheil: bradleymeck_: currently hard, in the future it will be much easier [19:39] bradleymeck_: cool cool, will just use a diff port for now then [19:42] BrianTheCoder has joined the channel [19:44] micheil: uhh.. [19:44] micheil: no, you can use same port [19:45] mscdex: grappler == 90% done :-D [19:46] micheil: bradleymeck_: so, currently, you can share the same http.Server as connect [19:46] micheil: however, the websocket-server api is very low level, like, http.Server low level [19:46] micheil: so, that means there's no routing api or anything like that. [19:47] micheil: but when I work in the new plugin architecture I've got planned, then there'll be a routing plugin [19:47] micheil: which will allow you to match routes similar to Sammy.js routes [19:48] micheil: so, like, ws.Server().route("/chat/:room", function(event, data){}) [19:48] micheil: or something [19:49] micheil: I haven't worked out the full api and stuff yet, but that's what I have in mind [19:49] micheil: server.route("/chat/:room", function(event, route, data){}) [19:49] bradleymeck_: sounds good, just thought w/ methodOverride turned on for connect it would eat up the upgrades [19:50] micheil: where route will be :room, event will be either "connection", "data", "close" [19:50] micheil: currently if you do: [19:50] cadorn has joined the channel [19:51] micheil: connect.createServer(...); [19:51] micheil: then you can actually later do: [19:51] micheil: ws.createServer(..., connectServer) [19:53] sveimac has joined the channel [19:53] bradleymeck_: mmm nice [19:57] jsilver: try this out for me guys [19:57] jsilver: http://jsilver.github.com/js2cs/example.html [19:57] _announcer: Twitter: "@webmonkey If you want to really speed up your SS JS, check out node.js. Simple, lean, and uses the latest V8 from Google." -- Matt Ranney. http://twitter.com/mranney/status/18462305968 [19:58] micheil: bradleymeck_: example: http://gist.github.com/474414 [19:58] rauchg_: creationix: i'm drinking the connect koolaid [19:58] jsilver: hmm [19:58] jsilver: works locally [19:58] rauchg_: http://cl.ly/1e2Z [19:58] creationix: rauchg_: awesome! [19:59] maushu: ACTION looks at his koolaid. [19:59] maushu: It doesn't have connect. ._. [19:59] creationix: rauchg_: I want one! [19:59] rauchg_: it tastes gross, but i think it's the only vitamin wter with caffeine [20:00] micheil: ACTION wonders if rauchg_ has heard of coffee :P [20:00] micheil: jsilver: nothing. [20:00] micheil: but lovely errors: http://gist.github.com/474418 [20:02] benburkert has joined the channel [20:02] _announcer: Twitter: "Proof of Concept: node-websocket-server piggybacking a Connect server: http://gist.github.com/474414 #nodejs" -- Micheil Smith. http://twitter.com/miksago/status/18462633053 [20:03] _announcer: Twitter: "MySQL support in # # PersistenceJs NodeJs by: http://tinyurl.com/38xyzfl" [de] -- Michael Walser. http://twitter.com/jabiko/status/18462655615 [20:03] mistere357 has joined the channel [20:04] creationix: ok, back to finishing grain so I can package connect [20:04] micheil: grain? [20:05] tjholowaychuk: package connect? [20:05] aglemann has joined the channel [20:05] aglemann has left the channel [20:05] mistere357: Hello. New to node.js - new like: "just found it TODAY" new. This is amazing. [20:06] jsilver: micheil: hm [20:06] creationix: tjholowaychuk: just polish it and get it ready for a bigger announcement [20:06] jsilver: u playin with it? [20:06] creationix: tjholowaychuk: maybe 1.0.0 [20:06] tjholowaychuk: creationix: ah. what does grain have to do with that [20:06] creationix: tjholowaychuk: nothing, just something on my todo list [20:06] tjholowaychuk: gotcha [20:06] creationix: I can't concentrate with 15 different projects going on at once [20:07] tjholowaychuk: haha ya i hear you. Ill try and get my abstract key val stuff done before our announcement as well [20:09] _announcer: Twitter: "In my opinion, anyone writing JS that requires Rhino should stop. Node is much, much more preferred. (at least include an adapter for node)." -- M@ McCray. http://twitter.com/darthapo/status/18463016350 [20:09] jsilver: micheil: are you running at the commandline [20:09] micheil: running what? [20:09] jsilver: js2cs [20:09] micheil: no [20:09] jsilver: or did you use the example [20:09] jsilver: oh [20:09] micheil: in the browser [20:09] jsilver: that syntax error it logged [20:10] jsilver: happens in the parser [20:10] jsilver: it's very picky [20:10] jsilver: it's strict [20:10] micheil: k, well, I'm done for today with wrangling parsers, aren't I tjholowaychuk? [20:10] jsilver: heh [20:10] jsilver: :P [20:10] tjholowaychuk: micheil: hahah :) [20:10] jsilver: i wish the parser wasn;t so picky [20:10] micheil: tjholowaychuk: I got it working marvellously though [20:11] tjholowaychuk: micheil: nice! should I link over to it for people who want it client side? [20:11] micheil: it was one of those things I wanted to try out [20:11] micheil: sure [20:11] micheil: but it has no / limited filter support [20:11] micheil: personally I wouldn't be against you adding a filter plugin api, and then just letting people define their own filters [20:12] tjholowaychuk: micheil: meh thats fine. people can add them via exports.filters [20:12] micheil: because, yeah, I'm not going to make people need to require markdown, sass, and less just to use it [20:12] micheil: tjholowaychuk: browser's don't have exports.filters [20:12] tjholowaychuk: micheil: no i know lol. whats your github username? [20:12] micheil: miksago [20:12] micheil: it's the browser branch [20:13] _announcer: Twitter: "Easy data storage / session handling in # # NodeJs by PersistenceJs with MySQL backend: http://tinyurl.com/38xyzfl" [de] -- Michael Walser. http://twitter.com/jabiko/status/18463253661 [20:13] tjholowaychuk: k cool ill link to it [20:14] micheil: ACTION is chillin' listening to music and looking at nStore & similar projects [20:14] micheil: even though it's 6:15am, and I haven't had any sleep. [20:14] tjholowaychuk: shit lol its 1:15pm here [20:15] _announcer: Twitter: "jade support for the browser http://bit.ly/adpHmP http://jade-lang.com #nodejs" -- TJ Holowaychuk. http://twitter.com/tjholowaychuk/status/18463337341 [20:15] micheil: creationix: re. nStore: benchmark me! [20:15] micheil: tjholowaychuk: now you can make that textbox on the website a live edit form :P [20:15] creationix: micheil: do it [20:15] tjholowaychuk: micheil: oh ya! good call lol [20:16] micheil: creationix: I want to know what's faster, my linked list or your nStore [20:16] creationix: micheil: sounds like fun [20:16] rgl has joined the channel [20:16] polyrhythmic has joined the channel [20:16] mistere357 has left the channel [20:16] creationix: micheil: does the linked list store the data in ram or disk? [20:16] huyhong has joined the channel [20:16] micheil: just in RAM [20:17] micheil: it's all it needs to. [20:17] creationix: I'll bet mine is faster for some cases, and yours will be faster for others [20:17] creationix: more yours since I hit the disk for EVERY read and write [20:18] micheil: creationix: storage type? linked list, b+tree, b-tree, etc? [20:19] creationix: micheil: my index is a plain js Object keyed by document key [20:19] sh1mmer has joined the channel [20:19] micheil: ah [20:19] creationix: so whatever v8 uses internally for object hashes [20:19] micheil: yeah, I'm using a linked list [20:19] micheil: I'm thinking a b+tree would be interesting to try, although, I don't know enough about them [20:20] maushu: Oh my god. [20:20] maushu: I just found transformice. It's so freaking funny. [20:20] maushu: http://www.youtube.com/watch?v=GJReZRji7tg [20:21] micheil: creationix: also, the reason for linked list is because delete in objects can do funky stuff [20:21] jsilver: actually [20:21] hassox has joined the channel [20:21] jsilver: my converter seems to work kinda well [20:21] jsilver: it can't do jQuery [20:21] creationix: micheil: yeah, I head delete is bad on V8 [20:21] micheil: creationix: so what do you do? [20:22] huyhong has joined the channel [20:23] _announcer: Twitter: "Seriously, if NodeJS/Ruby fibers seem neat to you, head over to http://bit.ly/dCqcnQ to get your mind blown." -- annie. http://twitter.com/annieholden1/status/18463818924 [20:24] huyhong has joined the channel [20:27] jsilver: it's live now [20:27] jsilver: http://jsilver.github.com/js2cs/example.html [20:27] jsilver: it compiles (makes) your coffee as you type [20:27] jsilver: comes with test.js [20:27] bradleymeck_: i hate threads now that i can use mutexless code [20:28] creationix: micheil: what do you mean? [20:28] micheil: creationix: well, were you still using delete or something else? [20:28] programble has joined the channel [20:28] creationix: micheil: yeah, I delete the key [20:28] micheil: fair enough [20:28] creationix: nStore is the simplest case possible, then after benchmarking and finding the pain points will I optimize [20:28] micheil: do you notice any mem leaking or anything like that? [20:28] micheil: ah, okay [20:29] creationix: micheil: no, but I haven't run it very heavy [20:29] micheil: fair enough [20:29] creationix: doing plain 1000000 inserts kept memory pretty level [20:29] creationix: and about 100k/sec I seem to remember [20:29] bradleymeck_: require('connect/middleware/session/memory') fails off an npm install? [20:29] creationix: bradleymeck_: it was changed recently [20:30] creationix: it failed for me too, that's why I made a nStore based one instead [20:30] creationix: ;) [20:30] bradleymeck_: so no memory store for now? [20:30] tjholowaychuk: bradleymeck_: works for me [20:30] tjholowaychuk: I juuuust tried it [20:31] bradleymeck_: mmm must be something ive done when messing w/ npm then, thought i didnt touch installing though [20:31] _announcer: Twitter: "Go try my JavaScript to CoffeeScript converter that I wrote over at http://jsilver.github.com/js2cs/example.html #node.js #coffeescript" -- jsilverman. http://twitter.com/jsilverman/status/18464245421 [20:31] creationix: tjholowaychuk: It broke for me when just doing a git pull [20:31] creationix: I don't remember the error though, I just used nStore instead [20:31] tjholowaychuk: creationix: what did? MemoryStore? or the require [20:31] mikeal has joined the channel [20:31] creationix: I think the require on memory store [20:31] tjholowaychuk: hm yeah I can confirm that it works [20:32] tjholowaychuk: weird [20:32] khug has joined the channel [20:32] tjholowaychuk: bradleymeck_: what npm --version? [20:32] tjholowaychuk: im on 0.1.19 [20:32] jsilver has joined the channel [20:32] bradleymeck_: custom, im on 0.1.19 + personal edits [20:32] nj_dancer has joined the channel [20:33] tjholowaychuk: hm [20:33] jsilver: yay [20:33] jsilver: my converter works pretty well [20:33] tjholowaychuk: bradleymeck_: ls ~/.node_libraries/connect [20:33] tjholowaychuk: is middleware there [20:35] bradleymeck_: ah, i see, the update script silently failed due to my use of sh... TT [20:36] bradleymeck_: anyone else unable to git pull on node? [20:36] charlenopires has joined the channel [20:38] mitkok has joined the channel [20:39] markwubben has joined the channel [20:40] kersny has joined the channel [20:41] jesusabdullah: jsilver: What does it do? [20:41] jsilver: it converts JavaScript to CoffeeScript [20:41] jsilver: by using a recursive AST walking function [20:41] jesusabdullah: orly? That's cool! [20:41] jesusabdullah: Huh! [20:41] jsilver: ty :) [20:41] jesusabdullah: I wasn't even sure that was possible [20:41] jsilver: it is [20:41] jsilver: :D [20:41] jesusabdullah: I mean, because coffeescript uses a subset of js right? [20:41] jsilver: it is now [20:41] jsilver: sorta [20:41] jesusabdullah: Sweet >:) [20:42] jesusabdullah: I kinda wanna work with coffeescript [20:42] jsilver: CoffeeScript uses a JISON grammar that's written in Coffee [20:42] _announcer: Twitter: "nStore - easy database written for node.js in node.js - Ever wanted to fire up a quick node.js app, but... http://tumblr.com/xqidcyri1" -- The Changelog. http://twitter.com/changelogshow/status/18464863189 [20:42] jsilver: apparently [20:42] jesusabdullah: but I'm learning javascript first! [20:42] jsilver: :) [20:42] jsilver: yeah [20:42] jsilver: this can help you [20:42] jsilver: i did a lot of the hard work [20:42] jesusabdullah: \o/ [20:42] jsilver: it's also for people that just wanna easily convert .js to .coffee [20:42] micheil: creationix: nStore [20:43] jsilver: it might become a real project [20:43] micheil: 's been changelogd [20:43] creationix: micheil: I know ;) [20:43] micheil: creationix: I know why you know. so that's just creepy. [20:43] creationix: micheil: hey, I check with wynn first at least [20:44] micheil: creationix: I was speaking to wynn at the time. [20:44] creationix: yep, I know that too [20:44] programble has joined the channel [20:44] creationix: isn't the internet neat [20:44] micheil: heh heh [20:45] nj_dancer has joined the channel [20:45] mikeal: creationix: nStore is getting some buzz today [20:45] mikeal: that's awesome [20:45] creationix: mikeal: yeah, thanks for helping design it [20:45] mikeal: no problem [20:45] mikeal: i'd still like it to change a bit [20:45] creationix: I added one small feature today, but otherwise it's been working for me pretty well [20:45] mikeal: basically, to support a Buffer as a value [20:45] creationix: mikeal: yeah, that would be rad [20:46] creationix: mikeal: also maybe msgpack instead of json [20:46] mikeal: yeah, it just requires changing the file format [20:46] creationix: maybe the backend could be pluginable? [20:46] mikeal: which means changing the parser [20:46] mikeal: creationix: i don't think that's necessary [20:46] creationix: you're right, keep it simple [20:46] micheil: creationix: how about bson? [20:46] mikeal: like, solidify your file format, get it solid, flexible, durable [20:46] mikeal: then if you want to push to a different backend just do replication [20:47] mikeal: you already have a changes listener API [20:47] mikeal: realtime replication isn't hard to stick on top of it [20:47] creationix: ohh, _changes would be nice [20:47] mikeal: don't you have a database onChange listener already? [20:47] creationix: mikeal: nope [20:48] mikeal: should be super simple [20:48] paul__ has joined the channel [20:48] creationix: mikeal: wouldn't be hard to add at all though [20:48] mikeal: just wedge it in right before or after you fire the write callback [20:48] _announcer: Twitter: "A new entry: "We JavaScript own web server": http://www.coderizer.ee/2010/07/javascript-veebiserver-nodejs/" [et] -- Alan Ibrus. http://twitter.com/alanibrus/status/18465210885 [20:48] creationix: and making it network aware with a couch-like REST api should be easy too [20:48] mikeal: everything async is so nice :) [20:48] creationix: but why go that far [20:48] mikeal: creationix: i would just leave that alone for now, let people build their own API on top of it [20:48] creationix: well, yeah on top of it, not built in [20:48] bradleymeck_: ryah you around? [20:49] mikeal: right [20:49] creationix: mikeal: I don't ever want networking built-in [20:49] mikeal: and doing a _changes feed over HTTP would be super simple with an onChange listener [20:49] mikeal: creationix: that's a good idea [20:49] jsilver: hey guys [20:49] jsilver: wanna know something interesting [20:49] bradleymeck_: ? [20:49] jsilver: i think i'm gonna try to make my parser asynchronous [20:49] jsilver: lol [20:49] mikeal: you might want to call out "key/value store" a little more prominently [20:49] jsilver: and have a node server that translates JS for you [20:50] jsilver: good idea? [20:50] jsilver: ehhh? [20:50] mikeal: or else you're going to get flooded with feature requests for crazy indexing :) [20:50] jsilver: ehhhhh? [20:50] creationix: mikeal: think so? [20:50] mikeal: oh yeah [20:50] bradleymeck_: dont think pegjs lets you parse chunks, does it? [20:50] jsilver: no [20:51] jsilver: well [20:51] jsilver: hmm [20:51] jsilver: good point [20:51] bradleymeck_: as a side note the node git repo is borked [20:51] jsilver: can't i chain the callbacks and wait? [20:51] tjholowaychuk: #del() or #destroy() ? preferences? [20:51] creationix: tjholowaychuk: for what? [20:51] bradleymeck_: chain them off of what, not sure i understand the idea? [20:52] bradleymeck_: destroy, i personally avoid contractions [20:52] tjholowaychuk: creationix: we have #get() #set() so #del() is kinda nice since its the same length but yea [20:52] tjholowaychuk: leave it at destroy i suppose [20:52] jsilver: so if I can't move on, the idea of node.js is ruined [20:52] jsilver: because of Sync [20:52] bradleymeck_: huh? [20:52] creationix: tjholowaychuk: of, for sessions, whichever [20:52] jsilver: or the stability is ruined [20:52] jsilver: because I used sync [20:52] jsilver: correct? [20:53] bradleymeck_: no, you just have something requiring sync, which while frownable doesnt break anything [20:53] micheil: jsilver: what you're building, it's very hard to be async, because it is something that is odd. [20:53] micheil: eg, coffeescript isn't probably async [20:53] bradleymeck_: thats more on the pegjs ppl, and checking the LL of a grammar is painful [20:53] tjholowaychuk: creationix: I have another project on the go, but it will help out connect quite a bit [20:54] jsilver: yeah [20:54] _announcer: Twitter: "Spend some time setting up a proper memcached cluster of 30 gig spread over 15 different 'hosts' for my #nodejs memcached client" -- Arnout Kazemier. http://twitter.com/3rdEden/status/18465522022 [20:54] micheil: the only way to make it async is to use a callback for when it's converted [20:54] creationix: tjholowaychuk: nice [20:54] jsilver: coffeescript can be used to write node apps that are async [20:54] jsilver: the parser needs to know when the app starts and stops [20:55] _announcer: Twitter: "@github I'm getting this on a git pull of the node.js repo: http://gist.github.com/474515" -- Micheil Smith. http://twitter.com/miksago/status/18465584890 [20:55] jsilver: bradleymeck_: ah yes I agree [20:55] micheil: jsilver: no, but parsing code, that needs to be something [20:55] creationix: hey, how do I make a package.json for npm, I never can remember? [20:56] micheil: if you need to do it before running the app, then wtf would it be async? [20:56] jsilver: no i mean [20:56] jsilver: have a server that can do it [20:56] micheil: creationix: packages spec, common.js wiki [20:56] jsilver: a node that's like "send me tokens!" [20:56] bradleymeck_: put it in root of your module, set up maintainers, directories, main, scripts [20:56] jsilver: and then runs my function on it [20:56] jsilver: as a service [20:56] micheil: jsilver: yeah, and? [20:56] micheil: just make your parser take a callback [20:56] jsilver: or i could make a command [20:56] jsilver: yeah [20:56] creationix: micheil: yeah, that's going to overwhelm me. (spec, common.js, wiki) But I think I'll just modify an existing one [20:56] micheil: Parser(data, function(compiled){}) [20:57] micheil: creationix: k. [20:57] jsilver: interesting [20:57] jsilver: k [20:57] micheil: jsilver: or return a continuable. [20:57] micheil: Parser(data)(...) [20:57] _announcer: Twitter: "It is very entertaining node.js - http://nodejs.org" [es] -- Alvaro Véliz Marin. http://twitter.com/alvaroveliz/status/18465709849 [20:57] micheil: but the callback style is better [20:59] bradleymeck_: kinda funny to see the github download finish and the hardcore archiving action dialog stay up [20:59] jsilver: micheil: interesting [20:59] jsilver: there's also some bugs [20:59] jsilver: found one this morning [20:59] jsilver: i have a bad trim() function [20:59] micheil: although, seriously, why js -> coffeescript [21:00] jsilver: fun [21:00] jsilver: cheekiness [21:00] micheil: jsilver: String.trim() [21:00] micheil: it's ES5 [21:00] jsilver: kk [21:00] micheil: or something [21:00] jsilver: to troll nerds [21:00] jsilver: that hate Coffee [21:00] jsilver: actually [21:00] jsilver: :) [21:00] jsilver: jk [21:01] bmizerany has joined the channel [21:01] bradleymeck_: coffeescript does have some niceties (mostly when dealing w/ arrays) [21:01] micheil: jsilver: oooh.. low ;p [21:01] micheil: and switch/case [21:01] jsilver: it does [21:01] creationix: hmm, npm seems easier than I remember [21:01] micheil: but I like to write javascript. [21:01] gf3: Coffeescript would be nice if it were it's own discrete language [21:01] jsilver: my parser actually converts JS switchcases to Coffee style ones [21:01] creationix: I just made a package.json file and did "npm publish ." [21:01] tjholowaychuk: creationix: because it works now :D [21:01] micheil: creationix: that's all it takes [21:01] bradleymeck_: but i loves my fallthrough [21:02] jsilver: in most cases, my parser does whatever it can to follow coffee style [21:02] mikeal: i have a test failure on the master [21:02] tjholowaychuk: creationix: you also have to $ npm tag nStore n.n.n stable [21:02] tjholowaychuk: if its stable that is [21:02] mikeal: does anyone else see an assertion error in test-http-upgrade-server [21:02] tjholowaychuk: but then you dont need the $ npm install nStore@latest [21:02] micheil: mikeal: I can't pull [21:02] jsilver: it ignores break; (BreakStatement) [21:03] bradleymeck_: coffeescript doesnt have fallthrough does it? [21:03] jsilver: and label: statement (LabelledStatement) [21:03] jsilver: no [21:03] creationix: ahh, makes sense [21:03] aho: fallthrough should be a keyword imo [21:03] jsilver: and if the token was break [21:03] V1: Argh, I hit V8 bug again >_<, where it can't re-use a regexp unless you create it using new Regexp instead of /regexp/ [21:03] jsilver: it doesn't \n [21:03] aho: would solve both issues :> [21:03] creationix: mape: is this site live and production ready? http://npm.mape.me/ [21:03] creationix: looks great! [21:04] jsilver: i worked pretty hard on making the converter convert JS style switches to Coffee [21:04] micheil: jsilver: next step, stick it on github, give it tests, release patches and share on the mailing list [21:04] creationix: mape: actually, I think it's unfinished, good start though [21:04] jsilver: micheil: it is on github [21:04] micheil: good [21:05] jsilver: http://github.com/jsilver/js2cs [21:05] jsilver: hehe [21:06] jsilver: it doesn't convert 1:1 though [21:06] _announcer: Twitter: "nStore - easy database written for node.js in node.js http://thechangelog.com/post/807837625" -- Fabien Penso. http://twitter.com/fabienpenso/status/18466206956 [21:06] jsilver: for() becomes while() because of technical restraints [21:06] _announcer: Twitter: "ServerSide JavaScript with MooTools and NodeJS : http://davidwalsh.name/mootools-nodejs" -- happyworm. http://twitter.com/happyworm/status/18466223134 [21:07] jsilver: some other issues [21:07] micheil: jsilver: document these quirks in the readme. [21:07] jsilver: i have been trying [21:07] jsilver: i also add an example to test.js of stuff that's broken [21:07] micheil: bradleymeck_: I only get one error failing [21:07] jsilver: array[i] is broken i think [21:07] micheil: Path: message/undefined_reference_in_new_context [21:08] _announcer: Twitter: "#redis session store for #nodejs Connect http://github.com/visionmedia/connect-redis" -- TJ Holowaychuk. http://twitter.com/tjholowaychuk/status/18466341792 [21:08] grahamalot has joined the channel [21:08] bradleymeck_: mmm odd wonder what git was doing still cant git clone, the raw archive seemed to work installing [21:08] micheil: tjholowaychuk: y'know what would be cool? Jade that uses document.createDocumentFragment & document.createElement [21:09] micheil: seriously. that'd be fast as hell in browsers.. I'm sure. [21:09] tjholowaychuk: micheil: hmm ya that would be interesting [21:09] micheil: I might try doing it. [21:09] tjholowaychuk: ive never done much client side templating, would be sweet though. I will add that to the site when I have time ( the live edit thing ) [21:10] micheil: tjholowaychuk: would you be against me moving jade.js in the browser branch into jade-browser.js [21:10] _announcer: Twitter: "The more I see what others are doing with it, the more I realize how I need to find the time to get acquainted with Node.js." -- Chris Baglieri. http://twitter.com/chrisbaglieri/status/18466446846 [21:10] tjholowaychuk: micheil: not at all no, just let me know so I can change my link [21:10] micheil: k [21:11] tjholowaychuk: and link back to the SSJS one [21:13] TommyM1 has left the channel [21:13] TommyM1 has joined the channel [21:14] tjholowaychuk: creationix: Expunge, nice lol [21:14] creationix: :) [21:14] creationix: that is a word right? [21:14] tjholowaychuk: thats a new one :D [21:14] tjholowaychuk: apparently [21:16] mape: tjholowaychuk: so, any plans for html->jade on the site? ;) [21:16] tjholowaychuk: mape: html -> jade ? [21:16] blaines has joined the channel [21:16] tjholowaychuk: or are you talking about the interactive thing [21:16] softdrink has joined the channel [21:17] micheil: tjholowaychuk: k, new repo is master [21:17] micheil: no branch [21:17] tjholowaychuk: micheil: k sweet [21:17] micheil: tjholowaychuk: shall I ask for pull? [21:17] tjholowaychuk: micheil: I will think about it :) [21:17] micheil: catch. [21:18] jsilver: man [21:18] micheil: tjholowaychuk: now to think about how a version using the DOM would work [21:18] jsilver: i'm so addicted to working on js2cs [21:18] mape: tjholowaychuk: yea [21:18] jsilver: i've been working on it for 3 days! [21:18] jsilver: lol [21:19] jsilver: nStore looks cool [21:19] blaines has joined the channel [21:19] tjholowaychuk: micheil: im sure you could tweak the buffering [21:19] tjholowaychuk: mape: totally :D would be rad to have that on there [21:19] micheil: tjholowaychuk: yeah.. [21:19] tjholowaychuk: micheil: yes...... :p [21:21] micheil: the hard part would be attributes [21:21] tjholowaychuk: creationix: any reason nStore would work fine the first time an app is run [21:21] huyhong has joined the channel [21:21] tjholowaychuk: and then 1) : TypeError: Object # has no method 'write' [21:21] tjholowaychuk: at support/nstore/lib/nstore.js:111:17 [21:21] tjholowaychuk: at Array.forEach (native) [21:21] tjholowaychuk: at done (support/nstore/lib/nstore.js:110:22) [21:21] tjholowaychuk: at check (support/nstore/lib/nstore.js:87:13) [21:21] tjholowaychuk: at support/nstore/lib/nstore.js:102:11 [21:21] tjholowaychuk: at support/nstore/lib/nstore.js:418:23 [21:21] tjholowaychuk: at support/nstore/lib/nstore.js:313:11 [21:21] tjholowaychuk: at support/nstore/lib/nstore.js:51:7 [21:21] tjholowaychuk: at node.js:221:9 [21:21] tjholowaychuk: the second [21:21] Validatorian has joined the channel [21:21] tjholowaychuk: when the db exists [21:21] creationix: tjholowaychuk: no clue [21:21] creationix: might be a bug though ;) [21:21] tjholowaychuk: micheil: ya attrs is the only real PITA right now on my end too [21:21] huyhong has joined the channel [21:21] tjholowaychuk: creationix: hmm :) [21:22] tjholowaychuk: ill look into it some more [21:22] blaines has joined the channel [21:22] creationix: tjholowaychuk: are you trying it as a session store? [21:22] creationix: or general data store [21:22] micheil: tjholowaychuk: this could work: http://gist.github.com/473655 [21:22] tjholowaychuk: creationix: just a general store [21:22] satori has joined the channel [21:22] jakehow has joined the channel [21:23] tjholowaychuk: looks good to me [21:25] blaines has joined the channel [21:25] mape: jsilver: your javascript->coffeescript breaks on function test() {alert('woops');} ? [21:28] blaines has joined the channel [21:28] zapnap has joined the channel [21:30] _announcer: Twitter: "Working with the amazing node.js. Get lost, PHP! JavaScript FTW! (documenting and unittesting everything from the ground up)" -- BlackMac.. http://twitter.com/stefanlh/status/18467570759 [21:30] blaines has joined the channel [21:30] creationix: tjholowaychuk: wins the award for finding the first bug in nStore [21:30] mikeal: ryah: ok, all sent [21:30] tjholowaychuk: yay [21:30] tjholowaychuk: lol [21:30] mikeal: pause, resume and filter [21:32] bradleymeck_: any well documented sqlite modules out there? or another single file dbms [21:32] mikeal: nStore is a k/v store that is pure node persisted to disc [21:32] mikeal: i don't know of sqlite bindings yet [21:32] bradleymeck_: document or just string v? [21:33] mikeal: but i know that ryah wants lower level bindings to the fs events sqlite generates for some awesome possible node applications [21:33] mikeal: bradleymeck_: JSON [21:33] beelzabub1: hey - i'm having a problem with net stream [21:33] mikeal: you can but creationix to implement using a Buffer as a value :) [21:33] agnat has joined the channel [21:33] beelzabub1: i'm getting messages received queued up [21:33] mikeal: s/but/bug [21:33] blaines has joined the channel [21:33] creationix: bradleymeck_: I had a sqlite wrapper that parsed I/O from a "sqlite3" child process [21:33] creationix: it worked mostly [21:34] mikeal: that sounds SLOW [21:34] beelzabub1: i even setNoDelay & call flush() after every write [21:34] beelzabub1: it's still happening [21:34] beelzabub1: is there any buffering that goes on within node? [21:34] mikeal: yes [21:34] _announcer: Twitter: "Blog rolling with mongoDB, express and Node.js - How To Node http://ow.ly/2b1MN #node.js" -- Loki Zavala. http://twitter.com/Siedrix/status/18467805614 [21:34] bradleymeck_: yes if you have the event loop blocking especially [21:34] mscdex: i thought flush() doesn't exist anymore? [21:34] creationix: mikeal: slow is relative, but I'm sure it could be much faster [21:34] mikeal: if you keep wrtiting to a stream that already returned false on a write it'll buffer it [21:35] blowery has joined the channel [21:35] creationix: bradleymeck_: nStore stores documents, anything that is JSONable [21:35] creationix: you put in objects and get back objects [21:35] bradleymeck_: yea, reading docs now [21:35] _announcer: Twitter: "Nice positive feedback on Geddy: "i'm not used to things just defaulting to work." http://geddyjs.org/ #node.js" -- Matthew Eernisse. http://twitter.com/mde/status/18467872919 [21:36] creationix: mde: how goes the plans to mode geddy on top of connect? still a distant goal? [21:37] khug has joined the channel [21:37] beelzabub1: it seems to me though that the buffering is breaking the contract [21:37] beelzabub1: cause when I write, I expect the data on the other side to come in atomically (e.g. every write i make has a corresponding data listener invoked) [21:37] beelzabub1: that is how send/recv works [21:38] beelzabub1: in other words, you don't have to worry about coalesced messages [21:38] mde: creationix: Yeah, until there are more resources (i.e., more than just me :)). [21:38] mscdex: geddy buzz ftw! [21:38] beelzabub1: mikeal: thoughts? [21:38] mde: I want to do that, and publish to NPM, but they're moving targets too. [21:38] mikeal: beelzabub1: so [21:39] mikeal: you want it to throw an exception? [21:39] beelzabub1: no [21:39] mikeal: because if write returns false then the external IO source can't keep up [21:39] beelzabub1: i want that the buffering it does not not coalesce to a single write [21:39] mikeal: you actually can't force more packets at it over TCP [21:39] creationix: beelzabub1: why not coalesce? [21:39] mikeal: i buffers all the subsequent writes [21:39] mikeal: er it [21:39] beelzabub1: several things [21:39] beelzabub1: 1: i'm not sending a lot of data [21:39] kriszyp: mde: did you take a look at using perstore with geddy? [21:39] beelzabub1: i send "tick" every 500ms , & "tock" every 1 second [21:40] beelzabub1: so i'm never actually sending more than it can handle [21:40] beelzabub1: creationix: because then you need to layer a binary communication protocol [21:40] beelzabub1: you lose the concept of messages [21:41] creationix: beelzabub1: well, I thought we already assumed that the concept of messages wasn't assured [21:41] creationix: it's not over any network barrier [21:41] beelzabub1: of course it is [21:41] beelzabub1: at least with TCP [21:41] mde: kriszyp: Not yet -- I was supposed to talk to Tim_Smart about persistence stuff, but we missed connections. The ORM/persistence stuff seems like a big question mark, so I think I'm going to focus on cleaning up the code and making it releaseable first, rather than shitting out more features. [21:41] mikeal: beelzabub1: then it'll never buffer [21:41] benburkert has joined the channel [21:41] mikeal: if you aren't sending more than it can handle it won't buffer [21:41] mikeal: if write() returns true, it's written it to the socket [21:41] beelzabub1: well someone's coalescing [21:41] mikeal: or, more accurately, is going to write it [21:42] creationix: beelzabub1: probably the OS [21:42] pquerna: how do you tell a file has actually flushed using writeStream? It doesn't seem to emit an event for when its actually.. fully written to disk [21:42] mikeal: but believes that it can [21:42] beelzabub1: creationix: probably not [21:42] mikeal: pquerna: the "close" event [21:42] pquerna: mikeal: ah, didn't see that. thanks. [21:42] mikeal: pquerna: "end" is called when writing is finished, "close" is called when it's flushed and it's closing the file handler [21:43] mscdex: what's the best way to append buffers? [21:43] pquerna: yeah, i was using end [21:43] pquerna: then the node process would wait 5 more seconds before actually finishing :) [21:43] beelzabub1: just verified - write is not returning false [21:44] mikeal: creationix: are you going to twitter about the illuminati video? [21:44] agnat: beelzabub1: TCP is a stream. It performs all kind of buffering and is not suitable for message passing without your own framing protocol. UDP is message based but lossy in case of congestion. [21:46] beelzabub1: hmm... good point [21:46] agnat: beelzabub1: UDP has other limitations ... like equipment dependent maximum message size ... [21:46] beelzabub1: however, several points [21:46] beelzabub1: this isn't over the wire communication [21:46] beelzabub1: doing strictly localhost stuff [21:47] beelzabub1: & i don't recall ever having to actually worry about message framing in TCP [21:47] agnat: beelzabub1: doesn't matter ... if you need local message passing try local unix domain sockets ... [21:47] beelzabub1: like when i did raw tcp [21:48] creationix: how do I update my npm packages? [21:48] agnat: beelzabub1: hmm ... [21:48] creationix: npm install just says it's already installed [21:48] tjholowaychuk: creationix: not 100% sure but i tihnk you have to rm it then install it again [21:48] mikeal: no [21:49] mikeal: there is an easier way [21:49] creationix: tjholowaychuk: that sounds like a bug if so [21:49] mikeal: i just don't remember it right now :) [21:49] mikeal: that sounds a lot like setuptools :) [21:49] _announcer: Twitter: "nStore - easy database written for node.js in node.js. - http://goo.gl/T6Q1 #javascript" -- Peter Hoffmann. http://twitter.com/peterhoffmann/status/18468646213 [21:49] tjholowaychuk: not sure lol [21:49] creationix: mikeal: should I link to the video on twitter? [21:49] mikeal: definitely [21:49] mikeal: i think i linked to it already [21:49] mikeal: it's a fun video, we make a lot of progress [21:50] mikeal: the first frame has me really really dark, and it's called "Illuminati" so it's kind of ominous :) [21:50] mikeal: in the little preview bit [21:50] mikeal: i have a crazy lisp when i drink [21:50] pquerna: anyone have node on a decently fast linux box? [21:50] pquerna: i wanna see a little benchmark script run [21:50] _announcer: Twitter: "Recording I took of last-night's Node Illuminati meeting in San Francisco http://vimeo.com/13292130 #node.js #geek.talk #progress" -- Tim Caswell. http://twitter.com/creationix/status/18468728954 [21:50] pquerna: should take like 60 seconds [21:50] towski: ooh I want to run it on my old linux box [21:51] creationix: pquerna: mape does [21:51] pquerna: https://gist.github.com/3f9a8efab15bc81b8799 [21:51] jsilver: i gotta hop out guys [21:51] jsilver: party's over [21:51] jsilver: :) [21:51] jsilver: client time [21:52] mape: pquerna: Wrote 104857800 bytes in 6915ms using 1024 byte buffers: 14.461315979754156 mB/s [21:52] mape: oh, there is more, will gist [21:52] Validatorian has joined the channel [21:53] mape: pquerna: http://gist.github.com/474593 [21:53] pquerna: nice [21:53] pquerna: the last one is a little unexpected [21:53] pquerna: but i like the jump up to 32kb :) [21:54] creationix: pquerna: I can try on my I7 MBP with SSD, though it's not Linux [21:54] pquerna: yeah, I was running it on my mbp 15 w/ ssd, the results were somewhat inconsistent [21:54] pquerna: but I'd be happy to see more [21:54] brianmario has joined the channel [21:55] markwubben_ has joined the channel [21:55] creationix: when did node get "on" instead of "addListener" Post v0.1.100 I'm assuming [21:55] pquerna: yeah.. .96? [21:55] tjholowaychuk: ya its really new [21:55] tjholowaychuk: few days ago [21:56] pquerna: 'few days ago' = 3 releases ago :) [21:56] Shorrockin has joined the channel [21:56] creationix: I actually only run released versions of node most the time since I do mostly library development [21:56] tjholowaychuk: pquerna: whattt? really? why did I just see it come up on the github feed a few days ago lol [21:57] creationix: pquerna: it's not in v0.1.100 [21:57] Dmitry1 has joined the channel [21:57] pquerna: oh? [21:57] pquerna: i really thought it was [21:57] pquerna: i just really really really like on [21:58] creationix: pquerna: http://pastie.org/1043203 [21:58] mape: pquerna: Hmm yeah ran it again and it isn't consistant [21:59] pquerna: mape: yeah, unfortunately, kernels are really good at making these things hard to see. [21:59] pquerna: you need to memory stress most machines to get it to stop cheating [21:59] pquerna: or use fdatasync on every write [22:00] pquerna: i'll think about it some more, though we dont' want to benchmark the kernels, just node. [22:00] mikeal: creationix: come on rebel, come hang out will all the crazy people on master :) [22:00] _announcer: Twitter: "@olympum another great idea. That's next. I hear the BMW onboard comp is equipped with #Nodejs + mini hadoop cluster (BMW comp + iPhone(s))" -- Alexandre Linares. http://twitter.com/linaresa/status/18469316808 [22:00] mape: pquerna: A couple more runs if that helps any: http://gist.github.com/474593 [22:01] satori: I want a BMW with node.js [22:01] creationix: pquerna: http://gist.github.com/474606 [22:01] creationix: mikeal: it appears that HEAD it v0.1.100 [22:01] pquerna: satori: ponies. that is all. [22:01] mape: creationix: nice with the video :) Who are there? [22:02] creationix: mape: it was me, isaacs, pquerna, ryah, mikeal, and mjr_ [22:02] Shorrockin has left the channel [22:02] phiggins has joined the channel [22:02] mape: k [22:03] creationix: I love the part where pquerna asks me with a straight face about my proposed design, and then after confirming it says it's a horrible idea. [22:03] hassox has joined the channel [22:03] satori: heh [22:03] pquerna: mape: yeah, at least consistently, the 1kb writes arent' passing 30mb/s prolly need a much longer test and a scatter plot to do it 'right' [22:03] mape: creationix: hehe, mikeal the on at the white board at the start? [22:04] creationix: mape: yep [22:04] mjr_: mape: we all debate how to pronounce your IRC nick. [22:04] mjr_: How do you do it? [22:05] mape: mate with ape [22:05] mape: m ape [22:05] satori: ACTION is jealous. Noone does that sort of thing in Sydney. Or if they do its a secret from me [22:05] mjr_: It's a secret from EVERYBODY [22:06] mjr_: That's why it's the "Node Illuminati" [22:06] satori: Well, that makes sense [22:06] mape: Yeah, that doesn't make me feel good about you trying to figure out how to pronounce my name.. [22:06] jxson has joined the channel [22:06] mjr_: mape: so you say like, "em ape"? [22:06] mikeal: basically we had some issues we wanted to resolve and got together the best people locally to resolve just those issues [22:07] mjr_: Argh, must head back to never-ending meeting. [22:07] mjr_: IRC meeting is way more fun. [22:07] mikeal: if we put together a public meetup for node.js like 12 Ruby people show up and kind of ruin conversations like this one [22:07] satori: lol [22:07] hassox: satori: you're in sydney? [22:07] towski: heh [22:07] hassox: ACTION is in melbourne [22:07] satori: yeah [22:07] mau has joined the channel [22:07] creationix: speaking of public node meetups, we need to plan another one [22:07] mape: mjr_: no em, just m like mate followed by ape [22:08] micheil: tjholowaychuk: patch incoming! [22:08] creationix: the last one in the bay area was short notice and only 5 people showed [22:08] satori: hassox: I am thinking of moving south of the border. [22:08] mikeal: creationix: there is one on Thursday at digg [22:08] satori: need a change of scenery [22:08] tjholowaychuk: micheil: haha k sweet, ill check it in a bit [22:08] creationix: mikeal: really, link? [22:08] hassox: it's pretty nice down here :) [22:08] hassox: creationix: hey... is grain ready for use mate? [22:08] mikeal: http://www.facebook.com/event.php?eid=106330769408119&index=1 [22:09] creationix: hassox: I think so [22:09] micheil: tjholowaychuk: evaluate the attrs() inline: http://gist.github.com/474615 [22:09] creationix: it's never been used before, so it's still virgin [22:09] hassox: sure [22:09] hassox: does it have a jade plugin inbuilt? [22:10] benburkert has joined the channel [22:10] teemow has joined the channel [22:10] creationix: hassox: no, but someone was working on porting jade to grain [22:10] creationix: hassox: all it has built-in is a super-simple one called Corn [22:10] creationix: really, it doesn't do much [22:10] hassox: porting it? I thought you'd just need an interface defined :\ [22:11] creationix: well, jade doesn't currently follow the spec [22:11] tjholowaychuk: micheil: kinda fudges the locals in attrs though no? [22:11] micheil: hmm.. not sure. [22:11] micheil: I didn't test for that. [22:11] bradleymeck_: this JSON illegal access bug is frustrating [22:12] tjholowaychuk: if its compiled down to a buffered string you lose that functionality [22:12] micheil: tjholowaychuk: okay, good point [22:12] micheil: it was proof-of-concept [22:13] creationix: hassox: actually I want to somehow integrate the line-number error-reporting into the grain spec from tjholowaychuk's jade [22:13] creationix: i think that's a useful thing for all template languages to have [22:13] tjholowaychuk: that it would be [22:13] hassox: cool [22:13] satori: It occurred to me last night, while I was exp with opengl, that node would make a brilliant scene graph engine. [22:13] micheil: creationix: that line number stuff is damn useful [22:13] hassox: is grain kind of like rtomayko's tilt for ruby? [22:13] tjholowaychuk: yup [22:13] tjholowaychuk: sorta [22:14] creationix: what's tilt? [22:14] tjholowaychuk: tilt is just kind of an abstraction layer that encloses some template engines [22:14] tjholowaychuk: but not really to construct them [22:14] tjholowaychuk: grain would be low level stuff for engines to build on [22:14] tjholowaychuk: common stuff like the error reporting mentioned [22:14] bradleymeck_: "No such file or directory 't13phdbsrpmk0c8r.tmpdb'" from nStore? [22:14] richcollins has joined the channel [22:15] creationix: tjholowaychuk: so have you had a chance to look at "Corn" in the grain examples folder? [22:15] creationix: bradleymeck_: interesting [22:15] tjholowaychuk: creationix: nope [22:15] hassox: yeah tilt is an api that engines have adapters [22:15] hassox: tilt then uses the adapter to present a consitent api for devs to use to render various formats [22:15] creationix: bradleymeck_: yeah, that's an nStore thing, that's the temp file it uses for compacting [22:15] creationix: hassox: kinda like that, yeah [22:15] hassox: that didn't really make sense ;) [22:16] hassox: but hopefully it got across the message [22:16] bradleymeck_: pretty easy to reproduce, just saving stuff and getting stuff before the file opens up full blows up [22:16] pquerna: mape: http://gist.github.com/474628 <- adds read test, uses 2gb /tmp file now, probally takes ~10 mnutes to run, but should be more consistent hopefully [22:16] technoweenie has joined the channel [22:16] pquerna: guess i can go run thsi on some real hw instead of my laptop :) [22:17] figital has joined the channel [22:17] _figital has joined the channel [22:17] pquerna: related though, node is cpu bound on my laptop when running this. [22:23] creationix: bradleymeck_: what do you mean? [22:24] creationix: bradleymeck_: think you could gist up a failing test? [22:24] bradleymeck_: i think it might actually be something in JSON serialization, trying to isolate it [22:24] mape: pquerna: running [22:26] bradleymeck_: could it be from my use of Numbers as keys? mmm [22:26] _announcer: Twitter: "http://jade-lang.com/ - Urgh. This is not readable for me. More concise yes, better? No... #nodejs #jadelang" -- Andrew Moist. http://twitter.com/andyeo/status/18470812442 [22:26] _announcer: Twitter: "Grain, a template language compiler interface for node.js http://github.com/creationix/grain" -- Tim Caswell. http://twitter.com/creationix/status/18470819204 [22:27] creationix: bradleymeck_: shouldn't matter [22:30] creationix: crazy idea, but what about whitespace sensitive html (a compromise between html and haml/jade) http://pastie.org/1043244 [22:30] mape: Hmm doesn't that just make it look broken? [22:30] tjholowaychuk: creationix: ive seen it done in ruby land [22:30] bradleymeck_: http://github.com/creationix/nstore/blob/master/lib/nstore.js#L243 , the JSON.parse is firing off "Unexpected identifier" [22:30] tjholowaychuk: BUT if your doing template stuff anyways not sure why you would want to write tags [22:30] tjholowaychuk: even if it is half tags [22:31] paul__ has joined the channel [22:31] creationix: tjholowaychuk: because some people prefer tags to otherwise [22:32] tjholowaychuk: id imagine those people would just use ejs [22:32] tjholowaychuk: since they are most likely the people who hate indentation based template languages [22:32] Rik` has joined the channel [22:32] creationix: bradleymeck_: that's strange [22:32] mscdex: interesting video.... have figured out who most of the people are [22:32] mscdex: heh [22:32] bradleymeck_: no idea why [22:33] bradleymeck_: ^ i have [22:33] creationix: mscdex: I guess I should put the names of the people on the video description [22:33] creationix: bradleymeck_: look at your db file, maybe it got corrupted [22:33] mscdex: true, but still wouldn't necessarily know who is who, without looking up gravatars maybe [22:33] mscdex: but i can guess pretty easily [22:34] pquerna: did it include ryan's rant about lasers? [22:34] pquerna: hmm. don't think so. damn. [22:34] mape: think that was before it started [22:35] mape: he mentions lasers though [22:36] pquerna: if everything will be recorded i'll need to be nicer :x [22:37] mape: Nah [22:37] satori: lol [22:39] blaines has joined the channel [22:39] _announcer: Twitter: "Node.js is the New Black : http://bit.ly/aMamVK" -- Dan Robert. http://twitter.com/danielwrobert/status/18471551240 [22:39] mape: pquerna: still running.. [22:39] tjholowaychuk: creationix: patch that nStore bug? [22:40] creationix: tjholowaychuk: which one? I've patched a few already [22:40] hpoydar has joined the channel [22:40] tjholowaychuk: creationix: ah never mind its in there :) [22:40] hassox has joined the channel [22:40] pquerna: mape: yeah, i'm playing with it here, and i'm seeing my node use more than a gig of ram. 'oops' [22:41] TommyM1 has left the channel [22:41] pquerna: i guess there are other things to fix [22:41] mape: creationix: Next time you might want to create a etherpad or something and use a projector, reading the scribbles takes some energy ;) [22:41] creationix: pquerna: mine is still running at 600mb of ram [22:41] creationix: mape: I know, I tried to get my code snippets from the video [22:42] blaines has joined the channel [22:42] pquerna: creationix: yeah, but it like, should be... constant use of ram, and.. much smaller. [22:42] mape: Still nice to be able to listen in [22:43] DarthShrine has joined the channel [22:44] creationix: I was actually suprized at the video quality considering it was just my laptop with quicktime player recording via the webcam and internal mic [22:44] creationix: (I know, quicktime PLAYER and RECORDING) [22:44] mape: creationix: Its a mac, ofcourse it turns out great [22:44] creationix: that's Apple for ya [22:44] mscdex: hah [22:44] blaines has joined the channel [22:46] ajpiano has joined the channel [22:48] blaines has joined the channel [22:48] itodd has joined the channel [22:50] beelzabub1: so documentation says the encoding for buffer is utf8 & ascii - binary is legacy [22:50] beelzabub1: is that right? [22:50] _announcer: Twitter: "Non-Blocking, Event-Driven server technology using javascript! Insane! check node.js at http://nodejs.org/" -- Hugo Raimundo. http://twitter.com/hsraimundo/status/18472173027 [22:50] creationix: beelzabub1: buffer isn't encoded at all [22:50] creationix: it's raw binary data [22:50] creationix: utf8 and ascii are for strings [22:50] beelzabub1: ok [22:51] creationix: binary encoding for strings is a way to encode 8-bit binary data in strings [22:51] beelzabub1: oh - ewww [22:51] creationix: yeah, it was the only way before buffers [22:51] creationix: hence the deprecation now [22:51] blaines has joined the channel [22:51] beelzabub1: so if i set the encoding on a stream as binary, i'll get a buffer object for the 'data' listener, right? [22:52] creationix: no, if you want buffers, don't set the encoding [22:52] creationix: if you set encoding you'll get strings [22:52] _announcer: Twitter: "I'm getting excited over http://nodejs.org - server side JavaScript is sexy!" -- Baldur Þór Emilsson. http://twitter.com/baldurthoremils/status/18472297540 [22:52] satori: That should be made more clear in docs i think. [22:52] Astro: agreed [22:52] mscdex: so erm, who's the one in this video that is not mikeal, pquerna, ryah, creationix, or isaacs? [22:52] mscdex: heh [22:52] Ori_P has joined the channel [22:53] creationix: mscdex: it's mjr_ [22:53] mscdex: ah ok [22:54] mjr_: I'm manning the scotch. [22:54] beelzabub1: when i write a string into a buffer, it doesn't add the null terminator, correct? [22:54] pquerna: huh, so, i didn't know this, but filestream.write(), always returns false. [22:54] creationix: beelzabub1: correct [22:54] pquerna: 'cute' [22:55] beelzabub1: cool [22:55] creationix: pquerna: is that right? [22:55] pquerna: yeah, it emits a drain() when its done [22:55] beelzabub1: crap - but .length for a string returns number of characters [22:55] beelzabub1: but buffer needs number of bytes [22:55] mape: pquerna: if it is still running? Something is wrong? [22:55] blaines has joined the channel [22:55] beelzabub1: how do i reconcile the two? [22:55] pquerna: mape: has it outputed any lines yet? [22:56] mape: Hmm, running time node bench.js [22:56] mape: no output [22:56] pquerna: mape: and is the /tmp/wt.dat file growing? [22:56] creationix: beelzabub1: Buffer.byteLength [22:56] creationix: or something like that [22:56] beelzabub1: creationix: that doesn't help [22:56] creationix: beelzabub1: also the Buffer constructor takes in utf8 strings as input [22:56] mape: pquerna: jup growing [22:56] pquerna: mape: hmm. so, its running, just super slow :( [22:57] mape: hah there.. [22:57] beelzabub1: creationix: i want to create a buffer that contains the string + an explicit null [22:57] mape: Wrote 2097156000 bytes in 1926917ms using 1024 byte buffers: 1.0379274250006618 mB/s [22:57] pquerna: yeah [22:57] creationix: beelzabub1: easy [22:57] pquerna: epic :) [22:57] beelzabub1: creationix: so i need number of utf-8 bytes the string takes + 1 [22:57] beelzabub1: how? [22:57] pquerna: so, just a little performance problem :) [22:57] creationix: beelzabub1: var length = Buffer.byteLength(string, encoding) + 1 [22:57] pquerna: i guess i should write a blocking C version to compare. [22:57] beelzabub1: creationx: i'm stupid [22:58] beelzabub1: thanks [22:58] creationix: beelzabub1: "Gives the actual byte length of a string. This is not the same as String.prototype.length since that returns the number of characters in a string." [22:58] ryah: null terminators are for pussys [22:58] creationix: lol [22:58] mape: no the problem is [22:58] creationix: ryah: unless you're implementing a protocol that requires it [22:58] creationix: (like when I implemented postgres) [22:59] ryah: yes, unless required. but never by choice [22:59] blaines has joined the channel [22:59] beelzabub1: creationix: 1 more thing. streams can take buffers to write, yeah? [22:59] ryah: beelzabub1: yes [22:59] beelzabub1: ryah: i'm using the null as a msg separator [23:00] mape: So, was something decided based on the meeting? Or just more ideas on how to solve the issue? [23:00] ryah: beelzabub1: that's a bad msg separator [23:00] satori: yeah. bad idea [23:00] creationix: mape: a couple patches resulted from it [23:00] pquerna: mape: changes to sys.pump / pause/resume, + new Filter() api [23:00] micheil: we have meetings now? [23:00] mape: nice [23:00] ryah: beelzabub1: netstrings [23:00] mape: micheil: The SF peeps do [23:00] micheil: >_> [23:00] ryah: beelzabub1: http://cr.yp.to/proto/netstrings.txt [23:01] creationix: ryah: I'd better not show you my data format for nStore then ;) [23:01] mape: In a secluded dungeon [23:01] beelzabub1: ryah - meh. i'm passing JSON messages around [23:01] _announcer: Twitter: "@isofarro nodejs?" -- Lawrence Carvalho. http://twitter.com/shinyloz/status/18472817746 [23:01] ryah: beelzabub1: yes. use netstrings. [23:01] beelzabub1: but yeah, i'll switch to using netstrings [23:01] beelzabub1: ok ok - you convinced me [23:01] creationix: what's netstrings? [23:01] beelzabub1: that's what i used to do in native code i guess (without knowing what it was called) [23:01] pquerna: you didn't just recommend using netstrings. [23:01] pquerna: at least use msgpack or something modern. [23:01] ryah: nah, use netstrings [23:02] lachlanhardy has joined the channel [23:02] ryah: takes 10 lines to implement [23:02] beelzabub1: oh, & not going to use netstrings [23:02] beelzabub1: the colon is unnecessaray [23:02] beelzabub1: :) [23:02] pquerna: past life working on a distributed system built on netstrings [23:02] pquerna: pppppppaaain [23:02] beelzabub1: but yeah - might make sense to provide a messaging layer on top of streams [23:02] ryah: i agree, msgpack for something hardcore [23:03] creationix: I was thinking of making a version of nStore that used msgpack [23:03] ryah: but if you just want to throw something together with json - netstrings [23:03] blaines has joined the channel [23:03] creationix: is that faster than JSON.stringify and JSON.parse? [23:03] mape: like 30% ? [23:03] ryah: creationix: marginally [23:03] ryah: :) [23:04] creationix: but probably much smaller in data size [23:04] creationix: so it will save disk I/O [23:04] mape: http://msgpack.sourceforge.net/index/speedtest.png [23:04] ryah: turns out JSON methos are highly optimized [23:04] beelzabub1: that's not really a good benchmark [23:04] creationix: mape: I wonder what crap JSON they used for that benchmark [23:04] beelzabub1: it doesn't describe the test [23:04] mape: creationix: probly something that makes msgpack look good ;) [23:04] pgriess: http://groups.google.com/group/nodejs/msg/1b8e3f4e64b4b061 [23:04] beelzabub1: also, you'd be surprised how little IPC actually is in your app [23:05] beelzabub1: (depending on the app) [23:05] creationix: beelzabub1: http://sourceforge.net/projects/msgpack/files/benchmark/msgpack-protobuf-json-speed-test.tar.gz/download?use_mirror=cdnetworks-us-1 [23:05] pgriess: msgpack much faster at de-serializing, marginally faster serializing [23:05] creationix: pgriess: yes, that would help then [23:05] creationix: I read from disk and JSON.parse on every record read [23:05] mape: hmm, would be nice to use msgpack but the damed dependencies, and dependencies that need compiling at that [23:05] pgriess: i doubt the overhead of requiring a binary msgpack addon is worth the marginal savings, to be honest [23:06] Guest85518: Ah drat, this conversation is important to me and Im late. [23:06] pgriess: latency of an indivudal read is going to be dominated by disk access anyway [23:06] tjholowaychuk: i wouldnt do it [23:06] creationix: pgriess: yeah, I like nStore being easy to install [23:06] pgriess: msgpack will save you some cpu, but that's abou tit [23:06] tjholowaychuk: the whole point of nStore is to be accessible [23:06] mape: pgriess: Any plans on getting node-msgpack onto npm? :) [23:06] pgriess: mape: npm support for compiled addons isn't great [23:06] mape: hmm k [23:06] creationix: maushu: what's up [23:07] pgriess: mape: some day when we have buffer packing primitives in node, i may consider porting it [23:07] maushu: I want to transmit stuff between node processes, including strings and buffers. [23:07] creationix: now if node or Buffer had msgpack built-in... [23:07] blaines has joined the channel [23:07] mape: pgriess: I'll hold you to that ;) [23:07] pgriess: creationix: yeah [23:07] pgriess: mape: heh. good thing i said "may consider" [23:08] creationix: so the only reason that JSON is better than msgpack is because JSON is built-in [23:08] creationix: well, I guess it's also easier to read [23:08] maushu: ^ [23:08] pgriess: creationix: msgpack provides framing for you [23:08] pgriess: creationix: with json you need to use netstrings or a terminator/separator [23:08] creationix: pgriess: oh, the framing is built in, that's nice [23:08] pgriess: creationix: neither of which is hard to do, but still [23:09] creationix: yeah, JSON.stringify is easy, it never has newlines or tabs [23:09] creationix: nStore records are {JSON}\t{JSON}\n [23:09] pgriess: creationix: yeah. kind of cheating. but yeah [23:09] pgriess: creationix: you have to linearly scan for newlines though, which is a mild perf disadvantage [23:09] bradleymeck_ has left the channel [23:10] mape: pgriess: Oh yeah, do you remember why I had issues building msgpack on linux? [23:10] pgriess: creationix: msgpack just stops when it's at the end of an object [23:10] beelzabub1: also, \t is perfectly valid embedded [23:10] beelzabub1: could be within a string [23:10] beelzabub1: could even just be a spacing character [23:10] pgriess: beelzabub1: iirc json.stringify() will escape these [23:10] creationix: beelzabub1: yes, it's valid, but JSON.stringify never outputs it [23:10] beelzabub1: {foo: "\t"} [23:10] beelzabub1: ? [23:10] beelzabub1: also, you're then assuming that both ends are using javascript [23:11] creationix: beelzabub1: I'm writing the data myself [23:11] beelzabub1: which really sucks - the whole point of JSON is that it's implementation agnostic [23:11] pgriess: mape: ooh no. i knew i had an outstanding ticket somewhere but couldn't find it [23:11] beelzabub1: i know - but i like to keep things decoupled [23:11] creationix: it's for a local database file [23:11] pgriess: mape: can you re-send? [23:11] blaines has joined the channel [23:11] beelzabub1: sure - netstrings will be faster & more robust anyways [23:11] creationix: beelzabub1: I think this is a case where decoupling is a bad thing [23:11] mape: pgriess: No you solved it, but now it's broken again so I figured I'd install it again.. 1sec [23:11] freshtonic has joined the channel [23:11] pgriess: brb [23:11] beelzabub1: creationix: how? i have not seen a single case where decoupling is bad [23:12] beelzabub1: in terms of IPC [23:12] creationix: beelzabub1: I'm not talking about IPC [23:12] franksalim has joined the channel [23:12] pgriess has joined the channel [23:12] beelzabub1: file formats are a form of IPC [23:12] beelzabub1: store-and-forward is the formal name for that [23:12] satori: pgriess: Is npm unsuitable for binary addons in general? [23:12] tjholowaychuk: creationix: does nStore have #length(callback) or something? [23:13] creationix: well, it's bad to make a slower, less effecient parser just so that data can be sloppy [23:13] creationix: it's easy to specify the data format to be strict [23:13] creationix: tjholowaychuk: no callback, just .length [23:13] pgriess: satori: afaict yes, but i haven't looked that closely. isaacs: care to weigh in? [23:13] sztanphet has joined the channel [23:14] creationix: tjholowaychuk: also you can get the keys with Object.keys(db.index) [23:14] tjholowaychuk: creationix: ah k perfect [23:14] tjholowaychuk: length was fine [23:14] beelzabub1: creationix: think about if you're debugging the app [23:14] beelzabub1: so you want to examine the data on disk that is written out [23:14] beelzabub1: so you add pretty printing [23:15] beelzabub1: oh wait, you just broke your deserialization algorithm [23:15] creationix: beelzabub1: well yeah, don't follow the spec and it breaks, I don't see the problem [23:15] beelzabub1: then you have to realize you're not writing JSON [23:15] blaines has joined the channel [23:15] beelzabub1: you're writing a specific subset of it [23:16] beelzabub1: i prefer to stick to standards if where reasonable - so I don't see how separating JSON through \t or \n helps you in any way [23:16] beelzabub1: it seems like you get the worst of both worlds [23:16] tjholowaychuk: its for indexing no? [23:17] creationix: beelzabub1: with the \t \n seperators, it's clean 7-bit ascii and easily viewable with any text editor [23:17] tjholowaychuk: it doesnt matter, its hidden by nStore anyways [23:17] beelzabub1: it's slower (since you have to read every message twice) & not robust at all [23:17] beelzabub1: right - except \t & \n are perfectly valid characters within JSON strings [23:18] beelzabub1: so you have to build an additional JSON parser just to figure out where you're messages are split up [23:18] creationix: beelzabub1: what alternative do you propose [23:18] creationix: other than the liner scan, it's quite fast [23:18] beelzabub1: print the length of the object before you print the object itself [23:18] creationix: maybe netstring would help avoid the linear scan, but then it's less robust [23:18] beelzabub1: how is it less robust? [23:18] creationix: remember that data will eventually be corrupt [23:19] beelzabub1: so how is your approach more robust? [23:19] creationix: and then your length markers are worthless because it's all out of sync [23:19] creationix: with bytes as markers that will never exist otherwise, it's easy to find valid documents and ignore the rest [23:19] beelzabub1: sure - then at least use a null character [23:19] creationix: yeah, but null characters are invisible to text editors [23:20] beelzabub1: the bad ones [23:20] creationix: I want something I can debug with notepad [23:20] tjholowaychuk: its nice IMO to just cat the db and check it out [23:20] beelzabub1: use a better text editor & it'll preserve the nulls [23:20] blaines has joined the channel [23:20] tjholowaychuk: its not meant to be some crazy insane robust solution lol [23:20] mjard has joined the channel [23:20] beelzabub1: alternatively, don't store multiple JSON objects within a single file [23:20] beelzabub1: or use a proper database [23:21] creationix: beelzabub1: I think you're missing the point of nStore [23:21] beelzabub1: haven't read up on it - what is it? [23:21] creationix: it is a proper database that happens to use 7-bit clean text for it's data format [23:21] creationix: append-only format with crash-only durability [23:22] _announcer: Twitter: "Installing node.js on OSX Just Works. Sweet." -- Nick howard. http://twitter.com/baroquebobcat/status/18474076957 [23:22] beelzabub1: sqlite bindings would appear to be a better solution [23:22] inimino: ...7-bit clean? [23:22] creationix: inimino: the high bit is never set [23:22] tjholowaychuk: the point of nStore is that you dont NEED sqlite or anything else lol [23:22] beelzabub1: yeah - i don't get that either [23:22] tjholowaychuk: GAHhHh [23:22] inimino: in a Unicode world, 7-bits seems like quite a throwback [23:22] beelzabub1: yup [23:23] tjholowaychuk: its a "oh fuck I dont feel like setting anything up" db [23:23] beelzabub1: that's why i recommend using utf-8 w/ embedded nulls to separate records [23:23] creationix: 7bit is the safest subset, it's the intersection between ASCII and UTF-8 [23:23] tjholowaychuk: JSON.stringify() translates unicode chars anyway [23:23] beelzabub1: so can i have a tab character in it? [23:23] inimino: it is all of ASCII [23:24] creationix: inimino: some people call 128-255 ASCII [23:24] inimino: unless I'm sending my database in MIME-messages unencoded, I don't see the benefit to 7-bit text [23:24] beelzabub1: JSON.stringify converts to a JS string [23:24] beelzabub1: there's no guarantee about the encoding [23:24] inimino: creationix ⋱ yes, but those people are incorrect ^.^ [23:24] creationix: beelzabub1: good point [23:24] beelzabub1: it could very well be USC2 [23:24] creationix: beelzabub1: I forgot that JSON.stringify might include encode UTF-8 characters [23:25] blaines has joined the channel [23:25] beelzabub1: & actually, it'll either be ASCII or UTF-16 [23:25] inimino: sure, you'll have to scan yourself and put everything in \uXXXX form if you want 7-bit text [23:25] beelzabub1: some modified version of USC2 rather [23:25] micheil: tjholowaychuk: any plans for a :partial filter in Jade? [23:25] beelzabub1: inimino: & that's a "simple" database? [23:26] tjholowaychuk: JSON.stringify('…') [23:26] tjholowaychuk: '"\\u2026"' [23:26] beelzabub1: that really seems like stuff the database library should be doing for me [23:26] tjholowaychuk: whats the issue with nStore there [23:26] inimino: maybe if all your data is ASCII to begin with [23:26] beelzabub1: & what happens if i get real input from the user [23:26] beelzabub1: then i have to remember to escape or they'll break the db? [23:26] tjholowaychuk: micheil: nah, that makes it to programming language-ish, partial() can be passed as a local like in express 1.0 [23:26] inimino: tjholowaychuk ⋱ V8 is more conservative than the spec allows (a misfeature, IMO) [23:26] mape: anyone used msgpack and had issues with malformed output from the pack method? [23:27] micheil: tjholowaychuk: okay. I'm going to add it in then :P [23:27] micheil: (using third party filter addition) [23:27] creationix: beelzabub1: tjholowaychuk's right, JSON.stringify does escape unicode stuff and write ASCII text [23:27] mape: micheil: does conn.write accept buffers? [23:27] tjholowaychuk: micheil: haha pff :p its not really a "filter" you would have to have a filter that accepts args then [23:27] micheil: :partial filepath, variables [23:27] micheil: mape: tell me. [23:27] tjholowaychuk: to magical [23:27] inimino: creationix ⋱ try JSON.stringify('¬') [23:28] micheil: tjholowaychuk: >_> [23:28] creationix: inimino: '"\\u00ac"' [23:28] inimino: creationix ⋱ and also, keep in mind that V8 might get fixed [23:28] creationix: lol [23:28] mape: micheil: well need to get msgpack running first, just wondering if it worth it [23:28] creationix: inimino: we can hope [23:28] beelzabub1: yeah - i wouldn't make additional assumptions about implementation than what the contract specifies [23:28] beelzabub1: it's not a viable long-term strategy [23:28] creationix: inimino, beelzabub1, I'm not saying you're wrong, just explaining why I did it the way I did [23:28] creationix: It was simple and works [23:29] creationix: why not [23:29] micheil: tjholowaychuk: could I convince you to add support for filter variables? [23:29] creationix: simplicity means a lot to me [23:29] tjholowaychuk: micheil: you are welcome to try :) [23:29] beelzabub1: using embedded nulls is no less simple & far more robust [23:29] tjholowaychuk: but in that scenario nope [23:29] blaines has joined the channel [23:30] creationix: beelzabub1: it's less simple in that I can't see them in my text editor, and not more robust because JSON.stringify is retarded and escapes everything [23:30] creationix: s/less simple/not less simple/ [23:30] beelzabub1: creationix: have you tried a better text editor? [23:30] beelzabub1: you can pad the null with \n & \t [23:31] creationix: beelzabub1: if I need a special text editor, then maybe that's a bad mark on the complexity of the format [23:31] micheil: tjholowaychuk: I think it's doable. [23:31] beelzabub1: creationix: most (all?) text editors on *nix i've seen do it [23:31] pgriess: mape: sample code? [23:31] creationix: beelzabub1: I agree, that true unicode + nulls is better if that were an option [23:31] creationix: beelzabub1: but I don't have that, I have JSON.stringify [23:32] tjholowaychuk: micheil: it is, I just dont want to make jade some weird programming / template language hybrid thing [23:32] beelzabub1: when you write it out - then when you go to view it, you'll see a nice illegal character + indententation [23:32] micheil: tjholowaychuk: the pure reason I need them is because I have a template that recurses on it's self [23:32] tjholowaychuk: filter is for filtering text thats it [23:32] beelzabub1: write(JSON.stringify(foo)) [23:32] beelzabub1: write(0); [23:32] beelzabub1: done [23:32] micheil: tjholowaychuk: as in [23:32] pquerna: Wrote 104857600 bytes in 0.068740s using 65536 byte buffers: 1454.757056mB/s [23:32] pquerna: ahaha [23:32] tjholowaychuk: micheil: check out the "connect" branch for how Express handles the partials [23:32] pquerna: c ftw [23:32] mape: pgriess: Oh yeah, got it working, http://gist.github.com/474722 had errors, needed to su for some reason [23:32] micheil: :jsfunction arguments [23:32] tjholowaychuk: in the template it is just - partial('something', collection) [23:32] micheil: or something [23:32] tjholowaychuk: well != partial [23:32] beelzabub1: btw - i figured this might interest people. i have a version of nodejs starting up 10x faster [23:33] pgriess: mape: strange. maybe your user and root have different paths/c compilers [23:33] beelzabub1: on my pre, this means 30-70ms instead of 700 [23:33] creationix: beelzabub1: what's faster than instant ;) [23:33] tjholowaychuk: micheil: you can have jade.helpers ( i think is what i called it ) so jade.helpers.foo = function(){} [23:33] pgriess: mape: $UID shouldn't impact one's ability to compile code ;) [23:33] beelzabub1: creationix: what do you mean? [23:33] tjholowaychuk: micheil: which should then be available as a local variable to every template [23:33] creationix: 700ms really? [23:33] micheil: tjholowaychuk: okay.. [23:33] tjholowaychuk: micheiil: or maybe im thinking of express, haha i cant remember [23:33] beelzabub1: it's a 500mhz coretex a8 - what do you expect [23:33] mape: pgriess: But when running sys.puts(packJson({"a" : 1, "b" : 2, "c" : [1, 2, 3]}).toString()), shouldn't I get {"a":1,"b":2,"c":[1,2,3]} ? [23:34] pgriess: mape: headers from the gist indicate make vs. make C=gcc-4.2 CXX=gcc-4.2 [23:34] beelzabub1: on desktop it takes 30-40ms [23:34] beelzabub1: but then my turbo mode takes sub-1ms [23:34] pgriess: mape: what is packJson()? [23:34] blaines has joined the channel [23:34] creationix: beelzabub1: nice [23:34] mape: Oh, that is just a wrapper for packJson = msgpack.pack; [23:35] mape: if I want to swap between msgpack and native JSON [23:35] creationix: beelzabub1: so what did you do to speed it up? [23:35] beelzabub1: i'm waiting for management to OK me signing the contributor lisence [23:35] beelzabub1: fork() [23:35] pgriess: mape: ok. so your example will attempt to print the msgpack buffer as a string [23:35] pgriess: mape: which will be some binary goo [23:35] pgriess: mape: not json [23:35] kevm_ has joined the channel [23:35] beelzabub1: so i start up a server [23:35] creationix: beelzabub1: so it will never work on windows? [23:35] mape: pgriess: So isn't msgpack a replacement for JSON.parse/stringify? [23:35] beelzabub1: creationix: unclear [23:36] creationix: beelzabub1: well, even if not, we might be able to fork the code logic so posix is faster [23:36] beelzabub1: then when i get a request to launch a script, child_process.fork(function() { server.destroy(); require(script); process.loop();}); [23:36] creationix: ryah believes in fast startup time [23:36] [[zz]] has joined the channel [23:36] beelzabub1: creationix: windows does have a fork implementation [23:36] mape: pgriess: Since it seems it can unpack ordinary json that is stringified [23:36] beelzabub1: the problem is it's an internal API that's poorly documented [23:37] beelzabub1: so it can have side-effects we don't know about [23:37] creationix: beelzabub1: so you're spawning a process per request? [23:37] creationix: or is it more a node process server [23:37] beelzabub1: yeah - the model we have is that we have a bunch of Javascript services that are dynamically launched when they need to be [23:37] Alystair has joined the channel [23:37] beelzabub1: (when a request comes in) [23:37] zaach has joined the channel [23:38] creationix: beelzabub1: ok, so it doesn't help with cold start node processes [23:38] beelzabub1: no [23:38] creationix: well, still cool [23:38] beelzabub1: snapshots may help there maybe [23:38] creationix: and since it's a special case, windows support doesn't matter [23:38] beelzabub1: but why do you care about the cold start of a node process? [23:38] creationix: ever used rhino? [23:38] beelzabub1: no [23:38] beelzabub1: actually, you are right - cold start is important [23:38] creationix: it's cold start is so slow that it turns lots of people away [23:39] creationix: but node it nice and snappy [23:39] Dmitry1: node is awesome… [23:39] beelzabub1: depends how powerful your boxen are :) [23:39] beelzabub1: it's really slow for my purposes :) [23:39] creationix: Dmitry1: my new brown t-shirt is awesome ;) [23:39] creationix: beelzabub1: yeah, I see [23:39] tjholowaychuk: creationix: whats the least hackish way to clear all the records from the nStore db [23:39] pgriess: mape: you can translate between msgpack and json using some utils that i included: bin/json2msgpack and bin/msgpack2json [23:39] pgriess: mape: both read from stdin, write to stdout [23:39] Dmitry1: creationix: where is my new brown hoodie? [23:40] mape: pgriess: so is that faster then just doing JSON.stringify(obj) ? [23:40] s1 has joined the channel [23:40] pquerna: ryah: https://gist.github.com/51e65287e3d4bee2dd7b [23:40] pgriess: mape: msgpack is an alternate serialization format and library for serializing/de-serializing JS objects into this format [23:41] creationix: Dmitry1: sorry, it's on Abe's desk still [23:41] pgriess: mape: this format is not compatible with JSON [23:41] mape: So more for ipc then talking to the client? [23:41] pgriess: mape: msgpack cannot read json strings and JSON.parse() cannot read msgpack streams [23:41] mikeal has joined the channel [23:41] pquerna: ryah: so, doing IO in node, and doing it in C. C version will always be faster, its never doing anything crazy with threading like node, but what I'm amazed at is _how_ much slower it is. [23:41] pgriess: mape: well its a serialization format -- it's for whatever you want [23:41] creationix: tjholowaychuk: hmmm [23:41] pquerna: hmm, actually, i guess i need more flush() in there [23:41] pgriess: mape: but if you're exchanging data w/ another party they'd better have a msgpack implementation [23:42] mape: pgriess: k, just got confused since the unpack seemed to work fine with straight up json [23:42] pgriess: mape: can you show me an example of this. i don't believe it, frankly ;) [23:42] tjholowaychuk: creationix: gah irc fucked me over. does nStore have #clear() or some public api for turfing all the keys [23:42] creationix: tjholowaychuk: no, but I should probably add one [23:43] pquerna: i'll write an email i guess. [23:43] tjholowaychuk: creationix: that would be wicked, I was going to just truncate the file but something public would be nice [23:43] beelzabub1: pquerna: carefull - flush makes your I/O slower [23:43] creationix: tjholowaychuk: here is the naive way to do it http://github.com/creationix/nstore-session/blob/master/lib/nstore-session.js#L88 [23:43] sechrist has joined the channel [23:43] pquerna: beelzabub1: well, right, thats the point though, to match the sysccalls that node is doing :) [23:43] mape: pgriess: um yeah.. nm ;) [23:43] pgriess: mape: :) [23:44] beelzabub1: node shouldn't be calling flush [23:44] beelzabub1: is it? [23:44] creationix: tjholowaychuk: no truncating the fill will blow it up, don't do that [23:44] tjholowaychuk: creationix: that works too, ill just do that for now but if you chuck it in the api let me know [23:44] creationix: tjholowaychuk: though if you can remove all the keys on index and trigger a compact that will clear it faster than calling remove for each key [23:45] creationix: much easier from the internal code where you can access the closure [23:45] tjholowaychuk: hm [23:47] rictic has joined the channel [23:48] pgriess: creationix/tjholowaychuk: you guys have a less-verbose name for 'middlewares'? [23:48] creationix: pgriess: filters? [23:48] tjholowaychuk: pgriess: layers maybe [23:48] creationix: layers is good [23:49] nj_dancer has joined the channel [23:49] beelzabub1: the docs for Buffer.splice are slightly confusing [23:49] tjholowaychuk: connectStackLayer [23:49] tjholowaychuk: lol [23:49] mscdex: splice or slice? [23:49] pgriess: heh [23:49] beelzabub1: is it startIndex (inclusive) & endIndex (exclusive) [23:49] beelzabub1: splice [23:49] beelzabub1: slice [23:49] beelzabub1: sorry [23:49] creationix: beelzabub1: yes, I think [23:49] mjr_: What would be a better way to say that? [23:49] beelzabub1: the default param on that should be the buffer length [23:50] mjr_: We changed that bit ∫of the docs like a week ago. [23:50] s1: Hi I am new to node, I was writting a custom app server in node, I wanted to know that how I can protect some shared data variable against concurrent requests ? [23:50] beelzabub1: mjr_ - give a better example [23:50] satori: s1 : you dont need too [23:50] mscdex: s1: there's no threading, so no concurrecy problems [23:50] mjr_: s1: node is a single thread [23:50] beelzabub1: e.g. buf1.slice(3, 5) [23:50] davidwalsh has joined the channel [23:50] satori: heh [23:51] s1: satori: Ok so say concurrent HTTP/Socket requests are queued... [23:51] s1: ? [23:51] satori: no, node is single threaded so there is never more than one block of code executing at a time [23:52] s1: satori: Oh ok! [23:52] mjr_: beelzabub1: oh, I see. I'm not sure that there is a default param. I think you need both. But yes, it is start(inclusive) to end(exclusive) [23:52] mscdex: it would be nice if Buffer had methods like indexOf or something... [23:52] beelzabub1: yes it is - i was saying it would be nice if it was the default param [23:52] beelzabub1: it would be nice if the Buffer api was like the QByteArray api [23:52] beelzabub1: in terms of features [23:52] beelzabub1: that is one of the best byte buffer implementations i've ever seen [23:54] creationix: tjholowaychuk: ok, added #clear() [23:54] tjholowaychuk: creationix: nice! ill pull [23:55] mikeal: has someone written a simple command line argument parser yet? [23:56] s1: mscdex: Mind if i jump in to ask... wont index of be dependent on the encoding also... I mean index of what here? [23:56] tjholowaychuk: mikeal: while / switch :) [23:56] mscdex: s1: Buffers are binary [23:56] mikeal: that's no good [23:56] s1: mscdex: hmm [23:57] mscdex: mikeal: i've used optparse-js [23:57] mikeal: that one isn't good enough [23:57] mikeal: dammit [23:57] mscdex: then fork it and improve it :-) [23:57] mjr_: mikeal: there are several "options parsers" on the modules page. I want one too, but I'm not sure I want to take on an external dependency for something like that. [23:57] mikeal: i have one that is just terrible code but actually works [23:57] tjholowaychuk: option parsers suck ass [23:57] mjr_: mikeal: kind of seems like we should have some simple options parsing in node. [23:57] mikeal: mjr_: the api for that is too damn opinionated [23:57] mscdex: not having an option parser sucks ass [23:57] mscdex: :P [23:58] mikeal: maybe i'll work on one tonight [23:58] tjholowaychuk: while / switch is so flexible and simple [23:58] tjholowaychuk: not sure why I ever used option parsers [23:59] aurynn has joined the channel