[00:00] LadyGaga: NuckingFuts: So the browser has to talk to node everytime the UI needs to something?
[00:00] James_tKirk: there might be something here.
[00:00] marcello3d: is there a node->java connector?
[00:00] marcello3d: you could use swing ;)
[00:00] NuckingFuts: LadyGaga: ...
[00:00] NuckingFuts: No
[00:00] NuckingFuts: LadyGaga: NATIVE UI. IN NODE.
[00:00] NuckingFuts: Node runs alone, no browser
[00:00] perezd has joined the channel
[00:00] James_tKirk: Historically Java was written to fill that purpose.
[00:00] LadyGaga: NuckingFuts: For desktop apps? And please don't yell
[00:00] NuckingFuts: I am not talking about a Web UI.
[00:00] James_tKirk: KHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAN!
[00:00] NuckingFuts: Sorry, I'm just facepalming soooooo much.
[00:00] James_tKirk: Lets give him some rope.l
[00:01] LadyGaga: NuckingFuts: me 2
[00:01] James_tKirk: okay - so you want to use Node to do the things that people tried to do with Java?
[00:01] NuckingFuts: marcello3d: We do not speak of Java, that foul language that ruined the name for JavaScript.
[00:01] NuckingFuts: James_tKirk: Yes, but not as shitty.
[00:01] James_tKirk: no - it was lame -
[00:01] LadyGaga: NuckingFuts: Why do you need node when you can just use v8 for this?
[00:01] NuckingFuts: Preferably just simple abstraction.
[00:02] James_tKirk: Please don't do to me what people here do all the time - mistake an example of an applicaiton of technology for praise for said technology.
[00:02] NuckingFuts: LadyGaga: ... Do you even have the SLIGHTEST clue what V8 is?
[00:02] marcello3d: hey what's the syntax for getters in object literals?
[00:02] NuckingFuts: Because you sure don't seem to.
[00:02] James_tKirk: There is definately room for that.
[00:02] marcello3d: v8: { x get: function() { return 1 } }
[00:02] v8bot: marcello3d: SyntaxError: Unexpected identifier
[00:02] marcello3d: v8: { get x: function() { return 1 } }
[00:02] v8bot: marcello3d: SyntaxError: Unexpected identifier
[00:02] marcello3d: hmmm
[00:02] NuckingFuts: marcello3d: { get item(){ return 1} }
[00:02] LadyGaga: NuckingFuts: Yes. Stop trolling
[00:03] James_tKirk: As Aria mentioned eariler (and please people can we act as adults? What Would Ryan Do?) GTK might cover some ground.
[00:03] marcello3d: v8: { get x() { return 1 } }.x
[00:03] v8bot: marcello3d: SyntaxError: Unexpected identifier
[00:03] marcello3d: :(
[00:03] aurynn has left the channel
[00:03] NuckingFuts: v8: { get test(){ return 1; }.test
[00:03] v8bot: NuckingFuts: SyntaxError: Unexpected identifier
[00:03] LadyGaga: NuckingFuts is making ##node seem like a hostile place.
[00:04] NuckingFuts: v8: {}.__defineGetter__('test',function(){ return 1; }).test
[00:04] v8bot: NuckingFuts: SyntaxError: Unexpected token .
[00:04] NuckingFuts: ...
[00:04] James_tKirk: so I think you'd have to shop around to see what kind of graphic libraries like GTK are out there, and which ones cover the most ground, and probably pick two and develop a self contained package that forked between them.
[00:04] marcello3d: lady: might want to be careful with that machine gun bra, too
[00:04] James_tKirk: CHILDREN BEHAVE.
[00:04] marcello3d: v8: var o= {}; o.__defineGetter__('test',function(){ return 1; }); o.test
[00:04] v8bot: marcello3d: 1
[00:04] marcello3d: so ugly
[00:04] LadyGaga: NuckingFuts: And I do know what v8 is -- I've written C++ library bindings
[00:04] NuckingFuts: marcello3d: There's a better way I know
[00:04] James_tKirk: Can we please respect the idea with being jackasses?
[00:05] NuckingFuts: LadyGaga: No offense, but I'm pretty sure you don't understand that V8 is essentially useless in and of itself.
[00:05] NuckingFuts: It's a bare-bones JS environment.
[00:05] mikeal has joined the channel
[00:05] NuckingFuts: Cool, you can iterate and... Do nothing with the results.
[00:05] marcello3d: v8: { get x () { return 1 } }.x
[00:05] James_tKirk: ACTION is pretending that people are trying to accomplish something and soldiers on
[00:05] v8bot: marcello3d: SyntaxError: Unexpected identifier
[00:05] NuckingFuts: How exciting.
[00:06] marcello3d: v8: { get x () { return 1 }, set x(val) { throw Error } }.x
[00:06] v8bot: marcello3d: SyntaxError: Unexpected identifier
[00:06] marcello3d: hmm
[00:06] James_tKirk: I think you could very easily develop for and fork between say, cocoa and .NET
[00:06] NuckingFuts: v8: var obj = { get a() { return "something" }, set a() { "do nothing" } }; obj.a;
[00:06] v8bot: NuckingFuts: "something"
[00:06] NuckingFuts: marcello3d: ^
[00:06] marcello3d: v8:var o= { get x () { return 1 } }; o.x
[00:06] v8bot: marcello3d: 1
[00:06] marcello3d: interesting
[00:06] NuckingFuts: James_tKirk: The issue is more how to make the UI look like it was meant for each OS
[00:06] James_tKirk: that woiuldn't use node as such - but you could use Node to create a general purpose IDE.
[00:07] James_tKirk: using the conventions in .NET and Cocoa would take care of a lot of that.,
[00:07] James_tKirk: However you almost have to give up the mobile platform - its just too diffuse. Unless you had an amazing and well funded team.
[00:07] NuckingFuts: James_tKirk: Yeah, but I mean, each has different UI conventions, and the problem is how to handle that lol
[00:07] tmpvar has joined the channel
[00:08] NuckingFuts: Well, yeah. Mobile? Nobody cares, I don't even think Node runs on that anyways
[00:08] James_tKirk: Well you have two basic options - fork or homogenize.
[00:08] James_tKirk: Node runs on Palms. FWIW
[00:08] James_tKirk: I'd suggest that Node would be better used as the app creation ENGINE then the final platform.
[00:08] James_tKirk: Use Node to script an app in a generalized markup a la JavaFX
[00:08] davidc_ has joined the channel
[00:08] davidc_ has joined the channel
[00:08] James_tKirk: and implement via forks in each environment.
[00:08] NuckingFuts: James_tKirk: I'm sorry, but that didn't make sense to me.
[00:09] NuckingFuts: I'm just saying, I'd like to be able to make a window, and have it, ya know, make a window, on any OS
[00:09] James_tKirk: yes -
[00:09] NuckingFuts: And be able to make a button
[00:09] derferman has joined the channel
[00:09] NuckingFuts: Markup for that can come later
[00:09] NuckingFuts: You need the API before the markup
[00:09] PyroPeter has joined the channel
[00:10] James_tKirk: What I am saying is that you might want to try to create a "Platonic development environment" that writes native coco AND .NET projects.
[00:10] James_tKirk: the IDE could be, say, Eclipse
[00:10] NuckingFuts: James_tKirk: wat. I don't use an IDE.
[00:10] James_tKirk: and the backend code could be Node
[00:10] NuckingFuts: I use Notepad++, and I refuse to use an IDE.
[00:10] NuckingFuts: IDEs are too heavy for me.
[00:11] NuckingFuts: Same reason I use Firefox instead of Opera or SeaMonkey
[00:11] James_tKirk: Well, you could look at the way JavaFX abstracted graphic elements into a nested graphic language
[00:11] sonnym has joined the channel
[00:11] James_tKirk: The implementation was tragic but the scripting language was clever.
[00:11] NuckingFuts: James_tKirk: I don't touch Java. It's a horrid language.
[00:11] jamescarr: James_tKirk, yes, the implementation was a tragedy, which is a shame
[00:11] jamescarr: NuckingFuts, whatever
[00:12] James_tKirk: again - not advocating language - just observing useful features of it.
[00:12] jamescarr: NuckingFuts, oh wait nevermind, it is :)
[00:12] NuckingFuts: I still have nightmares about Java.
[00:12] jamescarr: the lack of closures is a regretable. Thats why if you can, use an alternative language on the JVM
[00:12] gmci has left the channel
[00:12] James_tKirk: PLEASE people - when I give examples they are specific to the feature I am highlighting, not an implied advocacy of the entire project.
[00:12] jamescarr: I prefer scala or groovy on the jvm myself ;)
[00:12] ezmobius has joined the channel
[00:12] jamescarr: James_tKirk, hehehehe... I know
[00:12] jamescarr: thinking JavaFX is Java is a joke :)
[00:13] marcello3d: god, highlighting is so overrated
[00:13] marcello3d: you should use postits
[00:13] NuckingFuts: James_tKirk: Anyways, I think this would be wonderful lol
[00:13] jamescarr: I thought JavaFX's syntax was decent really
[00:13] marcello3d: and man, giving examples? so 2010
[00:13] marcello3d: _>
[00:13] NuckingFuts: I just want some basic API calls, which would allow for a simple markup language to be implemented in JS itself rather than in the core API part.
[00:13] jamescarr: James_tKirk, oh, you mean implement Drools? BPM?
[00:13] James_tKirk: And general layout definitions
[00:14] NuckingFuts: James_tKirk: Eh? But the UI conventions between OSes is nearly impossible. I'd say allowing for different UI layouts for different OSes would be wise.
[00:15] drdave has joined the channel
[00:15] James_tKirk: Possibly. Or just define it in a contolled subset of JavaScript with classical structre and reverse engineer the class behaviors in .NET and Cocoa.
[00:15] marcello3d: how do I make require("myfile") return a function
[00:15] Yuffster has joined the channel
[00:15] marcello3d: module.exports = function() { ... } ?
[00:15] James_tKirk: Yes - you would be stuck with field, dropdown, button, checkbox.
[00:15] NuckingFuts: marcello3d: exports = function yeah
[00:15] severla has joined the channel
[00:15] marcello3d: is module.exports required?
[00:15] marcello3d: or is exports sufficient
[00:16] JimBastard: http://www.youtube.com/watch?v=MSZLLgel6Gs
[00:16] NuckingFuts: James_tKirk: It'd be wise to make it modular, so you could add other UI elements without modifying the base.
[00:16] James_tKirk: You could create a "forked language" that says, "when context == .NET do {} else {} " - not a pleasant conventionj
[00:16] SubStack: marcello3d: `exports =` doesn't work, you have to `module.exports =`
[00:16] SubStack: although this is fixable I think on the node side of things
[00:16] Bonuspunkt has joined the channel
[00:16] gmci has joined the channel
[00:16] NuckingFuts: James_tKirk: How about using precompilation?
[00:17] marcello3d: JimBastard: mono audio?
[00:17] NuckingFuts: I'm pretty sure precompilation is now common practice in multi-platform environments.
[00:17] severla: SubStack: I've seen code using only exports without having been defined; as say var exports= module.exports ... why is this?
[00:17] marcello3d: video sounds weird in headphones
[00:17] JimBastard: lol, oops
[00:17] JimBastard: ill try it out
[00:17] James_tKirk: Okay - given that I've gone this far with you - can I play devil's advocate?
[00:17] Nuck has joined the channel
[00:18] JimBastard: yeah marcello3d , thats fucked
[00:18] JimBastard: dammit
[00:18] James_tKirk: What is your use case for an app that is NOT browser based, and that you want to release using native code on multiple platforms?
[00:18] marcello3d: sounds like someone farting on the left channel
[00:18] James_tKirk: Proably not a game - they tend to have custom native UI
[00:18] sivy has joined the channel
[00:19] James_tKirk: Not a social network or social app which work fine on the web
[00:19] James_tKirk: Who do you see as someone who is the best use case for this kind of abstraction?
[00:19] NuckingFuts: James_tKirk: A simple setup system?
[00:19] NuckingFuts: A bot for chats which doubles as a client?
[00:19] NuckingFuts: An IRC client?
[00:19] NuckingFuts: Plenty of uses.
[00:19] marcello3d: what advantage does node.js give you?
[00:20] marcello3d: over all the other languages in the world that do what you're saying
[00:20] James_tKirk: Why would you need any of those kind of centrallized things to be multiplatform?
[00:20] jimt has joined the channel
[00:20] NuckingFuts: marcello3d: Because it's asynchronous, and JS is a very commonly-known language?
[00:20] James_tKirk: I can satisfy any investor for those sort of apps by writing to a single platform.
[00:20] NuckingFuts: James_tKirk: I'm not dealing with investors, I'm dealing with end-users.
[00:21] NuckingFuts: If I had APIs for each language, it'd be fine
[00:21] NuckingFuts: Err, each OS
[00:21] NuckingFuts: I could take it from that
[00:21] zylo has joined the channel
[00:21] James_tKirk: I would suggest that coding an application for Eclipse would solve all these problems.
[00:21] NuckingFuts: ...
[00:21] James_tKirk: Eclipse can be used to develop custom apps.
[00:22] James_tKirk: I'm not trying to be obtuse.
[00:22] James_tKirk: really.
[00:22] NuckingFuts: I don't understand how this would be helpful? I just want to have a UI on a Node thing. Is this too much to ask for?
[00:22] marcello3d: you could use chromeless or air for any of those examples
[00:22] NuckingFuts: I mean, Ruby has bindings to all kinds of UI things!
[00:22] marcello3d: (both javascript)
[00:22] James_tKirk: I'm suggesting that Eclipse already have native cross platform UI.
[00:22] NuckingFuts: ...
[00:22] James_tKirk: Ruby is web centric. This problem doesn't exist for web apps - mostly. You took Web off the table.
[00:23] NuckingFuts: James_tKirk: I'm not talking about RoR
[00:23] NuckingFuts: I'm talking about basic Ruby
[00:23] James_tKirk: Yes - okay - got it. I don't have first hand effective experience in R / RoR
[00:23] James_tKirk: But I think I got your point.
[00:23] NuckingFuts: There's two of us on deviantART chat who are coding bots. I'm doing a bot in NodeJS, other guy's doing one in Ruby.
[00:23] NuckingFuts: The Ruby bot is gonna get a UI, thanks to Ruby's APIs for a UI
[00:24] marcello3d: NuckingFuts: maybe look at how node-opengl does the binding in c
[00:24] NuckingFuts: And I'm left shaking my fist at his back bumper.
[00:24] James_tKirk: okay - now we have a context to address, that makes this more productive.
[00:24] marcello3d: pick your favorite c/c++ cross platform toolkit
[00:24] NuckingFuts: On the bright side, my bot restarts in under a half a second lol
[00:24] marcello3d: and port it
[00:24] marcello3d: make a web UI for your bot
[00:24] marcello3d: that'd be way more badass than a native ui, imo
[00:24] marcello3d: you could control it from your ipad
[00:25] marcello3d: anyone with a browser could see public stats on the bot
[00:25] marcello3d: on its own personal website
[00:25] marcello3d: without downloading/installing anything
[00:25] James_tKirk: First off - this is not a "oh lets open up a git stack and solve this problem in a weekend and then have cake" thing
[00:25] James_tKirk: This is a very difficult and laborious problem.
[00:25] Nuck has joined the channel
[00:25] Nuck: Gah fuckign internet.
[00:25] James_tKirk: it would have to be approached in stages, with a significant team, and a lot of time.
[00:26] mscdex: scotty.js
[00:26] James_tKirk: I'm not saying these things to discourage you - just trying to point out that doing this right is a significant investiment.
[00:26] NuckingFuts: James_tKirk: I figured :P
[00:26] mscdex: dude, the cake is a lie
[00:26] mscdex: :o
[00:26] NuckingFuts: mscdex: ... wat?
[00:26] mscdex: James_tKirk mentioned having cake
[00:27] James_tKirk: I would say this - just creating a kind of "UML for Apps" without a solution engine in mind is a start.
[00:27] mscdex: :D
[00:27] James_tKirk: yes its a thing.
[00:27] marcello3d: James_tKirk: but it'd be badass, and he'd have a better bot ui than the other guy, just cause
[00:28] NuckingFuts: lolololol
[00:28] marcello3d: isn't that enough reason enough?
[00:28] James_tKirk: I doubt any single commercial application would justify the effort - but it would be an interesting exercise.
[00:28] NuckingFuts: I wonder if it's feasible to provide Qt bindings into JS?
[00:28] mscdex: someone already started on gtk bindings!
[00:28] mscdex: :d
[00:28] SubStack: mikeal: another jsbbq you say! :D
[00:28] marcello3d: how to output json in jade?
[00:28] NuckingFuts: mscdex: orly?
[00:29] mikeal: oh hell yeah :)
[00:29] SubStack: sounds awesomely awesome
[00:29] mscdex: NuckingFuts: yep
[00:29] SubStack: oh right and I'll whip up another nodeconf proposal for you ;)
[00:29] marcello3d: aha. #{JSON.stringify(users)}
[00:29] James_tKirk: I think you would want to focus on application centric specs before even starting in on the graphic layer - being able to describe widgets at the "black box" level - how many field widgets, defaults, choices, required input,l et all
[00:29] skm has joined the channel
[00:29] marcello3d: James_tKirk: you heard the guy, gtk bindings. problem solved
[00:29] NuckingFuts: GTK is a hideous thing. Nothing has a worse UI than GIMP.
[00:30] SubStack: if you need to pad out track B I can help with that!
[00:30] James_tKirk: Nothing we know of :D
[00:30] marcello3d: does connect support reverse routing?
[00:30] NuckingFuts: Holy shit. According to Wikipedia, Chromium uses GTK+ :V
[00:30] mscdex: NuckingFuts: https://github.com/maelstrom/node-gtk
[00:30] marcello3d: probably on linux only
[00:30] James_tKirk: see- its not the language its the implementation.
[00:31] James_tKirk: Anyway - don't know if I helped you any - or came to a conclusion.
[00:32] NuckingFuts: I know, let's support wxWidgets
[00:32] skm has joined the channel
[00:33] marcello3d: god finally NuckingFuts closed his dangling troll tag
[00:33] marcello3d: we can get back to work
[00:33] marcello3d: was getting tiring!
[00:34] jakehow has joined the channel
[00:34] James_tKirk: ...
[00:34] mscdex: there's also https://github.com/brainfucker/node-gui
[00:34] mscdex: another gtk binding
[00:34] mscdex: :p
[00:35] radeck has left the channel
[00:35] marcello3d: how do people break up their code into multiple files?
[00:35] marcello3d: do you put different routes in different files?
[00:35] marcello3d: or do stuff like app.get("blah", require("blah"))
[00:35] Evet_ has joined the channel
[00:36] marcello3d: wat. I have to do ./file for my local files?
[00:36] marcello3d: sad :(
[00:36] NuckingFuts: I think it could be problematic to use GTK instead of Qt
[00:36] NuckingFuts: Seeing as GTK is C, and Qt is C++
[00:36] NuckingFuts: So Qt would prolly be easier to port
[00:37] NuckingFuts: Though I'd not want the whole thing. Looks like it's fucking huge.
[00:37] Vertice has joined the channel
[00:37] Aria: Qt and GTK are both pretty tight. GTK is definitely unixier.
[00:37] NuckingFuts: Aria: Ah, so more unintuitive?
[00:37] Aria: No....
[00:38] NuckingFuts: lol
[00:38] James_tKirk: I do have to say - if I was writing a multiplatform app, I would just use Flash and custom graphic apps. You would get visually consistent - not native, but consistent - results and a simple delivery scheduile.
[00:38] Aria: More pieces.
[00:38] NuckingFuts: But flash is sloooooooooooooooow.
[00:38] NuckingFuts: And a bitch.
[00:38] Aria: Nah, not that slow. Just annoying and likely to heat your GPU.
[00:38] NuckingFuts: And it's exactly what JS is trying to get rid of now ;)
[00:39] Aria: (And completely not native and really no fun to use.)
[00:39] NuckingFuts: yeah
[00:39] Aria: (Flash is the new Java ;-)
[00:39] marcello3d: D:
[00:39] marcello3d: what's wrong with java
[00:39] Aria: Have you /used/ something written in Java lately?
[00:39] NuckingFuts: Aria: Well, not quite. Unlike Java, it's not TOTAL shit. At least it looks pretty and loads within a few seconds ;-)
[00:39] Aria: Heh.
[00:39] marcello3d: aria: yes, every day D:
[00:39] Aria: Are we talking about the same Flash?
[00:40] NuckingFuts: Aria: yes.
[00:40] NuckingFuts: Java manages to take 30 seconds to load a single Apple
[00:40] NuckingFuts: *Applet
[00:40] marcello3d: my ide is written in java
[00:40] marcello3d: what kind of shitty computer do you have?
[00:40] NuckingFuts: And it tends to look like total shit by default.
[00:40] marcello3d: most java applets load in a few seconds nowadays
[00:40] marcello3d: they improved a lot with plugin2
[00:40] NuckingFuts: marcello3d: A very good one :B
[00:40] marcello3d: out of process applets and whatnot
[00:40] Aria: At least Flash toolkits can manage type hinting.
[00:40] James_tKirk: You could write a backend data server in Node and use Flash for your frontend.
[00:41] marcello3d: but yea, flash for ui is a bit questionable, imo
[00:41] NuckingFuts: Aria: And the UI doesn't look like an industrial building or a Geocities site.
[00:41] James_tKirk: If you are writing pedestrian applications the performance is probably adequte - and the development cycyle would be much shorter than your White Whale.
[00:42] NuckingFuts: James_tKirk: Not really. I've had more success with doing C++ stuff than ActionScript
[00:42] NuckingFuts: And I know more JS than C
[00:43] James_tKirk: Well you could write an OpenGL driven app in C and pair it with a Node backend.
[00:44] marcello3d: actionscript is javascript
[00:44] James_tKirk: My point being - I don't think that you gain much by attempting to cater to multiple native UI style sets and you inflate your delivery way beyond the point of reason.
[00:44] NuckingFuts: marcello3d: Not quite
[00:44] aheckmann has joined the channel
[00:44] NuckingFuts: AS3 is to JS what XML is to HTML
[00:45] NuckingFuts: A more bitchy version
[00:45] marcello3d: as3 is ecmascript 4
[00:45] markwubben_ has joined the channel
[00:45] marcello3d: but it's backwards compatible with prior ecmascripts
[00:45] at133 has joined the channel
[00:45] James_tKirk: keep in mind - you only have to do the INTERFACE in actionscript.
[00:45] James_tKirk: You can script the APPLICATION in node and make it SOA.
[00:45] NuckingFuts: marcello3d: Error 1077 I believe is the error that means absolutely jack shit.
[00:45] breccan has joined the channel
[00:46] marcello3d: ?
[00:46] NuckingFuts: marcello3d: It's an error that occurs in AS when there is nothing wrong.
[00:47] marcello3d: ok?
[00:47] NuckingFuts: Like, I can double-check everything, and it'll show an issue
[00:47] devrim: language wars on nodejs channel.. not interesting.
[00:47] NuckingFuts: In JS, it works flawlessly
[00:47] marcello3d: great.
[00:47] James_tKirk: And you could use Flex as a basis for the UI - and Flex already has an abstract desription syntax - and just use object remoting to put the bulk of your work in Node.
[00:47] James_tKirk: hey Devrim - you still looking for a Mongooser?
[00:47] devrim: yes i do
[00:48] devrim: u know one?
[00:48] James_tKirk: I have worked a lot with mongo native - I can pull off some Mongoose work.
[00:48] devrim: do u have time now?
[00:48] James_tKirk: Where in the world are you?
[00:48] devrim: new yok
[00:48] mkrecny: pivot
[00:48] James_tKirk: close enough.
[00:48] devrim: *york
[00:48] James_tKirk: I'm in SF
[00:49] James_tKirk: I am on contract and could slow-boat the project at nights - next weekend I could work in earnest.
[00:49] devrim: u'r where all the cool guys are ..
[00:49] marcello3d: woo new york
[00:49] marcello3d: woo san francisco
[00:49] devrim: uhm by the next wkend probably need your some other skillset :)
[00:49] James_tKirk: I'm too old to be cool.
[00:50] James_tKirk: I have a full time contact in San Jose - I am working (technicallly) now.
[00:50] bingomanatee: This is bingomanatee - by the way -
[00:50] marcello3d: oh man, I thought you were from star wars
[00:50] devrim: hey bingomanatee
[00:50] marcello3d: *disappointed*
[00:50] devrim: mongoose help needed :)
[00:50] bingomanatee: I'm just saying I can't guarantee any hours of free time til then.
[00:50] bingomanatee: lets talk priv
[00:51] devrim: oh
[00:51] devrim: i thought u just came in :)
[00:51] at133: Hi, I'm trying to use readFile to open a file. The file is above the directory my js file is in. I get bad file descriptor errors when I try './images/test.gif'. What is the correct way to do this?
[00:51] marcello3d: bingomanatee: are mongo native dbs and collections reusable?
[00:51] marcello3d: or do you create new ones for every request?
[00:51] bingomanatee: yes ; no
[00:52] bingomanatee: I persist my collections inefinately in noogle.
[00:52] marcello3d: what about two simultaneous requests?
[00:55] davidc_ has joined the channel
[00:57] markwubben has joined the channel
[00:57] bingomanatee: any number of, in theory any way
[00:58] bingomanatee: As long as you keep things non blocking thats Mongo's stock in trade.
[00:58] marcello3d: ok great
[00:58] marcello3d: so I can cache all the way to the collection level?
[01:05] MatthewMueller has joined the channel
[01:05] postwait has joined the channel
[01:06] postwait: what's the right way to timeout an HttpRequest?
[01:06] postwait: Is there an option for that I can't find, or do I need to setTimeout and call request.abort()?
[01:07] zylo_ has joined the channel
[01:09] lukegalea has joined the channel
[01:10] markwubben has joined the channel
[01:12] bmizerany has joined the channel
[01:13] gunnarhafdal has left the channel
[01:13] bingomanatee: marcello3d - not clear exactly what you mean by caching, but I attach my collection objects to persistent modules in noogle, and its been up for weeks without crashing.
[01:13] bingomanatee: In general I put all my node projects in chron to force them to reload but as far as I can tell things have been fine.
[01:15] severla has joined the channel
[01:15] severla: how do i use stylus from express?
[01:16] marcello3d: bingomanatee: yes, that's what I mean
[01:16] Friice has joined the channel
[01:17] bingomanatee: If you have concerns about persistence, encase your model classes in try/catch and recreate collections (probably from the database connection on up) on fail.
[01:17] bingomanatee: I don't closely monitor Noogle but I'm pretty sure its been fine.
[01:17] marcello3d: I don't have model classes yet
[01:18] bingomanatee: http://www.wonderlandlabs.com/wll_drupal/os/node/mongodb.html and noogle has a basic class system that I wrote before Mongoose matured - you can just trust Mongoose if you want.
[01:18] marcello3d: which object contains the actual connection(s) ?
[01:18] marcello3d: the db?
[01:19] marcello3d: Db
[01:19] bingomanatee: The database connects - then you request collection classes from the Db class using the collection() method.
[01:19] lukegalea has joined the channel
[01:19] marcello3d: yes
[01:20] marcello3d: would be nice if collection was smart enough to (re)connect when you call find or whatever
[01:20] bingomanatee: I don't know for sure whether the collection object contains said Db object or just the address of the mongo database on the network but for the most part I just get my colletion object and decorate it with a custom class.
[01:20] bingomanatee: They may very well be.
[01:20] yozgrahame has joined the channel
[01:20] bingomanatee: I honestly haven't tracked mongo / native fails enough to know how bad of a problem they are
[01:21] bingomanatee: If mongo fails in Noogle the whole app crashes - and chron will restart the app in this case.
[01:21] ossareh has joined the channel
[01:21] bingomanatee: If I were to run the stack as a commercial venture I would do more diligence there.
[01:22] boaz has joined the channel
[01:22] AAA_awright: Alright controversial for the channel: What's the best way to do cookie authentication? Is there a secure library already available?
[01:22] wilmoore has joined the channel
[01:22] bingomanatee: but on my laptop tests the only time that mongo fails is when I am running intense scripts that run many expensive processes simultaneously in a way that is probably not indicative of normal use. (i.e., several parallel map/reduces).
[01:22] marcello3d: what is chron? (assuming it's not the same as cron)
[01:22] bingomanatee: yes it is.
[01:23] bingomanatee: sorry sp.
[01:23] marcello3d: does cron detect when it fails?
[01:23] bingomanatee: I just have /path to/node.js "path_to/index.js" in chron.
[01:23] objectvar has joined the channel
[01:23] bingomanatee: If my app is alive it fails silent.y.
[01:23] marcello3d: ah
[01:23] bingomanatee: Its a "retard's daemon".
[01:23] marcello3d: so it'll be down for however long you have between cron calls
[01:23] objectvar: I have what is probably a REALLY stupid noob question ... but I'm going to ask it anyway
[01:23] bingomanatee: Yep -
[01:23] marcello3d: gotcha
[01:24] bingomanatee: Like I said - if I were in production I would run torture tests and log downtime.
[01:24] echosystm has joined the channel
[01:24] bingomanatee: I would in fact have a seperate node process that just pulled stock pages against the main app to test uptime.
[01:24] objectvar: whenever I call fs.readFile and try to print the parameter passed to the callback ... it always is null ... the file exists ... is there something else I should be trying?
[01:25] ezmobius has joined the channel
[01:25] bingomanatee: There are smarter scripts in git to keep your app alive.
[01:25] echosystm: is 0.4 really stable? ie. can run forever without crashing
[01:25] bingomanatee: I am just too busy building features in noogle to care about uptime right now. I haven't even rolled out the user / login system.
[01:25] objectvar: so if I do this: fs.readFile('myFile.txt', function(data) {sys.puts(data);}); it prints 'null'
[01:26] objectvar: even if myFile.txt exists ... is it a permissions thing?
[01:26] bingomanatee: Nothing can run forever without crashing.
[01:27] bingomanatee: At the least you have to consider the fact that the sun is going to die out pretty soon.
[01:27] echosystm: let me rephrase... how stable is 0.4 ?
[01:27] echosystm: (particularly the SSL/TLS bits)
[01:27] marcello3d: objectvar: isn't it function(err,data) { .. }
[01:27] bingomanatee: It doesn't have PHP's memory leaks
[01:27] marcello3d: http://nodejs.org/docs/v0.4.0/api/fs.html#fs.readFile
[01:27] bingomanatee: and it doesn't get hammered as badly as Apache when simultaneous users request from it
[01:28] marcello3d: yea
[01:28] bingomanatee: So it is only a little more stable than the languages now in production.
[01:28] objectvar: marcello3d, I see: fs.readFile(filename, [encoding], [callback])
[01:28] marcello3d: do people use load balancers in front of node?
[01:28] marcello3d: objectvar: look at the code example
[01:28] objectvar: oops ... geez ... see my mistake ... grrrrrrrrrrrr
[01:29] objectvar: I need to learn to read
[01:29] bingomanatee: I don't know of any sites with that kind of traffic that are relying on node.js - they may exists I just don't know what they are.
[01:29] objectvar: thanks
[01:29] marcello3d: sure
[01:29] marcello3d: the err thing is ugly, but there's no way around it in an async system
[01:29] objectvar: what a way to introduce myself!
[01:29] marcello3d: you either have second callback for errors, or pass it into the callback
[01:29] bingomanatee: yep, now you need a new nick.
[01:29] Friice: i have an apache server and i have a nodejs server serving some json
[01:29] Elaine1 has joined the channel
[01:29] Elaine1: hi
[01:29] Elaine1: i heard that abc_ has cancer and is terminal
[01:30] bingomanatee: What is your feeling for robustness / stability Friice?
[01:30] Friice: if i run the nodejs server on a different port of the main domain
[01:30] Friice: i have to use jsonp right? that means i should run it on the same domain to avoid that?
[01:31] bingomanatee: Node + http requires its own port. It will fail when you launch it against a port that is in use.
[01:31] objectvar: the example that I was looking at was old ...
[01:31] jimt_ has joined the channel
[01:33] marcello3d: you can use mod_proxy
[01:33] marcello3d: to route a particular url path to node...
[01:34] Friice: right
[01:34] Friice: but that's also sort of iffy haha
[01:35] marcello3d: how so?
[01:35] marcello3d: that's basically what fast-cgi + php is
[01:37] eventi has joined the channel
[01:37] Friice: I mean I am going to do that
[01:37] MatthewMueller has joined the channel
[01:37] Friice: just feels a lot less optimal than it should
[01:37] zentoooo has joined the channel
[01:37] marcello3d: then don't use apache ;)
[01:37] bingomanatee: My feeling is no matter what your platform, relying on a system with a single point of failure is unwise - you always want to assume it will fail and code around that. Anything else (on a professional level) is either naive or unwise.
[01:38] marcello3d: you referring to apache?
[01:38] bingomanatee: Node has a lot fewer moving parts than LAMP stacks and RoR so is commeasurately more stable - however because you gain performance by flattening the stack, you really have to assume that any borderline code failures will bring down the whole thing and code for that.
[01:38] jimt has joined the channel
[01:39] bingomanatee: I'm not actually referring to anyting.
[01:39] marcello3d: I mean, you NEED some kind of load balancer
[01:39] bingomanatee: I am saying - if you code in Node, your server stack is going to be a persistent system and when that persistent system fails
[01:39] bingomanatee: you will need a second system to bring it back.
[01:39] marcello3d: ideally something lightweight that rarely breaks, and can handle multiple nodes
[01:39] Friice: someone make a cms in node
[01:39] Friice: i'll dump apache
[01:40] bingomanatee: You can use a traditional load balancer in front of node if you want.
[01:40] SvenDowideit has joined the channel
[01:40] bingomanatee: Or write one in node - its not that hard.
[01:40] marcello3d: bingomanatee: that's my point
[01:40] Friice: don't we already have one
[01:40] marcello3d: are there any?
[01:40] davidc_ has joined the channel
[01:40] davidc_ has joined the channel
[01:40] marcello3d: that are decent?
[01:40] bingomanatee: I guess a node balancer is a good failover system.
[01:40] bingomanatee: dunno.
[01:40] AAA_awright: Friice: http://magnode.org/ is a WIP
[01:40] marcello3d: https://github.com/donnerjack13589/node-balancer
[01:41] marcello3d: that website is ugly :(
[01:41] AAA_awright: Mine?
[01:41] marcello3d: magnode
[01:41] AAA_awright: ...it's a WIP what can I say
[01:41] AAA_awright: Patches welcome :p
[01:41] Friice: oh holy shit
[01:41] marcello3d: :)
[01:41] Friice: awesome
[01:41] bingomanatee: Looks good to me.
[01:41] marcello3d: maybe it's just my browser
[01:42] AAA_awright: It's self serving, btw, lad balanced off of 4 Node.js instances
[01:42] marcello3d: I see lots of different fonts and lack of whitespace
[01:42] bingomanatee: Lets all use that, then be mean to AAA_awright when it fails!
[01:42] AAA_awright: *load
[01:42] Friice: oh have you also seen this
[01:42] Friice: https://github.com/robrighter/node-cms
[01:42] AAA_awright: Friice: Yeah that looks more like a document management platform thing, I'm going after data management and stuffs
[01:43] AAA_awright: Friice: Specifically, I'm representing *all* data with RDF
[01:43] bingomanatee: Seems like node-cms is far behind noogle, and thats not saying much.
[01:43] iszak has joined the channel
[01:43] bingomanatee: I mean express + mongoose == cms.
[01:43] AAA_awright: noogle?
[01:43] bingomanatee: At least I got a parametric form engine.
[01:44] bingomanatee: Noogle is backed by express.js MVC based system.
[01:44] Friice: i kinda want to try it
[01:44] Friice: why not github?
[01:44] bingomanatee: Has forms, routes, model, user/llogin and a spider.
[01:44] bingomanatee: it is in github.
[01:45] Friice: sorry i meant magnode
[01:45] bingomanatee: Its not by any means "Mature" - its just an extension of express and is bound to mongo.
[01:45] bingomanatee: what is magnode?
[01:45] Friice: http://magnode.org/
[01:45] AAA_awright: Friice: Take a look at the downloads page, though it's not usable in any form
[01:46] bingomanatee: Magnode looks pretty mature.
[01:46] bingomanatee: Does it sit on Express or just extend core Node?
[01:46] AAA_awright: All core
[01:46] marcello3d: hardcore :)
[01:46] Friice: your documentation is quite long
[01:47] AAA_awright: Plus Jade, a module for handling form data, and two modules for RDF data
[01:47] AAA_awright: It's suprisingly sparse, and mostly to-dos
[01:47] bingomanatee: ACTION can pull a vaporware CMS out of his ass too...
[01:47] AAA_awright: But it's coming along
[01:47] AAA_awright: I'll have a release once it has enough functionality to work as a blog
[01:47] mscdex: who owns magnode.org?
[01:47] AAA_awright: ME
[01:47] AAA_awright: *Me
[01:47] bingomanatee: At this point until nupal exists I really don't see why you can't just bind your favorite model to express and run with it.
[01:48] mscdex: there's a spelling mistake on the front page :S
[01:48] Friice: what's nupal
[01:48] AAA_awright: What mistake
[01:48] bingomanatee: my fantasy CMS - drupal in node.
[01:48] AAA_awright: I thought so
[01:48] Friice: ahh yeah, i'm going the other way lol
[01:48] mscdex: it should be "flexible templating systems" instead of "flebible"
[01:49] mscdex: :)
[01:49] bingomanatee: its fantastic -- in my head :D
[01:49] AAA_awright: bingomanatee: I'm pulling the good stuff off of Drupal, though I have to admit there isn't much good parts
[01:49] Friice: using this
[01:49] Friice: https://github.com/synodinos/nodepal
[01:49] Friice: too bad php is pretty lame
[01:49] bingomanatee: I think there are a lot of good use patterns in terms of the way the community modules interoperate.
[01:49] bingomanatee: Its cleverer than you might think from a superficial use of Drupal.
[01:49] AAA_awright: Friice: Actually for testing I am importing Drupal data and trying to re-host it
[01:50] AAA_awright: hundreds of nodes worth, >3000 RDF triples
[01:50] LadyGaga: Given this XML tag:
[01:50] Friice: pretty cool, so what kind of stuff is stored in database vs code?
[01:50] LadyGaga: How would I parse for the global word?
[01:50] AAA_awright: mscdex: hah wow
[01:51] bingomanatee: I think that a basic component model for Express would be the best first step. I have blueprints for it but I haven't fleshed it out. I am working on Node documentation integration into Noogle right now - when I get done with that I will focus on a component model for Express (or already have one.
[01:51] bingomanatee: )
[01:51] AAA_awright: Friice: RDF is pretty flexible so I'm storing almost _everything_ in database, including the descriptions of content types as Drupal does
[01:51] bingomanatee: ACTION is writing a web service for Drupal in Zend Framework for work
[01:52] AAA_awright: Except there's not just one data source, so you're not limited to a users table (for instance) to authenticate users against
[01:52] bingomanatee: Drupal would be a find web service -- if all the joins didn't bweak its widdle head... :D
[01:52] bingomanatee: so I take bits of data from views and sew them together in Zend, caching the components with Zend_Cache.
[01:52] bingomanatee: Its so retarded I feel a little embarrased for charging for it ... but I get a lot of other stuff tossed at me.
[01:52] Friice: what about development and version control
[01:53] bingomanatee: I have a whole thesis on that.
[01:53] maru_cc_ has joined the channel
[01:53] bingomanatee: http://www.wonderlandlabs.com/wll_drupal/os/changes.html
[01:53] marcello3d: ugh. mongodb-native is annoying me more :(
[01:53] marcello3d: I'm stepping through its code in node-inspector
[01:53] mscdex: AAA_awright: also under "Event-oriented architecture": s/efficency/efficiency, and
[01:53] bingomanatee: Don't worry. Tomorrow will be worse.
[01:53] mscdex: er that's it
[01:53] mscdex: :)
[01:53] marcello3d: it does so many things...including using callbacks when they aren't even needed
[01:54] bingomanatee: If you could design an app that integrates the data model with git in some way you would really have something.
[01:54] Friice: what do you think about aegir bingomanatee?
[01:54] marcello3d: node-git? :D
[01:54] bingomanatee: HEY! this is node.js - callbacks are ALWAYS needed!
[01:54] bingomanatee: every variable should be a callback.
[01:54] bingomanatee: aegir?
[01:54] marcello3d: yea no.
[01:54] marcello3d: only when IO/interrupts are involved should async be used
[01:55] AAA_awright: bingomanatee Friice: RDF stands for Resource Description Framework, and the mechanic I'm using is serve HTML representations of those resources, when you ask for them. So when you request http://magnode.org, the process asks for the data about the resources and HTML-izes it, though you could also ask for it in XML or N3 or RDFa whatever format
[01:55] bingomanatee: Aegir looks like Hugh Hefner's not new wife. She may be hot but Hef, you're still old.
[01:56] bingomanatee: Yeah I think if you were to just flatten every record into a REST representation of itself you could maintain your whole site with Git. It would be laborious but you would get conflict notices on your data changesets when you were ready to merge.
[01:57] bingomanatee: However if you kept EVERYTHING - files, code, data - in a repository like Mongo and applied Git-like functionality on it -you could make a pretty amazing deployement system.
[01:57] Friice: aegir is a good pattern for maintaing sites in database
[01:57] bingomanatee: Yes - if you drink the SQL coolaid I am sure it is okay
[01:58] altamic has joined the channel
[01:58] altamic has joined the channel
[01:58] bingomanatee: but I think that I would prefer to see a nondenominational system for data state archiving and retrieval
[01:58] broofa has joined the channel
[01:58] AAA_awright: I think we end up seperating content from presentation for a reason
[01:58] Friice: well yes
[01:59] perezd has joined the channel
[01:59] Friice: and exactly, so you can't just flatten everything
[01:59] bingomanatee: I know I'm a bit Quixotic at this point but I see everything from the Mongo perspective - resources should be nested documents and changesets should be relevant to these, not some ancient SQL artifact.
[02:00] bingomanatee: If I have a real estate site and I have a nested document that describes a house, and I work on it as a developer, and my client works on it in the admin, I care only about when I try to merge my house with his.
[02:00] bingomanatee: If there is a conflict there, I have a human decision to make. I don't give a shit about complex trees of SQL tables with integer IDs and such.
[02:00] Friice: what if your client wants to merge a house
[02:01] montylounge has joined the channel
[02:01] bingomanatee: Its just basic version control. The client is the trunk. I'm the developer - I fork the trunk to work on it and when I merge I most likely defer to the client's version of reality
[02:01] bingomanatee: Probably, I recheck out the bits of data that are in conflict and re-develop around them.
[02:01] NuckingFuts has joined the channel
[02:01] AAA_awright: Friice: If you're interested in what I'm doing I know I'll need testers who are setting it up new
[02:02] bingomanatee: Generally I'd expect that the client and the developer mostly deal with different parts of the app but when there is a conflict you have a brain-based decision point.
[02:02] Me1000 has joined the channel
[02:03] bingomanatee: I know its simplistic and abstract but that is my perspective on the general deployment problem.
[02:03] Blink7_ has joined the channel
[02:04] Friice: well, if it works for you :)
[02:04] Friice: AAA_awright yeah please, what can I do for you :)
[02:04] bingomanatee: it would - if it existed.
[02:04] bingomanatee: Yes - I would also like to try your system AAA_awright.
[02:05] AAA_awright: bingomanatee: Absolutely
[02:05] AAA_awright: I don't have anything right now
[02:05] AAA_awright: Friice bingomanatee: What do you know about RDF?
[02:05] MikhX has joined the channel
[02:05] bingomanatee: Nothing
[02:05] Friice: it's a way of describing content?
[02:05] Friice: i just went to the 4store site
[02:06] bingomanatee: I've been meaning to get into semantics.
[02:06] AAA_awright: I wonder if there's a good, non-prohibitive way of introducing it
[02:07] AAA_awright: Because it's a REALLY steep learning curve right now
[02:07] bingomanatee: convert it to a SQL schema and write a Drupal module for it :D
[02:07] bingomanatee: kidding...
[02:08] AAA_awright: Read the front page (which I need to figure out how to fix) and tell me if it's helpful at all in describing what it does
[02:08] AAA_awright: Or what it's useful for
[02:08] bingomanatee: I think if you were to write a utility that saves application state in RDF and compares versions of RDF archives to eachother as a preflight tool that would be usefl.
[02:08] bingomanatee: I think I get it.
[02:08] ezmobius has joined the channel
[02:08] bingomanatee: Its a non-denominational data storage structure
[02:08] AAA_awright: Yeah, one of the tricky things is it's not a data format like XML, it's a data model more like the DOM
[02:09] bingomanatee: Sure - its a storage convention.
[02:09] devrim1 has joined the channel
[02:09] pengwynn has joined the channel
[02:09] bingomanatee: I think the fact that it is designed to interoperate between repositories is interesting - but if you can store any single repo in it and save state with it, then do difference analysis, that alone would be useful.
[02:10] bingomanatee: If you can then apply the diffference engine to several data repos that would be a good thing.
[02:10] bingomanatee: If you could for instance store RDF data with every Git push then use a seperate engine as a difference engine you could solve some deployment tasks.
[02:11] bingomanatee: Especially if you can deploy part of the RDF through the Git file system in order to get more intelligence right off the bat about what changed.
[02:12] MatthewMueller: Does anyone know a good way of printing out the contents of an object without escaping characters like util.inspect() or console.log() do?
[02:13] AAA_awright: bingomanatee: Revisioning RDF is a challenge... The best way I've heard is you use an append-only database, and use a reasoner to determine the "current" data. For instance, "This is a status update" "This is a new status update" then a reasoner keep up-to-date the "current status"
[02:13] bingomanatee: Have you tried JSON.stringify(obj)?
[02:14] AAA_awright: That's going to escape newlines and backslashes
[02:14] MatthewMueller: yah, that's not what I want either.
[02:14] bingomanatee: AAA_awright: but can you break out RDF to make it atomic enough that every record is a file?
[02:14] bingomanatee: SO you can have a folder system like/database/table/record_id.json
[02:14] AAA_awright: MatthewMueller: I thought there was some colorizing console output console.log replacement
[02:14] bingomanatee: and if you digest your database that granularly
[02:15] bingomanatee: then you can use git merge data to gain intelligence on conflicting data states.
[02:15] brainproxy: MatthewMueller: so you want to see the UTF-8 in the output, is that it?
[02:15] MatthewMueller: AAA_awright: what about colorizing console output?
[02:15] Friice: anyone know of any cloud host where i can install drupal+node?
[02:15] MatthewMueller: brainproxy: Yah
[02:15] brainproxy: MatthewMueller: what about some funcs like this:
[02:15] brainproxy: http://pastie.org/1561180
[02:15] bingomanatee: ack.
[02:16] AAA_awright: MatthewMueller: There should be something you drop-in replace console.log=require('color-seralizer'); or something, I'm sure something like that exists
[02:16] LadyGaga: Given this XML tag:
[02:16] LadyGaga: How would I parse for the global word?
[02:16] Friice: yeah you can find the node color package on github
[02:16] MatthewMueller: brainproxy: Thanks I'll check that out.
[02:16] AAA_awright: LadyGaga: That's not valid XML
[02:16] AAA_awright: So, you can't
[02:16] LadyGaga: Why isn't it valid?
[02:16] bingomanatee: property with no value.
[02:17] MatthewMueller: AAA_awright: I'm a little confused by what you're saying - I'm not doing anything with colored output
[02:17] AAA_awright: It needs a value, yeah
[02:17] Blink7 has joined the channel
[02:17] AAA_awright: MatthewMueller: Just some debugger seralizer?
[02:17] AAA_awright: MatthewMueller: The colored output was a sugguestion I assumed you were trying to pretty-print objects
[02:18] bingomanatee: AAA_awright: I don't want to make RDF solve the versioning problem - I just want to use it to store state and run differentials with an outside system.
[02:18] MatthewMueller: Oh.. nope, just some function that will serialize an object without escaping it - actually part of the functionality not for debugging purposes
[02:18] LadyGaga: I don't see why a property has to have a value.
[02:18] brainproxy: MatthewMueller: keep in mind those methods I posted will be expensive
[02:19] AAA_awright: LadyGaga: This would be valid
[02:19] brainproxy: if the object's stringified value is significantly large
[02:19] LadyGaga: Such a restriction makes no sense.
[02:19] AAA_awright: LadyGaga: But what you provided should trigger a parser error
[02:19] LadyGaga: Hmm, redundant though
[02:19] tmzt: sholmes: hmm, okay. I haven't needed their support no issues with uptime though, nothing mission critical I just use it for staging right now
[02:19] MatthewMueller: brainproxy: yah thanks, I'll definitely keep that in midnnd.
[02:19] bingomanatee: MatthewMueller - you probably have to create a custom system to harvest, save and display your data as you like it if the conventional representations don't work for you
[02:19] isaacs has joined the channel
[02:20] AAA_awright: LadyGaga: No, simpler to parse, XML is a much simpler subset of SGML where a property with no value is acceptable
[02:20] brainproxy: bingomanatee: also remember that JSON.stringify silently drops functions
[02:20] brainproxy: sorry i MatthewMueller ^^
[02:20] brainproxy: not bingomanatee
[02:20] luke` has joined the channel
[02:20] LadyGaga: So then how do check for the existence of the global property when using document.XMLObject?
[02:20] bingomanatee: that is odd, isn't it?
[02:20] LadyGaga: err, XMLObject
[02:20] isaacs: SubStack: yo. https://github.com/isaacs/npm/issues/issue/580/
[02:20] sholmes: tmzt: wha?
[02:21] SubStack: click
[02:21] AAA_awright: LadyGaga: What module are you using to parse the XML?
[02:21] tmzt: sholmes: 2host, I just saw your response
[02:21] SubStack: isaacs: oh crap!
[02:22] mscdex: Qt or wxWidgets binding?
[02:22] Blink7_ has joined the channel
[02:22] boogyman has joined the channel
[02:22] AAA_awright: LadyGaga: Also, I would read up on the XML specication http://www.w3.org/TR/xml/ and more from http://www.w3.org/standards/xml/core
[02:22] SubStack: isaacs: ok fixed
[02:22] isaacs: SubStack: great, thanks :)
[02:22] LadyGaga: What is included with node to parse XML by default?
[02:22] isaacs: LadyGaga: the javascript String type.
[02:23] isaacs: LadyGaga: ;)
[02:23] brainproxy: LadyGaga: javascript has regex :)
[02:23] vilsonvieira has joined the channel
[02:23] isaacs: oh, that too. regexp
[02:23] isaacs: yeah
[02:23] sholmes: tmzt: how long ago did I ask about them.. Heh, all well.
[02:23] LadyGaga: isaacs: :@
[02:23] isaacs: LadyGaga: there are a few xml parsers you can install pretty easily with npm.
[02:23] sholmes: I went with IntoVPS btw
[02:23] isaacs: ACTION wrote one of them. the slowest awfulest one.
[02:23] sholmes: so far so good. They have a chat on their site and an IRC.
[02:23] piscisaureus: isaacs: that post of yours about the error event, it's a total mystery to me ...
[02:24] AbyCodes has joined the channel
[02:24] isaacs: piscisaureus: oh?
[02:24] isaacs: piscisaureus: you'd prefer it not throw?
[02:24] piscisaureus: is the error event being discussed like it shout be removed?
[02:24] isaacs: piscisaureus: nonono
[02:24] ryanfitz: ACTION did stuff
[02:24] LadyGaga: Wait, I thought node has a built in XML parser?
[02:24] piscisaureus: no I like it the way it is
[02:24] piscisaureus: but why did you start a discussion about it then?
[02:24] brainproxy: ACTION wants SO badly that someone should drop out of nodeconf so he can get off the waitlist
[02:24] NuckingFuts: LadyGagaLord, I wish.
[02:24] isaacs: piscisaureus: someone was like "why does it do this??" and i was all "cuz, we decided like a long long time ago." and then provided a link.
[02:25] piscisaureus: a ha
[02:25] LadyGaga: I might as well use JSON then!
[02:25] piscisaureus: hmm
[02:25] markstory has joined the channel
[02:25] ryanfitz has joined the channel
[02:25] piscisaureus: I think I missed the first part of the discussion then ...
[02:25] isaacs: LadyGaga: node doesn't come with many batteries included.
[02:25] isaacs: piscisaureus: ah,i see
[02:25] piscisaureus: heh lol
[02:25] NuckingFuts: LadyGaga: it's up to you lol
[02:25] piscisaureus: much ado about nothing
[02:25] isaacs: piscisaureus: at the time, i was the only one even slightly on the fence about it
[02:26] isaacs: piscisaureus: so it was somewhat gratifying for someone to complain about the inconsistency, even though it took a year XD
[02:26] LadyGaga: When we were kids we would destroy toys that didn't come with batteries included.
[02:26] SubStack: hooray by horrible bigint library is not so horrible anymore
[02:26] AAA_awright: LadyGaga: Yeah if you're representing structured trees of data you probably want JSON, unless you need specific XML features like for formatting
[02:26] SubStack: node-ffi <3
[02:26] isaacs: LadyGaga: that being said, the batteries are cheap and easily available.
[02:27] isaacs: LadyGaga: install npm, and then `npm ls xml`, and you'll see a bunch of choices.
[02:27] LadyGaga: Indeed
[02:27] SubStack: I'll do a quick blog post about this, node-ffi rocks
[02:27] AAA_awright: ...Or just look at the list and install by hand
[02:28] AAA_awright: Friice: Are you usually around to ping?
[02:28] isaacs: SubStack: yeah, node-ffi is cool
[02:28] piscisaureus: isaacs: actually, I liked the proposal by Stella Laurenzo to 'rethrow' exceptions thrown by EventEmitter callbacks as error events
[02:28] brainproxy: SubStack: looks neat, I've been thinking about a binding to lzjb and maybe a bindary diff utility and it looks like node-ffi might make it easier
[02:28] AAA_awright: Clearly bingomanatee just left... I'll check around later
[02:28] isaacs: piscisaureus: yeah, but that means wrapping every cb in a try/catch
[02:28] SubStack: brainproxy: check this out: https://github.com/substack/node-bigint/blob/master/bigint.cc
[02:29] SubStack: that's all the c I had to write
[02:29] brainproxy: SubStack: unfortunately I've never prog'd a line of C / C++, but I'll bmark it as that will def be a helpful ref for me to build from
[02:29] piscisaureus: isaacs: is that bad? performance? I mean we'd just need to hack EventEmitter.prototype.emit
[02:29] SubStack: I just keep track of the IDs on the javascript side where stuff is more sane
[02:30] isaacs: piscisaureus: try/catch is pretty expensive, last i checked (which, granted, was quite some time ago)
[02:30] vonkow has joined the channel
[02:30] micheil: isaacs: did you get those slides, by any chance?
[02:30] isaacs: piscisaureus: the thing about EventEmitter#emit is that it's the hottest code in node, so even a slight change can make a huge difference.
[02:30] isaacs: that's why it's so obnoxiously optimized
[02:31] dingomanatee has joined the channel
[02:31] isaacs: it's tempting to think "This api could be much more convenient!" but it's sparse for a good reason.
[02:31] piscisaureus: hmm
[02:31] dingomanatee: Is anyone in this channel based in the South Bay?
[02:31] cronopio has joined the channel
[02:31] isaacs: micheil: no, i think you im'ed me? can you email whatever it was?
[02:32] piscisaureus: yeah I understand the reasoning
[02:32] micheil: sure, which address?
[02:32] dingomanatee: I am presenting to the south bay LAMP group on March 22nd and would love to have more company.
[02:32] dingomanatee: My stuff is pretty thin at this point.
[02:32] isaacs: oh, er, wait, nvm, i can just search gmail, i'm dumb.
[02:32] brainproxy: isaacs: what is the relationship between the EventEmitter code in lib/ which is javascript and the c++ source?
[02:33] micheil: brainproxy: somewhat none, in short
[02:33] micheil: but at the same time heaps
[02:33] isaacs: brainproxy: js one is used almost everywhere, and the other is likely soon to be deprecated.
[02:33] isaacs: but there's still a few objects using it, i believe
[02:33] brainproxy: I recently wrote an abstraction class around EventEmitter so that you can use a custom-emitter with the exact same API whether you're in a browser or in node.js
[02:33] micheil: oh, right, I read that as the relationship between Events.js and the C++ source code
[02:34] brainproxy: if anyone is interested
[02:34] isaacs: once upon a time, event emitters were all instances of the C++ class, and the js was a light wrapper.
[02:34] brainproxy: micheil: yes, that's what I meant
[02:34] micheil: brainproxy: been there, done it :P
[02:34] sivy has joined the channel
[02:34] micheil: the C++ class isn't used much anymore, if at all.
[02:34] piscisaureus: isaacs: I doubt a js->c traversal performs any better than try catch
[02:34] kkaefer: micheil: emit is still implemented in C++
[02:35] dingomanatee: what remaining functionality is still in C?
[02:35] dingomanatee: ^ ^ race condition
[02:35] piscisaureus: questionSemaphore = new Semaphore(1);
[02:35] micheil: EventEmitter.emit is in javascript
[02:35] ChrisPartridge has joined the channel
[02:36] piscisaureus: huh no
[02:36] piscisaureus: micheil: where is it in c then?
[02:36] kkaefer: micheil: oh... yeah
[02:36] kkaefer: micheil: the Emit function is still there
[02:36] kkaefer: but it's not added to the prototype in Initialize...
[02:36] micheil: The C++ Class is only used within other C++ classes, iirc.
[02:37] piscisaureus: huh yeah
[02:37] LadyGaga: Is node.js Javascript faster than Ruby?
[02:37] kkaefer: oh true, so that's why Emit exists
[02:37] skm has joined the channel
[02:37] piscisaureus: emit is both in c++ *and* js
[02:37] kkaefer: piscisaureus: the emit function you call from JS is different from the one you call from C++
[02:37] zentoooo has joined the channel
[02:37] brainproxy: LadyGaga: I think you'd need to scope the question a bit better
[02:38] micheil: isaacs: is process.eventemitter even defined?
[02:38] micheil: LadyGaga: it's not something that easy to compare.
[02:38] piscisaureus: the Emit method in C++ ... that's just stupid
[02:38] kkaefer: piscisaureus: so when your C++ addon calls obj->Emit(String::NewSymbol("foo")), it's a different method from obj.emit("foo") in javascript
[02:39] LadyGaga: Hmm
[02:39] kkaefer: piscisaureus: technically you don't need that method, yeah
[02:39] brainproxy: LadyGaga: if you want ruby-like OO facilities when writing your javascript you may want to look at joose: http://joose.it
[02:39] kkaefer: you could do obj->Get(String::NewSymbol("emit"))
[02:39] kkaefer: and call that function
[02:39] piscisaureus: kkaefer: yes and that's how it should be done
[02:39] kkaefer: hmm, you might be right
[02:40] kkaefer: can't think of any good reasons why that's still in C++
[02:40] piscisaureus: no me neither
[02:40] kkaefer: if at all, ->Emit() should call that, as a convenience wrapper
[02:40] kkaefer: instead of iterating through the listeners of its own
[02:40] yozgrahame has joined the channel
[02:40] kkaefer: might be the source of nasty bugs when the C++ implementation differs from the JS implementation
[02:41] tilgovi has joined the channel
[02:41] sholmes: Anyone know where to get help on apache/server stuff?
[02:41] piscisaureus: I didn't do no benchmarking but afaict v8 generates more efficient code than what we can achieve with c++
[02:41] piscisaureus: well, when heavily accessing js stuff, that is
[02:42] brainproxy: sholmes: why not ask around in #slicehost, lots of knowledgeable folks there
[02:42] sholmes: well, I don't have a slicehost account, does that matter?
[02:42] brainproxy: not really, just ask general questions :)
[02:42] brainproxy: it may not be the support staff that answers, but just other folks hanging out
[02:43] sholmes: oh okay, cool. Thanks buddy
[02:43] isaacs: micheil: yes, process.EventEmitter still exists. Don't rely on it. Use the require('events').EventEmitter
[02:43] piscisaureus: isaacs: suppose that v8 would make try/catch fast, what would you think about this exception->error event proposal
[02:43] piscisaureus: ?
[02:43] micheil: yeah, I just noticed it still in the node.cc code..
[02:43] isaacs: piscisaureus: it'd be pretty neat.
[02:43] piscisaureus: (because I happen to know they do care about it :-))
[02:44] isaacs: piscisaureus: so just to be clear: e = new EventEmitter; e.on("error", function (er) { console.log(er.message) }) ; e.on("foo", function () { throw new Error("foo") }) ; e.emit("foo") ACTION wrote node-bench for these kinds of bullshit debates
[02:55] micheil: http://jsperf.com/try-catch-002
[02:56] micheil: there's some big differences
[02:56] micheil: like, 100,000,000 ops/sec
[02:58] therrg has joined the channel
[02:58] konobi: that's 0.000000000001 sec per op vs 0.00000000001 sec per op
[02:58] konobi: =0)
[02:59] micheil: it is still a significant change
[03:00] konobi: at that point you're worrying about cpu-switching latency
[03:00] isaacs: ACTION re-running the benchmark..
[03:00] mscdex: node.js rules!
[03:01] piscisaureus: v8: var count = 0, inc = function() { count++; }, start = new Date(), delta; do { inc(); delta = (new Date()) - start; } while (delta < 5000); (count / delta) + " ops/sec without try/catch";
[03:01] therrg: Hey there - what's the correct way to handle binary data? The docs at http://nodejs.org/docs/v0.4.0/api/buffers.html#buffers are confusing. The bit under the 'binary' encoding tells you not to use that encoding method... what's the alternative?
[03:01] v8bot: piscisaureus: Error: Timeout
[03:01] dingomanatee: after I type "npm docs jsdom" where do I go to read said docs?
[03:01] piscisaureus: v8: var count = 0, inc = function() { count++; }, start = new Date(), delta; do { inc(); delta = (new Date()) - start; } while (delta < 1000); (count / delta) + " ops/sec without try/catch";
[03:01] v8bot: piscisaureus: "967.537 ops/sec without try/catch"
[03:01] isaacs: dingomanatee: it should try to open in a web browser.
[03:01] piscisaureus: v8: var count = 0, inc = function() { count++; }, start = new Date(), delta; do { try { inc(); } catch (e) {}; delta = (new Date()) - start; } while (delta < 1000); (count / delta) + " ops/sec with try/catch";
[03:01] v8bot: piscisaureus: "917.721 ops/sec with try/catch"
[03:02] jdub: isaacs: wow, that burns
[03:02] AAA_awright: piscisaureus: new Date() is a suprisingly long operation
[03:03] isaacs: jdub: all that proves is that try/catch is less overhead than new Date()
[03:03] piscisaureus: yeah it surprises me how bad it is
[03:03] isaacs: piscisaureus: check out node-bench.
[03:03] isaacs: it's relentless
[03:03] jdub: isaacs: oh, i missed earlier talk, just looking at try/catch vs. not
[03:03] AAA_awright: I have to sample a few runs and then guess how many runs won't go over 3 seconds of testing, to avoid using new Date() within my benchmarks
[03:03] piscisaureus: isaacs: can I run that on windows you think?
[03:04] piscisaureus: like, without an hour of coding before it?
[03:04] postwait: isaacs: doesn't that count the Date creation and math in the ops?
[03:04] isaacs: piscisaureus: https://gist.github.com/1bd41bf74c2bf95d24fc
[03:04] isaacs: piscisaureus: pretty damning, actually.
[03:05] piscisaureus: isaacs: hmm that really sucks bigtime
[03:05] dingomanatee: boom! NSPlugin Viewer *** WARNING: unhandled variable 18 () in NPN_GetValue()
[03:05] admc has joined the channel
[03:05] isaacs: noop wihtout tc: 91473. noop with tc: 14078
[03:05] Ari-Ugwu has joined the channel
[03:05] marcello3d: not surprising really
[03:05] postwait: I agree it is not surprising.
[03:05] marcello3d: but if you put the try-catch outside the loop
[03:05] marcello3d: what's the difference?
[03:05] isaacs: the *worst* case is if you actually throw an error.
[03:05] postwait: but, unfair to say it is insignificant.
[03:06] piscisaureus: isaacs: but that isnt a hot path
[03:06] isaacs: then it goes from 10k rps down to 68
[03:06] piscisaureus: but try-catch itself should not hurt so match
[03:06] isaacs: yeah, actually throwing will be rare
[03:06] marcello3d: it's probably something v8 could optimize if they wanted to
[03:06] marcello3d: interesting
[03:06] postwait: try and catch are hard problems to optimize.
[03:07] isaacs: of course, the next step is to actually implement a catching-emit(), and then see how that affects the hello world benchmark, client benchmarks, etc.
[03:07] marcello3d: if I try to reuse server/collection objects
[03:07] marcello3d: they fail
[03:07] isaacs: things that actually emit a lot
[03:07] isaacs: as big a percentage as this is, it's still getting lots and lots of operations per second.
[03:07] jdub: isaacs: get any benches for eventemitters?
[03:08] isaacs: 8000 Hz is a lot of operations :)
[03:08] piscisaureus: I'm outa here. (that is "i gotta run" in izs-speak :-p)
[03:08] piscisaureus: I will bug mraleph tomorrow. He told me once they were on it, so maybe theres news.
[03:08] piscisaureus: isaacs: now kick me. just so you know what it feels like.
[03:08] dingomanatee: isaacs: I appreciate your help - the docs are not loading; when I run as myself it fails, when I sudo the command it loads the git site.
[03:10] isaacs: ok, wrote a better benchmark...
[03:10] isaacs: piscisaureus: have fun :)
[03:10] isaacs: whoa!! i have rights!!
[03:10] ecto has joined the channel
[03:10] isaacs: hahaah
[03:11] admc1 has joined the channel
[03:11] isaacs: ACTION mwahahahah!!!
[03:11] marcello3d: isaacs: do multiple nested try-catches make it exponentially worse?
[03:11] isaacs: marcello3d: not sure
[03:11] marcello3d: or is it a one-time cost?
[03:11] isaacs: good question, though!
[03:11] ecto: hey guys, getting a weird error i've never seen before
[03:11] drdave has joined the channel
[03:11] ecto: running forever start app.js
[03:11] ecto: and i get node: symbol lookup error: /usr/local/lib/node/.npm/daemon/0.3.0/package/build/default/daemon.node: undefined symbol: ev_loop_fork
[03:11] postwait: marcello3d: should be linearly worse.
[03:11] isaacs: ok, actually wrapping an emit() call in a try/catch is about half as fast.
[03:11] isaacs: so yeah, that's pretty bad.
[03:11] postwait: there is fixed cost in v8 to setup a try block
[03:12] dingomanatee: is there a way to manually find and browse documentation?
[03:12] ecto: also any word on ssl in 0.4?
[03:12] admc has joined the channel
[03:12] postwait: ecto: working for me.
[03:13] ecto: i get socket hangups unless i fall back to 0.2.6
[03:13] luke` has joined the channel
[03:13] postwait: ecto: really? ssl is badly broken in the 0.2 series.
[03:13] isaacs: ecto: the api changed.
[03:13] isaacs: ecto: check the docs. it's not .setSecure() any more.
[03:14] isaacs: ecto: use the new require('https').get(...)
[03:14] postwait: The tls stuff is new and different.
[03:15] ecto: well that makes a lot of sense.
[03:15] bmizerany has joined the channel
[03:15] isaacs: ok, even with a listener that does quite a bunch of stuff, not having a try/catch around it is 36.15% faster than having a try/catch
[03:15] ecto: sometimes i feel like node is moving too fast for me to keep up with
[03:17] marcello3d: it is
[03:17] eventi has joined the channel
[03:17] drdave: is there *any* sample code out there that will help me make sense of the mess that is tls.connect?
[03:18] mike5w3c_ has joined the channel
[03:20] postwait: drdave: what's the issue? tls.connect is fairly straight forward.
[03:20] drdave: postwait: i'd have hoped so...
[03:20] postwait: the only "odd" thing is that it is the only ssl-ish call that doesn't take the output of "createCredentials"
[03:20] drdave: but i'm spending ages running through the code trying to figure what's going on...
[03:20] postwait: it taks the _input_ of createCredentials.
[03:20] bentruyman has joined the channel
[03:21] drdave: after trying to refactor old code that used setSecure()
[03:21] drdave: first off: is there any reason why the callback might not be called?
[03:21] postwait: setSecure take the output of crypto.createCedentials({...})
[03:21] drdave: I know... I have changed that bit to match the doc...
[03:21] postwait: in the new tls stuff... you have to pass the {...}... (silly if you ask me)
[03:21] marcello3d: this is cool
[03:21] marcello3d: I'm porting a play/scala app to node.js
[03:21] marcello3d: and after a few days it's finally starting to look like the original app :)
[03:22] drdave: postwait: definitely stupid in terms of making the transition from previous API calls painless
[03:22] postwait: And.. wasteful
[03:22] marcello3d: painful process though
[03:22] postwait: If you are making a lot of outbound ssl connections...
[03:22] marcello3d: so many unstable apis in node.js
[03:22] drdave: it seems the socket gets opened, but the callback never called (not a huge deal, just don't get why)
[03:22] postwait: I'm going to see if that can be patched without breaking anything.
[03:22] postwait: I'll see if I can get some code out.
[03:23] keks has joined the channel
[03:23] drdave: also: is there any way to set event listeners for the socket before connecting (since the socket is created upon calling tsl.connect)?
[03:23] drdave: the lib i'm trying to fix relied heavily on setting all sorts of listeners before connecting... which seems impossible with the new API call...
[03:25] isaacs has joined the channel
[03:25] marcello3d: according to goolge chrome it's using 26 gigs of virtual memory
[03:25] marcello3d: (and 1.2 gigs of real)
[03:26] postwait: drdave: https://gist.github.com/825441
[03:26] lukegalea has joined the channel
[03:26] drdave: postwait: thanks. I'll play with this...
[03:27] drdave: but isn't the fact that listeners are set *after* connecting kind of a problem?
[03:27] keks: what is goint to happen to crypto when it is removed from core?
[03:27] drdave: what if the error or close msg gets sent immediately?
[03:27] postwait: no
[03:27] marcello3d: drdave: not if the actual connection happens once the js stack finishes
[03:27] drdave: is that callback function supposed to be called no matter what (doc seems to say yes)?
[03:28] marcello3d: e.g. similarly to process.nextTick
[03:28] postwait: drdave: not sure.
[03:28] drdave: hmn. ok...
[03:28] keks: also regarding crypto, does anyone know why this doesn't work: https://gist.github.com/825438
[03:28] drdave: but then how can i ever be notified that the socket has connected?
[03:30] MatthewMueller has left the channel
[03:32] drdave: postwait: thanks for that code, but does it work on your end?
[03:33] postwait: yeah.. that's production code.
[03:33] drdave: over here, I can't ever get the callback to get executed (I replace the conncb by a log)
[03:33] drdave: no error either :/
[03:33] postwait: the part that got me was this.creds is what was the _input_ to crypto.createCredentials
[03:33] marcello3d: what do you guys use to gzip encode your output?
[03:34] postwait: drdave: does openssl s_client work for you?
[03:34] drdave: hold on
[03:35] LadyGaga has joined the channel
[03:36] LadyGaga: Does node.js have a recursive regular expression matcher?
[03:36] Aria: No, it's v8's as is.
[03:37] Aria: (regular expressions don't exactly recurse...)
[03:37] devrim has joined the channel
[03:37] marcello3d: what does that mean, LadyGaga?
[03:37] LadyGaga: So what do you do if you have multiple matches?
[03:37] marcello3d: oh
[03:37] marcello3d: just read up on javascript regexps
[03:37] marcello3d: https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/RegExp
[03:37] postwait: repetitive matcher.. not recursive
[03:37] marcello3d: you probably want the /g flag
[03:37] LadyGaga: Yes, that I need
[03:38] marcello3d: and the exec method
[03:38] brainproxy: LadyGaga: recommendation, read the node.js API docs from start to finish
[03:38] brainproxy: besides that, it's just javascrit
[03:38] echosystm: SubStack: is there any way to get dnode to sit at a certain point in the rack when used with connect?
[03:38] brainproxy: so you can look to a good JS reference
[03:38] brainproxy: like MDC
[03:38] LadyGaga: Okay
[03:38] echosystm: i mean, instead of having it sit at the top?
[03:38] LadyGaga: MDC is not as good as Chome is it?
[03:39] brainproxy: the API docs and a JS refernce, that's all you need to know the basics of node
[03:39] brainproxy: well i meant for basic JavaScript reference material
[03:39] LadyGaga: So v8 is exactly the same as Mozilla's?
[03:39] LadyGaga: oh
[03:39] brainproxy: or get the JavaScript Definitive Guide book
[03:39] LadyGaga: ECMAScript ref
[03:40] brainproxy: LadyGaga: I mean this https://developer.mozilla.org/en/JavaScript/Reference
[03:40] brainproxy: and this: http://nodejs.org/docs/v0.4.0/api/
[03:40] marcello3d: nodejs docs won't talk about regexp though
[03:41] brainproxy: no, but there's info in mdc js ref
[03:41] LadyGaga: What's the wildcard in regular expressions?
[03:41] brainproxy: .
[03:41] brainproxy: is for any char
[03:41] marcello3d: cept newlines ;)
[03:41] LadyGaga: Well, I want to match newlines too :)
[03:41] marcello3d: depending on the flags
[03:41] marcello3d: read the docs
[03:41] brainproxy: LadyGaga: see https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/RegExp
[03:41] marcello3d: it's something you gotta just learn
[03:42] marcello3d: javascript regular expressions are pretty standard
[03:42] marcello3d: (amazingly enough)
[03:42] LadyGaga: Okay, I am matching this:

[\s\S]

[03:42] marcello3d: pretty forward thinking for them to have it in the standard
[03:42] marcello3d: that'll only match one character
[03:43] marcello3d: between

and

[03:43] marcello3d: it's all explained on https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/RegExp
[03:44] marcello3d: though if you're new to regular expressions, you might want to find a general tutorial on how to learn them
[03:44] marcello3d: that doc is more technical/useful if you already know them
[03:44] marcello3d: and want to know any js-specific quirks
[03:44] samsonjs has joined the channel
[03:45] softdrink has joined the channel
[03:46] marcello3d: wow. express's gzip support spawns a child process and runs gzip o_O
[03:46] LadyGaga: marcello3d: Sounds inefficient
[03:46] marcello3d: that seems like it might add more overhead than you save by gzipping
[03:47] brainproxy: marcello3d: I've got the LZJB algo implemented in pure javascript in a github repo .. repo's not in that great of shape and no docs, but you might find it helpful
[03:48] brainproxy: it does work, is extremely fast
[03:48] brainproxy: and if there is a lot of repetitive stuff, it's pretty efficient
[03:48] LadyGaga: The solution: \(div\).*?\(\)
[03:48] marcello3d: but browsers don't support that, do they?
[03:48] LadyGaga: Or maybe I should get an HTML parser :\
[03:48] brainproxy: marcello3d: see https://github.com/michaelsbradleyjr/Compress
[03:49] brainproxy: at some point I'll clean up the repo and write an actual README :p
[03:49] LadyGaga: What's an awesome HTML parser?
[03:49] marcello3d: brainproxy: I'm looking for browser gzip compression though
[03:49] brainproxy: marcello3d: this lib can do lzbj in node and browser
[03:49] brainproxy: same code works in both contexts
[03:49] marcello3d: yes, but I'm trying to do standard http gzip compression
[03:49] marcello3d: via Accept-Encoding:gzip,deflate,sdch
[03:50] brainproxy: oh, i see, nvm then, sorry :)
[03:50] marcello3d: and responding with Content-Encoding: gzip
[03:50] marcello3d: thanks though :)
[03:50] brainproxy: yep
[03:50] marcello3d: there's this project: https://github.com/egorich239/node-compress
[03:50] LadyGaga: I wish there was a node-htmlparser
[03:50] marcello3d: which links to zlib
[03:50] brainproxy: maybe that node-ffi thing that substack mentioned can help
[03:51] marcello3d: LadyGaga: there is
[03:51] marcello3d: this page is your friend: https://github.com/ry/node/wiki/modules
[03:51] brainproxy: sounds like it would be more efficient spawning hcild
[03:51] brainproxy: *child process
[03:51] brainproxy: node-ffi that is
[03:51] marcello3d: https://github.com/tautologistics/node-htmlparser
[03:52] bronson: OK, here's the question I was asking poorly this morning... Has anyone tied node.js and pushState together?
[03:53] marcello3d: node-ffi looks interesting but not the kind of thing I want to get involved with :)
[03:53] marcello3d: aha
[03:53] marcello3d: here we go: https://github.com/kriszyp/pintura/blob/master/lib/jsgi/compress.js
[03:54] dingomanatee: FWIW I found what I was looking for in HTMLparser.
[03:54] Aria: bronson: They don't have to connect at all. node runs on the server. pushState is entirely on the client. Never the two shall meet.
[03:54] dingomanatee: Yeah HTML parser works - it breaks your DOM into nice object tree. Just started using it.
[03:55] dingomanatee: I am breaking apart the Node.js docs for digestion in Noogle with it :D
[03:55] marcello3d: what is noogle?
[03:55] brainproxy: noogle?
[03:55] dingomanatee: its the best thing ever :D
[03:55] dingomanatee: a. k. a. "the only thing I actually have ever done with node.."
[03:56] dingomanatee: (well, of substance)
[03:56] dingomanatee: You are noogle. You are ALL noogle.
[03:56] bronson: Aria, they do meet. The page needs to either rendered entirely on the server, or partially on the server, depending on user actions.
[03:56] dingomanatee: Did I just BLOW your MIND?
[03:56] marcello3d: no
[03:56] brainproxy: dingomanatee: ;p
[03:56] dingomanatee: http;//narrative.io:3000
[03:56] bronson: It's either a lot of code duping or code/framework to take care of that.
[03:56] marcello3d: your url is winking at me
[03:56] lukegalea has joined the channel
[03:57] marcello3d: wow
[03:57] marcello3d: 1 is more popular than npm
[03:57] marcello3d: by 10 times...
[03:57] marcello3d: npm npm npm npm npm npm npm npm npm npm
[03:57] marcello3d: that should even the score a bit
[03:57] isaacs: what's more popular than npm?
[03:57] dingomanatee: You ain't seen nothing yet - I am filtering out stop words and adding user / login and documentaiton integration.
[03:57] dingomanatee: the letter "1"
[03:57] brainproxy: dingomanatee: looks cool
[03:57] isaacs: oh, ok
[03:57] marcello3d: 1 is not a letter
[03:57] dingomanatee: its a noogle thing.
[03:57] marcello3d: it is a free man!
[03:57] dingomanatee: "1" is a letter.
[03:58] ajnasz has joined the channel
[03:58] isaacs: yeah, 1 is always the most popular number.
[03:58] marcello3d: bah
[03:58] marcello3d: npm npm npm
[03:58] marcello3d: guys!
[03:58] marcello3d: you can't let 1 win like that
[03:58] dingomanatee: it is also the lonliest number that you ever heard....
[03:58] LadyGaga: Tautological arguments never win.
[03:58] dingomanatee: I am filtering out all numerals in the next release of noogle.
[03:58] marcello3d: I still don't think 1 is a letter
[03:59] marcello3d: character maybe
[03:59] dingomanatee: I just have a bunch of stuff I want to put out in a bundle so I'm letting noogle the infant release sit there for a while.
[03:59] dingomanatee: fine. On moogle it's a number.
[03:59] brainproxy: 1 is the loneliest number
[03:59] brainproxy: proof: http://www.youtube.com/watch?v=XfkPRwKVGZ0&feature=fvsr
[03:59] dingomanatee: on Noogle I am GOD. and its a letter.
[03:59] marcello3d: moogle D:
[03:59] marcello3d: well you have an icon now ;D
[03:59] marcello3d: I thought 2 was the loneliest number
[04:00] dingomanatee: It is >= the lonliest number.
[04:00] dingomanatee: "Two can be as sad as one..." but it can also be less sad.
[04:00] marcello3d: wow
[04:00] LadyGaga: I wish I could modify http://www.mobilemp4.co.cc/madonnas_back.jpg from node.js
[04:00] marcello3d: they have a beatles album on that song...
[04:00] marcello3d: good job
[04:00] LadyGaga: I want to vectorize it
[04:00] dingomanatee: It can't be more sad ... because "one IS THE LONLIEST NUMBER; one IS THE LONLIEST NUMBER...."
[04:01] beawesomeinstead has joined the channel
[04:01] beawesomeinstead has joined the channel
[04:01] keks has joined the channel
[04:01] marcello3d: that'd be a fun web proxy. convert everything to comics sans and cartoonize all pictures
[04:02] brainproxy: that's how i have my stylesheets prefs set in SeaMonkey
[04:02] LadyGaga: marcello3d: And don't forget to overlay Madonna pics on everything :D
[04:02] marcello3d: that wouldn't be very comicy
[04:02] marcello3d: but maybe BAF
[04:02] marcello3d: and POW
[04:02] marcello3d: every now and then
[04:03] ossareh has joined the channel
[04:03] b5avage has joined the channel
[04:03] LadyGaga: And inject Madonna music in every page via HTML5 audio ;p
[04:03] LadyGaga: Hmm, I would pay for such a service I think...
[04:03] marcello3d: you're not really lady gaga, are you?
[04:04] LadyGaga: I am Lady Gaga's meat dress.
[04:04] marcello3d: you thought you could trick us
[04:04] LadyGaga: :(
[04:04] marcello3d: with your fine wines
[04:04] marcello3d: and cocktail wieners
[04:04] LadyGaga: LALALALAL
[04:04] LadyGaga: CAN'T READ MY CAN'T READ MY
[04:05] LadyGaga: No one can read my poker face!
[04:05] marcello3d: sorry. listening to cake, doesn't work.
[04:05] hsegawa has joined the channel
[04:05] zzak: LadyGaga--
[04:05] v8bot: zzak has taken a beer from LadyGaga. LadyGaga now has -1 beers.
[04:05] LadyGaga: :<
[04:05] LadyGaga: zzak: Why?
[04:06] LadyGaga: LadyGaga++
[04:06] v8bot: LadyGaga: Don't cheat! You can't give a beer to yourself.
[04:06] zorzar_ has joined the channel
[04:06] zzak: LadyGaga--
[04:06] v8bot: zzak has taken a beer from LadyGaga. LadyGaga now has -2 beers.
[04:06] vonkow_ has joined the channel
[04:06] LadyGaga: ACTION has a perverse strategy.
[04:07] LadyGaga: zzak--
[04:07] v8bot: LadyGaga has taken a beer from zzak. zzak now has -1 beers.
[04:07] LadyGaga: zzak--
[04:07] v8bot: zzak is getting too many beers. Don't let zzak get drunk!
[04:07] LadyGaga: lol wtf
[04:07] hsegawa has left the channel
[04:07] zzak: LadyGaga--
[04:07] v8bot: LadyGaga is getting too many beers. Don't let LadyGaga get drunk!
[04:07] GiverOfBeers has joined the channel
[04:08] noahcampbell has joined the channel
[04:08] GiverOfBeers: LadyGaga++
[04:08] v8bot: GiverOfBeers has given a beer to LadyGaga. LadyGaga now has -1 beers.
[04:08] GiverOfBeers: LadyGaga++
[04:08] v8bot: LadyGaga is getting too many beers. Don't let LadyGaga get drunk!
[04:08] dingomanatee: Madonna has a clown car for a vagina.
[04:08] Vertice has joined the channel
[04:08] dingomanatee: Madonna has to get new implants every week to keep her nipples off her knees.
[04:09] LadyGaga: dingomanatee: http://www.mobilemp4.co.cc/madonnas_back.jpg looks pretty good
[04:09] dingomanatee: That's not even madonna's back. That's madonna's side.
[04:09] geoffeg: If I have a directory full of js files that I'm requiring() and newing() at runtime in a loop, the order in which the require()'d modules are getting newed isn't the order in which I'm doing it in the loop. Is new() async or something? https://gist.github.com/56bbed53c49a1c5f9812
[04:09] dingomanatee: Madonna's back looks like a hippo.
[04:09] marcello3d: hippo!
[04:09] LadyGaga: I would tap it.
[04:10] dingomanatee: it would cost you a quarter a minute.
[04:10] marcello3d: that's cheap
[04:10] Lorentz: Anyone doing any kind of nodejs c++ module for cuda/opencl?
[04:10] marcello3d: $15/hr? :)
[04:10] LadyGaga: I would even tap without getting paid!
[04:10] zachsmith_ has joined the channel
[04:10] Lorentz: Half-tempted to invest in a random nvidia card for hilarity
[04:11] marcello3d: amazon has gpu instances now, huh?
[04:11] LadyGaga: Especially since she likes my node.js :)
[04:11] dingomanatee: Afterwards you would have every venereal disease known to man
[04:11] dingomanatee: as well as Madonna Dick.
[04:11] dingomanatee: And that one is ten times as bad as the other ones.
[04:11] dingomanatee: Madonna Dick is so evil you barely notice your AIDS and Syphillis
[04:11] MatthewMueller has joined the channel
[04:12] LadyGaga: dingomanatee: Doth protest too much.
[04:12] bentruyman has joined the channel
[04:13] robotarmy has joined the channel
[04:13] keks: v8bot: keks++
[04:13] v8bot: keks: Use v8: to evaluate code or "`v commands" for a list of v8bot commands.
[04:13] keks: v8: keks++
[04:13] v8bot: keks: ReferenceError: keks is not defined
[04:13] Ond has joined the channel
[04:13] marcello3d: kapwned
[04:13] LadyGaga: v8: (keks)++
[04:13] v8bot: LadyGaga: ReferenceError: keks is not defined
[04:13] davidsands has joined the channel
[04:14] LadyGaga: v8: keks = document; keks++;
[04:14] v8bot: LadyGaga: ReferenceError: document is not defined
[04:14] LadyGaga: v8: keks = window; keks++;
[04:14] v8bot: LadyGaga: ReferenceError: window is not defined
[04:14] LadyGaga: Useless.
[04:15] keks: v8: process
[04:15] v8bot: keks: ReferenceError: process is not defined
[04:15] Lorentz: marcello3d: I wanted to do it locally
[04:15] Ond: Javascript without DOM *scoffs* useless junk
[04:15] perlmonkey2 has joined the channel
[04:15] Lorentz: Never liked amazon instances just to do some playing around.
[04:15] bmizeran_ has joined the channel
[04:15] Lorentz: That and a friend has at least a 8800-something lying around since he upgraded recently.
[04:15] marcello3d: sure
[04:15] marcello3d: just thinking about practical uses :)
[04:15] field has joined the channel
[04:15] marcello3d: after you get it working
[04:16] keks: v8: "keks++";
[04:16] v8bot: keks: "keks++"
[04:16] field: anyone know if node.js/joyent will participate in Google Summer of Code?
[04:17] echosystm: anyone here used sqlite in node ?
[04:17] echosystm: i'm not sure what library to use
[04:17] echosystm: there seems to be 3 on npm
[04:17] echosystm: no, 4
[04:18] field: on that note, which cron library should i use?
[04:18] dgathright has joined the channel
[04:18] echosystm: http://code.google.com/p/node-sqlite/ this comes up first in le` google
[04:18] dingomanatee: LadyGaga: you'd be angry too - if you had Madonna Dick.
[04:18] echosystm: but it hasnt changed since 2009
[04:19] LadyGaga: dingomanatee: No, M/D is great. It is what you get when you see Madonna.
[04:19] LadyGaga: It can be embarrassing though :/
[04:19] dingomanatee: ACTION limps for the cure
[04:19] keks: v8: "bla".blink() //wtf
[04:19] v8bot: keks: "bla"
[04:20] field: echosystem: this looks promissing -- https://github.com/orlandov/node-sqlite
[04:20] echosystm: yeah i just noticed that one
[04:20] echosystm: thanks
[04:20] ajnasz has joined the channel
[04:21] ceej: man I love node-dev :)
[04:21] field: or this https://github.com/grumdrig/node-sqlite
[04:21] googol has joined the channel
[04:22] echosystm: hm
[04:22] echosystm: orlandovs doesnt seem to build here
[04:22] echosystm: cant find the sqlite3.h
[04:24] SwiftLayer has joined the channel
[04:25] rbranson has joined the channel
[04:27] davidsands has left the channel
[04:27] MikhX has joined the channel
[04:27] marcello3d: if I get back " execvp(): No such file or directory" from child_process
[04:27] marcello3d: does that mean it couldn't find the path to the app?
[04:28] ceej: what's the best module for md5, sha1, sha256 support? is it Hash ?
[04:28] marcello3d: http://nodejs.org/docs/v0.4.0/api/crypto.html
[04:28] marcello3d: built in?
[04:29] ceej: ah nice... thank you
[04:30] gagaforgaga has joined the channel
[04:30] gagaforgaga: I'm just gaga for lady gaga!
[04:31] ryah: marcello3d: built-in, yes
[04:31] marcello3d: is there a way to run a child_process in a secure manner?
[04:31] ryah: gagaforgaga, Madonna: greater signal to noise ratio, please.
[04:32] marcello3d: like with restricted privileges or whatever
[04:32] Madonna: ryah: gagaforgaga != me
[04:32] marcello3d: rather than the same as node is run in
[04:32] Madonna: Hard to believe, I know.
[04:32] gagaforgaga: Madonna is a gap-toothed wannabe
[04:32] ryah: marcello3d: be more specific
[04:32] marcello3d: like
[04:33] marcello3d: I'm running graphicsmagick's "convert" utility
[04:33] marcello3d: by writing to stdin/stdout
[04:33] marcello3d: I don't really want it to have any filesystem/memory access
[04:33] Madonna: gagaforgaga: Suck it.
[04:33] marcello3d: other than what it needs to convert the image
[04:33] Madonna: (sorry, I will desist)
[04:34] marcello3d: oh wow, an op
[04:34] ryah: marcello3d: you can chroot it
[04:34] SubStack: echosystm: you can pass dnode a 'route' option that determines where /dnode.js sits if that's what you mean
[04:34] ryah: you can't limit its memory in any meaningful way
[04:34] marcello3d: not limit amount, but memory access
[04:34] ryah: marcello3d: it's a process - so you can do whatever you can do with processes.
[04:35] ryah: it cannot access the parent process's memory
[04:35] ossareh has joined the channel
[04:35] marcello3d: ok
[04:35] lukegalea has joined the channel
[04:35] nilcolor has joined the channel
[04:36] marcello3d: guess I'll just have to trust its stability :)
[04:37] echosystm: SubStack: what i mean is that by default dnode will sit at the top of the rack, right?
[04:37] echosystm: ie. it will be the first one to check incomming packets
[04:38] marcello3d: ryah: on a related topic, I noticed connect uses child_process to run gzip to compress http responses, is that inefficient?
[04:38] marcello3d: or is that a reasonable approach?
[04:39] echosystm: SubStack: is there any way to place dnode after some other "middleware" ?
[04:39] ezmobius has joined the channel
[04:39] ryah: it is faster to do it in process
[04:39] ryah: marcello3d: --^
[04:39] marcello3d: like orders of magnitude faster? or marginally?
[04:40] marcello3d: that is, is it terrible that they're doing that?
[04:40] SubStack: echosystm: what
[04:40] echosystm: in connect, you server.use(...) to add functions to a stack of handlers
[04:41] echosystm: is there any way to put dnode at a particular point in that stack?
[04:41] SubStack: dnode isn't *in* the stack
[04:41] echosystm: oh.
[04:41] SubStack: this is a socket.io limitation
[04:42] SubStack: but look: http://github.com/substack/dnode-stack
[04:42] Madonna: ryah: btw, gagaforgaga says she's a noder and she'll be good.
[04:42] Madonna: Perhaps a cooling off period is best though
[04:43] konobi: ryah: oioi
[04:43] echosystm: maybe its best i step back a bit... basically all i want to achieve is ensuring that http basic auth gets evaluated before any connections are created
[04:43] dingomanatee: ACTION has nothing further to say about Madonna
[04:43] konobi: ryah: you in the office this week?
[04:43] echosystm: ie. so that comet/ws are authenticated in the same way as static file access
[04:43] SubStack: echosystm: I would use sessions for that
[04:44] SubStack: then you can check req.session from dnode like in the dnode-stack example
[04:44] Vertice has joined the channel
[04:44] ryah: konobi: yes
[04:44] konobi: ryah: cool, see you tuesday then =0)
[04:44] echosystm: i had hoped to avoid sessions (hijacking scares me) - is there any way to do this with httpbasic ?
[04:45] ryah: konobi: cool ;)
[04:45] andrewfff has joined the channel
[04:45] SubStack: echosystm: seems pretty dependent on how socket.io works
[04:46] echosystm: ok, i'll do some digging
[04:46] echosystm: thanks for your itme
[04:46] echosystm: *time
[04:46] w0rse_ has joined the channel
[04:47] SubStack: echosystm: also it could be that just a few more things are needed to get it to work with dnode-stack
[04:48] gagaforgaga has joined the channel
[04:48] gagaforgaga: thanks ryah i'll behave now
[04:53] marcello3d: does node.js support http pipelining?
[04:55] ossareh has joined the channel
[04:56] ryah: marcello3d: pipelining is not a very good idea
[04:56] Blink7 has joined the channel
[04:56] jamescarr has joined the channel
[04:56] ryah: many servers can't handle it
[04:56] ryah: answer: no
[04:56] marcello3d: does it serve pipelined to a browser, though?
[04:56] marcello3d: or keep alive?
[04:56] konobi: most browsers don't even support it by default
[04:58] Aria: It's sad, because it should help speeds quite a lot, what with slow-start.
[04:58] marcello3d: is pipelining and keep alive the same thing
[04:59] zylo has joined the channel
[04:59] Blink7 has joined the channel
[04:59] Aria: No.
[04:59] Aria: Keep-alive is using the same connection again after a response.
[05:00] Aria: Pipelining is sending several requests before responses come back.
[05:00] marcello3d: ah
[05:00] marcello3d: makes sense
[05:01] marcello3d: that would help a lot with latency, but I guess browsers make up for it by opening simultaneous connections
[05:01] mike5w3c has joined the channel
[05:01] marcello3d: ok, I need to figure out how to combine/compress my client-side js/css
[05:02] marcello3d: guess stylus already compresses the css
[05:02] konobi: marcello3d: go read the yahoo web performance book
[05:02] marcello3d: I read it a while back, it's been a while :)
[05:02] Aria: The problem is that each new connection has to slow-start
[05:02] konobi: http://oreilly.com/catalog/9780596529307
[05:03] Aria: And with modern connections and old small initial windows, that's pain
[05:03] Metapony has joined the channel
[05:03] MikhX has joined the channel
[05:03] konobi: maximum number of connections per tab, per domain, per subdomain, etc.
[05:03] marcello3d: yup
[05:03] marcello3d: so node.js...keep alive, yes no?
[05:04] lukegalea has joined the channel
[05:04] konobi: keep-alive should work iirc
[05:04] marcello3d: ok
[05:05] marcello3d: what do people use to profile their node apps?
[05:05] Madonna: What is HTTP pipelining?
[05:06] konobi: google
[05:06] marcello3d: https://secure.wikimedia.org/wikipedia/en/wiki/HTTP_pipelining
[05:07] Madonna: Search engines are banned at work :\
[05:07] marcello3d: lol what
[05:08] echosystm: what exactly does dnode-stack do SubStack ?
[05:08] Madonna: Yeah, they like us to stick to internal databases for finding info
[05:08] hassox has joined the channel
[05:09] marcello3d: well, you're on irc
[05:09] marcello3d: that's not an internal source
[05:09] Madonna: Sssssh :p
[05:09] SubStack: echosystm: it looks at your middleware and executes it
[05:10] echosystm: when ?
[05:10] SubStack: when a client connects over socket.io
[05:10] SubStack: and then you can do conn.on('request', function (req) {}) to get a handle to the request object
[05:11] marcello3d: is this on npm? https://github.com/egorich239/node-compress I can't find it
[05:11] SubStack: marcello3d: `npm ls compress` says yes
[05:11] marcello3d: but this is the waveto version: http://search.npmjs.org/#/compress
[05:12] keks: is anyone using aes from crypto on bnary data? doesn't really work here.
[05:12] marcello3d: but connect's gzip middleware isn't compatibility with it
[05:12] marcello3d: (looks like egorich's version adds stream support)
[05:13] marcello3d: can I somehow install it into npm from source?
[05:13] bingomanatee: ryah: ping
[05:14] marcello3d: bah, doesn't build :(
[05:14] samsonjs has joined the channel
[05:15] Aria: marcello3d: "npm install" in a checkout
[05:15] marcello3d: oh well
[05:15] Madonna: Is the Express framework basically a node.js module?
[05:15] marcello3d: yea, I tried that, but I can't even build the module
[05:16] marcello3d: gives me c errors
[05:16] marcello3d: (c++ technically)
[05:16] Aria: Madonna: Yes.
[05:16] marcello3d: ../src/compress.cc:40: instantiated from here
[05:16] marcello3d: ../src/zlib.h:90: error: ‘class node::Buffer’ has no member named ‘data’
[05:16] marcello3d: ../src/zlib.h:90: error: ‘class node::Buffer’ has no member named ‘length’
[05:16] Aria: (It builds on connect)
[05:16] marcello3d: probably some node.js incompatibility
[05:16] Aria: Ah, fun. Yeah, the buffer API has changed.
[05:16] marcello3d: builds on connect?
[05:17] marcello3d: oh
[05:17] marcello3d: changed significantly? think I could fix it?
[05:18] Aria: Express builds on connect.
[05:18] Madonna: connect?
[05:18] Ond: Another module
[05:18] Aria: I don't know how much it's changed, marcello3d. I've not looked yet. It's not horribly complicated as C++ goes, though -- it's a wrapper around malloc ;-)
[05:18] marcello3d: :)
[05:18] marcello3d: I'll spend 5 minutes trying to make it build
[05:19] Madonna: Omfg, malloc for node.js. Genius! :D
[05:19] Madonna: Can we haz realloc() and free as well? ;p
[05:20] marcello3d: wow
[05:20] samsonjs_ has joined the channel
[05:20] marcello3d: it's been a while since I've done c++
[05:20] marcello3d: I don't understand these method signatures at all :D
[05:20] marcello3d: what does this mean in the public: context: static inline size_t Length(Buffer *b) {
[05:21] samsonjs has joined the channel
[05:21] marcello3d: I thought static was for internal methods in c...
[05:21] Madonna: Aria: Where is this nascent malloc() for node.js?
[05:21] Aria: Madonna: buffer
[05:21] marcello3d: oh snap
[05:21] marcello3d: i
[05:21] marcello3d: it says in the header :)
[05:21] marcello3d: Migrating code C++ Buffer code from v0.2 to v0.3 is difficult. Here are
[05:21] marcello3d: some tips:
[05:21] marcello3d: - buffer->data() calls should become Buffer::Data(buffer) calls.
[05:21] marcello3d: - buffer->length() calls should become Buffer::Length(buffer) calls.
[05:21] Aria: No, static is for 'static allocation' -- the placement of the data is known at compile time.
[05:22] marcello3d: as opposed to virtual
[05:22] Madonna: Aria: It would be cool to add more functions to the module so you can do bitwise operations
[05:22] XFreely has joined the channel
[05:22] eventi has left the channel
[05:22] marcello3d: well
[05:22] marcello3d: that fixed it
[05:22] Aria: Good!
[05:23] marcello3d: oh wait
[05:23] marcello3d: it also says below that:
[05:23] marcello3d: - There should not be any ObjectWrap::Unwrap() calls. You should
[05:23] Madonna: How would I do a bitwise shift left/right with buffer?
[05:23] marcello3d: and there's 4 calls in there :)
[05:24] Aria: Hehe. oops!
[05:24] marcello3d: nice, segfaults :D
[05:26] marcello3d: ok
[05:26] Madonna: Mmmm
[05:26] marcello3d: this is more involved than I care to be. abort!
[05:26] Madonna: I have warm memories of segmentation faults causing "Internal Server Errors" when doing web dev in C :D
[05:27] Madonna: ACTION modified valgrind to be CGI-friendly
[05:27] postwait: hmmm. http server appears to not like PURGE requests.
[05:28] EricV has joined the channel
[05:29] Madonna: Is JSPP an npm module?
[05:29] drdave: postwait: sorry about the lag... but I finally got around to test my key with openssl and it works fine...
[05:29] postwait: how are you creating the creds?
[05:30] Lorentz: "npm list jspp" says yes.
[05:30] drdave: they are provided by Apple...
[05:30] drdave: so pretty sure they are valid (though I might definitely be mangling them along the way)
[05:30] drdave: also, i'm using s_client with key and cert concatenated into a single pem file...
[05:30] EricV has joined the channel
[05:31] marcello3d: jspp?
[05:31] drdave: but I tried both with a unique key arg and separate key/cert with tls.connect...
[05:31] marcello3d: ah
[05:31] drdave: I can't even figure where the EINVAL is coming from (it might be a stupid typo when I adapted the snipped)
[05:32] Madonna: jspp looks like it's more than a module.
[05:32] Madonna: Looks like a node server istelf
[05:33] razvandimescu has joined the channel
[05:33] jimt has joined the channel
[05:34] marcello3d: does node.js have a secure random generator?
[05:35] Madonna: marcello3d: Is /dev/urandom good enough?
[05:35] jesusabdullah: awxuew
[05:35] jesusabdullah: blegh
[05:35] jesusabdullah: secure?
[05:35] marcello3d: I dunno
[05:35] marcello3d: java has this thing called SecureRandom
[05:36] EricV: Has anyone here heard of mootools?
[05:36] marcello3d: yes
[05:37] EricV: Any interest to get it packaged in npm?
[05:37] marcello3d: http://download.oracle.com/javase/6/docs/api/java/security/SecureRandom.html
[05:38] MatthewMueller: EricV: Isn't it more a clientside library?
[05:38] Madonna: Anyone who thinks it is random don't understand math well enough.
[05:39] EricV: Some of it is but it is very much a general extent ion to js. Classes and enhanced natives etc.
[05:39] marcello3d: Madonna: are there any wrappers for /dev/urandom?
[05:40] Madonna: marcello3d: You could make one pretty easily
[05:40] EricV: And isn't the idea to eventually write code that runs on the client plus the server?
[05:40] Madonna: I'm not sure
[05:40] Aria: That's some people's ideas.
[05:40] marcello3d: how do you generate unique identifiers then?
[05:41] marcello3d: http://www.enchantedage.com/node-mersenne :D
[05:41] ryah: v8: Math.random(9999)
[05:41] v8bot: ryah: 0.6753615587949753
[05:41] ryah: v8: Math.random(9999) * 10000
[05:41] v8bot: ryah: 5203.266814351082
[05:41] Madonna: marcello3d: Unique != random
[05:41] MatthewMueller: EricV: It's tough to mimic the DOM on the server because you don't know what type of browser the user has.. If you're looking for some of the class stuff, maybe consider backbone.js?
[05:41] Aria has left the channel
[05:41] Aria has joined the channel
[05:42] Madonna: v8: Math.random(Math.random(Math.random(9999)));
[05:42] v8bot: Madonna: 0.5959741792175919
[05:42] Madonna: v8: Math.random(Math.random(Math.random(Math.random(Math.random(Math.random(Math.random(Math.random(Math.random(Math.random(Math.random(Math.random(Math.random(9999)))))))))))));
[05:42] v8bot: Madonna: 0.13038743799552321
[05:42] lukegalea has joined the channel
[05:42] Madonna: More is more random! :D
[05:43] marcello3d: ok, how would you suggest generating a session cookie, for example
[05:43] EricV: @MatthewMueller I'll check it out. There must be a really elegant solution out there..
[05:43] marcello3d: my scala code:
[05:44] marcello3d: val random = new SecureRandom
[05:44] marcello3d: def randomBase64(length: Int): String = {
[05:44] marcello3d: val bytes = new Array[Byte](length)
[05:44] marcello3d: random.nextBytes(bytes)
[05:44] marcello3d: Base64.encodeBase64URLSafeString(bytes)
[05:44] marcello3d: }
[05:44] postwait: marcello3d: https://github.com/broofa/node-uuid
[05:44] MatthewMueller: EricV: There's definitely a push to figure out how to share as much code client and server-side as possible.
[05:44] EricV: What if you didn't deal with the Dom on the client or the server?
[05:45] Aria: There /is/ also a DOM on the server side, tmpvar's jsdom
[05:45] MatthewMueller: EricV: Well then you can't do anything on the web ;-)
[05:45] EricV: Hmmm
[05:45] marcello3d: ok, they just use Math.random() for that lib
[05:46] MatthewMueller: Aria: Yah true. I don't have experience with it, I'm skeptical about it working all too well.
[05:46] Aria: Any particular reason?
[05:46] ceej: so in expressjs I'm including sessions but I still get Cannot read property 'flash' of undefined
[05:46] Aria: It's a good implementation.
[05:46] b5avage: Are you looking for uniqueness, or security?
[05:47] marcello3d: b5avage: what are the differences?
[05:47] Madonna: Is JSPP essentially a node.js server?
[05:47] marcello3d: security in the sense that it shouldn't be guessable from one user to the next
[05:47] b5avage: crypto random means there is sufficient entropy in the algorithm that you can't recreate the randomization process
[05:47] MatthewMueller: Aria: "guessing" at what the client is going to come to you with is prone to errors IMHO.
[05:48] b5avage: uniqueness just means another client is nearly impossibly unlikely to get the same result
[05:48] b5avage: unless they are trying, natch ;-)
[05:48] marcello3d: I guess I need both?
[05:48] Madonna: b5avage: Which is only possible if you store all previous results.
[05:49] b5avage: no theoretically if you reproduct the same starting conditions (same seed to the random number generator) you can get the same result if you know the algorithm, which is not ecret
[05:49] Aria: MatthewMueller: What would you do with it that requires the parsers to match exactly? (And the DOM is pretty well defined, parsers aside.)
[05:49] b5avage: so you need to inject some source of noise that is independent and random
[05:49] Aria: (And then only on weirdo markup)
[05:50] marcello3d: b5avage: that's what I need to avoid
[05:50] marcello3d: though I guess the question is how hard is it to to reverse the seed from output...
[05:50] Aria: Or you need to stay well below the birthday paradox level.
[05:50] Madonna: b5avage: Justin BIEBER!!!
[05:50] marcello3d: is there a industry standard way of doing this?
[05:50] b5avage: he
[05:50] marcello3d: *an
[05:50] b5avage: heh
[05:50] Madonna: As long as they don't know the source ;p
[05:51] b5avage: http://en.wikipedia.org/wiki/Cryptographically_secure_pseudorandom_number_generator
[05:51] Madonna: brb, my neighbor Oprah is here
[05:52] MatthewMueller: Aria: Hmm. I'll look into it more - I definitely feel like I'm starting to step into uncharted territory :-D.
[05:52] b5avage: you can get a phd in this stuff ;-)
[05:53] pkrumins: we want jsbbq #2
[05:53] b5avage: i bet there's a web service out there somewhere that can be asked for a nice random
[05:53] pkrumins: 4 more years of bbq
[05:53] marcello3d: ok
[05:53] marcello3d: then back to my original question
[05:53] b5avage: heh: http://www.random.org/
[05:53] marcello3d: are there any java.security.SecureRandom-like modules for node? :)
[05:54] b5avage: just hit that service?
[05:54] marcello3d: um, no
[05:54] pkrumins: jsbbq pics or it didnt happen!
[05:55] b5avage: try : https://github.com/akdubya/rbytes
[05:55] bronson: pkrumins, http://csanz.posterous.com/jsbbq-friends-food-code-video-0
[05:55] bronson: with shakyvid
[05:55] marcello3d: awesome
[05:55] marcello3d: thanks :)
[05:55] pkrumins: video!
[05:56] b5avage: np just looked here: https://github.com/ry/node/wiki/modules
[05:56] marcello3d: :D
[05:56] marcello3d: I have that page open, not sure why I didn't think to look there first
[05:56] b5avage: heh
[06:03] ChrisMonsanto has joined the channel
[06:05] mikeal has joined the channel
[06:07] lukegalea has joined the channel
[06:07] jimt has joined the channel
[06:09] Aria has joined the channel
[06:11] broofa has joined the channel
[06:12] sholmes has joined the channel
[06:13] sholmes has joined the channel
[06:14] Ond: sholmes, you were the one who asked about whether you had to specify a layout with express view rendering right?
[06:14] sholmes: Ond: Yeah
[06:14] Ond: Did you ever figure that stuff out?
[06:14] Ond: Turns out you don't, and this is in the express documentation
[06:14] sholmes: I think so. You can set the option layout:false if you don't want a layout
[06:15] Ond: Yep
[06:15] sholmes: Yes, you don't I later find. You can also have multiple layouts too.
[06:15] sholmes: Pretty cool. :P
[06:15] Ond: Indeed
[06:16] dgathright has joined the channel
[06:19] SubStack: yay https://github.com/substack/node-bigint
[06:19] SubStack: now I can finish up node-ssh-server >:D
[06:20] lukegalea has joined the channel
[06:20] ziro` has joined the channel
[06:22] TomY has joined the channel
[06:25] marcello3d: goog doesn't have such?
[06:26] JimBastard has joined the channel
[06:26] marcello3d: guess not
[06:26] herbySk has joined the channel
[06:27] JimBastard: dammit, its monday. now i gotta go back to writing real software
[06:27] SubStack: pesky!
[06:31] void_ has joined the channel
[06:32] lukegalea has joined the channel
[06:32] ossareh has joined the channel
[06:33] JimBastard: SubStack: you see the demo vidya?
[06:33] JimBastard: SubStack: break it down, http://www.youtube.com/watch?v=MSZLLgel6Gs
[06:33] cloudhead has joined the channel
[06:33] SubStack: yep!
[06:34] JimBastard: dnode worked out great, thanks
[06:34] JimBastard: A++ would buy again
[06:34] SubStack: ^_^
[06:38] marcello3d: night
[06:38] warz has joined the channel
[06:40] cloudhead: SubStack++
[06:40] v8bot: cloudhead has given a beer to SubStack. SubStack now has 13 beers.
[06:40] SubStack: :D
[06:41] cloudhead: thanks for node-optimist
[06:41] cloudhead: finally something useable!
[06:42] SubStack: I just hate optstrings is all
[06:42] SubStack: silly getopt, making everybody do it the wrong way
[06:42] mikeal: SubStack: did you add a help api for optimist yet?
[06:42] cloudhead: yea
[06:42] saikat has joined the channel
[06:42] cloudhead: that's pretty much getopt's fault heheh
[06:42] SubStack: mikeal: not yet, busy with other things
[06:42] SubStack: up to 25 npm modules now >_<
[06:43] SubStack: need to finish node-ssh-server so I can get tunneling working for browserling
[06:43] mikeal: i could 20 :) http://search.npmjs.org/#/_author/James%20Halliday
[06:43] SubStack: and then I need to integrate that with the ui
[06:43] SubStack: npm ls =substack | wc -l
[06:43] SubStack: oh wait
[06:43] mikeal: that's how many you're a maintainer on
[06:44] mikeal: not where you're noted as the autho
[06:44] SubStack: npm ls -s =substack latest | wc -l
[06:44] nilcolor has joined the channel
[06:44] SubStack: I must have some packages where I forgot to set the author field
[06:45] bingomanatee: ACTION has figured out how to parse Node's documentation into manageable chunks.
[06:45] bingomanatee: ACTION will ROCK YOUR WORLD with the next Noogle release
[06:45] mikeal: bingomanatee: you mean the node API docs?
[06:45] bingomanatee: year
[06:46] bingomanatee: think api docs + php-like community meta-documetnation
[06:46] mjr_ has joined the channel
[06:46] bingomanatee: + x - linking to git and noogle chat docs
[06:47] SubStack: mikeal: yeah it looks like I have some messed up package.jsons
[06:47] SubStack: or rather, incomplete
[06:47] SubStack: dnode isn't on that list for instance
[06:47] tmzt: out of band delivery of stack traces would be awesome, maybe to firebug/chromebug
[06:48] MatthewMueller: Hey guys, does anyone have a good way of sending objects (that includes functions) to the client? I keep running into "escaping" issues when I turn the function into a string...
[06:49] tmzt: live javascript?
[06:49] lukegalea has joined the channel
[06:49] tmzt: live as in runs on the client
[06:49] bingomanatee: I prefer the dnode way of life - stupid objects up front, big brains in the backend
[06:50] nilcolor has joined the channel
[06:50] echosystm: exit
[06:50] Sebmaster has joined the channel
[06:51] tmzt: safe eval and something like strict mode would be cool though
[06:51] tmzt: eventually I plan to try it in chromium
[06:51] tmzt: dom level 0/1 must die
[06:51] mikeal: like i said, it's only the author field, i'm not handling maintainers ye
[06:51] mikeal: er yet
[06:51] MatthewMueller: yup live javascript
[06:52] MatthewMueller: i looked at dnode - initial reaction was too bulky for what I'm trying to do... is that stupid?
[06:52] SubStack: yes
[06:52] SubStack: I'm just bad at describing it I think.
[06:52] samsonjs has joined the channel
[06:53] tmzt: it just creates proxy objects to marshall calls over socket.io
[06:53] bingomanatee: BTW I went to the Google talk by David Herman - sounds like the module system of CommonJS/Node is on the way to being accepted by core JavaScript
[06:53] SubStack: awesome!
[06:53] bingomanatee: So there is a good shot that your Node modules might end up working well on the client side eventually.
[06:53] SubStack: already does!
[06:54] tmzt: bingomanatee: what I'm looking for is for js not to be attached to global scope or a document by default
[06:54] SubStack: http://github.com/substack/node-browserify ;)
[06:54] tmzt: and instead just be a self contained module
[06:54] bingomanatee: That is definately in the spec.
[06:54] SubStack: oh right I should hack in the recursive dependency think
[06:54] SubStack: that is actually pretty easy
[06:54] tmzt: if can get the document from the event (such as 'load' event)
[06:54] tmzt: so the document (and browser, navigator, etc.) globals are gone
[06:55] bingomanatee: Also you won't have to worry as much about variables leaking out to the public scope.
[06:55] mikeal: bingomanatee: that's not accurate
[06:55] mikeal: i'm on the TC-39 mailing list
[06:55] bingomanatee: actually I think I misheard TMZT's quote.
[06:55] tmzt: my plan then is to have widgets that can run in a page with completely untrusted js
[06:55] mikeal: the only modules proposal for Harmony is "Simple Modules"
[06:55] mikeal: which is basically namespace with new scoping rules and like 5 new pieces of syntax
[06:56] tmzt: because they can only effect a single div and it's children (like a documentFragment) and nothing outside of that scope
[06:56] tmzt: but I don't know how to handle something like