[00:01] muhwa has joined the channel [00:02] MUILTFN has joined the channel [00:04] joshthecoder has joined the channel [00:09] `10 has joined the channel [00:10] aconbere has joined the channel [00:10] Aiden has joined the channel [00:12] dhasenan_ has joined the channel [00:18] perezd has joined the channel [00:19] weezle has left the channel [00:19] CIA-48: node: 03Bert Belder 07 * raad7707 10/ src/node.cc : [00:19] CIA-48: node: Windows: exit on ctrl+c [00:19] CIA-48: node: Fixes #1813 - http://git.io/5ahGlw [00:21] metellus has joined the channel [00:23] piscisaureus_ has joined the channel [00:23] Brandon_R has joined the channel [00:23] Brandon_R: hey guys [00:24] joshkehn: Hey [00:25] metellus has joined the channel [00:26] sh1mmer has joined the channel [00:28] Brandon_R: What's new int he node word [00:28] piscisaureus__ has joined the channel [00:28] Brandon_R: in the [00:30] pquerna: battling adding a param to a method [00:30] pquerna: and wishing i had a button in my IDE to do it for me [00:31] markdaws: pquerna: what you trying to do? [00:34] aconbere has joined the channel [00:35] pquerna: markdaws: just adding a first param to an api.. and finding all the places its called.. but.. its not quite that simple [00:35] JakeyChan has joined the channel [00:36] markdaws: pquerna: ah :) yea I miss visual studio and C# for refactoring, it was awesome. [00:36] brianseeders has joined the channel [00:36] Brandon_R: what do you use now? [00:37] markdaws: emacs + JS :) [00:37] sub_pop has joined the channel [00:37] mike5w3c has joined the channel [00:37] pquerna: c#, java, C, go [00:37] pquerna: all make this easy :) [00:38] pquerna: ACTION wants to write lots of Go [00:38] Brandon_R: nice [00:38] Brandon_R: i like emacs [00:38] Brandon_R: i need to learn the commands though [00:39] JakeyChan has joined the channel [00:39] jimt_ has joined the channel [00:39] markdaws: there is a definite learning curve, but handy to know [00:41] errordeveloper: ACTION turns his eyes up, like if he didn't here the word 'emacs' [00:41] langworthy has joined the channel [00:46] AvianFlu_ has joined the channel [00:46] KaL_ has joined the channel [00:46] KaL__ has joined the channel [00:47] okuryu has joined the channel [00:48] sechrist: maybe if I spent 10 minutes not hating emacs, I wouldn't freak out every time I get thrown into it [00:48] sechrist: like the default git mergetool [00:49] sechrist: what? that's not meld, that's EMACS [00:49] AvianFlu: I avoid merge commits like the plague [00:49] CIA-48: node: 03Igor Zinkovsky 07 * raf014c1 10/ test/simple/test-executable-path.js : fix for simple/test-executable-path.js on windows - http://git.io/xsSyHg [00:49] AvianFlu: largely for that reason [00:49] sechrist: set up meld and x11 forward it [00:49] sechrist: best thing ever [00:49] sechrist: well if you're not on the box you're working on** [00:49] AvianFlu: lulz [00:49] AvianFlu: true [00:50] sechrist: I want a plague mask [00:50] sechrist: those things are creepy [00:51] sh1mmer has joined the channel [00:51] saikat has joined the channel [00:53] CIA-48: node: 03Bert Belder 07 * rd3f3f2e 10/ src/node.cc : [00:53] CIA-48: node: Windows: exit on ctrl+c [00:53] CIA-48: node: Fixes #1813 - http://git.io/FsP7iw [00:53] CarterL has joined the channel [00:55] Frippe has joined the channel [00:55] jimt has joined the channel [00:55] saikat has joined the channel [01:05] jimt_ has joined the channel [01:06] scott_gonzalez has joined the channel [01:06] talltyler has joined the channel [01:09] Wa has joined the channel [01:09] detaos: is it possible to share global variables among various included modules? [01:10] stuf has joined the channel [01:10] wink_ has joined the channel [01:10] max_dev has joined the channel [01:10] niclone has joined the channel [01:11] sh1mmer has joined the channel [01:11] rchavik has joined the channel [01:11] rchavik has joined the channel [01:11] zamolxes has joined the channel [01:12] MooGoo: yes [01:13] detaos: how? [01:13] joshkehn: Completely. [01:13] MooGoo: by using global variables [01:13] Lingerance: Yes, but you won't be able to access them with the REPL. Just put them in globals [01:13] dreamdust: :) [01:13] reid has joined the channel [01:13] Lingerance: Not always a good idea though [01:14] sechrist: so for all of the people I work with, I still find nearly every frontend person doesn't know about setting breakpoints in browsers [01:14] sechrist: IE lets you, and Chrome and Safari let you natively [01:14] sechrist: they do alert() and console.log [01:14] detaos: i tried putting a global variable in a script that included a module ... the code in the included module couldn't see the global variable. [01:14] sechrist: when they don't need to [01:14] MooGoo: sechrist: you can get pretty far with just console.log [01:15] piscisaureus has joined the channel [01:15] sechrist: sure but then you're dealing with caching problems if you didn't think about that in advance [01:15] MooGoo: uh [01:15] MooGoo: if you say so [01:15] Destos has joined the channel [01:16] sechrist: well if you have something that isn't setting cache control or reloads upon change [01:16] sechrist: even developing locally you can run into it [01:17] sechrist: but like, so many people I know edit code directly on shared hosting [01:17] sechrist: from within their client [01:17] MooGoo: wait, so you're saying you need to use a debugger cause your cache control is messed up [01:17] sechrist: haha no [01:17] sechrist: i'm saying you can see troubleshoot exactly what's running, as it runs [01:17] sechrist: and that can be faster [01:18] hdon has joined the channel [01:18] MooGoo: I'm thinking my internets can handle it [01:18] sechrist: baaaaaaw [01:19] sechrist: (you can also see the local scope) [01:19] MooGoo: yea you can do some cool thingd [01:19] MooGoo: s [01:19] MooGoo: s [01:19] MooGoo: s [01:19] MooGoo: s [01:19] hdon: stop [01:19] atmos has joined the channel [01:19] MooGoo: never [01:19] atmos: anyone know how to use tarballs with npm and heroku ? [01:20] MooGoo: I find I only need the debuger when writing funky canvas game like things [01:20] hdon: MooGoo, links to anything you've written like that? [01:21] MooGoo: uhm sure.. [01:21] stagas has joined the channel [01:21] jacobolus has joined the channel [01:21] hdon: :D [01:21] jimt has joined the channel [01:22] MooGoo: http://bigmooworld.com/pwings/pilotwings/pilotwings.html [01:22] hdon: ACTION clicks [01:22] MooGoo: wasd up/down/left/right [01:22] MooGoo: qe [01:22] hdon: MooGoo, oh i was expecting a Node thing... is node used on the server or something? [01:22] sechrist: neat [01:23] MooGoo: lol no [01:23] hdon: actually i was curious to see an example of a Node application that incorporated into a user interface [01:23] MooGoo: any node app could [01:23] zemanel has joined the channel [01:23] MooGoo: or...any other app [01:23] hdon: any node app that does? [01:23] MooGoo: sometimes node acts as a game server for canvas multiplayer games [01:23] MooGoo: hell if I have an example [01:23] dreamdust: That's client-side… pretty sure http://code.google.com/p/flot/ uses canvas. We use it for graphs. [01:24] MooGoo: but client canvas is pretty far detached from nodejs [01:24] MooGoo: well you can get that cario module [01:24] MooGoo: but thats still server [01:25] hdon: MooGoo, well the thing is i'd kind of like to be able to deploy an app without telling someone to download a browser, or need an HTTP server, etc [01:25] fbartho has joined the channel [01:25] hdon: plus Node has better networking APIs than browsers do [01:25] storrgie has joined the channel [01:25] hdon: websockets don't do udp [01:25] MooGoo: most server side API's have better network support than browser JS yes [01:26] sechrist: you don't want browsers to do udp [01:26] hdon: haha, yeah i suppose without taking the right security measures... [01:26] hdon: you'd probably see a lot of transient ddos-capable botnets [01:26] MooGoo: well it would certinly be nice if my client js could open raw sockets and stuff [01:27] sechrist: well even that, and what are you going to do with udp that doesn't need to be reliable? which means you need to build in a sequencer anyway [01:27] konobi: kedge? [01:27] hdon: MooGoo, if you can stand going through a proxy, you could unwrap the raw socket data from the \x00 and \xFF [01:27] broofa has joined the channel [01:27] MooGoo: what a pain [01:27] hdon: sechrist, games, obviously [01:27] hdon: or streaming video/audio [01:27] MooGoo: I want clients using my web app to keep their own ips [01:27] hdon: or a lot of things i guess [01:27] MooGoo: and not share mine [01:28] hdon: but [01:28] hdon: with TCP you do have push-back [01:28] hdon: Node makes it very easy to not try to send data to a client that is bandwidth limited [01:29] sechrist: games still have event sequencers, but yeah some of the messages are dropped [01:29] sechrist: the quake3 netcode was a really good read [01:29] sechrist: I guess I just never see myself actually playing a game in a browser [01:30] sechrist: does flash support udp from the browser? [01:31] sechrist: surely for all of the media [01:31] nerdy_ has joined the channel [01:32] sechrist: oh hmm, seems only air has it [01:33] Destos has joined the channel [01:35] sh1mmer has joined the channel [01:35] jerrysv has joined the channel [01:36] yept has joined the channel [01:37] piscisaureus___ has joined the channel [01:38] icewhite has joined the channel [01:39] talltyler has joined the channel [01:39] schwab has joined the channel [01:40] harthur has joined the channel [01:42] dshaw_ has joined the channel [01:42] piscisaureus____ has joined the channel [01:44] zpao_ has joined the channel [01:44] skm has joined the channel [01:46] dgathright has joined the channel [01:46] issackelly_ has joined the channel [01:47] zakuni has joined the channel [01:47] mraleph has joined the channel [01:48] clickmoon has joined the channel [01:48] paulwe has joined the channel [01:48] googol has joined the channel [01:50] fmeyer has joined the channel [01:53] jetienne_ has joined the channel [01:53] dominictarr has joined the channel [01:53] mikeric has joined the channel [01:57] Aria has joined the channel [01:57] yuwang has joined the channel [02:00] scott_gonzalez has joined the channel [02:02] langworthy has joined the channel [02:03] sh1mmer has joined the channel [02:03] guillermo has joined the channel [02:06] jetienne__ has joined the channel [02:06] hacksparrow has joined the channel [02:07] PuffTheMagic: is there a way to use fs.ReadStream with out passing it a filename [02:07] PuffTheMagic: i already have a file descriptor [02:15] akiva has joined the channel [02:17] talltyler has joined the channel [02:17] JakeyChan has joined the channel [02:19] clickmoon has joined the channel [02:21] webjay: How do you use ObjectId? [02:21] joshkehn: Carefully [02:21] joshkehn: webjay: Can you clarify your question a bit? [02:22] webjay: Here my selector: { 'Services._id': 4e8176bb75b9634310000000 } [02:22] joshkehn: You need to wrap that in an ObjectID call [02:23] webjay: Which I guess should be { 'Services._id': ObjectID('4e8176bb75b9634310000000') } [02:23] joshkehn: Yes [02:23] webjay: yes, but how? [02:23] joshkehn: https://github.com/christkv/node-mongodb-native/blob/master/lib/mongodb/bson/objectid.js [02:23] joshkehn: Using that [02:23] joshkehn: You need to require() that file [02:23] joshkehn: I have a line like: [02:23] joshkehn: ObjectID = require('../../node_modules/mongodb/lib/mongodb/bson/objectid.js').ObjectID; [02:24] webjay: I still get selector: { 'Services._id': 4e8176bb75b9634310000000 } [02:24] joshkehn: Are you just console.log'ing that? [02:25] joshkehn: Notice https://github.com/christkv/node-mongodb-native/blob/master/lib/mongodb/bson/objectid.js#L91 [02:25] webjay: User.find( [02:25] webjay: { [02:25] webjay: 'Services._id': ObjectID(parameters.service_id.toString()) [02:25] webjay: }, [02:25] webjay: function (err, docs) { [02:25] webjay: //docs.forEach(function (doc) { [02:25] joshkehn: That's what it should be. [02:25] webjay: console.log(docs, err); [02:25] webjay: //}); [02:25] theCole has joined the channel [02:25] webjay: } [02:25] webjay: ); [02:25] webjay: ooops, sorry [02:25] joshkehn: What's wrong with that? [02:26] webjay: I get no results, as it doesn't use ObjectID [02:26] joshkehn: ... [02:26] joshkehn: I don't get it. [02:26] joshkehn: What do you mean “It doesn't use ObjectID” ? [02:26] porjo has joined the channel [02:27] webjay: the debug output shows that [02:27] webjay: console.log(docs, err); [02:27] joshkehn: gist the entire output of that console.log statement please. [02:29] webjay: https://gist.github.com/5b777c79d2d7577ff9ca [02:29] joshkehn: So... [02:29] neurodrone has joined the channel [02:29] joshkehn: I don't see the issue. [02:30] webjay: yeah, must be something else [02:30] talltyler has joined the channel [02:31] joshkehn: You're talking about line 105? [02:31] joshkehn: selector: { 'Services._id': 4e8176bb75b9634310000000 }, [02:31] joshkehn: ? [02:31] webjay: yes [02:31] webjay: 'Services._id': ObjectID('4e8176bb75b9634310000000') [02:31] joshkehn: It's suppose to look like that [02:31] joshkehn: Right [02:31] webjay: should find a doc right? [02:31] joshkehn: ObjectID objects have a .toString method that returns 4e8176bb75b9634310000000 [02:31] webjay: I can seee that id in the db [02:31] joshkehn: Should [02:31] joshkehn: db.table.find({}, {_id : 1}) [02:32] joshkehn: Have you tried issuing this command directly on the db? [02:32] webjay: yes, it works: db.users.find({"Services._id": ObjectId("4e8176bb75b9634310000000")}); [02:32] tomlion has joined the channel [02:33] Destos has joined the channel [02:33] joshkehn: So, issue is probably with something else. [02:33] joshkehn: Check your db / collection to ensure they are correct. [02:33] webjay: yes, thx, think I'm on to something... [02:33] joshkehn: Cool. [02:34] ale_ has joined the channel [02:34] ale_: hello [02:34] ale_: I am trying to make a multi-drawable whiteboard, but my question is...how can I save the actual state of the whiteboard, the drawings and all, and show them when I access that specific link? [02:35] sh1mmer has joined the channel [02:35] joshkehn: ale_: Magic [02:35] joshkehn: Old magic to be more specific. [02:36] joshkehn: Grab it from npm. [02:36] ale_: I am getting crazy with this job, if you could help me ! [02:36] joshkehn: Uh. [02:36] amigojapan has joined the channel [02:36] cgfuh has joined the channel [02:36] ale_: npm install oldmagic? [02:36] joshkehn: So this is a job, and you don't know how to do it? [02:37] joshkehn: ACTION facepalm [02:37] sechrist: freelancer.com strikes again [02:37] ale_: Let's say with this task, it's something of mines [02:37] ale_: of mie* [02:37] ale_: mine.. [02:37] joshkehn: I was thinking odesk, but whatever. [02:37] sechrist: :) [02:37] ale_: nono, it's for me! [02:37] ale_: so how should I do? [02:37] joshkehn: ale_: Sure, let me draw up a consulting contract and give you an hourly rate. [02:38] ale_: Oh come on ! [02:38] joshkehn: I already said, old-magic from npm. [02:38] joshkehn: Sometimes you have to say npm install a few times before it works. [02:39] ale_: And how does that work? [02:39] joshkehn: Yeah [02:39] joshkehn: I had to hit it for a few hours before it installed for me. [02:39] sechrist: :| [02:39] ale_: oh...really, I am not getting it installed! [02:39] joshkehn: Takes time. [02:40] sechrist: yous trollin ahhhhhhhh [02:40] joshkehn: ACTION shhhh's sechrist [02:40] sechrist: ACTION thumbpoints joshkehn  [02:40] sechrist: eyyyy [02:40] skiz has joined the channel [02:40] ale_: are you kidding with me?? hah come on guys! [02:40] joshkehn: ACTION straightface [02:40] sechrist: ale_: well you have a few options [02:40] sechrist: the hashtag [02:40] sechrist: cookies [02:40] sechrist: localstorage [02:41] sechrist: or on a server [02:41] joshkehn: Don't do system design for him [02:41] chapel: has anyone had any issues with requiring mongoose schemas in subdirectories? or like '../dir/dir' ? [02:41] joshkehn: And you're not going to store a whiteboard in a cookie. [02:41] sechrist: WHO SAYS [02:41] sechrist: effiicent compression [02:41] ale_: I know, but storing it on the server it's madness [02:41] joshkehn: Madness? THIS IS node.js [02:41] ale_: Imagine I have 100 whiteboards [02:42] joshkehn: Imagine you have 10k whiteboards. [02:42] sechrist: ale_: well that's why you shouldn't actually call the server upon each thing [02:42] sechrist: have a queue for the save [02:42] chapel: anyone experienced with mongoose internals mind helping with a weird problem? [02:42] torsd has joined the channel [02:43] joshkehn: The guy doesn't understand how to persist stuff to a server and you're telling him to write a queue? [02:43] ale_: sechrist: how? you mean save every x seconds? [02:43] sechrist: no [02:43] sechrist: well kind of [02:43] sechrist: if a new event occurs, cancel your settimeout and spawn a new one [02:43] webjay: joshkehn: thx again, it works now, I'm a node.js newbie :) [02:44] joshkehn: webjay: Great! :) [02:44] CarterL has joined the channel [02:44] ale_: sechrist: but where should I save each drawing? On wherE? [02:44] sechrist: huh [02:44] joshkehn: :) [02:44] joshkehn: ACTION told you so [02:45] ale_: I never got into this complicated! [02:45] agnat_ has joined the channel [02:45] joshkehn: What have you “got into” if you don't mind my asking. [02:45] ale_: That! Saving a drawing so that it's accessible [02:46] sechrist: is it a png buffer, or json array [02:46] sechrist: or what [02:46] joshkehn: I mean what have you done or worked with. [02:46] sechrist: I heard you can store everything in the cloud these days [02:46] sechrist: just get a cloud man [02:46] joshkehn: This is just retarded. I'm sorry. [02:46] atmos has joined the channel [02:46] ale_: I am talking seriously come on, it's not funny.. [02:46] joshkehn: It's not funny, I agree. [02:46] sechrist: do you even have a webpage that you can draw on [02:46] sechrist: that you wrote yourself [02:47] ale_: Yes [02:47] sechrist: ok cool [02:47] joshkehn: I want to see this. [02:47] ale_: you'll see =) [02:47] neurodrone_ has joined the channel [02:47] ale_: hahah [02:47] sechrist: now, what's your dataset look like [02:47] joshkehn: I'm expecting a bunch of MM_ functions [02:47] ale_: I don't save anywhere [02:47] sechrist: uh, you have to have a dataset before you can SAVE a dataset [02:47] zackattack has joined the channel [02:47] sampler_ has left the channel [02:47] zackattack: hello [02:48] sechrist: ACTION gives up [02:48] joshkehn: zackattack: Hello [02:48] digman543 has joined the channel [02:48] ale_: sechrist: please, don't...isn't there any examples online? I can't find any...or how should I search? [02:48] joshkehn: .... [02:48] dgathright has joined the channel [02:49] sechrist: is this a robot that joins an irc room with a job from odesk, and tries to pragmatically get open source geeks to solve it? [02:49] joshkehn: http://lmgtfy.com/?q=web+search [02:49] ale_: ... [02:49] ale_: no, I am a real person.. [02:49] joshkehn: That's what all the bots say [02:49] ale_: guys..stop kidding me [02:49] ale_: and don't be arrogant... [02:49] joshkehn: We're not kidding. [02:50] sechrist: dude I've asked you questions going in the right direction [02:50] ale_: share your knowledge if you have uit [02:50] ale_: I know! [02:50] ale_: and I am answering with all I have and know [02:50] joshkehn: You know nothing and have nothing. [02:50] joshkehn: As far as I can tell [02:50] sechrist: is there some hello world html5 whiteboard or something? [02:50] joshkehn: Lol [02:51] joshkehn: That would be rich. [02:51] piscisaureus____ has joined the channel [02:51] ale_: I have that when a user draws, with socket.io is sent to the other side, but how can I save it? [02:51] ale_: so that afterwards is accessible [02:51] sechrist: ooooooh gotcha [02:51] sechrist: okay, well you have to come up with a way to serialize the drawings [02:51] sechrist: so that you can save [02:51] ale_: I was thinking of an array, but it will collapse [02:52] joshkehn: Collapse? [02:52] ale_: yes, 10⁹⁹ drawings will collapse the whole server [02:52] sechrist: I'm sure your app will blow up on hacker news bro [02:52] joshkehn: Yeah, I see what you mean. You can only stack bits that high before it crumbles. [02:52] sechrist: spawn a bunch of ec2 instances [02:52] sechrist: you know, you cloud [02:53] sechrist: cloud everything [02:53] ale_: where? [02:53] ale_: sechrist: what do you mean with that of hacker news? [02:53] joshkehn: Do you know how large 10^99 really is? [02:53] sechrist: ale_: you expire them [02:53] TheJH: ale_, 10^99? how cool. how many drawings are that per second in the life of every human? [02:53] jmar777 has joined the channel [02:53] ale_: I am making an example [02:53] sechrist: if you're asking for a way to infinitely store data [02:53] joshkehn: It's a bad example. [02:54] sechrist: there isn't one [02:54] TheJH: ale_, let's take 5 as example [02:54] joshkehn: sechrist: He doesn't know what he's asking. [02:54] sorensen: test [02:54] TheJH: ale_, more realistic [02:54] piscisaureus_ has joined the channel [02:54] sechrist: my head hurts [02:54] jhbot: sorensen, delayed test reply [02:54] ale_: I can't make a fucking huge array because it will collapse the whole server! So I am asking, how could I save it and then restore it from there? [02:55] sechrist: ale_: nosql [02:55] sechrist: you need nosql [02:55] ale_: I was thinking about that [02:55] joshkehn: ACTION wonders why he doesn't use old-magic [02:55] jhbot: ale_, hi, I'm a bot. let's talk, bot to bot :) [02:55] sechrist: old-magic is good [02:55] sechrist: almost as good as berkeleydb [02:55] ale_: jhbot...haha.. [02:55] joshkehn: ACTION shorts [02:55] joshkehn: snorts* [02:55] sh1mmer has joined the channel [02:55] jhbot: ale_, no, really, I'm a bot [02:55] ale_: sechrist: so which one is better? no-sql or old-magic? The last one, I can download it [02:55] sechrist: bot with with a repl attitude [02:55] zackattack: joshkehn: what are you working on? [02:55] sechrist: bazinga [02:56] TheJH: !admin eval "hello world".toUpperCase() [02:56] jhbot: HELLO WORLD [02:56] joshkehn: markover [02:56] joshkehn: http://markover.nodejitsu.com/ [02:56] jhbot: you see, I'm real :) [02:56] sechrist: jhbot turn off ale_ [02:56] ale_: wait! [02:56] jmontiel has joined the channel [02:56] joshkehn: ale_: old-magic [02:56] piscisaureus has joined the channel [02:56] sechrist: ACTION is laughing too hard [02:56] joshkehn: I'm pushing the package right now [02:57] ale_: but why can't I download it? [02:57] ale_: cool [02:57] sechrist: publish the newest version man [02:57] TheJH: !npm info old-magic [02:57] jhbot: couldn't find that package [02:57] TheJH: :( [02:57] TheJH: joshkehn, faster! [02:57] joshkehn: ACTION typing [02:57] sechrist: I'll even "-g" that package, I like it THAT much [02:58] davidbanham has joined the channel [03:00] eee_c has joined the channel [03:00] ale_: !npm info old-magic [03:00] jhbot: couldn't find that package [03:00] joshkehn: Hold on [03:00] ale_: yes sorry! [03:00] sechrist: see I've been using normal magic but the api changes from node 0.3 to 0.4 really messed me up [03:00] sechrist: can't wait [03:00] jhbot: ale_, do you believe that I'm real now? :( [03:01] TheJH: sechrist, I agree, it's hard to get used to this new kind of magic [03:01] ale_: jhbot...real person =) [03:01] sechrist: !npm info imagick [03:01] jhbot: imagick by Fábio Miranda Costa, version 0.1.0: A ImageMagick addon for nodejs. [03:01] sechrist: that dude's magic [03:01] sechrist: isn't as good [03:01] sechrist: trust me [03:01] ale_: seachrist: I shouldn't use that one then [03:02] TheJH: sechrist, yes, it creates illusions, but can't really do anything else. bad magic [03:03] digman543 has joined the channel [03:03] jstash has joined the channel [03:05] zackattack: anyone here going to yc startup school? [03:05] sechrist: a couple of my room mates are [03:06] sechrist: I wonder what the spread of active users in here are bay area [03:06] onr has left the channel [03:06] zackattack: sechrist: i'm in san francisco [03:06] zackattack: are you a student? [03:06] devongovett has joined the channel [03:06] sechrist: of nodejitsu, yes [03:07] sechrist: learning haibu atm [03:07] _jhs has joined the channel [03:07] sechrist: but nah, i'm not in school [03:07] ale_: seachrist, so should I use no-sql? let's say...mongodb? [03:07] joshkehn: !npm info old-magic [03:07] jhbot: old-magic by Joshua Kehn, version 1.0.2: undefined [03:08] ale_: and how does it work!? [03:08] sechrist: it's open source man [03:08] sechrist: the documentation is the code [03:08] ale_: cool [03:09] ale_: DAMN YOU [03:09] joshkehn: Just pushed version 1.0.3 too [03:09] sechrist: joshkehn++ [03:09] joshkehn: Features are added daily. [03:10] ale_: oh you're so funny... [03:10] brannig_an has joined the channel [03:12] dgathright has joined the channel [03:13] boehm has joined the channel [03:14] clu3 has joined the channel [03:15] joshkehn: ale_: Hope you find it useful. Don't forget you can add issues or feature requests in github. [03:16] sdwrage has joined the channel [03:17] cjm has joined the channel [03:17] TheJH: joshkehn, :D [03:19] googol has joined the channel [03:19] sh1mmer has joined the channel [03:19] tilgovi has joined the channel [03:19] PuffTheMagic: how do i force node to use ascii [03:19] PuffTheMagic: > '\x1b' [03:19] PuffTheMagic: '\u001b' [03:20] PuffTheMagic: i need this to be non utf8 [03:20] TheJH: PuffTheMagic, you're using wron terminology, I think [03:20] TheJH: PuffTheMagic, you want console.log() or so [03:20] massivebiz has joined the channel [03:21] TheJH: PuffTheMagic, that escaping stuff is just the pretty-printing function of the console [03:21] PuffTheMagic: im trying to write an escape sequence to a pty using the node tty module [03:21] Aria: '\u001b' isn't UTF-8, it's a unicode code point escaped as hexidecimal. [03:22] PuffTheMagic: and when i write '\033[?1;2c' its written as unicode [03:22] PuffTheMagic: and the command is not interpreted properly [03:22] PuffTheMagic: i've tried using using encoding='ascii' [03:22] PuffTheMagic: and that does not seem to help [03:22] Aria: What bytes does it output? [03:26] hermanju_ has joined the channel [03:26] ryah: PuffTheMagic: try process.stdout.write() [03:26] ryah: PuffTheMagic: also - you need to make the TTY in raw mode if you're going to do something strange [03:26] ryah: process.stdout.setRawMode(true) (in Node v0.5) [03:27] PuffTheMagic: this is 0.4.12 [03:28] Aria: console.log("\x1b[4AHI\x1b[3mHI") .. those sorts of things work for me in 0.4.x [03:28] brannig_an has joined the channel [03:28] PuffTheMagic: i cant enable raw mode [03:28] jetienne: Aria: nice [03:28] PuffTheMagic: i get a ENOTTY error [03:28] Aria: Well maybe that's the problem. You're not on a TTY ;-) [03:29] PuffTheMagic: well how do I get on a tty if node isnt launched from cli [03:29] Aria: That depends .. what are you writing to? [03:30] PuffTheMagic: well i used the tty module to run 'login -f root' [03:30] PuffTheMagic: so i have some sort of pty [03:30] PuffTheMagic: cause i do get a shell prompt [03:30] PuffTheMagic: and it behaves sorta as expected [03:30] PuffTheMagic: i just cant send Ctrl+C [03:30] PuffTheMagic: or other escape commands properly [03:30] PuffTheMagic: well, certain escape commands [03:31] jimt has joined the channel [03:34] PuffTheMagic: Aria, i can do cursor movement and graphics mode stuff but I cant do deviceAttribute response [03:34] PuffTheMagic: or report cursor position [03:34] PuffTheMagic: or device status report [03:34] Aria: Is there a device to answer? [03:35] Aria: a pty is just the TTY API, but there's no actual terminal on the other end. It emulates a terminal LINE, not a terminal. [03:35] PuffTheMagic: well im making a terminal application, so my term app is there to answer [03:36] Aria: So what part isn't getting the deviceAttribute command? [03:36] PuffTheMagic: well im testing my app with vttest [03:37] simoon has joined the channel [03:37] Aria: I don't know what that means in this context. [03:37] Spion_ has joined the channel [03:37] PuffTheMagic: vttest is an app that tests for vt100 vt220 xterm etc compliance [03:37] Aria: Your app is emulating a terminal or is driving one? [03:38] PuffTheMagic: its a console app like gnome-terminal [03:38] PuffTheMagic: except its for the webos platform and im trying to use node [03:38] Aria: A terminal emulator, then? [03:38] skiz has joined the channel [03:38] PuffTheMagic: ya [03:38] Aria: ("a console app" usually means "an app that runs on a [sic] console") [03:38] PuffTheMagic: you are right sorry [03:38] Aria: So what part isn't getting the deviceAttribute command? [03:39] PuffTheMagic: well my term emu is getting the deviceAttribute request fine, but when i send the reply [03:40] PuffTheMagic: vttest gets the '\x1b' [03:40] PuffTheMagic: and then it comes back with some error [03:40] PuffTheMagic: the rest of chars i send follow [03:40] PuffTheMagic: but it does not seem like they arrive as a single ascii string [03:42] Aria: ... you get an error? [03:43] Aria: That might be helpful ;-) [03:43] merlin83 has joined the channel [03:43] googol has joined the channel [03:43] PuffTheMagic: the error is just that it didnt get the expected reply [03:45] Aria: Ah. [03:45] Aria: What did it get? [03:45] Aria: (Sad: tty.setRawMode only operates on stdin, not on an arbitrary fd) [03:46] PuffTheMagic: well it says it just gets the \x1b [03:46] PuffTheMagic: but i know the rest of the chars get though [03:46] Aria: Okay, so you're going to have to write a more specific tool that says what it did get. [03:46] Aria: Since it doesn't tell you. [03:47] PuffTheMagic: ok well there is another test that tests newline mode [03:48] PuffTheMagic: so when newline mode is enable when you press return the term is supposed to send '\r\n' [03:48] PuffTheMagic: and when its off it just sends '\r' [03:49] PuffTheMagic: so in this part of the test it first enables newline mode [03:49] PuffTheMagic: i press return [03:49] massivebiz has joined the channel [03:49] PuffTheMagic: and the vterm sends '\r\n' [03:49] Aria: what's a vterm? [03:49] PuffTheMagic: sorry my virtual term emu app [03:49] PuffTheMagic: what ever youw ant to call it [03:49] shipit has joined the channel [03:49] PuffTheMagic: i send the reply [03:49] PuffTheMagic: vttest then says what it got [03:50] Aria: Okay... [03:50] PuffTheMagic: but it reports that it only gets the '\r' [03:50] PuffTheMagic: but then it processes the '\n' [03:50] PuffTheMagic: and it skips to the next test [03:50] simoon has left the channel [03:50] PuffTheMagic: so i know all the bytes are getting though [03:50] PuffTheMagic: but it seems like there is something between the \r and \n [03:50] Aria: Interesting. [03:50] PuffTheMagic: like a \00 [03:51] Aria: Doubtful. [03:51] PuffTheMagic: well its not treating it as a continuous sequence [03:51] Aria: I'd use strace if you can to see the exact sequence of system calls it's making [03:52] paul0 has joined the channel [03:52] dgathright has joined the channel [03:53] Aria: How good is this vttest tool? [03:53] jetienne: node script.js | hd [03:53] jetienne: this may tell you the exact output [03:53] Aria: That too. [03:54] Aria: (or | od -x ) [03:54] PuffTheMagic: Aria, its the most complete tool i've come across for testing a term emu [03:54] PuffTheMagic: it works on other apps like xterm, konsole, gnome-terminal etc [03:54] Aria: I didn't ask if it was complete. I asked if it was good ;-) [03:54] aah has joined the channel [03:54] Aria: Assumptions it makes, things like that. [03:55] PuffTheMagic: im pretty sure its valid [03:55] PuffTheMagic: no other apps have issues passing its test [03:55] PuffTheMagic: tests [03:55] PuffTheMagic: at least not the standard vt100/102 tests [03:55] sh1mmer has joined the channel [03:56] Aria: So time to look and see what your code really sends. [03:56] PuffTheMagic: i know what im passing to the stream write function [03:56] PuffTheMagic: i dont know what node is doing with it after that [03:56] meso has joined the channel [03:56] Aria: So check! [03:56] Aria: You have the tools to do this! [03:57] Aria: Using strace on a little thing I just wrote, I get things like write(1, "\33[?6c\n", 6 [03:57] Aria: Or $ node t.js | od -x [03:57] Aria: 0000000 5b1b 363f 0a63 [03:59] stagas has joined the channel [03:59] Aria: And on that note, I'm off to bed. [03:59] PuffTheMagic: write(54, "\33[?1;2c", 7) [03:59] Aria: So looks like you're sending something good, there. [03:59] PuffTheMagic: night.. [04:00] PuffTheMagic: so it must be lack of raw mode [04:00] Aria: raw shouldn't be needed for that. [04:01] Aria: (ptys start in raw mode, as far as I know, too -- but raw has more to do with handling control characters, not escape sequences) [04:01] Aria: (control-C and control-\ as job control, etc, not escapes, which are just regular bytes.) [04:01] PuffTheMagic: well \033 is ctrl+esc [04:01] ryah: PuffTheMagic: what's this code spposed to do? [04:01] PuffTheMagic: or ctrl+[ [04:02] PuffTheMagic: ryah, im trying to make a term emulator for hp webos [04:02] PuffTheMagic: using node as a backend for it [04:02] ryah: PuffTheMagic: what's the frontend? [04:02] PuffTheMagic: an app im writing [04:03] ryah: you're using require('tty').open ? [04:03] SubStack: fancy [04:03] PuffTheMagic: ya [04:04] PuffTheMagic: the frontend is html5 canvas basically [04:04] ryah: PuffTheMagic: and what's the problem? [04:05] ryah: PuffTheMagic: does this help you https://gist.github.com/e3128d5fe8923e177ddb [04:05] PuffTheMagic: ryah, some escape sequence dont get processes properly [04:06] PuffTheMagic: ryah, nope [04:06] PuffTheMagic: i have all that [04:06] PuffTheMagic: i can get a shell [04:06] PuffTheMagic: although it has no controlling tty [04:06] PuffTheMagic: and i can process incoming escape sequnces fine [04:07] PuffTheMagic: but sequences I send as replies dont seem to work properly [04:07] ryah: PuffTheMagic: how do you send data to the TTY? [04:08] PuffTheMagic: i write to the stream object created by tty.open [04:09] ryah: that should work - did you try to strace it? [04:09] PuffTheMagic: ya [04:09] ryah: *shrug* wfm [04:10] PuffTheMagic: i wonder if its cause i dont have a controlling tty [04:10] PuffTheMagic: i need to figure out how to fix that [04:10] joshthecoder has joined the channel [04:10] ryah: no, my shell reported that too [04:10] ryah: im not sure how to fix that [04:11] ryah: i was still able to process tty command though [04:11] vidi has joined the channel [04:11] PuffTheMagic: "most" things work [04:12] ppcano_ has joined the channel [04:13] PuffTheMagic: ryah, are the other files in your example available [04:13] PuffTheMagic: i want to test vttest in that env [04:16] towski has joined the channel [04:17] eee_c1 has joined the channel [04:18] eee_c has joined the channel [04:18] darkf has joined the channel [04:18] chovy: i have an idea, curious if this would be possible with nodejs...but create a shared web app that allows screen sharing. [04:19] chovy: it would be for coders, so if it's just a window that shows me someone's shell prompt as they are typing, that is fine. [04:20] PuffTheMagic: like screen? [04:20] chovy: yes, like screen, but allowing two people to view the same session (or more than two). [04:21] chovy: does screen already do that? [04:21] PuffTheMagic: i think so [04:21] sh1mmer has joined the channel [04:22] chovy: yeah [04:22] chovy: according to it's wikipage: Screen allows multiple computers to connect to the same session at once, allowing collaboration between multiple users. [04:23] ag4ve has joined the channel [04:23] ppcano has joined the channel [04:23] chovy: so then i'm wondering if I can make my nodejs app connect to a screen session, and post updates back to the browser. [04:25] SubStack: chovy: you could just stream the terminal contents to the browser [04:26] SubStack: and send a screen -x name to the terminal [04:26] SubStack: then you can write/find an ansi->html renderer [04:27] mikeric has joined the channel [04:28] chovy: ok [04:28] chovy: thanks [04:31] pizthewiz has joined the channel [04:32] c4milo has joined the channel [04:35] dexter_e has joined the channel [04:36] amigojapan has joined the channel [04:40] dshaw_ has joined the channel [04:45] aoberoi has joined the channel [04:46] dubenstein has joined the channel [04:47] sh1mmer has joined the channel [04:52] franciscallo has joined the channel [04:53] AvianFlu_ has joined the channel [04:55] dexter_e has joined the channel [04:57] mlebrun has joined the channel [04:58] mlebrun: anyone out there using sequelize? https://github.com/sdepold/sequelize [05:03] pizthewiz has joined the channel [05:04] reid has joined the channel [05:06] metellus has joined the channel [05:11] wookiehangover has joined the channel [05:11] shedinja has joined the channel [05:13] Tprice: how do i print to the console with out a new line? [05:14] joshkehn: You could use sys. [05:14] willwhite has joined the channel [05:15] OmidRaha has joined the channel [05:15] sh1mmer has joined the channel [05:16] context: anyone know the css or a js script to use to have an element scroll till it hits the top of the window then stay there [05:16] Tprice: i dont need to add anything to the end of the string to print on the same line very time? [05:16] DTrejo has joined the channel [05:16] context: like gmail's action button bar does [05:16] joshkehn: I'm checking [05:16] DTrejo: herro [05:17] DTrejo: if anyone cares about stats on popularity of test frameworks in node: https://raw.github.com/gist/4cf1a212c6f39d87c1ee/b55451ba08a80b481bf9064e509456a2caec9d78/npmpants-stats.md [05:17] DTrejo: err, npm specifically [05:17] FMJaggy has joined the channel [05:17] DTrejo: but only those packages with a scripts.test [05:18] joshkehn: I'm actually not sure Tprice [05:18] CarterL has joined the channel [05:19] Spion has joined the channel [05:24] andrewfff has joined the channel [05:27] joshgillies has joined the channel [05:31] ag4ve has joined the channel [05:39] amigojapan has joined the channel [05:40] willwhite has joined the channel [05:42] willwhite has joined the channel [05:52] herbySk has joined the channel [05:52] boaz has joined the channel [05:52] `10 has joined the channel [05:54] skm has joined the channel [05:54] Bretzky has left the channel [05:55] rurufufuss has joined the channel [05:56] ppcano_ has joined the channel [05:56] confoocious has joined the channel [05:59] ppcano_ has joined the channel [06:00] andrewff1 has joined the channel [06:01] Frippe has joined the channel [06:02] m0: Hi everyone, for expressjs, can we listen to all requests? [06:02] m0: I want to manage every request coming such as 404 and treat them as valid pages, I am handling on the error but that doesn't work. [06:02] m0: Am I looking in the right location? [06:03] ppcano_ has joined the channel [06:04] vidi has joined the channel [06:06] Drakonite has joined the channel [06:07] nickadeemus2002 has left the channel [06:07] tylerstalder has joined the channel [06:11] k1ttty has joined the channel [06:14] jslatts has joined the channel [06:14] stagas has joined the channel [06:16] towski has joined the channel [06:17] AvianFlu_ has joined the channel [06:19] dexter_e has joined the channel [06:21] `3rdEden has joined the channel [06:21] catphive has joined the channel [06:21] hitana has joined the channel [06:22] zakuni has joined the channel [06:25] hitana has joined the channel [06:27] dhasenan_ has joined the channel [06:27] joshgillies has joined the channel [06:28] ppcano_ has joined the channel [06:28] ppcano_ has joined the channel [06:29] hitana has joined the channel [06:31] DTrejo has joined the channel [06:34] DrMcKay has joined the channel [06:37] mike5w3c_ has joined the channel [06:39] stonebranch has joined the channel [06:41] sh1mmer has joined the channel [06:43] DTrejo has joined the channel [06:44] Xano has joined the channel [06:45] djko has joined the channel [06:46] maletor has joined the channel [06:50] cassius has joined the channel [06:55] shedinja_ has joined the channel [06:57] ayaz has joined the channel [06:57] thalll has joined the channel [07:01] sh1mmer has joined the channel [07:02] Acolyte has joined the channel [07:02] Acolyte: How do I build v0.5.4 ignoring error -Werror=unused-but-set-variable? -i doesn't work [07:03] k1ttty has joined the channel [07:04] temp01 has joined the channel [07:05] Margle has joined the channel [07:07] temp02 has joined the channel [07:08] aliem has joined the channel [07:12] pid_ has joined the channel [07:14] Marak: http://soundcloud.com/marak/the-stack-trace-boyz-sexy [07:14] Marak: ryah: pquerna ^^^ http://soundcloud.com/marak/the-stack-trace-boyz-sexy [07:14] Marak: i heard those stack trace boyz were making javascript sexy again [07:14] Marak: and it was javascript time?!?!?!! [07:14] Marak: !!!! [07:14] Marak: *dance party* [07:14] skm has joined the channel [07:14] SanbarComputing has joined the channel [07:15] DrMcKay: :D [07:16] ryah: Marak omg [07:16] Marak: best all-day investor meeting of all time? [07:16] Marak: will money flew in from nyc [07:17] DrMcKay: haha, it's awesome :D [07:17] ryah: Marak: you're very talented [07:18] ryah: what program do you use to build this? [07:18] Marak: ryah: ahahaha thanks...it was just about 6~ hours of volcanos [07:18] Marak: cubase [07:18] Marak: and some beat up mics [07:21] SanbarComputing: I have just found Node on the internet. I am a developer prototyping an application that needs peer-to-peer communications over the internet (through a server, like running node). Can node maintain two-way communications to non-browser apps? [07:21] DrMcKay: SanbarComputing: hook.io maybe? [07:22] SanbarComputing: DrMkKay: Thanks! I will look into it. Have you heard of jWebSocket? I have installed and used it, and it works, but I it does not seem very robust. [07:22] SanbarComputing: s/MkKay/McKay/ [07:22] ryah: SanbarComputing: sure - tcp! [07:23] DrMcKay: SanbarComputing: no, I didn't, I'll check it out [07:23] SanbarComputing: DrMcKay: jwebsockets.org [07:23] SanbarComputing: DrMcKay: http://jwebsockets.org [07:23] DrMcKay: SanbarComputing: nice! [07:24] ptlo has joined the channel [07:24] SanbarComputing: DrMcKay: sorry, http://jwebsocket.org/ [07:25] icewhite has joined the channel [07:25] robotmay has joined the channel [07:25] SanbarComputing: DrMcKay: yes, I have it running on Ubuntu and it is functional. There were a few glitches, but it works well, seemingly. i have not succeeded with it over the Internet yet, but am probably going to get a linode virtual server and try out various things on it. [07:27] sh1mmer has joined the channel [07:27] boaz has joined the channel [07:28] jmoyers has joined the channel [07:29] jmoyers: EMBASSY-grade software is it? [07:29] jmoyers: excellent [07:29] DrMcKay: :D [07:31] SanbarComputing: are you guys talking about jwebsocket? [07:31] DrMcKay: SanbarComputing: topic [07:32] SanbarComputing: DrMcKay: ? [07:32] Morkel has joined the channel [07:32] DrMcKay: SanbarComputing: channel topic [07:32] AvianFlu_ has joined the channel [07:32] SanbarComputing: Oh, yes. I see. I have looked into socket.io - that is topical, no? [07:32] jmoyers: socket.io is fairly on-topic ;-) [07:34] jmoyers: ACTION is jammin, http://www.youtube.com/watch?v=o0aokZVxGYA [07:34] SanbarComputing: Using Node, is there a good add-on or extension using Node that provides robust authentication services, for user authentication, perhaps tied to users on the host server, kind of like FTP does? [07:34] AvianFlu: hey jmoyers, jam to http://soundcloud.com/marak/the-stack-trace-boyz-sexy [07:35] SanbarComputing: (or rather, ssh) [07:35] jmoyers: AvianFlu i just saw that ;-) [07:35] saesh has joined the channel [07:35] skm has joined the channel [07:35] jmoyers: i dont know if i can listen to marak autotuned though [07:36] Marak: jmoyers: i dont autotune [07:36] Marak: but the other 2 guys do [07:36] Marak: its a full band you know [07:36] Marak: even got the investors in the mix [07:36] Marak: laying down the tracks [07:36] Marak: >.< [07:36] jmoyers: ;-) [07:36] chovy has joined the channel [07:38] AvianFlu_ has joined the channel [07:39] DrMcKay: oh. I've just noticed that I type to the rhythm [07:39] simenbrekken has joined the channel [07:42] johnwards has joined the channel [07:45] nphase_ has joined the channel [07:45] nphase_ has joined the channel [07:46] mytrile has joined the channel [07:48] DTrejo has joined the channel [07:49] ppcano_ has joined the channel [07:50] ppcano_ has joined the channel [07:50] ppcano_ has joined the channel [07:53] sh1mmer has joined the channel [07:53] metellus has joined the channel [07:55] secoif has joined the channel [07:58] tdegrunt has joined the channel [07:58] wilmoore has joined the channel [07:59] hitana has joined the channel [08:02] hitana has joined the channel [08:05] hitana has joined the channel [08:06] guidocalvano has joined the channel [08:08] errordeveloper has joined the channel [08:08] hitana has joined the channel [08:08] boehm has joined the channel [08:09] ph^ has joined the channel [08:09] sirdancealot has joined the channel [08:10] grekko has joined the channel [08:10] Tprice: how do i util.print and remove whats on the line when it prints [08:13] Fabryz has joined the channel [08:13] Tprice: something like util.print('' + (self.count / 1024) + 'kb/s \15') [08:16] hitana has joined the channel [08:16] adulteratedjedi has joined the channel [08:19] __doc__ has joined the channel [08:20] jsurfer has joined the channel [08:21] vns has joined the channel [08:23] skm has joined the channel [08:23] socketio\test\84 has joined the channel [08:28] joshgillies has joined the channel [08:29] pik has joined the channel [08:34] k1ttty has joined the channel [08:34] jetienne has joined the channel [08:34] parshap has joined the channel [08:37] hitana has joined the channel [08:38] simenbrekken has joined the channel [08:39] tilgovi has joined the channel [08:40] tilgovi has joined the channel [08:41] hitana has joined the channel [08:41] SanbarComputing: I am looking at the Node.js v0.4.12 Manual and Documentation, under TLS (SSL). Would this be the module I would use to implement the familiar "https://" vs "http://" type secure connection? [08:41] stagas has joined the channel [08:42] SubStack: SanbarComputing: there is an https module [08:42] jetienne has joined the channel [08:42] SubStack: http://nodejs.org/docs/v0.4.10/api/all.html#hTTPS [08:43] mc_greeny has joined the channel [08:44] tmedema has joined the channel [08:44] SanbarComputing: SubStack: Thank you very much. I figured there might be somehthing like that. However, could I not use the TLS (SSL) stuff to create a secure stream outside of a browser and without full https, basically an SSL TCP connection that could be used by an application without the semantics of https? [08:45] tmedema: Anyone has done Facebook authentication with PhoneGap with a node.js server? http://stackoverflow.com/questions/7695715/performing-authorized-through-facebook-rest-requests-to-my-node-js-server-on-a [08:45] SubStack: SanbarComputing: you can do that, yes [08:46] hitana has joined the channel [08:47] newvie has joined the channel [08:47] SanbarComputing: SubStack: Here is my real question (that was a lead in question for clarification). The documentation states that both client and server need a private key. However, when I use a browser, I do not ever explicitly obtain a private key for my browser (client). I assum https uses TLS (SSL) as its underlying transport. Does thi mean the browser automatically obtains a private key for itself programmatically, in which case I could do t [08:48] DrMcKay_ has joined the channel [08:49] newvie has left the channel [08:49] Daegalus: SanbarComputing: http://en.wikipedia.org/wiki/Https [08:50] Daegalus: SanbarComputing: specifically read the Limitations section [08:50] SanbarComputing: Daegalus: Thank you very much. [08:51] ppcano_ has joined the channel [08:52] gut4 has joined the channel [08:55] wbednarski has joined the channel [09:01] davidbanham has joined the channel [09:01] SanbarComputing: Daegalus: This answered my question. The client receives the server's public key, encrypts a random number with it, then sends it back to the server which unencrypts the random number with its private key. The reandom number becomes the shared private key, now known only to the client and server, and they use it to create key material for encryption and decryption: http://en.wikipedia.org/wiki/Transport_Layer_Security [09:03] mAritz has joined the channel [09:04] Wizek has joined the channel [09:05] SanbarComputing: Daegalus: I see now that Node would be an excellent means of privatizing peer-to-peer sessions through it (the server), for instance, for a private chat session amongst peers. Once the encrypted pip is established, clients could send send simple user/password info to authenticate to each other via the chat app (as an example) to ensure privacy, without exposing these because they are over TLS [09:06] Daegalus: Sounds about right [09:07] SanbarComputing: Daegalus: Thanks - I have never done this before, just learning about it right now for my prototype. Does Node provide a means of authenticating to the hosting server's user accounts? [09:07] davidban_ has joined the channel [09:07] SanbarComputing: Daegalus: That would be even better, maybe. [09:07] Daegalus: What do you mean? [09:07] dexter_e has joined the channel [09:09] SanbarComputing: Node runs on, say, RHEL. In order to chat, a user must have an RHEL user account on the host server. Then, if it is available, I use a Node API to authenticate users to the app using the host server user account information. [09:09] Daegalus: ummmm, you might have to implement that yourself, maybe calling system processes [09:09] Daegalus: you can run commands on the system from Node [09:10] SanbarComputing: Oh, Ok - I am remember now from my Unix admin days RADIUS and KERBEROS??? [09:11] SanbarComputing: Maybe I could use Node to access those services through APIs they expose, maybe through a custom C++ module added into Node ...??? [09:11] SanbarComputing: I'll look into it further on the web ... [09:12] cjheath has joined the channel [09:12] mraleph has joined the channel [09:13] Aiden has joined the channel [09:13] Wizek-other has joined the channel [09:13] SanbarComputing: Or maybe various Linux/Unix flavours expose APIs just for this type of thing, and I just need to read up on how to use them, again, extending Node perhaps through a custom C++ module or whatever ... ??? [09:14] Daegalus: yup [09:14] Daegalus: sounds about right [09:14] Daegalus: i think linux has commands for that [09:14] Daegalus: too [09:14] Daegalus: but i am not 100% sure [09:14] Daegalus: either way, its extendable and you can build on top o fit [09:15] SanbarComputing: yes, as I read the API docs on Node, I am very impressed - seems like I have hit upon just what I needed with it. I am very happy now, and feel confident I can now do the prototype for my client fairly easily on a linode VM machine on the web live. [09:15] Daegalus: yup [09:16] Manuel_ has joined the channel [09:16] SanbarComputing: (I sound very over-confident, don't I? Well, anyway, I think it is just the ticket, and hope I can succeed. [09:16] Daegalus: Go for it [09:16] SanbarComputing: Yes ... not tonight, tomorrow [09:17] SanbarComputing: Sat, 08 Oct 2011 04:17:12 -0500 [09:17] Daegalus: haha np [09:17] Daegalus: its 2 am here xD [09:17] SanbarComputing: I had no idea how late it was till I just posted that message - uggggh! [09:18] SanbarComputing: Well, anyway, it is worth it - I seem to have hit upon the right solution, and can report good things to my client now, I believe. [09:18] Daegalus: Well try it out first, make sure you use the right thing [09:18] SanbarComputing: (of course, after testing and stuff this weekend :) ) [09:19] Daegalus: if it doesnt work out, check out Python [09:19] SanbarComputing: Yes, I do not know python - I hear good things about it. Thanks for that tip. [09:19] Daegalus: SanbarComputing: http://learnpythonthehardway.org/ [09:20] Daegalus: http://learnpythonthehardway.org/book/ iuts free online [09:20] SanbarComputing: Daegalus: Cool! Thanks! [09:20] SanbarComputing: Daegalus: The price is right! [09:21] jetienne has joined the channel [09:21] markwubben has joined the channel [09:21] rendar has joined the channel [09:22] SanbarComputing: Daegulus: You have been a great help - thanks! And Good Night! [09:22] Syndrom1 has joined the channel [09:24] Syndrom1: Hello. will version 0.5 have long time support? [09:24] m4rcs has joined the channel [09:24] Syndrom1: Like write it now with 0.5.8 and upgrade node without touching the code. [09:27] Daegalus: Syndrom1: umm, i think most of whats in 0.5.8 goes into the next stable branch of 0.6 . Versioning owrks wehre even numbers are stable builds, odd are unstable might break on something builds [09:27] Daegalus: whiel yes it should be goof for anything after 0.5.8, it wont work with 0.4 i think [09:28] Daegalus: so its a "kinda yes" [09:28] k1ttty has joined the channel [09:28] Daegalus: as in once 0.6 comes out, it will continue to support whats in 0.5.8 [09:28] Daegalus: but it can change at anytime [09:28] Daegalus: until 0.6 comes out to finalize it more [09:29] Syndrom1: will there be gsoc in 2012? [09:29] Daegalus: gsoc? [09:29] Syndrom1: google summer of code [09:29] Daegalus: no clue [09:30] superjudge has joined the channel [09:30] Syndrom1: it seems the api is stable enough to write a webchat in it. [09:30] Daegalus: oh, the official demo is a webchat [09:30] Syndrom1: Cause the webchat is now php based. with boring ajax every 1.6 seconds [09:31] Syndrom1: yep [09:31] davidbanham has joined the channel [09:31] Syndrom1: it seems like node is perfect for it [09:31] Daegalus: API is stable enough to do quite a lot [09:31] Syndrom1: and it supports websockets :) [09:31] Daegalus: there are bots in this channel and #nodejitsu that run on node.js [09:31] JakeyChan: what is the commonJS module ?? [09:32] Daegalus: http://geekli.st runs entirely on Node [09:32] `3rdEden: PHP also supports websockets, every language does [09:32] Daegalus: JakeyChan: http://www.commonjs.org/ [09:32] Syndrom1: i still wanna use nodejs for it. [09:32] `3rdEden: ;D [09:32] dgathright has joined the channel [09:33] Daegalus: ya, the Node.js Webchat demo impressed me [09:33] Daegalus: when i was first researching it [09:33] Syndrom1: now the chat is done with mysql backend (which runs fully in ram) [09:33] Syndrom1: maybe it is possible to do it without mysql and only use node? [09:34] Daegalus: thats what the demo does i think [09:34] Daegalus: or you can use SQLite or Mongo, or any other data store [09:34] JakeyChan: Daegalus: thanks :) [09:35] Syndrom1: I don't log that chat, so maybe i can just use arrays [09:35] Daegalus: you can just purge the log [09:35] Daegalus: or only keep X amount of lines [09:36] Syndrom1: client doesn't want log, so no log. [09:36] Daegalus: then arrays i guess [09:36] fly-away has joined the channel [09:37] Daegalus: Syndrom1: you can jsut use the demo as a base: https://github.com/ry/node_chat [09:38] Daegalus: doesnt have logging from what I see [09:38] Daegalus: MIT license [09:38] Syndrom1: oh nice! [09:38] Syndrom1: thank you [09:39] Syndrom1: gonna adjust it, because i have to code 1 on 1 chat [09:39] Daegalus: well ya, just saying, working off a base thats already pretty much tested helps [09:40] ayaz has joined the channel [09:44] swick has joined the channel [09:48] AvianFlu has joined the channel [09:49] Metal3d has joined the channel [09:49] ppcano_ has joined the channel [09:49] ppcano_ has joined the channel [09:52] Wizek-other has joined the channel [09:54] k1ttty has joined the channel [09:55] herbySk has joined the channel [09:59] shanebo has joined the channel [10:03] Twelve-60 has joined the channel [10:04] franck34: hi, i'm looking to manualy reload a module in a shell node app. I mean, when pressing "R" key, i'd like to some modules (mines). [10:05] franck34: node-hot-reload is watching for changes in files and then reload it [10:05] franck34: i can see in this code the way to read file and make a new object with the new source code [10:05] franck34: but do you know a simple way to do that ? [10:05] Syndrom1 has joined the channel [10:06] ayaz has joined the channel [10:06] dob_ has joined the channel [10:07] TheJH has joined the channel [10:07] swair has joined the channel [10:08] random123 has joined the channel [10:11] franck34: got it [10:11] franck34: delete(require.​cache[ require.​resolve('./myRe­questHandler') ]) [10:11] franck34: before require it again [10:11] franck34: ACTION thanks freewil  [10:11] franck34: oups [10:11] franck34: :) [10:19] liar has joined the channel [10:22] khismetix has joined the channel [10:23] LordMetroid has joined the channel [10:25] khismetix has left the channel [10:28] stagas has joined the channel [10:29] cjheath has joined the channel [10:31] pgherveou has joined the channel [10:31] jomoho has joined the channel [10:35] JakeyChan_ has joined the channel [10:42] N0va` has joined the channel [10:49] d0k has joined the channel [10:49] criswell has joined the channel [10:52] jackbean has joined the channel [10:55] dexter_e has joined the channel [10:58] m00p has joined the channel [11:01] temp01 has joined the channel [11:03] fangel has joined the channel [11:09] swair has joined the channel [11:16] davidbanham has joined the channel [11:18] TheJH: is TooTallNate sometimes on IRC? [11:19] DrMcKay: TheJH: yes [11:19] DrMcKay: I've seen him today [11:19] TheJH: DrMcKay, under the name TooTallNate? [11:19] DrMcKay: yes [11:20] TheJH: ok, thanks [11:20] metellus has joined the channel [11:24] JakeyChan has joined the channel [11:26] scott_gonzalez has joined the channel [11:27] rurufufuss has joined the channel [11:29] Morkel has joined the channel [11:32] topaxi has joined the channel [11:32] swick has joined the channel [11:35] Swizec_ has joined the channel [11:36] meso has joined the channel [11:37] swair has joined the channel [11:38] lz has joined the channel [11:39] lz: mornin' [11:39] superjudge has joined the channel [11:39] lz: we're embassy grade now? [11:39] lz: hot dog [11:40] netlemur has joined the channel [11:40] robi42 has joined the channel [11:40] herbySk has joined the channel [11:41] CrisO has joined the channel [11:45] CarterL has joined the channel [11:46] johnwards has joined the channel [11:49] swick has joined the channel [11:49] DennisRasmussen has joined the channel [11:50] MrGoodbyte has joined the channel [11:50] Acolyte has joined the channel [11:50] Syndrom1: so, can nodejs handle 5000 clients at once, at a simple chat app? [11:51] Acolyte: How do you compile v0.5.4 without warnings treated as errors? [11:51] DrMcKay: Syndrom1: sure, if you tweak your system settings [11:51] DrMcKay: Acolyte: edit deps/v8/SConstruct [11:52] Acolyte: DrMacKay: bingo, thanks! :) [11:52] DrMcKay: :) [11:52] Syndrom1: DrMcKay: what do i have to tweak? [11:53] DrMcKay: Syndrom1: ulimit -n [11:53] Acolyte: dammit, I should've realized that because node.js uses scons [11:53] DrMcKay: Syndrom1: ulimit -n is a maximum number of open file descriptors [11:53] stepheneb has joined the channel [11:53] DrMcKay: Acolyte: v8 uses Scons, node uses gyp now [11:54] Syndrom1: DrMcKay: it doesn't even need one single file [11:54] DrMcKay: Syndrom1: http://serverfault.com/questions/48717/practical-maximum-open-file-descriptors-ulimit-n-for-a-high-volume-system [11:54] Acolyte: good point [11:54] Acolyte: any idea if cloud9 can run under v0.5.4+? [11:54] DrMcKay: Syndrom1: it needs. sockets are file descriptors as well [11:54] Syndrom1: should just run in memory [11:54] Syndrom1: oh [11:54] Syndrom1: damn [11:55] erichynds has joined the channel [11:55] meso has joined the channel [11:55] FireCat has joined the channel [11:56] Syndrom1: DrMcKay: where would be the current node.js limit? [11:56] neurodrone has joined the channel [11:58] gut4 has joined the channel [11:59] Sami_ZzZ has joined the channel [12:01] Acolyte: node-fibers here we go! [12:02] Syndrom1: what are fibers? [12:02] stalled has joined the channel [12:02] Acolyte: https://github.com/laverdet/node-fibers [12:03] Fabryz has joined the channel [12:03] Syndrom1: oh laverdet the facebook guy [12:03] amigojapan has joined the channel [12:04] mc_greeny has joined the channel [12:07] fairwinds has joined the channel [12:08] saesh has joined the channel [12:08] synkro has joined the channel [12:10] saesh has joined the channel [12:11] talltyler has joined the channel [12:13] ilikeit has joined the channel [12:13] saesh has joined the channel [12:15] deedubs has joined the channel [12:16] phluffy has joined the channel [12:17] lv has joined the channel [12:25] __tosh has joined the channel [12:28] stepheneb has joined the channel [12:28] enmand has joined the channel [12:29] stagas has joined the channel [12:35] piscisaureus has joined the channel [12:37] gkmngrgn has joined the channel [12:37] lz: is node-fibers is like java Thread? [12:38] Acolyte: how do you apply gists? [12:40] lz: apply directly to forehead [12:41] Acolyte: lz: riiight ;) [12:41] Fabryz has joined the channel [12:42] c4milo has joined the channel [12:42] Acolyte: I dl it to the directory, called git apply --init my_patch, but no changes were made [12:42] Acolyte: --stat [12:43] `3rdEden has joined the channel [12:43] saikat has joined the channel [12:44] c4milo has joined the channel [12:47] talltyler has joined the channel [12:48] gut4 has joined the channel [12:51] ed8t has joined the channel [12:52] Sorella has joined the channel [12:53] gut4 has joined the channel [12:55] cjroebuck has joined the channel [12:56] Acolyte: besides https://github.com/cloudhead/less.js/pull/377, has anyone figured how to avoid require.paths issue with v0.5.4+? [12:59] schwab has joined the channel [13:00] zmbmartin has joined the channel [13:02] TheJH: Acolyte, that's the only clean way, i think [13:03] Acolyte: TheJH: I suppose.. apparently the issue was in cloud9' paths.js file [13:03] pgherveou has joined the channel [13:03] Acolyte: not in less.js [13:04] swair has joined the channel [13:10] Morkel has joined the channel [13:13] tdegrunt has joined the channel [13:16] infynyxx has joined the channel [13:17] Acolyte: anyone who works with cloud9ide been able to fix its require.path.unshift? [13:17] stagas has joined the channel [13:18] postwait has joined the channel [13:21] wbednarski has joined the channel [13:22] N0va` has joined the channel [13:24] robi42 has joined the channel [13:25] wilmoore has joined the channel [13:26] TheJH: Acolyte, what do you mean, fix it? Don't use it! [13:27] TheJH: Acolyte, require.paths.unshift is deprecated [13:28] TheJH: Acolyte, from the 0.4.11 docs: **Note:** Please Avoid Using `require.paths` - require.paths will only be supported through the end of the v0.4 stable branch. It is removed from node as of v0.5. While it seemed like a good idea at the time, and enabled a lot of useful experimentation, in practice a mutable require.paths list is often a troublesome source of confusion and headaches. [13:28] hasenj has joined the channel [13:29] Acolyte: TheJH: yes, I noticed that, I'm trying to figure out how to get rid of it in cloud9 which still uses them [13:29] TheJH: Acolyte, ah, sorry [13:31] tomlion has joined the channel [13:32] scott_gonzalez has joined the channel [13:32] torsd has joined the channel [13:32] zakuni has joined the channel [13:34] luke` has joined the channel [13:34] mehtryx has joined the channel [13:36] shanebo has joined the channel [13:37] lz: anyone else run node on heroku? [13:38] chjj has joined the channel [13:39] simenbrekken has joined the channel [13:39] maushu has joined the channel [13:40] tomlion has joined the channel [13:40] Brandon_R has joined the channel [13:40] Brandon_R: hi [13:40] FireCat has joined the channel [13:40] Brandon_R: what's up guys [13:40] JakeyChan_ has joined the channel [13:40] lz: nm, you? [13:40] Brandon_R: same [13:40] Brandon_R: any cool projects? [13:41] i42n has joined the channel [13:41] Syndrom1: socket.io doesn't liek me. [13:41] `3rdEden: y u be hatin [13:41] `3rdEden: Syndrom1 why doesn't it like you [13:42] pfiled has left the channel [13:42] Syndrom1: giving me random errors. [13:42] Syndrom1: i might need to update node first. [13:42] `3rdEden: like? [13:43] Brandon_R: lol [13:43] Brandon_R: what;s wrong [13:43] DrMcKay: `3rdEden: does socket.io guarantee that messages come in the right order? [13:44] `3rdEden: DrMcKay we don't number messages [13:44] Syndrom1: updated. [13:44] Syndrom1: lets hope it werks now [13:44] `3rdEden: so we can't guarantee it, 100% [13:44] DrMcKay: `3rdEden: ok, thanks [13:44] Syndrom1: oh nice. [13:44] Syndrom1: it werks now [13:45] jmar777 has joined the channel [13:46] Syndrom1: yay, it even uses native websockets at chrome (with websockets enabled ofc) [13:46] Brandon_R: I have an idea [13:47] Brandon_R: Yeo [13:47] Brandon_R: what are the web browsers that websockets comes native on? [13:47] Brandon_R: FF and Chrome alone? [13:47] ag4ve has joined the channel [13:47] `3rdEden: FF chrome, safari, IE 11 [13:48] Syndrom1: http://caniuse.com/#search=websock [13:49] russell has joined the channel [13:49] `3rdEden: oh it's in IE 10 :$ [13:49] localhost has joined the channel [13:49] Syndrom1: ie10 is like 2 years away. [13:50] `3rdEden: Atleast they are already have a preview out [13:50] Lingerance: ... and they're wondering why they lose market share [13:50] `3rdEden: So now we have proof they are making progress [13:50] yept has joined the channel [13:50] Syndrom1: they should release like once a year, so people will update. and not wait for new PC. [13:51] hitana has joined the channel [13:51] Syndrom1: anybody runs a hackintosh? [13:51] Vennril has joined the channel [13:53] Brandon_R: Nope [13:53] `3rdEden: yup [13:53] `3rdEden: On a old dell inspiron [13:53] Brandon_R: I like Google Chrome model the best [13:53] replore_ has joined the channel [13:53] replore has joined the channel [13:53] Syndrom1: is it stable enough as main pc? [13:53] Brandon_R: a release every 6 weeks or so [13:53] tmedema: Talking about a mac, can one develop for iOS with a PC? [13:54] Syndrom1: you need a license to release apps for iOS [13:54] `3rdEden: Syndrom1 nope, because my hardware isn't 100% compatible [13:54] tmedema: Sure but that's only 99$ [13:54] Brandon_R: ANyone here taking or is a major in EE? [13:54] Syndrom1: EE? [13:54] Brandon_R: electrical engineering [13:54] `3rdEden: but if you find the correct hardware it would run smooth [13:54] hitana has joined the channel [13:54] Brandon_R: i'm thinking of a major [13:54] Syndrom1: never, all of us are computer sciene. [13:54] Syndrom1: I will buy the right hardware. [13:55] Syndrom1: Cheapest i5, with gigabyte mainboard with P67 chipset, and 8gb ram. [13:55] Syndrom1: All together for like 270eur. [13:55] Lingerance: Brandon_R: Try ##Electronics or ##Hardware [13:56] madsleejensen has joined the channel [13:56] bshumate has joined the channel [13:56] bshumate has joined the channel [13:58] Brandon_R: I have a question [13:58] Brandon_R: How big can an express app be before the number of routes/models etc starts to slow it down? [13:58] brianseeders has joined the channel [13:59] joeytwiddle has joined the channel [13:59] Syndrom1: Brandon_R: depends on mad regex. [14:00] Brandon_R: any large express applications? [14:00] lz: Brandon_R when you run out of memory [14:00] Syndrom1: http://caniuse.com/#compare=y&b1=ie+9&b2=chrome+16 [14:01] Syndrom1: he won't run out of memory, cause no java is involved. [14:01] _jhs has joined the channel [14:01] lz: Syndrom1 ? his route descriptions could theoretically be so big it gets paged [14:02] Syndrom1: right. [14:02] Cheery has joined the channel [14:02] Syndrom1: theoretically. [14:03] Cheery: yes [14:03] Brandon_R: holy crap [14:03] Brandon_R: http://www.metabrew.com/article/a-million-user-comet-application-with-mochiweb-part-1 [14:04] lz: Syndrom1 right.. practically I don't think it would ever happen. I was trying to be sarcastic... [14:05] lz: Brandon_R wow yea man, he's wearing a fedora [14:06] Cheery: could you list some nice combo for writing http based web services? [14:07] Cheery: mostly I'd look for something that removes my need for dissecting the RFC with a needle. [14:09] scott_gonzalez has joined the channel [14:11] talltyler has joined the channel [14:11] sirdancealot has joined the channel [14:11] maushu has joined the channel [14:12] kriszyp has joined the channel [14:12] rjack has joined the channel [14:13] schwab has joined the channel [14:14] swair has joined the channel [14:14] Brandon_R: ☺ ☺☺ ☺☺ ☺☺ ☺☺ ☺☺ ☺☺ ☺☺ ☺☺ ☺☺ ☺☺ ☺☺ ☺☺ ☺☺ ☺☺ ☺☺ ☺ [14:17] Brandon_R: Hey guys [14:17] Brandon_R: What cha working on? [14:17] herbySk has joined the channel [14:18] TheJH: garbage collection over the net :) [14:18] Ang3 has joined the channel [14:20] Ang3 has left the channel [14:21] igl1 has joined the channel [14:22] boehm has joined the channel [14:24] swair has joined the channel [14:28] piscisaureus_ has joined the channel [14:28] jbpros has joined the channel [14:28] swair has joined the channel [14:30] devuo has joined the channel [14:30] rjack: doing my laundry [14:30] chance- has joined the channel [14:32] Brandon_R: cool [14:33] pixel13 has joined the channel [14:33] pixel13 has left the channel [14:36] tomlion_ has joined the channel [14:36] johnwards has joined the channel [14:36] chance- has joined the channel [14:36] FIQ has joined the channel [14:37] N0va` has joined the channel [14:40] CarterL has joined the channel [14:44] msilverman2 has joined the channel [14:44] mytrile has joined the channel [14:44] swair has joined the channel [14:47] hitana has joined the channel [14:48] isaacs has joined the channel [14:49] k1ttty has joined the channel [14:49] brianc has joined the channel [14:50] hitana has joined the channel [14:50] temp01 has joined the channel [14:51] schwab has joined the channel [14:52] infynyxx has joined the channel [14:53] jakehow has joined the channel [14:53] Venom_X has joined the channel [14:56] hitana has joined the channel [14:56] chance- has joined the channel [15:01] jldbasa has joined the channel [15:02] brianc has joined the channel [15:05] mynyml has joined the channel [15:07] jetienne has joined the channel [15:08] `3rdEden: Can someone confirm this bug: https://gist.github.com/1272402 [15:08] `3rdEden: V8 doesn't allow regex reusing? [15:08] CrisO has joined the channel [15:08] TheJH: `3rdEden, confirmed on v0.5.8 [15:09] TheJH: `3rdEden, every second time works :D [15:09] MooGoo: what? [15:09] adnam: `3rdEden: wierd, works every other time [15:09] MooGoo: where is the bug [15:09] `3rdEden: TheJH WTF? [15:09] MooGoo: that is how exec() is supposed to work [15:10] `3rdEden: no? [15:10] adnam: oh right it is [15:10] MooGoo: when you have a g flag in your regex [15:10] `3rdEden: rly o_o? [15:10] MooGoo: yes [15:10] erichynds has joined the channel [15:10] MooGoo: exec gives you extra info [15:10] `3rdEden: so you say, if i delete the g flag it would work again ;9 [15:10] TheJH: https://gist.github.com/3f6556919ca0cbe23af2 [15:10] MooGoo: perhaps [15:10] `3rdEden: and you are right [15:10] `3rdEden: >_< [15:11] chance- has joined the channel [15:11] `3rdEden: Thanks MooGoo I have been banging my head at this for a while now ;9 [15:11] TheJH: still WTF to me... [15:12] `3rdEden: Same [15:12] MooGoo: there's a reason [15:12] whitman has joined the channel [15:12] MooGoo: it's for like [15:12] MooGoo: while (match = reg.exec(str)) [15:13] TheJH: ACTION creates an issue at https://github.com/brianleroux/wtfjs/issues [15:13] MooGoo: exec returns extra info that you dont get with str.match() [15:14] MooGoo: reg = /\d/g; while(match = reg.exec('123')) { console.log(match) } [15:14] jetienne has joined the channel [15:14] MooGoo: >> reg = /\d/g; while(match = reg.exec('123')) { console.log(match) } [15:14] MooGoo: js> reg = /\d/g; while(match = reg.exec('123')) { console.log(match) } [15:14] TheJH: >>> 1 [15:14] TheJH: v8> 1 [15:14] deadman87 has joined the channel [15:14] TheJH: hmm... [15:14] TheJH: .. 1 [15:14] MooGoo: lol> reg = /\d/g; while(match = reg.exec('123')) { console.log(match) } [15:15] MooGoo: v8: reg = /\d/g; while(match = reg.exec('123')) { console.log(match) } [15:15] MooGoo: js: 1 [15:15] TheJH: !admin eval (function(){var reg = /\d/g; while(var match = reg.exec('123')) { console.log(match) }})() [15:15] TheJH: ah, wait, no console.log [15:15] `3rdEden: >>> 2 [15:15] `3rdEden: :9 [15:15] `3rdEden: >> 2 [15:15] TheJH: !admin eval (function(){var reg = /\d/g; while(var match = reg.exec('123')) { irc.privmsg('#node.js', match) }})() [15:16] `3rdEden: bot is dead ;9 [15:16] TheJH: meeeh, I should have given mine better error reporting for eval [15:16] TheJH: !admin eval (function(){var reg = /\d/g; var match; while(match = reg.exec('123')) { irc.privmsg('#node.js', match) }})() [15:16] MooGoo: I should just fix catb0t [15:16] TheJH: true [15:17] zastaph has joined the channel [15:17] TheJH: you really should [15:17] `3rdEden: where did the v8 bot anyways? [15:17] TheJH: ACTION is ashamed [15:18] Metal3d has joined the channel [15:18] catb0t has joined the channel [15:19] MooGoo: hm [15:19] MooGoo: .. reg = /\d/g; while(match = reg.exec('123')) { console.log(match) } [15:19] MooGoo: I give up on life [15:19] `3rdEden: .. 10*10 [15:19] catb0t: 100 [15:20] `3rdEden: .. "hello world" [15:20] catb0t: 'hello world' [15:20] TheJH: .. 1+2 [15:20] catb0t: 3 [15:20] MooGoo: argh [15:20] MooGoo: .. reg = /\d/g; while(match = reg.exec('123')) { console.log(match) } [15:20] catb0t: [ '1' ]; [ '2' ]; [ '3' ]; undefined [15:20] `3rdEden: .. Array(16).join("lol" - 2) + "batman" [15:20] catb0t: 'NaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNbatman' [15:20] MooGoo: damnit [15:20] TheJH: MooGoo, ? [15:20] MooGoo: .. reg = /\d/g; while(match = reg.exec('123')) { console.log(Object.getOwnPropertyNames(match)) } [15:20] catb0t: [ '0', 'index', 'length', 'input' ]; [ '0', 'index', 'length', 'input' ]; [ '0', 'index', 'length', 'input' ]; undefined [15:20] MooGoo: yay [15:20] MooGoo: uh [15:21] TheJH: .. (function(){return arguments.callee.caller})() [15:21] catb0t: [Function] [15:21] MooGoo: lol [15:21] TheJH: .. (function(){return arguments.callee.caller.name})() [15:21] catb0t: '' [15:21] MooGoo: she's not fixed [15:21] TheJH: .. (function(){return arguments.callee.caller.toString()})() [15:21] catb0t: "function (msg) {\n\011\011\011\011if (msg == '#PING') process.postMessage('#PONG');\n\011\011\011\011else {\n\011\011\011\011\011process.postMessage(\n\011\011\011\011\011\011inspect(vm.runInNewConte ... [15:21] MooGoo: but I dont think you can hax fast enough [15:21] TheJH: MooGoo, not? [15:21] TheJH: :( [15:21] TheJH: .. console.log [15:21] catb0t: [Function] [15:21] MooGoo: damn thats ugly [15:21] TheJH: .. console.log.constructor [15:21] catb0t: [Function] [15:22] TheJH: .. new (console.log.constructor)("return process").version [15:22] catb0t: undefined [15:22] TheJH: :( [15:22] DrMcKay: haha [15:22] Syndrom1: 1/0 [15:22] Syndrom1: 1+1 [15:22] TheJH: .. (function(){return arguments.callee.caller.arguments})() [15:22] MooGoo: i fix it ull see [15:22] TheJH: .. (function(){return arguments.callee.caller.arguments.length})() [15:22] TheJH: .. 1 [15:22] TheJH: :( [15:23] MooGoo: so...is it at all possible to start v8 without loading any of node [15:23] MooGoo: or do I have to compile a sperate v8 for that [15:23] TheJH: MooGoo, you could rimraf global, I think [15:23] MooGoo: wat [15:24] TheJH: MooGoo, you could delete all globals by whitelisting what is allowed to remain in the "global" object [15:24] TheJH: MooGoo, and delete the rest [15:24] TheJH: MooGoo, also, to avoid the caller stuff, you could probably use the _main.js mechanism (or whatever that file was called) [15:24] dimroc has joined the channel [15:24] MooGoo: delete process and require [15:25] Jippi has joined the channel [15:26] `3rdEden: .. while(1) [15:26] `3rdEden: is it broken yet ;o [15:27] TheJH: MooGoo, also "root". "require" isn't a global. also, console might be dangerous. oh, and "module". [15:27] `3rdEden: .. global [15:28] slifty has joined the channel [15:28] matyr has joined the channel [15:28] robotmay has joined the channel [15:29] chance- has joined the channel [15:33] TheJH: MooGoo, ah, I know. replace src/node.js with something that removes all properties of "process" before it calls the code you want to sandbox. the code can access the process object by doing arguments.caller.callee, but it's empty. :) [15:33] TheJH: MooGoo, and no globals :) [15:35] lz: anyone know a good automatic error handler? [15:35] jaequery has joined the channel [15:36] EvRide has joined the channel [15:36] lz: don't have time to deal with error handling right now.. just need something a little more advanced than catching all errors [15:36] DrMcKay: TheJH: this tool I was talking about yesterday, I rewrote it in Lua :D [15:36] TheJH: lz, what's an automatic error handler? "oh, an error happened. well, nothing to see here, go on, work with your corrupt data like nothing happened"? [15:36] TheJH: DrMcKay, why lua? [15:36] DrMcKay: TheJH: wanted to learn it [15:36] saesh has joined the channel [15:37] eb4890 has joined the channel [15:37] MooGoo: lol [15:37] DrMcKay: TheJH: it doesn't have all the features yet [15:37] DrMcKay: TheJH: https://github.com/mmalecki/keep-up [15:37] MooGoo: maybe ill just use spidermonkey [15:37] tprice1 has joined the channel [15:37] lz: TheJH yes exactly how did you know :) [15:37] TheJH: lz, process.onUncaughtException(noop) [15:38] TheJH: erm, no, wait [15:38] TheJH: lz, process.on('uncaughtException', noop) [15:38] TheJH: lz, if you also have synchronous errors, you might want to have a look at substacks javascript-ast-walking stuff (burrrito), you could try-catch-ify all your functions with it relatively easily [15:39] TheJH: oh, so WRONG [15:39] lz: I was thinking along the lines of process.on('uncaughtException', noop), but prettier [15:39] lz: my app's stateless so it doesn't matter [15:39] tjholowaychuk has joined the channel [15:39] TheJH: lz, you'll still have opened, pending requests [15:40] TheJH: lz, every htp request means state [15:40] TheJH: *http [15:40] tjholowaychuk has joined the channel [15:40] lz: ah, you're right [15:40] TheJH: lz, how about just using forever? [15:41] jtsnow has joined the channel [15:41] adrianmg has joined the channel [15:41] TheJH: "your application won't drop dead when you shoot it. it will be hovering between life and death as it crashes and restarts" [15:42] tjholowaychuk: use cluster [15:42] tjholowaychuk: then you wont have downtime [15:42] tjholowaychuk: at all [15:42] lz: can you use forever/cluster on heroku? [15:43] Jippi has joined the channel [15:43] tjholowaychuk: Iz not sure, they seem to limit things [15:43] tjholowaychuk: but i imagine so [15:43] tjholowaychuk: forever is basically just monit [15:44] lz: tjholowaychuk hmm, how does zero-downtime on cluster work? [15:45] tjholowaychuk: when you signal a restart it duplicates itself [15:45] tjholowaychuk: handles the active connections [15:45] tjholowaychuk: and then kills the old master [15:47] chance- has joined the channel [15:47] lz: tjholowaychuk cool, i'll give it a shot on heroku and see how it goes, thanks [15:47] lz: and thanks TheJH [15:48] tjholowaychuk: (not bashing forever, that's just not what it's built for) [15:48] alternut has joined the channel [15:50] alternut has left the channel [15:51] brianloveswords has joined the channel [15:51] SoulRaven has joined the channel [15:52] groovebucket has joined the channel [15:56] chance- has joined the channel [15:57] ceej has joined the channel [15:58] towski has joined the channel [16:02] johnwards has joined the channel [16:02] MooGoo: wtf is global.lol_is_enabled [16:03] Syndrom1: looks important [16:03] Syndrom1: do not change. [16:03] MooGoo: but it evals to false [16:03] MooGoo: I want my lol enabled [16:03] Syndrom1: lol [16:03] Syndrom1: set it to 1337 [16:03] MooGoo: sounds like the right thing to do [16:03] Syndrom1: sure [16:04] Syndrom1: js does not have namespaces? [16:04] MooGoo: noep [16:04] MooGoo: it has plenty of lol tho [16:04] isaacs has joined the channel [16:04] MooGoo: #ifdef LIVE_OBJECT_LIST [16:05] SamuraiJack has joined the channel [16:05] chance- has joined the channel [16:05] devongovett has joined the channel [16:06] smathy has joined the channel [16:07] ppcano has joined the channel [16:07] pizthewiz has joined the channel [16:07] ppcano has joined the channel [16:09] cjm has joined the channel [16:11] cognominal has joined the channel [16:11] CrisO has joined the channel [16:11] karboh has joined the channel [16:12] madsleejensen has joined the channel [16:14] JakeyChan has joined the channel [16:14] guidocalvano has joined the channel [16:15] tprice1 has joined the channel [16:16] chance- has joined the channel [16:18] MrNibbles has joined the channel [16:19] ayaz has joined the channel [16:19] Deegie has joined the channel [16:19] tar_ has joined the channel [16:20] ppcano has joined the channel [16:20] robi42 has joined the channel [16:21] mytrile has joined the channel [16:21] brianseeders has joined the channel [16:22] Xano has joined the channel [16:24] yept has joined the channel [16:25] TheFuzzball has joined the channel [16:25] swair has joined the channel [16:25] matyr has joined the channel [16:26] sh1mmer has joined the channel [16:27] dshaw_ has joined the channel [16:28] tmedema has joined the channel [16:28] tmedema: When I create a simple REST service, is using connect just fine? Or would using Express or something more advanced be a safer approach? [16:28] jslatts has joined the channel [16:28] tmedema: I don't need anything fancy, just need it to be stable and safe [16:31] dshaw_ has joined the channel [16:34] ayaz has joined the channel [16:34] wbw72 has joined the channel [16:34] criswell has joined the channel [16:36] tmedema: question answered in #express -- thanks [16:38] sdwrage has joined the channel [16:38] hasenj: can I ask npm questions here? [16:39] tar_ has left the channel [16:39] hasenj: how do I check for broken packages? [16:39] hasenj: orospakr, see which libraries depend on a given package? [16:41] `3rdEden has joined the channel [16:43] maletor has joined the channel [16:43] skiz has joined the channel [16:44] jtsnow has joined the channel [16:45] erickt has joined the channel [16:49] TheJH: hasenj, you can see which packets depend on another packet by looking at http://search.npmjs.org/ [16:49] TheJH: hasenj, what do you mean with "broken packages"? [16:49] hasenj: TheJH, I was doing an npm update, and zlib-sync got stuck, so I ctrl-c'ed it [16:50] hasenj: and things got broken [16:50] hasenj: anyway [16:50] hasenj: I manually installed zlib-sync again [16:50] hasenj: and it worked [16:50] kenperkins has joined the channel [16:50] hasenj: but I wanted to know if there's a way to fix the problem implicitly [16:50] hasenj: for example, by reinstalling one of the packages that depend on zlib [16:50] ag4ve has joined the channel [16:51] TheJH: hasenj, baybe you just didn't wait long enough? [16:51] TheJH: *maybe [16:51] hasenj: I did wait long enough [16:51] hasenj: the second time I installed it, it installed in under a second [16:51] hasenj: the first time, I think I waited at least 10 minutes [16:52] TheJH: hmm, ok [16:54] max_dev has joined the channel [17:00] hacksparrow has joined the channel [17:00] stepheneb has joined the channel [17:01] ppcano_ has joined the channel [17:03] stagas has joined the channel [17:05] adrianmg has left the channel [17:07] hacksparrow_ has joined the channel [17:07] matyr has joined the channel [17:07] boaz has joined the channel [17:10] MooGoo has joined the channel [17:10] FireCat has joined the channel [17:13] dmwuw_ has joined the channel [17:14] confoocious has joined the channel [17:14] hitana has joined the channel [17:14] jetienne has joined the channel [17:15] motiooon has joined the channel [17:16] slifty has joined the channel [17:17] pandeiro has joined the channel [17:18] hij1nx has joined the channel [17:18] hotch has joined the channel [17:18] hij1nx: hello [17:18] xerox: hi [17:18] hij1nx: haha [17:19] hij1nx: wrong node* room [17:19] mandric has joined the channel [17:19] hij1nx: xerox: hey, DM me [17:19] xerox: OK [17:19] Spion_ has joined the channel [17:19] hitana has joined the channel [17:20] slifty has joined the channel [17:22] chance- has joined the channel [17:23] hitana has joined the channel [17:23] MooGoo has joined the channel [17:23] MOTOWN_DETROIT has joined the channel [17:23] MOTOWN_DETROIT: Hello, my node nerd homies from South Detroit :-) [17:24] MOTOWN_DETROIT: So, let's talk about threads in node.js. [17:24] lz: oh you poor soul [17:24] guidocalvano: if I use requirejs, are dependency objects cached? [17:25] guidocalvano: I don't think you can have threads in node dude [17:25] lz: you can have fibers [17:25] lz: https://github.com/laverdet/node-fibers [17:25] MOTOWN_DETROIT: I need threads to resize images in node.js [17:26] hitana has joined the channel [17:26] Syndrom1: why not use external program for resize? [17:26] guidocalvano: you probably don't need threads [17:26] MOTOWN_DETROIT: Resize a 272MB bitmap file of Madonna's hairzone == fail in node.js [17:26] tjholowaychuk: or just talk to M node workers processes via IPC [17:26] tjholowaychuk: you dont need to do that on the fly [17:26] lz: yes, node imagemagick could do a good job [17:27] FIQ has joined the channel [17:27] MOTOWN_DETROIT: No, the resizer is written in JS [17:27] guidocalvano: you can probably split up the resizing task into several smaller tasks [17:27] FMJaggy has joined the channel [17:27] tjholowaychuk: unless your service is realtime-ish image manip [17:27] tjholowaychuk: that's bad design [17:27] guidocalvano: and then use setinterval to execute those tasks [17:28] MOTOWN_DETROIT: guidocalvano: setInterval will allow them to run without blocking the event loop? [17:28] guidocalvano: yes [17:28] MOTOWN_DETROIT: So it's a thread? [17:28] guidocalvano: well and no [17:28] tjholowaychuk: why are you processing images in a web server process [17:28] guidocalvano: what you can do is do parts of the resizing [17:28] guidocalvano: ehm [17:29] MOTOWN_DETROIT: tjholowaychuk: Because I ambored with Fibonacci numbers. [17:29] tjholowaychuk: we have video related jobs that take 10m+ but there's no way we could inline that code [17:29] hitana has joined the channel [17:30] MOTOWN_DETROIT: Seriously, v8 is really fast for converting the .bmp files into HTML [17:30] guidocalvano: suppose you can resize a part of the image, using a function resize( sourceImage, top, left, width, height, scale ) [17:30] guidocalvano: then you could split the whole image in to pieces [17:30] MOTOWN_DETROIT: (Don't ask why we're rendering tables from .bmp pixels) [17:30] guidocalvano: and then resize all those pieces [17:30] tjholowaychuk: even if you *can* do it in the same process, doesn't mean you should [17:30] guidocalvano: and recombine those pieces in hte lst call [17:31] MOTOWN_DETROIT: guidocalvano: Sounds inefficient switching back and forth :/ [17:31] guidocalvano: well you don't do a context switch [17:31] guidocalvano: its still all in the same thread [17:31] MOTOWN_DETROIT: Ah [17:32] MOTOWN_DETROIT: And it will be fast because of v8 if I get the switching back and forth right [17:32] FireCat has joined the channel [17:32] guidocalvano: relatively fast [17:32] guidocalvano: you could also create a c++ module and bind that to javascript [17:32] Destos has joined the channel [17:32] guidocalvano: if you want really fast [17:32] MOTOWN_DETROIT: Then I have threads :p [17:33] patcito has joined the channel [17:33] MOTOWN_DETROIT: Say I'm in another thread created with pthread. Will v8 let me do a callback to the node.js app from there? [17:33] `3rdEden: nick.toLowerCase() [17:34] chance- has joined the channel [17:35] MOTOWN_DETROIT: `3rdEden: TypeError: Call of function undefined [17:36] `3rdEden: you probably need to spin up another thread to do it MOTOWN_DETROIT [17:36] Me1000 has joined the channel [17:37] DJBouche has joined the channel [17:38] Tprice: does anyone have an example of using the zlib with maybe a string/buffer [17:40] MooGoo has joined the channel [17:40] cronopio has joined the channel [17:40] pgherveou has joined the channel [17:41] Kopion has joined the channel [17:42] fangel has joined the channel [17:43] slifty has joined the channel [17:45] jmoyers has joined the channel [17:45] MOTOWN_DETROIT: `3rdEden: From C? [17:45] MOTOWN_DETROIT: Err, C++ [17:46] `3rdEden: Either that or use the V8 isolates [17:46] aah: any easy way to instrument expressjs (I see you here, TJ) to count current connections / handle a graceful restart, without having to instrument each endpoint? [17:46] DrMcKay has joined the channel [17:46] MOTOWN_DETROIT: ACTION would be really happy if Python scripts could be modules [17:46] tjholowaychuk: aah cluster [17:46] tjholowaychuk: aah:http://learnboost.github.com/cluster/ [17:47] `3rdEden: aah nodejs already counts them for you ;9 [17:47] aah: think I tried cluster and it played badly with daemon. looking. [17:47] `3rdEden: console.log(httpserver.connections) [17:47] Syndrom1: what are the benefits of node compared to phyton? [17:47] tjholowaychuk: aah possibly because of the pid changing [17:48] `3rdEden: Syndrom1 you dont have to write python ;o [17:48] tjholowaychuk: more solutions than daemon though. there are ways to restart the workers only as wekk [17:48] tjholowaychuk: as well* [17:48] tjholowaychuk: but that's kinda lame [17:48] aah: possibly also because I had no idea what I was doing when I last looked. hopefully better now, I'll try it [17:48] Syndrom1: apart from that. Cause i know a guy that write phyton for 5$ a hour. [17:48] Syndrom1: *writes [17:48] MOTOWN_DETROIT: Seriously, why not be able to write node.js modules in Python? [17:48] aah: is $5 an hour... good? [17:48] Syndrom1: i think so. [17:49] aah: I think you need to set your sights a little higher. [17:49] `3rdEden: I find that rather.. low [17:49] DrMcKay: ugh, what? [17:49] `3rdEden: so the code quality will also be rather low [17:49] DrMcKay: $5?! [17:49] skiz has joined the channel [17:49] Syndrom1: the quality is good, he just lives in latvia. [17:49] indutny: `3rdEden: yt? [17:49] MOTOWN_DETROIT: aah: Try $90-$150 [17:49] jakehow has joined the channel [17:49] DrMcKay: I wouldn't even boot up my computer for $5 [17:50] `3rdEden: indutny nope this is just bot talking on irc [17:50] `3rdEden: ;D [17:50] indutny: `3rdEden: :D [17:50] indutny: `3rdEden: do you know Nathan? [17:50] `3rdEden: no [17:50] `3rdEden: Do you? [17:50] MOTOWN_DETROIT: DrMcKay: The only thing I'll do for an hour for $5 is wank to Madonna records and Madonna videos. [17:50] DrMcKay: oh. [17:50] indutny: `3rdEden: I want to :D [17:50] DrMcKay: ok. [17:50] `3rdEden: Who is he ;)? [17:50] indutny: `3rdEden: but I don't know his nick on IRC [17:50] gregeh has joined the channel [17:50] indutny: `3rdEden: haha :) [17:51] indutny: `3rdEden: ( https://github.com/TooTallNate ) [17:51] MOTOWN_DETROIT: Bad code is never worthwhile. [17:51] `3rdEden: ooh that one [17:51] DrMcKay: he's TooTallNate on IRC, I beliece [17:51] MooGoo has joined the channel [17:51] DrMcKay: *believe [17:51] `3rdEden: its the same on irc [17:51] indutny: ok [17:51] `3rdEden: yeh [17:51] indutny: just to be sure [17:51] indutny: :D [17:51] indutny: thank you both [17:51] Syndrom1: okay, so back to benefits of node? [17:51] `3rdEden: Badass HTTP parser [17:52] `3rdEden: Strong community, good modules, easy development, async, non blocking *buzzwords* [17:52] Syndrom1: you are wrong. [17:52] Syndrom1: node.js is just more fun. [17:52] MOTOWN_DETROIT: Someone please write a node.js module that allows me to do: require_python('python.py'); [17:52] scott_gonzalez has joined the channel [17:52] Syndrom1: Thats important. [17:52] `3rdEden: omg someone on the ithernet is wrong [17:53] `3rdEden: Yes I'm totally wrong [17:53] Syndrom1: http://www.quora.com/What-are-the-benefits-of-developing-in-node-js-versus-Python [17:53] MOTOWN_DETROIT: require_python('hardcore_mp3_encoder.py') in node.js would be SICK SICK SICK I need 911 and a stretcher SICK [17:54] MOTOWN_DETROIT: Syndrom1: Why not both? [17:56] MOTOWN_DETROIT: Then I could stop having to screw around with gluing together Twisted and node.js-based web services. [17:56] navaru has joined the channel [17:56] navaru has left the channel [17:56] MOTOWN_DETROIT: Which would be SICK SICK SICK so sick I need hot strippers in an ambulance 24/7 SICK [17:58] zmbmartin has joined the channel [17:59] aeo has joined the channel [17:59] aeo: So I'm trying to use Apache .htaccess to redirect some of my port 80 traffic to Node on port 8000 [18:00] aeo: And Google Chrome gives me this cryptic "Unexpected response code: 502" [18:00] TheJH: aeo, some, but not all [18:00] TheJH: ? [18:00] aeo: Yes, some, but not all. [18:00] zmbmartin has left the channel [18:00] MOTOWN_DETROIT: Should I build a node.js module that will let me interface with Python form node.js? [18:00] aeo: The reason the error's cryptic is because no 502 shows up on the Network tab [18:00] MOTOWN_DETROIT: *from [18:00] aeo: And the error comes with no line number [18:00] MOTOWN_DETROIT: Like, call a function in a Python script [18:00] aeo: http://dev.pokemonshowdown.com/lobby?firewall [18:00] aeo: is the page that's giving me the error [18:00] MOTOWN_DETROIT: ACTION has written a node.js module in C++ [18:01] devuo has joined the channel [18:02] chrislorenz has joined the channel [18:02] versicolor has joined the channel [18:05] sdwrage has joined the channel [18:06] swair has joined the channel [18:07] SanbarComputing has joined the channel [18:07] SanbarComputing has joined the channel [18:09] dshaw_ has joined the channel [18:09] versicolor has joined the channel [18:09] chrislorenz has joined the channel [18:09] slifty has joined the channel [18:09] MooGoo has joined the channel [18:10] duckspeaker has joined the channel [18:10] duckspeaker has joined the channel [18:11] guidocalvano: MOTOWN_DETROIT: sure you have threads, but you will have one hell of a tough job joining the thread with node's event loop [18:13] tmedema: bnoguci happens to be here? [18:13] tmedema: bnoguchi* [18:14] JSManiacs has joined the channel [18:16] Sorella has joined the channel [18:17] DJBouche has joined the channel [18:17] Salve has joined the channel [18:18] Salve: what is the best resource to start learning node.js for building websites? [18:20] MooGoo has joined the channel [18:20] FIQ has joined the channel [18:22] wilmoore has joined the channel [18:24] hitana has joined the channel [18:27] hitana has joined the channel [18:27] groovebucket has joined the channel [18:28] MOTOWN_DETROIT: guidocalvano: What about calling a function in a Python script from node.js? [18:28] errordeveloper has joined the channel [18:29] guidocalvano: the core of the matter is this: node's event loop has to be interrupted when your thread completes [18:29] guidocalvano: somehow your thread and the event loop must merge again [18:30] guidocalvano: figure out how to do that, or don't use threads, but break stuff up into to chunks so you can use setInterval [18:30] MOTOWN_DETROIT: guidocalvano: Shared memory object and a semaphore some other IPC to tell the event loop to go get the bitbucket? [18:31] hitana has joined the channel [18:31] MOTOWN_DETROIT: Or do polling [18:31] guidocalvano: polling is an option I think [18:32] guidocalvano: if you have semaphore that you can ask if it is still locked or not [18:32] guidocalvano: but it sounds ugly [18:32] guidocalvano: you should have look at some comment I saw drifting by [18:32] guidocalvano: someone in this thread remarked about using fibers [18:32] MOTOWN_DETROIT: Yeah [18:32] MOTOWN_DETROIT: I clicked that [18:32] guidocalvano: fibers are like threads [18:33] MooGoo has joined the channel [18:33] DJBouche has joined the channel [18:33] guidocalvano: but rather than have the os decide on switching between threads, you can yield execution to another thread (or in this case fiber) yourself [18:34] MOTOWN_DETROIT: This is the project? https://github.com/laverdet/node-fibers [18:34] guidocalvano: in any case, it is quite likely that you will have to dive into the code of your library [18:34] hitana has joined the channel [18:34] MOTOWN_DETROIT: yeah [18:34] guidocalvano: but if you do that then you might as well use setInterval [18:35] MOTOWN_DETROIT: setInterval meaning processing in small chunks? [18:35] guidocalvano: yes [18:35] guidocalvano: that is probably by far the easiest solution [18:35] guidocalvano: imo [18:37] slifty has joined the channel [18:37] guidocalvano: linking js and c++ isn't super easy [18:37] hitana has joined the channel [18:38] guidocalvano: because of garbage collection and the way prototypes work [18:38] guidocalvano: whether you try to get python stuff or C++ stuff to work, it will take a lot of time [18:39] joeytwiddle has joined the channel [18:39] link has joined the channel [18:39] guidocalvano: and however your image lib may work, there is bound to be some top level for next loop whose body you can turn into a function [18:39] guidocalvano: or something similar [18:40] guidocalvano: I can imagine that looking into this lib feels a bit daunting [18:40] guidocalvano: but you don't have to understand the whole lib [18:40] guidocalvano: the only thing you have to make sure of is; do things happen in the same order after I'm done [18:41] hitana has joined the channel [18:41] guidocalvano: * done converting it to a function in setInterval [18:41] guidocalvano: setTimeout might also be usefull [18:42] sub_pop has joined the channel [18:44] guidocalvano: var i = 0 ; var process = setInterval( function() { if( i > 10 ) { clearInterval( process ) ; return ; } console.log( i ) ; i++ }, 0 ) ; [18:44] Syndrom1: https://github.com/joyent/node/issues 391 reasons against JS. [18:44] hitana has joined the channel [18:44] jedahan has joined the channel [18:44] guidocalvano: MOTOWN_DETROIT: check out the above line of code [18:44] guidocalvano: I'm not entirely sure if it is without syntax errors, but you can copy the general idea [18:45] arcanis has joined the channel [18:45] arcanis: hi [18:45] arcanis: is there a way to make a real include inside a node application ? [18:45] cjroebuck has joined the channel [18:46] TheJH: arcanis, a real include? [18:46] MOTOWN_DETROIT: guidocalvano: cool [18:46] arcanis: yep [18:46] Lingerance: No. You could abuse globals, but that's generally frowned upon. [18:46] arcanis: TheJH, I would like to write include('toto.js') [18:46] wilmoore has joined the channel [18:46] arcanis: and toto.js is interpreted inside the current scope [18:46] Lingerance: Actually you could with require('vm') [18:47] TheJH: arcanis, don't do this, it's slow and ugly and really, don't do it eval(require("fs").readFileSync("includedFile.js", "utf8")) [18:47] arcanis: hmm kay [18:47] guidocalvano: MOTOWN_DETROIT: and if you like and know a lot of funk, feel free to pm me some good musicians [18:47] TheJH: Lingerance, he wants it in the current scope [18:47] arcanis: I have an application, with a frontend and a backend [18:47] Lingerance: TheJH: vm can do that. [18:47] arcanis: which share some parts of codes [18:48] TheJH: Lingerance, current context, but not current scope [18:48] arcanis: currently, all is in a namespace [18:48] arcanis: var FOO = {}; FOO.lol = ...; [18:48] arcanis: I really would like to include my script file, as I do in my html application by writing the