[00:00] jmoyers has joined the channel [00:00] cognominal___ has joined the channel [00:01] joshgillies has joined the channel [00:01] wilmoore has joined the channel [00:01] swair_ has joined the channel [00:03] aaronblohowiak has joined the channel [00:04] aaronblohowiak: was there a nodeup today? [00:05] jrgarcia has joined the channel [00:05] jrgarcia has left the channel [00:05] BrightMukke has joined the channel [00:07] rolo has joined the channel [00:07] swair_ has joined the channel [00:07] rolo has left the channel [00:07] rolo has joined the channel [00:08] BrightMukke: im using socket.io to send and recieve client stuff, but for my database related action i wonna use an ajax post to a php page, and the php should send a data to the node server back via socket.io to get it to the client [00:08] rolo has left the channel [00:08] MUILTFN has joined the channel [00:09] BrightMukke: i know i can use curl on the php end, but how do i get node to send it with socket.io to a specific channel ? [00:10] BrightMukke: do i need to create a different http server that canhandle the php data to send it to socket.io or scan the socket.io hanle them without loaging the lcient side js ? [00:13] Brandon_R has joined the channel [00:13] Brandon_R: hi [00:13] Brandon_R: what's new and good [00:15] joshkehn has joined the channel [00:15] tomlion has joined the channel [00:17] diogogmt has joined the channel [00:20] another_syrio has joined the channel [00:20] cognominal___ has joined the channel [00:21] sdwrage has joined the channel [00:21] swair_ has joined the channel [00:25] [[zz]] has joined the channel [00:29] freshmilk_ has joined the channel [00:29] necrodearia has joined the channel [00:29] tomlion has joined the channel [00:29] Brandon_R: bi puhc [00:30] freshmilk_: why do we need node.js [00:30] cjm has joined the channel [00:30] freshmilk_: we have like 1000 ways to do what node.js does [00:30] groovebucket has joined the channel [00:31] jmoyers: sorry guy [00:31] jmoyers: you aren't quite sure what a web server is [00:31] jmoyers: from the other conversation going on in #javascript [00:31] Brandon_R: oh [00:31] jmoyers: this means that you just dont have the technical context [00:31] jmoyers: to understand whats interesting about the software [00:31] freshmilk_: bullshit [00:31] matyr has joined the channel [00:31] freshmilk_: i do understand what a web server is [00:31] freshmilk_: this is some weird meme [00:32] jmoyers: right, require('apache') [00:32] jmoyers: get going on that [00:32] devrim has joined the channel [00:32] freshmilk_: lol im not the one who said that [00:32] freshmilk_: explain it to me, why is node.js [00:32] freshmilk_: so great [00:32] jmoyers: freshmilk_ http://nodejs.org/ go check out ryans videos [00:32] freshmilk_: i did [00:32] jmoyers: he does a good job explaining whats different [00:32] freshmilk_: do u know ryan [00:32] guillermo has joined the channel [00:32] jmoyers: ?? [00:33] another_syrio: @freshmilk_ Please read this - http://www.manning.com/cantelon/NjsiA_meap_ch01.pdf ("Why the Web needs Node" from the upcoming Node in Action book) [00:33] aaronblohowiak: freshmilk_: I like node.js because it lets me share code between the server and the client, like templates and validations. it is also pretty fast and has a low memory footprint. [00:33] Brandon_R: Hey Guillermo [00:34] freshmilk_: another_syrio, thank you [00:34] freshmilk_: aaronblohowiak, right but why does node need to do this over php [00:34] diogogmt has joined the channel [00:34] freshmilk_: or anything [00:34] jmoyers: it doesn't 'need' to [00:35] Brandon_R: development in node is really quick [00:35] jmoyers: php has a bunch of properties that make it marginally offensive [00:35] aaronblohowiak: freshmilk_: I am not quite sure what you mean about doing it "over" php -- browsers don't run php. [00:35] Brandon_R: sesly took wordsquared 1 weekend to develop> [00:35] louissmit has joined the channel [00:36] russfrank: freshmilk_: v8 is faster than php [00:37] freshmilk_: aaronblohowiak, but they do in some respect, like i can't just use node modules by writing it in a .js and putting it on my apache server [00:37] Sorella: freshmilk_: have you tried to understand what Node.js is yet? Or you did that already and now have a well defined use case, and want to know if Node is the right tool for you to choose? [00:37] freshmilk_: how come apache doesn't have node.js support [00:37] russfrank: :| [00:37] freshmilk_: in the same manner it has php support [00:37] devrim has joined the channel [00:37] aaronblohowiak: freshmilk_: if you use node, you don't need to use apache. node can serve HTTP directly without needing a server like apache. [00:37] freshmilk_: right i know [00:38] Sorella: Remove `mod_php' from your configuration. Suddenly, Apache has no PHP support... [00:38] geoffgeoff has joined the channel [00:38] freshmilk_: but aaronblohowiak, how would you use node.js without having it be a webserver? [00:38] xsyn has joined the channel [00:38] freshmilk_: u would have to use php to intermediate right? [00:38] aaronblohowiak: freshmilk_: browsers in no way can run php, they only see the output of php. however, i can put my templates that *do* run on the server, and share them with the browser, so i can easily render templates based on JSON apis [00:38] freshmilk_: or something else [00:39] aaronblohowiak: freshmilk_: nope! no intermediate required. [00:39] russfrank: freshmilk_: do you know the difference between synchronous io and asynchronous io [00:39] freshmilk_: yeah [00:39] aaronblohowiak: freshmilk_: node can listen for web requests and answer without needing an apache or nginx or anything else. [00:39] russfrank: do you know the difference between an event based webserver like nginx or lighttpd and apache [00:39] smplstk_ has joined the channel [00:39] freshmilk_: aaronblowiak, i know this but im saying what if u wanted to use apache [00:39] freshmilk_: russfrank, no [00:40] russfrank: freshmilk_: ok, this is important for you to understand why nodejs is cool [00:40] aaronblohowiak: freshmilk_: then you can use ReverseProxyPass in apache to pass certain requests to your node backend [00:41] russfrank: freshmilk_: ry does an awesome job of explaining this in his presentations [00:41] dgathright has joined the channel [00:41] aaronblohowiak: freshmilk_: I also like using node because i only have to keep one language in my head at a time -- javascript on the front end and javascript on the back end. [00:41] russfrank: where's the pink shirt one? that one's great [00:41] swair__ has joined the channel [00:41] russfrank: freshmilk_: http://www.yuiblog.com/blog/2010/05/20/video-dahl/ [00:42] freshmilk_: can u just explain it to me [00:42] freshmilk_: my gf is sick [00:42] freshmilk_: and next to me [00:42] freshmilk_: and i cant play the vid [00:42] freshmilk_: but im dying to know! [00:42] russfrank: you don't have headphones? [00:42] freshmilk_: i understand how it could be good for webserver instance, scalable and its all using the same language [00:42] freshmilk_: really clean [00:43] freshmilk_: but otherwise i dont get why it would be used [00:43] russfrank: what do you mean by good for webserver instance [00:43] aaronblohowiak: freshmilk_: if you dont get why it would be used, then don't use it! [00:43] freshmilk_: i mean i can see how in the case it was used as a webserver it would scale well [00:43] russfrank: well, sortof. [00:43] russfrank: i mean, it can handle a lot of connections at once, being event based [00:44] Sorella: Are there any unbiased Node.js articles describing the platform, really? [00:44] russfrank: Sorella: just watch ry's presentations [00:44] freshmilk_: right so beisdes being able to handle load and process that load, wtf [00:44] russfrank: dude knows what he's talking about [00:44] russfrank: freshmilk_: 'besides' that.. ;] [00:44] aaronblohowiak: russfrank++ [00:45] freshmilk_: dont get it [00:45] aaronblohowiak: freshmilk_: oh well, life is short. use what you like. [00:45] freshmilk_: dude [00:45] freshmilk_: u cant explain it [00:45] russfrank: that's practically the hardest part about the internet [00:45] freshmilk_: lol [00:45] russfrank: being able to scale things [00:45] freshmilk_: ok [00:45] russfrank: it's extremely important [00:45] freshmilk_: so its primarily good for being a webservr [00:45] freshmilk_: faster [00:45] russfrank: well.. yeah [00:45] Sorella: russfrank: you mean the "Introduction To Node.js" on the nodejs.org site, or are there other ones? [00:46] russfrank: Sorella: the one where he's wearing a pink shirt [00:46] russfrank: http://www.yuiblog.com/blog/2010/05/20/video-dahl/ [00:46] russfrank: this one is good [00:46] swair__ has joined the channel [00:46] zackattack has joined the channel [00:46] freshmilk_: so itrussfrank, anything else beneficial to it? [00:46] russfrank: freshmilk_: this is gonna take a lot of typing [00:46] russfrank: so, be patient [00:46] freshmilk_: ok [00:46] russfrank: event based webservers are really good at handling large load, right [00:46] russfrank: like lighty, nginx [00:47] russfrank: youtube uses lighty for serving videos because its so good at serving static content [00:47] Sorella: ACTION bookmarks. [00:47] russfrank: but for dynamic content, we have to interface with an interpreter [00:47] nerdy has joined the channel [00:47] freshmilk_: what is apache if not event based [00:47] russfrank: it forks [00:47] russfrank: by default it uses the prefork mpm [00:47] russfrank: so it creates a bunc hfo processes [00:48] russfrank: these are scheduled by the linux kernel [00:48] russfrank: whic hswitches between them and each one hadnles a request [00:48] russfrank: event based servers don't do that, they never fork [00:48] freshmilk_: i see! [00:48] freshmilk_: so at one point does apache actually break down [00:49] russfrank: sure! if you don't have it configured correctly and you do an ab -n 1000 -c 100 on it, it'll fork like crazy and the machine will slow to a halt [00:49] temp01 has joined the channel [00:49] russfrank: it'll start swapping, etc [00:49] russfrank: that's not to say that you can't ab nodejs into oblivion [00:50] russfrank: but at that point at least your server will still respond to ssh.. anyway, i'm getting off topic. [00:50] freshmilk_: sorry whts ab -n 1000 - c 100... [00:50] freshmilk_: wht is* [00:50] russfrank: apache benchmark, just hits it with 1000 requests 100 at a time [00:50] freshmilk_: i see [00:50] AvianFlu: if you make too many connections to an apache server, the SYSTEM will crap out from too many threads/processes [00:50] russfrank: right [00:50] AvianFlu: node, you'd just lose that node process [00:50] russfrank: if it even crashes [00:50] AvianFlu: I assume everything will crash [00:50] russfrank: it might just slow down [00:50] AvianFlu: but that's just me [00:50] russfrank: hahah [00:51] freshmilk_: but ppl are surviving right now with large loads [00:51] russfrank: good assumption [00:51] russfrank: yeah [00:51] freshmilk_: so why isnode needed.... [00:51] russfrank: with tons of servers [00:51] russfrank: and expensive level 3 load balancers :] [00:51] freshmilk_: so node actually can reduce thenumber of physical servers needed? [00:51] AvianFlu: yes. [00:51] freshmilk_: wow [00:51] AvianFlu: under the proper circumstances [00:51] freshmilk_: and by a lot?? [00:51] AvianFlu: there are ways to misuse node [00:51] russfrank: haha [00:52] russfrank: as there are with anything of this nature [00:52] russfrank: but yes, by a lot in some cases [00:52] russfrank: for certain uses of webservers, node will excel over something like apache, by a lot [00:52] freshmilk_: what do servers use now for webservers, big things, they use the event driven stuff u talked about like lighty? [00:52] russfrank: apache with php is most common for dynamic content [00:52] russfrank: lighty is popular for static content [00:53] russfrank: unfortunately lighty has t oconnect to php thru cgi or fcgi if it needs to do php [00:53] freshmilk_: dynamic content vs static content.... [00:53] russfrank: which is not al lthat fast [00:53] boehm has joined the channel [00:53] freshmilk_: i mean i know what that is but dynamic just means anything not [00:53] Sorella: Ruby, Python and other high-level languages with good HTTP/webapp frameworks are also reasonably used. [00:53] freshmilk_: pulled from a datbase eaier tpy ething [00:53] russfrank: oh yeah absolutely [00:54] Sorella: Erlang is used in highly concurrent systems, like Facebook's chat (iirc). [00:54] russfrank: well, quite simply, static content is stuff that doesn't change [00:54] russfrank: like html files [00:54] sdwrage has joined the channel [00:54] freshmilk_: right [00:54] russfrank: video files, etc [00:54] russfrank: anything that would require a scripting language is dynamic [00:54] freshmilk_: uploading a id to youtube compressing it isnt dynamic? [00:54] freshmilk_: a vid* [00:54] russfrank: freshmilk_: it depends how they do it [00:55] russfrank: but its probably dynamic, yeah [00:55] freshmilk_: but for their simple serving of stuff [00:55] Sorella: it might not be handled by the webserver though (which I'd hope to be the case). [00:55] freshmilk_: its static [00:55] freshmilk_: can u run diferent web servers together for different things [00:55] russfrank: yes, so they use something like lighty [00:55] russfrank: absolutlery [00:55] freshmilk_: shit [00:55] russfrank: its common to run lighty for static content and have apache proxy certain requests to lighty [00:56] russfrank: many people run node behind nginx or lighty for security [00:56] russfrank: but the important point here is that everything in node is async; you're 'forced' to do things asyncronously [00:56] russfrank: in something like php, you can do a syncronous database call [00:57] russfrank: so php has to be paralelized using threads or processes [00:57] Sorella: s/everything/most of the standard library/ [00:57] russfrank: in node, we can say, 'hey database, gimme that data!' and then just do other important things while we're waiting [00:57] captain_morgan has joined the channel [00:57] russfrank: Sorella: right, well, we try to jail users in async the best we can ;] [00:57] russfrank: node doesn't waste time waiting for other people to get shit done [00:57] Sorella: as we should :3 [00:58] russfrank: haha, yeah [00:58] AvianFlu: russfrank: in an evented system, not using async isn't really how you want to roll [00:58] russfrank: yes [00:58] Sorella: but just to clear confusion, or people might think stuff get magically turned into asynchronous calls... [00:58] freshmilk_: russfrank: i thought node was asynchronous io though [00:58] freshmilk_: that means it does wait [00:58] russfrank: freshmilk_: right, but not in the js thread [00:58] Sorella: ....huh? [00:58] russfrank: freshmilk_: the io goes out to a thread pool [00:58] russfrank: while the js does mportant work [00:59] Sorella: freshmilk_: asynchronous means it doesn't wait. [00:59] jmoyers: well [00:59] jmoyers: it technically does wait ;p [00:59] russfrank: freshmilk_: the waiting is still happening.. most posix calls doesn't have an async alternative [00:59] jmoyers: but not in your execution context [00:59] russfrank: exactly [00:59] russfrank: some thread somewhere is waiting [00:59] russfrank: the javascript interpreter, hwoever, is not [00:59] Sorella: jmoyers: true that. [00:59] russfrank: that's why node is important though [00:59] freshmilk_: and php is synchronous? [01:00] smplstk_ has joined the channel [01:00] AvianFlu: yes. [01:00] russfrank: freshmilk_: yes, most io calls in php are syncronous [01:00] russfrank: i'm not aware of any async io calls in php [01:00] freshmilk_: so whys it a big deal to wait for a function or process to finish [01:00] r04r: There are none [01:00] russfrank: freshmilk_: so, we have to paralellize php using threads or processes [01:00] russfrank: freshmilk_: because of this ^ [01:00] AvianFlu: and a given system can only handle 500-1000 threads [01:00] AvianFlu: or ~1000 processes last I checked [01:00] freshmilk_: russfrank: im not sure why we have to paralellize [01:00] swair__ has joined the channel [01:01] freshmilk_: or what u mean by paralleglize [01:01] russfrank: freshmilk_: to handle multiple connections at once [01:01] jmoyers: freshmilk_ actually its NOT always important [01:01] jmoyers: but it can be [01:01] icewhite has joined the channel [01:01] russfrank: yeah [01:01] freshmilk_: what do u mena by parralize? [01:01] r04r: freshmilk_: Multiple people viewing your site at once = multiple threads on web server with traditional servers. [01:01] freshmilk_: right [01:01] russfrank: multiple things = paralellization [01:01] russfrank: to serve many people we have to do many things at once [01:01] freshmilk_: node has to thread though or having multiple threads if there is more than one person at a different stage in the script [01:01] russfrank: (or, actually, just give the illusion of this.) [01:02] r04r: freshmilk_: Node.js has one main execution loop that all clients connect to, which is gone back to every time an IO function finishes [01:02] parshap has joined the channel [01:02] JakeyChan has joined the channel [01:02] Sorella: freshmilk_: node doesn't need to spawn threads because it takes a different approach to concurrency. [01:02] russfrank: which is an event loop and asyncronous io. [01:02] russfrank: you really should watch ry's presentation [01:02] russfrank: he's wearing a pink shirt and everything, just for you [01:03] russfrank: so he can tell you about types of io [01:03] r04r: russfrank: What was that lulsy comparison again [01:03] russfrank: and then i'd have to type less [01:03] r04r: Bunnies and something? Right? >.> [01:03] Sorella: russfrank: you seem quite keen on his pink shirt, it's actually slightly disturbing... [01:03] freshmilk_: russdrank but this is making me leern i am learning [01:03] russfrank: hahah [01:03] swair has joined the channel [01:03] russfrank: freshmilk_: i know, but, I think so much faster than i type that it's frustrating [01:03] russfrank: i have to forego fixing all of these typos and everything [01:03] freshmilk_: i know [01:03] jmoyers: yes [01:03] jmoyers: its called being spoon fed [01:03] jmoyers: :-( [01:03] russfrank: :| [01:04] freshmilk_: :) [01:04] russfrank: it is unfortunately, and ry says all of this so nicely [01:04] freshmilk_: hold on [01:04] jmoyers: honestly thats one of the funny things about the internet [01:04] freshmilk_: last questoins then and we can rap this up [01:04] jmoyers: a lot of this would be faster in conversation [01:04] freshmilk_: wrap [01:04] russfrank: jmoyers: so much faster [01:04] russfrank: i've explained these things to peopl emany times [01:04] Sorella: russfrank: not really faster with me. I'm terrible at IRL conversations. [01:04] jmoyers: yeah [01:04] freshmilk_: how does node handle multiple connections at different stages of the script if its not creating new threads for each person connected? [01:05] russfrank: i really don't mind explaining it to people but typing it .. sucks [01:05] jmoyers: it DOES have threads [01:05] russfrank: freshmilk_: by using callbacks for all io [01:05] jmoyers: but its not exposed [01:05] jmoyers: libeio uses a worker pool, if im not mistaken [01:05] russfrank: the threads do the io and say 'hey v8! I ahve that data you were looking for from mr database!' [01:05] russfrank: yeah, there's a thread pool going on that does any sync io calls [01:05] r04r: freshmilk_: http://www.slideshare.net/simon/evented-io-based-web-servers-explained-using-bunnies [01:05] freshmilk_: callbacks for all IO, what [01:06] jmoyers: it also uses kqueue, IOCP or whatever 'asynchronous' api that the OS supports for the equivalent of file descriptor state changes [01:06] russfrank: like I said, the javascript interpreter is never doing more than one thing at once [01:06] AvianFlu: libeio uses process-scoped threads, yes [01:06] freshmilk_: please tell me what callbacks for all IO are [01:06] r04r: freshmilk_: Do you know what an anonymous function is, and callbacks are? [01:06] jmoyers: 'asynchronous' in quotes because actually, some of those systems are polling ;-) [01:06] freshmilk_: i know what callbacks are [01:06] russfrank: freshmilk_: well, you don't have a call like var data = getdata(); print (data); or something like that [01:06] russfrank: you ahve to give getdata() a callback [01:06] Sorella: freshmilk_: there are several approaches. The usual is that you don't need to worry much when using the standard i/o calls, because they're asynchronous. Your script can respond in a timely fashion, so no need for a new thread. For some cases, you might want to spawn a new process for doing more hard work. [01:06] russfrank: basically, you say, get me that data! And when you've got it, call this function. [01:06] russfrank: that's asynchronou sio [01:07] freshmilk_: just like jquery stuff [01:07] r04r: freshmilk_: You pass a callback function to an IO function (e.g. `fs.readFile("foo.txt", function(err, data) { console.log(data); })`) which is then returned to after the IO function finishes [01:07] russfrank: right, absolutely [01:07] russfrank: in browser js everything is async in the same way [01:07] swair_ has joined the channel [01:07] Sorella: russfrank: I miss co-routines in V8. They'd make some stuff quite more sweet. [01:08] russfrank: web workers? [01:08] jmoyers: thats all a matter of opinion [01:09] Sorella: yield. [01:09] russfrank: r04r: i actually haven't seen this.. this is great haha [01:09] freshmilk_: so in node, the aynchronous callbacks allow for no threads to be created, but rather functions, and it allows the program to continue running(pending the results of the function) but in PHP, if you call a function it has to parallelize and that is a thread and if 1000 users are calling that function then u have 1000 threads and the systme crashes. but how is the PHP function call different from the node function call [01:09] r04r: russfrank: The bunnies? [01:09] jmoyers: erm [01:10] russfrank: r04r: yeah [01:10] russfrank: you're close freshy [01:10] jmoyers: yes, but you can't assume random things just 'go asynchronous' [01:10] r04r: russfrank: Ah! :D I thought you were somehow mocking my reply to freshmilk_ :P [01:10] AD7six has joined the channel [01:10] russfrank: haha no [01:11] Sorella: actually, that run-on sentence is a bit confusing. [01:11] russfrank: yes it is [01:11] freshmilk_: sorry [01:11] Sorella: At sometimes I wonder if he's trolling or just having a hard time at understanding this all. [01:11] russfrank: freshmilk_: the php function call is synchronous (probably) and the node function call is asynchronous (hopefuly) [01:11] bwinton has joined the channel [01:11] russfrank: Sorella: yeah... :| [01:12] freshmilk_: but russfrank: the php function call has callbacks too so how is it really any different [01:12] skm has joined the channel [01:12] russfrank: freshmilk_: does it? what php fucntion call is that? [01:12] russfrank: i mean, there might be, it's been a few years since i've done any heavy php work [01:12] freshmilk_: well say it doesn't, say it just has a return value [01:12] russfrank: but from what i remember stuff like mysql_query is async [01:12] russfrank: sync* [01:12] russfrank: sync. is sync [01:12] r04r: freshmilk_: There are a few callbacks in a few walker functions, but those are just called by the function as it executes synchronically [01:13] anon2048 has joined the channel [01:13] anon2048: http://pastebin.com/Usau8MqN [01:13] r04r: russfrank: nice typo :P [01:13] matyr has joined the channel [01:13] ckknight: freshmilk_: the libraries that node.js is built around handle their code asynchronously through either background threads (never exposed) or the event pump. PHP doesn't have this legacy. [01:13] freshmilk_: so basically php is built [01:13] freshmilk_: to have more threads [01:13] r04r: freshmilk_: It's build to run from top to bottom [01:13] freshmilk_: its built to do its work sychronciously [01:14] freshmilk_: for whatever reason [01:14] AvianFlu: yep [01:14] russfrank: freshmilk_: it's built to-- exactly [01:14] AvianFlu: one thing at a time [01:14] russfrank: freshmilk_: the reason is because it's a little simpler to look at [01:14] r04r: and sometimes a bit less mind boggling with scopes [01:14] AvianFlu: php wasn't really built, either, it just sort of happened and then just sort of got popular [01:14] r04r: lol [01:14] russfrank: hahah [01:15] freshmilk_: does this mean that node doesnt wait until functions execute and return a value to continue the script? [01:15] AvianFlu: exactly [01:15] r04r: Correct [01:15] russfrank: yess [01:15] freshmilk_: thats fucked up [01:15] russfrank: hahahah [01:15] r04r: lol [01:15] freshmilk_: thats like the basis of my programming [01:15] AvianFlu: only until you're used to it :) [01:15] r04r: no thats where callbacks come in [01:15] russfrank: yeah man [01:15] russfrank: that's what makes it so different [01:15] AvianFlu: javascript is functional programming [01:15] russfrank: welcome to the cool kid's table [01:15] russfrank: functions are first class in javascript.. we can pass them around like any other variable [01:15] freshmilk_: how could u build anything to do anything [01:15] AvianFlu: functions are small, light, cool, and do strange magical things sometimes [01:16] freshmilk_: it would be chaos [01:16] russfrank: hahah [01:16] Sorella: Frankly, JavaScript could do with better functionality for continuations. [01:16] AvianFlu: because you can have functions inside of functions [01:16] russfrank: ACTION rofl [01:16] AvianFlu: and functions as arguments to functions [01:16] Sorella: But I'm not sure they're even considering it for ES.next =/ [01:16] dreamdust has joined the channel [01:16] russfrank: freshmilk_: it is mind boggling at first, yes, but you can do useful things [01:16] freshmilk_: so are a lot of node scripts functions inside functions inside functions? [01:16] AvianFlu: x = x + 5 will still finish before the line after it, I'm pretty sure [01:16] russfrank: yes [01:17] AvianFlu: there are clean ways to write them and ugly ways, but yes [01:17] freshmilk_: and somehow all this is better than php, for example, precisely cause it does do this [01:17] freshmilk_: in terms of load [01:17] Aria has joined the channel [01:17] russfrank: freshmilk_: well, because asynch io is better than synch io [01:17] freshmilk_: on the computer and the web server [01:17] russfrank: usually [01:17] AvianFlu: yep [01:17] freshmilk_: thats cool [01:17] freshmilk_: i feel a rush [01:17] russfrank: haha [01:17] AvianFlu: you get to defer things instead of stopping and waiting for everything [01:17] freshmilk_: its dangerous [01:18] AvianFlu: enough rope to hang yourself for sure [01:18] freshmilk_: i guess i still dont get why this can handle more users [01:18] freshmilk_: only cause of these asynchronous ability? [01:18] r04r: freshmilk_: Look at some code other people made to get a feel of how how it looks like [01:18] freshmilk_: this* [01:18] russfrank: freshmilk_: well, we don't need threads or new processes to handle more users [01:18] r04r: freshmilk_: http://www.slideshare.net/simon/evented-io-based-web-servers-explained-using-bunnies [01:18] AvianFlu: instead of a whole thread, a new connection is only a little bit of memory [01:19] r04r: freshmilk_: Did you see that? ^ I think it actually explains it pretty well [01:19] freshmilk_: r04r, no i cant [01:19] AvianFlu: 40 bytes for the HTTP message + application state [01:19] russfrank: freshmilk_: its just slides [01:19] freshmilk_: ithis is how i learn. [01:19] russfrank: :| [01:19] russfrank: ACTION :| [01:19] r04r: freshmilk_: It's 5 slides. Look at them :| [01:19] freshmilk_: fine [01:20] r04r: Wait I lied, it's 10. Sorry. [01:20] Vennril has joined the channel [01:21] r04r: freshmilk_: Also, you should know that each thread has a minimum memory consumption of... not sure how much actually [01:21] Sorella: 1e2 [01:21] russfrank: hey, while he's reading, is there anyone in here who's gotten v8 or node to run on android [01:21] russfrank: i compiled v8 against the ndk then i got sigill in the simulator, and now i'm wondering if v8 in dalvik even makes sense [01:21] Sorella: that would be relevant to my interests. [01:21] r04r: russfrank: Yeah, I think a few people got it working [01:21] russfrank: yes [01:21] russfrank: yeah so i heard [01:22] freshmilk_: what is the v8 PART OF TH IS [01:22] freshmilk_: v8 part of th is [01:22] r04r: iirc they were using a fedora in chroot to compile [01:22] russfrank: v8 is the javascript interpreter freshmilk_ [01:22] freshmilk_: ok [01:22] russfrank: i got it to compile the problem is that it sigills hwne i try to make a v8 context [01:22] russfrank: i'm thinking, doesn't v8 do crazy code generation that directly targets arm? wouldn't that not run in the dalvik vm [01:22] _bat has joined the channel [01:23] freshmilk_: i guess i dont understand what threading truely means [01:23] russfrank: freshmilk_: well, you know what separate processes are, right? [01:23] freshmilk_: right [01:23] russfrank: the scheduler in the os kernel switches between processes very quickly [01:23] russfrank: each has its own area of memory to mess with [01:23] russfrank: well, a thread is like a process, except it shares that area of memory with other threads [01:24] r04r: russfrank: TheJH got it working on android [01:24] swair__ has joined the channel [01:24] russfrank: r04r: hwo can I reach this person [01:24] atobe has joined the channel [01:24] freshmilk_: thread is an extension of a process [01:24] russfrank: why hasn't anyone written a nodejs scripting engine for android apps that can call java classes thru jni yet [01:24] russfrank: i don't get it seems like such an obvious choice [01:24] r04r: russfrank: They're on this channel, just not right now. Also DrMcKay I think [01:24] russfrank: if only i was smart enough to get it working :( [01:25] Sorella: russfrank: nodejure? [01:25] Sorella: or just an extension? [01:25] russfrank: what is nodejure [01:25] r04r: russfrank: Didn't read, but: http://www.readwriteweb.com/hack/2011/03/running-nodejs-on-a-rooted-android-phone.php saw this being mentioned as well when it was disussed another time [01:25] Sorella: A play on Clojure. [01:25] russfrank: aw rooted though [01:25] Sorella: not really referring to any existing technology. [01:26] r04r: russfrank: I'm pretty sure you'll need to root [01:26] russfrank: i wanna run it in dalvik so it can be used to write android apps [01:26] r04r: Ohh. Well, that's be cool [01:26] blueadept has joined the channel [01:26] blueadept has joined the channel [01:26] russfrank: yeahhh [01:26] r04r: That hasn't been done afaik, good luck ;) [01:26] russfrank: there was some email on the nodejs mailing list where some guy said he got it to build agaisnt the ndk [01:26] russfrank: so i was thinking of mailing him and asking if he got any further [01:26] freshmilk_: whats the node.js mailing list [01:27] russfrank: google group thing [01:27] freshmilk_: why dont u want me on it [01:27] stagas has joined the channel [01:27] russfrank: who the hell said that [01:28] russfrank: http://groups.google.com/group/nodejs there it is go crazy [01:28] freshmilk_: is scala a good language [01:28] cbobo has joined the channel [01:28] Aria: Yes. [01:29] tiglionabbit: How do you run multiple node.js apps that use websockets on the same port? [01:30] Sorella: freshmilk_: what do you mean by "good language"? I'd argue the answer to that would depend on exactly what problem you're trying to solve, and which platform will run that. [01:30] freshmilk_: does cale provide any tangible benefits [01:30] freshmilk_: scala [01:30] Aria: tiglionabbit: you write a multiplexer [01:30] freshmilk_: php is a dog [01:30] russfrank: freshmilk_: for what problem [01:30] ninjapig has joined the channel [01:30] russfrank: freshmilk_: some languages are better for certain things [01:30] Aria: freshmilk_: you might want to ask scala users. But it's novel but complete language, so the answer is 'yes' [01:30] freshmilk_: im embarassed to be working with php [01:31] tiglionabbit: Aria: um, how? Is there an existing solution for this? I've heard nginx can't proxy websockets, but that haproxy might work. Looking for thoughts on this [01:31] freshmilk_: that shit is over [01:31] russfrank: hahah. [01:31] jedahan has joined the channel [01:31] russfrank: php is still pretty ingrained in the industry. [01:31] ninjapig: so i got introduced to node.js last night [01:31] ninjapig: hot stuff [01:31] russfrank: yeah man [01:31] Sorella: freshmilk_: PHP is sadly not over yet. [01:31] russfrank: as i like to say, welcome to the cool kid's table ninjapig [01:32] Aria: tiglionabbit: Not that I know of, but anything that can switch on a Host header, but otherwise leave the socket alone (or understand websockets and proxy properly) can do it. [01:32] Aria: tiglionabbit: It's the kind of thing I'd write in node ;-) [01:32] ninjapig: we're doing our senior project using node.js [01:32] freshmilk_: i guess i dont understand how node handles connections from different users, i understand when its running a function and it doesnt wait and doesnt thread but as far as pure outside connections go, i dont get how it differs from say apache [01:32] Sorella: freshmilk_: but really, you first need to define well which problem you want to solve, then you can start looking for the means of solving it. [01:32] tiglionabbit: Aria: you mean like a node app that sits in front of my other node apps? [01:32] ninjapig: so i have to learn javascript now, stopping my php experimentation in the middle [01:33] Aria: tiglionabbit: Sure! [01:33] Aria: Hehe. What a time to do it, ninjapig. Welcome! [01:33] russfrank: freshmilk_: it's event based and doesn't fork for each connection [01:33] russfrank: or create a new thread [01:33] russfrank: that's what makes it different from apache [01:33] Sorella: ninjapig: eloquent is a good resource for learning JavaScript. Or so Brendan says. [01:33] freshmilk_: i see [01:33] tiglionabbit: heh. The real problem I'm trying to solve is, I made a neat little node app and I want to deploy it now... but I'm not sure how it can co-exist on port 80 on one of my existing servers... [01:34] tiglionabbit: what's an easy way to deal with this? [01:34] russfrank: tiglionabbit: put a proxy in front of everything [01:34] tiglionabbit: russfrank: yeah yeah, what proxy though? [01:34] russfrank: just have lightty switch on hostname.. or you could even write it in node [01:34] Aria: tiglionabbit: Not with websockets, not out of the box, you'll have to have a websocket-aware proxy. Or use another port for websockets. Or get another IP. [01:34] ninjapig: Sorella: i'm using it right as we speak [01:34] russfrank: i'd do lighty personally cause i have lots of experience with it [01:34] freshmilk_: russfrank: are there any other webservers for dynamic content that are event based asynchronous [01:34] Aria: russfrank: lighty doesn't do websockets. [01:34] tiglionabbit: Aria: considering getting another IP [01:34] russfrank: ah gp [01:34] ninjapig: it's really nice, the whole interactive console [01:34] AvianFlu: http://github.com/nodejitsu/node-http-proxy [01:34] AvianFlu: websockets out of the box [01:34] russfrank: freshmilk_: well, not really, no [01:34] Aria: tiglionabbit: that's the "right" way, in the old internet architecture anyway. [01:34] freshmilk_: amazing [01:34] Sorella: ninjapig: good luck on your journey through the language. There are some weird semantics, but overall it's a pretty decent language :3 [01:35] russfrank: not that i know of anyway [01:35] Aria: freshmilk_: nginx, lighttpd, cherokee, node.js, uhttpd, thttpd.... [01:35] russfrank: Aria: they have an interface into a single threaded, single process scripting engine that only supports asynch io? [01:35] r04r: tiglionabbit: Put everything in a frameset and run it on another port *trollface* [01:35] freshmilk_: Aria: so why dont people use them over node [01:36] tiglionabbit: AvianFlu: oooo [01:36] Sorella: freshmilk_: they wouldn't exist if people didn't use them. There's no such thing as "one tool to rule them all". [01:37] joshkehn has joined the channel [01:37] r04r: freshmilk_: Probably because they're pretty optimized and written in C thus executes a bit faster than inteprented javascript... Just my guess. [01:37] Aria: freshmilk_: 'cause node has mindshare, and that whole same-language-at-both-ends thing. [01:37] russfrank: also, the scripting language is asynch. [01:37] Sorella: Just because two things solve the same problem, it doesn't mean they can't coexist. They might solve the problem in a different way, which might be more suited for a group of persons solving a particular problem than another group. [01:37] russfrank: guys, he said for dynamic content [01:37] Aria: lighttpd has lua, though. But most languages have existing synchronous libraries [01:37] freshmilk_: mindshare... [01:37] tiglionabbit: AvianFlu: do you think I could have this node server also sit in front of apache for other apps? [01:37] Aria: Javascript is unique in that it didn't, really, have an API that people already used. [01:38] russfrank: lightty can use fcgi but that requires spawning x processes of php that it interfaces with [01:38] russfrank: the important part about node is that it can directly interface with v8, and there's a single interpreter [01:38] Aria: russfrank: you can do dynamic content with all of those! Sometimes the right way to integrate with it is in a separate process. [01:38] AvianFlu: probably, just don't put apache directly in front of node or you lose the performance gains you might get [01:38] russfrank: Aria: yes, but not dynamic content via a single process single thread interpreter [01:39] russfrank: i believe the question was 'what other things are there that are exactly like node' [01:39] skm has joined the channel [01:39] diogogmt has joined the channel [01:39] russfrank: in that they have a scripting language that only supports asynch io and are event based [01:39] Aria: UH ... they're all different in SOME way. [01:39] freshmilk_: those things dont have scripting langauges [01:39] russfrank: right, but they don't have a scripting language that only uses asynch io [01:39] Aria: But there's Java libraries that do it, Ruby, python... [01:39] russfrank: they have scripting languages taht only do synch io [01:40] russfrank: yes, that is true [01:40] freshmilk_: thre's an "ngxinx language" [01:40] russfrank: twisted, etc [01:40] freshmilk_: ??? [01:40] russfrank: no [01:40] Aria: freshmilk_: No, but people have patched it to integrate the language of their choice into the eventloop. [01:40] freshmilk_: what do u program ngxinx with u? [01:40] russfrank: nginx has to use some scripting lagnuage which is probably not going t obe event based [01:40] Aria: freshmilk_: C! [01:40] russfrank: hahah [01:40] freshmilk_: that sucks [01:40] freshmilk_: same with like uhttpd? [01:40] joshkehn has left the channel [01:41] russfrank: yes [01:41] Aria: Or you integrate as an external process. Which is NOT a bad thing. [01:41] russfrank: Aria: integrate what as an external process [01:41] russfrank: scripting engine? [01:41] Aria: Sure. [01:41] russfrank: the context switching and ipc kinda expensive [01:41] freshmilk_: can anyone actually give an example of node.js resulting in the removal of servers? [01:41] russfrank: in comparison to apache [01:41] russfrank: where you just have an interpreter in each process [01:41] Aria: Got measurements? [01:41] russfrank: which is why for php, apache will often outperform lightty [01:41] russfrank: i do not [01:42] freshmilk_: what programming blogs do u guys read to stay ahead of everything [01:42] Aria: I didn't think so ;-) [01:42] russfrank: ;P [01:42] russfrank: it's a theoretical point [01:42] russfrank: we know context switching and ipc add some overhead [01:42] Aria: freshmilk_: howtonode, stack overflow, hacker news, lots of people who work with node. [01:42] russfrank: in comparison to apache which doesn't need to do either of these things [01:42] Aria: russfrank: So do large thread stacks, so do ... context switches! [01:42] Aria: Apache is FULL of those. [01:42] smtlaissezfaire has joined the channel [01:43] Aria: What do you think switching threads or processes is? [01:43] russfrank: well of course, but apache doesn't have to context switch / do ipc to talk to the interpreter [01:43] russfrank: it's in the process ;P [01:43] russfrank: how do you think php is part of apache? [01:43] Aria: Hehe. You haven't met the internals of PHP, have you? [01:43] freshmilk_: can node.js really result in the scalling down of servers and save ppl money [01:43] russfrank: its loaded into each process when it forks [01:43] russfrank: in easier scaling? yes [01:44] freshmilk_: as in removal of servrs, dont need as much [01:44] Aria: freshmilk_: I run some very small tight node processes. Also, a few big ones that eat RAM. [01:44] freshmilk_: why arent the cpu reductions advertized more [01:44] tbranyen: do you beleive in magic? [01:44] russfrank: sure, when used properly, yeah [01:44] Aria: freshmilk_: Because servers are rarely cpu-bound? [01:44] k1ttty has joined the channel [01:44] freshmilk_: aria: exactly so can this for large corporations, really mean they can save money by reducing server load and.or taking out servers alltogether? [01:44] erickt has joined the channel [01:44] r04r: freshmilk_: Ram is the expensive factor [01:45] freshmilk_: i see [01:45] russfrank: can it? sure [01:45] Aria: freshmilk_: Because that's not usually the problem they're solving. [01:45] freshmilk_: Aria, what do u mean? [01:45] freshmilk_: Node.js's business implications [01:46] freshmilk_: are that they have to buy less ram? buy less servers as a whole? less electricity usage? less load/electricity usage? overheating? cooling? [01:46] russfrank: Aria: i'll admit i'm not familiar with php internals -- what php internals are relevant here [01:47] Aria: russfrank: The fact that their interpreter is among the most horrible pieces of software ever written. [01:47] russfrank: hahah. [01:47] jesusabdullah: Whose interpreter? [01:47] Aria: russfrank: 'efficient' isn't exactly in their vocabulary. [01:47] Aria: PHP's. [01:47] swair__ has joined the channel [01:47] jesusabdullah: oh, php's [01:47] jesusabdullah: hah [01:47] Aria: Like _wow_ bad. [01:48] russfrank: Aria: so you're saying my point is negligible? [01:48] Aria: I'm saying that there's some clever ways to make it work, and comparing things to PHP and Apache isn't ... exactly ... great. [01:48] erickt has joined the channel [01:48] russfrank: Aria: I was only comparing lightty's method of talking to php and apache's metho dof tlaking to php [01:48] Aria: 'cause it's hardly the paragon of efficiency. [01:49] freshmilk_: are that they have to buy less ram? buy less servers as a whole? less electricity usage? less load/electricity usage? overheating? cooling? [01:49] Aria: russfrank: Yeah. Even so, they don't exactly compare. For some workloads, lighty can handle orders of magnitudes more. And for most workloads, they're damn close. [01:49] Aria: freshmilk_: You can do things with node that you can't with Apache. [01:49] russfrank: to make the point that event based servers -> (f)cgi -> dynamic language isn't as nice as an event based web server wit ha built in scripting language [01:50] Aria: freshmilk_: Try having 30,000 clients connected to a single server running Apache, not actively transmitting data, just waiting for an event. [01:50] Aria: russfrank: They can be. It depends on WHAT you're doing. [01:50] russfrank: freshmilk_: those 30,000 clients have their own apache process which is using a lot of memory in comparison to node's 40 bytes per connection [01:50] freshmilk_: I know but im saying [01:50] russfrank: well yeah [01:50] freshmilk_: how does this translate into cost saings [01:50] freshmilk_: savings [01:50] Aria: (Also, the fastcgi case is often built as application pooling -- which for anything that's cpu-bound, is really nice.) [01:50] freshmilk_: and server load reduction/electricity usage/ etc [01:50] r04r: freshmilk_: More people on lower server specs. [01:51] russfrank: Aria: if you have a site which is only dynamic in a few places, then lightty + fcgi + php make smore sense then apache + mod_php or somethign similar [01:51] brianseeders has joined the channel [01:51] russfrank: freshmilk_: what r04r said. less expensive servers can serve more people [01:51] Aria: russfrank: It's actually quite good in both cases. (And actually, I run Apache+PHP-FPM. So there.) [01:51] russfrank: heh [01:52] Aria: freshmilk_: Cost savings isn't really what most people consider, though. It makes things possible that otherwise aren't. [01:52] issackelly_ has joined the channel [01:52] freshmilk_: Aria: I know but a F100 might consider that viewpoint [01:52] freshmilk_: what is the dael with scala why do so many people use it [01:53] Dmitrijus: because it's java [01:53] Dmitrijus: and java is cancer [01:53] russfrank: hahahah [01:53] Aria: Scala? Damn nice language, syntactically, for some people, bolted onto the rather large library base of the JVM. [01:53] russfrank: it can compile to both jvm and clr i though [01:53] russfrank: t [01:54] Aria: Statically typed with full inference. There's a lot of language goodness in it. [01:54] freshmilk_: Aria, why is it damn nice really it is just java with some stuff [01:54] russfrank: heh [01:54] Aria: Yeah, aside from the not being Java at all ;-) [01:54] russfrank: just some stuff, man! [01:54] Aria: I mean, Javascript is just C++ with some stuff. [01:54] Dmitrijus: Aria: NO WAY [01:54] russfrank: hahah [01:55] freshmilk_: sAria what is the main benefit of scala [01:55] russfrank: it looks nice [01:55] freshmilk_: right [01:55] freshmilk_: thats it [01:55] Aria: freshmilk_: try asking in #scala ;-) [01:55] freshmilk_: it fucking looks nicer [01:55] swair__ has joined the channel [01:55] Aria: This is #node.js ;-) [01:55] russfrank: it looks like you'r etrying to compare languages too much [01:55] freshmilk_: fine [01:55] freshmilk_: i am [01:55] russfrank: thats not like a thing to make fun of [01:55] Dmitrijus: :) [01:55] russfrank: looking nice is like, cool. [01:55] Dmitrijus: well, it's not the languages you should be comparing [01:55] r04r: freshmilk_: Scala is a general purpose programming language designed to express common programming patterns in a concise, elegant, and type-safe way. It smoothly integrates features of object-oriented and functional languages, enabling Java and other programmers to be more productive. Code sizes are typically reduced by a factor of two to three when compared to an equivalent Java application. [01:55] Aria: freshmilk_: Type inference. Deeply integrated functional concepts. That alone makes it NOT java ;-) [01:55] Dmitrijus: but rather the programming models they represent [01:56] russfrank: i see a lot of people trying to find the 'best' language. find one you think looks pretty! then learn it and make something [01:56] freshmilk_: russfrank [01:56] freshmilk_: what have u made [01:57] freshmilk_: none of us have made anyting [01:57] freshmilk_: we r losers [01:57] freshmilk_: funny that they bring up the object oriented an fcuntional symbiosis [01:57] freshmilk_: every language does that [01:58] Aria: Hardly. [01:58] Aria: PHP didn't until 5.3, and barely at that. [01:58] Aria: Plus, there's a dozen kinds of object oriented, too. [01:59] zackattack has joined the channel [02:00] Sorella: Prototypical OO is clearly superior OO [02:00] Dmitrijus: Sorella: i don't really like OO [02:01] jesusabdullah: Your MOM is object-oriented! [02:01] jesusabdullah: [02:01] skm has joined the channel [02:01] gregeh has joined the channel [02:02] Aria: Closures are the one true object ;-) [02:02] Sorella: some moms don't extend Female. [02:02] Dmitrijus: Aria: YESH! [02:03] Sorella: Fexprs are more interesting, actually. [02:04] jesusabdullah: fexprs? [02:04] Sorella: first class macros. [02:04] jesusabdullah: I like closures :3 [02:04] freshmilk_: tell me more about scala [02:04] freshmilk_: u guys have been awesom to me [02:04] freshmilk_: and i feel blessed [02:04] Sorella: jesusabdullah: http://web.cs.wpi.edu/~jshutt/kernel.html [02:04] freshmilk_: i will be back soon [02:04] tiglionabbit: AvianFlu: omg this http proxy thingy works great :D. Now I don't need to know how to do server admin stuff cuz I can just write it in javascript. [02:05] AvianFlu: quick, go tweet that at @dozba and @zedshaw [02:05] AvianFlu: :D [02:05] AvianFlu: seriously, though, it's easy, but you should still go learn stuff [02:05] russfrank: ugh, twitter. [02:06] stalled has joined the channel [02:06] cconstantine_ has joined the channel [02:06] Dmitrijus: freshmilk_: anyway, if you want to learn something, just go do some c (if you havent done this before) :) [02:06] freshmilk_: i dont know any c [02:06] russfrank: writing awful c programs is a great way to learn about programming [02:07] AvianFlu: yes. [02:07] Aria: It really is. [02:07] jesusabdullah: I like that too about the proxy, tiglionabbit [02:07] russfrank: buy k&r [02:07] russfrank: do it, then try to write something awesome. it won't work, but you'll learn a ton in the process [02:07] Dmitrijus: russfrank: writing good c program is even a better way! [02:07] russfrank: hahah [02:07] tiglionabbit: it feels silly proxying from node.js to apache but ima do it [02:07] tiglionabbit: I suppose doing it the other way around would be sillier though [02:07] jesusabdullah: Interestingly, Zed Shaw has a good talk about how ACLs are painful because the situations are complex enough that you end up needing a turing-complete language [02:07] russfrank: :| [02:07] JakeyChan has joined the channel [02:08] jesusabdullah: but I think his solution involved ruby, and I bet he would be douchey if someone suggested doing the same with javascript [02:08] rook2pawn: tiglionabbit: just curious what for other than experimentation? [02:08] cconstantine_: I'm using express and I want to send a post request with a json body from node.js and receive it using express and the body is just null. Is there a simple example that does tihs? [02:08] tiglionabbit: rook2pawn: well I'm using slicehost and I have some python apps on there and I want to run my node app on the same server [02:08] russfrank: use request! [02:09] tiglionabbit: so I'm using node http-proxy to split things up by hostname between apache and node apps [02:09] russfrank: https://github.com/voxpelli/node-request cconstantine_ [02:09] jesusabdullah: neato [02:09] swair__ has joined the channel [02:09] rook2pawn: tiglionabbit: ah, i would actualy do it the other way so you have node exposed at the top [02:09] russfrank: cconstantine_: or pastebin your code [02:09] tiglionabbit: rook2pawn: huh? It is. [02:10] tiglionabbit: it's just that I'm used to thinking of shit like apache and nginx as like it's supposed to be a 'real server' whereas node is pretty simple in comparison [02:11] cconstantine_: russell_h, request script http://pastebin.com/nLNiWRJR [02:11] AvianFlu: node uses a modified version of nginx's http parser [02:11] AvianFlu: so I wouldn't be too afraid [02:11] freshmilk_: u guys are awesome [02:11] freshmilk_: see u soon [02:11] russfrank: close, with the tab complete. close [02:12] brianseeders has joined the channel [02:12] rook2pawn: tiglionabbit: nginx load balancer is from ryah or so i hear... so to the degree that nginx is "legit" even more so is node. [02:13] russfrank: cconstantine_: you really probably want to use node-request, it'll make your life so much easier [02:13] torsd has joined the channel [02:14] tiglionabbit: hurr, what gives? I think I need to be root to run node on port 80 but if I run node as root it can't find its modules... [02:14] cconstantine_: russfrank, ok [02:14] tiglionabbit: oh maybe root needs that node modules environment variable [02:14] russfrank: i don't see a problem with this though.. [02:15] russfrank: the status is 200? [02:15] russfrank: ar ethere headers? [02:16] boltR has joined the channel [02:16] Aria: tiglionabbit: Yes indeed. [02:17] wilmoore has joined the channel [02:17] russfrank: tiglionabbit: ports < 1024 are priveleged and only root can listen on them [02:18] Aria: Except without some special configuration [02:18] tiglionabbit: is there a way to configure it so that is not the case? [02:18] swair__ has joined the channel [02:18] tiglionabbit: it seems silly to have to run something as root just so that it can use that port [02:18] tiglionabbit: most servers have user-switching settings in em to avoid that [02:18] Dmitrijus: tiglionabbit: you can always drop privileges from root :) [02:18] russfrank: yes [02:18] tiglionabbit: ? [02:19] AvianFlu: process.setuid(newUID) [02:19] russfrank: process.setuid [02:19] russfrank: :| i lost [02:19] Daegalus: Hmmm, i think we should write a Node VM in Node [02:19] cypha has joined the channel [02:19] cypha: I'm having an issue with the last line of this: https://gist.github.com/579814#file_node_and_npm_in_30_seconds.sh [02:20] cypha: (line 9) [02:20] ag4ve has joined the channel [02:20] swair has joined the channel [02:20] Dmitrijus: Daegalus: hm, why? [02:20] cypha: getting this error: http://paste.ofcode.org/TJBcKsA4Sgp4BYLgv5yCnA [02:21] Daegalus: Dmitrijus: because we can! [02:21] Dmitrijus: Daegalus++ [02:21] russfrank: whats this ++ing thing [02:21] Sorella: karma. [02:21] russfrank: cypha: try . ~/.bashrc [02:21] fbartho: haha [02:21] russfrank: then run it again [02:21] Daegalus: When has anyone ever needed a good reason to do anything as a programmer?! Otherwise we wouldnt have the milions of libraries and weird dialects of things [02:22] Dmitrijus: Daegalus: indeed [02:22] cypha: russfrank, yes, that did it! [02:22] cypha: thank you [02:22] Sorella: Daegalus: you have millions of dialects of Lisp. [02:22] russfrank: np [02:22] cypha: russfrank, what's that line do, btw? [02:22] russfrank: sources ~/.bashrc [02:22] russfrank: to get the path line [02:22] Daegalus: russfrank: there is a bot in the other channels where a lot of us node people hang out, and they have a ++ beer bot for giving people beer [02:22] sdwrage has joined the channel [02:22] russfrank: not sure why it didn't work earlier in the script [02:22] russfrank: hah [02:23] catphive has joined the channel [02:23] cypha: well, ++russfrank [02:23] cypha: actually, ridic question, but what is node? [02:23] russfrank: the bot didn't ++ me :( [02:23] cypha: i'm just getting it cuz a script I want requires it [02:23] Dmitrijus: Daegalus: but sometimes programmers do come up with random reasons and they can be quite interesting :) [02:23] russfrank: ACTION rofl [02:24] jesusabdullah: What "is" node *anyway* [02:24] tbranyen: a lifestyle [02:24] jesusabdullah: haha [02:24] Daegalus: Dmitrijus: true but thsoe come after the fact [02:24] russfrank: hahahah [02:24] Dmitrijus: Daegalus: sure [02:24] JakeyChan_ has joined the channel [02:24] Daegalus: You know, I read through the freshmilk dialogues, i almost thought he was trolling at first [02:24] Sorella: cypha: node is an application framework that comes with a standard library that's focused on asynchronous I/O. You could say it's akin to the usual distribution of Python. [02:24] jesusabdullah: cypha: node.js is a javascript runtime (v8) bundled with some awesome networking and IO libraries [02:24] jesusabdullah: basically [02:24] Aria: Alright, pre-pre-pre-alpha, but https://github.com/aredridel/mod_node [02:25] Daegalus: Aria: why? [02:25] russfrank: http://yuilibrary.com/theater/ryan-dahl/dahl-node/ cypha [02:25] Aria: Deployment on shared hosting. [02:25] Aria: Among other things. [02:25] russfrank: this is a great presentation [02:25] Daegalus: Aria: mmmmm, ok good enough point [02:25] jesusabdullah: cypha: So, node is usually used to write webapps but sometimes other server-side javascript stuff is written in it [02:25] jesusabdullah: too [02:25] cypha: oh [02:26] cypha: watching the vid [02:26] Sorella: sometimes programming language compilers and interpreters are written in it. [02:26] Sorella: (ie.: Coffee) [02:26] jesusabdullah: cypha: What script do you have in mind? [02:26] cypha: gist [02:26] cassius has joined the channel [02:26] cypha: gedit-gist [02:26] Nuck: elliottcable: Just curious, did you snap and go insane last night? [02:26] ScottH has joined the channel [02:26] jesusabdullah: link? :v [02:26] jesusabdullah: gedit-gist? [02:26] cypha: https://github.com/niftylettuce/gedit-gists [02:26] jesusabdullah: Oh, niftylettuce [02:26] jesusabdullah: figures [02:27] jesusabdullah: that guy lurves gedit XD [02:27] Sorella: Nuck: ec sounds insane everyday though. [02:27] jesusabdullah: Does it use ngist? I think that's the one Chapel wrote [02:27] Nuck: Sorella: No, I think he stopped sounding insane and started being insane [02:27] jesusabdullah: Who's insane? [02:27] Sorella: Nuck: lol that would be dangerous though. [02:28] cypha: u know him [02:28] cypha: ? [02:28] cypha: lol [02:28] Nuck: Sorella: That's why I want to find out if he's lost his marbles so I know if I need to run [02:28] Sorella: jesusabdullah: apparently, elliottcable. [02:28] diogogmt has joined the channel [02:28] jesusabdullah: Oh, well yeah, everyone knows that [02:28] skiz has joined the channel [02:28] Nuck: >_> [02:28] jesusabdullah: cypha: I internet-know both those guys, yeah [02:28] cypha: haha [02:29] jesusabdullah: cypha: they're also both in this channel if you need help [02:29] skiz has joined the channel [02:29] mike5w3c has joined the channel [02:29] AvianFlu has joined the channel [02:29] AAA_awright: Is there an fs.copy or something? [02:30] Nuck: AAA_awright: there's link? [02:30] AAA_awright: Is that a hardlink? [02:30] Nuck: Dunno [02:30] cypha: jesusabdullah, who's both? [02:30] Nuck: It's just "link" [02:30] cypha: just lettuceguy [02:30] swair has joined the channel [02:31] ScottH: hey guys, looking for a little assistance with a project..I'm having trouble with http.request not giving me the full body of a JSON response when running JSON.parse on it. [02:31] AAA_awright: I guess that's better [02:31] SubStack: the niftiest lettuce of them all [02:31] ScottH: code sample: https://gist.github.com/a433d550f53e99669f42 [02:31] jesusabdullah: cypha: niftylettuce and the guy that wrote the gister [02:31] jesusabdullah: or, most likely wrote the gister [02:31] Nuck: ScottH: Are you capturing all the data events? [02:31] ScottH: when I run JSON.parse the body is truncated at the console.log, when it's not run then I get the full response body [02:31] cypha: gister? [02:31] Nuck: ScottH: data fires for each part of the body [02:31] Nuck: Not the entire body [02:31] cypha: ok, another ridic question...what's I/O? [02:31] Nuck: cypha: input/output [02:31] Sorella: Input/Output. [02:31] tiglionabbit: hurr. I'm having trouble getting it to proxy to apache. The stuff behind apache is just hanging and not responding [02:32] cypha: yeah, I thought so [02:32] ScottH: @Nuck: okay, not sure what that means..couldn't find much on using http.request [02:32] russfrank: ScottH: just use https://github.com/voxpelli/node-request ! so much easier! [02:32] cypha: but everything is I/O then [02:32] jesusabdullah: cypha: Maybe I misread the title of your link. [02:32] jesusabdullah: I thought it was a gedit plugin that gists things for you [02:32] Sorella: cypha: hardly so. Even less in things like Haskell. [02:32] Nuck: ScottH: http://nodejs.org/docs/v0.4.12/api/http.html#http.ClientRequest [02:32] cypha: oh yeah jesusabdullah, ur right, lettuce uses gista [02:32] cypha: in there [02:32] jesusabdullah: Oh, he uses Tim's gister [02:33] Nuck: ScottH: In NodeJS, tehe `data` event fires many times as the body is streamed in [02:33] Nuck: If you need the entire body, you buffer up the data and wait until the `end` event [02:33] ScottH: @russfrank: thanks, didn't see that..this is a fork of a bot for campfire and it used request originally I think [02:34] Nuck: I personally advise against using a lib to "make things easier" because in the long run it'll make it harder, ScottH [02:34] jesusabdullah: cypha: when you hear i/o, think http, tcp, stdin, stdout, and data streams in general that you can read from and write to [02:34] Nuck: The best thing is to understand what you're working with :) [02:34] jesusabdullah: idk, I think request is pretty nice [02:34] jesusabdullah: and it's not a stupid api [02:34] Nuck: jesusabdullah: Yes, but you should still know the builtin [02:34] russfrank: why [02:34] ScottH: @Nuck: okay that makes much more sense..how do I know when the entire request is ended? And I feel the same a bit about libraries [02:34] jesusabdullah: You should know the built-in if you're going to use the built-in [02:34] jesusabdullah: If all you want to do is http get, then just use request [02:35] jesusabdullah: If you're happy writing express apps, use express [02:35] Nuck: ScottH: you know where it's res.on('data'? [02:35] Nuck: You also have res.on('end' [02:35] Nuck: And that's when it's done [02:35] Nuck: jesusabdullah: I disagree [02:35] jesusabdullah: It's not like the basic apis are easy to abuse or fuck up [02:35] Nuck: You should know the entirety of your layer [02:35] jesusabdullah: What? Fuck no [02:35] russfrank: that's a little ridiculous Nuck [02:35] swair has joined the channel [02:35] jesusabdullah: What you SHOULD do [02:36] jesusabdullah: is have a mental model of how whatever level you interface with works [02:36] jesusabdullah: it doesn't have to be complete, or even 100% accurate [02:36] Nuck: jesusabdullah: Yes [02:36] jesusabdullah: the important thing is simply that you can predict what will happen if you do a certain thing [02:36] jesusabdullah: if you can do that with express, for example, without learning the basic http api, then so be it [02:36] Nuck: Doesn't change the fact that using abstracted APIs sticks you in a place where you won't progress well [02:36] jesusabdullah: How so? [02:36] jesusabdullah: Abstracted APIs are awesome [02:37] cypha: jesusabdullah, gotcha, I think I can remember that :) [02:37] russfrank: abstractions are usually good [02:37] jesusabdullah: I mean, you can have a bad api [02:37] russfrank: pretty much everything you write is on top of some abstraction [02:37] russfrank: we don't write file io with system calls do we [02:37] cypha: for some reason, when I try that script I pasted here from lettuce, it keeps telling me "gista: not found" [02:37] jesusabdullah: and you can have an abstracted api that isn't the abstraction you need [02:37] Nuck: jesusabdullah: Abstracted APIs are good? Sure, but you should still know what you're abstracting over [02:37] jesusabdullah: you should have a mental model of what you're abstracting over [02:37] jesusabdullah: that doesn't mean you have to know how to use what you're abstracting over [02:38] Nuck: Don't learn CS before you learn JS, don't use Express unless you know the basic Node HTTP handlers [02:38] jesusabdullah: for example, the http module is itself an abstraction over, well, tbp and http [02:38] Nuck: I strongly believe in that [02:38] cypha: even though I did npm install -g gista [02:38] jesusabdullah: tcp and http* [02:38] russfrank: you have to start somewhere Nuck [02:38] Nuck: jesusabdullah: Yes, all abstractions in your layer [02:38] jesusabdullah: cypha: what happens if you type "gista" at the command line [02:38] dexter_e has joined the channel [02:38] Nuck: russfrank: I believe mucking around with the builtins are the way of doing that :) [02:38] cypha: jesusabdullah, it sits there [02:39] russfrank: Nuck: again though, thats just a different point, there's still lots and lots and lots which is abstracted away [02:39] cypha: as though I typed "cat" [02:39] ScottH: @Nuck isn't request.end() the end of the /request/ and not the response? [02:39] Nuck: russfrank: abstractions are for convenience, not making things easier ;) [02:39] russfrank: you're picking an arbitrary point and saying 'this is the right level of abstraction' [02:39] jesusabdullah: Nuck: My point is, I hardly know how http *actually* works, but I have a decent mental model of headers and bodies from working with the http module [02:39] jesusabdullah: I couldn't do anything lower-level if you wanted me to [02:39] russfrank: 'start at this level of abstraction' [02:39] jesusabdullah: or, if I wanted to [02:39] Nuck: russfrank: Not req.end(), res.on('end', function) [02:39] jesusabdullah: It's like saying you shouldn't drive a car unless you can fix the engine [02:39] jesusabdullah: fuck that. [02:39] russfrank: ScottH: Nuck> russfrank: Not req.end(), res.on('end', function) [02:40] boltR has joined the channel [02:40] jesusabdullah: cypha: It sounds like it's installed, huh? That's odd [02:40] Nuck: russfrank: Oh whoops sorry [02:40] Nuck: :P [02:40] russfrank: haha [02:40] cypha: ya [02:40] jesusabdullah: cypha: I'd help dig in for you but my internet is so slow I can't really do a whole lot :( [02:40] Nuck: Abstractions are not intended to be a shortcut [02:40] ScottH: ah okay, thanks @russfrank and @Nuck [02:40] hermanju_ has joined the channel [02:40] Nuck: They're a way to make code cleaner [02:40] Nuck: (and more reusable) [02:40] cypha: kk [02:40] jesusabdullah: well, yeah [02:41] jesusabdullah: but that doesn't mean you have to fit everything underneath it into your head [02:41] russfrank: no, they're intended to save you time [02:41] jesusabdullah: They should do all those things [02:41] Nuck: So by that logic, a beginner shouldn't start with abstracted things, that's taking a shortcut [02:41] jesusabdullah: save you time, take care of shit you don't really want to think about, and make code clean and reusable [02:41] cypha: jesusabdullah, maybe u can just tell me if u recognize anything incorrect with this script within gedit? http://paste.ofcode.org/8RwTgyfX6F2v3eCuwWRy4C [02:41] russfrank: Nuck: again though, by your logic, a beginner should write file io using syscalls, this would be ridiculous [02:41] Nuck: I'd also argue that people should learn the *real* DOM before you learn jQuery. [02:41] Nuck: russfrank: Not at all [02:41] russfrank: i think libc is a fair abstraction [02:42] Nuck: russfrank: I have said "learn your layer" [02:42] russfrank: for writing c code [02:42] jesusabdullah: cypha: type "which gista" [02:42] Nuck: *your layer* [02:42] hermanjunge has joined the channel [02:42] russfrank: Nuck: if we were teaching people C, then [02:42] russfrank: we teach the abstraction [02:42] swair has joined the channel [02:42] russfrank: because its what actual code is written in [02:42] jesusabdullah: Pffsht, the "real" dom and jquery are the fucking same, just a different api [02:42] jesusabdullah: I learned real dom after jquery, and really [02:42] Nuck: jesusabdullah: Oh hell no, they're very different [02:42] jesusabdullah: it's not like you can't learn one later [02:42] jesusabdullah: but you do the same shit [02:42] Nuck: jesusabdullah: Most people can't [02:43] cypha: jesusabdullah, /home/raj/local/bin/gista [02:43] ryanrolds: Except, jquery is v. slow. [02:43] jesusabdullah: You have selectors, you have modifying attributes, you have making babies [02:43] Nuck: Learning abstractions first sticks you into a rut [02:43] ryanrolds: Stright DOM 4 lyfe. [02:43] Nuck: Plain and simple, it's a place where nobody will get out [02:43] Nuck: ryanrolds: Actually [02:43] jesusabdullah: It obviously didn't stick me in a rut [02:43] Nuck: jQuery is pretty fast nowadays [02:43] Nuck: jesusabdullah: Most people [02:43] jesusabdullah: I haven't seen these "most people" [02:43] jesusabdullah: I really haven't [02:43] Nuck: jesusabdullah: LEarning JS before Java or C or anything higher level stuck me in a rut [02:43] Nuck: I can't go higher level than JS or PHP [02:43] Vennril2 has joined the channel [02:43] Nuck: or is it lower level? [02:43] Nuck: I forget [02:44] catphive: lower level... [02:44] russfrank: lower [02:44] jesusabdullah: lower level [02:44] jesusabdullah: and that's your fault [02:44] russfrank: ;P [02:44] MooGoo: wtf is high level even [02:44] jesusabdullah: If you want to know java, learn java [02:44] russfrank: it didn't for me dude [02:44] jesusabdullah: even though it sucks [02:44] Sorella: jQuery and the DOM aren't really that far off each other. Except that the DOM is Java-ish. [02:44] Nuck: I always forget the direction of those layers >_> [02:44] russfrank: i started with php and thought 'hey this is cool' then pushed further down [02:44] catphive: learning js doesn't make it harder to learn c [02:44] Sorella: they're both pretty high-level, though. [02:44] jesusabdullah: If anything, learning js makes it easier to learn c [02:44] ryanrolds: Yeah, it uses a lot of native functions when they are available. [02:44] russfrank: leraned C, messed with assembler, etc [02:44] MooGoo: most people dont remember the DOM before querySelectorAll or getElementsByClassName [02:44] tylerstalder has joined the channel [02:44] jesusabdullah: because the basic {} and ()ery is similar [02:44] russfrank: but the important point Nuck is that people leran differently [02:44] Nuck: jesusabdullah: I'd very much disagree. You learn the syntax, that's the easy part [02:44] ryanrolds: document.createElement() and what.appendChild() is still going to be faster. [02:44] russfrank: leraning php then C worked for me [02:44] Nuck: russfrank: Maybe so [02:45] jesusabdullah: well, yeah that's the easy part, but it gets one thing out of the way [02:45] Nuck: jesusabdullah: The hard part is the actual language [02:45] Nuck: And that's different [02:45] jesusabdullah: Just get a copy of K&R and crack down [02:45] Nuck: between a scripting language and a compiled low-level language [02:45] russfrank: Nuck: I had a calc professor a couple years ago who didn't know any programming. h etold me he was beginning by leraning C and examining the output of the compiler [02:45] catphive: c is not a difficult language... but don't expect it to be as easy as js [02:45] agnat_ has joined the channel [02:45] catphive: to get things done [02:45] catphive: the language itself is simple, but it takes a lot of code to accomplish much [02:45] russfrank: maybe that works for him, i don't know, I don't think i'dve bee nable to do that when i was first learning php [02:45] MUILTFN has joined the channel [02:45] jesusabdullah: exactly [02:45] Dmitrijus: Nuck: the hardest part is actually in finding motivation [02:46] Daegalus: You know, i have ben thinking. I am half tempted to write all my game ideas in C++ instead of trying to leverage C# everywhere, but I am not sure if I want to deal with C++ ever [02:46] jesusabdullah: Dmitrijus: agreed. [02:46] Nuck: Dmitrijus: That's a valid point [02:46] jesusabdullah: You have to just have a *reason* to learn c [02:46] Nuck: That's probably why so many people get stuck in a language rut [02:46] Nuck: They'll have their "one favorite" language [02:46] Nuck: And rarely venture beyond that [02:46] catphive: it's better to know a lot of languages [02:46] jesusabdullah: Nuck: Why don't you pick up a copy of "Land of Lisp" if you want to learn a new language for enrichment purposes [02:46] catphive: definitely [02:46] jesusabdullah: ? [02:46] jesusabdullah: It's a good book [02:46] Nuck: I know plenty of people who get stuck in one language [02:46] jesusabdullah: a *lot* of fun [02:46] jesusabdullah: and you learn a lot [02:46] catphive: lisp is a great language to learn [02:47] jesusabdullah: and that!^^ [02:47] swair_ has joined the channel [02:47] Nuck: jesusabdullah: My next language will be lisp, I've already decided that ;) [02:47] Sorella: jesusabdullah: is that the game programming in Lisp book? [02:47] Nuck: Land of Lisp, though... [02:47] jesusabdullah: Sorella: yes [02:47] Nuck: eh [02:47] jesusabdullah: Nuck: It's really good, I promise [02:47] Nuck: I'm not a game programmer [02:47] Sorella: the video is hilarious. [02:47] catphive: Practical common lisp is pretty good [02:47] jesusabdullah: It's not about being a game programmer, it's about having a reason to learn the thing [02:47] Dmitrijus: catphive: depends on how you define "to know", i takes years to learn a language [02:47] jesusabdullah: that's why it's a good book [02:47] Coderah has joined the channel [02:47] Nuck: jesusabdullah: I'm also not a gamer ;) [02:47] Sorella: Nuck: go with Scheme though, because Lisp-1 > Lisp-{2,n} [02:47] jesusabdullah: Now you're just making excuses [02:47] Nuck: So that's a rather crappy reason for me [02:47] Sorella: And Racket is awesome. [02:47] Nuck: jesusabdullah: No, seriously. I'm not a gamer. [02:48] Nuck: I suck ass at games [02:48] Nuck: Badly. [02:48] Nuck: In fact, it's actually quite pathetic. [02:48] jesusabdullah: It's not like you're gonna make the next minecraft. You just make a silly little game and then go, "Oh! That's a cute, fun example" [02:48] catphive: lisp-1 vs lisp2 doesn't make much difference [02:48] jesusabdullah: They're exercises, not cartridges [02:48] Nuck: jesusabdullah: Not my style, TBH [02:48] jesusabdullah: ugh [02:48] Nuck: I'll find a good lisp book I'm sure [02:48] Nuck: But I will take note of that one [02:48] jesusabdullah: try "the little schemer" then [02:48] Nuck: jesusabdullah: Not like I'm gonna learn lisp for another year [02:48] jesusabdullah: Why not? [02:48] Nuck: I've got a startup to build [02:48] catphive: http://www.gigamonkeys.com/book/ [02:49] Nuck: My schedule is full up [02:49] Dmitrijus: Nuck: mah favourite language is c anyway :) [02:49] tmzt_: Nuck: what are you working on? [02:49] Nuck: tmzt_: Art community [02:49] Sorella: Lisp is pretty easy to learn (Scheme, at least). Mastering it might be quite a quest. [02:49] Nuck: artuous.com [02:49] Sorella: worth it though. [02:49] simenbrekken has joined the channel [02:49] jesusabdullah: oh, so, cypha, I don't see anything wrong with that script, but I wonder if somehow gista is out of the $PATH in it [02:49] Peniar has joined the channel [02:49] Sorella: If you're into building languages, just get Racket and follow the Racket guide/docs/stuff. [02:49] Nuck: Anyways, I've got a jQuery plugin to finish :D [02:50] Daegalus: Dmitrijus: i think a problem now is most of us dont want to do manual memory management in the sense of malloc/etc like me, If I can I want to avoid C/C++ my entire progrmaming career [02:50] Nuck: Once I get this done, it'll be open-source [02:50] Nuck: (might as well, it's client-side JS) [02:50] catphive: well, C/C++ is not a language [02:50] catphive: and C++ doesn't realy have manual memory management [02:50] Nuck: (not like people would respect my code's privacy :P) [02:50] jesusabdullah: cypha: So, try adding /home/raj/local/bin to that $PATH variable [02:50] catphive: but yes, they are overkill for a lot fo things [02:51] russfrank: catphive: it doesnt have a gc [02:51] russfrank: probably what he was referring to [02:51] cypha: jesusabdullah, not sure how to do that =| [02:51] russfrank: hey Daegalus! most of us? [02:51] russfrank: i love programming in C! [02:51] Nuck: russfrank: What the hell doesn't have a Google Chrome? [02:51] Daegalus: catphive: welll, i personally am refering to video games though. If I can I want to avoid C++ for them and write them in C#/XNA or whatever the hell else [02:51] Nuck: D: [02:51] Nuck: =P [02:51] russfrank: i wish i had more excuses to write stuff in c++! [02:51] Dmitrijus: Daegalus: i know, but i really really like the transparency [02:51] russfrank: theres not enough interesting systems work anymore [02:51] Nuck: ewwwwww C# [02:51] Nuck: ACTION barfs [02:51] jesusabdullah: cypha: export PATH=$HOME/local/node/bin:$PATH This line makes the path /home/raj/local/node/bin:$PATH [02:51] Dmitrijus: russfrank: c++ is wrong anyways [02:51] jesusabdullah: The paths are colon-separated [02:51] russfrank: hahaha [02:52] russfrank: wrong? :( [02:52] Daegalus: Nuck: i like C# far more than Java, any day [02:52] AvianFlu: C ftw [02:52] Nuck: The mere premise of C# was just nasty [02:52] Dmitrijus: russfrank: yes, C FTW [02:52] Sorella: ) [02:52] Nuck: Daegalus: That's not a fair comparison [02:52] russfrank: C/C++ I mean, either of them [02:52] Nuck: Not at all [02:52] jesusabdullah: so, cypha, try changing that line so that the first one points to where your gista install ended up [02:52] catphive: Daegalus: both c# and java are not that great... [02:52] AvianFlu: C++ is extra stuff for C [02:52] russfrank: i've done lots of C, i love it, never really have an excuse to do anything meaningful in C though [02:52] avih has joined the channel [02:52] catphive: try python or... javascript! [02:52] AvianFlu: fundamentally the same language, but extended [02:52] Dmitrijus: russfrank: c and c++ are quite different [02:52] Nuck: Saying something is better than Java is like saying you're not rolling in a pile of feces. [02:52] russfrank: hah [02:52] russfrank: rly Dmitrijus [02:52] jesusabdullah: cypha: and then learn javascript, obviously, and you can hang with...these people. >_<; [02:52] catphive: c++ is way different if you know what you are doing [02:53] Nuck: If you're comparing to that, it means there's a serious problem [02:53] Daegalus: russfrank: I took C for my programming courses during my early college stuff, now its all java [02:53] catphive: but it is similar to c if you only bother to learn a tiny subset of c++ [02:53] AvianFlu: c++ has lots of extra stuff [02:53] russfrank: Daegalus: i know [02:53] AvianFlu: you can still write C in a C++ program [02:53] russfrank: Daegalus: it sucks [02:53] Nuck: My school only teaches Java [02:53] pekim has joined the channel [02:53] Nuck: I'm not bothering with any programming courses [02:53] Nuck: Oh [02:53] Daegalus: russfrank: well this is a matter of a few years. I did my core in C, then i get to upper division (a year from graduation) and im all JAva [02:53] catphive: yeah, I hate how schools use java now... [02:53] Nuck: They also teach Visual Basic [02:53] Nuck: And Python [02:53] Nuck: None of these strike my fancy [02:53] jesusabdullah: Python's not a bad language [02:53] Nuck: Python isn't until much later [02:54] AvianFlu: python is what you'd want to take in school [02:54] AvianFlu: of that list [02:54] Nuck: It goes Java > VB > Python [02:54] jesusabdullah: Python's a good first language actually [02:54] catphive: yeah [02:54] Nuck: AvianFlu: Agreed [02:54] Nuck: But [02:54] tmzt_: js people are cool [02:54] Nuck: Nothx [02:54] jesusabdullah: Yeah, no, you wanna learn python first [02:54] Nuck: Not a fan of Python really [02:54] cypha: jesusabdullah, what do you mean "changing that line so that the 'first' one points to where your gista install ended up"? [02:54] tmzt_: Nuck: what startup are you working on? [02:54] cypha: what first line? [02:54] Daegalus: catphive: C#/XNA can make amazing games btw and I like C#, but Im a JS noob, I cant make a JS game atm the way I want to. [02:54] Nuck: tmzt_: artuous.com [02:54] cypha: i mean, what first one? [02:54] tmzt_: Nuck: what is it? [02:54] Sorella: Python is actually okay. [02:54] AvianFlu: I used to hate python when I wrote mad perl [02:54] jesusabdullah: cypha: here, tell me what which gista said again, and I'll show you [02:54] swair_ has joined the channel [02:54] Nuck: tmzt_: Ever heard of deviantART? [02:54] Daegalus: catphive: then Python i like, but I never wrote anything in it [02:54] AvianFlu: but there's a lot to like about python if you're just learning it [02:54] tmzt_: Nuck: yep [02:54] Nuck: We're like that, but connecting artists and art appreciators [02:54] Sorella: Nuck: what are your problems with Python? Lack of expressiveness or syntax? [02:54] Dmitrijus: python is nice [02:54] Dmitrijus: :) [02:54] Nuck: Sorella: Syntax [02:54] tmzt_: oh right, you've told me before. cool [02:54] jesusabdullah: Sorella: Yeah, both of those things [02:55] catphive: sometimes the library matters more than the language [02:55] Nuck: I like my {curly braces} [02:55] Sorella: hehe, no way around that then [02:55] Daegalus: I love the colonless, bracketless syntax of pythong <3 [02:55] cypha: jesusabdullah, /home/raj/local/bin/gista [02:55] jesusabdullah: You can't do inline multi-line callbacks in python [02:55] catphive: (love lisp) [02:55] Nuck: jesusabdullah: EEK [02:55] Sorella: jesusabdullah: I'd argue Python is a pretty expressive language. [02:55] Nuck: ACTION runs [02:55] Nuck: jesusabdullah: That's awful D: [02:55] jesusabdullah: Yeah [02:55] Sorella: they just dislike anonymous functions [02:55] Daegalus: So my next few games are either going to be C#/XNA or something else, but I am trying as best to avoid C++/DirectX/OpenGL [02:55] AvianFlu: like I said, if you're just learning it, though, python is nice [02:56] jesusabdullah: Well, python can be quite expressive, it's just not so hot for doing asyncronous I/O stuff the same way js does [02:56] catphive: yeah, not having statements in closures is the one thing in python that is kind of annoying [02:56] Sorella: meta-classes are interesting though. [02:56] htoothrot has joined the channel [02:56] jesusabdullah: You can fake it with twisted, eventlets, shit like that, but it's not the same [02:56] jesusabdullah: but numpy and scipy are *awesome* [02:56] Nuck: jesusabdullah: loltwisted [02:56] brianc has joined the channel [02:56] jesusabdullah: Yeah, twisted's a pile of shit from what I saw [02:56] Nuck: numpy and scipy sound like STDs [02:56] catphive: well, a lot of languages can do async io, even c [02:56] Sorella: also, you can change how import lookups are done, change operators and stuff. [02:56] catphive: but it's way easy in node js [02:56] jesusabdullah: They're numerical libs, Nuck [02:56] Dmitrijus: Nuck: actually, numpy is used to study STD's ;D [02:56] Nuck: jesusabdullah: Nope, forever STDs in my mind [02:57] AvianFlu: Sorella, I really like the `from x import y` semantic [02:57] Daegalus: catphive: there jsut arnet many good choices for game dev [02:57] AvianFlu: in addition to regular import [02:57] Dmitrijus: actually [02:57] Dmitrijus: the most awesome thing about python [02:57] Dmitrijus: is generators <3 [02:57] Nuck: ACTION fires up a deisel generator [02:57] Nuck: Liek that? [02:57] Nuck: *diesel [02:57] AvianFlu: I've never seen an explanation of a generator that made any sense [02:58] AvianFlu: in python [02:58] Dmitrijus: AvianFlu: do you know longjmp? :) [02:58] AvianFlu: I get how real ones work [02:58] AvianFlu: are we talking x86 asm here? [02:58] Sorella: AvianFlu: you can have that in JS as well: with(extract(require('lib'), ['x'])){ code }; function extract(obj, props) { var x = {}; props.forEach(function(key){ x[key] = obj[key] }); return x } [02:58] Dmitrijus: AvianFlu: no [02:58] Nuck: Sorella: No [02:58] Nuck: With [02:58] Nuck: Bad [02:58] Nuck: ACTION slaps [02:58] zmbmartin has joined the channel [02:58] Dmitrijus: AvianFlu: http://en.wikipedia.org/wiki/Setjmp.h [02:58] AvianFlu: lolol [02:58] ckknight: AvianFlu: a generator is just a state machine that holds its state and returns different values each time you call it. [02:59] Sorella: with should be okay for statically-shaped objects, but engine devs don't like it, apparently. [02:59] Dmitrijus: AvianFlu: basically, makes a lot of async stuff a lot easier :) [02:59] catphive: setjmp is just a continuation... but you don't really need to know those to understand generators [02:59] jesusabdullah: cypha: https://gist.github.com/1273217 line 4 [02:59] Sorella: You can't change the shape of Object.freeze(something), so there's no reason that shouldn't work just like another regular Environment Record. [02:59] jesusabdullah: generators aren't bad [02:59] jesusabdullah: neither are decorators [02:59] isaacs has joined the channel [02:59] Dmitrijus: catphive: yes, but i find to be quite similar [03:00] jesusabdullah: though sometimes I suspect that they are just ways to make up for not being able to rock multi-line lambdas [03:00] jesusabdullah: especially with decorators [03:00] catphive: well, continuations are a primitive that you can build a lot of higher level control structures with, like generators/coroutines [03:00] Sorella: you could achieve a similar import thing with run-time macro-expansions using eval though. [03:01] cypha: jesusabdullah, so I just type that line exactly and the gedit script should work? [03:01] jesusabdullah: Yeah, that version of the script should work, and line 4 is the one that got changed [03:01] jesusabdullah: Hopefully [03:01] jesusabdullah: I haven't tested it [03:02] cypha: jesusabdullah, oh, I need to change line 4? [03:02] swair__ has joined the channel [03:02] blueadept has left the channel [03:02] blueadept has joined the channel [03:03] jesusabdullah: cypha: Yeah [03:05] infynyxx has joined the channel [03:06] cypha: jesusabdullah, sorry bro, I'm just not getting it. I need to just write that line at my CL as "export PATH=$HOME/local/bin/gista:$HOME/local/bin:$PATH [03:06] cypha: ? [03:07] cypha: btw, this is a lot of crap to install just to be able to have a way to "pastebin" from gedit [03:07] cypha: besides using pastebin.com's script [03:07] cypha: freaking hate pastebin.com [03:08] fbartho: If I wanted to create an EventEmitter in c++ what would I need to do? [03:08] Dmitrijus: cypha: why would you ever want to paste from gedit? [03:08] Dmitrijus: cypha: cant you just copy paste into teh browser? [03:09] cypha: faster to just press Alt+P and poof, gotta link in my clipboard [03:09] cypha: I'm using gedit as my editor anyway [03:10] Dmitrijus: well, learn vim (or gvim), it is ueber awesome [03:10] Sorella: Or Emacs. [03:11] swair__ has joined the channel [03:11] hacksparrow has joined the channel [03:12] springmeyer has joined the channel [03:12] cypha: i got sick of vim [03:12] cypha: that's why i left [03:13] cypha: I like the intuitive ctrls i'm used to, that most word processors use [03:13] cypha: ctrl to jump words and paragraphs [03:13] cypha: shift to highlight [03:13] cypha: and vim's MS script to copy MS shortcuts totally sucks [03:13] Dmitrijus: cypha: also, if you want someone to help you with your code snippets, you can give him ssh and just do shared screen(1) sessions :) [03:14] swair has joined the channel [03:14] Sorella: Emacs has all those, plus extensibility, which is what counts in a programming text editor. [03:14] russfrank: are you saying vim can't be extended? [03:14] Sorella: russfrank: you mean me? [03:14] russfrank: cypha: vim rocks. you learn it eventually [03:15] cypha: Dmitrijus, that's a great idea, i've thought about that [03:15] cypha: but dunno how easy/hard it is to create an ssh account for someone else [03:15] russfrank: its nice to have different shortcuts for vim imo since it runs in a terminal [03:15] cypha: and also not sure aobut the security [03:15] cypha: russfrank, I tried for a couple months [03:15] russfrank: sudo useradd -m tempuser; sudo passwd tempuser [03:15] Sorella: cypha: also, you can work on any file through network protocols (ssh, ftp, sftp) like local out of the box. [03:15] springmeyer has left the channel [03:15] russfrank: then delete it when they're done [03:15] cypha: just got tired of trying to learn it when I was alreayd tyring to learn linux in the first place, as well as python [03:16] cypha: i've just been using github to get help with any code [03:16] tmzt_: create an account for someone else/ [03:16] tmzt_: ? [03:17] towski has joined the channel [03:17] cypha: for ssh [03:17] Dmitrijus: cypha: well, personally, i would never give anyone any user on my computer (because of porn, mostly), but there are remote servers... [03:18] cypha: haha [03:18] cypha: i'm on a vm [03:18] cypha: so it's safe in that regard [03:18] cypha: i keep my porn o nmy host [03:18] Dmitrijus: nmy? [03:18] Dmitrijus: ah ok [03:18] Dmitrijus: :) [03:19] Dmitrijus: cypha: yeah, that is safe [03:19] tmzt_: what are you asking about? [03:19] Dmitrijus: you can also get a free (as in FREE) VM in amazon ec2 [03:19] tmzt_: you create a unix user, then set a password or add the user's key [03:19] swair_ has joined the channel [03:20] tmzt_: you can also use something like gitolite if you just need git, or whatever, then you don't need an account per user [03:21] cypha: Dmitrijus, free VM with amazon? [03:21] amigojapan has joined the channel [03:21] russfrank: free ec2 micro for a year i think [03:22] russfrank: http://aws.amazon.com/free/ [03:22] thedudewiththeth: correct, I just set one up myself [03:22] Dmitrijus: russfrank: it's only for a year? :( [03:22] russfrank: yeah [03:23] thedudewiththeth: after that it's normal pricing, which is pay what you use [03:23] Dmitrijus: mah happy days with amazon gonna end very soon [03:25] cypha: free for a year? [03:25] cypha: weak [03:25] cypha: like MS 360? [03:25] swair_ has joined the channel [03:25] cypha: i gotta stop signing up for temporary free shit [03:25] Dmitrijus: MS 360? [03:26] freewil has joined the channel [03:28] jakehow has joined the channel [03:29] cypha: Dmitrijus, yeah, maybe it's Office 360 [03:30] cypha: anyway, they won't stop emailing me now a couple times a week [03:30] cypha: i need to unsubscribe actually [03:30] swair_ has joined the channel [03:30] dshaw_ has joined the channel [03:33] diogogmt has joined the channel [03:33] k1ttty has joined the channel [03:36] swair_ has joined the channel [03:39] swair__ has joined the channel [03:41] swair__ has joined the channel [03:44] Nuck: ;~; having to use Firefox for debugging this [03:44] joshgillies has joined the channel [03:45] Nuck: All because of the way WebKit debugger interacts with jQuery's DOM wrapper [03:45] Nuck: If I log an object I want it to be logged in the current state [03:45] swair__ has joined the channel [03:45] schwab has joined the channel [03:47] stalled has joined the channel [03:48] tomlion_ has joined the channel [03:48] zackattack: hello [03:49] ThaddeusQuay: Any object would be thrilled to have its state logged by Chuck Norris. [03:51] swair has joined the channel [03:52] agnat has joined the channel [03:53] swair has joined the channel [03:53] akiva has joined the channel [03:54] wilmoore has joined the channel [03:56] swair has joined the channel [03:57] JaKWaC has joined the channel [03:57] wilmoore has joined the channel [03:57] ThaddeusQuay has left the channel [03:58] pauls_ has joined the channel [03:58] kab3wm has joined the channel [03:59] ThaddeusQuay has joined the channel [04:01] swair_ has joined the channel [04:04] maushu_ has joined the channel [04:05] MUILTFN has joined the channel [04:07] slifty_corsair has joined the channel [04:10] swair__ has joined the channel [04:12] swair has joined the channel [04:12] pauls_: hi all [04:12] silverwind has joined the channel [04:12] silverwind has joined the channel [04:13] maushu__ has joined the channel [04:13] cognominal has joined the channel [04:15] harthur has joined the channel [04:16] tbranyen: omg i'm using with statement [04:16] tbranyen: look at me [04:16] tbranyen: go [04:17] tbranyen: edgy as **** [04:18] swair has joined the channel [04:21] swair has joined the channel [04:24] JakeyChan: :D [04:24] Wa has joined the channel [04:24] ninjapig: guys what are .ejs files? [04:25] JakeyChan: the connect middleware program design pattern is interesting! [04:25] brianc has joined the channel [04:25] tmzt_: ninjapig: html with javascript code in them [04:25] tmzt_: that runs on the server [04:26] brianc has left the channel [04:26] ninjapig: so basically it's server-side, and used with node.js [04:26] JakeyChan: also can compile on client side [04:27] ninjapig: i've been given acess to a webapp i have to interpret and add onto i have to understand what does what [04:27] ninjapig: thanks [04:28] foooooo has joined the channel [04:28] pauls_: so, I've recently begun a new project that'll require a realtime node.js web framework that integrates sockets. socketstream looks awesome. any experiences? [04:31] pauls_: is socketstream ready to be used in production? [04:32] pauls_: https://github.com/socketstream/socketstream [04:34] tmzt_: I don't really like the global approach to the namesapce [04:34] tmzt_: it was a little confusing in that respect [04:35] fairwinds has joined the channel [04:36] delfick has joined the channel [04:37] kriszyp has joined the channel [04:38] delfick: Hi, is it possible to specify dependencies that should be installed with -g option in package.json? [04:38] Frippe has joined the channel [04:39] tmzt_: looks at npmjs.org [04:39] tmzt_: should have the answer there [04:39] matyr has joined the channel [04:40] wilmoore has joined the channel [04:41] tomlion has joined the channel [04:42] delfick: I looked there, but couldn't find anything specific to package.json [04:43] brianseeders has joined the channel [04:43] swair_ has joined the channel [04:45] swair__ has joined the channel [04:46] metellus has joined the channel [04:46] jacobolus has joined the channel [04:46] dhasenan_ has joined the channel [04:50] pizthewiz has joined the channel [04:50] yuwang has joined the channel [04:52] pauls_: should i learn coffee script instead of using javascript ? [04:53] pauls_: that is, is it worth the effort? [04:54] delfick has left the channel [04:56] pauls_: this is cool… http://js2coffee.org/ [04:56] hacksparrow has joined the channel [04:57] AvianFlu: pauls_: the "instead of" is the part of your sentence that's the bad part [04:57] AvianFlu: you don't just want to write something that turns into JS without knowing anything about js [04:57] AvianFlu: if you like coffeescript, though, by all means, have fun [04:58] pauls_: oh, i'm quite fluent in js.. just seen that it says there were pros & cons of coffeescript, but it was recommended here (http://addyosmani.com/blog/building-real-time-coffeescript-web-applications-with-socketstream/)… i see your point though! [05:03] hacksparrow has joined the channel [05:04] amigojapan has joined the channel [05:06] infynyxx has joined the channel [05:09] luke`_ has joined the channel [05:12] thalll has joined the channel [05:12] jedahan has joined the channel [05:12] jedahan has joined the channel [05:13] dexter_e has joined the channel [05:15] fangel has joined the channel [05:19] jtsnow has joined the channel [05:22] tomlion_ has joined the channel [05:25] dhasenan_ has joined the channel [05:27] tomlion has joined the channel [05:31] luke` has joined the channel [05:31] hacksparrow has joined the channel [05:32] stepheneb has joined the channel [05:42] jtsnow has joined the channel [05:46] hacksparrow has joined the channel [05:47] matyr has joined the channel [05:51] stagas has joined the channel [05:52] MUILTFN has joined the channel [05:53] vesln has joined the channel [05:55] __doc__ has joined the channel [05:56] lz has joined the channel [05:57] sdwrage has left the channel [06:06] dexter_e has joined the channel [06:08] ThaddeusQuay has left the channel [06:17] jedahan has joined the channel [06:19] JakeyChan: what's the node.js database that basic on file ? [06:21] JakeyChan: https://github.com/creationix/nstore [06:21] JakeyChan: this's look good, but doesn't released [06:21] luke` has joined the channel [06:25] jacobolus has joined the channel [06:25] Frippe has joined the channel [06:25] jesusabdullah: JakeyChan: What are you trying to do with a db? [06:25] jesusabdullah: JakeyChan: My intuition is to link you to http://github.com/nodejitsu/nconf [06:26] JakeyChan: I don't want to use mongodb or mysql, I just have simple document need to be installed [06:26] jesusabdullah: also, https://github.com/pkrumins/node-supermarket [06:26] k1ttty has joined the channel [06:27] jesusabdullah: also, JSON.parse(fs.readFile("path/to/conf.json").toString()) [06:28] ninjapig has joined the channel [06:29] JakeyChan: but the document maybe contains complex string, such as html or markdown syntax string [06:29] JakeyChan: or image link [06:30] JakeyChan: http://github.com/nodejitsu/nconf look like it wrong link :) [06:31] swair has joined the channel [06:31] kab3wm has joined the channel [06:39] versicolor has joined the channel [06:46] stagas has joined the channel [06:50] springmeyer has joined the channel [06:53] mytrile has joined the channel [06:53] swair_ has joined the channel [06:55] dreamdust has joined the channel [07:01] aliem has joined the channel [07:01] dexter_e has joined the channel [07:03] TheJH has joined the channel [07:03] synkro has joined the channel [07:05] edenli has joined the channel [07:10] edenli has left the channel [07:10] stalled has joined the channel [07:11] ScottH has joined the channel [07:12] meso has joined the channel [07:13] meso_ has joined the channel [07:17] meso has joined the channel [07:21] meso_ has joined the channel [07:26] TheJH has joined the channel [07:26] TheJH has joined the channel [07:26] swair__ has joined the channel [07:33] MrGoodbyte has joined the channel [07:40] joshgillies has joined the channel [07:40] stisti has joined the channel [07:41] TheJH: "Frankfurter Allgemeine Sonntagszeitung", a mainstream newspaper, has six pages full of disassembled governmental malware in it! [07:41] TheJH: ACTION happy [07:41] TheJH: with syntax-highlight [07:42] TheJH: font-size twice the normal one [07:42] stewabel has joined the channel [07:44] jetienne has joined the channel [07:47] stisti has joined the channel [07:47] swair__ has joined the channel [07:47] DrMcKay has joined the channel [07:48] NewCoder has joined the channel [07:48] gut4 has joined the channel [07:49] NewCoder: possible to run two nodeJS instances on one IP? (Starting the 2nd gives "EPIPE, Broken pipe".) [07:50] hacksparrow_ has joined the channel [07:50] ckknight: NewCoder: you probably want to use something like cluster [07:51] Lemon_BE has joined the channel [07:51] k1ttty has joined the channel [07:51] NewCoder: You are the second person to reccommend that. Thanks. But why do two NodeJS processes on same IP but different ports give that error? [07:52] DrMcKay: NewCoder: it shouldn't happen [07:53] NewCoder: Could it be a UNIX settings problem? [07:53] Daegalus: ckknight: are you the same ckknight from the Warhammer/WoW Addon community? [07:53] DrMcKay: NewCoder: not sure. are you running it on some VPS or hosting? [07:54] f0x has joined the channel [07:54] NewCoder: On the Joyent no.de free hosting service. [07:54] ckknight: Daegalus: sure am. Howdy, friend. [07:55] Daegalus: Nice, small world. Glad to see familiar names in other places [07:55] DrMcKay: NewCoder: then I'm not sure if you can open 2 ports at once... you would have to ask someone from joyent. [07:56] ckknight has joined the channel [07:57] NewCoder: DrMcKay Yeah, probably. I though my problem might be common knowledge that only I didn't know. [07:58] superjudge has joined the channel [08:00] CIA-48: node: 03Brian White 07 * reb40dcb 10/ doc/api/fs.markdown : [08:00] CIA-48: node: Fix typo for fs.write docs [08:00] CIA-48: node: Fixes #1843. - http://git.io/UgBwFQ [08:03] swair__ has joined the channel [08:04] SamuraiJack has joined the channel [08:06] cconstantine_ has joined the channel [08:07] hacksparrow has joined the channel [08:08] madsleejensen has joined the channel [08:08] ScottH has joined the channel [08:09] arcanis has joined the channel [08:09] langworthy has joined the channel [08:11] mAritz has joined the channel [08:11] hacksparrow has joined the channel [08:15] hacksparrow_ has joined the channel [08:18] MUILTFN has joined the channel [08:19] gut4 has joined the channel [08:21] langworthy has joined the channel [08:23] pgherveou has joined the channel [08:23] matyr has joined the channel [08:25] mraleph has joined the channel [08:28] yuwang has joined the channel [08:28] k1ttty has joined the channel [08:31] mike5w3c_ has joined the channel [08:36] __tosh has joined the channel [08:38] FireCat has joined the channel [08:44] stalled has joined the channel [08:46] aeo has joined the channel [08:49] `3rdEden has joined the channel [08:52] Manuel_ has joined the channel [08:53] blup has joined the channel [08:54] adambeynon has joined the channel [08:55] tdegrunt has joined the channel [08:57] stagas has joined the channel [08:57] cognominal_ has joined the channel [08:58] guidocalvano has joined the channel [09:00] cognominal___ has joined the channel [09:01] dexter_e has joined the channel [09:03] tomlion_ has joined the channel [09:04] McMAGIC--Copy has joined the channel [09:04] lmorchard has joined the channel [09:05] azeroth_ has joined the channel [09:05] pid_ has joined the channel [09:06] yuwang has joined the channel [09:06] Peniar has joined the channel [09:07] fmeyer has joined the channel [09:07] swair__ has joined the channel [09:10] yuwang has joined the channel [09:13] tomlion has joined the channel [09:15] matyr has joined the channel [09:17] thalll has joined the channel [09:19] skm has joined the channel [09:19] pid_ has joined the channel [09:20] bergie has joined the channel [09:23] MUILTFN has joined the channel [09:23] knifed has joined the channel [09:23] topaxi has joined the channel [09:29] m0: Is there a way to know the relative path of a require? I have my app.js in / and within /modules/ I want to require something in /secrets.json [09:29] m0: How would I do that [09:30] TheJH: m0, uhm, __dirname+'/modules/secrets.json' should work, I think [09:31] TheJH: !admin eval __dirname [09:31] jhbot: /usr/local/src/thejh/nodebot2/nodebot [09:31] icewhite has left the channel [09:31] m0: TheJH: secrets is in /secrets.json while the file that needs secrets.json is in /modules/authentication.js [09:31] icewhite has joined the channel [09:32] m0: __dirname gives you always "modules" how can we get relative to the /app.js which is the server [09:32] Margle has joined the channel [09:32] vesln: m0: require('../secrets.json') [09:32] vesln: or whateva [09:32] m0: .. doesn't work in node [09:32] yuwang has joined the channel [09:32] TheJH: m0, .. works [09:32] vesln: yup [09:32] vesln: it does [09:32] vesln: as far as I know at least [09:32] TheJH: it does [09:32] m0: 8|#gitolite ] [09:33] m0: EBADF: Bad file descriptor '../secret.json' [09:33] TheJH: !admin eval require("fs").readdirSync("..") [09:33] jhbot: nodebot [09:33] TheJH: !admin eval require("fs").readdirSync("../..") [09:33] jhbot: nodebot2 [09:33] TheJH: !admin eval require("fs").readdirSync("../../..") [09:33] jhbot: wizard,jesusabdullah,dford,michiel,robdr,thejh,fatjonny,christopherdebeer,frank,qlabs,nodejitsu,visnup [09:33] TheJH: m0, as you can see, it works [09:34] m0: What is wrong with this then? In /modules/authentication.js fs.readFileSync('../secrets.json', 'utf-8') [09:35] swair__ has joined the channel [09:35] m0: That returns Error: EBADF, Bad file descriptor '../secrets.json' [09:35] jbpros has joined the channel [09:36] icewhite has left the channel [09:36] TheJH: m0, as I said, use __dirname [09:37] TheJH: m0, or just do require('./secrets.json') if the current working directory is right [09:37] TheJH: (although that probably is a bad idea) [09:37] skm has joined the channel [09:37] Skola has joined the channel [09:37] JakeyChan has joined the channel [09:37] Skola: is there a decent syntax highlighting package for node? [09:38] m0: TheJH: my problem is very weird, the reason why I wanted to find the absolute path is that the __dirname is only working in my local directory and on my server it doesn't like it. [09:38] Skola: one that works well with escaped HTML characters? [09:38] m0: something must be wrong with the stack [09:38] adrianmg has joined the channel [09:39] m0: On my Ubuntu Server, Error: EBADF, Bad file descriptor './secrets.json' [09:41] simenbrekken has joined the channel [09:41] m0: TheJH: any if I do __dirname it does this Error: EBADF, Bad file descriptor '/var/www/test/modules/secrets.json' [09:42] TheJH: m0, are you sure that file is on the server? [09:42] k1ttty has joined the channel [09:42] m0: TheJH: yea, of course [09:43] cypha has left the channel [09:44] m0: I am going to check the stack linode script [09:45] m0: It is using a start script maybe it is messing witht eh paths [09:46] nimstr has joined the channel [09:46] jhbot has joined the channel [09:46] icewhite has joined the channel [09:47] adrianmg has left the channel [09:48] m0: Anything suspisous? http://pastebin.com/jtLmxJSm [09:49] m0: node server.js works but start node, doesn't. Maybe the way I am starting node [09:49] amiller has joined the channel [09:49] ckknight has joined the channel [09:49] Skola: is there a markdown parser for node that does not escape characters within code blocks? [09:50] ckknight has joined the channel [09:51] ninjapig: any private tutors who specialize in node.js? [09:51] ninjapig: lol [09:53] konobi: for corporate training? [09:54] m0: TheJH: aha, the way you start node differs for require paths. [09:55] ninjapig: lol [09:55] ninjapig: for personal training [09:55] ninjapig: i got the hello world up and running so that's progress [09:55] m0: TheJH: I am starting the script passing the complete paths. node /path/to/app.js, and that messed up the path if I do "./secret". Instead I did, cd /path/to/; node server.js, and it recognized it [09:56] konobi: there's the book... but that's probably your best option unless you can find a training day somewhere [09:57] gut4 has joined the channel [09:57] m0: That should be a bug. [09:57] konobi: pwd/cwd [09:58] FireCat has joined the channel [09:59] zastaph has joined the channel [09:59] m0: So how do we manage that in node.js ?/ [09:59] vampi-the-frog has joined the channel [10:00] m0: If I wanted to require a script from the previous directory if I run node from "node /path/to/server.js" differs the requires than "node server.js" [10:00] konobi: run the script from where you expect it to be run [10:00] konobi: yes... like all standard posix [10:01] konobi: "./secret", means use the file in ./ [10:01] konobi: ./ == cwd [10:01] m0: What is the best way to require files then in NodeJS [10:01] konobi: "./secret" is fine [10:01] m0: Clearly that doesn't work (from my examples above) [10:02] konobi: (cd /path/to; node server.js) worked though [10:02] m0: Yea, that worked, so what your saying is "always" cwd into the directory when running a server [10:03] m0: Sounds good, makes sense now, thanks [10:04] konobi: m0: there's also the NODE_PATH env variable... but there's really no reason not to just cwd [10:05] m0: konobi: yea, I don't mind cwd, I just didn't know that the start script caused my issue from that path issue starting node. [10:06] konobi: start script has nothing to do with it... if you ran it manually you'd get the same [10:06] ScottH has joined the channel [10:07] madsleejensen has joined the channel [10:08] k1ttty has joined the channel [10:09] hellp has joined the channel [10:11] arcanis has joined the channel [10:12] DennisRasmussen has joined the channel [10:12] max_dev has joined the channel [10:13] Xano has joined the channel [10:14] ph^ has joined the channel [10:14] TheJH_phone has joined the channel [10:16] swair__ has joined the channel [10:17] d0k has joined the channel [10:21] ninjapig: hey guys can anyone help me get a repo i pulled up and running? [10:21] ninjapig: i've already successfully compiled node and npm [10:21] ninjapig: i've been able to get a hello world app running with node [10:21] ninjapig: but i'm not able to get the repo up and running, any assistance would be greatly appreciated [10:22] ninjapig: https://github.com/hkumar/EE364D-Indoor-Navigation [10:22] ninjapig: i just want to know how to get the webapp set up [10:22] mraleph1 has joined the channel [10:23] DrMcKay: ninjapig: go to main directory, npm install && node server.js [10:24] markwubben has joined the channel [10:24] Wizek has joined the channel [10:24] max_dev has joined the channel [10:25] ninjapig: ACTION doing it now [10:25] m4rcs: can somebody help me with caolan's async library? Especially with the forEach function [10:26] DrMcKay: m4rcs: sup? [10:26] ninjapig: i'm guessing the main directory is not the same thing as root directory [10:27] m4rcs: what do pass to the iterator [10:27] DrMcKay: ninjapig: no, it's the directory with package.json [10:27] DrMcKay: m4rcs: iterator receives one item from array [10:27] ninjapig: hmm that should be the root directory actually [10:27] ninjapig: the root has the server.js and the package.json [10:27] DrMcKay: ninjapig: yes [10:28] ninjapig: i get the error cannot find module socket.io-client still [10:28] m4rcs: and the second parameter? [10:29] DrMcKay: m4rcs: ah, wait, I know what you mean [10:29] DrMcKay: m4rcs: first paramater is an array [10:29] DrMcKay: second is an iterator, it's a function which receives item from an array as a parameter [10:29] m4rcs: yes [10:30] m4rcs: the first parameter is the item and the second is a function [10:30] DrMcKay: also, iterator gets a callback as it's second parameter [10:30] DrMcKay: you have to call it like callback(error, result) [10:30] ninjapig: DrMcKay, googling helped i needed to npm install socket.io [10:30] DrMcKay: and third parameter is a callbakc [10:30] DrMcKay: *callback [10:31] madsleejensen has joined the channel [10:31] DrMcKay: it's executed when all items from array have been processed [10:31] DrMcKay: or wait, let me gist you some example code [10:32] m4rcs: this would be great [10:34] ckknight: hey, anyone have any recommendations for testing that could be run both in-client and server-side with node? This'd be for a library I'm writing that can work in both circumstances. [10:34] DrMcKay: ckknight: nodeunit [10:35] jomoho has joined the channel [10:35] ckknight: very shiny [10:35] liar has joined the channel [10:38] DrMcKay: m4rcs: https://gist.github.com/5ef130f9135962a1086e [10:38] DrMcKay: sorry, I was wrong about second parameter of callback [10:38] N0va` has joined the channel [10:39] m4rcs: and callback is just a function? [10:39] DrMcKay: m4rcs: if you would call a callback() (line 8) with some parameter, it would be printed out in line 11 [10:39] DrMcKay: m4rcs: yes [10:39] JakeyChan_ has joined the channel [10:42] ckknight: and it would prevent any further callbacks from being called, but does not necessarily run after all the callbacks are finished. [10:42] vampi-the-frog: hey guys can i run node.js on a PSP? [10:42] m4rcs: and there is no function that is called when every value is processed [10:43] markwubben has joined the channel [10:43] ckknight: m4rcs: that's the last callback. It's either run immediately when callback(err) is called, or called after they're all done. [10:45] ninjapig: DrMcKay why did i have to npm install socket.io? I see that there are several more modules in this repo, why wasn't i asked to install them all? [10:45] ninjapig: any idea? [10:46] DrMcKay: ninjapig: author forgot to include it in package.json, probably [10:47] NewCoder has joined the channel [10:50] ninjapig: ah now i'm getting a better idea of what a package.json does [10:51] NewCoder has left the channel [10:51] d0k has joined the channel [10:51] NewCoder has joined the channel [10:51] m4rcs: I still don't get the use of the callback function in the iterator [10:52] fly-away has joined the channel [10:52] DrMcKay: m4rcs: it's called when you stop processing an item from an array [10:52] DrMcKay: so, for example, let's say that this item is an URL [10:52] DrMcKay: and you want to GET it or whatever [10:52] DrMcKay: you call a callback when you finish your request [10:53] m4rcs: and where do I define this function [10:53] DrMcKay: this function is provided by async library [10:53] DrMcKay: your callback function is called when all callback functions have been already called [10:54] dexter_e has joined the channel [10:54] boehm has joined the channel [10:54] m4rcs: and the function has to be named callback? [10:54] DrMcKay: no, you can name it whatever you lik [10:55] DrMcKay: *liek [10:55] DrMcKay: **like [10:55] m4rcs: mom I paste my code [10:57] m4rcs: https://gist.github.com/1273553 that's what I'm having. With that I get "TypeError: undefined is not a function" [10:57] jetienne has joined the channel [10:58] DrMcKay: where do you get this error? [10:59] m4rcs: on line 16 [11:00] OmidRaha has joined the channel [11:00] OmidRaha has joined the channel [11:01] okuryu has joined the channel [11:02] DrMcKay: m4rcs: weird [11:02] JakeyChan: hi, [11:02] ninjapig: so is node.js going to become the go-to server scripting method in the near future? [11:02] JakeyChan: how to convert string into JSON object? JSON.stringify () ?? [11:03] Lingerance: Yes [11:03] JakeyChan: let me try again [11:04] m4rcs: DrMcKay yes [11:04] JakeyChan: str = {msg: 'hello world'} typeof JSON.stringify(str) == 'string'; strange .. [11:04] ckknight: JakeyChan: how is that strange? [11:05] JakeyChan: typeof should return object, should it ?? [11:05] ckknight: JSON.stringify turns an object into a JSON string, JSON.parse parses a JSON string, returning an object [11:05] Lingerance: You aren't even feeding it a string. [11:05] Lingerance: str is an object. [11:05] vampi-the-frog: typeof str == 'object' [11:05] rmzg has joined the channel [11:05] Lingerance: That should've actually thrown though, shouldn't it? [11:06] Lingerance: Err, nm [11:06] Lingerance: ACTION is still sleepy apparently [11:07] daglees has joined the channel [11:07] daglees has joined the channel [11:07] JakeyChan: ckknight: JSON.stringify return string , So I can not access the property like .property ? [11:07] ckknight: JakeyChan: JSON.parse is what you want [11:08] JakeyChan: ckknight: [11:08] madsleejensen has joined the channel [11:08] ckknight: v8> JSON.parse('{"alpha":"bravo"}').alpha [11:08] Lingerance: > JSON.parse('{"msg":"hello world"}').msg [11:08] Lingerance: 'hello world' [11:10] JakeyChan: the origin string is {msg: 'hello world'}, I should use JSON.stringify to convert it and then parse ?? [11:10] ckknight: no, just parse [11:10] ckknight: and that origin message is not JSON. [11:11] stagas has joined the channel [11:12] JakeyChan: to swear, it does't work at my computer :( [11:13] JakeyChan: node -v [11:13] JakeyChan: v0.4.10 [11:13] azeroth__ has joined the channel [11:13] mraleph has joined the channel [11:14] Lingerance: str = {msg: 'hello world'} // this is not a string. It's an object. [11:14] Lingerance: str = '{"msg":"hello world"}' // this is the JSON equivolent of the above string [11:14] Lingerance: above object* [11:16] asdfasdfa has joined the channel [11:17] schwab has joined the channel [11:17] skm has joined the channel [11:24] andi has joined the channel [11:24] else has joined the channel [11:25] andi: app.get('/img', connect.static(__dirname+'/static/img')) <- Can somebody tell me why this doesn't work in the connect router middleware? [11:25] tomlion_ has joined the channel [11:26] m4rcs: TheJH: you recommended the async lib, do you know how I exactly use the .forEach function? [11:27] Frippe has joined the channel [11:28] andi: Example: http://pastebin.com/xhQAwEib [11:32] jldbasa has joined the channel [11:32] bnoordhuis has joined the channel [11:33] Cromulent has joined the channel [11:36] meso has joined the channel [11:38] neurodrone has joined the channel [11:40] replore has joined the channel [11:40] replore_ has joined the channel [11:40] andi: It seems that there some flaws in the connect router middleware. [11:43] topaxi_ has joined the channel [11:44] `3rdEden has joined the channel [11:45] torsd has joined the channel [11:48] gkmngrgn has joined the channel [11:48] Epeli: What are the alternatives for supervisor in Node.js? [11:48] markwubben has joined the channel [11:53] TheJH: !npm info supervisor [11:53] jhbot: supervisor by Isaac Z. Schlueter, version 0.1.3: A supervisor program for running nodejs programs [11:54] TheJH: Epeli, for what purpose? Keep a program alife? [11:54] TheJH: *alive [11:54] Epeli: code reloading [11:54] `3rdEden: Doesn't it automatic reload? [11:54] Epeli: just silently fails on my app [11:55] TheJH: Epeli, reload? As in restart or as in hotswap? [11:55] Epeli: coffee server.coffee works just fine, but supervisor server.coffee just keeps restarting it. No error messages or what so ever [11:55] Epeli: restart is ok for my purposes [11:56] TheJH: Epeli, try coffee -cw and supervisor server.js [11:56] torsd has joined the channel [11:56] bzinger has joined the channel [11:56] guidocalvano: good morning everyone! [11:56] Epeli: TheJH: same issue [11:57] guidocalvano: today is a *good* day for science (: [11:57] guidocalvano: speaking of which [11:57] madsleejensen has joined the channel [11:57] guidocalvano: does anyone know how you can change the name of a prototype? [11:57] gkmngrgn has joined the channel [11:57] meso_ has joined the channel [11:58] guidocalvano: or more of how this naming takes place? [11:58] guidocalvano: I want to send marked up prototypes down the line (: [11:59] `3rdEden: Epeli you can always create your own :p, Watch all files in a dir, start up your node prog as a childprocess. And kill it & start it again on file change [11:59] shanebo has joined the channel [11:59] `3rdEden: thats like 20 LOC [11:59] Epeli: true [11:59] `3rdEden: there even a watch dir module somewhere [12:00] Epeli: but NIH is not always so fun :) [12:00] `3rdEden: maybe it was not invented before ;)? [12:02] topaxi has joined the channel [12:04] andi: For this I use cluster (which includes a good watcher) [12:04] Epeli: oh, really [12:04] Epeli: gotta look into it [12:04] `3rdEden: but does cluster support coffescript ;) [12:04] andi: Never start coffeescripts directly [12:04] andi: Better you compile it first [12:05] nforgerit has joined the channel [12:05] Epeli: I usually use a js wrapper [12:05] andi: cluster is not a command [12:12] saikat has joined the channel [12:12] tprice1 has joined the channel [12:14] madsleejensen has joined the channel [12:16] JakeyChan has joined the channel [12:17] wao: hm [12:18] wao: which one extension do you use for running node like daemon? [12:18] wao: in case of crash [12:18] DrMcKay: forever [12:18] wao: easy implementation? [12:18] DrMcKay: sure! [12:19] DrMcKay: and it has a sweet cli tool [12:19] wao: its uptodate? [12:19] DrMcKay: yeah :). [12:19] DrMcKay: https://github.com/indexzero/forever [12:21] davidbanham has joined the channel [12:24] andi: Isn't cluster as good as forever or what is the difference? (cluster revives workers) [12:25] DrMcKay: cluster was designed to utilize all CPU cores, iirc [12:25] DrMcKay: and forever just keeps things up [12:25] andi: OK, so you should combine them [12:26] topaxi has joined the channel [12:31] mraleph1 has joined the channel [12:31] hasenj has joined the channel [12:33] arcanis has joined the channel [12:34] k1ttty has joined the channel [12:37] aron_ has joined the channel [12:37] luke` has joined the channel [12:44] Skola has joined the channel [12:45] Wizek_ has joined the channel [12:45] Margle has joined the channel [12:51] grekko has joined the channel [12:58] Sorella has joined the channel [13:02] mraleph has joined the channel [13:02] topaxi has joined the channel [13:02] zmbmartin has joined the channel [13:03] talltyler has joined the channel [13:04] talltyler1 has joined the channel [13:05] hwinkel has joined the channel [13:08] augustl: when running tests where I create a Faye.Client, the process doesn't die. Probably a unclosed connection somewhere. Is there a generic way of debugging what's causing a process to stay alive? [13:11] _aron has joined the channel [13:13] hitana has joined the channel [13:13] Margle has joined the channel [13:14] EvRide has joined the channel [13:16] schwab has joined the channel [13:16] hitana has joined the channel [13:16] herbySk has joined the channel [13:18] TheJH_ has joined the channel [13:18] gmonnerat has joined the channel [13:18] gmonnerat has left the channel [13:19] Kami_ has joined the channel [13:20] hitana has joined the channel [13:20] stagas has joined the channel [13:21] stepheneb has joined the channel [13:23] talltyler has joined the channel [13:23] hitana has joined the channel [13:25] talltyler1 has joined the channel [13:25] jetienne: additionally cluster is from tj and he produces high quality work on a regular basis [13:26] jetienne: high quality as in small, single purpose, well documented, no dependancy [13:27] Ang3 has joined the channel [13:27] jbpros has joined the channel [13:27] Ang3: o/ [13:30] errordeveloper has joined the channel [13:34] dexter_e has joined the channel [13:36] enmand has joined the channel [13:37] kriszyp has joined the channel [13:37] Kami_ has joined the channel [13:40] cjm has joined the channel [13:42] stepheneb has joined the channel [13:43] isufy has joined the channel [13:44] eventualbuddha has joined the channel [13:44] whitman has joined the channel [13:46] guidocalvano has joined the channel [13:46] dubenstein has joined the channel [13:47] dubenstein has joined the channel [13:48] another_syrio has joined the channel [13:49] dubenstein has joined the channel [13:50] ag4ve has joined the channel [13:54] aron_ has joined the channel [13:55] dubenstein: l [13:56] stravid has joined the channel [14:01] nforgerit has joined the channel [14:02] avih has joined the channel [14:03] amigojapan has joined the channel [14:03] Fabryz has joined the channel [14:04] seyz has joined the channel [14:04] seyz: hi all [14:04] seyz: in a file, I've got 2 functions : exports.foo1 = function(...) and exports.foo2 = function(...) [14:04] seyz: how can I call foo2 inside foo1 please ? [14:05] TheJH: seyz, you'll have to use `exports.foo2()`, I think [14:05] errordeveloper has joined the channel [14:05] jtsnow has joined the channel [14:05] TheJH: seyz, I'd do it another way: first define the functions locally and then export them [14:06] TheJH: seyz, that way, you can use them without exports. [14:06] seyz: hmmm TheJH yeah why not [14:06] seyz: thanks TheJH [14:12] jtsnow has joined the channel [14:13] stepheneb has joined the channel [14:13] hitana has joined the channel [14:17] hitana has joined the channel [14:17] cjm has joined the channel [14:18] avih has joined the channel [14:20] hitana has joined the channel [14:22] CarterL has joined the channel [14:22] igl has joined the channel [14:23] hitana has joined the channel [14:27] hitana has joined the channel [14:27] jtsnow has joined the channel [14:27] maushu has joined the channel [14:30] hitana has joined the channel [14:31] bombworm has joined the channel [14:33] hitana has joined the channel [14:33] ag4ve has joined the channel [14:36] hitana has joined the channel [14:39] jetienne has joined the channel [14:41] JakeyChan has joined the channel [14:42] another_syrio has joined the channel [14:43] OmidRaha has left the channel [14:45] guidocalvano has joined the channel [14:46] rurufufuss has joined the channel [14:47] doctorm: What's the best way to add or subtract very large numbers? [14:48] ckknight: doctorm: more than what a float-64 can hold, you mean? [14:48] ckknight: I'd use a biginteger library. [14:48] doctorm: Yeah, it's only for one case. Let me count the digits [14:48] TheJH: doctorm, do you need integer-precision or is less ok? [14:48] stagas has joined the channel [14:49] TheJH: doctorm, e.g. are JS floats ok? [14:49] doctorm: I know in php you have to use bc. [14:49] doctorm: I'm not much of a math guy TheJH, can you explain the difference? It's not a float [14:49] doctorm: 76561197972140573 [14:49] ckknight: figure out how large you need, if you need precision over 2^53, you'll need to do some hackery [14:49] TheJH: doctorm, that should be ok [14:49] softdrink has joined the channel [14:49] TheJH: !admin eval var n=76561197972140573; n-1===n [14:49] jhbot: true [14:50] doctorm: Ok, I'll check it out, maybe I've been making a mountain out of a mole hill [14:50] ckknight: that's >2^56 [14:50] TheJH: hm, no [14:50] TheJH: doctorm, see, when you subtract one, it seems to be equal [14:50] TheJH: !admin eval var n=76561197972140573; n+1-1 [14:50] jhbot: 76561197972140580 [14:50] doctorm: Yeah, that's no good [14:50] TheJH: doctorm, it chenged by seven. does it have to be exact? [14:51] TheJH: *changed [14:51] doctorm: Yes, it absolutely has to be exact [14:51] TheJH: !npm search bigint [14:51] jhbot: package bigint: Arbitrary-precision integer arithmetic using libgmp [14:51] ckknight: doctorm: use a biginteger library. Or fake it by doing long addition yourself :P [14:51] TheJH: !npm info bigint [14:51] jhbot: bigint by James Halliday, version 0.3.6: Arbitrary-precision integer arithmetic using libgmp [14:51] robhawkes has joined the channel [14:51] TheJH: doctorm, try that one [14:51] doctorm: TheJH - Thanks! Will do. [14:51] doctorm: Was searching for the wrong terms. "Big numbers" didn't bring me there ;) [14:52] simenbrekken has joined the channel [14:52] TheJH: doctorm, well, big numbers work, it's just that they are inaccurate :D [14:52] doctorm: hahaha [14:53] TheJH: doctorm, they're called floats [14:53] TheJH: doctorm, if it has to be accurate, you need integers [14:53] gde33 has joined the channel [14:53] calliostro has joined the channel [14:54] doctorm: TheJH: Ok. The first 6 numbers almost never change, I'm thinking I might just get rid of them. It's for Steam ID's, they have two forms [14:54] shedinja_: When I do `npm install` it istalls the dev dependencies too. I thought it would only install those if I installed with the --dev flag? [14:54] sirdancealot has joined the channel [14:55] TheJH: shedinja_, what npm version? [14:55] shedinja_: TheJH: 1.0.25 [14:56] TheJH: shedinja_, is there anything about "dev" in "npm config list"? [14:56] doctorm: bigint won't install through npm :\ Not very vocal about why either. [14:56] doctorm: Ah nm, missing a lib dependency [14:57] Vennril has joined the channel [14:58] shedinja_: TheJH: no. I did `npm config ls -l` too and dev is set to false [14:58] TheJH: shedinja_, hmm, no idea then [15:00] djazz has joined the channel [15:00] bergelmir has joined the channel [15:00] bergelmir has joined the channel [15:02] superjudge has joined the channel [15:04] dexter_e has joined the channel [15:05] Venom_X has joined the channel [15:06] hitana has joined the channel [15:06] shanez_ has joined the channel [15:07] c4milo has joined the channel [15:09] hitana has joined the channel [15:10] topaxi has joined the channel [15:10] mynyml has joined the channel [15:11] maushu_ has joined the channel [15:11] ixti has joined the channel [15:11] maushu__ has joined the channel [15:12] hitana has joined the channel [15:13] bzinger has joined the channel [15:16] hitana has joined the channel [15:17] chance- has joined the channel [15:18] madsleejensen has joined the channel [15:20] slifty_corsair has joined the channel [15:21] hitana has joined the channel [15:21] guidocalvano: does anyone know how i can assign a prototype to an object áfter it is created? [15:21] guidocalvano: i.e. suppose I have var o = {} ; [15:22] guidocalvano: and some constructor function: function Bla() {} [15:22] guidocalvano: how can I make o become of type Bla? [15:24] DrMcKay: util.inherits(o, Bla) ? [15:24] jedahan has joined the channel [15:24] jedahan has joined the channel [15:24] aho has joined the channel [15:25] shedinja_: `npm help json` aays that the dev flag is turned on when I do npm link. so that might be it but dev appears false in the config [15:26] xerox: is there a node emacs mode [15:26] hitana has joined the channel [15:27] guidocalvano: but doesn't inherits do other stuff as well? [15:28] onre: xerox, there's espresso-mode for javascript, that's what i use [15:29] xerox: onre: I'll check that out [15:29] lz has joined the channel [15:29] Wizek has joined the channel [15:30] DrMcKay: guidocalvano: not sure. you could also do some weird stuff with __proto__ [15:30] slifty_corsair has joined the channel [15:32] hitana has joined the channel [15:32] guidocalvano: DrMcKay: tnx [15:32] Metal3d has joined the channel [15:32] guidocalvano: that did the trick [15:32] DrMcKay: :) [15:37] another_syrio has joined the channel [15:38] hernan has joined the channel [15:38] slifty_corsair has joined the channel [15:39] hitana has joined the channel [15:41] cjm has joined the channel [15:41] qbert has joined the channel [15:42] jbpros has joined the channel [15:42] qbert: I need to cluster my app , what's the most mature tech out there for this ? [15:42] akiva has joined the channel [15:42] hitana has joined the channel [15:42] TheJH: !@qbert npm info cluster [15:42] jhbot: qbert, cluster by TJ Holowaychuk, version 0.7.7: extensible multi-core server manager [15:43] TheJH: qbert, that one? :D [15:44] knifed has joined the channel [15:44] qbert: sweet [15:45] softdrink has joined the channel [15:45] Remoun has joined the channel [15:45] m4rcs: how can a call a function all x seconds? [15:46] nforgerit has joined the channel [15:46] hitana has joined the channel [15:46] Isaiah has joined the channel [15:47] qbert: setTimeout ? [15:48] dexter_e has joined the channel [15:48] qbert: TheJH, so - this looks like it clusters a bunch of workers on the same server [15:48] m4rcs: qbert: you mean this https://developer.mozilla.org/en/window.setTimeout [15:49] TheJH: qbert, I think so [15:49] hitana has joined the channel [15:49] qbert: m4rcs, yes [15:51] lv has joined the channel [15:52] hitana has joined the channel [15:55] hitana has joined the channel [15:56] k1ttty has joined the channel [16:00] ayaz has joined the channel [16:00] ayaz has joined the channel [16:00] hitana has joined the channel [16:02] robhawkes has joined the channel [16:02] jerrysv has joined the channel [16:05] m00p has joined the channel [16:06] hitana has joined the channel [16:07] chance- has joined the channel [16:11] hitana has joined the channel [16:12] level09 has joined the channel [16:12] m4rcs: Which cron extesion is the best [16:12] weepy has joined the channel [16:13] weepy: hello - does this sound right ? I have a child process - but if it throws an exception -- and hence exits -- I seem to lose the information on stderr/stdout. Is it possible to get this info ? [16:14] hitana has joined the channel [16:15] heavysixer has joined the channel [16:15] josephboyle1 has joined the channel [16:18] hitana has joined the channel [16:19] saesh has joined the channel [16:23] Wizek has joined the channel [16:23] hitana has joined the channel [16:24] lv: with this code setInterval(function(){ console.log('A');},2000); 'A' is displayed after every 2 sec. but when used with 'server' as in this code var http = require('http'); var server = http.createServer(function(req, res) { res.writeHead(200,{ 'Content-Type': 'text/plain' ,'connection': 'keep-alive'}); setInterval(function( ){res.write("A");},2000,res); res.end('B'); }); server.listen(8080); setInterval( ) is not workin [16:24] lv: with this code [16:25] lv: setInterval(function(){ [16:25] lv: console.log('A');},2000); [16:25] lv: 'A' is displayed after every 2 sec. [16:25] lv: but when used with 'server' as in this code [16:25] qbert: you can stop [16:26] qbert: you cant respond like that , you can only send one response - whats your end goal, to push out data to the client every 2 seconds ? [16:26] hitana has joined the channel [16:27] lv: yes [16:27] talltyler has joined the channel [16:28] qbert: I think websockets are your best bet, I like dnode but there others [16:28] devongovett has joined the channel [16:28] qbert: I've used dnode for pushing updates, be warned though it doesnt work in IE 6,7 or 8 [16:29] qbert: theres also nowjs, or socket.io [16:29] indutny: Hey node.js people! [16:29] indutny: Check this out: https://github.com/indutny/deadbolt [16:29] indutny: Your feedback will be very appreciated [16:30] hitana has joined the channel [16:30] pik has joined the channel [16:33] hitana has joined the channel [16:33] harthur has joined the channel [16:33] qbert: I need to cluster several machines running nodejs, is there something for node like this, or do I need another piece like nginx or something [16:34] itwars has joined the channel [16:34] wookiehangover: indutny: interesting repo / idea [16:35] DrMcKay: indutny: nice! [16:36] chance-: ? [16:36] chance-: bah, i missed it [16:36] hitana has joined the channel [16:36] lv: i w'll try with nowjs or socket.io thanks. [16:38] indutny: DrMcKay: wookiehangover: thanks [16:38] indutny: do you have any comments about API? [16:38] indutny: probably feature requests? [16:38] Me1000 has joined the channel [16:38] DrMcKay: indutny: not really, but I'll try to have some fun with it [16:39] indutny: DrMcKay: cool [16:39] indutny: thank you [16:39] cognominal has joined the channel [16:39] DrMcKay: indutny: hey, maybe make it hold locks across machines via hook.io? [16:39] hitana has joined the channel [16:39] indutny: DrMcKay: probably [16:40] groovebucket has joined the channel [16:40] indutny: DrMcKay: that'll be hook.io engine [16:40] indutny: DrMcKay: but I'll implement redis storage first [16:40] weepy: hello - does this sound right ? I have a child process - but if it throws an exception -- and hence exits -- I seem to lose the information on stderr/stdout. Is it possible to get this info ? [16:40] indutny: DrMcKay: does API itself looks good to you? [16:40] indutny: weepy: how are you running it? [16:40] DrMcKay: indutny: yes, it's nice (I love the chaining :) ) [16:40] indutny: weepy: .exec() or .spawn()? [16:41] weepy: .spawn i think [16:41] jtsnow has joined the channel [16:41] weepy: indutny: yes spawn [16:41] indutny: weepy: and child.stderr.on('data', function(data) {..}) doesn't emit anything for you? [16:42] djazz has left the channel [16:42] weepy: indutny: i do get stuff from stderr -- but the final exception code (I'm running Lua -- so there's normally some explanation of the exception before the process exits) [16:42] indutny: ah [16:42] weepy: ..... is missing [16:43] indutny: weepy: child.on('exit', function(code) {...}) should help you [16:43] indutny: I guess [16:43] mikl has joined the channel [16:43] indutny: weepy: http://nodejs.org/docs/v0.4.12/api/child_processes.html#event_exit_ [16:43] lz: anyone know why my authentication doesn't persist even though i'm using persistent memory-store for sessions? [16:43] weepy: indutny - i do get that message, but it doesn't typically have much information in it [16:43] hitana has joined the channel [16:43] lz: I'm using everyauth [16:43] indutny: weepy: so what are you expecting? :) [16:43] indutny: weepy: report to stderr all info from lua [16:43] indutny: weepy: or use exit code [16:44] indutny: weepy: you just don't have any other choices [16:44] indutny: AFAIK [16:44] weepy: hang on - i'll create a mini example of the code [16:44] indutny: k [16:44] lz: the sessions just get overwritten the next time the user visits the restarted server [16:45] indutny: lz: can you paste some code on https://gist.github.com/? [16:45] clickmoon has joined the channel [16:47] matyr has joined the channel [16:48] Labmonkey1 has joined the channel [16:48] lz: indutny, https://gist.github.com/1273901 [16:48] Labmonkey1: hi [16:48] weepy: indutny: acutally my tiny example seems to show it works ok lol [16:48] Venom_X has joined the channel [16:48] indutny: weepy: :) [16:48] hitana has joined the channel [16:49] Labmonkey1: Does node.js work with chrome 14's websockets (v10)? [16:49] lv has left the channel [16:49] `3rdEden: yes node.js works with that [16:49] towski has joined the channel [16:49] `3rdEden: ifyou write your own parser, or use a module like socket.io that works with it Labmonkey1 [16:50] Labmonkey1: Has anyone already done that? [16:50] Labmonkey1: I have been bashing my head on a java implementation for about 5 hours now, so I am looking for alternatives [16:51] lz: ah screw it [16:51] lz: im just going to use redis store [16:52] indutny: lz: hehe [16:52] indutny: ok [16:52] indutny: :) [16:52] temp01 has joined the channel [16:52] lz: indutny thanks :) [16:52] indutny: lz: np [16:53] topaxi has joined the channel [16:55] TheJH: Labmonkey1, try socket.io [16:55] TheJH: Labmonkey1, it even has automatic fallbacks in case websockets don't work [16:55] TheJH: Labmonkey1, flash sockets, long polling, ... [16:55] TheJH: !npm info socket.io [16:55] jhbot: socket.io by Guillermo Rauch, version 0.8.5: Real-time apps made cross-browser & easy with a WebSocket-like API [16:55] `3rdEden: !npm info socket.io-client [16:56] jhbot: socket.io-client by Guillermo Rauch, version 0.8.5: Socket.IO client for the browser and node.js [16:56] schwab has joined the channel [16:56] `3rdEden: ^-- is bundled in socket.io [16:56] Labmonkey1: TheJH: That sounds like what I want. Im a complete nodejs noob though. Where would I find that? [16:56] Labmonkey1: or an example using it [16:56] TheJH: Labmonkey1, do you have npm installed? [16:57] enmand has joined the channel [16:57] Lingerance: indutny: Do you have actual API docs for that somewhere? Regardless I'm going to try it out. [16:57] Labmonkey1: TheJH: no all I have is node.exe [16:57] Labmonkey1: on my windows server [16:57] TheJH: Labmonkey1, uh, windows? [16:57] TheJH: Labmonkey1, windows is kind of difficult [16:58] Labmonkey1: TheJH: my development computer is windows. I can technically use a linux server, but it's a pain [16:58] talltyler has joined the channel [16:59] Labmonkey1: TheJH: I can go switch this over to ubuntu I guess. I would have to install apache again. would you suggest that? [16:59] Labmonkey1: I am making a javascript rts game btw. I was trying to convert over my java server but it wasn't working. [16:59] TheJH: Labmonkey1, uhm, nodejs isn't really designed for working with apache [16:59] dingomanatee has joined the channel [17:00] AvianFlu has joined the channel [17:00] TheJH: Labmonkey1, actually, I think it should work [17:00] dingomanatee: I know this sounds stupid but - is there any way to get the current time from JavaScript without instantiating a date? [17:00] Labmonkey1: TheJH: well I mean I would have to install apache for the clientside [17:00] TheJH: Labmonkey1, how big is your java server? Do you think you could just change it to javascript? [17:00] imbadatnames has joined the channel [17:00] softdrink has joined the channel [17:00] Labmonkey1: dingomanatee: why can't you use a date? [17:01] TheJH: Labmonkey1, huh? why? node can deliver static files, too [17:01] Labmonkey1: TheJH: yea but I am using some php code in the client [17:01] dingomanatee: I'd like to not have to spawn off objects, use memory, etc. if all I want is an integral value. [17:01] whitman has joined the channel [17:01] TheJH: Labmonkey1, why php? just change everything to node :P [17:01] dingomanatee: Not a "Can't" -- a "would rather not" [17:01] imbadatnames: can someone take a look at http://pastebin.com/17Qt7R84, two files are pasted there, I can't seem to get 'front' in boot.js to be anything but undefined. any help would be appreceated. [17:02] Labmonkey1: TheJH: I am not rewriting my entire website in node.js lol [17:02] TheJH: Labmonkey1, ooh, but it's cool :( [17:02] Labmonkey1: TheJH: Unforunately, customers don't care if the server is running on something cool ;) [17:03] imbadatnames: sometimes they buy the hype. [17:03] imbadatnames: those are warm fuzzy times. [17:03] indutny: Lingerance: for what? deadbolt? [17:03] TheJH: imbadatnames, I think you forgot a "new" [17:03] Labmonkey1: Before I go do this though, I don't know that much about node.js other than it's a serverside implementation of v8 [17:04] Labmonkey1: Will I be able to run the backend of essentially an mmorpg with it? [17:04] imbadatnames: I've been trying dropping in new at the function def, at the exports and even before the require, but it is not showing me any love. [17:04] dingomanatee: imbadatnames: strip off the .js for the path [17:04] lz: dang, authentication session var is still volatile [17:04] lz: any tricks to making everyauth work across restart? [17:05] Lingerance: indutny: Yes [17:05] indutny: Lingerance: no API docs for now, but readme is quite comprehensive and covers most of cases [17:05] dingomanatee: if that doesn't work, likely a pathing issue. I would suggest doing a path check: var front_path './system/front' ; if (!require('path').existsSync(front_path)) throw new Error('there is no file at ' + front_path) [17:05] imbadatnames: now it's just require('./system/front') but still getting Cannot call method 'echo' of undefined [17:05] Labmonkey1: TheJH: Im gana go restart as ubuntu. Can you link me to the npm thing after I log back on? [17:05] indutny: Lingerance: you can take a look at source code, I tried to put description and documentation everywhere [17:06] TheJH: Labmonkey1, ok [17:06] imbadatnames: ok, I'll check around the path. [17:06] imbadatnames: thanks for the help :) [17:06] ayaz has joined the channel [17:06] Lingerance: Alright [17:06] jakehow has joined the channel [17:07] wbw72 has joined the channel [17:07] TooTallNate has joined the channel [17:07] alexh has joined the channel [17:12] lz: anyone know why sessions are being overwritten/user gets logged out on server reset? [17:12] patcito has joined the channel [17:12] Labmonkey1 has joined the channel [17:12] Labmonkey1: TheJH: ok im on buntu [17:12] TheJH: Labmonkey1, did you install anything node related yet? [17:12] Labmonkey1: TheJH: nope [17:13] lz has left the channel [17:13] TheJH: Labmonkey1, alright, first follow the instructions at https://github.com/joyent/node/wiki/Installation to install node and npm [17:13] lz has joined the channel [17:13] lz has left the channel [17:13] lz has joined the channel [17:14] chrislorenz has joined the channel [17:14] jetienne has joined the channel [17:17] liar has joined the channel [17:17] `3rdEden: dingomanatee it sounds me that you are doing premature optimzations, because doing a new Date() doesn't increase you memory with 1mb ;o [17:17] Labmonkey1: TheJH: its almost done compiling [17:18] Labmonkey1: at least i hope its almost done, this is taking awhile [17:18] `3rdEden: TheJH & Labmonkey1 WebSockets don't even work behind Apache. [17:18] Labmonkey1: '3rdEden: Im installing apache parallel to it [17:19] dingomanatee: `3rdEden - as it seems to be impossible, its also impossible to tell whether it is premature. :D [17:19] TheJH: `3rdEden, parallel websockets don't work because of SOP, right? [17:19] `3rdEden: SOP? [17:19] `3rdEden: !google SOP [17:19] `3rdEden: :( [17:20] Labmonkey1: '3rdEden: Nodejs and Apache arent touching eachother. I was just remarking that I have to reinstall apache on ubuntu because this is a web server [17:20] `3rdEden: ok. [17:24] Labmonkey1: npm wont install [17:25] temp01 has joined the channel [17:27] joshthecoder has joined the channel [17:28] TheJH: `3rdEden, same origin policy [17:29] Labmonkey1: TheJH: when trying to install npm it fails [17:29] TheJH: !@Labmonkey1 mem npm-install [17:29] jhbot: Labmonkey1, you can install npm by doing "curl http://npmjs.org/install.sh | sudo sh". If you don't feel comfortable piping data from http in a sudo'ed shell (which really isn't a good idea), you can also download it, look at it and then pipe it in the shell. [17:29] Labmonkey1: ah was missing the sudo [17:29] Labmonkey1: ok its installed. what now? [17:29] TheJH: Labmonkey1, isaacs is aganist it :D [17:29] paul0 has joined the channel [17:30] TheJH: Labmonkey1, now go into your project folder and do "npm instal socket.io". it will install socket.io into a subfolder named node_modules. [17:30] TheJH: Labmonkey1, after that, socket.io is usable in nodejs programs inside the project folder [17:30] Labmonkey1: make a new project folder? [17:30] TheJH: uhm, *install [17:30] TheJH: Labmonkey1, probably [17:31] Labmonkey1: just mkdir or do i have to use node for that? [17:31] TheJH: Labmonkey1, it's just a regular folder [17:31] TheJH: Labmonkey1, just mkdir [17:31] Labmonkey1: TheJH: ok did that [17:32] Skola has joined the channel [17:33] Labmonkey1: is there any example I can see of a nodejs websocket program? [17:33] TheJH: Labmonkey1, now go to https://github.com/LearnBoost/socket.io and scroll down to "Short recipes" [17:33] TheJH: Labmonkey1, above that, there's also an example of how the browser-side js has to look [17:34] ayaz has joined the channel [17:34] Labmonkey1: ok cool. This looks really good. Thank you [17:35] bk_ has joined the channel [17:35] Labmonkey1 has left the channel [17:36] saschagehlich has joined the channel [17:38] TomY has joined the channel [17:40] temp01 has joined the channel [17:42] harthur has joined the channel [17:43] neurodrone has joined the channel [17:44] gut4 has joined the channel [17:45] ksheurs has joined the channel [17:46] smathy has joined the channel [17:46] pgherveou has joined the channel [17:46] enmand has joined the channel [17:46] maletor has joined the channel [17:47] tomlion has joined the channel [17:47] bk_: I have a question about building c++ addons with waf. How do I specify the path to my library if it is not located in /usr/lib? Like with obj.include = 'path/to/include/dir' for header files. If I try to link the library with obj.lib = ['alpm'] I get an error "cannot find -lalpm" [17:49] spathi^ has joined the channel [17:51] slifty_corsair has joined the channel [17:51] stagas has joined the channel [17:52] DarkGrey has joined the channel [17:53] metellus has joined the channel [17:55] temp01 has joined the channel [17:56] langworthy has joined the channel [17:56] maletor has joined the channel [18:03] smathy has joined the channel [18:04] NetRoY has joined the channel [18:05] Poetro has joined the channel [18:06] Tigraine has joined the channel [18:06] smathy_ has joined the channel [18:06] AvianFlu: I feel old, please tell me someone else here has heard of novell netware [18:06] Lingerance: I have [18:06] AvianFlu: aight cool [18:06] lz: what's novell? [18:07] AvianFlu: [18:07] Lingerance: I used it when I was 12 (as a user) [18:07] AvianFlu: yeah I just told a story about hacking it when I was 14 [18:07] AvianFlu: same idea [18:07] AvianFlu: I bet we were both in school XD [18:07] Lingerance: <-- 24 [18:07] AvianFlu: 27 [18:07] AvianFlu: same idea [18:08] Xano has joined the channel [18:09] temp01 has joined the channel [18:10] Metal3d has joined the channel [18:10] errordeveloper has joined the channel [18:11] Wizek has joined the channel [18:13] sdwrage has joined the channel [18:14] Nuck: I'm watching the intro to databases things from Stanford [18:14] topaxi has joined the channel [18:14] Nuck: Relational algebra makes a lot more sense when a female neckbeard is explaining it [18:18] onre: ...what? [18:18] k1ttty has joined the channel [18:21] vns has joined the channel [18:21] Margle has joined the channel [18:23] Jarda has joined the channel [18:23] Jarda: hi [18:23] Jarda: I'm having problems with debian and npm [18:23] Jarda: seems a lot of packages are missing the actual module [18:23] Jarda: in example html package [18:23] Jarda: it seems to be installed [18:23] Jarda: but my programs die with "Cannot find module 'html'" [18:24] Jarda: and /home/myuser/.node_libraries/html just contains package.json.js [18:26] djbell has joined the channel [18:26] leahculver__ has joined the channel [18:26] metaverse has joined the channel [18:27] leahculver has joined the channel [18:27] jherdman has joined the channel [18:28] Jarda: hmm [18:28] Jarda: there actually might be a problem with my code also [18:28] Nuck: Jarda: .node_libaries? [18:28] Nuck: Should be /node_modules/ [18:28] Jarda: yeah I mistyped [18:29] tjholowaychuk has joined the channel [18:29] Jarda: hmm.. have to investigate my own code [18:30] stalled has joined the channel [18:30] langworthy has joined the channel [18:31] diamonddog has joined the channel [18:32] Jarda: it actualy is .node_libraries on debian [18:32] Nuck: o_O [18:33] Nuck: Jarda: Something's wrong then [18:33] Nuck: It's node_modules [18:33] Nuck: I know that for a fact because my VPS runs Debian Squeeze [18:33] AvianFlu: Jarda, node -v please? [18:34] Margle has joined the channel [18:35] Jarda: v0.4.12 [18:35] fly-away has joined the channel [18:35] Nuck: Jarda: npm -v? [18:35] Jarda: 0.2.19 [18:35] Nuck: oh [18:35] Nuck: That's why [18:35] Nuck: NPM is past 1.0 [18:36] Nuck: Jarda: Did yuou install via the curl method? [18:36] TheJH: !@Jarda mem npm-install [18:36] jhbot: Jarda, you can install npm by doing "curl http://npmjs.org/install.sh | sudo sh". If you don't feel comfortable piping data from http in a sudo'ed shell (which really isn't a good idea), you can also download it, look at it and then pipe it in the shell. [18:36] confoocious has joined the channel [18:36] Jarda: yeah, I have thi: http://packages.debian.org/sid/npm [18:37] Nuck: Jarda: I highly advise against using packages [18:37] TheJH: Jarda, uninstall the debian package [18:37] Nuck: They're generally out-of-date [18:37] Jarda: ok [18:37] TheJH: Jarda, it's HORRIBLY old [18:37] TheJH: Jarda, then reinstall with the curl method [18:38] Jarda: ok [18:38] Jarda: thanks [18:39] stagas has joined the channel [18:44] zemanel has joined the channel [18:44] Jarda: yeah it definitely helped [18:44] Jarda: thanks a lot [18:47] neekers has joined the channel [18:48] diamonddog has joined the channel [18:48] neekers: can someone please tell me why this little app increments counter by 2 every time i refresh the webpage? http://pastebin.com/0uUQem2x [18:48] neekers: it's 8 lines long [18:49] tjholowaychuk: neekers favicon [18:50] neekers: heh [18:50] tjholowaychuk: everyone ignores the favicon :) [18:50] jherdman has left the channel [18:50] darinc has joined the channel [18:50] neekers: how do i ignore it? [18:50] tjholowaychuk: check the url and respond [18:51] devongovett has joined the channel [18:51] Sami_ZzZ has joined the channel [18:51] xerox: maybe the express binary should add a default favicon :D [18:51] tjholowaychuk: yeah i probably should add connect.favicon() by default [18:51] tjholowaychuk: lots of people seem to get confused [18:52] tjholowaychuk: by favicons [18:53] neekers: i'm confused. :) [18:53] errordeveloper has joined the channel [18:57] neekers: tjholowaychuk: got it working. thank you [18:57] tjholowaychuk: np [18:59] hermanjunge: I've got this backup folder from mongo [18:59] hermanjunge: how do I import it? [18:59] hermanjunge: anybody? [19:00] xerox: try #mongodb [19:00] hermanjunge: :p [19:00] hermanjunge: tfn [19:01] nuba has joined the channel [19:01] TheJH: hermanjunge, better than if a bunch of mongo noobs tried to help you, no? [19:01] Sorella has joined the channel [19:01] `3rdEden: hermanjunge tax file number or thanks for nothing ;o? [19:01] hermanjunge: I prefer the bunch of noobs [19:01] hermanjunge: sometimes docs are too verbose [19:02] hermanjunge: tax file number of course 3rdEden [19:02] `3rdEden: thought so! [19:02] hermanjunge: I hate learning curves [19:02] hermanjunge: :D [19:02] nroot7 has joined the channel [19:02] TheJH: hermanjunge, you could try to write an import script with node, I'll look for mongo modules... [19:02] TheJH: !@hermanjunge npm search mongo [19:02] jhbot: hermanjunge, packages (short format, truncated): express-session-mongo, irclog, leaf, rest-mongo, mongous, mongoose-types, mongodb-provider, mongo-pool, mongodb-rest, mongoskin, mongodb_heroku, mongoose-helpers, csv2mongo, mongoose-joins, mongoose-closures, mongoose-crypt, mongoose-spatial, mongoose-temporal, mongoose-units, mongoose-misc [19:02] hermanjunge: for everything I try to get into, there's a lot of these doc files [19:03] TheJH: hermanjunge, do you still want help with mongo by me? :P [19:03] hermanjunge: jajajajaj [19:03] hermanjunge: no, sorry, I've got angry myself. Is that... an analogy, suppose you want an Icecream [19:04] hermanjunge: you know you have to pick up your keys, get out of your house, and walk to the store [19:04] nroot7: I just installed latest version of node and wrote a hello world with express but its not working. Its failing with this error "Cannot read property 'prototype' of undefined" [19:04] hermanjunge: ok, you start to do these things, and forgot or don't know the f**king command to grab the pair of keys [19:04] Brandon_R has joined the channel [19:04] smathy: The gazelle's are too fast. [19:04] Brandon_R: hey guys [19:04] tjholowaychuk: nroot7 are you using master? [19:05] tjholowaychuk: for express? if so, dont [19:05] hermanjunge: ok, you google it, and you find #keys ## keys are imported like keys -v -f -g -[arm hashNumber] [19:05] TheJH: nroot7, what is "node -v"? [19:05] hermanjunge: That's when shit start to run downhill [19:05] nroot7: I am using master for node (0.5.9) and express I installed using nom [19:05] nroot7: *npm [19:05] tjholowaychuk: hahha [19:05] xsyn1 has joined the channel [19:05] tjholowaychuk: nom nom [19:05] tjholowaychuk: hm [19:05] TheJH: nom nom :) [19:05] tjholowaychuk: well express supports 0.4.x [19:06] tjholowaychuk: that's odd if it's installing for 0.5.x [19:06] TheJH: nroot7, master isn't 0.5.9, it's 0.5.9-pre [19:06] sh1m has joined the channel [19:06] TheJH: nroot7, what does "node -v" say? [19:06] nroot7: TheJH: right [19:06] nroot7: TheJH: v0.5.9-pre [19:06] TheJH: nroot7, well, that's super-unstable. use 0.4.12 [19:07] TheJH: nroot7, if you really need newish features, use 0.5.9 [19:07] TheJH: nroot7, and if you want stuff to fail, use -pre [19:08] AvianFlu: if you're looking to help out and put your nose to the valgrindstone, though, enjoy the unstable version :) [19:09] Brandon_R: how many connections can nodejs handle? [19:09] Brandon_R: is there an easy way of scaling across multiple machines? [19:10] hermanjunge has left the channel [19:10] AvianFlu: Brandon_R, node processes are pretty cheap, you can definitely load-balance among several [19:11] AvianFlu: run one per core and spread your load out, you should do just fine [19:11] AvianFlu: and by the time you don't, you'll have the loot to hire people to study your problem better anyway [19:11] xsyn has joined the channel [19:11] Brandon_R: one per core? how can i ensure it starts on a new core and not a core with a node already running on it [19:11] AvianFlu: most OSes are decent at that stuff [19:12] AvianFlu: I'm just saying don't run 72 processes on a dual core and expect it to just scale [19:12] AvianFlu: that's more my point [19:12] Brandon_R: lol [19:12] Brandon_R: k [19:12] Brandon_R: how about across multiple machines? [19:12] Brandon_R: any known solutions for that yet [19:12] Brandon_R: cluster, multi-node [19:12] AvianFlu: load balancing and message passing? [19:13] thepatr1ck has joined the channel [19:13] Brandon_R: i'll have to read up on those [19:13] AvianFlu: I feel like that's a more general question than in just node [19:13] AvianFlu: it's always a question of how to best do that [19:13] hermanjunge has joined the channel [19:13] hermanjunge: FYI [19:14] AvianFlu: you could look at stuff like dnode and hook.io [19:14] Skola has joined the channel [19:14] hermanjunge: mongorestore --db MyDB --drop directory/to/MyDBBackup [19:14] Dmitrijus: Brandon_R: you can always have something complex on the top, like routing hacks to route connections to different machines :) [19:14] hermanjunge: :P [19:14] hermanjunge: `3rdEden Why the aposthrophe? [19:15] hermanjunge: you want people havin' a hard time trying to talk you? [19:15] hermanjunge: :D [19:15] kab3wm has joined the channel [19:16] `3rdEden: hermanjunge because you can start a nickname with a number in irc ;) [19:16] TheJH: `3rdEden, missing negation? [19:16] hermanjunge: I see [19:16] infynyxx has joined the channel [19:17] `3rdEden: and it's close to my pinky in the Mac, so easy to type here ;D [19:17] hermanjunge: It depends... [19:17] Margle has joined the channel [19:17] hermanjunge: .. on the locale you're using [19:17] `3rdEden: it's just as hard as writing a z [19:17] fbartho: What do I look at to find the format for the native half of an event emitter? [19:17] fbartho: i hear it used to be in node_events.h [19:18] xy has joined the channel [19:18] fbartho: but that was removed as far as I can find. [19:19] TheJH: fbartho, there were some threads about it on the mailing list [19:20] fbartho: recent member of that [19:20] fbartho: how would I track that down? [19:21] fbartho: I search for node EventEmitter native [19:21] fbartho: searched* [19:22] TheJH: fbartho, although I'm a C++ noob, this might help you: http://groups.google.com/group/nodejs/browse_thread/thread/ae6bc0e37e2edc39/27350731d18b3de6 [19:22] jbpros has joined the channel [19:22] fbartho: that looks like exactly what I need [19:23] cconstantine_ has joined the channel [19:23] fbartho: sounds painful as hell though. [19:23] fbartho: gah. [19:26] nimstr has joined the channel [19:26] aron_ has joined the channel [19:27] Spion has joined the channel [19:27] TheJH: fbartho, as isaacs mentioned, make lightweight bindings [19:27] fbartho: ? [19:28] TheJH: fbartho, I also did it that way when I had to write bindings. But just because I don't know C++ good enough :D [19:28] fbartho: for a FUSE filesystem, unfortunately, I'm not sure there is such a thing as a lightweight binding... [19:28] TheJH: hmm [19:28] TheJH: true [19:28] fbartho: pretty sure I need to expose: https://gist.github.com/459470 [19:29] fbartho: fuse low level io [19:29] fbartho: entirely in Node [19:29] fbartho: to make it useful [19:29] TheJH: true [19:30] fbartho: From there I can make abstractions that are easy to use on top of it [19:31] futini has joined the channel [19:32] futini: hi, how i can install a old version of module whit npm? [19:32] tjholowaychuk: futini npm info packagename [19:32] tjholowaychuk: should give you some more info [19:32] futini: the last version of faye gimme a error bad request on firefox [19:32] nimstr has joined the channel [19:32] futini: so, i want install a old version [19:33] futini: but i dont know how [19:33] futini: the last is 0.6.6 [19:33] infynyxx has joined the channel [19:33] futini: http://search.npmjs.org/#/faye here is the list of version [19:33] futini: but how is the command ?? [19:33] futini: please [19:34] TheJH: futini, type "npm help install" on the command line [19:34] qmx has joined the channel [19:34] TheJH: futini, that documentation says: `d) a @ that is published on the registry with (c)` [19:34] wookiehangover: npm install packagename@version [19:34] futini: aaaaaaaaa [19:34] futini: thanks!! [19:34] futini: :D [19:34] TheJH: !npm info faye [19:34] jhbot: faye by James Coglan, version 0.6.6: Simple pub/sub messaging for the web [19:35] TheJH: pub/sub messaging? [19:35] ScottH has joined the channel [19:35] m4rcs: where do i get cake? [19:36] johnwards has joined the channel [19:36] tjholowaychuk: makeeeee [19:36] tjholowaychuk: ftw [19:36] TheJH: m4rcs, "npm install -g coffee-script" [19:36] TheJH: tjholowaychuk, no, cakeeee!!!! [19:36] tjholowaychuk: nevavaaa [19:36] tjholowaychuk: https://gist.github.com/1207426 [19:36] tbranyen: jake [19:36] tjholowaychuk: bake! [19:37] tjholowaychuk: jk [19:37] tjholowaychuk: haha [19:37] tjholowaychuk: make<3 [19:37] m4rcs: thx TheJH [19:37] tbranyen: make does seem to do everything i need it to, haven't been sold on something like jake yet [19:37] tbranyen: i've used jake on two projects [19:37] tbranyen: only good thing about it i guess is if you have windows devs [19:37] tbranyen: it becomes platform agnostic [19:37] tjholowaychuk: yeah, certainly different use-cases but i've seen people copy files n crap with cakefiles [19:37] tjholowaychuk: which is just dumb [19:38] tbranyen: haha [19:38] tjholowaychuk: if it's really js logic you need [19:38] tjholowaychuk: then fine [19:38] tjholowaychuk: other than that it's just stupid [19:38] tbranyen: well either that or consistent [19:38] tbranyen: kind of lame to mix make and cake, no? [19:38] tjholowaychuk: for sure [19:38] tjholowaychuk: i'd sooner just add a target [19:38] gut4 has joined the channel [19:38] sergey_ has joined the channel [19:38] tjholowaychuk: that does [19:38] tjholowaychuk: ./scripts/myjstask [19:39] hermanjunge has left the channel [19:39] tbranyen: tjholowaychuk: https://github.com/tbranyen/vertebrae/blob/master/Makefile [19:39] tbranyen: heh [19:39] tbranyen: pretty much exactly that [19:40] tjholowaychuk: haha nice [19:40] tjholowaychuk: why watch? [19:40] tjholowaychuk: $ watch make [19:40] tjholowaychuk: $ watch --interval=1 make [19:40] tbranyen: https://github.com/tbranyen/vertebrae/blob/master/build/watch.js [19:40] tbranyen: ohhh [19:40] tbranyen: hmm [19:40] tbranyen: this actually monitors the fs tho [19:40] tjholowaychuk: meh [19:40] tjholowaychuk: overrated [19:41] langworthy has joined the channel [19:41] dnyy has joined the channel [19:41] tjholowaychuk: if your targets dont suck make wil do all that for you [19:41] tbranyen: pffft [19:41] langworthy has joined the channel [19:41] FireCat has joined the channel [19:41] tjholowaychuk: your case looks a little different [19:41] tbranyen: look at that monitor hotness [19:41] tjholowaychuk: but it makes me laugh when people use sass --watch and crap like that [19:41] tbranyen: because they should be using stylus? [19:41] tjholowaychuk: no [19:41] tjholowaychuk: because make will do that for you [19:42] tbranyen: i was being facetious!!! [19:42] towski has joined the channel [19:42] skiz has joined the channel [19:42] tbranyen: although the delay is rather bad [19:42] tbranyen: from the fs events [19:43] tbranyen: i'll save and have to wait a second or two before my shit is actually built [19:43] tbranyen: probably would be faster to just work off an interval [19:43] tjholowaychuk: yeah i dont really bother with stuff like that [19:43] tjholowaychuk: always in the term anyway [19:43] tjholowaychuk: hitting enter doesnt kill me [19:43] bingomanatee has joined the channel [19:44] monokrome has joined the channel [19:44] sdwrage has joined the channel [19:44] monokrome: How do people make Annotated Sources? [19:44] materialdesigner has joined the channel [19:44] monokrome: Is there a library that generates them? [19:45] tjholowaychuk: afaik you either have docco [19:45] tjholowaychuk: or [19:45] tjholowaychuk: https://github.com/visionmedia/dox [19:45] tjholowaychuk: which i just changed [19:45] tjholowaychuk: so it doesnt really generate the pages for you [19:45] tjholowaychuk: you can pass the data to a template [19:45] monokrome: That's better [19:46] tjholowaychuk: yeah i was getting sick of the crap theme i had going [19:46] monokrome: It just uses normal comments? [19:47] tjholowaychuk: they're markdown/jsdoc-ish [19:47] tjholowaychuk: augmented markdown [19:47] tjholowaychuk: Examples: [19:47] tjholowaychuk: is a title [19:47] tjholowaychuk: etc [19:47] tjholowaychuk: so it's clean in-source and generated, no weird-ass inline html or anything [19:47] tjholowaychuk: the docco style is kinda [19:47] tjholowaychuk: awkward [19:48] tjholowaychuk: though maybe you dont have to use // im not sure [19:49] smtlaissezfaire has joined the channel [19:49] saschagehlich has joined the channel [19:50] russfrank has joined the channel [19:51] slifty has joined the channel [19:51] lz has joined the channel [19:52] harthur has joined the channel [19:53] FireCat has joined the channel [19:56] johnwards has joined the channel [19:58] jetienne has joined the channel [19:58] stagas has joined the channel [19:59] socialhack has joined the channel [20:02] johnwards has joined the channel [20:05] stagas_ has joined the channel [20:05] mbrevoort has joined the channel [20:07] rjack has joined the channel [20:08] KaL has joined the channel [20:10] sh1m has joined the channel [20:11] N0va` has joined the channel [20:13] Tprice: what version of node uses dgram.createSocket('udp4').setBroadcast [20:13] Tprice: i keep getting "Error: not yet implemented" [20:14] phlff has joined the channel [20:14] phlff: rying to find example code of models being reused in node.js and dojo. Anyone have any links they can share? Google seems to have failed me. [20:15] slifty has joined the channel [20:15] CarterL has joined the channel [20:18] kab3wm has joined the channel [20:18] Spion has joined the channel [20:18] MUILTFN has joined the channel [20:18] maletor has joined the channel [20:24] johnwards has joined the channel [20:24] Tprice: any advice on setBroadcast? im running v0.5.9-pre [20:27] Wa has joined the channel [20:28] Casan has joined the channel [20:29] jetienne has joined the channel [20:30] clickmoon has joined the channel [20:31] TheJH: Tprice, v0.5.9-pre is unstable as hell. Use 0.4.x for stable, 0.5.x for unstable and -pre if you want stuff to break. [20:31] TheJH: !remember head v0.5.9-pre is unstable as hell. Use 0.4.x for stable, 0.5.x for unstable and -pre if you want stuff to break. [20:31] jhbot: saved definition of 'head' [20:31] TheJH: !mem head [20:31] jhbot: v0.5.9-pre is unstable as hell. Use 0.4.x for stable, 0.5.x for unstable and -pre if you want stuff to break. [20:31] TheJH: !remember head v0.5.x-pre is unstable as hell. Use 0.4.x for stable, 0.5.x for unstable and -pre if you want stuff to break. [20:31] jhbot: saved definition of 'head' [20:32] Daegalus: We need to inform the general rule of 0.4 is the stable branch, 0.5 i the dev unstable branch, once it goes stable, it will be versioned 0.6. So Evens are stable, odds are unstable [20:34] langworthy has joined the channel [20:36] g4 has joined the channel [20:38] errordeveloper has joined the channel [20:38] tj has joined the channel [20:39] Tprice: so thats the problem and not something other thing? [20:40] Tprice: i dont need to do anything to the socket before i call setBroadcast? [20:43] adriftatsea has joined the channel [20:49] cconstantine_ has joined the channel [20:49] Pupuser-1 has joined the channel [20:49] tdegrunt has joined the channel [20:50] Sorella has joined the channel [20:50] langworthy has joined the channel [20:53] stuf has joined the channel [20:53] stisti has joined the channel [20:53] Andeye has joined the channel [20:53] nimstr has joined the channel [20:55] Wizek has joined the channel [20:55] saschagehlich: `3rdEden: ping [20:55] joeytwiddle has joined the channel [20:55] `3rdEden: pong [20:55] `3rdEden: saschagehlich :) [20:55] saschagehlich: I might have asked you that already [20:56] saschagehlich: but is there a way to use the new websocket standard with .6? [20:56] `3rdEden: write a compatiblity layer [20:56] `3rdEden: or port the parsers [20:56] `3rdEden: :p [20:56] saschagehlich: any document on the changes? [20:56] `3rdEden: yes [20:57] `3rdEden: https://github.com/LearnBoost/Socket.IO/wiki/Migrating-0.6-to-0.7+ [20:57] shanebo has joined the channel [20:58] saschagehlich: erm [20:58] saschagehlich: :D [20:58] saschagehlich: I mean this new websocket standard that is not supported by 0.6 and causes websockets not to work [20:58] `3rdEden: OH [20:59] `3rdEden: but why not just migrate to 0.8 [20:59] saschagehlich: because my API users are using the 0.6 protocol [20:59] `3rdEden: 0.6 reached it's end of live [20:59] saschagehlich: I can't migrate from one day to another, I'd have to have 2 live systems [20:59] saschagehlich: one running 0.6, one running 0.8 [21:00] `3rdEden: saschagehlich as for the changes in the websockets I would have to redirect your to websocket specs [21:00] `3rdEden: because it's a complete change from draft 75/76 to hybi drafts [21:01] `3rdEden: other encoding, other handshakes, ping pongs etc [21:01] saschagehlich: did you implement it yourself for 0.7 and higher or did you use an out-of-the-box solution? [21:01] `3rdEden: we implemented it our selfs for 0.7 [21:01] saschagehlich: oh dear [21:01] saschagehlich: then I'll just have to migrate [21:01] `3rdEden: 0.8.5 supports draft 75, 76 hybi 06 - 12 & hybi 16 [21:02] saschagehlich: (which I really want to do but my api users don't let me :D) [21:02] `3rdEden: just write a compatiblity layer [21:02] `3rdEden: it shouldn't take more lthen like 50 LOC [21:02] DennisRas has joined the channel [21:02] `3rdEden: to use 0.8 with a 0.6 api [21:02] saschagehlich: hmm [21:03] saschagehlich: good idea but then I'll need to have closer look at the api [21:03] saschagehlich: but I wanted to do that anyways so that's the solution I guess [21:03] `3rdEden: ACTION points to the migration guide [21:03] `3rdEden: saschagehlich are you porting the backend or front end api? [21:03] saschagehlich: back end [21:04] `3rdEden: the only difference there is [21:04] `3rdEden: is that you do io.sockets.on(connection) [21:04] `3rdEden: instead of io.on('connect' [21:04] `3rdEden: the rest is all the same [21:04] spathi^ has joined the channel [21:04] `3rdEden: except for a session id :$ [21:04] saschagehlich: hmmm [21:04] `3rdEden: and other hacked up internals that you might use [21:04] kmwallio has joined the channel [21:04] saschagehlich: I'll have a look at it tomorrow [21:05] saschagehlich: I'm doing vacation in the netherlands atm so i need a lot of sleep :D [21:06] `3rdEden: =p [21:06] `3rdEden: kinda funny that I went to vaction in germany, and you come here for your vaction saschagehlich ;p [21:06] saschagehlich: wat :D where have you been to in germany? [21:06] mehlah has joined the channel [21:06] `3rdEden: I went to winterberg [21:07] saschagehlich: aah [21:07] saschagehlich: skiing :) [21:07] avalanche123 has joined the channel [21:07] `3rdEden: saschagehlich there was no snow ;p [21:08] Wizek-other has joined the channel [21:08] gruwl has joined the channel [21:08] kerigan has joined the channel [21:08] saschagehlich: yeah but in winter that's a great place to go skiing and stuff [21:08] `3rdEden: yeh thats true [21:08] kerigan: hello, I'm someone know how to convert a Mongo _id to string? [21:09] saschagehlich: kerigan: have you tried obj._id.toString() [21:10] saschagehlich: gotta go, byebye. I'll tell you how it goes tomorrow `3rdEden :) thx again [21:10] saschagehlich: bb [21:11] ixti has joined the channel [21:12] diamonddog has joined the channel [21:12] gruwl has joined the channel [21:13] hunterloftis has joined the channel [21:13] davidbanham has joined the channel [21:16] MUILTFN has joined the channel [21:16] matyr has joined the channel [21:18] Net_RoY has joined the channel [21:20] blup has joined the channel [21:24] digman543 has joined the channel [21:25] janiczek has joined the channel [21:25] warreng has joined the channel [21:26] warreng: what's the preferred mysql driver these days? [21:29] simenbrekken has joined the channel [21:34] liar has joined the channel [21:34] saikat has joined the channel [21:36] isaacs has joined the channel [21:36] janiczek has joined the channel [21:36] Brandon_R has joined the channel [21:36] Brandon_R: hello [21:37] Brandon_R: what's up guys [21:37] AvianFlu: fog, mostly [21:37] AvianFlu: at least from here [21:38] Brandon_R: what you guys working on? [21:39] Brandon_R: any cool projects? [21:40] Me1000 has joined the channel [21:40] joshkehn has joined the channel [21:42] metellus has joined the channel [21:42] Net_RoY has joined the channel [21:43] janiczek has left the channel [21:43] aeo has joined the channel [21:43] skampler has joined the channel [21:43] brianloveswords has joined the channel [21:44] Wizek-other has joined the channel [21:44] joshgillies has joined the channel [21:44] Brandon_R: anyone here [21:45] k1ttty has joined the channel [21:46] Lingerance: Yes [21:46] jhbot: Brandon_R, no, nobody [21:47] Brandon_R: :( [21:47] jhbot: Brandon_R, Lingerance is just an evil ghost, don't listen to him [21:47] nroot7 has joined the channel [21:47] Andeye has joined the channel [21:47] stuf has joined the channel [21:48] Fabryz has left the channel [21:48] piscisaureus has joined the channel [21:48] Brandon_R: you guys working on anything coolio> [21:50] Net_RoY has joined the channel [21:54] jhbot: Brandon_R, world domination. MUHAHA!!! [21:55] Brandon_R: lolwut [21:55] sub_pop has joined the channel [21:55] Brandon_R: is that the name of the project [21:55] espressive has joined the channel [21:56] espressive: Hey all, how is the progress on the Windows native build of Node.js? I see there is a node.exe but it is in the unstable branch, how unstable is it ;) [21:57] twirp has joined the channel [21:57] TheJH: espressive, you can write http servers in it and they work - didn't try more [21:58] Bonuspunk: depends on what you are trying to accomplish [21:58] Brandon_R: i won't recomment it be used for production [21:58] Brandon_R: if you want to test it out then go ahead [21:58] espressive: but for development on a local machine it is stable enough? [21:58] Brandon_R: yeah [21:58] espressive: Wow, okay that is awesome news, will give it a ry [21:58] maushu has joined the channel [21:58] espressive: try [21:58] Brandon_R: does express work on windows [21:58] Brandon_R: the bin [21:59] espressive: Brandon_R If you are asking me, I have no idea [21:59] espressive: I run Node on Cygwin still [21:59] AvianFlu: today is vim day for me [22:00] AvianFlu: I got tired of not being enough of a gangster [22:00] Brandon_R: since all it does it make files and folders, there shouldn't be any huge dependencies porting it to windows right? [22:00] AvianFlu: Brandon_R, the win32api is a serious, serious beast [22:00] AvianFlu: they're mostly done with the work of porting stuff to windows [22:00] AvianFlu: but it's a HUGE undertaking [22:00] AvianFlu: nothing is guaranteed to "just work" in that transition [22:01] Brandon_R: wait [22:01] Brandon_R: since express is written in node it should work [22:01] stagas has joined the channel [22:01] Brandon_R: in .6 [22:01] Brandon_R: when the win api is fully supported [22:01] AvianFlu: express is written for .4 [22:01] Brandon_R: yep [22:01] AvianFlu: it will need to be upgraded, since there were api changes [22:01] topaxi has joined the channel [22:02] ScottH has joined the channel [22:09] bnoordhuis has joined the channel [22:10] langworthy has joined the channel [22:11] parshap has joined the channel [22:12] davidbanham has joined the channel [22:12] cjheath has joined the channel [22:14] ironlad has joined the channel [22:14] fbartho: What is the proper procedure for expressing licenses for modules for node? [22:15] fbartho: say I want to release my module code under BSD, is that a problem? Do I have to list all the licenses that node requires? [22:15] Brandon_R: idk [22:15] dhasenan_ has joined the channel [22:15] ironlad has left the channel [22:15] Brandon_R: i usually see MIT licenses being the norm [22:16] hunterloftis_ has joined the channel [22:18] Grognardian has joined the channel [22:19] AvianFlu: fbartho, MIT is very common, but just post your license clearly and it's cool [22:20] AvianFlu: it's your software, after all [22:20] slifty has joined the channel [22:20] AvianFlu: look into the licenses your deps are using, too [22:20] AvianFlu: there are sometimes conflicts [22:20] fbartho: yeah [22:20] fbartho: That's a bit about what I was wondering [22:20] tbranyen: thats why you invent everything inhouse [22:20] AvianFlu: MIT is very permissive [22:20] AvianFlu: you can combine my MIT licensed stuff with anything you want [22:20] fbartho: I'm looking at doing a module that provides FUSE bindings in Node [22:20] AvianFlu: GPL, though, not always the case [22:21] fbartho: one of the FUSE filesystems is under GPL [22:21] AvianFlu: do some googling [22:21] fbartho: but I know that's not a general constraint. [22:21] AvianFlu: I've read that the MIT license is GPL compatible [22:21] fbartho: and just linking to FUSE shouldn't incur a license dependency [22:21] fbartho: and viceversa for node [22:21] AvianFlu: right [22:21] fbartho: but I'm less familiar for node [22:21] fbartho: hence the question [22:22] AvianFlu: node is MIT licensed, it doesn't care what other licenses you use [22:22] fbartho: The answer you guys gave me is that MIT is the norm for node modules. [22:22] fbartho: That's good for me [22:22] Lorentz: I think you can use MIT code in GPL, but no GPL code in MIT without tainting it? [22:22] Lorentz: I'm not a lawyer though [22:23] Lorentz: you might want to seek one out and ask professionally, if it matters enough. [22:23] Nuck: So, I'm trying to abuse `find` into excluding /node_modules/ folders [22:23] AvianFlu: I bet you could email like, the EFF, and get a good answer [22:23] Nuck: Anyone know how to do this? [22:23] AvianFlu: Nuck look into regex more than you have, you can make a negatively-matching regex [22:24] Nuck: AvianFlu: I know Regexes [22:24] AvianFlu: so use one with a ! [22:24] AvianFlu: it'll match on everything that isn't whatever it is [22:24] Nuck: I just don't know how to apply one to the path with `find` [22:24] Nuck: That's the issue [22:24] AvianFlu: I'm pretty sure you can pass it regex [22:24] Nuck: (I also don't know what I'm matching *against*) [22:25] Nuck: Am I matching the full absolute path? Relative? Just directory name? [22:25] funkyHat8: your mom? [22:25] AvianFlu: yeah what you're passing to find *is* an RE [22:25] AvianFlu: if you do find / you're absolute [22:25] Nuck: hmmm [22:25] Nuck: AvianFlu: ah thanks [22:26] AaronMT has joined the channel [22:27] ninjapig has joined the channel [22:27] Nuck: find . -name '*.js' | xargs wc -l [22:27] Nuck: That isn't a regex :S [22:27] Nuck: ACTION sighs and rereads the man page [22:28] AvianFlu: I see PATTERN all over the --help [22:28] Metal3d has joined the channel [22:29] AvianFlu: so you just have to pick the right flags [22:29] mbrevoor_ has joined the channel [22:29] dhasenan_ has joined the channel [22:31] danjam has joined the channel [22:33] MUILTFN has joined the channel [22:35] Labmonkey1 has joined the channel [22:36] Labmonkey1: TheJH: Hey im the guy from awhile ago. Just wanted to let you know that after I installed everything on ubuntu, I transferred it over to my windows computer and its working here. TY :D [22:36] dherman has joined the channel [22:39] k1ttty has joined the channel [22:44] Harzilein has joined the channel [22:44] Harzilein: hi [22:44] joshkehn: Hi [22:45] russfrank: hi [22:45] Labmonkey1: hi [22:46] Harzilein: i wrote this with jsdom: http://paste.debian.net/135329/ [22:46] mbrevoort has joined the channel [22:46] TheJH: Labmonkey1, :) [22:46] Harzilein: it works, but it bugs me that i still retrieve an external jquery [22:46] Harzilein: but i don't get how the npm provided jquery works [22:46] webjay has joined the channel [22:46] webjay: Is there any way to check wether the db connection is live? [22:48] Harzilein: any pointers? the readme for node-jquery on github only covers html in strings [22:51] another_syrio has joined the channel [22:53] brianseeders has joined the channel [22:53] fbartho: What exactly is the magic that node-waf does? Do I have to build node addons with node-waf? or can I build them standalone and link them in after the fact? [22:55] pizthewiz has joined the channel [22:56] fbartho: The reason I ask is that Node has that system and Fuse has it's own crazy configure script, and if I want to make a single binary that plugs into both, I have no idea how to make the Makefile let alone the underlying details. [22:56] skiz has joined the channel [22:57] danjam has joined the channel [22:57] random123 has joined the channel [22:59] fonger has joined the channel [23:00] fonger: hiyo, got a question on socket.io if it's cool to ask that here [23:00] Lingerance: Harzilein: I just wget the jquery file to the same dir as my script and have it include that. [23:00] dhasenan_: fonger, take your socket.io and...um...block on it? [23:01] snarfy has joined the channel [23:01] dhasenan_: No, I've disgraced myself. [23:01] fonger: :P [23:01] dhasenan_: You have thus won, by default, the right to ask your question. [23:01] phlff has joined the channel [23:01] fonger: excellent! i have an object that owns a socket, and i want to pass a "this" reference to a socket.on() callback [23:01] fonger: not sure on the correct way to do that [23:02] dhasenan_: Some libraries have explicit options for passing a context object. [23:02] fbartho: .bind(this); [23:02] dhasenan_: Oh, right, node.js doesn't suck as much as browsers :P [23:03] fonger: ahh, so i should be looking up bind() [23:03] fonger: kinda new to JS scope rules - thanks for the tip, will give that a shot [23:04] eboyjr: Is anyone having problems with error handline in the repl? I can't use it to reliably test code if thrown errors do weird things like only break out of loops or a single function... [23:04] eboyjr: error handling* [23:05] eboyjr: I'm using v0.4.10 [23:06] nerdy has joined the channel [23:06] eboyjr: I'll upgrade to unstable, it looks like there are a bunch of repl fixes [23:07] silntbob has joined the channel [23:08] Deegie has joined the channel [23:08] fonger: thanks for the help guys, the .bind(this) is what I as after :) [23:08] cjm has joined the channel [23:09] silntbob: question, what is Node.js? [23:09] tbranyen: Googleable [23:10] russfrank: silntbob: http://yuilibrary.com/theater/ryan-dahl/dahl-node/ [23:11] enmand has joined the channel [23:11] silntbob: russfrank, amazing! thanks [23:12] tomlion has joined the channel [23:18] Sorella has joined the channel [23:20] webjay: Is there any way to check wether an asynchronous process is active? [23:20] freewil has joined the channel [23:22] russfrank: webjay: i'm not sure i understand the question, could you clarify? [23:22] davidbanham has joined the channel [23:23] jacobolus has joined the channel [23:23] webjay: russfrank: from within node I'd like to check every 5 seconds if an asynchronous function is running? [23:23] issackelly_ has joined the channel [23:23] webjay: and if not close the db [23:23] webjay: it's for a shell job [23:24] jacobolus has joined the channel [23:25] russfrank: webjay: why not just have a callback function for when your 'asynchronous function' has completed [23:25] webjay: I have lots of them [23:26] russfrank: so use an async sugar library like https://github.com/caolan/async [23:27] russfrank: you may find async.parallel useful [23:28] webjay: every function call would need one then? [23:30] freewil: with async.parallel you basically pass in an array of functions to be called, each one of those functions calls a callback when done, then when all the callbacks have been called, async.parallel() calls one more callback so you know they have all been completed [23:31] russfrank: yeah, or an object, which i think is a little neater [23:32] te-brian has joined the channel [23:32] webjay: wouldn't work in my case as each function can take different paths [23:32] russfrank: i don't know what you mean by that.. [23:32] pyrotechnick has joined the channel [23:32] webjay: :) excuse my bad english [23:34] Labmonkey1 has left the channel [23:35] jtsnow has joined the channel [23:37] errordeveloper has joined the channel [23:39] sam350 has joined the channel [23:39] jtsnow_ has joined the channel [23:40] jtsnow_ has joined the channel [23:42] sh1mmer: ryah: you around? [23:43] ninjapig has joined the channel [23:43] skm has joined the channel [23:44] Aria has joined the channel [23:47] captain_morgan has joined the channel [23:48] rchavik has joined the channel [23:51] secoif has joined the channel [23:51] iammerrick has joined the channel [23:52] Me1000 has joined the channel [23:54] ag4ve has joined the channel [23:54] JakeyChan has joined the channel [23:55] AvianFlu: webjay: mutex them. http://github.com/AvianFlu/ncp may give you an idea what I mean [23:55] AvianFlu: https://github.com/AvianFlu/ncp/blob/master/lib/ncp.js [23:55] AvianFlu: that's how you'd do that kind of thing by hand [23:57] warreng: what's the best way to deploy node.js to production servers as a daemon? (start, stop, deploy new code and restart, init.d stuff for reboot, etc) [23:58] Aria: I write an init script and makefile actually, and make install. but I'm a bit oldschool. [23:58] tbranyen: old school like an old fool