[00:00] synesp: I'm trying to make a connection to the sock and I'm getting a permission denied error.. which makes sense since I'm tryign to connect under a different username that the sock was created from [00:02] hipsterslapfight has joined the channel [00:02] synesp: probably just use File System's chown after the socket is created, huh? [00:03] Es0teric has joined the channel [00:03] perezd has joined the channel [00:06] diogogmt has joined the channel [00:08] konobi: synesp: proces.umask [00:08] zackattack: SubStack: are you there [00:08] zackattack: i need a solution for IE7 testing [00:08] zackattack: should i use testling or browserling [00:11] methym has joined the channel [00:11] Vespakoen has joined the channel [00:13] Poetro_ has joined the channel [00:13] synesp: konobi: that works too thanks [00:15] Poetro_ has joined the channel [00:16] githogori has joined the channel [00:16] brainss has joined the channel [00:16] ryancnelson has left the channel [00:17] SubStack: zackattack: what are you trying to do? [00:18] zackattack: test ie7 integration [00:18] SubStack: specifically [00:18] zackattack: that means i need to click on a fb connect, fill out my login info, click on a few buttons once it refreshes [00:18] bkaney has joined the channel [00:18] SubStack: just once, you can use browserling for that [00:18] zackattack: automated. [00:19] SubStack: that particular case is very difficult in testling right now [00:19] zackattack: will support be introduced eventually [00:20] zackattack: add that if u want to get rich. ha [00:20] murvin has joined the channel [00:21] davemo has joined the channel [00:21] murvin: anyone knows how to send out http.request with both cacert and cert? e.g. in curl, i do this: curl --cacert sfasfa.crt --cert bbbbb.crt how to do in the 'options ' part of https? [00:22] enjalot has joined the channel [00:23] bnoordhuis: murvin: options = {ca:cacert, cert:cert} [00:23] bnoordhuis: murvin: you'd pass that to https.request() [00:23] murvin: is it the options = https.Agent(options), right? [00:23] murvin: coz i don't see cacert in the documentation.. :) [00:24] bnoordhuis: murvin: it's called ca [00:24] whaley has joined the channel [00:24] murvin: Oh [00:24] murvin: that one [00:24] murvin: ok. thanks. :) [00:24] bnoordhuis: btw, it's probably best to indeed create a new agent instance [00:24] bnoordhuis: there's a bug in the global agent when it comes to https [00:24] Cheery: I guess I'd need to store something into a database, and perhaps files. [00:25] murvin: but if I create a new agent, [00:25] Cheery: I wonder how to handle postgres in node.js [00:25] murvin: does it create a new connection pool? [00:25] mikeal has joined the channel [00:25] bnoordhuis: murvin: yes [00:26] murvin: so.is that mean new connection will not benefit from the connection pool? because everytiem it will create its own pool [00:26] githogori has joined the channel [00:27] Cheery: hmm.. node-postgres must do. [00:27] springmeyer has joined the channel [00:27] murvin: and for optimization, instead of doign this: cert: fs.readFileSync('test/fixtures/keys/agent2-cert.pem') everytime, I jsut save the file content, and pass the content to cert: that will work right? [00:28] bnoordhuis: murvin: actually, forget what i said - i'm not sure if that bug still exists [00:28] murvin: hmm hmm [00:29] murvin: bnoordhuis: but the bug you talk about is the GlobalAgent, what if I create custom agent? do you know if I should create only one agent, or create everytime? [00:30] zackattack: SubStack: if you dont add that browserling will be eaten by mogotest.com [00:31] bnoordhuis: murvin: https://github.com/joyent/node/issues/2558 <- that's the bug [00:32] cjm has joined the channel [00:33] koo5 has joined the channel [00:35] synesp has left the channel [00:35] SubStack: zackattack: from their listed features I don't see any sort of interactive component [00:35] zackattack: yea but its automated [00:35] zackattack: can be triggered by jenkins ci [00:35] SubStack: it looks like you just give it urls [00:35] SubStack: so I don't see how it would help with your use case [00:35] Poetro has joined the channel [00:35] zackattack: i could give it a cookie [00:36] SubStack: but when you test a facebook login you're testing a whole end-to-end process [00:37] localhost has joined the channel [00:37] RobWC1 has joined the channel [00:38] dylang has joined the channel [00:39] RLa has joined the channel [00:39] murvin: bnoordhuis: so as long as I'm using the same cert for everycall, i m ok... [00:39] RobWC1 has left the channel [00:39] bnoordhuis: murvin: yes [00:40] murvin: thansk. [00:40] murvin: let me try it out first [00:41] agnat_ has joined the channel [00:41] Witnes5 has joined the channel [00:44] k1ttty has joined the channel [00:44] chrisumbel has joined the channel [00:44] alm0nd has joined the channel [00:47] bkaney has joined the channel [00:48] Druid_ has joined the channel [00:48] rauchg has joined the channel [00:49] zackattack has joined the channel [00:53] PsiliPharm has joined the channel [00:53] k1ttty_ has joined the channel [00:53] simpleirc has joined the channel [00:53] jacobolus has joined the channel [00:53] chjj has joined the channel [00:55] fmeyer has joined the channel [00:59] brianthecoder has joined the channel [01:00] philips has joined the channel [01:00] tlack has joined the channel [01:02] blueadept has joined the channel [01:04] bartt has joined the channel [01:05] arduix has joined the channel [01:09] EhevuTov has joined the channel [01:11] pendlepa1ts has joined the channel [01:13] zackattack has joined the channel [01:13] postwait has joined the channel [01:16] igl1 has joined the channel [01:17] fmeyer has joined the channel [01:17] subbyyy has joined the channel [01:21] hartley231 has joined the channel [01:22] maletor has joined the channel [01:23] nicholasf has joined the channel [01:24] langworthy has joined the channel [01:26] k1ttty has joined the channel [01:26] tlack has left the channel [01:26] tlack has joined the channel [01:27] criswell has joined the channel [01:28] arduix has joined the channel [01:28] cjm has joined the channel [01:28] markq: socket.io question [01:28] markq: anyone here [01:30] MitchW: ACTION uses socket.io [01:30] MitchW: not sure how much I can help though, I only do very basic stuff [01:31] markq: I'm trying to make socket.io work with redis sessions and have it validate if there is a cookie etc [01:31] jzacsh has joined the channel [01:31] jzacsh has joined the channel [01:31] markq: I'm looking for some general guide or tutirual for that [01:31] markq: tutorial* [01:31] markq: I'm not sure how socket.io plays along with use sessions so... [01:31] markq: user* [01:31] MitchW: not being remotely familiar with redis, I definitely can't help lol :P [01:32] markq: it's the same as memorystore [01:32] markq: connect-redis [01:32] markq: the exposed api is the same [01:32] markq: just a different store [01:32] markq: mainly because it's faster/better for production [01:34] heavysixer has joined the channel [01:34] devaholic has joined the channel [01:37] westg has joined the channel [01:38] karterk has joined the channel [01:39] chrisumbel has joined the channel [01:39] maletor has joined the channel [01:40] ningu has joined the channel [01:40] brianleroux has joined the channel [01:42] Poetro has joined the channel [01:42] huggies has joined the channel [01:48] alex_burke has joined the channel [01:48] mediaupstream has joined the channel [01:50] fmeyer has joined the channel [01:53] arlink has joined the channel [01:53] arlink: whats the difference between nowjs and socket.io? [01:53] skm has joined the channel [01:55] cleanguy45_ has joined the channel [01:56] infynyxx has joined the channel [01:57] Ned_ has joined the channel [01:59] hzin has joined the channel [02:01] rauchg has joined the channel [02:01] cleanguy45_: anybody here who have done something similar to peer to peer file transfers using nodejs ? [02:12] HacDan has joined the channel [02:12] adamkittelson has joined the channel [02:13] ramitos has joined the channel [02:13] descipher has joined the channel [02:13] fomatin has joined the channel [02:14] tylerstalder has joined the channel [02:14] arnorhs has joined the channel [02:15] timoxley has joined the channel [02:17] hgg has joined the channel [02:18] devaholic has joined the channel [02:19] argami has joined the channel [02:20] phantomcircuit has joined the channel [02:21] hotsnoj has joined the channel [02:26] Wizek has joined the channel [02:26] Es0teric has joined the channel [02:26] synesp has joined the channel [02:27] synesp: so how does one go about scaling a node application listening on port 80? how can we launch more processes (or child processes) to handle the workload? [02:27] Es0teric has left the channel [02:27] franciscallo has joined the channel [02:27] nikubhai has joined the channel [02:27] synesp: - to take advantage of a machine's resources and then to scale on over to 2, 3, 4, ... 20 machines? [02:28] nikubhai: which works better with nodejs: mongodb or couchedb? [02:28] orlandovftw has joined the channel [02:29] lazyshot has joined the channel [02:30] automata has joined the channel [02:33] Nodegenie has joined the channel [02:34] thetristan has joined the channel [02:34] conner has joined the channel [02:35] westg: mongodb is more widely used [02:35] westg: you can run node on port 80 [02:35] westg: you can use cluster to spawn multiple worker processes on the same machine and haproxy to scale out to other servers [02:36] Nodegenie: If a node.js socket.io server can handle 900/messages a section from 9 clients, is it safe to say it can handle a total of 40 messages a second from 40 clients? [02:37] Nodegenie: Sorry, 900 messages/second [02:37] UnCO has joined the channel [02:38] TheAlphaNerd has joined the channel [02:38] descipher has joined the channel [02:38] breck has joined the channel [02:38] c4milo1 has joined the channel [02:39] cleanguy45_: nodegenie isnt it the other way round? [02:39] cleanguy45_: if it can handle 40msgs/second from 40 clients [02:39] cleanguy45_: can it handle 900msgs/second from 900 clients [02:40] Nodegenie: cleanguy45_: You can't go in the other direction? [02:40] westg: node can handle tens of thousands of connections per second [02:40] westg: there's no need to worry [02:40] westg: when people talk about "scaling" [02:40] westg: it usually means TONS of people are on their website [02:41] westg: like hundreds of thousands of simultaneous connections [02:41] westg: or that's what is supposed to be used for [02:41] Nodegenie: My socket.io chat server is handling 900 messages/second from 9 clients, but I'm wondering if that means it will be able to handle the real-life scenario in production: 40 or more clients with far fewer messages per second [02:41] cleanguy45_: yeah [02:42] westg: having said that you should be running node in a cluster on a single machine for production at the minimum [02:42] cleanguy45_: is it possible and efficient to build a peer to peer network on nodejs ? [02:42] westg: it would be very efficient actually [02:42] westg: idk if there is a module that makes it easy to do that though [02:42] westg: wait p2p? [02:42] cleanguy45_: yeah [02:42] Nodegenie: westg: I'm going to be using a single node.js instance (process) for my chat server. [02:42] westg: as in just distributing torrent files? [02:43] cleanguy45_: something like that [02:43] cleanguy45_: for file transfer [02:43] westg: nginx would serve that purpose better [02:43] westg: if you're just serving couple kb sized files [02:43] westg: or if you want to serve the actualy file [02:43] westg: then basically you want to make a file sharing website [02:44] westg: and there are a few modules that handle that pretty well in node [02:44] westg: but you can serve small static files with node pretty efficiently too [02:44] synesp: westg: so lets say im running cluster and running a bunch of node instances across multiple cores and life is dandy [02:44] synesp: but im wanting to add another box to the mix [02:44] synesp: haproxy? [02:44] cleanguy45_: cool ! [02:44] cleanguy45_: thanks westg [02:45] cjm has joined the channel [02:45] bnoguchi has joined the channel [02:47] sreeix has joined the channel [02:48] westg: yep haproxy [02:48] westg: or node-proxy works too aparently but I haven't tried it [02:48] synesp: what about throwing a load balancer in front of 2-3 machines with cluster [02:49] westg: you mean like the cloud's load balancer? [02:49] synesp: yea [02:49] synesp: would that even work [02:49] eventualbuddha has joined the channel [02:49] synesp: I'm a developer, not a systems admin, so excuse my newbness [02:49] westg: yeah that might work too [02:49] westg: well [02:49] westg: I'm not a pro at load balancing either so I would probably use the cp tool as well [02:50] synesp: I haven't really deployed high scale apps before.. the most I deal with is about 1mil requests per day right now [02:50] lohkey has joined the channel [02:50] synesp: but its increasing quickly, so that's why I'm exploring [02:50] westg: I'm on rackspace and I've heard they have a great load balancer so that's probabaly a good choice [02:50] westg: are you on rackspace? [02:50] synesp: no, Linode [02:50] synesp: we have a bunch of small VPSs right now [02:50] synesp: we're looking at rackspace though [02:51] westg: yeah [02:52] synesp: so quesiton about node/javascript. is there a way I can setup an event/listener to check if an array is not empty? [02:53] synesp: right now I'm using an interval and simply clearing it when I find it's not empty, but is there a better way? [02:54] tilgovi has joined the channel [02:56] PyramidHe has joined the channel [02:57] fmeyer has joined the channel [02:59] timoxley has joined the channel [02:59] arlink has joined the channel [02:59] arlink: whats the difference between socket.io and nowjs? [02:59] ningu: arlink: socket.io is more popular [02:59] ovaillancourt has joined the channel [03:00] PsiliPharm has joined the channel [03:00] ningu: westg: so haproxy is better than running a node app behind nginx, I suppose? [03:00] ningu: or maybe just different use cases [03:01] ningu: synesp: I don't think events are emitted when an array is modified... [03:04] ParadoxQuine has joined the channel [03:05] fomatin has joined the channel [03:05] breck has joined the channel [03:06] rodyhaddad_ has joined the channel [03:06] Startuper has joined the channel [03:07] estebistec has joined the channel [03:07] benvie: there are ways this could be done [03:08] blueadept has joined the channel [03:08] blueadept has joined the channel [03:08] penguins has joined the channel [03:08] benvie: you can define the array's length an accessor [03:08] benvie: which will be called even when it's modified internally [03:09] benvie: or if you're feeling adventurous you could using proxies and make a proxy array [03:11] benvie: er I guess you can't change the length property to an accessor with a real array [03:11] benvie: basically you're going to need to fake some parts of it to make it happen [03:11] benvie: but it can be done [03:12] penguins: looking for a CTO for a startup in the hospitality industry. equity/founder position on the table. please PM me for more details [03:13] sandfox has joined the channel [03:14] justfielding has joined the channel [03:15] thetristan has left the channel [03:19] dshaw_1 has joined the channel [03:19] synesp: benvie: should I just stick to an interval timer [03:19] synesp: and just check with that? [03:19] synesp: is that *OK*? [03:20] benvie: I would guess there's a better solution than all of the above [03:20] benvie: the timer isn't really ideal usually [03:20] benvie: like what causes the array to be modified? [03:21] benvie: basically it's kind of like looking at a symptom instead of a cause. You may be looking at the right thing, this isn't to say this is never the right idea [03:21] benvie: but it likely can be done better [03:22] benvie: you can also do pretty well making something that inherits from Array.prototype these days [03:22] benvie: it used to suck but it's not too bad now [03:23] benvie: and in that you could make length an accessor [03:23] benvie: let me try this real quick [03:23] KingInky has joined the channel [03:24] synesp: benvie: well here's the situation. I have 3 http requests happening and I'm taking their responses, massaging the data a bit and then filling up this array with the data from each request [03:24] synesp: so I'm basically waiting around until one of the http responses is complete (we don't know which one it will be) but when that happens, I want to perform an action [03:24] TooTallNate has joined the channel [03:25] benvie: oh perfect place for an event emitter [03:25] synesp: that's what I'm thinking - but where do I place this? in the http request itself/after im done preparing the data from the http response? [03:25] benvie: let's see [03:26] benvie: moment [03:26] infynyxx has joined the channel [03:26] synesp: the thing is that once ONE out of ANY of the http requests complete, I don't care about the others if they finish or not.. so it's sort of a first come, only you get served situation [03:26] joshthecoder has joined the channel [03:27] dylang has joined the channel [03:27] benvie: EventEmitter conveniently has an "once" function [03:27] benvie: which removes the listener after the first time it goes [03:27] dr0id has joined the channel [03:27] dr0id has joined the channel [03:28] benvie: so what you need is a basic emitter representing a request [03:28] synesp: awesome [03:28] benvie: let me put a super basic example up here [03:28] syntaxiko has joined the channel [03:29] synesp: benvie: oh no need to man, I just like to discuss things and get some input [03:29] synesp: I don't look for code haha :) [03:29] benvie: well anyway the super basic gist of it is [03:29] ningu: can you turn any object into an event emitter? [03:29] benvie: yeah [03:30] ningu: or do you have to make an event emitter first and then extend it? [03:30] benvie: if it doesn't have a useful __proto__ [03:30] benvie: like it's just x = {} [03:30] benvie: you can just x = Object.create(require('events').EventEmitter.prototype) [03:30] benvie: so it's like object++ EventEmitter [03:30] benvie: then you can do [03:30] benvie: x.emit('finished', theData) [03:31] benvie: or with multiples you can do [03:31] ningu: hmm, ok [03:31] benvie: function Request(){}; require('util').inherits(Request, require('events').EventEmitter); [03:31] benvie: then x = new Request [03:31] benvie: then you can do [03:31] ningu: I didn't know about the util.inherits stuff [03:31] benvie: Request.prototype.on('finished', callback) [03:31] ningu: actually, I've seen it, but didn't know how to use it [03:31] benvie: and it'll then alert you when ANY request emits [03:32] benvie: instead of having to listen to a specific one [03:32] gozala has joined the channel [03:32] benvie: that code is fully functional too [03:32] benvie: those 4 lines [03:32] benvie: so for any requrst you just do someRequest.emit('finished', data) [03:33] benvie: for you're use case you'd do Request.prototype.once('finished', callback) [03:33] ningu: ok, but what if I want to use an existing thing that isn't an EventEmitter -- can I just do that inherits line and not mess the object up? [03:33] Poetro has joined the channel [03:33] benvie: no it replaces a function's prototype [03:33] benvie: in that case there's some options [03:33] benvie: first off, does the object's existing [[prototype]] matter? [03:33] benvie: like it's some specific thing [03:34] benvie: or is it just a plain object made from like {} [03:35] ningu: I meant something with functions on its prototype, but that wasn't designed as an event emitter -- so you might want to extend it an turn it into one [03:35] benvie: anyway if it's something you can't rip out the existing [[prototype]] from [03:35] benvie: yeah ok so an option is this [03:35] ningu: I don't actually need to do this btw, at the moment, but I'm trying to think of how to make use of this pattern where appropriate [03:36] ningu: this pattern = event emitter pattern [03:36] benvie: Object.keys(process.EventEmitter.prototype).forEach(function(key){yourObject[key] = process.EventEmitter.prototype[key] }) [03:36] benvie: just basically copying all the functions over [03:36] benvie: or you can just do the ones you need too [03:37] benvie: EventEmitter's functionality is designed such that it can work almost anywhere [03:37] benvie: it's intentionally portable [03:37] spion has joined the channel [03:37] fomatin has joined the channel [03:37] benvie: checking to see what the minimal requirement is for it to work right [03:38] benvie: ok so you basically just need at minimum [03:39] synesp: whoa, letme read this [03:40] benvie: from EventEmitter.prototype, 'on', 'emit', 'removeListener', 'once' [03:40] benvie: copied to any object [03:40] benvie: and it'll work [03:40] ningu: hmm, cool [03:42] benvie: the only other functions it has are setMaxListeners, removeAllListeners, listeners [03:43] benvie: and they aren't required [03:43] benvie: and the constructor is an empty function [03:45] mehlah has joined the channel [03:49] Destos has joined the channel [03:51] mehale has left the channel [03:52] karterk has joined the channel [03:52] salva has joined the channel [03:54] Vennril2 has joined the channel [03:56] gavin_huang has joined the channel [03:59] yaymukund has joined the channel [04:02] patcito has joined the channel [04:04] Poetro has joined the channel [04:04] jerrysv has joined the channel [04:05] brainss has joined the channel [04:06] Ryan1 has joined the channel [04:08] arlink: i have a script here /usr/lib/node_modules and i want tell it the location of this folder /home/ubuntu/discoverpost/node_modules/jade . how can i do that? [04:08] KingInky has joined the channel [04:08] rurufufuss has joined the channel [04:09] penguins: looking for a developer to help me execute an idea. please pm me [04:10] cjm has joined the channel [04:13] synesp: benvie: thanks for the ideas man [04:13] synesp: appreciate it [04:16] nicholasf has joined the channel [04:19] devongovett has joined the channel [04:19] cconstantine_ has joined the channel [04:19] cconstantine_: hey all [04:20] synesp: hello sir [04:21] lrvick has joined the channel [04:21] alexmcpherson has joined the channel [04:21] cconstantine_: so, I'm attempting to use socket.io. I have 'var socket = io.connect('http://localhost/'); working (ie, it emits a 'connect'), but I caa't seem to get namespaces to work [04:22] \mSg has joined the channel [04:23] fmeyer has joined the channel [04:23] chadskidmore has joined the channel [04:23] cconstantine_: does the server need to do anything to let a client listen in different namespaces? [04:28] synesp has left the channel [04:33] benvie: no prob synesp =D [04:34] benvie: I have lots of good ideas and some shitty ones https://github.com/Benvie [04:35] benvie: trying to figure out whether proxy objects that look like regular objects but write to a buffer is a good or bad idea [04:35] seebees1 has left the channel [04:37] petschm_ has joined the channel [04:38] isao has joined the channel [04:39] deoxxa has joined the channel [04:41] benvie: var Pixel = reify('Pixel', { x: 'Uint32', y: 'Uint32', color: { r: 'Uint8', g: 'Uint8', b: 'Uint8' } }); [04:41] benvie: var red = Pixel({ x: 100, y: 100, color: { r: 255, g: 0, b: 0 } }); [04:41] benvie: and then red looks like a regular object but when you do unwrap(red) [04:42] benvie: unwrap(red)._data = [04:48] halfhalo has joined the channel [04:49] breck has joined the channel [04:58] disappearedng: Anyone here can advise me about testing without encountering race conditions [04:58] onar_ has joined the channel [05:00] arduix has joined the channel [05:02] devongovett has joined the channel [05:03] dephex has joined the channel [05:13] crescendo has joined the channel [05:14] dilvie has joined the channel [05:24] isaacs_mobile has joined the channel [05:28] brianleroux has joined the channel [05:28] wilmoore has joined the channel [05:30] jacobolus has joined the channel [05:30] tilgovi has joined the channel [05:32] khrome has joined the channel [05:33] deoxxa: disappearedng: sure, it's great [05:33] deoxxa: i do it all the time [05:34] deoxxa: in fact, i remember this one time i was testing without encountering race conditions, and i had one of my tests fail [05:34] deoxxa: so i went into the code where it was failing, and i fixed it [05:34] deoxxa: now, i'm guessing you didn't want to know about my experiences testing, so how about you give us a little more detail about what your actual issue is? [05:35] wookiehangover has joined the channel [05:37] disappearedng: deoxxa: ok so what do you do [05:37] disappearedng: I have the following set up [05:37] disappearedng: My app is separated into multiple states [05:37] disappearedng: state_a, state_b, ... [05:37] deoxxa: define "app" [05:37] disappearedng: I basically want to verify the results of state_a [05:38] disappearedng: so what I do right now is that inside state_a , there's a state_a_callback [05:38] disappearedng: and the test cases override that function [05:38] disappearedng: however, state_a moves immedaitely to state_b [05:38] disappearedng: so there's a race condition between state_b and state_a_callback [05:38] disappearedng: deoxxa: game engine [05:38] deoxxa: do you have an example of this behaviour? [05:39] deoxxa: i think i understand what you're talking about, but i might be wrong [05:40] ewalker has joined the channel [05:47] erujolc has joined the channel [05:49] codepal has joined the channel [05:51] infynyxx has joined the channel [05:51] hgg has joined the channel [05:52] huggies has joined the channel [05:55] codepal has joined the channel [05:59] dc` has joined the channel [05:59] criswell has joined the channel [06:01] hgg has joined the channel [06:05] PyramidHe has left the channel [06:06] cconstantine_ has joined the channel [06:06] sreeix has joined the channel [06:07] Morkel has joined the channel [06:08] take_cheeze has joined the channel [06:10] synesp has joined the channel [06:11] synesp: I'm trying to set a timeout on a http request. right now I have var req = http.get(...); req.setTimeout(2000, callback); but it doesnt seem to be working. it actually seems to call the callback immediatley [06:12] synesp: am I doing this correctly? [06:12] benvie: wrtong order [06:12] benvie: or is it? [06:12] sigurding has joined the channel [06:12] benvie: regular setTimeout is callback, milliseconds [06:12] benvie: which you have in reverse there [06:13] synesp: docs say otherwise [06:13] synesp: ill try switching [06:13] synesp: good call [06:13] benvie: I may be wrong but I know the regular setTimeout has it in that order [06:13] synesp: yeah [06:13] synesp: let me try fellas [06:13] synesp: nope [06:14] synesp: oh wait [06:14] synesp: I failed [06:14] benvie: so beyond that I believe there's some different semantics to that setTimeout and I think it may be unfortunately named if so [06:14] synesp: i didnt wrap my callback in function() { } [06:14] synesp: so it was being called hahahaha [06:15] benvie: oh you mean without any kind of binding/reference [06:15] synesp: yeah [06:15] synesp: oops [06:15] benvie: so like callback.bind(this) or something I assume is desired [06:15] synesp: no [06:16] synesp: setTimeout(2000, function() { cb(); }); [06:16] synesp: I had setTimeout(2000, cb()); [06:16] benvie: oooh [06:16] synesp: hehe [06:16] benvie: well this should work [06:16] benvie: setTimeout(2000, cb); [06:16] benvie: just not callibng it [06:16] synesp: oh [06:16] synesp: yeah that works too [06:16] synesp: well cb takes an arg [06:16] benvie: ah [06:16] synesp: ;) [06:17] benvie: setTimeout(2000, Function.call.bind(cb)) [06:17] benvie: for the sake of completion [06:17] synesp: haha [06:17] erujolc: no different semantics whatsoerver [06:17] conner has joined the channel [06:17] benvie: the fact that the args are reverse from normal setTimeout raises my warning flags [06:17] benvie: but I haven't used it [06:18] erujolc: args in reverse? [06:18] benvie: setTimeout has the milliseconds as the second param [06:18] synesp: yeah, the setTimeout for the socket in node is reversed [06:18] benvie: and the callback is the first [06:18] synesp: the arguments are [06:18] synesp: http://nodejs.org/api/http.html#http_request_settimeout_timeout_callback [06:18] synesp: btw, I like this a lot: http://nodejs.org/api/cluster.html [06:18] benvie: which makes me wonder even more wtf, time to read the soruce [06:20] benvie: not explanation in the source [06:20] satyr has joined the channel [06:20] benvie: Socket.prototype.setTimeout = function(msecs, callback) [06:20] benvie: seems like a mistake that just got codified into the way it is [06:20] synesp: maybe you should file a report! [06:20] synesp: :) [06:20] benvie: doesn't even matter now, too late to fix it [06:21] benvie: Socket is too fundamental [06:21] synesp: well they could allow the swapping of the arguments [06:21] synesp: like php's explode/implode for historical reasons [06:21] synesp: :D [06:21] benvie: similar reason to why typeof null === 'object' and that can't be fixed [06:22] benvie: they tried for es6 and it was reverted [06:22] benvie: think the current v8 in 0.7.x with the harmony flag even returns 'null' for that [06:22] benvie: hmm nope [06:23] benvie: did for about one version of v8 [06:23] benvie: SOME THINGS CANNOT BE UNSEEN [06:24] Joeysomo_ has joined the channel [06:24] nsolsen has joined the channel [06:25] synesp: benvie: I'm making http requests in my node app and every so often I get a socket hang up error that exists the entire process [06:25] synesp: I have req.on('error'.. and it doesn't seem to be catching it there [06:25] synesp: ideas? [06:25] arduix has joined the channel [06:26] benvie: well first off the error event will only work for stuff that knows to use it [06:26] benvie: you can still throw and break everything [06:26] benvie: second, is this a local error or an error passed from the other end? [06:27] synesp: ill paste [06:27] synesp: http://pastebin.com/ab76pZF1 [06:27] xdecow has joined the channel [06:27] synesp: otherh end [06:27] benvie: ho ok [06:27] benvie: well it's not judging from this [06:27] synesp: oh [06:27] benvie: the socket hangs up for unknown reasons [06:28] benvie: which is like...not a socket.on('error') thing [06:28] benvie: but a bigger issue [06:28] synesp: that sounds like a problem [06:28] benvie: like you're sending invalid stuff at the protocol level [06:29] synesp: this happens at http.get [06:29] benvie: so you're probably giving it parameters it considers unusable for one reason or another [06:29] jryans has joined the channel [06:29] synesp: but where? [06:29] benvie: more code =D [06:29] benvie: can't say from that [06:29] synesp: haha [06:30] benvie: have you used http.get succesfully before? [06:30] benvie: or is this a learning expedition [06:30] benvie: usually I get this type of stuff when I'm learning [06:30] synesp: http://pastebin.com/uedEK4n1 [06:30] synesp: yes [06:30] benvie: not that it's bad, but it indicates you may be passing fundamentally incorrect thingsd [06:30] synesp: I can make 1k requests and the issue wont happen [06:31] synesp: it seems like its the server im talking to is the one causing the issue [06:31] benvie: so first question, if you do this but without the req.setTiemout part what happens [06:31] synesp: same thing [06:31] synesp: at random [06:31] synesp: i can't tell you when it happens [06:32] benvie: ok so it's not that [06:32] benvie: eliminating problem sources is the goal =D [06:32] synesp: can i wrap this in try.. catch and see where its happening.. on what path and such [06:32] benvie: so this 95% probably isn't it [06:32] benvie: but try it with 'utf8' instead of 'utf-8' [06:33] benvie: try catch won't help much with async [06:33] synesp: nope [06:33] benvie: or at all really unless it's an immediate error [06:33] synesp: see, i just ran 50 requests [06:33] synesp: and somewhere in the last 25 [06:33] synesp: it happened again [06:33] benvie: ok so this works most times and randomly errors [06:33] synesp: yes [06:33] benvie: that's a different kind of thing [06:34] xdecow has left the channel [06:35] benvie: the things that vary per request are stuff like timestamp, client side increasingly large buffer, serverside queue, and rate limiting [06:35] benvie: this code won't be at fault for anything that would cause that kind of failure I'd guess [06:35] deoxxa: that code looks like it calls cb more than once [06:35] sinclair has joined the channel [06:36] benvie: it calls cb on end and on error [06:36] deoxxa: also on request timeout [06:36] benvie: and timeout [06:36] benvie: =D [06:36] deoxxa: which will cause res#end if res has begun but req hasn't finished [06:36] deoxxa: (i think) [06:36] benvie: you should add a label in one way or another as to the source of the callback [06:36] benvie: either way that's useful [06:37] benvie: right now it could be anything [06:37] benvie: one of the above three [06:37] synesp: i see [06:37] synesp: well im calling callback because even if it fails, i want to give back an empty string to the callback [06:38] benvie: that's fine but include a parameter at a specific position (for debugging) describing where it came from [06:38] benvie: first one is easiest since it'll be guranteed [06:38] synesp: ok [06:38] benvie: and move everything else over [06:38] deoxxa: by convention, callbacks usually take an error argument first [06:38] benvie: then just put in 'error', 'end', or 'timeout', just to see what raises it [06:38] benvie: or yeah that [06:38] yawNO has joined the channel [06:38] benvie: but like I was thinking the next 5 minutes basically [06:39] deoxxa: that makes this a lot easier to diagnose [06:39] benvie: but yeah [06:39] yawNO: yo [06:39] benvie: the convention is if it's not an error then you're passing (null, result) [06:39] deoxxa: then you just pass the error back up through the callback maze [06:39] benvie: and errors are (error) [06:39] deoxxa: mmm [06:40] benvie: in this case a timeout I'd guess is an error? not sure, that's kind of iffy in many cases [06:41] benvie: either way you want to know what's raising your callback when it could be a fault condition or an error condition and right now that seems to be lacking [06:41] deoxxa: if it's considered an error in the context of the action, yep [06:41] deoxxa: cb(Error("request timeout")) [06:42] synesp: now im having a different issue [06:42] synesp: hold on [06:42] synesp: haha [06:42] deoxxa: however, this is all ignoring the fact that there's already "request" for this [06:42] deoxxa: https://github.com/mikeal/request [06:42] benvie: sometimes the flaming forest is hard to see in the smoking hazy of burning code [06:43] synesp: should I just rip my shit out [06:43] synesp: and use that [06:43] synesp: maybe I'm failing [06:43] benvie: that question is the first thnig I ask every time I write more than 5 lines of code [06:43] deoxxa: synesp: i did that exact thing a little while back - made my life easier [06:43] synesp: hahahaha [06:43] synesp: ok letme do that hold on [06:43] deoxxa: i think i was having a similar conversation about some weird http thing [06:44] deoxxa: and someone was like "just use request" [06:44] deoxxa: haha [06:44] synesp: im having some weird timeout issue too [06:44] synesp: if i set to 10ms (which the http will never finish in) im getting a weird pause in my server if i make 25 requests [06:44] arduix has joined the channel [06:44] synesp: it stops after 7-10 and just sits there doing nothing [06:44] fangel has joined the channel [06:44] synesp: letme use request, hold on [06:44] benvie: I mean I'll admint I will invent completely new shit at the drop of a hat when existing stuff annoys me, but when it comes to anything regarding http protocol stuff, you can count me out. I will use anything that exists [06:45] codepal has joined the channel [06:45] huggies has joined the channel [06:46] wolftankk has joined the channel [06:46] deoxxa: i love npm so much [06:47] devaholic has joined the channel [06:47] deoxxa: how did i live without it before [06:47] benvie: you didn't live [06:47] benvie: you existed [06:47] deoxxa: haha [06:47] deoxxa: this is true [06:47] markq has joined the channel [06:47] deoxxa: when i go to work on our php code at work, it feels like i've gone back in time [06:47] benvie: then npm gave life your enfeebled shell [06:47] benvie: and now you live [06:48] benvie: yeah I have this issue [06:48] benvie: where i can't do things I don't want to [06:48] benvie: which means I can't work on php ever again [06:48] deoxxa: i avoid it as much as i can [06:49] deoxxa: "hey can you fix this thing in the cms" [06:49] deoxxa: "haha. no. [06:49] deoxxa: " [06:49] benvie: the flipside is I work 18 hours a day on things i do want to. But that's the price to pay [06:49] loob2 has joined the channel [06:49] benvie: "can you make this php thing work?" "ahh nope, not really" [06:50] benvie: "can you write a 6 page essay on the instanceof keyword" "sure" [06:50] guidocalvano has joined the channel [06:50] devaholic: i had to look at some php stuff recently... i second this [06:50] devaholic: so much code that does so little [06:51] deoxxa: i've started writing a sort of cms for our stuff at work [06:51] deoxxa: not quite a cms though [06:52] deoxxa: more of a... i'm not sure what to call it [06:52] benvie: I've been slowly poisoning the thoughts of all the people who ask me stuff [06:52] deoxxa: you create pages using markdown, which are run through my templating thing, which have access in the template to data for that page [06:52] deoxxa: and you just post json to the page to add data to it [06:53] mikeal has joined the channel [06:53] benvie: "do you know a host that xxxxx,....." "nope but I host my own stuff using xxxxxx virtual thing and then I use node and oh did you know you can use javascript in the browser and the server and the database using javascript syntax for queries and returns json" [06:53] benvie: *poison* [06:53] deoxxa: heh [06:54] synesp: lol [06:54] synesp: i just moved a bunch of older php code to 5.4 and life is so much easier with correct namespacing [06:54] TheAlphaNerd: BOOOM!!! [06:54] benvie: "so wait you mean I could host 100 of my clients on..." "yeah..." [06:55] synesp: the best was one time i went to meet with a potential client and he had a bunch of old p4's running a closet that was blazing hot hosting some odd 50 websites on windows IIS [06:55] deoxxa: that's a dangerous road to go down though, benvie [06:55] synesp: lol! [06:55] TheAlphaNerd: I just fixed node-osc [06:55] TheAlphaNerd: been working on this for four days [06:55] deoxxa: my boss seems to think "code reuse" is magical [06:55] benvie: I will care once they pay me, for now they get free awesome advice for free [06:55] synesp: haha [06:55] deoxxa: "we need to do x with project y. you did something similar in project z, so just reuse the code from that" [06:55] deoxxa: "uhh that's not how it works" [06:55] benvie: see that's the thing [06:56] synesp: welp, looks like request solved my issue, deoxxa [06:56] benvie: it kindof is once you break it down into small enough parts [06:56] synesp: haven't seen anything yet [06:56] benvie: cue substack flying in from the skies [06:56] benvie: where is he [06:56] deoxxa: ha [06:56] deoxxa: SubStack is the man [06:57] benvie: but his basic religion is right in that if you break stuff into the right components then eveything is usable where applicable [06:57] deoxxa: i've been dying for a chance to use fleet and seaport [06:57] deoxxa: it would make our architecture at work so much simpler [06:57] benvie: not that it's a problem, but the limitation is [06:58] benvie: it requires a fundamental buy in [06:58] benvie: which for people with bosses is an issue [06:58] deoxxa: my boss is pretty flexible [06:58] socketio\test\71 has joined the channel [06:58] synesp: question. I have an array of arrays. I want to concat all of the arrays inside the original array. any better idea than for (var i = 0; i < array.length; i++) { var bar = []; bar = bar.concat(array[i]); } ? [06:58] deoxxa: like, he ran with the whole node.js thing when i recommended it [06:58] benvie: you can still use those libs that exist, but you often run aground of trying to build X new thing for your business in such a way [06:59] paulwe has joined the channel [06:59] deoxxa: synesp: underscore, and _.flatten(arrays) [06:59] benvie: can still be done, just requires not telling the people in charge [06:59] synesp: deoxxa: what if I'm not using underscore :) [06:59] benvie: var flatten = Function.call.bind([].concat, []) [06:59] synesp: is it really worth it to bring it into the script just for that [06:59] deoxxa: well, you could use Array.reduce for it [06:59] benvie: no [06:59] benvie: that flatten will do 90% of what you need [07:00] deoxxa: how does .bind work? [07:00] synesp: yeah can you teach me that [07:00] benvie: if you need a version that goes another level, but requires an array as input [07:00] benvie: var flattenArray= Function.apply.bind([].concat, []) [07:01] benvie: call and apply are functions in themselves, and they operator on `this` [07:01] arthurdebert has joined the channel [07:01] benvie: `this` has to be a function that they will then use [07:01] deoxxa: call and apply i get, and from what i'm reading on https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Function/bind bind is pretty neat [07:01] benvie: so binding call to a function essentially returns a funtion that is always going to call the provided function [07:02] deoxxa: oh that is neat [07:02] benvie: so Array.prototype.concat is a special case [07:02] benvie: it's the most generic Array function there is, it's basically the same as calling Array itself [07:03] benvie: except it flattens all values in both `this` as well as `arguments` [07:03] westg has joined the channel [07:03] benvie: into a single resulting array [07:03] synesp: interesting [07:03] benvie: it's an odd duck [07:03] synesp: so how do I call that then [07:03] benvie: so back to flatten [07:04] benvie: var flatten = Function.call.bind([].concat, []) [07:04] synesp: yes [07:04] benvie: now you can do [07:04] benvie: flatten(1,2,3,[4,5,6]) [07:04] benvie: and get [1,2,3,4,5,6] [07:04] benvie: so up to a single level up of arrays will be flattened [07:05] benvie: as well as any number of arguments [07:05] benvie: flatten([1],[2],[3],[4],[5],[6]) would produce the same [1,2,3,4,5,6] [07:05] alejandromg: interesting, what about [1,2,[3,4,[5,6]],7] [07:06] benvie: but flatten(1,2,[3,[4,5]],6) produces [1,2,3,[4,5],6] [07:06] mrkeith has joined the channel [07:06] benvie: to make it recursive you'll need a function with a bit of logic [07:07] benvie: to differentiate between arrays and non-arrays [07:07] alejandromg: OH! I get it [07:07] devaholic: alejandromg: thats is one in underscore you can grab [07:07] benvie: the logic of concat is very specific [07:07] devaholic: there* [07:08] alejandromg: yeah! I know about it :) [07:08] alejandromg: I just like the benvie aproach [07:08] benvie: it only iterates Arrays of class [[Array]] and [[Arguments]] [07:08] mrkeith has joined the channel [07:08] benvie: otherwise that value is a single value [07:08] k1ttty has joined the channel [07:09] benvie: but like this will work with anything that has a length and numbered indexes [07:09] benvie: [].map.call('hi im a string', function(val){ return val.charCodeAt(0_ }) [07:09] braoru has joined the channel [07:09] benvie: [].map.call('hi im a string', function(val){ return val.charCodeAt(0) }) [07:10] benvie: that will actually iterate over the string [07:10] benvie: but concat wouldn't, the string could be a single value [07:10] alejandromg: that's neat, call|bind|concat are pretty useful [07:11] benvie: I wish catb0t was here [07:11] benvie: v8 > sup [07:11] benvie: >> sup [07:11] purr: benvie: ReferenceError: sup is not defined [07:11] benvie: YES [07:11] sawjig has joined the channel [07:11] benvie: >> Array.apply(null, Array(32)).map(Function.call.bind(Number)).map(Math.pow.bind(null, 2)) [07:11] purr: benvie: (object) [1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536, 131072, 262144, 524288, 1048576, 2097152, 4194304, 8388608, 16777216, 33554432, 67108864, 134217728, 268435456, 536870912, 1073741824, 2147483648] [07:11] benvie: that's my favorite [07:12] benvie: and here is squares [07:12] benvie: >> Array.apply(null, Array(10)).map(Function.call.bind(Number)).map(Math.pow.bind(null)) [07:12] purr: benvie: (object) [1, 1, 4, 27, 256, 3125, 46656, 823543, 16777216, 387420489] [07:12] deoxxa: seaport looks so damn cool [07:12] synesp: hmm benvie having issues with flattenArray [07:13] benvie: it requires an array as the one and only parameter [07:13] benvie: oh wait also [07:13] benvie: var flattenArray = Function.apply.bind([].concat) [07:13] benvie: the second param needs to go [07:13] benvie: I think [07:14] dilvie has joined the channel [07:14] benvie: actually no [07:14] benvie: >> var flattenArray = Function.apply.bind([].concat, []); flattenArray([[1,2,3],[4,5,6]]) [07:14] purr: benvie: (object) [1, 2, 3, 4, 5, 6] [07:15] synesp: hm [07:15] benvie: >> var flattenArray = Function.apply.bind([].concat, []); flattenArray([[1,2,3],[4,5,[6]]]) [07:15] purr: benvie: (object) [1, 2, 3, 4, 5, [6]] [07:15] benvie: >> var flattenArray = Function.apply.bind([].concat, []); flattenArray([[1,2,3],[4,5,6]], 6) [07:15] purr: benvie: (object) [1, 2, 3, 4, 5, 6] [07:15] benvie: yeah it requires a single array param [07:16] benvie: less useful in most cases than the callbound version [07:16] emmanuel has joined the channel [07:16] jetienne has joined the channel [07:16] benvie: >> var flatten = Function.apply.bind([].concat, []); flattenArray([1,2,3],[4,5,6], 6) [07:16] purr: benvie: ReferenceError: flattenArray is not defined [07:16] synesp: nice worked is ee [07:16] synesp: thanks [07:16] benvie: >> var flatten = Function.apply.bind([].concat, []); flatten([1,2,3],[4,5,6], 6) [07:16] purr: benvie: (object) [1, 2, 3] [07:17] benvie: hmm [07:17] benvie: >> var flatten = Function.call.bind([].concat, []); flatten([1,2,3],[4,5,6], 6) [07:17] purr: benvie: (object) [1, 2, 3, 4, 5, 6, 6] [07:17] benvie: thar it is [07:17] synesp: so can you explain the difference between call vs apply [07:17] munichlinux has joined the channel [07:18] benvie: call(thisBinding, arg1, arg2, ...) [07:18] benvie: apply(thisBinding, [arg1, arg2, ....]) [07:18] benvie: not much diff but important and different use cases [07:19] benvie: apply takes a single array with params, call takes them as a specific set of params [07:19] benvie: the consequences are bigger than would first appear [07:20] benvie: apply is the case usually used in generated bindings because it can take an arbitrary set of params [07:20] synesp: i see [07:20] benvie: call is where you know the exact set of things you want to pass at code writing time [07:21] benvie: so like someFunction.apply(this, arguments) is the definitional generic [07:21] benvie: where it passes the current `this` binding and all parameters to some function [07:21] synesp: ah ok [07:22] benvie: let me step out of my jet javascriptplane [07:22] cconstantine_ has joined the channel [07:22] benvie: and stop shelling you with bombs [07:22] deoxxa: my housemate makes me want to start fires [07:22] synesp: lol why [07:23] deoxxa: she should just go and move out already [07:23] deoxxa: or die [07:23] deoxxa: either way i win [07:23] benvie: I'd do it [07:23] benvie: I mean maybe not [07:23] deoxxa: she's just a bad person, no matter how you look at it [07:23] deoxxa: she's selfish, not that smart, not that attractive, has an annoying as hell boyfriend, etc [07:23] benvie: I would say [07:24] deoxxa: she's just on the wrong side of average [07:24] benvie: what's more damaging, fire or inconspicuously drawn deformed happyfaces on a person' underwear [07:24] benvie: I dunno, I'm just asking [07:24] synesp: fires [07:24] deoxxa: yeah, fire [07:24] deoxxa: definitely [07:24] synesp: lol fires. [07:24] synesp: 100% [07:24] benvie: well now I know [07:25] deoxxa: knowing is half the battle [07:25] benvie: that problem is solved [07:25] benvie: gifire [07:25] deoxxa: the other half is starting more fires [07:25] synesp: i remember one kid and i were working at the same start up and i used to talk around in my underwear.. so he raged one day and attacked me full force [07:25] synesp: we had a full out battle [07:25] synesp: last time I had a roommate.. [07:25] synesp: walk around* [07:25] deoxxa: ha [07:25] deoxxa: win [07:25] benvie: I get along with such folk but I also make it clear that I'm going to do what I want, and that's going to happen in a specific spot right here [07:25] deoxxa: see there's something to be said for being obnoxious when you know you're doing it [07:26] synesp: exactly [07:26] synesp: ;) [07:26] deoxxa: but when you're entirely oblivious to the fact that everyone finds you frustrating, that's just sad [07:26] benvie: no, it's how you decide killing is the right thing to do, right now [07:26] benvie: I mean theoretically [07:27] benvie: deciveness is important [07:27] deoxxa: i'm trying to find a track that syncs up with her shitty music right now [07:27] benvie: however that word is spelled it's important you do it, and by doing it I mean kill that person [07:27] deoxxa: i wonder how annoying that would be [07:27] deoxxa: i should find dubstep remixes of all the songs she's playing [07:27] deoxxa: and play them louder [07:27] synesp: LOL [07:28] synesp: is she a huge dubstepper? [07:28] mikeric has joined the channel [07:28] synesp: why are you roomed with her? [07:28] benvie: I'm assuming she's not [07:28] deoxxa: she's not, but i am to a degree :P [07:28] benvie: the opposite of that actually [07:28] benvie: I'm assuming you're hearing billy joel or perhaps something such [07:28] deoxxa: and i'm sharing an apartment with her because i needed somewhere and i had about a week to find a place [07:28] synesp: ohh [07:28] deoxxa: nah it's actually some kind of crap techno [07:28] synesp: nothign wrong with some joel [07:29] deoxxa: so i don't even know how to identify it [07:29] synesp: sometimes. [07:29] deoxxa: some top 40 crap [07:29] synesp: yikes [07:29] benvie: ok so you won't be able to really do anything with that [07:29] LeftWing: Billy Joel ftw. [07:29] benvie: is there dubstep Billy Joel because that sounds like a really good idea [07:29] synesp: just pipe your mouse into your sound device and play that [07:29] benvie: and I'm patenting it right now [07:29] synesp: she'll love it [07:30] deoxxa: undoubtedly [07:30] LeftWing: I don't *hate* dubstep, so much as I simply cannot understand its purpose. :P [07:30] deoxxa: synesp: or i could just crank some venetian snares - pretty much the same effect [07:30] benvie: so I have a Das Keyboard which is like riding a train into my computer at all times [07:30] benvie: my roommate complained for a while [07:30] benvie: and now he wants one [07:30] synesp: just give me your address.. ill come over and handle her [07:30] d0ax has joined the channel [07:30] LeftWing: Haha, Unicomp Spacesaver here. [07:30] deoxxa: LeftWing: you're probably thinking about brostep - the point of which i don't quite grasp either [07:31] benvie: I don't need an address because my Das echoes all across the world, as well as time [07:31] benvie: the world can hear when I am angry, or relaxed [07:31] LeftWing: deoxxa: All I know is the youth/alternative radio station here (Triple J) has started playing a bit of what they're definitely calling dubstep... and I'm not on board, at all. :P [07:31] deoxxa: oh you're in brisbane? [07:31] LeftWing: Newcastle. [07:32] deoxxa: ah, close enough [07:32] benvie: these words sound like the 14th century [07:32] deoxxa: wait no JJJ is all over the country isn't it [07:32] benvie: I will go fireup braveheart and translate [07:32] LeftWing: Yes, it's nation-wide. [07:32] deoxxa: i'm thinking ZZZ [07:32] deoxxa: ACTION waves from melbourne [07:32] LeftWing: ACTION waves back [07:32] deoxxa: hello geographically impoverished friend! [07:33] LeftWing: haha, even more so than yourself, it seems. [07:33] benvie: what a terrible place to exist [07:33] LeftWing: What, Newcastle? [07:33] benvie: er [07:33] benvie: is it? [07:33] wolftankk has joined the channel [07:33] benvie: I don't know [07:33] LeftWing: It's actually quite nice here. There's just no tech industry. [07:33] erujolc has joined the channel [07:33] deoxxa: i've got a couple of friends who live there [07:34] benvie: to be fair that statement is true of every place except 2 in the world and one is india [07:34] LeftWing: So I drive to Sydney three days a week to work. :P [07:34] be5invis has joined the channel [07:34] deoxxa: benvie: india? really? [07:34] deoxxa: maybe some of the more rural areas... [07:34] benvie: yah really, mumbai [07:34] deoxxa: but the cities there are not my cup of tea [07:35] LeftWing: I more think of San Francisco / the Valley when I think tech. [07:35] benvie: I'm not saying this out of pride, I live on the east coast of the US as far away from the other in the US as you can be [07:35] be5invis: Hello everyone, i am a nodejser from China. [07:35] benvie: yeah this is why I said 2 [07:35] benvie: the first is obviously SF [07:35] be5invis: My github = github.com/be5invis [07:35] benvie: speaking of china [07:35] deoxxa: be5invis: hello! [07:35] benvie: I am sad about node-webkit's thing [07:36] be5invis: Thanks. [07:36] benvie: not that I need an intern position [07:36] Skaag has joined the channel [07:36] benvie: but I'm all over the internls of that stuff [07:37] deoxxa: how does popular music work [07:37] deoxxa: like, it all sounds exactly the same [07:37] benvie: magic and rnd() [07:38] deoxxa: i'm thinking you could accurately simulate popular music with a genetic algorithm [07:38] be5invis: Are there any libraries about Ast-to-JavaScript code? [07:38] benvie: how do you think what is going to be popular is decided [07:38] benvie: wasn't there a movie about this [07:38] deoxxa: i suppose... [07:38] benvie: where there was a monkey [07:38] deoxxa: be5invis: uglify-js [07:38] jetienne has joined the channel [07:39] deoxxa: be5invis: https://github.com/mishoo/UglifyJS [07:39] benvie: I'm not joking, there was a movie about a monkey that reviewed movies [07:39] LeftWing: You don't even need anything that complicated -- just a corpus of existing music and a stochastic markov sim [07:39] benvie: and predicted which would be popular [07:39] be5invis: Uglify cannot handle (add (while, ..., ...) ...) [07:39] benvie: es6? harmony? [07:39] be5invis: I'd like an lirary can handle any combinations of Ast nodes [07:39] benvie: esprima or narcissus [07:40] be5invis: including a while statement inside an expression [07:40] benvie: narcissus is mozilla's thing [07:40] benvie: esprima is a new thing, though it's pretty awesome [07:41] deoxxa: benvie: does it do ast->js or just js->ast? [07:41] be5invis: Currently I am working on my own language [07:41] benvie: narcissus is meta-circular, in that it actually runs a host environment for the parsed language [07:41] be5invis: called `moescript` [07:41] be5invis: I need Ast->JS only [07:41] benvie: esprima is a really great parser/interpreter forjs [07:41] benvie: and has a thing for producing code from ast [07:42] be5invis: wow [07:42] benvie: so ast->js [07:42] be5invis: interesting sum. [07:42] be5invis: interesting. [07:42] benvie: it's pretty incredible [07:42] benvie: it can edit specific parts of code in place [07:42] deoxxa: neat [07:42] benvie: without modifying everything [07:42] be5invis: Did any one heard about my work? [07:43] benvie: like the example is adding code entry [07:43] benvie: what is your work? [07:43] Edy has joined the channel [07:43] Guest40908 has joined the channel [07:43] benvie: example/name [07:43] benvie: link [07:43] jetienne has joined the channel [07:43] be5invis: Moescript. [07:43] be5invis: github.com/be5invis/moescript [07:43] benvie: oh Moescript, no. You have to publicize it! [07:44] benvie: so people know [07:44] benvie: https://groups.google.com/forum/?fromgroups&hl=en#!forum/nodejs [07:44] be5invis: English is not my own language [07:44] be5invis: so that publicizing is hard for me. [07:44] be5invis: s/own/native/g [07:44] benvie: yeah, english is my native language, and it's still hard [07:44] benvie: I'm learning [07:45] be5invis: what is your meaning? [07:45] benvie: first lesson is go where the people who would use your code are [07:45] benvie: I mean language isn't the only hard part [07:46] isaacs has joined the channel [07:46] benvie: self-promotion is easy for boasters, and hard for most [07:46] benvie: it requires a consstant reminder [07:47] benvie: if you don't tell people about your initial successes the no one will [07:47] be5invis: I see. [07:47] benvie: even if you're inclined to just do and not say [07:47] be5invis: However currently its documentation is not completed yet [07:47] benvie: well that helps, and you have a language barrier [07:47] be5invis: Is it too early to put it to the public? [07:47] benvie: first impressions are also important [07:48] mikeal has joined the channel [07:48] benvie: so you need to prepare for for people to like what you're showing on the first view [07:48] be5invis: Moe supports REAL monads. [07:48] benvie: you need way more docs. ALSO you need to make them visible [07:48] benvie: do this [07:48] be5invis: thanks. [07:48] benvie: MOST IMPORTANT STUFF goes into ./README.md [07:48] benvie: that is the first thing people see [07:49] benvie: so make it count [07:49] benvie: right now it won't make anyone look [07:49] synesp: if I catch (e) can I pass that back to the callback as an error? or should i wrap it in Error ? [07:49] synesp: or is e Error already [07:49] benvie: that is where you convince people to stay for more than 5 seconds [07:50] benvie: synesp: pass the error back [07:50] benvie: don't throw it, but pass it [07:50] synesp: yea [07:50] synesp: ok [07:50] synesp: so try { ... } catch (e) { callback(error, ...); } [07:50] synesp: oops, e [07:50] be5invis: Writing doucments is 3 times harder than codes. [07:52] benvie: hah yeah [07:52] benvie: it's funny because many times things that are inferior become more popular [07:52] be5invis: Especially in forign language. [07:52] benvie: because they were better at communicating [07:52] be5invis: (���Լ����Ķ�˵������) [07:52] benvie: this is why I use screenshots/pictureas [07:52] TheAlphaNerd: so I don't know if anyone in hear has any use for sending osc messages or udp stuff with node [07:52] benvie: images are universal [07:53] deoxxa: TheAlphaNerd: i use UDP with node [07:53] benvie: https://github.com/Benvie/Node.js-Ultra-REPL you don't need to speak english to see the colors there [07:53] TheAlphaNerd: https://github.com/TheAlphaNerd/node-osc [07:53] benvie: maybe I'm just obsessed with colors [07:53] TheAlphaNerd: if you want to do osc messages [07:53] TheAlphaNerd: this is really nice and sugary [07:54] deoxxa: no idea what OSC is [07:54] deoxxa: \o/ [07:54] be5invis: I think i should show codes written in Moescript directly. [07:54] be5invis: instead of English description [07:54] benvie: yes [07:54] benvie: show don't tell [07:54] benvie: that's also a good rule [07:54] TheAlphaNerd: deoxxa: osc is a way to format udp messages that is kind of like a replacement for midi [07:54] deoxxa: oh [07:55] TheAlphaNerd: but more or less it can be viewed as a simple way to package and send udp messages [07:55] TheAlphaNerd: without having to worry about forming the packets correctly [07:55] deoxxa: ah, i see [07:55] benvie: people read a description and think "that's cool" and then they forget [07:55] arthurdebert has joined the channel [07:55] benvie: but if you show them then they remember [07:55] benvie: if it mattered [07:56] deoxxa: i wonder if i can find the breaker for my apartment [07:56] deoxxa: i'd love to turn the electricity off about now [07:56] enjalot has joined the channel [07:56] benvie: I know how [07:56] benvie: it's called metal [07:56] deoxxa: paperclip -> power point [07:56] deoxxa: i know [07:56] benvie: in sockets [07:56] benvie: all of them [07:56] deoxxa: but i'd rather do it without third degree burns [07:57] benvie: my roommate has a 90 minute UPS backup [07:57] be5invis: I am also worikng on a game lib. [07:57] benvie: guessing yours is less competant [07:57] be5invis: nodejs-nge2 [07:57] deoxxa: correct [07:57] benvie: nge2? what's nge1? [07:57] deoxxa: to illustrate: she owns a 5 disc cd changer [07:57] deoxxa: and uses it regularly [07:57] benvie: I know of an ng [07:58] benvie: nge [07:58] be5invis: nge is a C++ game library [07:58] benvie: 5 disc changer what is that [07:58] benvie: antigque [07:58] deoxxa: exactly [07:58] benvie: I recall thinking how stupid it was in 1995 when my parents got one [07:59] benvie: but I was in tune with the techs [08:00] deoxxa: in other news, i found a clothes horse thing when i was putting out the trash [08:00] criswell has joined the channel [08:00] deoxxa: ACTION yay [08:00] myndzi has joined the channel [08:00] joshsmith has joined the channel [08:00] benvie: ah just going to leave that [08:01] benvie: looking up nge c++ game library [08:01] aliem has joined the channel [08:01] benvie: be5invis: ever heard of turbine/ [08:02] be5invis: benvie: search libnge2 [08:02] benvie: wow that website has a [08:02] be5invis: (this library DOES NOT have docs in English) [08:02] benvie: vest viewed in firefox3 thing [08:02] benvie: the old one [08:02] be5invis: (and its api is UGLY( [08:02] munichlinux: any one using couchdb + connect session store ? [08:03] benvie: be5invis I will say thid [08:03] be5invis: Are there any windows-usable opengl libs? [08:03] benvie: this is a time when all is being reinvented [08:03] benvie: crecreated [08:03] munichlinux: I am facing this problem of session write to the db for every request. [08:03] benvie: not in node but [08:03] benvie: I did map the entirety of the Windows API to node =/ [08:03] be5invis: opengl? [08:03] be5invis: cool! [08:04] benvie: no that's not in the windows API [08:04] benvie: it specifically target direct x...since that's mirosoft's thing [08:04] benvie: I mean it's just basic bindings, but it's 30,000 lines of code [08:05] benvie: https://gist.github.com/1973743 [08:05] be5invis: wow. [08:05] benvie: automatically generated [08:05] synesp: please tell me that was generated [08:05] synesp: good [08:05] synesp: LOL [08:05] benvie: from something I'm remaking [08:05] be5invis: Using a statement in China, Hao Dan Teng. [08:05] benvie: I assume that means HOLY SHIT WHAT IS WRONG WITH YOU [08:06] synesp: benvie: I cleaned up my code and the http requests are working without any socket hang ups [08:06] benvie: awesome =D [08:06] synesp: I'm talking to about 5 different xml feeds [08:06] synesp: and getting back results concurrently in < 200 ms [08:06] synesp: woo [08:06] benvie: so you're saying you won [08:06] synesp: yes [08:07] benvie: =D that is what I want to hear! [08:07] mikeal has joined the channel [08:07] synesp: ye syes [08:07] whitman has joined the channel [08:08] deoxxa: ha neat [08:08] Bacta has joined the channel [08:08] Bacta: Is Node cancer? [08:09] deoxxa: the best kind [08:09] synesp: oh god. [08:09] benvie: cancer has more death [08:09] deoxxa: and more funding [08:09] deoxxa: ZING [08:10] Bacta: His point about how Node _does_ block is valid [08:11] deoxxa: yeah, that was a great article [08:11] deoxxa: ...4 months ago [08:11] Bacta: And 4 months later Node continues to clock [08:11] Bacta: *block [08:12] yawNO: node aint good for stuff like fibonacci [08:12] yawNO: hes doing it wrong [08:12] ljharb: come now, everyone makes a fibonacci server for a production environment. that's like the most popular kind of server ever! [08:12] deoxxa: we have 2 where i work [08:12] Bacta: Also, is it really a good idea to have your web application serving itself? [08:12] deoxxa: load balanced behind nginx -and- haproxy for extra performance [08:12] ljharb: next i want to see a digits-of-pi server. that would really tell me what's the best web server [08:13] deoxxa: Bacta: lol yes [08:13] ljharb: Bacta: yeah i'd hate to have half as many places to fix bugs [08:14] lperrin has joined the channel [08:14] Bacta: So what happens if someone encounters an edge case causing the whole app to fall over taking the server with it? [08:14] ljharb: if your app fails, who cares if your server's still working? [08:14] yawNO: it goes down [08:14] deoxxa: well that's definitely a problem if you have exactly one instance of your application running [08:14] rendar has joined the channel [08:14] ljharb: a server with nothing to serve is worse than no server at all, because there'd be a timeout instead of no response. [08:15] synesp: exactly [08:15] synesp: lol [08:15] synesp: ljharb: I was just going to say that [08:15] deoxxa: Bacta: mr dziuba made one valid argument, which was that the language on the front page of the node site could be misinterpreted. that is no longer the case. [08:15] devongovett has joined the channel [08:16] synesp: did someone tell ted dziuba that his website is the worst thing to look at ? [08:16] synesp: I litreally just added custom css rules to make it prettier [08:16] deoxxa: html { display: none; } [08:16] deoxxa: ? [08:16] synesp: lol [08:16] benvie: I have to say though as an intermission [08:17] synesp: I kid, I kid [08:17] benvie: it's really hard to lay claim to the "worse looking site" [08:17] benvie: because I have seen some shit [08:17] nicholasf has joined the channel [08:17] synesp: remember expage days [08:17] benvie: things that may indeed kill people [08:17] synesp: geocities and shit [08:17] benvie: no see the issue is this [08:17] Bacta: Your app might fail but only for a small percentage of users, this isn't stupidity on the part of the developer - this is reality. Do the majority of Node apps have multiple instances? [08:17] benvie: looking like THAT, except now [08:17] benvie: or a a couple years ago anyway [08:18] ljharb: Bacta: having single or multiple instances is completely uncorrelated to the choice of webserver. [08:18] benvie: like geocities died 6 years ago or so [08:18] synesp: yeah [08:18] benvie: but imagnie it's back to future 4 [08:18] benvie: and you're like [08:18] be5invis: benvie, are there any native windows GUI node libs? [08:18] benvie: I need to go forward in time and transdplant my terrible website into the future [08:18] dragansah has joined the channel [08:18] Bacta: ljharb: Ted implies that Node apps run their own webserver [08:18] benvie: be5invis you're in luck because the best one (not cross platform) is from your country [08:19] ljharb: Bacta: yes, they do. but just like any setup, you'd need load balancing, and some way to balance your data store. [08:19] benvie: https://github.com/rogerwang/node-webkit [08:19] be5invis: node-gui? [08:19] ljharb: with php and apache the exact same challenges exist. [08:19] deoxxa: Bacta: so does PHP, so does ruby, so does etc etc [08:19] benvie: ALSO [08:19] benvie: https://groups.google.com/forum/?fromgroups&hl=en#!topic/nodejs/uPPujFxek7c [08:19] benvie: node-webkit is looking for interns in china [08:19] benvie: although big country [08:19] benvie: you're surely closer than the rest of us [08:20] Bacta: deoxxa: PHP code is normally deployed atop FastCGI or similar [08:20] benvie: specifically it's IBM china [08:20] ljharb: no it's not [08:20] be5invis: rogerwang? [08:20] Bacta: Well do speak up [08:20] benvie: indeed [08:20] ljharb: Bacta: php code isn't "normally" anything. i've never used fastcgi in the last 6 years of working with php [08:20] deoxxa: Bacta: you do know what fastcgi is, right? [08:20] staar2 has joined the channel [08:20] be5invis: I know a Chinese nodejser produced node-gui [08:20] synesp: ljharb: uh, PHP-FPM [08:20] be5invis: however it uses G!T!K! [08:20] benvie: well I mean [08:20] synesp: + nginx is becoming the standard [08:20] benvie: there's a bunch of them [08:20] synesp: but usually you see apache + mod php still [08:20] ljharb: synesp: cool, becoming. there isn't one. [08:20] synesp: haha [08:21] benvie: node-webkit is the one that actuall bridges v8 instances [08:21] ljharb: mostly i've used apache + php, or nginx + php [08:21] benvie: it's an important line [08:21] wilmoore has joined the channel [08:21] synesp: yeah, no its all sane and valid [08:21] synesp: im just saying [08:21] synesp: you see it more and more [08:21] be5invis: benvvie, you mean node-webkit is not "a server + a frontend"? [08:21] ljharb: i see less and less php more and more :-) but i work near the wellspring of such things [08:22] Bacta: I guess the point I'm trying to get across here is that decoupling an application from the web server makes issues easier to debug [08:22] deoxxa: Bacta: very few people run their node apps exposed directly to the internet [08:22] ljharb: how many times do you have issues with the serving of content? ever? [08:22] deoxxa: also ^^ [08:22] Bacta: And I'm not trying to bash Node - certain aspects of it I like [08:22] ljharb: i've had plenty of htaccess rewrite issues, and app issues, but apache requires zero debugging for me [08:22] Bacta: But Ted has some good points [08:22] dr0id has joined the channel [08:23] ljharb: good points do not an argument make [08:23] SiGe has joined the channel [08:23] ljharb: i just depressed myself with that one [08:23] McMAGIC--Copy has joined the channel [08:27] disappearedng: Hey anyone here can give me some geniune advice for testing and avoiding concurrency? [08:27] disappearedng: I mean race conditions [08:28] [[zz]] has joined the channel [08:28] Bacta: "Plus, it's fucking JavaScript ... on the server." haha [08:28] Bacta: I like that one [08:28] ljharb: Bacta: javascript is awesome. that statement of his points out some of his ignorance [08:28] ljharb: disappearedng: don't depend on state outside of a given event handler? [08:29] disappearedng: You know what I will actually write this out in stack overflow. It's pretty lenghty [08:29] ljharb: cool [08:30] chapel has joined the channel [08:31] TheAlphaNerd: deoxxa: if you want to try it out I got node-osc working as an npm [08:31] TheAlphaNerd: npm install node-osc [08:31] ccare has joined the channel [08:33] stagas has joined the channel [08:33] skm has joined the channel [08:35] benvie: thankfully I don't use node to implement servers [08:35] benvie: just everything else [08:35] konobi: does topcube work on OSX? [08:35] tornad has joined the channel [08:37] joaojeronimo has joined the channel [08:37] Vennril has joined the channel [08:38] ewalker has joined the channel [08:39] aslant has joined the channel [08:40] graeme_f has joined the channel [08:40] CIA-19: node: 03isaacs 07v0.6 * r066789a 10/ Makefile : Fix #3001 website update 'latest' links on publish - http://git.io/odxaaw [08:41] simenbrekken has joined the channel [08:41] disappearedng: Hey I have it written here http://stackoverflow.com/questions/9850305/nodejs-testing-how-to-avoid-race-conditions This is pretty tricky [08:41] guidocalvano has joined the channel [08:43] deoxxa: disappearedng: you really shouldn't be seeing any race conditions [08:44] ph^ has joined the channel [08:44] disappearedng: deoxxa: I have a bunch of print statements and I can guarantee you I am seeing that [08:44] deoxxa: if you are, your code is broken [08:44] disappearedng: I am using nodeunit by the way [08:44] disappearedng: is it possible that nodeunit is runing on a separate thread or something [08:44] deoxxa: i'm sure it's happening, but it just means you're doing asynchronous code wrong [08:44] disappearedng: ok can you tell me what am I doing wrong in the first place [08:45] deoxxa: stateACallBack(); this.emit("START_STATE_B"); [08:46] disappearedng: well fyi it's supposed to be setTimeout(this.emit("START_STATE_B"), 5000); [08:46] deoxxa: unless stateACallBack() does -nothing- that will take longer than one trip around the event loop, you'll always be doing things out of order [08:46] deoxxa: you should really be emitting START_STATE_B when stateACallBack() finishes [08:46] deoxxa: something like this: [08:46] tokumine has joined the channel [08:46] deoxxa: var self = this; stateACallBack(function() { self.emit("START_STATE_B"); }) [08:46] disappearedng: fyi I need the timeout [08:47] deoxxa: function stateACallBack(done) { ... done(); } [08:47] deoxxa: then you don't have any race conditions, as all your code is run exactly when it's needed - not a second before or after [08:47] deoxxa: relying on code taking a certain amount of time to run is very, very hacky [08:47] konobi: setTimeout(function(){ this.emit("START_STATE_B") }, 5000); [08:48] MerlinDMC has joined the channel [08:48] disappearedng: deoxxa: you mind showing me an example? [08:48] deoxxa: sure thing [08:48] disappearedng: so you are saying I should have emit INSIDE callback [08:48] mauritslamers has joined the channel [08:48] deoxxa: correct [08:48] deoxxa: lemme gist something up [08:48] disappearedng: and then when my test cases are overriding it, the test cases will emit AFTER they are done [08:48] stagas: disappearedng: is stateACallback doing something async? [08:48] disappearedng: oh cool now I get it [08:48] disappearedng: stagas: no [08:48] disappearedng: just asserts [08:49] deoxxa: always? [08:49] be5invis: Hmmmm. Some show [08:49] be5invis: https://github.com/be5invis/moescript [08:49] stagas: disappearedng: that example you gave should work [08:49] deoxxa: yeah, if that's the case [08:50] disappearedng: ok let me try first thanks for the enlightenment sifu [08:51] be5invis: Moescript has true monads! Not CPS only. [08:52] josh-k has joined the channel [08:53] __doc__ has joined the channel [08:53] disappearedng: wait, what if I want to do setTimeout [08:53] deoxxa: what are you looking to achieve with setTimeout, exactly? [08:53] deoxxa: why are you waiting a fixed amount of time to do something? [08:54] disappearedng: I need like a 30 second round for players to decide on their game strategy [08:54] disappearedng: it's part of the game [08:54] robotmay has joined the channel [08:54] deoxxa: ok, that makes sense [08:54] disappearedng: How would I be able to do that then? [08:54] deoxxa: by triggering the next state when your current state is complete [08:55] deoxxa: as in, give the current state a way to say "i'm done!" [08:55] disappearedng: let me write up a gist so we can work on it [08:55] deoxxa: (this is usually accomplished by giving it a callback) [08:55] deoxxa: then when that callback's called, you trigger the next state [08:55] simenbrekken has joined the channel [08:55] disappearedng: Like this? setTimeout(function() { this.emit('START_STATE_C'); }, 3000) [08:56] disappearedng: https://gist.github.com/gists/06bb1eeb447e2d8e4fe2/edit [08:56] disappearedng: sorry deoxxa [08:57] disappearedng: You mean something like this if I want to override? https://gist.github.com/06bb1eeb447e2d8e4fe2 [08:58] deoxxa: that's on the right track, yep [08:58] deoxxa: however [08:58] deoxxa: ACTION edits [09:01] staar2: has anyone easy solutions for form validation -> population, as the current flow is like this take the data from post, assign rules(validator), if has error pass the fields back to render, in view write the value="#{fieldname}" [09:01] ph^ has joined the channel [09:01] deoxxa: disappearedng: https://gist.github.com/1fe888e29f32033d4831 [09:02] disappearedng: deoxxa: Ah cleaner [09:02] disappearedng: and you must be a functional programmer [09:02] deoxxa: haha [09:02] deoxxa: is that something like a functional alcoholic [09:03] deoxxa: if so, yes [09:03] disappearedng: well you are passing functions lol [09:03] disappearedng: I feel ya [09:03] disappearedng: that's the power of js as well [09:04] argami has joined the channel [09:05] orlandovftw has joined the channel [09:06] Maxani has joined the channel [09:08] benvie: ok I need to share this once more because I just reread it for the first time in a while [09:08] benvie: http://stackoverflow.com/questions/6873981/v8-and-ecmascript-differences/7023770#7023770 second half [09:08] benvie: my poen [09:08] benvie: poem on js and brendan eich [09:08] Qalqi has joined the channel [09:09] synesp has left the channel [09:15] hellp has joined the channel [09:15] tokumine has joined the channel [09:16] misza222 has joined the channel [09:16] yawNO: benvie: lol [09:17] adambeynon has joined the channel [09:19] guidocalvano has joined the channel [09:20] hz has joined the channel [09:20] conner has joined the channel [09:26] st_luke has joined the channel [09:26] disappearedng: hey deoxxa you still here? I encounter a question about context with regards to passing the callback around [09:26] deoxxa: mmmhm [09:27] disappearedng: Oh you use self there hm. I use _.bind(..., this) [09:31] jomoho has joined the channel [09:32] daniel has joined the channel [09:32] k1ttty has joined the channel [09:33] guidocalvano has joined the channel [09:33] jimt has joined the channel [09:34] stafamus has joined the channel [09:34] benvie: MOSES [09:35] benvie: sup =D [09:35] deoxxa: derp [09:35] deoxxa: waiting for sphinx to index a database [09:35] deoxxa: ACTION sits down [09:35] benvie: I don't herp. But when I herp, I derp [09:35] benvie: so I don't want any derps from you [09:36] deoxxa: oh ok [09:36] deoxxa: that's a little derpist of you [09:36] benvie: I don't ALWAYS herp, I mean [09:36] pokoli has joined the channel [09:36] deoxxa: i thought this was an equal derportunity group [09:36] benvie: and I don't need any amateur herpeculturalists to inform me [09:36] benvie: no such thing [09:37] benvie: too exclusive [09:37] deoxxa: the glass ceiling is real :( [09:37] deoxxa: for a humble derper [09:37] benvie: the snake celing knows no bounds and I am the one on top [09:37] deoxxa: truly a man among men [09:37] benvie: eat snakes mofos, eat them [09:37] deoxxa: delicious [09:37] benvie: I posted my poem to Brendan Eich [09:38] benvie: this will be an epic day [09:38] deoxxa: heh [09:38] benvie: it rated well anyway [09:39] benvie: but epic poems that combine the only good parts of the bible, combined with Eich cast as God [09:39] benvie: that has to the get points [09:40] benvie: lightning and thunder and retardation [09:40] benvie: like anger from the almight eich [09:40] benvie: pow pow pow [09:41] benvie: and we wipe out brow, exhausted after another day fighting for javascrikpt [09:41] benvie: lord eich of js, help me fight another day [09:41] be5invis: Benvie, are you still here? [09:42] benvie: smight the idtiots with justi [09:42] benvie: hey =D [09:42] be5invis: i've updated my README [09:42] be5invis: https://github.com/be5invis/moescript [09:42] benvie: exellent [09:42] benvie: MUCH better [09:42] be5invis: but github cannot highlight my code :-\ [09:42] benvie: do this [09:42] be5invis: thanks. [09:42] benvie: ```javascript [09:42] benvie: cide [09:42] benvie: ``` [09:43] benvie: code instead of cide [09:43] deoxxa: cider [09:43] benvie: like ```javascript [09:43] benvie: var awesome = true; [09:43] benvie: ``` [09:44] deoxxa: on fire today [09:44] be5invis: I don't know how to explain this feature. [09:44] benvie: (that's how all my code begins [09:44] laggyluker has joined the channel [09:44] be5invis: In Moe, any function containing ! will be compiled into something completely different [09:44] deoxxa: if (!awesome) { process.exit(-1); } [09:44] benvie: show me [09:45] be5invis: `!`, `wait` and `<-` [09:45] be5invis: makes functions into "monadic primitives" [09:45] benvie: so you're transpilinf, like coffeescro[t, or compressing [09:45] benvie: like uglify [09:45] benvie: convert or reduce [09:45] deoxxa: be5invis: moe == もえ? [09:45] be5invis: y [09:46] deoxxa: heh [09:46] be5invis: (name comes from vczh, my friend) [09:46] be5invis: updated [09:46] benvie: so we have a translator [09:46] be5invis: def f() = process wait loadResource(something) [09:46] be5invis: // def f = [build: fBuild] [09:46] be5invis: // where fBuild(schemata)()(): [09:46] be5invis: // return schemata.yield loadResource something, (resource) :> [09:46] be5invis: // return schemata.return process resource [09:46] be5invis: you can read my newest README [09:46] benvie: I mean english and me..it's Friday night [09:47] be5invis: in section "Monadic......" [09:47] benvie: far as I am concerned it's 1823 and we're crossing new worlds [09:47] benvie: deoxxa come back [09:47] benvie: you can do this [09:47] deoxxa: i'm all the way over here [09:47] benvie: don't csre you're herw noq [09:47] benvie: fix rhis [09:48] benvie: make stuf happen [09:48] benvie: this person is cool and needs helps [09:48] deoxxa: ok what am i fixing [09:48] benvie: speak that laguage [09:48] benvie: and figure out the stuff [09:48] deoxxa: japanese? pretty sure be5invis is chinese [09:48] benvie: no yeah it's chinese right [09:48] benvie: speak that [09:48] benvie: and do it [09:48] be5invis: I like Japanese animes XD [09:49] be5invis: The name, moe, comes from my friend "vczh" [09:49] benvie: speak chinese not japenese despite anime [09:49] deoxxa: i'll do a pretty bad job of speaking chinese - i only know some from learning japanese haha [09:49] jimt_ has joined the channel [09:49] benvie: so [09:49] benvie: I can speak english not so well right now [09:49] argami has joined the channel [09:49] be5invis: Deoxxa, my gtalk = typeof.net@gmail.com [09:49] benvie: I am out of human languages [09:49] be5invis: benvie, where are you come from? [09:50] benvie: I speak binary [09:50] deoxxa: that i can help with, benvie - i can translate drunkspeak to english if you like [09:50] benvie: binary [09:50] be5invis: robot? ...... [09:50] benvie: https://github.com/Benvie/reified [09:50] deoxxa: beep boop [09:50] benvie: binary [09:51] deoxxa: shower time [09:52] benvie: insult [09:52] be5invis: ���ڲ�������ô���Ḻ��� !��wait �� <- �ĺ����ᱻ������������������������ [09:52] benvie: he said you're a dick [09:52] benvie: I rhink [09:52] be5invis: I dont know how to explain that "Functions contain `!`, `wait` and `<-` will be compiled to something different" [09:53] benvie: late binding [09:53] be5invis: It is a key feature of Moe. [09:53] benvie: functional application [09:53] be5invis: It is similar to Monads in Haskell [09:53] benvie: yeah [09:53] ewalker has joined the channel [09:53] benvie: monads is a kind of functional application [09:53] benvie: a function is a parameter [09:54] benvie: but a monad requires a single one [09:54] benvie: and returns a single result [09:54] rlidwka has joined the channel [09:54] benvie: curry turns a multi-variate function into a set of single parametwr functions [09:54] be5invis: My point is: this transformation will happen to the function containing `!` calls. [09:54] be5invis: And the "function" will be actually an object [09:55] be5invis: with "build" method. [09:55] mehlah has joined the channel [09:55] benvie: you're probably smarter than like everyone in the world besides 5 people if you get the meaning through a language gap [09:55] benvie: not even joking [09:55] benvie: like 10 people understanding just normally [09:55] be5invis: https://github.com/be5invis/moescript [09:55] be5invis: Have you read my examples? [09:56] benvie: yeah it's haskell alright [09:56] be5invis: The last section [09:56] benvie: like super definitely heskell [09:56] benvie: ooh [09:56] be5invis: shows how compiler trated "monadic primitives" [09:56] benvie: well [09:56] benvie: try this [09:57] Inoperable has joined the channel [09:57] benvie: >> Array.apply(null, Array(32)).map(Function.call.bind(Number)).map(Math.pow.bind(null, 2)) [09:57] purr: benvie: (object) [1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536, 131072, 262144, 524288, 1048576, 2097152, 4194304, 8388608, 16777216, 33554432, 67108864, 134217728, 268435456, 536870912, 1073741824, 2147483648] [09:58] benvie: that's kind of monodadic in JS [09:58] be5invis: I know. [09:58] benvie: not the best but [09:58] benvie: it works! [09:58] benvie: no I'm reading [09:59] benvie: you're making list comprehsnsions but for JS [09:59] laggyluker: Hey, I'm trying to spawn a child process (vim) and bind it's stdin, stdout and stderr to a parent process. Here's the gist so far: https://gist.github.com/2180730 but it has a couple of bugs like backspace not working properly and it can't tell the actual size of the TTY window. Any ideas of what's missing here? [09:59] be5invis: (maybe translator needed) ����˵���ǣ��� Moe ������ض����ŵġ�����ֱ��������ʵ���Ǻ����� [09:59] benvie: to map tables( most usefully db tables) into JS [09:59] be5invis: �������Կ��ܻ��Ƚ��������⡣ [09:59] benvie: it's funny because [09:59] benvie: as functional as JavaScript is [10:00] benvie: it often isn't used that way [10:00] be5invis: benvie, did you know that in Haskell, list comprehension is implemented by monads? [10:00] benvie: you often need to find a library the's spcifically used for that purposw [10:00] benvie: yeah [10:00] benvie: everything is basically [10:01] be5invis: I do not want to be like what Coffee did. [10:01] benvie: js doesn't have haskell list comprehensions per se BUT [10:01] laggyluker_ has joined the channel [10:01] benvie: it's on the top of the list for ES6 in terms of things that will be added [10:01] be5invis: use multi-purpose syntaxes (functions with `<-` or `!`) instead of piling up syntax features. [10:01] benvie: ES6 is basically "take all the nest features from other languages [10:02] benvie: best [10:02] benvie: "and make them work in JavaScript" [10:02] be5invis: I don't like ES6 (except iterators). [10:02] benvie: yeah [10:02] benvie: Proxy [10:02] benvie: tell me you like Proxy! [10:02] benvie: the rest is fluff [10:02] be5invis: what is that? [10:02] benvie: Proxy is the key to all [10:03] benvie: Proxy is a metaobject which allows you to intercept all calls [10:03] be5invis: a project? or a DP? [10:03] benvie: http://wiki.ecmascript.org/doku.php?id=harmony:direct_proxies [10:03] benvie: so you can make fake objects [10:04] benvie: shells [10:04] benvie: but they look real [10:04] be5invis: ɽ��ɽ wow [10:04] benvie: yeah [10:04] benvie: the only things NOT intercepted are [10:04] benvie: [[class]] [[type]] [10:04] benvie: internal stuff [10:04] be5invis: JS does not need classes [10:05] benvie: well like [10:05] benvie: Object.prototype.toString.call([]) [10:05] benvie: is [object Array] [10:05] benvie: a Proxy will return the same value [10:05] benvie: Proxy([], {}) [10:06] benvie: Proxy([], {/*handler*/}) [10:06] graeme_f has joined the channel [10:06] benvie: OR even crazier [10:07] be5invis: OK. I've seen that Proxy is powerful [10:07] be5invis: However my crucial requirement is [10:07] be5invis: coroutine. [10:07] umren has joined the channel [10:07] benvie: Proxy([], Proxy({}, { get: function(trap({ return function(){ /*META handler }}))) [10:07] garrensmith has joined the channel [10:07] benvie: oh [10:07] benvie: coroutine: node thread_a_go_go [10:07] be5invis: It takes so many code to deal with monadic primitives [10:07] benvie: threads_a_go_go [10:08] benvie: https://github.com/xk/node-threads-a-gogo [10:08] be5invis: convert f!(args) to f(args, function(){what_is_next}) [10:08] be5invis: Do you know streamline or jscex? [10:08] benvie: I know of them, but I am not the expert [10:08] benvie: I am work with async [10:08] be5invis: they did the same what moe compiler did [10:08] be5invis: You can write [10:09] benvie: I get it though [10:09] benvie: yeah [10:09] be5invis: var r = getResource! address [10:09] benvie: synchronous code [10:09] be5invis: uinstead of [10:09] benvie: that relies on async [10:09] benvie: basically javascript has run to completion semantics [10:09] benvie: where [10:09] be5invis: getResource address, (r) => [10:09] benvie: var x = 10l [10:09] benvie: next line [10:09] benvie: console.log(x) [10:09] benvie: x is 10l [10:10] benvie: not 20 seconds in the future [10:10] be5invis: Monadic primitives in Moe [10:10] benvie: when it's a local resource it's frustrating [10:11] be5invis: is synchronous code, with asyncnronous meaning, and a more complicated form. [10:11] benvie: I call it one frame continuation [10:11] benvie: one millionth of a second, but it has to be the next frame [10:12] be5invis: Moe supports "bind points" ( f ! args) in ANYWHERE in ANY FLOW CONTROL [10:12] benvie: that sounds a lot of like the goal of what's his name [10:12] benvie: the _ thing [10:12] benvie: where _ means async [10:12] be5invis: yes, in streamline, we use _ [10:13] be5invis: in moe, we use ! and <- [10:13] be5invis: f!(args) for f(args, callback) [10:13] benvie: I guess it's streamline, thought there might be a specific [10:13] benvie: he's also involved with the threads-a-go-go too, what's his name [10:13] benvie: the streamline guy [10:13] be5invis: x <- val for schemata.bind(val, function( x ){ ...} ) [10:14] benvie: yeah so you say [10:14] benvie: a callback is bound to a schema [10:14] benvie: a value [10:14] argami has joined the channel [10:14] benvie: and completion [10:14] be5invis: Schema defines the behaviour of <- [10:15] be5invis: def f() = process wait loadResource(something) [10:15] be5invis: // def f = [build: fBuild] [10:15] be5invis: // where fBuild(schemata)()(): [10:15] be5invis: // return schemata.yield loadResource something, (resource) => [10:15] be5invis: // return schemata.return process resource [10:15] benvie: oh so it's like there's a provided set of behaviors [10:15] deoxxa: ahhh i love showers [10:15] be5invis: yes [10:15] janfabian has joined the channel [10:15] benvie: yeah [10:15] be5invis: yield, return and bind [10:15] benvie: that's a thing I see missing from mant frameworks [10:15] be5invis: schema has "yield", "bind" and "return" methods [10:15] benvie: also shower is what is that [10:15] benvie: wait sec [10:15] benvie: yield [10:15] be5invis: you can use the schemata to provide DSL's [10:16] benvie: make sure you're not hitting any new reserved keywords [10:16] deoxxa: benvie: you know, when you stand under a flowing stream of warm water for a while [10:16] be5invis: including list comprehensions [10:16] deoxxa: or cold, if you roll that way [10:16] benvie: yeah i last time I had a shower that made me reflect on it was 2 years ago, not that I haven't had one since [10:16] be5invis: f ! x will be converted into schemata.yield f x, callback [10:16] benvie: so list comprehenssions in JS [10:16] benvie: that's a kind of open terrirtory [10:17] benvie: syntax wise [10:17] benvie: there is no definition, but it's wanted [10:17] benvie: what day is this [10:17] benvie: Saturday? [10:18] be5invis: Monads can provide list comprehension, without adding new syntax [10:18] be5invis: It is saturday 18:17... in China [10:18] benvie: they can and they can't [10:18] benvie: the act of using them is a kind of syntax in such a simple language like javascript [10:18] be5invis: but we still need to add syntax to "indicate" callback-requiring function calls. [10:18] benvie: ok if it's saturday in china it's definiely saturday here [10:19] be5invis: Where are you? [10:19] benvie: yeah that's what I eman [10:19] benvie: mean [10:19] benvie: US, east coast [10:19] benvie: early morning [10:19] be5invis: i see... [10:19] benvie: I work for 3 days at a time [10:19] benvie: and sleep for one [10:20] benvie: I lose track of days and weeks [10:20] be5invis: haha. [10:20] benvie: not the usual ;_ [10:20] benvie: ;) [10:21] laggyluker_ has joined the channel [10:22] be5invis: My example code, https://gist.github.com/2180426 [10:22] benvie: ok so [10:22] be5invis: and https://github.com/be5invis/moescript [10:22] be5invis: goto section "List comprehension" [10:22] trivol has joined the channel [10:22] benvie: good haskell =D [10:23] benvie: with javascript sometimes it's like... [10:23] be5invis: the Gist it is written in Moe ... [10:23] benvie: what's the most amazing thing I can build from paper [10:23] benvie: the limitation sparks creativity [10:23] benvie: if you can invent your own language then you need to limit it [10:24] benvie: otherwise you can be flying on a winged hosrse [10:24] benvie: that can travel through time [10:24] benvie: and has rainbow wings [10:24] larsschenk has joined the channel [10:24] bergie has joined the channel [10:24] larsschenk1 has joined the channel [10:24] benvie: I like colors [10:24] benvie: BUT I have to tell mysekf [10:25] benvie: no, you cannot have infinite colors [10:25] larsschenk1 has left the channel [10:25] benvie: not until you invent all of them [10:25] benvie: so I am stuck on Windows with 16 colors [10:25] benvie: until these new patches land in node core [10:25] benvie: and then I will have 256 colors [10:26] benvie: it's kind of like that [10:26] scanf has joined the channel [10:26] benvie: more succinctly: [10:26] benvie: you make stuff you expect people will have, or will install [10:26] sinclair: shhh [10:28] be5invis: benvie, how do you evaluate this feature? [10:29] benvie: showing what I did to people an asking [10:29] benvie: like you have been =D [10:29] benvie: keep it up [10:29] be5invis: ... my bad english [10:29] benvie: is fine [10:30] benvie: be persistent though [10:30] garrensmith has joined the channel [10:31] be5invis: I mean how do you evaluate the feature, "Convert functions containing ! into callback requiring form?" [10:31] benvie: well you're asking a question that even nativen english speakers have 15o page discussions on the node mailing list about [10:31] benvie: I would say be involved in those [10:32] benvie: https://groups.google.com/forum/?fromgroups#!forum/nodejs [10:32] be5invis: Maybe I should add more samples and explains [10:32] benvie: "Evil threads" https://groups.google.com/forum/?fromgroups#!topic/nodejs/Wzcmz5zeqCE [10:32] benvie: 84 post [10:33] argami_ has joined the channel [10:33] benvie: in the last 2 weeks [10:34] be5invis: benvie, i think i am not good at explaining what i am thinking... [10:34] be5invis: especially in english [10:35] deoxxa: be5invis: you want to know what benvie thinks about the feature? [10:35] argami has joined the channel [10:35] be5invis: deoxxa: y. [10:35] deoxxa: ACTION tags benvie in [10:37] be5invis: have dinner. [10:37] be5invis: afk [10:38] disappea_ has joined the channel [10:42] TheJH has joined the channel [10:44] benvie: thing is [10:45] benvie: if he spoke completely perfect english [10:45] benvie: this would still be an issue [10:45] be5invis: back [10:45] benvie: it's not the human language, but the computer language [10:45] laggyluker_ has joined the channel [10:45] benvie: you're lucky I even know haskell [10:45] benvie: you may be in the wrong place =D [10:46] benvie: one of my best friends has been trying to sell me on clojurescript [10:46] benvie: not that I disbelieve or anything [10:47] benvie: but everything needs to compile to javascript for the web platform nowadays [10:47] be5invis: clojure? the lisp-like thing? [10:47] benvie: yeah kind of [10:47] benvie: lispy but mostly better [10:47] be5invis: Moe is web-compatible. [10:47] benvie: well I don't know [10:47] benvie: it seems better [10:48] benvie: I am only an expert for sure in one language [10:48] be5invis: I test Moe codes on web [10:48] benvie: which is j [10:48] benvie: js [10:48] benvie: I code in many others [10:48] be5invis: how do you evaluate coffeescript? [10:48] be5invis: i am interesting on this [10:48] benvie: but one I know all the semantics and specifics [10:49] be5invis: interested on this. [10:49] benvie: coffeescript codifies many good practices as a required part of the language basically [10:49] benvie: so in that way it is good [10:50] benvie: but on the otherhand a transpiled language ends up with too much requirements [10:50] benvie: it is not accessible [10:50] benvie: it does not automatically work [10:50] scanf has joined the channel [10:50] benvie: that will always be true [10:50] benvie: if I tell a new person a rule of javascript it will have value [10:50] benvie: will be remembered because it will always apply [10:51] benvie: the same is hardly true for coffe [10:51] benvie: and for me as an expert, it's only forcing me to do the things I know are usually right [10:51] benvie: and which I will likely do anyway [10:51] benvie: and in cases where I want to do different, it doesn't give me an option [10:52] benvie: I call it douglas crockfordism usually [10:52] lirla has joined the channel [10:52] be5invis: yes. coffee has too many limits [10:52] benvie: a prescribed way of doing things can often be right [10:53] be5invis: for example, "return" generation cannot be disabled [10:53] benvie: maybe almost always [10:53] FireFly: be5invis, why is that a problem? [10:53] benvie: but *always* right? [10:53] benvie: few things are that [10:53] FireFly: You can always explicitly return `undefined` or `void 0` [10:54] benvie: to bring back some glory, crockford never explivitly said he was always right [10:54] be5invis: auto return generation will cause strange behavior on constructors [10:54] FireFly: ah, that's true [10:55] be5invis: Moe supports both non-generated and generated [10:55] FireFly: you have to use "this" at the end of the function, or "@" [10:55] benvie: he just indicated it with his forceful tone of voice and js lint that actually says it [10:55] jimt has joined the channel [10:55] be5invis: indicated by colon and equal sign. [10:55] pors has joined the channel [10:55] FireFly: Moe compiles to JS? [10:55] FireFly: It's not on the altjs.org list [10:55] be5invis: def f( t ): t // undefined [10:55] be5invis: def f( t ) = t // return t [10:55] benvie: so regardless of the features of Moe [10:55] be5invis: it is a new thing [10:56] benvie: the issue is convincing people to use it [10:56] FireFly: Hm [10:56] benvie: which is the same thing coffee has to fight for, as example [10:56] FireFly: reminds me of Scala [10:56] FireFly: a bit [10:56] FireFly: well, that short snippet at least [10:56] satyr has joined the channel [10:57] benvie: it's functional generally [10:57] benvie: inspired more by the likes of haskell and scala than anything [10:57] benvie: which is a good starting point in my book [10:57] benvie: rather than say....Java =X [10:57] be5invis: Hmmm, firefly, some features DO come from Haskell [10:58] be5invis: for example [10:58] be5invis: where [10:58] be5invis: and [10:58] be5invis: `where` and monads [10:58] FireFly: Hm [10:58] FireFly: Got a link where I can read more about the language? [10:58] be5invis: https://github.com/be5invis/moescript [10:58] shinuza has joined the channel [10:59] be5invis: (ps. altjs.org is blocked by the manager of my school......) [10:59] FireFly: ... :\ [10:59] benvie: is that even used? if it is I need to go there [10:59] benvie: I just used google groups stuff [10:59] benvie: es-discuss is the important one for core JS [11:00] benvie: https://mail.mozilla.org/listinfo/es-discuss [11:00] benvie: that can be academic though since it's discussing the *future* language stuff most of the time [11:00] FireFly: altjs.org (and #altjs) was started sometime last year, but it seems it's more-or-less died now [11:01] FireFly: Hm [11:01] benvie: but es-discuss is super active anyway [11:01] benvie: 10-30 a day [11:01] FireFly: There's also this language: http://roy.brianmckenna.org/ inspired by Haskell, functional & compiles to JS [11:02] be5invis: roy is just a haskell replica [11:03] benvie: my friend is a clojure fanatic these days [11:03] FireFly: Hm [11:03] benvie: always telling me to get on it [11:03] FireFly: Moescript sure looks interesting [11:03] be5invis: Docs is still in progress [11:03] aslant has joined the channel [11:03] be5invis: (you can read it from src/doc/index.ed) [11:04] be5invis: (but it is still wip) [11:04] benvie: I'm not the best one to talk to about languages though, I focus on implementation mostly. [11:05] elifou`` has joined the channel [11:05] chrisumbel has joined the channel [11:06] hipsterslapfight has joined the channel [11:06] dannyamey has joined the channel [11:06] jackyyll has joined the channel [11:11] otih has joined the channel [11:12] herbySk has joined the channel [11:13] stagas has joined the channel [11:13] skm has joined the channel [11:14] fangel has joined the channel [11:17] otih has joined the channel [11:17] scanf has joined the channel [11:19] lperrin has joined the channel [11:21] graeme_f has joined the channel [11:23] take_cheeze has left the channel [11:24] skm has joined the channel [11:24] Country has joined the channel [11:26] broofa has joined the channel [11:27] ppcano has joined the channel [11:27] dylang has joined the channel [11:29] sigurding has joined the channel [11:29] jonaslund has joined the channel [11:30] sigurding has joined the channel [11:32] pickelsss has joined the channel [11:32] lpetre has joined the channel [11:32] syntaxiko has left the channel [11:33] lpetre: anyone know how to pass a custom lib/include dir to node-waf [11:38] stagas has joined the channel [11:41] skomski has joined the channel [11:42] sreeix has joined the channel [11:42] ph^ has joined the channel [11:43] skomski_ has joined the channel [11:45] scanf has joined the channel [11:48] stagas has joined the channel [11:51] sandfox has joined the channel [11:53] chrisumbel has joined the channel [11:54] archivebot has joined the channel [11:57] conntrack has joined the channel [11:59] cyberRodent has joined the channel [12:01] sectionme has joined the channel [12:01] Wizek has joined the channel [12:03] alexrbarlow has joined the channel [12:03] stafamus has joined the channel [12:05] jimt has joined the channel [12:06] Renegade001 has joined the channel [12:08] onar_ has joined the channel [12:08] be5invis: how to publish my lib to npm? [12:14] Vainoharhainen has joined the channel [12:15] ningu has joined the channel [12:16] ningu: if I don't need load balancing, just have one node process for my app running at the moment, does it make any sense to use haproxy? [12:17] ningu: nginx doesn't play well with socket.io or I would just use it [12:17] fomatin has joined the channel [12:18] graeme_f has joined the channel [12:19] robhawkes has joined the channel [12:19] subbyyy has joined the channel [12:19] sandfox has joined the channel [12:21] MartinCleaver has joined the channel [12:21] MartinCleaver has joined the channel [12:22] subbyyy has joined the channel [12:27] yawNO has joined the channel [12:27] yawNO: yo [12:28] deoxxa: ningu: yes, for a few reasons [12:28] stagas has joined the channel [12:28] deoxxa: ningu: haproxy will cache your static resources so less requests will hit node, and you can configure it to reject some obviously incorrect requests if you need to [12:29] deoxxa: plus if you send the correct headers for various resources, you can have haproxy cache a lot of your dynamic content too [12:30] Industrial has joined the channel [12:32] ningu: deoxxa: hmm ok [12:32] k1ttty has joined the channel [12:33] Renegade001 has joined the channel [12:35] rlidwka: ningu: you can use nginx and configure socket.io to connect to another port... that would work i guess [12:35] mikedeboer has joined the channel [12:36] erichynds has joined the channel [12:37] Skaag has left the channel [12:37] huggies has joined the channel [12:37] rlidwka: i mean setup backend on :8080 and nginx on :80 so any static files will be proxied with nginx:80 but socket.io connections will be established to yourapp:8080 directly [12:39] adrianF has joined the channel [12:42] bnoordhuis has joined the channel [12:42] argami has joined the channel [12:45] ningu: rlidwka: ahh right [12:45] redir has joined the channel [12:45] ningu: interesting idea [12:46] huggies has joined the channel [12:46] dragansah has joined the channel [12:46] ningu: but I'd rather not use other ports -- too many people can't connect to port 8080 [12:48] stagas has joined the channel [12:49] rlidwka: ningu: how many? [12:50] krnl has joined the channel [12:51] laggyluker has joined the channel [12:51] ningu: lots of firewalls don't allow outgoing connections on arbitrary ports [12:52] krnl: i'm watching a file. an other process writes to this file. when data arrived in the file, i would like to read it. im using createReadStream now, and it emits an "end" when reached the eof. is it possible to tell the ReadStream to start reading again even if previously it reached eof, but watch showed that new data arrived in it? [12:52] ningu: port 8080 *might* be an exception [12:52] ningu: but the only port I know for sure they can connect to is port 80 [12:52] Morkel has joined the channel [12:53] SiGe: ningu: What's wrong with a reverse proxy setup? like the one rlidwka said [12:53] lmorchard has joined the channel [12:54] ningu: SiGe: because I don't want socket.io be on port 8080 if people can't connect to it. [12:54] _rockbot_ has joined the channel [12:54] SiGe: ningu: Just use upstream? let nginx connect to port 8080 [12:54] ningu: nginx can't proxy socket.io [12:55] SiGe: ACTION not a node user [12:55] SiGe: isn't socket.io an HTTP server? [12:55] ningu: the technical details are not entirely clear to me, but websockets transport and xhr-polling transport don't work behind an nginx proxy [12:55] taryk has joined the channel [12:55] ningu: xhr-polling can be made to work by patching socket.io [12:55] rlidwka: nginx talks HTTP/1.0 to its upstream... so there are no nice websockets there :) [12:56] SiGe: ah, right rlidwka [12:56] SiGe: ty for reminding that again to me >.< [12:56] ningu: rlidwka: the nginx folks say though that when 1.1 is supported for upstream websockets still won't work [12:56] Swizec has joined the channel [12:57] TheJH has joined the channel [13:00] yawNO: rlidwka: websockets should be implemented in the next beta afaik [13:00] yawNO: but theres a patch on GN [13:00] yawNO: *GG [13:00] yawNO: GH [13:01] ningu: they told me websockets would not be in 1.2 [13:01] ningu: just http 1.1 upstream [13:02] ningu: although they couldn't say why that wouldn't be sufficient, just that it wasn't [13:02] crutex has joined the channel [13:02] crutex has joined the channel [13:03] stagas has joined the channel [13:03] arduix has joined the channel [13:04] arduix: need help http://pastebin.com/PHwz3jD0 [13:05] deoxxa: arduix: your_array.map(function(e) { return e.followed; }) - this is pretty basic javascript man [13:06] argami has joined the channel [13:06] sigurding has joined the channel [13:07] arduix: thanks deoxxa , i have never used javascript before nodejs =] [13:08] ningu: how old is javascript man, have they done c14? [13:09] ningu: http://en.wikipedia.org/wiki/Java_man [13:09] davidwalsh has joined the channel [13:09] davidwalsh has left the channel [13:09] yawNO: arduix: use Array.filter [13:09] deoxxa: ningu: he's prehistory [13:09] ningu: sadly, Java man's bytecode was not preserved [13:10] deoxxa: yawNO: no, Array.map is what he wants. Array.filter will just, well, filter the array. [13:10] deoxxa: .map transforms it [13:10] arduix: .map works =] [13:10] yawNO: deoxxa: oh i read it wrong [13:10] yawNO: sorry [13:10] yawNO: my bad [13:11] skm has joined the channel [13:11] ningu: I often chain filter and map -- sometimes filter, then map, then filter again -- looks somewhat ugly maybe but it works well for certain things [13:14] argami has joined the channel [13:15] drudge has joined the channel [13:29] shinuza has joined the channel [13:35] chrisumbel has joined the channel [13:36] jamesd_ has joined the channel [13:40] robi42 has joined the channel [13:40] sigurding has joined the channel [13:42] archivebot has joined the channel [13:43] HardFu has joined the channel [13:44] HardFu: anyone using consolidate.js with handlebars [13:44] robhawkes has joined the channel [13:45] tokumine has joined the channel [13:46] garrensmith has joined the channel [13:48] tvw has joined the channel [13:49] hij1nx has joined the channel [13:50] baudehlo has joined the channel [13:53] quackquack has joined the channel [13:53] caike has joined the channel [14:02] argami has joined the channel [14:08] HacDan has joined the channel [14:08] MartinCleaver has joined the channel [14:08] MartinCleaver has joined the channel [14:11] cjm has joined the channel [14:11] MrNko has joined the channel [14:11] redir has joined the channel [14:13] c4milo1: ryah: the last number in v8 version is an internal revision that you guys handle at Joyent? [14:13] graeme_f has joined the channel [14:17] lookatmeyou has joined the channel [14:17] lookatmeyou has left the channel [14:17] beeviz has joined the channel [14:20] bshumate has joined the channel [14:22] Renegade001 has joined the channel [14:26] infynyxx has joined the channel [14:29] mattgifford has joined the channel [14:29] spcshpopr8r has joined the channel [14:30] hipsterslapfight has joined the channel [14:31] seanstickle has joined the channel [14:33] jimmyrcom has joined the channel [14:33] robhawkes has joined the channel [14:33] jimmyrcom has joined the channel [14:33] HardFu: man [14:33] HardFu: I feel stupid [14:33] HardFu: trying to use consolidate with handlebars or mustache [14:34] HardFu: can't get it working properly [14:34] HardFu: anyone care to help? [14:35] baudehlo1 has joined the channel [14:39] sawgij has joined the channel [14:39] trivol has joined the channel [14:41] hij1nx has joined the channel [14:43] jimt_ has joined the channel [14:43] tylerstalder has joined the channel [14:48] TheAlphaNerd has joined the channel [14:49] brianseeders has joined the channel [14:52] robhawkes has joined the channel [14:53] ronbas has joined the channel [14:54] baudehlo has joined the channel [14:55] hackband has joined the channel [14:58] bshumate has joined the channel [15:00] Vespakoen has joined the channel [15:01] Brandon_R has joined the channel [15:02] innociv__ has joined the channel [15:02] Brandon_R: Hey guys [15:02] Brandon_R: is node.js crypto lib fast? [15:03] herbySk has joined the channel [15:03] laner has joined the channel [15:09] archivebot has joined the channel [15:10] jzacsh has joined the channel [15:11] der| has joined the channel [15:11] Rob- has joined the channel [15:11] der|: where do I find http.js if node has been installed using the Macintosh .pkg ? [15:12] TheAlphaNerd has joined the channel [15:13] rlidwka: der|: nowhere :) it's in the source code [15:13] der|: rlidwka: ah, so I would need to build it from source in order to patch, got it... [15:13] der|: rlidwka: thanks [15:14] rlidwka: it's compiled into binary, so you can patch the binary but i wouldn't recomment it [15:14] rlidwka: so yes, built it from source [15:14] rlidwka: *build [15:15] pendlepa1ts has joined the channel [15:16] paul__ has joined the channel [15:17] Brandon_R: :) [15:20] argami has joined the channel [15:20] mandric has joined the channel [15:21] context: jaha. it will be whatever person node is running as (like ALL apps) so stop running your app as root [15:21] Destos has joined the channel [15:22] context: err oops. that was probably pretty o [15:22] context: old [15:22] ap has joined the channel [15:22] bios has left the channel [15:22] jon13210 has joined the channel [15:23] rlidwka: context: a lot of apps is designed to be ran as root and downgrade permissions then [15:23] argami_ has joined the channel [15:26] Vespakoen_ has joined the channel [15:26] zackattack has joined the channel [15:29] programming-love has joined the channel [15:30] jxie has joined the channel [15:30] jay has joined the channel [15:31] programming-love: I have an real problem in understanding nodejs and I am new to it . where nodejs in useful ? for making a website , just like what I do with php or for what ? [15:32] caike has joined the channel [15:32] context: programming-love: yes. [15:33] rlidwka: programming-love: for anything involving network programming [15:33] programming-love: so how can I use it for making an simple web page in apache web server [15:34] rlidwka: why do you want to use apache web server? :) [15:34] be5invis has joined the channel [15:35] programming-love: I just want to know that is it possible to use it with apache ? [15:35] rlidwka: yes it's possible [15:35] chadskidmore has joined the channel [15:35] zemm has joined the channel [15:35] AndreasMadsen has joined the channel [15:35] programming-love: So if not with apache , with what ? [15:37] rlidwka: node IS webserver, why do you want another webserver in front of it?) [15:38] spion1 has joined the channel [15:38] programming-love: Oh !! you mean that i can only use node in my host ? okay ? [15:38] rlidwka: you can [15:39] programming-love: So what are the other things that I cant do with nodejs [15:39] mc: make toast [15:39] mc: fly to space [15:40] janfabian has joined the channel [15:40] mc: teach a monkey sign language [15:40] mc: well.. actually.. you probably could [15:40] rlidwka: wait wait... you can write up a toast controller in c++ and compile it with node [15:41] mc: i'm totally designing a REST interface to my toaster [15:41] rlidwka: by the way, there is HTCPCP protocol, see http://www.ietf.org/rfc/rfc2324.txt [15:41] rlidwka: :D [15:42] programming-love: How can I use nodejs with apache ? [15:43] stagas has joined the channel [15:43] subbyyy has joined the channel [15:43] RLa has joined the channel [15:43] enmand has joined the channel [15:43] reprisal has joined the channel [15:43] JmZ_ has joined the channel [15:43] neumino has joined the channel [15:43] jimbot2 has joined the channel [15:43] stef has joined the channel [15:43] wankdanker has joined the channel [15:43] thetony has joined the channel [15:43] zedas has joined the channel [15:43] Aikar has joined the channel [15:43] Ezku has joined the channel [15:43] SlexAxton has joined the channel [15:43] bailer has joined the channel [15:43] slurp has joined the channel [15:43] racar has joined the channel [15:43] jmmills has joined the channel [15:43] iain_ has joined the channel [15:43] rektide has joined the channel [15:43] VesQ has joined the channel [15:43] insin: why is the dziuba troll post back on reddit? [15:43] JmZ_ has joined the channel [15:43] hz has joined the channel [15:43] rlidwka: programming-love: setup it as a reverse proxy [15:43] mmalecki: but you probably don't want that. [15:43] mmalecki: insin: because r/programming is full of retards [15:44] eggburt has joined the channel [15:45] mattgifford has joined the channel [15:45] markwubben has joined the channel [15:46] mauritslamers has joined the channel [15:47] programming-love: I ask you as the one I think that is very professional in nodejs (Without any zeal to nodjs ) : Is there any reason that I use nodejs instead of php or python for creating web application ? I mean application for interacting with database and etc [15:48] seanstickle: Yes. [15:49] programming-love: What reasons ? [15:49] rook2pawn: programming-love: If you love functional, concurrent programming, then node is right for you. If you just want to get something done, then its not a requirement to use node. [15:50] meelash has joined the channel [15:50] programming-love: You mean that nodejs provides better things but it takes more time for creating what someone want to make with php or python ? [15:50] archivebot has joined the channel [15:50] jdeibele has joined the channel [15:50] seanstickle: Also, if you like JavaScript as a language, it's a fine choice. [15:51] rook2pawn: programming-love: yes. It is "weird" for someone coming straight from PHP, i would imagine [15:52] programming-love: but if I just have apache and I have to use it , nodejs still better vs php ? (Because php is actually for apache and apache provide fantastic tools for it) [15:53] seanstickle: programming-love: !better [15:53] archivebot has joined the channel [15:53] seanstickle: Dang. [15:53] seanstickle: programming-love: is Japanese better than Dutch? [15:54] rlidwka: i'd say anything better that php lol... that thing doesn't even know about fastcgi :) [15:54] programming-love: Mayble in syntax or vocabulary Japanese is better or Dutch maybe !! [15:54] tlynn has joined the channel [15:55] seanstickle: programming-love: ok, I give up [15:55] programming-love: So can you please give me some help for finding a resource for configuring nodejs for apache ? [15:55] sorensen__ has joined the channel [15:57] seanstickle: programming-love: http://lmgtfy.com/?q=node.js+%20apache [15:58] archivebot has joined the channel [15:58] programming-love: thanks every one ! LOVE [15:59] programming-love has left the channel [16:01] briancray has joined the channel [16:02] argami has joined the channel [16:02] lzskiss has joined the channel [16:03] stafamus has joined the channel [16:04] sorensen__ has joined the channel [16:04] skomski has joined the channel [16:07] dthompso99 has joined the channel [16:08] argami has joined the channel [16:08] Renegade001 has joined the channel [16:10] chrisumbel has joined the channel [16:12] noding has joined the channel [16:12] halfhalo has joined the channel [16:12] dodo_ has joined the channel [16:13] noding: I have an question about apache and nodejs ? in this url : http://arguments.callee.info/2010/04/20/running-apache-and-node-js-together/ it says that i should use terminal for running node but I have bought an host and I can't access terminal in an host ? How can I do it ? [16:14] MartinCleaver has joined the channel [16:14] Maxani has joined the channel [16:14] Lee- has left the channel [16:15] mmalecki: noding: you can't [16:15] noding: what can I do ? [16:16] mmalecki: noding: use some paas or a vpn [16:16] Vespakoen_ has left the channel [16:16] pland has joined the channel [16:16] noding: can you explain more ? [16:16] mmalecki: er, vps [16:16] graeme_f has joined the channel [16:17] pland: hm. no change at all to git repo, was running yesterday, I start node app today, chrome hangs, firefox hangs, no clue as to why…how do I go about finding out what's happening? [16:17] mmalecki: noding: what should I explain? [16:18] noding: I don't know what do you mean by vpn or paas ... [16:18] mmalecki: noding: platform as a service and virtual private server [16:18] mmalecki: noding: paas as in nodejitsu, no.de, etc. [16:18] noding: So I can't do it from cpanel ? [16:19] mmalecki: no, unless you have shell access [16:19] noding: Can I do it with some client shell application like putty or etc [16:19] mmalecki: noding: yes [16:20] ccare has joined the channel [16:20] lynda has joined the channel [16:20] noding: And if I close the shell will it destroy ? Like what happen when I close terminal in my laptop ? [16:21] mmalecki: noding: you have to use some kind of daemonizer (forever, aeternum, nohup) [16:21] AndreasMadsen: hmm my terminal just started up as super user, that can't be good. [16:25] adrianF has joined the channel [16:25] theCole has joined the channel [16:25] PinguinDude has joined the channel [16:25] mattgifford has joined the channel [16:27] Brandon_R: lol [16:27] sandfox has joined the channel [16:28] stagas has joined the channel [16:28] AndreasMadsen: Brandon_R: care to share [16:29] Aria has joined the channel [16:29] mattgifford has joined the channel [16:29] hex`` has joined the channel [16:30] hex``: in app.js (main file), how can I make a variable I create global to all modules? [16:30] sandfox: why would you want too.... [16:30] hex``: ok [16:30] sandfox: no seriously, whats the reason, as its mostly a bad idea [16:30] sandfox: but sometimes its justified [16:30] hex``: I'm trying to separate files: socket.js will handle the sockets (using socket.io), but for that I need to pass the server variable (http.createServer...) which runs in app.js [16:31] AndreasMadsen: hex``: global.variable = value; But is it usually a bad idea [16:31] sandfox: you should pass one of your things into another of your things… if thats makes sense [16:31] hex``: AndreasMadsen right... can you think of any ideas to my case? [16:32] sandfox: are your separate files separate classes, functions, whatever? [16:32] hex``: functions [16:32] hex``: what I tried to do is to exports.server = server in app.js and try to required('app') [16:32] AndreasMadsen: hex``: you should export a init function from socket.js. And execute require('/socket.js').init(server); from app.js [16:32] sandfox: what he said ^ [16:32] hex``: but I reached a point where I'm like 'I have no idea what I'm doing' [16:33] hex``: AndreasMadsen hmmmm [16:33] hex``: if that isn't too much, can you point me to a doc about init function? [16:33] hex``: I google here and nothing seems to call my attention [16:34] AndreasMadsen: hex``: there is no init function, you can call it what you will [16:34] AndreasMadsen: in your socket.js write: exports.callMeToSetupSocketIO = function (server) { /* socket.io logic */ }; [16:35] AndreasMadsen: I just suggest exports.init = function () {} [16:35] hex``: thank you very much!! [16:35] hex``: I'll try that [16:35] candybar has joined the channel [16:36] AndreasMadsen: hex``: the module documentation is here -> http://nodejs.org/api/modules.html#modules_module_exports [16:36] hex``: ry [16:36] hex``: ty* [16:38] boltR has joined the channel [16:40] Wizek has joined the channel [16:41] kranius has joined the channel [16:42] ppppaul_ has joined the channel [16:43] pland: ACTION slaps himself for forgetting to start mongodb [16:43] DJBouche has joined the channel [16:45] enmand has joined the channel [16:45] jay has joined the channel [16:47] mraxilus has joined the channel [16:47] robi42 has joined the channel [16:51] ramitos has joined the channel [16:51] ryah: c4milo1: no - v8 version number comes from google [16:52] hij1nx has joined the channel [16:52] c4milo1: ryah: I was curious because I couldn't find the tag 3.6.6.24 in v8 repo [16:53] stagas has joined the channel [16:54] ryah: c4milo1: http://code.google.com/p/v8/source/browse/branches/3.6/src/version.cc#35 [16:54] dthompso99 has joined the channel [16:55] c4milo1: I see [16:57] _sri has joined the channel [16:58] alek_b_ has joined the channel [16:58] patcito has joined the channel [16:59] relling has joined the channel [17:00] lawrab has joined the channel [17:01] simenbrekken has joined the channel [17:02] alejandromg has joined the channel [17:03] Karmaon has joined the channel [17:04] brainss has joined the channel [17:05] robi42 has joined the channel [17:06] dob_ has joined the channel [17:06] crutex has joined the channel [17:06] crutex has joined the channel [17:07] linnet has joined the channel [17:08] args[0] has joined the channel [17:11] jimmysparkle has joined the channel [17:12] gozala has joined the channel [17:14] mikedeboer has joined the channel [17:14] markwubben has joined the channel [17:16] baudehlo has joined the channel [17:16] trivol has joined the channel [17:17] UnCO has joined the channel [17:17] zackattack has joined the channel [17:17] ping86 has joined the channel [17:17] aspecto has joined the channel [17:18] jtsnow has joined the channel [17:19] meandi8 has joined the channel [17:19] trivol has joined the channel [17:20] dylang has joined the channel [17:21] blueadept has joined the channel [17:21] blueadept has joined the channel [17:23] boltR has joined the channel [17:25] nakkor has joined the channel [17:26] nakkor_ has joined the channel [17:26] onar has joined the channel [17:27] achiu has joined the channel [17:28] ceej has joined the channel [17:29] trivol has joined the channel [17:29] nakkor_ has joined the channel [17:30] nakkor__ has joined the channel [17:31] nakkor has joined the channel [17:32] ping86: How I can create RESTful API with Redis easily? [17:33] spathi^ has joined the channel [17:34] ceej_ has joined the channel [17:35] josh-k has joined the channel [17:35] Marak has joined the channel [17:36] yhpark has joined the channel [17:37] blueadept has joined the channel [17:38] AdamGoodrich has joined the channel [17:39] Ricket: ping86: Well, I'd start by looking up how to create a RESTful API with Node, and then connect that to Redis... [17:40] ping86: With a module? [17:41] alejandromg has joined the channel [17:41] justicefries has joined the channel [17:41] be5invis has joined the channel [17:42] achiu has joined the channel [17:43] Ricket: ? [17:44] nakkor has joined the channel [17:44] devaholic has joined the channel [17:45] ping86: Do you know any example or module that you can recommend? [17:45] Ricket: For what? [17:45] ping86: Restul API [17:45] nakkor has joined the channel [17:46] jamesd has joined the channel [17:46] be5invis: Writing docs makes me crazy... [17:46] leet has joined the channel [17:46] Marak: be5invis: its slightly better then answering the same questions over and over again [17:46] be5invis: Marak: ic. [17:47] fmeyer has joined the channel [17:47] nakkor has joined the channel [17:47] Guest96781: i'm writing a large node native addon, is there a way to throw a js exception inside of the init method? [17:48] _ritch has joined the channel [17:48] Ricket: ping86: Nope, never done it before sorry, Google is (probably) your friend [17:49] ping86: thanks ricket [17:49] hackband has joined the channel [17:50] _ritch: Does nodes base64 encoder / decoder support chunked encoding? [17:51] dnolen has joined the channel [17:51] Marak: ping86: looks noob friendly https://github.com/visionmedia/express-resource [17:51] ceej has joined the channel [17:52] ping86: thanks Marak [17:52] Marak: ping86: this looks more robust https://github.com/flatiron/director/ [17:53] kirbysayshi has joined the channel [17:54] ramitos has joined the channel [17:54] tylerstalder has joined the channel [17:56] devaholic has joined the channel [17:56] mikedeboer has joined the channel [17:57] dragansah has joined the channel [18:01] joshthecoder has joined the channel [18:03] rauchg has joined the channel [18:04] ericmuyser has joined the channel [18:04] baudehlo has joined the channel [18:04] seanstickle has joined the channel [18:05] brianseeders has joined the channel [18:07] wutt has joined the channel [18:08] wutt: cheers all [18:08] phoochka has joined the channel [18:12] hellp has joined the channel [18:12] cconstantine_ has joined the channel [18:14] markwubb_ has joined the channel [18:14] djbell has joined the channel [18:14] jsurfer has joined the channel [18:17] ningu has joined the channel [18:18] ramitos has joined the channel [18:18] devaholic has joined the channel [18:19] bshumate has joined the channel [18:23] MartinCleaver has joined the channel [18:23] MartinCleaver has joined the channel [18:23] automata has joined the channel [18:24] arduix: is there any fonction to remove xss in nodejs? [18:24] arduix: function* [18:26] isaacs has joined the channel [18:27] briancray has joined the channel [18:27] j3ffko has joined the channel [18:28] lohkey has joined the channel [18:29] skm has joined the channel [18:29] hagope has joined the channel [18:29] hagope: hello [18:30] JJMalina has joined the channel [18:30] hagope: is anyone familiar with the fs.writeFile function of Node FS? [18:30] hagope: http://nodejs.org/docs/v0.5.4/api/fs.html#fs.writeFile [18:31] artusrocha has joined the channel [18:31] AviMarcus has joined the channel [18:31] hagope: ==> My issue is the I'm trying to write a JPEG image to the FS but its not encoding [18:31] hagope: correctly [18:31] sha0coder has joined the channel [18:31] sha0coder: hi [18:32] aspecto has joined the channel [18:32] sha0coder: is there node.js for android? [18:33] alejandromg: hagope: check out this https://github.com/alejandromg/nvideo/blob/master/server.js#L49 [18:34] hagope: @alejandromg thanks ill check it out [18:35] aspecto has left the channel [18:36] hagope: @alejandromg this looks good, this is synch so there is no callback right? [18:37] specto_ has joined the channel [18:38] _mrb_ has joined the channel [18:38] alejandromg: hagope yep! But there is the same function for async as you said above [18:40] aspecto has joined the channel [18:41] joshontheweb has joined the channel [18:42] wilmoore has joined the channel [18:43] joemccann has joined the channel [18:43] guidocalvano has joined the channel [18:44] nakkor has joined the channel [18:44] devaholic has joined the channel [18:47] nakkor_ has joined the channel [18:51] nakkor has joined the channel [18:51] willwhite has joined the channel [18:53] whaley has joined the channel [18:53] spcshpopr8r: hallo #node.js [18:54] skm has joined the channel [18:54] spcshpopr8r: so, I've learned that npm 1.1.12 now excludes symbolic links from packages...I'd like to know why for...can one of you kind souls point me in the right direction that I might learn more? [18:55] mmalecki: spcshpopr8r: windows doesn't handle them well :/ [18:55] graeme_f has joined the channel [18:55] spcshpopr8r: ^ ah...sure, damned cross-platform compatibility....bit by interoperability once again [18:56] spcshpopr8r: I dream of the day when we are no longer trapped within the confines of windows [18:56] mmalecki: spcshpopr8r: I dream of the day when there's no more windows [18:57] brianleroux has joined the channel [18:57] devongovett has joined the channel [18:58] arduix has joined the channel [18:58] devongovett has joined the channel [18:58] arduix: is there any fonction to escape html char in nodejs? [18:59] recrof has joined the channel [18:59] whaley has joined the channel [19:00] WeeJeWel has joined the channel [19:00] mikeal has joined the channel [19:01] linnet has joined the channel [19:01] TooTallNate has joined the channel [19:04] robhawkes has joined the channel [19:05] dilvie has joined the channel [19:05] thetony: escape() [19:06] t0mmyvyo has joined the channel [19:10] TheJH has joined the channel [19:14] brianleroux has joined the channel [19:15] jzacsh has joined the channel [19:15] jzacsh has joined the channel [19:16] dreamdust has joined the channel [19:17] dreamdust: How do I deal with keeping node application servers modular? IE how do I deal with sessions while having multiple node processes? Best practices? Modules? Articles? [19:18] zomg: dreamdust: use something like Redis for storing them, all your processes can access the same storage then [19:18] dreamdust: k that's what I thought. [19:19] dreamdust: Are there any good solutions to watching for a node process blocking and spawning new ones? [19:19] dreamdust: Like thread-pooling/queueing? [19:21] thinkt4nk has joined the channel [19:23] reprisal has joined the channel [19:23] markq has joined the channel [19:24] brianleroux has joined the channel [19:24] dreamdust: Do most people use cluster? Or is there some other tool that is preferred by most? [19:25] thetony: lol@redis site having youporn on it [19:25] taryk has left the channel [19:26] alejandromg: thetony: funny stuff [19:26] Wizek has joined the channel [19:26] jon13210_ has joined the channel [19:26] alejandromg: but the funniest part is that @antirez linked that talk xD [19:27] khrome has joined the channel [19:28] westg has joined the channel [19:28] arduix: is there any alternative to htmlspecialchars() in nodejs? [19:28] scanf has joined the channel [19:31] fangel has joined the channel [19:31] st_luke has joined the channel [19:32] cconstantine_: hi? [19:33] skeptic has joined the channel [19:34] alonsebastian has joined the channel [19:34] specto_ has joined the channel [19:35] seanstickle has joined the channel [19:38] mansoor has joined the channel [19:40] arduix: why str.replace() doesn't replace after a \n? [19:40] insin: arduix: example? [19:41] zemanel has joined the channel [19:41] igl has joined the channel [19:42] ericmuyser has joined the channel [19:42] dreamdust: arduix: If you're using a regular expression in the replace() method, you may need to specifify the global flag to replace all occurrences of the match. [19:42] jgornick has joined the channel [19:42] arduix: no im not using regex [19:42] arduix: http://pastebin.com/4sMGPAEB [19:43] dreamdust: IE: "\nFooBar\n".replace(/\n/g, ''); // "FooBar" [19:43] insin: what is this I don't even [19:43] sorensen__ has joined the channel [19:43] insin: where's your code? [19:44] ccare has joined the channel [19:44] twittard has joined the channel [19:44] twittard: Is the Homebrew formula for Node borked? [19:45] arduix has joined the channel [19:45] dreamdust: arduix: http://stackoverflow.com/questions/1967119/why-does-javascript-replace-only-first-instance-when-using-replace [19:45] sreeix has joined the channel [19:47] epokmedia has joined the channel [19:48] arduix: thanks dreamdust [19:49] shinuza: twittard: don't know, but there's a pkg on node.js website if you like [19:49] mansoor: Lesson learned: don't use async.js on massive array of tasks :( [19:49] shinuza: I always compile by hand for the docs tho [19:50] scanf has joined the channel [19:53] hagope: IM using this FS function fs.createWriteStream [19:54] hagope: however, how do I ensure the the entire file has been flushed to disk [19:54] hagope: my data is JPEG Files [19:55] RobWC has joined the channel [19:55] shinuza: does anyone know how I can pipe incoming data from a stream to a buffer or a file like object? I don't want to mess with the encoding, too [19:55] rlidwka: hagope: write anything you need and then listen for 'drain' event? [19:55] RobWC has left the channel [19:55] hagope: @ rlidwka what is the drain event? [19:55] hagope: @rlidwka what is the drain event? [19:55] t0mmyvyo has joined the channel [19:56] shinuza: hagope: http://nodejs.org/docs/latest/api/stream.html#stream_event_drain [19:57] zenista has joined the channel [19:59] TheJH has joined the channel [19:59] rlidwka: hm... maybe destroySoon() and 'close' event will be better... dont sure here [20:02] ParadoxQuine has joined the channel [20:03] criswell has joined the channel [20:05] mandric has joined the channel [20:06] rlidwka_ has joined the channel [20:08] zenista: for css framework which one is better less or stylus [20:08] arduix has joined the channel [20:08] JJMalina has joined the channel [20:08] insin: which syntax and feature set do you prefer? [20:08] sechrist has joined the channel [20:09] systemfault: I prefer stylus because of transparent mixins :P [20:10] kmiyashiro has joined the channel [20:10] hij1nx has joined the channel [20:11] t0mmyvyo has joined the channel [20:11] zenista: does less also has precompile option at server leel [20:11] zenista: *level [20:12] twittard has left the channel [20:12] kjeldahl has joined the channel [20:13] infynyxx has joined the channel [20:15] hij1nx has joined the channel [20:16] dtrejo has joined the channel [20:17] jimmysparkle has joined the channel [20:18] baudehlo has joined the channel [20:20] baudehlo has joined the channel [20:21] nbari has joined the channel [20:23] nbari: hi all, i am starting to learning node.js, but have some questions, for every server/project/code, the current dir will be the root for the node ? [20:24] nbari: I mean if i use /home/lab/node.js/test, and later change to /home/lab/node.js/test2 I have to install on test2 all the modulees and extras? [20:24] rlidwka_: zenista: i've used less for some time :) well... i dont know what's better. Trying to learn and support both [20:24] nbari: or is there a single location where I could install and share libraries [20:24] nbari: in my case currenlty tryiing to learn how to use node.js with redis [20:24] zomg: nbari: if you mean npm, then the default is to install in the current dir [20:25] zomg: There are some ways you can fiddle with the paths for it but I haven't really needed to do that so can't help with that [20:25] rlidwka_: nbari: you can install everything into /home/lab or even into /home - it would work [20:25] nbari: ok is just that i accidentally chane dir and re run npm and notice that strart installing everyting [20:25] nbari: ok so then basicaly each code/server nees it own 'sandbox' [20:25] rlidwka_: no [20:26] zomg: nbari: it's just the default [20:26] nbari: ok [20:27] nbari: instead of creating multiple dirs, is there a "best practice" way of storing the code or either paths ? [20:28] hij1nx has joined the channel [20:28] nbari: at the end the modules are .js files also right ? [20:29] Brandon_R has joined the channel [20:29] Brandon_R: Hi guys [20:30] hooch_ has joined the channel [20:32] philips has joined the channel [20:33] blueadept has joined the channel [20:35] TimTimTim has joined the channel [20:36] owen1: nbari: http://book.mixu.net/ch8.html [20:36] pendlepa1ts has joined the channel [20:41] whaley has joined the channel [20:42] counterbeing has joined the channel [20:42] onar_ has joined the channel [20:42] criswell has joined the channel [20:42] jzacsh has joined the channel [20:43] caike has joined the channel [20:44] PinguinDude has joined the channel [20:45] pid has joined the channel [20:48] FredC has joined the channel [20:49] Wizek has joined the channel [20:52] stafamus has joined the channel [20:53] codelahoma has joined the channel [20:53] shinuza has joined the channel [20:54] dtrejo has joined the channel [20:54] archivebot has joined the channel [20:54] wendall911 has joined the channel [20:55] _baton_ has joined the channel [20:55] hipsters_ has joined the channel [20:57] dilvie has joined the channel [20:57] hipsterslapfight has joined the channel [20:59] eldar_ has joined the channel [20:59] JmZ_ has joined the channel [20:59] robhawkes has joined the channel [21:01] chapel has joined the channel [21:01] HacDan has joined the channel [21:06] broofa_ has joined the channel [21:06] hooch_ has left the channel [21:07] yaymukund has joined the channel [21:09] hij1nx has joined the channel [21:09] infynyxx has joined the channel [21:10] eldar_: hi! Is there any example of a fairly complex site written in node/express? Tutorials are nice, but I'd like to see how real world web applications are developed using the technology.. [21:10] seanstickle: eldar_: I once asked the same question about APL [21:10] owen1: eldar_: not complex, but might help - https://github.com/visionmedia/express/blob/2.x/examples/blog/models/post.js [21:11] owen1: eldar_: eldar_ also look at this template - https://github.com/Skookum/base12/tree/master/app [21:11] owen1: seanstickle: what's apl? [21:11] orlandovftw has joined the channel [21:11] seanstickle: owen1: programming language [21:11] papple has joined the channel [21:12] pendlepa1ts has joined the channel [21:12] RLa: i think there are considerable apps written in apl [21:12] eldar_: owen1, thanks, I'll have a look [21:12] RLa: but i guess mostly financial/statistics, not web apps [21:13] seanstickle: RLa: getting source for them is also incredibly difficult [21:13] RLa: btw, are you taking part in dyalog apl competition? [21:13] seanstickle: Since most significant code bases are proprietary [21:14] seanstickle: RLa: of course :) [21:14] jacobolus has joined the channel [21:16] randombbbb has joined the channel [21:17] randombbbb: Is it just me, or both nodejs.org and registry.npmjs.org are down? [21:17] hipsterslapfight: just you [21:17] westg: just you [21:17] enjalot has joined the channel [21:18] broofa_ has joined the channel [21:19] seanstickle: Although I would prefer to use an open source APL interpreter to program with [21:20] ramitos has joined the channel [21:20] reprisal has joined the channel [21:20] pizthewiz has joined the channel [21:21] Wizek has joined the channel [21:21] seanstickle: http://www.downforeveryoneorjustme.com/nodejs.org [21:22] jamesd has joined the channel [21:23] tuhoojabotti: Up? [21:25] ramitos has joined the channel [21:25] t0mmyvyo has joined the channel [21:26] drostie has joined the channel [21:27] redir has joined the channel [21:27] brianleroux has joined the channel [21:28] shinuza has joined the channel [21:29] gozala has joined the channel [21:31] ramitos has joined the channel [21:31] bergie has joined the channel [21:34] derekv has joined the channel [21:34] Internet13 has joined the channel [21:35] Renegade001 has joined the channel [21:35] graeme_f has joined the channel [21:36] `3rdEden has joined the channel [21:36] tlack has joined the channel [21:38] dtrejo has joined the channel [21:40] Hamms has joined the channel [21:41] Internet13 has joined the channel [21:41] willwhite has joined the channel [21:42] mattgifford has joined the channel [21:43] socketio\test\33 has joined the channel [21:44] socketio\test\39 has joined the channel [21:44] markq has joined the channel [21:45] nbari has joined the channel [21:45] nbari: . [21:45] nbari: test [21:47] briancray has joined the channel [21:48] brianleroux has joined the channel [21:49] broofa has joined the channel [21:49] Qzen has joined the channel [21:49] JJMalina has joined the channel [21:50] itabhijitb has joined the channel [21:50] criswell has joined the channel [21:50] hij1nx has joined the channel [21:50] itabhijitb: Need help with socket.io [21:50] itabhijitb: While running one of the examples I got the Error Message [21:50] itabhijitb: abhibhat@abhibhat-VirtualBox:/usr/src/node_modules/socket.io/examples/chat$ node app.js [21:50] itabhijitb: info - socket.io started [21:50] itabhijitb: app listening on http://0.0.0.0:3000 [21:51] itabhijitb: /usr/src/node_modules/socket.io/lib/manager.js:915 [21:51] itabhijitb: match = req.url.substr(0, resource.length); [21:51] itabhijitb: ^ [21:51] itabhijitb: RangeError: Maximum call stack size exceeded [21:51] itabhijitb: My socket.io@0.9.2 and node.js v0.7.7-pre [21:51] tlack: is that function calling itself? sounds like recursion run amok [21:52] itabhijitb: This is one of the example and its actually failing in socket.io. I got the same error running another program failing at the same location [21:52] itabhijitb: Looks like a problem with the socket.io library [21:52] itabhijitb: has any one faced the same issue before? [21:56] bicranial has joined the channel [21:56] zomg: itabhijitb: have you tried it with node 0.6.x? [21:56] zomg: 0.7.x is unstable [21:56] zomg: or dev, or whatever it was called =) [21:56] zomg: 0.6.x is stable in any case. [21:57] mmalecki: 0.7.x is stable. its API isn't :) [21:58] zomg: Yep [21:58] onar_ has joined the channel [21:59] itabhijitb: @zomg: Thx let me try with 0.6.* [21:59] Destos has joined the channel [22:01] dodo_ has joined the channel [22:02] dtrejo has joined the channel [22:03] jlank_ has joined the channel [22:04] broofa has joined the channel [22:05] JJMalina has joined the channel [22:09] bartt1 has joined the channel [22:09] JJMalina has joined the channel [22:09] fomatin has joined the channel [22:10] broofa has joined the channel [22:10] louissmit has joined the channel [22:11] Wizek_ has joined the channel [22:12] broofa has joined the channel [22:14] crutex has joined the channel [22:15] xat-- has joined the channel [22:15] Vespakoen has joined the channel [22:16] daniel__ has joined the channel [22:17] daniel__: what template engines is typically used? [22:17] wao has joined the channel [22:17] Octayn: there is no typical really [22:17] daniel__: ive been using jade, just wondering what else is there [22:22] zomg: daniel__: ejs, mustache [22:22] zomg: some others too I'd guess [22:23] Octayn: As long as we're talking clientside templates there's flatiron, weld, closure, jquery, pure, and more [22:24] daniel__: can you recommend any of them? [22:24] Octayn: I like flatiron but lots don't [22:25] daniel__: from nodejitsu? [22:25] Octayn: Yes [22:26] tvw has joined the channel [22:26] westg has joined the channel [22:29] elifou``` has joined the channel [22:30] westg: anyone here using mongoose [22:30] zomg: Yeah [22:30] tlack: daniel__: dust has some interesting features such as async display of your template (so you can get output to the browser before your data is entirely loaded) [22:30] sha0coder has joined the channel [22:31] tlack: daniel__: they all have their pluses and minuses, there really is no 'best' [22:34] kmiyashiro has joined the channel [22:35] inadarei has joined the channel [22:36] Wa has joined the channel [22:36] westg: zomg: do you know if dbrefs are like 'joining' of collections? [22:36] zomg: Haven't used them but as far as I can tell yeah something like that [22:37] westg: cool thanks [22:38] tornad has joined the channel [22:45] bshumate has joined the channel [22:46] sha0coder has joined the channel [22:48] sha0coder: cya [22:49] JJMalina has joined the channel [22:51] evilnate has joined the channel [22:51] evilnate: hello moto? [22:51] IrishGringo has joined the channel [22:52] evilnate has joined the channel [22:53] joshthecoder has joined the channel [22:53] fmeyer has joined the channel [22:55] isaacs_mobile has joined the channel [23:00] Axsuul has joined the channel [23:01] derekv: command "express -c stylus" does not work for me, what is it supposed to do ? [23:01] mikeal has joined the channel [23:03] \mSg has joined the channel [23:03] hij1nx_ has joined the channel [23:03] zomg: derekv: define "does not work" [23:03] Vespakoen has joined the channel [23:03] marlun: Anyone who is running mocha tests using "npm test" script? When a test fials mocha seems to return a non-zero value which cases npm to also show an error, I would like to nly see the error which mocha shows, any ideas on how to solve that? [23:03] evilnate has joined the channel [23:03] evilnate: undefined [23:04] derekv: no such file to load -- active_support/core_ext/string (LoadError) [23:04] lperrin has joined the channel [23:04] derekv: Just wondering, what would it have done if it had worked? [23:05] derekv: Its part of a tutorial I'm following is all [23:05] optixx_ has joined the channel [23:05] evilnate has joined the channel [23:05] eeemsi has joined the channel [23:05] zomg: derekv: not sure, have you installed stylus? [23:05] zomg: I think it has something to do with that [23:06] Nomon__ has joined the channel [23:06] derekv: zomg me too =] I'm not sure... seems to be two ways to install stuff, gem install or npm install, and I'm feeling as I'm feeling this out [23:06] zomg: You probably should use npm [23:06] derekv: i did npm install express and npm install stylus and it complete successfully, but they do not become commands in my path. [23:06] evilnate: lol, this is node, don't use `gem` [23:07] derekv: fine, laugh ! =P [23:07] zomg: derekv: you need to use npm install -g packagename to install it "globally", then it should make the executables available [23:07] derekv: ahhhh thanks [23:07] subbyyy has joined the channel [23:08] derekv: gem is ruby ... [23:08] derekv: It had packages for this stuff though. [23:09] derekv: zomg That worked [23:09] derekv: it creates a shell project in the current directory [23:11] fmeyer has joined the channel [23:12] evilnate: curious: which node packages are in gem? [23:13] TheAlphaNerd has joined the channel [23:14] isaacs has joined the channel [23:14] pgte has joined the channel [23:17] ParadoxQuine has joined the channel [23:22] derekv: perhaps none, i'm an idjiot [23:22] khrome has joined the channel [23:23] jzacsh has joined the channel [23:24] derekv: there is something in gem that is called express, the shell command installed also creates a project shell (ruby) [23:24] derekv: Stuff for the heroku stack can be installed via gem, so that's where my confusion started, is all [23:25] briancra_ has joined the channel [23:25] evilnate has joined the channel [23:26] reid has joined the channel [23:26] reid has joined the channel [23:27] mc has joined the channel [23:28] evilnate has joined the channel [23:29] context has joined the channel [23:30] heavysixer has joined the channel [23:32] evilnate has joined the channel [23:32] TooTallNate: test [23:33] seanstickle: Test what? [23:33] TooTallNate: side project http://cl.ly/2U3b150v2f2g1x36203c [23:34] seanstickle: Well, isn't that fancy. [23:34] TooTallNate: well.... not yet ;) [23:34] mc: oh, it's fancy alright [23:35] seanstickle: Fancy enough to bother the channel! [23:35] TooTallNate: colors, clickable links, image embedding... [23:35] TooTallNate: THEN it'll be fancy [23:35] seanstickle: You could have annoyed ##cs instead! [23:35] seanstickle: They're lonely, they could have used the company [23:35] TooTallNate: http://www.youtube.com/watch?v=ur3iEHo6rI8 [23:35] TooTallNate: ^ then it'll be fancy [23:36] lohkey has joined the channel [23:36] tlack: caca is such a trippy library [23:37] mc: you know why they call it caca? [23:37] mc: because that's what it looks like [23:37] seanstickle: Like a crow calling out to it's mate? [23:38] mc: poop, sir [23:38] mc: like poop [23:38] arlink has joined the channel [23:38] evilnate: undefined [23:39] arlink: does express/socket.io automatically give my client a cookie? [23:39] evilnate: arlink: you mean a session cookie? [23:39] evilnate: not by default, but if you're using the session() middleware, then yes [23:39] arlink: evilnate, yes [23:39] arlink: oh i see. i am [23:39] evilnate: :) [23:42] agnat has joined the channel [23:48] nicholasf has joined the channel [23:49] bicranial has joined the channel [23:51] arduix: need help in regex [23:51] arduix: #xxx# <= it work on php how to use it on nodejs? [23:53] dnolen has joined the channel [23:53] caike has joined the channel [23:54] tlack_ has joined the channel [23:55] marina_- has joined the channel [23:57] RLa: #xxx# is hardly a regex [23:58] tuhoojabotti: :D [23:58] RLa: arduix, read some tutorial on javascript regexes :) [23:58] arduix: i won't >.< [23:59] hipsterslapfight has joined the channel