[00:00] isaacs has joined the channel
[00:00] mscdex has joined the channel
[00:00] mscdex has joined the channel
[00:01] gerad has joined the channel
[00:01] jchris1 has joined the channel
[00:03] saikat has joined the channel
[00:03] jchris1 has joined the channel
[00:11] hornairs has joined the channel
[00:13] CIA-93: node: 03Daniel Gröber 07master * r1f7026e 10/ cmake/libs.cmake : cmake: add -lutil - http://bit.ly/gVZbtl
[00:13] CIA-93: node: 03Tom Hughes 07master * re03fae1 10/ (3 files): cmake: Fix OpenSSL detection and node crypto compilation. - http://bit.ly/eKEcnp
[00:13] CIA-93: node: 03Tom Hughes 07master * rae8262a 10/ (4 files in 2 dirs): cmake: Add toolchain file for cross-compiling. - http://bit.ly/hEinIV
[00:19] Kryckan has joined the channel
[00:20] ceej_ has joined the channel
[00:22] mscdex: jeesh, even the opensolaris virtualbox image is a pita
[00:24] tjholowaychuk has joined the channel
[00:26] isaacs: Validatorian: the `npm ls` command caches for an hour
[00:27] cafesofie has joined the channel
[00:30] isaacs_ has joined the channel
[00:30] omygawshkenas has joined the channel
[00:34] MattDiPasquale has joined the channel
[00:34] charlenopires has joined the channel
[00:35] mjr_: sh1mmer: he's on IRC from time to time, but doesn't idle here.
[00:36] mjr_: sh1mmer: I think v8-profiler broke after one of the V8 updates. I've not been able to get it to work for a few weeks.
[00:36] mjr_: But the new hotness is oprofile. Ryan put in a configure option for it.
[00:36] sh1mmer: mjr_: the last commit was 'fix for 0.3.2-pre' but I can't get it to compile on that either
[00:36] sh1mmer: oh well
[00:37] jashkenas has joined the channel
[00:37] sh1mmer: mjr_: do you know off the top of your head what the configure flag for oprofile is?
[00:38] mjr_: looks like configure --oprofile
[00:38] tjholowaychuk: isnt it just --oprofile
[00:38] mjr_: I guess?
[00:38] sh1mmer: dunno
[00:38] sh1mmer: ACTION tries
[00:38] mjr_: I saw Ryan do it on his laptop, and it worked, but then starting oprofile took a whole bunch of magical oprofile commands.
[00:39] chapel: hmm
[00:39] mjr_: Worth it though, I think. The output from the V8 profiler is nearly worthless.
[00:39] sh1mmer: ok that configuration immediately breaks on my mac
[00:39] tjholowaychuk: hahah yeah.. is oprofile that much different?
[00:39] ryah: mjr_: we should quantify how useless it is
[00:39] mjr_: oprofile is linux only
[00:39] ryah: and let them know
[00:39] tlrobinson_ has joined the channel
[00:39] chapel: do you have to use crypto and set an authorize header if you are connecting to an https server using httpclient? not trying to authenticate mind you
[00:39] sh1mmer: ACTION boots an ubuntu machine
[00:40] ryah: i think they just get an intrerupt every N seconds and see which function they are in
[00:40] ryah: log it to a file
[00:40] ryah: seems like it should work
[00:40] mjr_: ryah: yeah, I'm sure they are doing what seems like the right thing. Maybe running inside of node makes it tend to miss things.
[00:41] mjr_: ryah: the top functions in the profile output seem to have a tiny percentage of the time, and seem to be only loosely related to where the actual time is spent.
[00:42] mjr_: Whereas the oprofile output seemed to the right, or at least it was closer to what I would expect.
[00:42] ceej_ has joined the channel
[00:42] tjholowaychuk: its useless, even for heavy js stuff like kraken's gaussian blur, I still get like 10% node or something stupid
[00:43] mjr_: I'd think that pure JS stuff would be perfect for the V8 profiler.
[00:43] ceej_ has left the channel
[00:43] vineyard has joined the channel
[00:43] tjholowaychuk: not from what ive seen, I havent had any luck with that thing
[00:43] mjr_: I have used the same profiler in Chrome to tune browser code, and it worked as expected.
[00:43] SwiftLayer: I am new to key value based thinking... have always designed single server mysql apps in the past.... been trying to figure out the best solution for a scalable social community app... I do know that I want to write the front end the php zend framework and that I want to write the application "services" middle tier using node.js, what I am having a problem figuring out is the best way to implement the database... I was thinking
[00:43] SwiftLayer: Redisql for non persistent data like user sessions data etc... but have been scratching my head on the best way to implement a socail graph using a key/value database... my relational RDBMS mindset is having a hard time figuring out how one would implement a social graph over a key value db such as membase which is very elastic and could scale and I know these databases are considered schemaless but there has to be some sort of
[00:43] SwiftLayer: model I can wrap my head around? and what about stuff like node/egde traversal over key value store? is there some advice anyone could give or some document that explains how you would develop a database aplication over a key value db
[00:44] sh1mmer: mjr_: why is oprofile linux only?
[00:44] sh1mmer: what's the dependancy?
[00:44] mjr_: sh1mmer: low level Linux kernel magic
[00:44] sh1mmer: "magic"
[00:44] sh1mmer: :)
[00:44] JusticeFries has joined the channel
[00:45] tjholowaychuk: damnit
[00:45] tjholowaychuk: need to ditch osx
[00:46] ceej__ has joined the channel
[00:47] mjr_: sh1mmer: it is more or less the same reason that Linux doesn't have DTrace.
[00:47] mjr_: As I see it, the issue is that oprofile is kind of cool already, and implementing DTrace is really hard.
[00:48] pquerna: freebsd did it with 1.5 guys :P
[00:48] isaacs: from what i hear at work, dtrace is like, trivial man. so super easy.
[00:48] baoist_ has joined the channel
[00:48] ryah: https://gist.github.com/752381
[00:48] ryah: :)
[00:49] isaacs: ryah: nice
[00:49] pquerna: its not about dtrace being hard, for linux its about it being under a bad license.
[00:49] wao: j/w 40
[00:49] isaacs: pquerna: ah, i see.
[00:49] ryah: pquerna: from what i've heard - it's about dtrace being hard.
[00:49] tyfighter has joined the channel
[00:49] ceej__ has left the channel
[00:49] ryah: and that the license arguments are just an excuse
[00:50] pquerna: ryah: yes, its hard , but it could never make mainline... FreeBSD guy did it mostly by himself at first... and no doubt again it was hard.. but the licensing was figured out.
[00:50] pquerna: darwin did it too
[00:50] pquerna: so, yeah, its hard, but its already on 3 OS..
[00:51] ryah: apparently linux, what was the phrase, is a "heaping pile of sewage"
[00:51] pquerna: hah, i can only imagine who might say such a thing :)
[00:51] ryah: and will take large refactors to allow it to happen
[00:52] ryah: ACTION goes back to his nice high-level debugger world
[00:52] ryah: legos!
[00:52] pquerna: did it crash at backtrace?
[00:52] namelessnotion has joined the channel
[00:53] ryah: just didn't include the backtrace
[00:53] pquerna: sweet :)
[00:54] ryah: https://gist.github.com/752381
[00:54] ryah: it's not very pretty
[00:55] ryah: but - yes. launching a subprocess on 'debugger;' hits
[00:55] ryah: (which happens to be node's built-in debugger in the case)
[00:55] ryah: but in the future will allow for an env var to be set which can start arbitrary things
[00:55] ryah: like node-inspector &; google-chrome localhost:8000;
[00:57] deepthawtz has joined the channel
[01:00] ezmobius has joined the channel
[01:00] ryah: i was programming some node this week
[01:00] ryah: and realized what a shitty expereience it was
[01:00] ryah: like - all the debuggers are pretty painful
[01:00] isaacs has joined the channel
[01:00] ryah: or at least getting them going is hard
[01:01] pquerna: yes, a bundle ddeveloper would be ideal.
[01:01] pquerna: bleh
[01:01] basus-nb has joined the channel
[01:01] pquerna: a bundled developer would be extra nice.
[01:01] pquerna: but a debugger would be sweet too.
[01:01] basus-nb: Has anyone tried using node.js inside an Emacs inferior process?
[01:02] pquerna: back to travel and the cold white north. have a good holidays o/
[01:05] iaurynn has joined the channel
[01:07] ysynopsis has joined the channel
[01:07] chapel: does anyone have an example of using http.client to send post data
[01:07] c4milo1 has joined the channel
[01:07] chapel: I am having trouble figuring out how I should send the form elements
[01:07] thebigbad: chapel: mikeal's request does POSTs
[01:08] chapel: okay will look
[01:08] thebigbad: https://github.com/mikeal/node-utils/tree/master/request
[01:08] WarriorSl has joined the channel
[01:11] ryah: pquerna: have a good trip
[01:11] ryah: \o/
[01:12] ryah: ACTION loves the debugger
[01:12] tjholowaychuk: ACTION is stoked for debugger
[01:13] ryah: debugger is making zombies now
[01:14] basus-nb: what do most people here to program for Node.j?
[01:14] basus-nb: I'd really like to be able to hook up node to Emacs, but it doesn't seem to be working right
[01:16] mscdex: basus-nb: notepad++ or gedit
[01:16] mscdex: or nano for some quick editing
[01:16] mscdex: :>
[01:17] chapel: thebigbad: the only example is a couchdb post, which is for sending json
[01:17] chapel: hmm I have to be going about it wrong, cant you do posts with ?blah=blah?
[01:18] thebigbad: chapel: your post needs a body, but you can also have query string parameters
[01:18] ryah: basus-nb: what's wrong?
[01:18] ryah: basus-nb: i dont use emacs
[01:18] thebigbad: they'll be in request.url
[01:18] chapel: thebigbad: well I am not sure about how to format the body
[01:18] basus-nb: ryah: I get control characters showing up as part of the prompt
[01:19] thebigbad: chapel: what's the content type?
[01:19] ryah: basus-nb: maybe set env NODE_NO_READLINE=1
[01:19] chapel: umm, I hope you understand I am sending post data
[01:19] chapel: not parsing it
[01:20] chapel: so I have to make the headers, and the post body
[01:20] chapel: so the content type is whatever I make it
[01:20] CIA-93: node: 03Ryan Dahl 07debugger * rd596024 10/ (lib/_debugger.js lib/readline.js src/node.cc):
[01:20] CIA-93: node: Fork out to debugger on debugger statements
[01:20] CIA-93: node: Also implement continue in Client. - http://bit.ly/hbynvr
[01:20] thebigbad: chapel: and whatever you make it determines how you should format the body
[01:20] chapel: well whatever works tbh
[01:20] thebigbad: if it's mutlipart/form you do one thing
[01:20] chapel: I just need to send 2 form fields of data
[01:20] thebigbad: if it's application/json you fo anything
[01:21] mscdex: chapel: you can probably get by just by doing querystring.stringify for the post body and that should be it
[01:21] chapel: atm I have it as application/x-www-form-urlencoded
[01:21] chapel: but how do I assign it to the form fields?
[01:21] basus-nb: my prompt looks like ^[[0G^[[0Gnode> ^[[0K^[[0G^[[6C
[01:22] yuryb has joined the channel
[01:22] thebigbad: chapel: I don't understand the words you are saying. can you post a snippet?
[01:22] davidwalsh has joined the channel
[01:22] mscdex: chapel: the body would be: querystring.stringify({field1: 'value1', field2: 'value2'});
[01:23] chapel: okay
[01:23] mscdex: which should give you something like: field1=value1&field2=value2
[01:25] wdperson has joined the channel
[01:25] derferman has joined the channel
[01:26] bingomanatee has joined the channel
[01:26] _mql has joined the channel
[01:26] chapel: hrm
[01:26] chapel: idk, Ive done that, but its still not working it seems
[01:26] hobodave has joined the channel
[01:26] mscdex: gist your code
[01:27] chapel: https://gist.github.com/f0793bb453502904fb80 << you will laugh when you see it
[01:27] chapel: but not for the reasons you think
[01:29] mscdex: you said you changed the content type to application/x-www-form-urlencoded right?
[01:29] chapel: well I had
[01:29] chapel: either one didn't work
[01:29] mscdex: you definitely don't want multipart
[01:30] chapel: well either way, it just does a 302 redirect to /gists/new
[01:30] chapel: hmm, maybe I am missing something
[01:31] isaacs_ has joined the channel
[01:31] dbrock has left the channel
[01:32] SvenDowideit has joined the channel
[01:32] isaacs: ryah: how would you feel about an os.getgid(name)
[01:32] isaacs: ryah: or os.getuid(name)
[01:33] possibilities has joined the channel
[01:34] isaacs: or maybe just os.getpwnam(name) that returns a passwd obj
[01:35] isaacs: and os.getgroup(name || gid) that returns the group obj
[01:36] basus-nb: ryah: it looks like a problem with the emacs interaction mode
[01:36] chapel: hmm
[01:36] chapel: the only example I have for creating a gist not on the website is using a ruby script
[01:36] chapel: and tbh that doesn't help
[01:36] isaacs: chapel: yeah, and the gist gem stoped working for me when they did the https lockdown
[01:37] ceej_ has joined the channel
[01:37] chapel: here is a python one
[01:37] chapel: https://github.com/davglass/gist/blob/master/gist.py
[01:38] chapel: davglass :)
[01:38] zorzar has joined the channel
[01:39] chapel: but again, it should hypothetically work anonymously
[01:40] chapel: since you can great gists anonymously
[01:40] chapel: seems like what mscdex said, to stringify it as a querystring should be enough right?
[01:42] chapel: oh
[01:42] chapel: it is that simple...
[01:42] chapel: fark
[01:42] chapel: just was missing a field
[01:43] chapel: bah
[01:43] chapel: ACTION needs to stick his foot in his mouth
[01:43] mscdex: heh
[01:43] chapel: had to add file_ext[gistfile1]
[01:43] chapel: :(
[01:44] chapel: I mean Im happy, but I hate coming in here whining about shit, when I should play around more
[01:44] chapel: wasting peoples time
[01:44] chapel: sorry
[01:44] chapel: appreciate the help though
[01:45] basus-nb has left the channel
[01:46] mscdex: no problem :)
[01:46] mikew3c has joined the channel
[01:46] JimBastard has joined the channel
[01:47] JimBastard: hey SubStack
[01:47] JimBastard: you alive johnny five
[01:47] chapel: oh JimBastard
[01:47] chapel: any luck on that problem?
[01:47] perezd has joined the channel
[01:47] jakehow has joined the channel
[01:47] JimBastard: chapel: yeah, i got a commit that will better validate package.json
[01:48] JimBastard: if you need that app deployed right now i can clear everything out and we can try again
[01:48] JimBastard: id rather just wait until i can improve the process a little more
[01:48] chapel: so if its the package.json issue, it still doesn't work after fixing it?
[01:48] perezd: hey everyone, total noob here, looking for socket.io and Rails advice. Is Juggernaut still the recommended path to take when building a realtime/push web app using Rails 3?
[01:48] mikeal: wrong channel for Rails advice dude
[01:49] perezd: mikeal: more curious what the socket.io take on it is
[01:49] perezd: or the node community, less so what the Rails people think
[01:49] chapel: well node.js is great for real time push webapps
[01:51] perezd: chapel: yeah, I am sort of jumping into this environment...and wanting to ultimately use Rails for the backend, but build in a tier for push/realtime
[01:51] chapel: if you are starting from scratch, why not use node all the way?
[01:51] perezd: but not sure if one does that, or just embraces node directly, and then connects via services to a backend rails app
[01:51] perezd: etc
[01:52] perezd: chapel: it probably makes more sense to maintain the web application at the rails tier for a number of good reasons, but I wanted to integrate node into it at the "right" level, see what I mean?
[01:52] MattJ has joined the channel
[01:52] perezd: i mean, maybe not...
[01:52] perezd: not really sure
[01:52] chapel: well is this an existing application?
[01:52] perezd: looking for advice
[01:52] perezd: no
[01:53] ceej_ has left the channel
[01:53] chapel: so why use rails?
[01:53] JimBastard has joined the channel
[01:53] chapel: just wondering
[01:53] perezd: well, I am comfortable with it.
[01:53] perezd: really like to use AR for modeling the data model etc
[01:54] perezd: usually I'd say, its great for obvious MVC situations
[01:54] perezd: but
[01:54] perezd: when I am going backbone.js + socket.io
[01:54] perezd: that probably changes the situation a bit
[01:54] ceej_ has joined the channel
[01:54] JimBastard: perezd: https://github.com/cloudhead/resourcer
[01:55] perezd: interesting
[01:56] perezd: there is a library called juggernaut that is designed for integrating socket.io into the Rails tier, is that sort of thing only necessary for pre-existing apps, from this perspective ?
[01:56] fmeyer has joined the channel
[01:57] chapel: well you can do what you want, but I am biased towards using node as the whole stack
[01:57] chapel: there are benefits, like true interoperability
[01:57] perezd: chapel: I totally think that makes sense
[01:57] perezd: can u expand a bit on interoperability?
[01:57] chapel: but then again, if you aren't familiar with it, and more with rails, then the weight is more on rails
[01:58] perezd: well I am open to learning, but I want to understand the decision that I make
[01:58] chapel: well its easier to build it together under the same language, because you can have processes talk to each other easier (not that its impossible otherwise) and you can run similar code in the browser or even the same code as on the server
[01:58] perezd: juggernaut for rails, for instance, is ruby + redis + node
[01:58] perezd: ah I see
[01:59] BrianTheCoder has joined the channel
[01:59] perezd: chapel: if you were starting in the node scene today, what resources would you recommend I dive into?
[01:59] chapel: are you familiar with js?
[01:59] perezd: yes, very
[01:59] chapel: http://howtonode.org
[01:59] chapel: is a good start
[02:00] chapel: http://nodejs.org/docs
[02:00] chapel: http://nodejs.org/docs/v0.3.2/api/
[02:00] perezd: I assume there are not books or things
[02:00] chapel: no not really
[02:00] JimBastard: perezd: http://blog.nodejitsu.com
[02:00] chapel: and anything not in the last few months is quite out of date
[02:01] chapel: not entirely
[02:01] perezd: yeah, thats what i figure
[02:01] nonnikcam has joined the channel
[02:01] isaacs has joined the channel
[02:01] chapel: also node uses ecma 5
[02:01] chapel: so there are probably things you aren't familiar with outside the browser
[02:02] perezd: yeah, I've heard
[02:02] chapel: its quite nice
[02:02] perezd: chapel: have u ever done rails before?
[02:02] chapel: I am still learning
[02:03] chapel: a bit of rails but nothing too deep
[02:03] perezd: curious if you have any insight into the contrast
[02:03] JimBastard: contrast of what perezd ?
[02:03] chapel: the big thing to contrast is that rails is a framework, node.js is javascript, on the server
[02:03] perezd: the differences when designing a webapp in node vs ruby
[02:03] JimBastard: in ruby you'd prob want to use rails
[02:03] perezd: well I was talking more about node vs ruby for web projects
[02:03] perezd: less about rails in particular
[02:03] perezd: yeah, or sinatra
[02:04] chapel: so instead of making a webapp to use on a ruby web server, node.js lets you make the web server and the app
[02:04] JimBastard: rails is better for easy mode sites
[02:04] JimBastard: node is better for more serious things
[02:04] chapel: if you are familiar with sinatra check out express
[02:04] perezd has left the channel
[02:04] chapel: but for the most part, nothing in node is wizardy
[02:04] chapel: or magic
[02:05] SubStack: JimBastard: pow
[02:05] chapel: unless its SubStack
[02:05] JimBastard: hey SubStack
[02:05] perezd has joined the channel
[02:05] perezd: hey sorry
[02:05] chapel: rails does magic
[02:05] chapel: keeps you out of the behind the scenes stuff
[02:05] halfhalo: damn straight it does
[02:05] perezd: yeah, this is true.
[02:05] chapel: there are modules in node that do a lot of things like orm and what not
[02:05] chapel: but even then, its really easy to get into the nuts and bolts
[02:06] SubStack: javascript magic is easier than ruby magic
[02:06] chapel: but dont let that scare you
[02:06] JimBastard: SubStack: i did a funny little mashup with optimist and resourcer
[02:06] chapel: it is crazy how easy it can be to make some advanced stuff with node
[02:06] JimBastard: SubStack: now i can use resourcer properties as optimist options
[02:06] SubStack: nifty
[02:06] ukev has joined the channel
[02:06] JimBastard: there is a validator in there too, but im not quite using it yet
[02:07] JimBastard: this way, i can use my models with optimist commands
[02:07] JimBastard: the model becomes the options
[02:07] chapel: perezd: like I created a 43 line script that takes post data of an image and pipes it up to imgur and returns a url
[02:07] JimBastard: SubStack: check out how unkosher this looks: https://gist.github.com/752450
[02:07] chapel: could be simpler too
[02:07] perezd: chapel: thats pretty sweet
[02:08] chapel: mind you it has 2 modules included
[02:08] eee_c has joined the channel
[02:08] chapel: but they are built in
[02:08] SubStack: JimBastard: are you using harmony proxies?
[02:09] JimBastard: SubStack: that sounds like a smart thing to do, no
[02:09] chapel: I think the real cool thing is just being able to do things like take a tcp connection and pipe it to an http connection (ryah did a demo doing that)
[02:09] JimBastard: SubStack: its all meta magic
[02:09] JimBastard: how would a proxy help?
[02:10] chapel: I am sure there are other people that are more knowledgeable about rails and node to give you a better comparison than myself perezd
[02:10] SubStack: well with harmony proxies you can trap updates recursively to the data structures
[02:10] wasabist_ has joined the channel
[02:10] perezd: chapel: your advice has been great tho, appreciate the help :)
[02:10] halfhalo: ACTION hearts rails
[02:10] JimBastard: SubStack: resoucer might use those internally, but i dont see how that would help what im doing?
[02:10] chapel: np, always trying to share the koolaid
[02:11] Aikar: is it spiked koolaid
[02:11] Aikar: if so, hook me up
[02:11] chapel: well I would say node.js is as spiked as you can get
[02:11] chapel: I am pretty drunk off of it
[02:11] Aikar: lol
[02:11] chapel: Ive had node dreams
[02:11] SubStack: well I guess I would have a better idea of what resourcer is if there was a readme :p
[02:12] JimBastard: SubStack: its an ODM, and its pretty sweet
[02:12] JimBastard: we use it in our stack for models
[02:12] JimBastard: but im using it in this new CLI tool for much more heinous purpose
[02:12] SubStack: right
[02:12] JimBastard: im using its built in validators and what not
[02:12] perezd: halfhalo: are you using rails and something like socket.io?
[02:13] JimBastard: so i can create a 1:1 match from the CLI api to the internal
[02:13] JimBastard: without rewriting it all
[02:13] halfhalo: nope, I usually do node for server side stuff and rails for the interface
[02:13] chapel: sounds odd halfhalo
[02:14] chapel: why not use node for the interface too?
[02:14] chapel: ooc
[02:14] SubStack: anyhow, proxies are awesome for O[RD]M interfaces, like this: https://github.com/substack/node-permafrost
[02:14] SubStack: just saying!
[02:14] perezd: halfhalo, chapel: yeah this is totally what I am wondering about.
[02:15] halfhalo: chapel: because I heart scaffolding and Activemodel
[02:15] SubStack: I'll get that to work with couch as soon as I finish the other stuff in my queue
[02:15] SubStack: yikes, scaffolding
[02:15] chapel: yeah, you could do scaffolding in node
[02:15] chapel: if you wanted to
[02:15] SubStack: scaffolding is the worst idea in the history of computing
[02:15] JimBastard: there is already JS scaffolds
[02:15] SubStack: it used to be called code generation
[02:15] chapel: haha
[02:15] SubStack: or boilerplate
[02:16] JimBastard: SubStack: you should really check out resourcer, peep the tests
[02:16] halfhalo: Dammit man I am lazy!
[02:16] JimBastard: we use it in production for a bunch of things
[02:16] SubStack: neat I will
[02:17] hellp has joined the channel
[02:17] tladuke has joined the channel
[02:17] thorsteinsson has joined the channel
[02:17] perezd: chapel: what is REST like in node?
[02:18] halfhalo: ACTION hearts rake db:*
[02:18] zemanel has joined the channel
[02:18] JimBastard: perezd: http://github.com/marak/webservice.js
[02:18] chapel: rest is anything you make it
[02:18] chapel: perezd: if you know sinatra check out express
[02:19] perezd: chapel: oh this is interesting
[02:19] chapel: again you go very low level
[02:19] chapel: compared to rails
[02:19] chapel: but you can still have that abstraction of data if you want
[02:19] perezd: yeah, I am a little nervous about not having activemodel, I really enjoy having access to things like that
[02:19] chapel: check out express examples
[02:20] chapel: well JimBastard's resourcer or bigorm
[02:20] chapel: there are plenty of orm modules
[02:20] JimBastard_ has joined the channel
[02:20] JimBastard_: le sigh
[02:20] chapel: network JimBastard_ ?
[02:20] chapel: you need a bouncer
[02:20] amerine has joined the channel
[02:20] perezd: chapel: a lot of this stuff is totally alpha/beta type stuff
[02:20] perezd: which also makes me nervous
[02:21] JimBastard_: ive been trying to evade fbi all week
[02:21] JimBastard_: my routing software is being too aggresive
[02:21] chapel: perezd: well not alpha so much anymore, maybe a bit of beta, but there are a lot of things that are production ready
[02:21] chapel: lots of sites are full on node production
[02:21] JimBastard_: i dont know too many node libs that are 1.0.0 yet
[02:21] JimBastard_: considering node is not 1.0.0
[02:22] JimBastard_: express might be on a version 1 RC
[02:22] JimBastard_: yeah express is 1.0
[02:22] JimBastard_: https://github.com/visionmedia/express/blob/master/package.json#L4
[02:23] chapel: perezd: http://transloadit.com/ << that is based on node.js
[02:23] perezd: yeah saw that
[02:23] perezd: pretty neat
[02:24] chapel: are you doing this for a big company that expects proven code?
[02:24] chapel: would you get fired for using something new if it went down once or twice?
[02:24] chapel: :P
[02:24] perezd: chapel: no :)
[02:24] perezd: good point, gotta run, thanks for advice, will be back ;)
[02:26] omygawshkenas has joined the channel
[02:26] tladuke: how do you look up javascript stuff without getting stupid w3schools type hits
[02:27] technoweenie: get your friends to google bomb the mdc links because they dont know how to set good
tags
[02:27] chapel: heh
[02:27] technoweenie: or put an "mdc" prefix on your search queries
[02:28] technoweenie: w3schools isnt that bad though
[02:28] chapel: maybe someone needs to make a chrome plugin that replaces w3 with mdc
[02:28] chapel: its good for quick reference
[02:29] tladuke: a reference!
[02:30] pydroid has joined the channel
[02:32] isaacs has joined the channel
[02:32] cjm has joined the channel
[02:35] nonnikcam has joined the channel
[02:38] tladuke: say I create a server and a few clients in an app, and i want data that the server receives, sent back out by the clients... how do i make it so the clients and server have access to each other? can anyone think of an app out there that might do something similar? I'm javascript dumb.
[02:39] CIA-93: node: 03Ryan Dahl 07debugger * r5b70c9b 10/ lib/_debugger.js : Add better breakpoint text - http://bit.ly/f3WpqN
[02:39] CIA-93: node: 03Ryan Dahl 07debugger * ra613fa3 10/ lib/_debugger.js : Debugger: Fix some output - http://bit.ly/gAtUlT
[02:41] chapel: tladuke: hmm, are these http servers/clients?
[02:42] tladuke: tcp or udp
[02:42] chapel: oh
[02:42] chapel: umm why not use node
[02:43] chapel: you could pass the data from the server directly to the clients
[02:48] tladuke: well yeah using node :) i just don't understand javascript function/object model well enough
[02:52] chapel: hmm
[02:52] mjr_ has joined the channel
[02:54] chapel: tladuke: this might help give you some idea http://www.ustream.tv/recorded/11433870
[02:55] tladuke: thanka
[02:56] dthompson: hi guys, I'm new here
[02:57] dthompson: been lurking all day, some interesting convos. I'd be interested in your thoughts on a nodejs web framework. Is ExpressJS the best avail? do you like something else better?
[02:58] chapel: at this point, it probably is the most used
[02:58] chapel: but better is entirely up to the individual
[02:59] dthompson: for sure. and I'm know I'm asking for opinion :)
[02:59] cgutierrez has joined the channel
[02:59] chapel: well, I enjoy express for what it is
[02:59] chapel: though I wouldn't use it for everything
[03:00] dthompson: I just used it for something small, but I feel like it would be messy for anything much larger
[03:01] chapel: express?
[03:01] chapel: I find express is meant for larger fuller apps
[03:01] chapel: where as for smaller stuff I prefer to use http directly
[03:02] dthompson: sure. I guess I havent used it enough but I would like to see it have more structure to it
[03:02] chapel: it has structure
[03:02] chapel: you just create that structure
[03:02] chapel: you mean a little hand holding?
[03:03] dthompson: ha exactly
[03:03] dthompson: or at least some ideas on best usage, not hand holding so much
[03:03] dthompson: do you know of any projects out there using it?
[03:03] chapel: hmm, some, but not any with source available
[03:04] chapel: look at the examples
[03:04] chapel: on github
[03:05] dthompson: cool I have but I'm hoping someone has built something a little more complex then their examples with it
[03:05] dannycoates has joined the channel
[03:05] dthompson: it is good project, I do like express
[03:05] chapel: umm yeah, I know where you are coming from
[03:05] chapel: I have asked the same
[03:06] chapel: I got frustrated that I couldn't find anything and no one knew
[03:06] chapel: but then I just started building
[03:06] chapel: and came in here and bitched
[03:06] dthompson: ha exactly
[03:06] chapel: and figured stuff out, and then felt dumb about it
[03:06] chapel: and then hit a wall again, bitched here
[03:06] chapel: got some help
[03:06] chapel: felt dumb again
[03:06] chapel: its my process of learning
[03:06] chapel: haha
[03:07] sechrist has joined the channel
[03:07] chapel: honestly, I have learned most of what I know by playing around in node, as much as there is great learning material out there, just using it has got me further
[03:08] dthompson: what I built isnt very complex but it got my feet wet: http://the360gallery.com nodejs+couchdb once I clean up the source a little I'll change the repo to public on github
[03:08] chapel: though I do scan for code examples to figure out things I dont exactly understand
[03:08] chapel: you do the style?
[03:08] dthompson: yeah
[03:08] chapel: its simple, but I like the idea
[03:10] dthompson: it only has about a half dozen routes in express and only uses a couple of the features the express has
[03:10] pydroid has joined the channel
[03:11] dthompson: thus the, I get it so far, but I'd like to know if anyone has suggestions or pitfalls to avoid in building a bigger app w/ express
[03:12] chapel: umm, if you have anything that does processing that might block, you should split that out into a child process
[03:12] chapel: always keep the main event loop non-blocking
[03:13] dthompson: cool I assumed :)
[03:14] chapel: though I haven't built anything large so I wouldn't know really
[03:16] mikew3c_ has joined the channel
[03:20] dannycoates: ryah: what is most painful about current debuggers?
[03:20] gerad has joined the channel
[03:21] _mql has joined the channel
[03:21] ceej has joined the channel
[03:22] JimBastard_: hey kriszyp , is there a way to specify custom error messages for properties in a JSON-Schema?
[03:22] jashkenas has joined the channel
[03:22] JimBastard_: im looking at : https://github.com/kriszyp/json-schema/blob/master/draft-03/examples/address#L8
[03:28] kriszyp has joined the channel
[03:28] jashkenas has joined the channel
[03:28] echosystm has joined the channel
[03:29] echosystm: guys, im looking around on the interwebs and i'm finding lots of cases where threads + NTPL easily outperforms async IO
[03:29] smtlaissezfaire has joined the channel
[03:29] echosystm: whats the deal? has async IO had its day?
[03:30] possibilities has joined the channel
[03:31] echosystm: im talking 20+% performance gain with threaded HTTP, which should be one of the protocols where async IO would shine
[03:31] echosystm: (due to it being mostly idle)
[03:31] jakehow has joined the channel
[03:31] voodootikigod has joined the channel
[03:32] smtlaissezfaire: jakehow: How's it going?
[03:33] Yuffster has joined the channel
[03:33] JimBastard_: echosystm: reading is fun
[03:34] JimBastard_: echosystm: so is writing code
[03:34] JimBastard_: echosystm: try a little of both and see how it turns out
[03:38] jimt has joined the channel
[03:41] jacobolus has joined the channel
[03:42] broofa has joined the channel
[03:46] ryah: dannycoates: not in the smae term
[03:46] ryah: dannycoates: did you see my latest changes. i want to have it launch the bugger on each 'debugger;' statement
[03:46] chapel: https://gist.github.com/752528
[03:46] chapel: yeah :)
[03:46] chapel: I have me a working irc gist script
[03:46] chapel: using node
[03:47] dannycoates: ryah: i did, thats very cool!
[03:48] ryah: dannycoates: i figure we can have an env var for node-inspector
[03:48] ryah: dannycoates: and have it popup a tab when you hit something
[03:48] ryah: NODE_DEBUGGER_PROG or something
[03:49] mattcodes has joined the channel
[03:49] CIA-93: node: 03Kai Chen 07master * rb2fd88e 10/ (doc/api/addons.markdown doc/api/appendix_1.markdown): correct some inline links in api document - http://bit.ly/gyVLn8
[03:49] ryah: dannycoates: i'm also working on a client api for the debugger
[03:50] ryah: dannycoates: not sure if you'd be interested in sitting on it
[03:50] ryah: it's not good yet, but i'll work on it
[03:52] dannycoates: ryah: that's where I'd like to go, inspector using the debug client api
[03:55] mattcode_ has joined the channel
[03:57] dannycoates: ryah: do you think long-term you'd be interested in a different debug protocol from the default agent? one that's less request/response oriented?
[03:58] ossareh has joined the channel
[03:58] dannycoates: I've just been diving into the chrome source a bit and having some wild ideas
[04:00] mikeal has joined the channel
[04:01] viirya has joined the channel
[04:01] mjr_: dannycoates: do you have any insight into why the profiler in Chrome seems to turn up useful information, but when run against node it doesn't seem to know where the time goes?
[04:01] MikhX has joined the channel
[04:02] dannycoates: mjr_: i've certainly observed it! but I havent had time to investigate yet. its pretty abysmal :(
[04:02] mjr_: OK, at least it's not just me then
[04:03] mjr_: I wonder if maybe node is confusing it or something.
[04:03] mjr_: Or if Chrome has some way of organizing things so that the profiler can tell what's going on.
[04:03] echosystm: under what circumstances are threaded IO better than async IO ?
[04:04] dannycoates: mjr_: I'll definitely be looking at it over the holiday
[04:05] Figaroo has joined the channel
[04:06] ceej has joined the channel
[04:06] herbySk has joined the channel
[04:07] mjr_: echosystm: that's a somewhat controversial subject with no clear answer.
[04:08] hobodave has joined the channel
[04:08] mjr_: echosystm: I would says that if you need what amounts to shared memory, then threads are likely the way to go.
[04:08] mjr_: In all other cases, it's hard to beat an event loop.
[04:09] rpflo has joined the channel
[04:10] jchris1 has joined the channel
[04:10] chapel: well echosystm mjr_ you can simulate shared memory with async IO, and sometimes it is better to handle it that way
[04:10] jimt_ has joined the channel
[04:11] hassox has joined the channel
[04:12] chapel: SubStack
[04:12] chapel: you there?
[04:14] masahiroh has joined the channel
[04:17] jimt has joined the channel
[04:18] SubStack: pow
[04:19] SubStack: chapel: present
[04:19] chapel: is there a way to have conditional demand with optimist?
[04:19] SubStack: .check
[04:19] yozlet has joined the channel
[04:21] chapel: also can I use longer than one digit args?
[04:21] chapel: when I tried 3 digit ones
[04:21] chapel: it didnt work as expected
[04:21] SubStack: --arg
[04:22] SubStack: --arg value, --arg=value
[04:22] chapel: oh, so -x or --arg ?
[04:22] SubStack: yes
[04:22] chapel: okay
[04:22] SubStack: if you do -arg that is the same as -a -r -g
[04:22] jimt_ has joined the channel
[04:22] chapel: yeah
[04:23] chapel: what about .check
[04:23] chapel: no doc on that
[04:23] SubStack: it takes a callback
[04:23] zorzar_ has joined the channel
[04:23] SubStack: just return false or throw
[04:24] ceej has joined the channel
[04:24] chapel: hmm
[04:24] SubStack: some examples in this https://github.com/substack/node-optimist/blob/master/test/usage.js
[04:25] chapel: okay
[04:25] chapel: Im making a node based gist cli script
[04:26] chapel: 3 ways to get contents to a gist, through an actual file you list, through an arg, or through the pastebin
[04:26] nonnikcam has joined the channel
[04:28] chapel: curious, what would be the easiest way to get the extension from a filename?
[04:28] chapel: just some regexp?
[04:29] siong1987 has joined the channel
[04:30] skohorn has joined the channel
[04:32] ossareh has joined the channel
[04:36] jashkenas has joined the channel
[04:38] rpbertp13 has joined the channel
[04:40] micheil has joined the channel
[04:42] derferman has joined the channel
[04:46] ceej_ has joined the channel
[04:48] chapel: SubStack: do I have to use .check before .argv?
[04:48] SubStack: yes
[04:48] SubStack: inline
[04:48] chapel: okay
[04:50] chapel: what would be the best way to show in a .usage various command options?
[04:50] chapel: or denote optional?
[04:53] SubStack: the best way?
[04:53] chapel: well
[04:53] chapel: that would make sense to people
[04:54] skohorn_ has joined the channel
[04:54] fmeyer has joined the channel
[04:57] skm has joined the channel
[04:58] jimt has joined the channel
[04:59] digitalsatori has joined the channel
[05:00] rachelderp has joined the channel
[05:01] arrty has joined the channel
[05:04] isaacs has joined the channel
[05:05] benburkert has joined the channel
[05:15] digitalsatori has joined the channel
[05:16] elijah-mbp has joined the channel
[05:16] elijah-mbp has joined the channel
[05:18] micheil: does DracoBlue (github user) happen to be in the channel?
[05:18] echosystm: can anyone tell me under what circumstances threaded IO is worse than evented IO?
[05:20] micheil: pretty much every.
[05:20] micheil: echosystm: purely because you're having to manage threads, which is just a pain in the ass.
[05:21] micheil: that said, in a way node does kinda use threaded IO but it's got an evented interface
[05:22] micheil: atleast, libeio uses the xthread.h header and a fair bit of related stufff
[05:23] echosystm: see, i've always been under the impression that evented IO was better
[05:23] micheil: well, evented IO at OS level is sort of non-existent in many instances
[05:23] echosystm: but im looking at benchmarks of linux boxes with NPTL and threads seem much better?
[05:24] briznad has joined the channel
[05:24] digitalsatori has joined the channel
[05:24] echosystm: NPTL seems to hugely reduce memory and time cost of threads
[05:25] micheil: ACTION doesn't really know the finest of details on this.
[05:25] echosystm: ...and yet all the big HTTP containers are moving to async IO
[05:26] MikhX has joined the channel
[05:26] Aria: async really is excellent. It lets you store the minimal state about each connection and switch at the most opportune times.
[05:26] Aria: Threads have some implicit storage and a relatively uncontrolled schedule.
[05:27] Aria: They're provably equivalent, but the interface is much easier to control and reason about with events.
[05:29] echosystm: another thing, how does workers work in node.js?
[05:29] echosystm: in other languages, you usually have to use sockets or something to communicate between processes
[05:30] micheil: ACTION is working on that.
[05:30] micheil: sort of.
[05:30] micheil: my base level idea is node's event emitters over netstrings+json or netstrings+messagepack
[05:30] Aria: Nice.
[05:30] micheil: but I think it'd be good to have something like netstrings or messagepack built into node.
[05:31] Aria: Hm. The problem there is that there's so many choices, micheil.
[05:31] echosystm: hang on, isnt there already a message passing thing for workers?
[05:31] micheil: or just have a community generated standard for node to node process communication
[05:31] micheil: yes
[05:31] micheil: but it uses websockets
[05:31] micheil: :(
[05:31] echosystm: ah
[05:31] micheil: I think I'll annoy peter about that at some stage. :P
[05:31] skm has joined the channel
[05:32] micheil: I might put out a proof of concept of this node-to-node stuff soon, maybe over christmas.
[05:32] echosystm: isn't websocket almost as fast as pain sockets?
[05:32] micheil: not really
[05:32] echosystm: i thought only the initial http upgrade is what takes time
[05:32] micheil: the version this module uses means that all the bytes sent/received need to be checked/parsed, which is too slow at times
[05:32] echosystm: m
[05:33] micheil: because it's:
[05:33] micheil: where as netstrings is:
[05:33] micheil: or something like that.
[05:34] echosystm: right
[05:34] micheil: in protocol that gives you the data's length is quicker then one that doesn't, I'd imagine.
[05:34] micheil: *any not in
[05:34] Aria: Yeah.
[05:35] jimt_ has joined the channel
[05:35] micheil: be back tomorrow. Email me if you're needing something: ?
[05:39] vborja has joined the channel
[05:40] mikeal has joined the channel
[05:41] technoweenie has joined the channel
[05:41] ryah: dannycoates: what are your wild ideas?
[05:51] dannycoates: ryah: basically a more stream friendly protocol to reduce the size of things coming from the server to client...
[05:52] dannycoates: since node heaps tend to be larger, etc
[05:53] dannycoates: i certainly need to think it out more though
[05:53] yozlet has joined the channel
[05:53] dannycoates: like Buffers for instance are a huge pain for the debugger
[05:59] kiddphunk has joined the channel
[05:59] mattcodes has joined the channel
[06:00] mattcod__ has joined the channel
[06:02] mattcode_ has joined the channel
[06:06] SubStack: dannycoates: there are modules on npm for that
[06:07] dannycoates: SubStack: for what?
[06:08] ajpiano has joined the channel
[06:11] dannycoates: SubStack: my bad, I'm talking about the v8 debugger protocol specifically, not in general :)
[06:12] broofa: Anyone (dannycoates ?) know how to get node-inspector to refresh this list of require()'ed scripts?
[06:12] broofa: this -> the
[06:13] dannycoates: in the dropdown? easiest is to refresh the page
[06:14] broofa: dannycoates: Ah, thx! Never would have thought of that. I'm too trained to think of a page refresh as causing me to lose all my state. :)
[06:15] ryah: dannycoates: evaluating buffers?
[06:16] dannycoates: ryah: lookup requests
[06:16] dannycoates: ryah: and scope requests to a lesser extent
[06:17] mattcodes has joined the channel
[06:18] dannycoates: s/scope/frame/
[06:19] mikeal has joined the channel
[06:21] tladuke: chapel: do you know if the code from this presentation is up somewhere?
[06:25] ryah: dannycoates: does it send the whole buffer ?
[06:25] ryah: changing frame?
[06:26] dannycoates: ryah: it tries :)
[06:27] skm has joined the channel
[06:28] dnolen has joined the channel
[06:32] ryah: :)
[06:34] tim_smart has joined the channel
[06:36] gkatsev: running ./configure on fedora core 14, I get not found on port.h, poll.h headers and function kqueue? Are these important and what should I install to get it?
[06:37] gkatsev: I am using the git clone and whatever version that is.
[06:39] gkatsev: Though, it did say it completed successfully
[06:39] linac has joined the channel
[06:40] dannycoates: gkatsev: im pretty sure thats normal for a linux build
[06:41] gkatsev: dannycoates: ok, I don't remember it from my ubuntu VM. But the script did say it completed successfully but better be safe than sorry, as they say.
[06:41] skm has joined the channel
[06:43] gkatsev: so, going to go with it and I'll check back in here if something goes wrong.
[06:43] tekky has joined the channel
[06:44] mikew3c has joined the channel
[06:45] mikeal has joined the channel
[06:46] gkatsev: cool, it works
[06:48] WakiMiko has joined the channel
[06:48] tek has joined the channel
[06:48] crodas has joined the channel
[06:50] tlrobinson has joined the channel
[07:01] JusticeFries has joined the channel
[07:02] tob1 has joined the channel
[07:04] mattcode_ has joined the channel
[07:04] blaines has joined the channel
[07:05] blaines: HOW do I UNINSTALL NODE?
[07:05] blaines: omg im going insane
[07:05] Aria: remove the node binary?
[07:06] blaines: ugh I hate nvm
[07:06] blaines: my sys is so jacked up now
[07:08] Aria: How so?
[07:09] blaines: I'm stuck at 0.1.92
[07:09] blaines: we'll see if killing nvm completely fixes it
[07:10] blaines: ARRGH
[07:10] blaines: node -v => -bash: /Users/blaine/.nvm/v0.1.92/bin/node: No such file or directory
[07:10] blaines: k im serious this just utterly sucks
[07:11] blaines: never nvm again
[07:11] blaines: okay, so how do I FIX my node to point to the right version?
[07:11] blaines: or actually COMPLETELY kill nvm/node
[07:12] ryah: blaines: exit your shell - delete whatever thing is beings sourced
[07:13] blaines: ugh thanks ryah
[07:13] blaines: im just like not even thinking straight now
[07:14] gkatsev: well, depending on where you are, it is very late and these things usually tend to not go the way you want.
[07:14] blaines: yeah
[07:15] broofa has joined the channel
[07:17] mattcodes has joined the channel
[07:19] mattcod__ has joined the channel
[07:19] bob_: whats wrong?
[07:19] Benvie has joined the channel
[07:19] blaines: bob_: nvm is evil
[07:20] blaines: it stopped working and held me hostage
[07:20] bob_: haha its only does what you tell it
[07:21] bob_: take me hostage dammit
[07:21] blaines: I never saw that in the help
[07:22] bob_: i think its coming in pre-0.3.3
[07:24] jesusabdullah has joined the channel
[07:26] dandaman has joined the channel
[07:26] tim_smart: blaines: `which node`
[07:26] SamuraiJack has joined the channel
[07:27] blaines: tim_smart: i fixed it finally - but it was a pain in the ass thanks to nvm
[07:36] peritus_ has joined the channel
[07:37] MikhX has joined the channel
[07:38] CIA-93: node: 03Ryan Dahl 07debugger * re8a874f 10/ (lib/readline.js src/node_stdio.cc):
[07:38] CIA-93: node: Disable OPOST
[07:38] CIA-93: node: Helps when sharing a tty with non-raw mode processes - http://bit.ly/hXs0zu
[07:38] CIA-93: node: 03Ryan Dahl 07debugger * r5d1d8ec 10/ lib/_debugger.js : debugger: Clean up a few commands - http://bit.ly/gRxpfY
[07:40] ryah: complete gdb compatibility
[07:40] ryah: or at least mostly
[07:40] ryah: is the goal :)
[07:41] datapimp has joined the channel
[07:42] derren13 has joined the channel
[07:43] isaacs has joined the channel
[07:47] mikeal has joined the channel
[07:48] jarfhy has joined the channel
[07:54] amerine has joined the channel
[07:54] tlrobinson has joined the channel
[07:55] mikedeboer has joined the channel
[07:59] ivanfi has joined the channel
[08:00] mikew3c has joined the channel
[08:01] tisba has joined the channel
[08:03] mgutz has joined the channel
[08:18] skm has joined the channel
[08:19] sveisvei has joined the channel
[08:20] mAritz has joined the channel
[08:23] silence has joined the channel
[08:25] Sbioko has joined the channel
[08:25] Sbioko: hi
[08:25] Druid_ has joined the channel
[08:26] Sbioko: what benefits I will receive of using Node.js for file uploading instead of usual PHP script?
[08:27] Sbioko: ?
[08:28] femtoo has joined the channel
[08:29] chapel: Sbioko
[08:29] chapel: well what do you want to do with the file?
[08:29] Sbioko: chapel: ?
[08:29] Sbioko: chapel: just upload it and store in Amazon S3
[08:29] chapel: and thats all you want to use node for?
[08:30] Sbioko: chapel: double-upload: first to my server, and then my server transfers that file to S3
[08:30] Sbioko: chapel: yes
[08:30] Sbioko: chapel: or it can be full PHP replacement?
[08:30] Sbioko: chapel: do you know what's Droplr or CloudApp?
[08:30] Sbioko: maybe heard of
[08:30] Sbioko: http://droplr.com
[08:30] Sbioko: http://cl.ly
[08:31] chapel: umm
[08:31] Sbioko: I'm building similar project
[08:31] chapel: I know what they are but dont know what they are built on
[08:31] chapel: node would be good for that
[08:31] chapel: better than php imo
[08:31] Sbioko: for all?
[08:31] Sbioko: Should I use Node.js as platform for that project?
[08:31] chapel: that really depends
[08:31] Sbioko: I mean don't use PHP at all?
[08:31] chapel: I think it wouldn't hurt
[08:32] chapel: but again, it depends
[08:32] Sbioko: I'm playing with node and I just dont understand what benefits it brings
[08:32] Sbioko: depends on what
[08:32] chapel: depends on your skill, knowledge of js
[08:32] Sbioko: Good knowledge of JS
[08:32] Sbioko: JS is not the problem
[08:32] [AD]Turbo has joined the channel
[08:32] Sbioko: The only problem is in choosing right tech
[08:32] chapel: also scaling can be different
[08:32] Sbioko: PHP or Node
[08:33] chapel: its somewhat of untamed territory
[08:33] Sbioko: I can develop same thing on both
[08:33] chapel: based on it just being a file server, using s3 for distributed file serving, I think node would be the better choice
[08:34] Sbioko: ok
[08:34] Sbioko: thanks!
[08:34] chapel: you could have a main node process that handles main app logic, and you could have child workers that handle uploads, so you can expand easily
[08:35] chapel: but however you do it, node could potentially handle streaming the file to s3 as it is uploaded as well as save it to disk in the same matter
[08:35] chapel: look up util.pump
[08:35] Sbioko: yes I know
[08:35] chapel: okay
[08:35] adambeynon has joined the channel
[08:36] Sbioko: chapel: util.pump?
[08:36] Sbioko: chapel: what's that
[08:36] Sbioko: I'm using 0.2.5
[08:36] chapel: http://nodejs.org/docs/v0.3.2/api/util.html#util.pump
[08:36] chapel: well its sys.pipe or pump < 3.x
[08:37] Sbioko: so using util.pump I can stream file upload to S3 in "real-time"?
[08:37] Sbioko: without saving it on my disk?
[08:37] [AD]Turbo: hi all
[08:38] Sbioko: [AD]Turbo: hi
[08:38] chapel: Sbioko: yeah you could
[08:38] Sbioko: wow
[08:38] Sbioko: that's exactly what I need
[08:38] chapel: of course id recommend some fallback or buffer potentially
[08:38] Sbioko: ok
[08:38] chapel: idk, I haven't done it
[08:38] Sbioko: thanks a lot chapel
[08:38] chapel: :)
[08:38] chapel: node rocks
[08:38] Sbioko: of course :-)
[08:39] sascha_ has joined the channel
[08:39] chapel: idk the details, but if you used websockets, or socket.io or something too, you could update in real time the upload process in a cool manner
[08:39] mikeal has joined the channel
[08:39] stephank has joined the channel
[08:40] chapel: it would be super simple to build an api for a desktop application as well
[08:40] B2oba has joined the channel
[08:40] thinkingpotato has joined the channel
[08:41] matjas has joined the channel
[08:45] sechrist has joined the channel
[08:46] marcostoledo has joined the channel
[08:48] qFox has joined the channel
[08:48] dandaman has joined the channel
[08:48] mikeal has joined the channel
[08:50] Sbioko: chapel: I've used socket.io
[08:50] Sbioko: chapel: cool thing
[08:50] Sbioko: chapel: but how to implement it for file uploading?
[08:50] Sbioko: chapel: didn't even think about it
[08:50] chapel: for desktop?
[08:50] Sbioko: chapel: yes
[08:50] Sbioko: chapel: I'm using Adobe AIR for Desktop App
[08:50] Sbioko: it uploads file to Node
[08:51] chapel: well use http
[08:51] Sbioko: to remote server
[08:51] chapel: since its simple that way
[08:53] Twelve-60 has joined the channel
[08:54] augustl has joined the channel
[08:56] MikhX has joined the channel
[08:56] hornairs has joined the channel
[09:05] tisba_ has joined the channel
[09:06] mattcodes has joined the channel
[09:07] Sbioko: chapel: I have a problem
[09:07] chapel: ?
[09:07] Sbioko: chapel: how to upload multiple files to Node
[09:07] Sbioko: chapel: I'm using formidable
[09:07] Sbioko: chapel: https://github.com/felixge/node-formidable
[09:07] Sbioko: I know little dumb question
[09:08] Sbioko: I think the error is in headers I send
[09:08] jimt has joined the channel
[09:10] chapel: did you try the example?
[09:11] teemow has joined the channel
[09:13] aklt has joined the channel
[09:16] mikew3c_ has joined the channel
[09:19] jimt has joined the channel
[09:20] romeo_ordos has joined the channel
[09:20] Max-Might has joined the channel
[09:21] Sbioko has joined the channel
[09:21] RevoOf has joined the channel
[09:22] Rv has joined the channel
[09:22] Rv: hi
[09:22] Rv: quick question: how to check node.js version?
[09:23] RevoOf: node --version
[09:24] jimt_ has joined the channel
[09:25] RevoOf: Rv: or in your node program (instead of the shell?)
[09:26] Rv: RevoOf, in node.js shell
[09:26] RevoOf: Rv: process.versions.node
[09:26] Rv: thanks :)
[09:35] mattcodes: how do i acess POST values in expressjs?
[09:35] mattcodes: access
[09:36] pietern has joined the channel
[09:36] RevoOf: mattcodes: http://expressjs.com/guide.html#HTTP-Methods
[09:36] RevoOf: mattcodes: use the bodeDecoder(). then req.body[key] will be your value
[09:38] mattcodes: ah sorry i thought i had bodyDecoder in there. yep that was it
[09:38] RevoOf: mattcodes: i use to forget it too^^
[09:38] chapel: its sad
[09:39] chapel: I have a fully functional node based cli script for posting gists
[09:39] RevoOf: chapel: sounds not so das
[09:39] chapel: but I have to write an applescript variation for my irc client of choice so other people can use it, since node is a high requirement to have people use your script
[09:39] RevoOf: s/das/sad/
[09:40] forzan has joined the channel
[09:42] ewdafa has joined the channel
[09:42] sascha_ has joined the channel
[09:44] forzan has joined the channel
[09:45] dandaman has joined the channel
[09:48] jacoblyles has joined the channel
[09:49] markwubben has joined the channel
[09:50] Druid_ has joined the channel
[09:52] Sbioko has left the channel
[09:56] bzinger has joined the channel
[09:56] hassox has joined the channel
[10:01] dandaman has joined the channel
[10:02] TomY has joined the channel
[10:02] lmorchard has joined the channel
[10:04] nail_ has joined the channel
[10:07] sriley has joined the channel
[10:08] johnnywengluu has joined the channel
[10:08] mgc has joined the channel
[10:12] zhesto has joined the channel
[10:14] tilgovi has joined the channel
[10:18] mikedeboer has joined the channel
[10:25] glenngillen has joined the channel
[10:25] RevoOf has left the channel
[10:25] RevoOf has joined the channel
[10:26] cardona507 has joined the channel
[10:35] stagas: zombie looks nice https://github.com/assaf/zombie
[10:39] prinzdezibel has joined the channel
[10:40] prinzdezibel: Hi, what is a convenient way to display variables for debugging purposes in the console? I want something like print_r in php and tried object.toSource, but often I get : Object # has no method 'toSource'. Any tipps?
[10:40] chapel: console.log(variable)
[10:41] chapel: spits it out
[10:41] prinzdezibel: chapel: that gets me often just object.
[10:41] prinzdezibel: that is a little bit less
[10:41] chapel: console.log('something'+variable) will convert it string
[10:41] prinzdezibel: I see
[10:41] chapel: console.dir(variable) is pretty print
[10:41] prinzdezibel: Javascript ninja!
[10:41] stagas: console.dir(var, var, var, ...) is better as it inspects
[10:41] chapel: for objects
[10:41] chapel: yeah
[10:42] chapel: stagas: well log has its merits
[10:42] chapel: but dir is better for inspection
[10:42] prinzdezibel: ACTION need to dive into Javascript, but this time seriously :)
[10:45] SubStack: blah need to finish this stupid module already
[10:46] chapel: which?
[10:46] SubStack: telescreen
[10:46] chapel: the tele thing?
[10:46] chapel: yeah
[10:46] mscdex: you can also use util.inspect() if you want the string that console.dir() outputs without displaying it
[10:46] mscdex: or sys.inspect for node v0.2.x
[10:48] vineyard has joined the channel
[10:49] prinzdezibel: mscdex: thx for the tip
[10:49] linac has joined the channel
[10:50] Sbioko has joined the channel
[10:50] Sbioko: how to get unix timestamp in Node?
[10:51] Sbioko: time() in PHP
[10:51] Sbioko: Unix timestamp
[10:51] Sbioko: anyone?
[10:51] femtoo has joined the channel
[10:52] Sbioko: chapel: how to get unix timestamp in Node.js?
[10:52] chapel: Date.now()
[10:52] cyraxx: there's new Date().getTime()
[10:52] cyraxx: but that's in milliseconds, not seconds
[10:52] Sbioko: aha
[10:52] Sbioko: ok
[10:52] Sbioko: thanks
[10:53] chapel: Date in general
[10:53] Sbioko: and how to cut string to 5 characters?
[10:53] Sbioko: em
[10:54] Sbioko: I think it is not node-related
[10:54] Sbioko: sorry
[10:54] cyraxx: mystring.substr(0,5)
[10:54] stagas: yourstring.substr(0, 5)
[10:54] cyraxx: heh
[10:54] stagas: lol
[10:54] cyraxx: my or your string? :)
[10:54] stagas: theirstring
[10:54] chapel: v8:['stringblah'].substr(0,5)
[10:54] v8bot: chapel: TypeError: Object stringblah has no method 'substr'
[10:54] Sbioko: :-D
[10:54] cyraxx: v8:'stringblah'.substr(0,5)
[10:54] v8bot: cyraxx: "strin"
[10:55] chapel: yeah yeah
[10:55] chapel: v8:'stringblah'.substr(0,5)
[10:55] v8bot: chapel: "strin"
[10:55] chapel: v8:'stringblah'.splice(0,5)
[10:55] v8bot: chapel: TypeError: Object stringblah has no method 'splice'
[10:55] chapel: :P
[10:57] Sbioko: and how to get IP
[10:57] mraleph has joined the channel
[10:57] stagas: ip of what
[10:57] Sbioko: of client
[10:58] Sbioko: remote IP
[10:58] mscdex: remoteAddress
[10:58] sascha_ has joined the channel
[10:58] stagas: if it's http, req.connection.remoteAddress
[10:58] Sbioko: HTTP
[10:58] Sbioko: thanks
[10:58] stagas: if it's net, c.remoteAddress
[11:00] mscdex: i wonder why stream.remoteAddress doesn't exist for client-side connections also
[11:02] stagas: it doesn't?
[11:02] mscdex: no, just for server-side connections
[11:03] mscdex: i guess the argument is remoteAddress wouldn't be needed if you already know the address you're connecting to
[11:03] mscdex: but it'd still be nice to have
[11:03] stagas: yeah but you'd need to lookup
[11:03] stagas: and since it does it already I guess it should be exposed
[11:03] stagas: write a patch :)
[11:08] Wizek has joined the channel
[11:10] mscdex: yay my netbook is working agian \o/
[11:11] mscdex: which translates into cygwin testing time!
[11:13] _mql1 has joined the channel
[11:16] stagas: mscdex: > v0.3.1 don't compile don't try :)
[11:17] SvenDowideit has joined the channel
[11:17] stagas: that v8 optimization screwed it up for windows
[11:17] prinzdezibel: How am I supposed to deal with script files, that I write for inclusion in my web app. Should I put them in my "own" module, which I later do require() ?
[11:17] stagas: prinzdezibel: yeap
[11:18] mscdex: well v0.2.5 compiles fine
[11:18] mr_daniel has joined the channel
[11:18] prinzdezibel: stagas: how does node.js find them when I say require('myModule')
[11:19] RevoOf: say ./myModule
[11:19] RevoOf: then it will look in the same directory for myModule.js or myModule.node
[11:19] prinzdezibel: ok, the other variant is for installed modules via npm?
[11:20] prinzdezibel: (without path)
[11:20] RevoOf: not exclusively
[11:20] mscdex: also, you can set the NODE_PATH environment variable which dictates where to look for modules
[11:20] prinzdezibel: ok
[11:20] mscdex: or stick them in ~/.node_libraries
[11:20] mscdex: :)
[11:21] stagas: prinzdezibel: or add paths with require.paths.unshift('/your/path') and it will search there first
[11:22] RevoOf: wow ... no we've got then all, do we?
[11:22] dandaman has joined the channel
[11:23] stagas: yeah, copy paste & put in a faq
[11:23] stagas: :P
[11:23] cognominal has joined the channel
[11:23] pdelgallego has joined the channel
[11:27] Druid_ has joined the channel
[11:29] Sbioko has joined the channel
[11:30] mscdex: i'm willing to bet the fix needed for cygwin after v8 3.x was released is similar to the one needed for non-linux/osx platforms
[11:31] Sbioko: how to get mime type of file?
[11:31] Sbioko: where file is File object
[11:32] mscdex: i guess you could run the unix 'file' command on it
[11:33] Sbioko: mscdex: I dont believe that there is no built-in function for that
[11:34] RevoOf: Sbioko: i did't use it yet, but have a look at this module: https://github.com/bentomas/node-mime
[11:34] Sbioko: thanks
[11:34] mscdex: correct, there is no built-in function to do mime type detection
[11:34] Sbioko: that's exactly what I need
[11:34] RevoOf: mscdex: yes
[11:35] mscdex: oh, i thought you were trying to guess the mime type given the binary data
[11:35] mscdex: :S
[11:36] RevoOf: mscdex: does the module just look at the file extension?
[11:36] dandaman has joined the channel
[11:36] mscdex: it looks like it does something like that
[11:36] mscdex: or vice versa
[11:36] mscdex: it probably just has a giant hash object
[11:37] RevoOf: i just read var content = fs.readFileSync(mimeFile, 'binary'); and assumed it did stuff with it
[11:38] RevoOf: but thats just the hash table
[11:39] teemow has joined the channel
[11:39] stagas: it shouldn't be hard making one that recognized mime type from binary data, most common file type headers are simple
[11:40] stagas: I remember writing one in arexx like 15 years ago
[11:40] Gruni has joined the channel
[11:40] mscdex: you can probably find the lookup table that the unix `file` uses
[11:43] Sbioko: hm
[11:43] SubStack: /usr/share/file/magic.mgc
[11:43] SubStack: on my system
[11:43] Sbioko: how to declare global variables in Node.js?
[11:43] SubStack: Sbioko: don't do that
[11:43] Sbioko: Maybe there is something like Registry
[11:43] SubStack: no
[11:43] Sbioko: SubStack: why?
[11:44] SubStack: just don't
[11:44] Sbioko: do you have some reasons?
[11:44] SubStack: relying on implicit global state makes it harder to reason about what happens in each of your modules
[11:45] Sbioko: ok
[11:45] stagas: http://www.garykessler.net/library/file_sigs.html
[11:46] RevoOf: SubStack: in the file source (ftp://ftp.astron.com/pub/file/file-5.04.tar.gz ) magic/Magcir contains a file for each type
[11:46] RevoOf: SubStack: it seams to be a bunch of regexes
[11:46] mscdex: yeah, there you go
[11:46] mscdex: that seems like a pretty good magic number list
[11:47] Sbioko has left the channel
[11:52] jetienne has joined the channel
[11:57] d0k has joined the channel
[11:59] stagas: lol my code from 98 https://gist.github.com/752879 :P
[12:00] jetienne has joined the channel
[12:00] RevoOf: stagas: what language is that?
[12:00] Rv: how to use partial render in view with jadejs ?
[12:00] stagas: rexx, or Arexx in the amiga
[12:01] jetienne has joined the channel
[12:01] Rv: i try sth like <%- partial('part') %> but it just display that line and not render part.jade
[12:03] stagas: arexx is very similar to what node.js is now, likewise it had libraries written in another language that extended the functionality, for sockets, reading files etc
[12:03] mscdex: a1000 ftw
[12:03] stagas: and most software then had an arexx api, so you could script functionality among different programs
[12:04] stagas: like tell the web browser, go to that page, download an image then send it to dpaint, process the image, etc
[12:04] stagas: very cool
[12:05] RevoOf: the select ... end looks intresting
[12:06] RevoOf: is it like a switch?
[12:06] stagas: yeah
[12:07] stagas: here's a web server I wrote in arexx, '97 : https://gist.github.com/752888
[12:07] stagas: :)
[12:07] markwubben has joined the channel
[12:08] indexzero has joined the channel
[12:08] mscdex: that's too many lines!
[12:08] indexzero: SubStack committing at > 3am? I like it
[12:09] mscdex: woot. got node master building on cygwin
[12:09] stagas: yeah it is, every request spawned a new instance of it, served it and then died
[12:09] iszak has joined the channel
[12:09] iszak has joined the channel
[12:09] mscdex: now i just need to fix the os module for cygwin
[12:09] mscdex: heh
[12:10] RevoOf: mscdex, stagas: have you tried writing a webserver in c (just intrested how many lines you'd need to do the same there)?
[12:10] mscdex: no, and i wouldn't want to ;-)
[12:10] RevoOf: ok^^
[12:10] stagas: hmm nice it had the undefined property, see line 98, err. = 0
[12:10] stagas: I wish js had that
[12:12] mscdex: undefined property?
[12:12] RevoOf: mscdex: like a[bla] == 'my undefined' if a[bla] is not defined?
[12:12] stagas: yeah like it will return that var for everything undefined
[12:13] stagas: instead of doing typeof undefined all the time
[12:13] stagas: mozilla has an extension for that I think but it's not standard
[12:13] mscdex: like checking foo === undefined ?
[12:13] mscdex: :S
[12:14] mscdex: or a catchall type thing?
[12:14] stagas: catchall
[12:14] RevoOf: magic_undefined_func(myObject, 3);
[12:14] RevoOf: myObject[4] = 6;
[12:14] mscdex: yeah that would be Object.__noSuchMethod__
[12:14] RevoOf: myObject[4] == 6 && myObject[7] == 3?
[12:14] stagas: it will return the value defined in blah. = 'this is what you get instead of undefined'
[12:14] mscdex: but like you said, that's a mozilla thing
[12:15] RevoOf: stagas: i don't know if its a good thing
[12:16] stagas: it's perfectly good for lookup tables
[12:16] RevoOf: stagas: if you strictly use it there
[12:17] adambeynon has joined the channel
[12:28] SubStack: __noSuchMethod__ is a bad name for javascript
[12:28] SubStack: since there's no distinction between attributes and method calls
[12:29] SubStack: indexzero: is that what time it is?
[12:30] zomgbie has joined the channel
[12:30] indexzero: SubStack: Where you are I guess. It's almost 8am in NYC
[12:30] indexzero: I'm sittin gin the airport about to board my flight
[12:30] indexzero: just pulled in your forever changes
[12:30] SubStack: rawk
[12:30] indexzero: about to make a couple small bug fixes myself
[12:30] indexzero: like stat a file before executing it
[12:30] indexzero: >.<
[12:31] indexzero: ok, they're boarding now
[12:32] oal has joined the channel
[12:40] mif86 has joined the channel
[12:42] fermion has joined the channel
[12:45] ianward has joined the channel
[12:47] stagas: lol I just found the best chatter bot ever. I'm gonna do a port
[12:47] kenbolton has joined the channel
[12:48] herbySk has joined the channel
[12:52] prinzdezibel has joined the channel
[12:55] chapel: stagas
[12:55] chapel: oh?
[12:55] chapel: got info on it?
[12:56] stagas: I've got the source! :)
[12:57] stbuehler: how can i add new functions to Array.prototype?
[12:57] stbuehler: if some module i load extends it it isn't visible in other modules
[12:58] RevoOf: stbuhler: just say Array.prototype.myfunc = function() { return 5; };
[12:58] mscdex: if you add methods to Array.prototype, they will show up when you loop over an array
[12:58] chapel: as long as it is loaded at runtime it should be usable
[12:58] stagas: chapel: here's a dos port http://www.simonlaven.com/niall.htm
[12:59] stagas: and here's the original source from 1990 https://gist.github.com/961dc9ed3b5f4e2b5077
[12:59] mscdex: why not use an aiml bot?
[12:59] chapel: stagas
[12:59] mscdex: ;-)
[12:59] chapel: you know what would be cool with something like that
[12:59] mscdex: i started on something like that
[12:59] markwubben has joined the channel
[12:59] stagas: this one is fun because everything about it is teachable, and somehow gets it right with the responses
[13:00] chapel: have a communal language base between multiple bots on multiple networks/channels
[13:00] chapel: so you would have more content for it to learn from
[13:00] stbuehler: RevoOf: i tried, but as i said, i can't use it from somewhere else
[13:01] RevoOf: stagas: thats why you should always use hasOwnProperty
[13:01] stbuehler: like there are different Array.prototypes in the different modules
[13:01] chapel: is your prototype in any active code base?
[13:01] stbuehler: i added logs before and behind it, so yes
[13:02] stbuehler: i'll try to create a minimal testcase
[13:02] RevoOf: stbuehler: it works in my code
[13:02] mscdex: stagas: chapel: http://pandorabots.com
[13:03] baoist_ has joined the channel
[13:03] stbuehler: RevoOf: http://paste.lighttpd.net/1434
[13:03] markwubben1 has joined the channel
[13:03] stbuehler: i load that with nodejs: require('./arrayx');
[13:04] stbuehler: Array.prototype is empty (although it should show append, as it isn't hidden), and x = []; x.append() doesn't work
[13:05] stbuehler: but in the module it does work
[13:05] cheney has joined the channel
[13:05] mscdex: well, there's always Array.concat
[13:05] mscdex: :p
[13:05] stbuehler: yes, but it copies the array
[13:06] mscdex: are you using large arrays?
[13:06] stbuehler: they might be large
[13:06] fmeyer has joined the channel
[13:06] pt_tr has joined the channel
[13:06] chapel: not sure it matters: Array.prototype.append = function () {
[13:06] stbuehler: and you can't use it with apply / bind
[13:06] frodenius: stbuehler㇀ use splice
[13:06] SubStack: wait
[13:06] stbuehler: splice can only prepend, not append
[13:06] frodenius: v8: ([]).splice(0,3,1,2,3)
[13:06] v8bot: frodenius: []
[13:07] stbuehler: and it expects single elements as arguments
[13:07] frodenius: err
[13:07] stbuehler: i want arrays as arguments
[13:07] cheney: sending email attachments using node.js looks like it will be a minor challenge
[13:07] SubStack: it looks like that append() behaves exactly like push()
[13:07] frodenius: v8: a=[];a.splice(0,3,1,2,3);a
[13:07] v8bot: frodenius: [1, 2, 3]
[13:07] stbuehler: if you have only one array to append, yes, x.push.apply(x, list) works the same as x.append(list)
[13:08] RevoOf: stbuehler: in your example append gets called on my machine. it returns undefined though
[13:08] stbuehler: but hey... you know that .append is the right way to do that :) don't tell me how to workaround it, i know that myself :)
[13:08] SubStack: v8: [1,2,3].concat([4,5,6])
[13:08] v8bot: SubStack: [1, 2, 3, 4, 5, 6]
[13:09] stbuehler: RevoOf: v8 version?
[13:09] SubStack: who needs mutable functions anyhow?
[13:10] RevoOf: stbuehler: 2.5.3
[13:10] RevoOf: v8: process
[13:10] v8bot: RevoOf: ReferenceError: process is not defined
[13:10] stbuehler: SubStack: so you would replace all a.push(x) calls with a = a.concat([x]) ?
[13:10] stbuehler: hm, i have 2.5.9.4
[13:10] stbuehler: v8: process.versions
[13:10] v8bot: stbuehler: ReferenceError: process is not defined
[13:10] stbuehler: hehe
[13:11] RevoOf: seams to be a clean v8 instance^^
[13:11] mscdex: well, it is _v8_bot
[13:11] mscdex: ;-)
[13:11] sascha_ has joined the channel
[13:11] stbuehler: doesn't matter, it doesn't have module scopes anyway :)
[13:11] RevoOf: v8: var a = 5;
[13:11] v8bot: RevoOf: undefined
[13:11] RevoOf: v8: a;
[13:11] v8bot: RevoOf: ReferenceError: a is not defined
[13:11] RevoOf: ^^
[13:11] mscdex: stop. coffee time!
[13:12] RevoOf: one more
[13:12] RevoOf: v8: setTimeout(function() { var a = 5; }, 2000);
[13:12] v8bot: RevoOf: ReferenceError: setTimeout is not defined
[13:12] stbuehler: that is really pissing me of now. i can extend Buffer.prototype, but not the stupid array -.-
[13:13] RevoOf: stbuehler: you have a console.log in your append, do you?
[13:14] stbuehler: i added var x = [1,2]; x.append([3]); exports.x = x; to it
[13:14] stbuehler: nd that does work
[13:14] stbuehler: the exported module has .x = [1,2,3]
[13:14] stbuehler: and that array has the .append function
[13:14] stbuehler: if i create a new array, it does not have .append
[13:16] kenbolton has joined the channel
[13:17] nunson has joined the channel
[13:17] chapel: v8: Array.prototype.append = function array_append() {var i, l;for (i = 0, l = arguments.length; i < l; ++i) {this.push.apply(this, arguments[i]);}} var a = [1,2,3]; a.append(2,3,4); a.append([4,5,6]); a;
[13:17] v8bot: chapel: SyntaxError: Unexpected token var
[13:17] RevoOf: ^^
[13:18] chapel: v8: Array.prototype.append = function array_append() {var i, l;for (i = 0, l = arguments.length; i < l; ++i) {this.push.apply(this, arguments[i]);}};var a = [1,2,3]; a.append(2,3,4); a.append([4,5,6]); a;
[13:18] v8bot: chapel: TypeError: Function.prototype.apply: Arguments list has wrong type
[13:18] stbuehler: i know it works when i try it in the same module :)
[13:18] nunson: Hey
[13:18] nunson: I'm having trouble building v0.3.2 on Cygwin
[13:18] chapel: v8: Array.prototype.append = function () {var i, l;for (i = 0, l = arguments.length; i < l; ++i) {this.push.apply(this, arguments[i]);}};var a = [1,2,3]; a.append(2,3,4); a.append([4,5,6]); a;
[13:18] v8bot: chapel: TypeError: Function.prototype.apply: Arguments list has wrong type
[13:19] chapel: v8: Array.prototype.append = function () {var i, l;for (i = 0, l = arguments.length; i < l; ++i) {this.push.apply(this, arguments[i]);}};var a = [1,2,3]; a.append(2,3,4); a.append(4,5,6); a;
[13:19] v8bot: chapel: TypeError: Function.prototype.apply: Arguments list has wrong type
[13:19] chapel: v8: Array.prototype.append = function () {var i, l;for (i = 0, l = arguments.length; i < l; ++i) {this.push.apply(this, arguments[i]);}};var a = [1,2,3]; a.append([2,3,4]); a.append([4,5,6]); a;
[13:19] v8bot: chapel: [1, 2, 3, 2, 3, 4, 4, 5, 6]
[13:20] hellp has joined the channel
[13:20] chapel: v8: Array.prototype.append = function array_append() {var i, l;for (i = 0, l = arguments.length; i < l; ++i) {this.push.apply(this, arguments[i]);}};var a = [1,2,3]; a.append([2,3,4]); a.append([4,5,6]); a;
[13:20] v8bot: chapel: [1, 2, 3, 2, 3, 4, 4, 5, 6]
[13:20] sascha_ has joined the channel
[13:22] shinmei has joined the channel
[13:29] sascha_ has joined the channel
[13:29] stbuehler: v8: var a = [1,2,3]; a.append([2,3,4]); a.append([4,5,6]); a;
[13:29] v8bot: stbuehler: TypeError: Object 1,2,3 has no method 'append'
[13:30] stbuehler: v8: var x = new Buffer("abc"); x;
[13:30] v8bot: stbuehler: ReferenceError: Buffer is not defined
[13:30] chapel: its a clean v8 instance
[13:30] stbuehler: yes yes..
[13:30] RevoOf: what was the name of that standart c++ debugger?
[13:30] frodenius: gdb?
[13:31] RevoOf: frodenius: thank you
[13:31] frodenius: (btw, standard/standart :P)
[13:31] RevoOf: (^^)
[13:32] sascha_ has left the channel
[13:40] smtlaissezfaire has joined the channel
[13:42] sstreza has joined the channel
[13:43] siong1987 has joined the channel
[13:45] splashs_ has joined the channel
[13:47] sstreza has joined the channel
[13:49] stbuehler: i guess it is a security feature... nodejs loads modules in a new v8 context, which probably resets the "native" prototypes
[13:55] sepehr has joined the channel
[14:01] zomgbie has joined the channel
[14:05] arpegius has joined the channel
[14:11] ryan[WIN] has joined the channel
[14:18] mscdex: wasn't there an environment variable that says whether to use a new context for modules?
[14:18] synoptase` has joined the channel
[14:19] mscdex: stbuehler: try setting the NODE_MODULE_CONTEXTS environment variable to 0
[14:19] pietern has joined the channel
[14:19] mscdex: that should load them all in the same context
[14:23] Ari-Ugwu has joined the channel
[14:26] kenbolton has joined the channel
[14:28] arnorhs has joined the channel
[14:28] Ori_p has joined the channel
[14:29] Ori_p_ has joined the channel
[14:29] chrischris has joined the channel
[14:32] JusticeFries has joined the channel
[14:36] cgutierrez has joined the channel
[14:37] davglass has joined the channel
[14:38] paulrobinson has joined the channel
[14:39] jakehow has joined the channel
[14:42] chapel: http://autho.me/
[14:47] arnorhs has joined the channel
[14:47] wink_ has joined the channel
[14:52] bzinger has joined the channel
[14:53] kenbolton has joined the channel
[14:53] d3x7r0 has joined the channel
[14:54] d3x7r0: Merry xmas everyone! Got a quick question: what's the best way to unzip a file using node?
[14:56] thecoon has joined the channel
[14:59] nolan_d has joined the channel
[15:00] Ari-Ugwu has joined the channel
[15:01] sugyan has joined the channel
[15:02] dnolen has joined the channel
[15:04] wasabist has joined the channel
[15:05] herbySk has joined the channel
[15:06] mscdex: d3x7r0: use `unzip` in a child process?
[15:06] d3x7r0: ohhh, thanks. I was trying to find out how to run a process from node but couldn't figure out how to do it. :)
[15:07] arnorhs: I'm having some problems with installing nodejs on ubuntu 10.10 -- I've installed it on another machine before with no problems
[15:07] arnorhs: I tried installing with apt-get but it wouldn't recognize "node" as a command, only "nodejs"
[15:08] arnorhs: so I also built latest version from source
[15:08] arnorhs: but no luck
[15:08] arnorhs: an installing npm without "node" command seems impossible
[15:08] skohorn_ has joined the channel
[15:09] mscdex: d3x7r0: http://nodejs.org/api.html#child-processes-91
[15:09] d3x7r0: yhep, already got it, thanks mscdex ;)
[15:09] mscdex: ah ok
[15:10] mscdex: arnorhs: iirc `node` isn't used in the debian package because another program with that name was in existance prior to nodejs
[15:11] mscdex: arnorhs: what problems did you have building node from source?
[15:11] arnorhs: none what so ever
[15:11] arnorhs: however, I was trying to install npm
[15:11] arnorhs: and that just terminated with "node - no such command"
[15:11] d3x7r0: arnorhs did you do: ./configure; make; make install?
[15:11] arnorhs: yes
[15:12] paulrobinson_ has joined the channel
[15:12] mscdex: arnorhs: if you execute `node` on the command line, you get the repl right?
[15:12] arnorhs: node install was fine.. I also tried to install npm both with the "one line install" and downloading and making
[15:12] d3x7r0: when you run node in the cli does it print out any error?
[15:12] arnorhs: nope
[15:12] brianm has joined the channel
[15:12] arnorhs: if I execute node in command line I get command not found
[15:12] d3x7r0: Then node isn't properly installed
[15:12] mscdex: did you do `sudo make install` ?
[15:13] arnorhs: yes
[15:13] RevoOf: what did it say?
[15:13] mscdex: arnorhs: what does `ls /usr/local/bin/node` say?
[15:14] arnorhs: no such file or directory
[15:14] mscdex: then it didn't install
[15:14] mscdex: that's where node installs to on ubuntu
[15:14] RevoOf: if it was in /usr/local/bin/ it would at least be found^^
[15:14] mscdex: are you sure you used sudo?
[15:15] RevoOf: (try repeating sudo make install and look what it says)
[15:15] arnorhs: when I think about it .. I'm not so sure
[15:15] d3x7r0: and also: are you sure it compiled properly?
[15:15] rpflo has joined the channel
[15:15] arnorhs: I'm very sure it compiled properly, but not sure about runnig sudo ..wait a sec (running to other computer)
[15:16] mscdex: yeah, on ubuntu you have to use `sudo make install`
[15:16] arnorhs: OMFG
[15:16] mikew3c_ has joined the channel
[15:16] mscdex: ?
[15:16] arnorhs: I'm such a blonde
[15:16] mscdex: hehe
[15:16] d3x7r0: It happens :)
[15:16] arnorhs: node is fine now
[15:16] arnorhs: thanks :)
[15:16] mscdex: cool
[15:17] prinzdezibel: What does it mean when the node.js shell displays an ellipses? I think I have entered a complete expression, but it still displays ...
[15:17] fumanchu182 has joined the channel
[15:17] d3x7r0: I actually don't install node systemwide personaly, I keep it in a hidden .bin folder in my home and add it to the path. No sudo for me :P
[15:17] fumanchu182: Would it be feasible to write a inet.d script for node.js that uses a specific file?
[15:18] fumanchu182: I would assume I would have to capture the PID of the instance of node running with that specific file?
[15:18] mscdex: prinzdezibel: it means that it expects more input or the currently typed javascript is invalid
[15:18] prinzdezibel: mscdex: you'r right. I had a mistake in my expression
[15:19] mscdex: fumanchu182: what os/distro?
[15:20] mscdex: ubuntu has upstart, which makes things pretty easy
[15:20] fumanchu182: mscdex, ubuntu
[15:20] fumanchu182: The final server will be on a ubuntu server.
[15:21] fumanchu182: I wrote a script now that starts up the server but I figure if I was going to do it right I might as well make it a service/upstart/inet.d
[15:21] fumanchu182: I'll do some research on ubuntu upstart.
[15:22] RevoOf: mscdex: i am not sure if that is good but: can upstart restart a service once it segfaults or sth?
[15:22] mscdex: RevoOf: sure
[15:23] RevoOf: mscdex: then i probably should take a closer look, too. thx
[15:23] mscdex: fumanchu182: here's an example upstart conf i use: https://gist.github.com/753111
[15:23] fumanchu182: Thank you.
[15:24] Kuroir has joined the channel
[15:25] siong1987 has joined the channel
[15:25] RevoOf: mscdex: that look very cool. i like the "start on net device up"
[15:25] mscdex: yep :)
[15:25] mattcodes has joined the channel
[15:25] fumanchu182: Cool, that's pretty nice this is what I am using from bash. https://gist.github.com/753114
[15:26] fumanchu182: I think I have my direction, I am going to learn more about ubuntu upstart and do it up nice.
[15:26] mattcodes: sending json to ExpressJS seems to be coming out with the object literals being quoted. e.g. in Firebug it sends {"a":"b"} if I do console.log(req.body) I see { a: 'b' }
[15:26] mattcodes: which doesnt parse
[15:26] glenngillen has joined the channel
[15:27] mscdex: mattcodes: what is typeof req.body ?
[15:29] mattcodes: ah
[15:29] mattcodes: its already done the parse
[15:29] mattcodes: typeof is object. thanks for pointer
[15:30] RevoOf: wierd. so it does parse json from the query string!?
[15:31] Ezku\ has joined the channel
[15:31] augustl_ has joined the channel
[15:31] mattcodes: no i was posting json. the bodydecoder must check content-type and automatically serialize the stringified post body to object
[15:32] paulrobinson_ has joined the channel
[15:32] RevoOf: mattcodes: ok. i thought the body decoder only parses abc=7&def=8&bla
[15:32] mattcodes: me too
[15:33] mattcodes: nicer seperation of concerns when you dont have to do JSON.parse(req.body)
[15:33] tob1 has left the channel
[15:33] Kuroir: is there an activerecord solution for any node.js framework out there?
[15:33] RevoOf: sure, just surprised me
[15:34] tob1 has joined the channel
[15:35] RevoOf: Kuroir: talking about records from a relational database?
[15:35] msilverman2 has joined the channel
[15:35] mscdex: Kuroir: there's several ORMs out there iirc. one for mysql here: https://github.com/sdepold/sequelize
[15:35] Kuroir: neat :)
[15:35] Kuroir: yeah I'm thinking about using Node.js + Something instead of Ruby + Rails for a project.
[15:37] Hello71 has joined the channel
[15:37] Hello71 has joined the channel
[15:39] Lorentz has joined the channel
[15:39] mscdex: Kuroir: there's also: https://github.com/zefhemel/persistencejs and https://github.com/biggie/biggie-orm
[15:39] Kuroir: interesting.
[15:40] Kuroir: one question, how prohibitive is that multicore issue about node.js?
[15:40] mscdex: what multicore issue?
[15:40] Kuroir: node.js works on single core processors only; no?
[15:40] mscdex: you can create multiple node processes to scale out to additional cores
[15:40] RevoOf: node.js only utilizes one core, effectively
[15:41] RevoOf: yes
[15:41] msilverman2: Sorry in advance for a long question. We have a situation where a java app is making service calls to a node process using express. There are 20 requests coming in at a time. The node process makes a service call to google to generate reports. The very first thing the node code does is output that it has received a request. We are finding that a number of requests are not showing up in the log on the no
[15:41] msilverman2: de side, even though we can confirm they are all generated on the java side.
[15:41] yule has joined the channel
[15:41] Ezku\ has joined the channel
[15:41] msilverman2: anyone know what might be going on here?
[15:41] ivanfi has left the channel
[15:42] mscdex: msilverman2: are you able to gist the relevant code?
[15:43] mscdex: Kuroir: if you're interested in scaling out to other cores, you may want to take a look at the likes of: https://github.com/pgriess/node-webworker and/or https://github.com/kriszyp/multi-node
[15:43] Kuroir: I'm amazed you guys are so social and supportive.
[15:43] chapel: :)
[15:43] Kuroir: giving me a good impression right here hah.
[15:43] chapel: just wait 3 years
[15:44] chapel: we will be like rtfm stfu n00b
[15:44] Kuroir: yeah I bet.
[15:44] maushu has joined the channel
[15:44] Kuroir: is there a book about node.js already ?
[15:44] chapel: there is an open source book
[15:44] RevoOf: btw: node drops malformed requests quietly
[15:44] maushu: Wat.
[15:44] mscdex: not yet
[15:44] chapel: but it was only partially finished
[15:44] RevoOf: or can i get those errors?
[15:44] mscdex: not a physical book anyway
[15:44] maushu: RevoOf, like he should do.
[15:45] RevoOf: maushu: what do you mean?
[15:45] Kuroir: any rails-like node.js framework or nothing like that available yet.
[15:45] maushu: Returning errors gives a new vector to attackers.
[15:45] RevoOf: maushu: in an open source project?
[15:45] mscdex: Kuroir: the problem is that until recently, node was evolving and changing so quickly that a book would be outdated very soon
[15:45] maushu: Don't question my authority!
[15:45] fumanchu182: mscdex, can you explain the part of that gist in regards to (filesystem and net-device-up IFACE!=lo), I was looking through the wiki and couldn't find anything that relates to these options for start on
[15:45] chapel: Kuroir: nothing that does orm like active record, as well as scaffolding
[15:46] mscdex: Kuroir: it's starting to get better now though, since there are now stable branches
[15:46] RevoOf: maushu: or do you mean against port scanning or something?
[15:46] tlrobinson has joined the channel
[15:46] maushu: Nah, to send request garbage.
[15:46] mscdex: fumanchu182: that line just ensures that the filesystem and network are up before starting the service
[15:46] Kuroir: interesting, I've been having scalability problems with rals already trying to sustain 8000+ simultaneous users
[15:46] Kuroir: we had to varnish it up to hell.
[15:47] fumanchu182: Okay cool, I'm going to borrow that line :)
[15:47] mscdex: Kuroir: i'd bet a single node instance could handle at least that many users
[15:47] msilverman2: mscdex: great idea! I will pull out the relevant parts.
[15:47] mscdex: Kuroir: at least judging by real world numbers people have been giving
[15:47] Kuroir: mscdex: interesting.
[15:47] pt_tr has joined the channel
[15:47] chapel: mscdex Kuroir as long as you programmed it with efficiency in mind and didnt use blocking things like a relational db :P
[15:47] Kuroir: mscdex: do you have any real world numbers around?
[15:48] jpld has joined the channel
[15:48] jpld has joined the channel
[15:48] Kuroir: chapel: the relational db is not always the problem.
[15:48] chapel: in async land, if it is blocking, it can be killer
[15:48] chapel: and not in a good way
[15:48] Kuroir: I see.
[15:48] mscdex: Kuroir: i don't personally have any, but there was someone on one of the mailing lists the other day that was discussing hard numbers
[15:49] chapel: you have to realized node, if you work with one instance, is one thread, on one cpu core, with one event loop
[15:49] chapel: it works really fast
[15:49] chapel: but at any point you have code that makes the event loop not respond
[15:50] Kuroir: hm
[15:50] chapel: even slightly, it just adds to the problem
[15:50] chapel: anyways
[15:50] chapel: there are many ways to go about keeping that from happening
[15:50] chapel: do you know js Kuroir ?
[15:50] Kuroir: yes
[15:50] Kuroir: do you consider the developing speed of web apps fast with node?
[15:50] chapel: developing speed? insanely fast
[15:51] chapel: someone could reproduce rails in a week (mind you the ideas took years to perfect)
[15:51] chapel: or less if they were good
[15:51] chapel: ACTION is not that good
[15:51] chapel: nowhere near that good
[15:51] Kuroir: hmm
[15:52] chapel: I could be exaggerating of course
[15:52] Kuroir: any scaffolding tool available for node ?
[15:52] Kuroir: or nothing yet?
[15:52] chapel: honestly, I think its best to learn without scaffolding
[15:52] chapel: scaffolding is a crutch
[15:52] Kuroir: I like scaffolding to avoid repeating myself too much.
[15:52] mscdex: with the growing availability of useful node modules, it's really easy to come up with something you need quickly
[15:52] chapel: the way modules work with node, you can whip up mvc super fast if you want
[15:52] msilverman2: mscdex: The gist is here: https://gist.github.com/753153
[15:53] Kuroir: how fast is the node.js module developing community is expanding?
[15:53] Kuroir: anyone got a node.js job yet?
[15:53] chapel: huge Id say
[15:53] chapel: no.de
[15:53] chapel: joyent
[15:53] chapel: ryah
[15:53] chapel: creationix/tim caswell at hp on the webos team
[15:54] msilverman2: mscdex: It would seem to me that no matter what might go wrong with the other processes, we would always see the output from the inspect. But, we are missing a bunch even though on the Java side, all the requests have been made.
[15:54] chapel: those are the ones I can think of off the top of my head
[15:54] mscdex: Kuroir: node is still fairly young, but there are some node jobs out there
[15:54] chapel: honestly, I dont think even ruby/rails was this explosive at first
[15:54] skampler has joined the channel
[15:54] lianj: chapel: think again
[15:55] Kuroir: yeah.
[15:55] chapel: lianj: I am prone to talk out of my ass
[15:55] chapel: :P
[15:55] Kuroir: rails was pretty explosive..
[15:55] Kuroir: it's still a highly requested job on SF
[15:55] chapel: sure
[15:55] chapel: but rails has been out for a long time now
[15:55] mscdex: msilverman2: what is the inspect function?
[15:55] chapel: in internet time
[15:55] Kuroir: that's true again.
[15:56] chapel: July 2004
[15:56] msilverman2: It's just a pretty printer. Equivalent to console.log
[15:56] chapel: over 6 years
[15:56] chapel: node has been out barely over a year
[15:56] msilverman2: mscdex: It's just a pretty printer. Equivalent to console.log
[15:56] mscdex: hmm
[15:56] jashkenas has joined the channel
[15:57] chapel: rails didnt hit v1 until dec 2005, a year and 5 months after release
[15:57] chapel: though, node wont hit v1 for some time longer than that
[15:57] chapel: :P
[15:57] chapel: but comparing rails to node is wrong
[15:57] Kuroir: yeah I know
[15:57] Kuroir: you would need to compare it to a node.js framework
[15:57] chapel: because node should be compared to ruby, or python
[15:57] pt_tr_ has joined the channel
[15:57] Kuroir: yeah basically.
[15:58] lianj: eventmachine is nodejs in ruby worlds
[15:58] chapel: well sure, async is moving out at a fast pace
[15:58] Kuroir: I've used it. One thing I've noticed on some apps is ruby is actually the problem.
[15:58] chapel: seems like everyone is adopting it in one way or another
[15:58] Kuroir: depends on what ruby version you're locked to.
[15:59] chapel: but the nice thing about js, it is natively async (though the os isn't exactly)
[15:59] chapel: though I am speaking out of my scope
[15:59] chapel: so feel free to correct me
[15:59] RevoOf: chapel: some languages look good doing async stuff and some don't
[16:00] chapel: as far as rails like stuff in node, I think it will be a little longer before we get something that competes directly as a whole
[16:00] lianj: chapel: ry worked on eventmachine before stating node.. iirc
[16:00] Kuroir: anyone got some node.js and frameworks benchmarks in hand?
[16:00] chapel: since node at its core is still being defined
[16:00] chapel: eh, benchmarks are not reliable
[16:01] Kuroir: chapel: how come?
[16:01] mscdex: msilverman2: i'm not sure what to tell you then. does using something that prints to stderr (such as sys.error or util.error) work?
[16:01] yozlet has joined the channel
[16:02] mscdex: msilverman2: i'm guessing it also doesn't make a difference if you have a console.log() inside your uploadToS3 callback?
[16:02] chapel: because benchmarks are arbitrary to a specific scenario and almost never show true production levels, they can easily be over or under what real performance is
[16:03] lianj: you still need benchmarks to mesure at least something. it like with testing you can write good or bad/needless tests
[16:04] Kuroir: well..
[16:04] Kuroir: Hello Worlds are good tests for me.
[16:04] dmcquay has joined the channel
[16:04] RevoOf: becouse production only adds to it
[16:04] Kuroir: I've been having to deal with AJAX a lot lately and Hello Worlds begin to look pretty real to me.
[16:04] mscdex: or as the internets calls them, "o hai world"
[16:04] Kuroir: mscdex: hah!
[16:04] chapel: heh
[16:04] chapel: Kuroir
[16:04] chapel: write your own test
[16:04] chapel: I mean
[16:05] chapel: its super simple to do
[16:05] mscdex: everything in node is super
[16:05] mscdex: :P
[16:05] chapel: use the hello world test on the doc homepage
[16:05] Kuroir: e-penis enlarger "Everything in node is super" <- haha
[16:05] d3x7r0: "Once you go node, you don't go back" :D
[16:06] lianj: even if there is no super()
[16:06] Kuroir: that's what I was thinking.
[16:06] d3x7r0: and yes, that's probably what she said
[16:06] Kuroir: anyone here ditching ruby + rails in favor of node + youchoose already?
[16:06] d3x7r0: ACTION goes back to the regular scheduled programming
[16:06] RevoOf: too bad i can't imagine a slogon with __proto__
[16:06] mscdex: Kuroir: what about those of us who didn't bother with ruby in the first place? :p
[16:07] msilverman2: mscdex: right. If I comment out everything but the inspect, I see all 425 requests. What's odd is that each request is coming in separately, so even if something is going horribly wrong either on the google report or S3 upload, I would still expect to see that log line for each and every request. It seems that node itself is becoming unstable at some point.
[16:07] msilverman2: mscdex: BTW, I have also monitored node's memory usage, and it has been fine.
[16:07] Kuroir: Well I come from developing frameworks on PHP; had to move to ruby, which has been a good ride so far.
[16:08] chapel: v8: function super() { return 'Node.JS'; }; super();
[16:08] v8bot: chapel: "Node.JS"
[16:08] Kuroir: however, we've had trouble with scalability on rails and server costs don't see good for me on my budget-less projects.
[16:08] chapel: :)
[16:08] mscdex: Kuroir: yeah i use PHP at work, except for when i sneak in some sweet node action
[16:08] mscdex: msilverman2: hmm odd
[16:08] lianj: mscdex: they are going to repeat it all over again
[16:08] Kuroir: mscdex: use a framework?¿ ;)
[16:09] mscdex: Kuroir: not currently, it's a custom setup, but i'm trying to nudge them into switching to cakephp
[16:09] d3x7r0: I'm probably nuts to say this but I still enjoy php quite a bit... sure it's like a language design graveyard but it gets the job done fast and it's mostly unforgiving. Still can't beat nodes async nature
[16:09] Kuroir: mscdex: I've used all the php frameworks out there.
[16:09] Kuroir: mscdex: I recommend you to use Yio.
[16:09] Kuroir: mscdex: Yii*
[16:10] mscdex: i've looked at yii
[16:10] mscdex: i'm not so sure about performance though if you have a ton of records in the database though
[16:10] Kuroir: mscdex: even though I used to love CodeIgniter.. but it ended up turning into a kind of closed-source project.
[16:10] mscdex: when you retrieve or save them
[16:11] chapel: d3x7r0: well honestly after using node, I would say node can be just as fast or faster getting code up and running
[16:11] boaz has joined the channel
[16:12] pt_tr_ has joined the channel
[16:12] teemow has joined the channel
[16:12] d3x7r0: chapel, true if you are already proficent with the "node way".
[16:12] Kuroir: http://www.google.com/insights/search/#q=node.js%2Cruby%20on%20rails%2Ccakephp%2Cdjango%20python&cmpt=q
[16:12] Kuroir: interesting goole insights.
[16:12] mscdex: msilverman2: have you tried appending to a file instead of outputting to the console? that's about the only other thing i can suggest
[16:13] chapel: I had to brute force that knowledge into my brain d3x7r0, still learning, but it is becoming easier and easier to slap stuff together, though I still come in here and make a fool of myself regularly :P
[16:14] mscdex: afk
[16:14] d3x7r0: chapel, It's not a shame to ask, it's a shame not to ask :P
[16:15] d3x7r0: Reminds me of the times when someone came to me in panic cause the design broke: they wanted all text to be justified so instead of asking me to do it they used the cms to justify every text in the website
[16:15] Kuroir: HA
[16:15] Kuroir: that's so common.
[16:16] mscdex: back
[16:16] chapel: eh, well I am trying to get myself to not come here as fast as I do
[16:16] Kuroir: welcome back
[16:16] chapel: I do searches on google and the node docs quite a bit before asking here
[16:17] chapel: but a lot of the time, there isn't really good info, or its out dated
[16:17] Kuroir: I'm trying to decide if I should use node.js for a serious project; any disadvantages any experienced developer has found so far?
[16:17] chapel: umm, if you aren't familiar with async on the server, it will be hard to pick up at first
[16:17] chapel: not impossible, but just have to make a transition mentally
[16:17] Kuroir: chapel: that's not a major problem for me at list.
[16:17] d3x7r0: chapel, that's what happens in a new, fast-paced project like node: sometimes looking at code comments in git helps as well
[16:18] RevoOf: kuroir: javascript as a language is also *new*
[16:18] Ori_P has joined the channel
[16:18] chapel: even knowing js, its not always cut and dry
[16:18] chapel: d3x7r0: I look at tons of code
[16:18] Kuroir: I'm pretty advanced on that matter. I don't regret learning ruby since that's what I use to develop a lot of the Textmate bundles I've developed.
[16:19] d3x7r0: I actually lost almost 3 days trying to figure out why I couldn't use if (db.exists()) in cradle... it was an async call :P
[16:19] chapel: but again, sometimes there just isn't anything cut and dry for things Ive been trying to do, though at least 4 or 5 times the issues were stupid simple things that if I had played with the code a bit more I would have figured out
[16:19] chapel: heh
[16:19] chapel: db.exists(function(er, data) { if(!er) code... }
[16:19] chapel: :P
[16:20] mscdex: i regret learning scheme
[16:20] mscdex: ;-)
[16:20] Kuroir: lol
[16:20] d3x7r0: I almost have to lookup how to do a for from time to time (jumping between java, js, php, bash, etc kind of turns my brain to water :P)
[16:20] chapel: my early node stuff was heinous
[16:20] Kuroir: Node.js seems like a good choice to me since it's Javascript.
[16:20] chapel: well remember, standard for loop, forEach for arrays, .some
[16:21] Kuroir: Javascript is dead simple to learn and understand. Also the fact that it can be run in the front-end is also sexy.
[16:21] chapel: also ecma script 5
[16:21] chapel: so you have extra tools
[16:21] chapel: not available in most browsers
[16:22] d3x7r0: I decided to try node when I found myself abusing curl to do async stuff on php...
[16:22] possibilities has joined the channel
[16:23] chapel: node rocks!
[16:23] chapel: right mscdex
[16:23] chapel: ?
[16:23] mscdex: node.js rules!
[16:23] Kuroir: lol
[16:23] Kuroir: forget about that
[16:23] Kuroir: when I found out a simple hello world on rails
[16:23] kriszyp has joined the channel
[16:23] Kuroir: is 350-400ms
[16:23] Kuroir: I cried.
[16:23] tlrobinson has joined the channel
[16:24] d3x7r0: Damn, I never did try ror but is it really that slow?
[16:24] mscdex: every time a developer chooses Ruby, God kills a kitten.
[16:24] Kuroir: at some points yeah.
[16:24] Kuroir: but the development speed is insanely fast.
[16:24] Kuroir: I mean we could build a system in 5 days that would had taken 1 month at least on PHP
[16:24] skm has joined the channel
[16:24] gkatsev: lol, php.
[16:24] Kuroir: the gold rule for Rails is Varnish. Cache everything
[16:25] d3x7r0: true, if there's one thing php isn't is fast to develop on :P
[16:25] gkatsev: there is now a webframework for haskell.
[16:25] gkatsev: and there was one for scala for a while.
[16:25] gkatsev: and of course there is one for python
[16:25] gkatsev: so, I don't see the point of choosing php anymore.
[16:25] chapel: erlang as well
[16:25] ceej has joined the channel
[16:26] chapel: :)
[16:26] gkatsev: yep
[16:26] Kuroir: PHP == cheap
[16:26] d3x7r0: gkatsev, 2 words: shared hosting... not that I use it
[16:26] Kuroir: Python == Ruby at some points really
[16:26] gkatsev: vps ftw!
[16:26] gkatsev: Kuroir: still python/ruby >>>> php
[16:26] Kuroir: yeap
[16:26] Kuroir: totally
[16:26] Kuroir: I agree.
[16:26] briznad has joined the channel
[16:27] d3x7r0: I just can't like python... the syntax irks me too much
[16:27] chapel: one thing node has going for it over everything else, most people that do websites know js to a varying degree, so it is easier to jump into
[16:27] gkatsev: but I like node because you only need 3 things on the dev stack: js, html, and css.
[16:27] Lorentz has joined the channel
[16:27] chapel: the major downfall of node is that it usually requires a vps or some advanced hosting
[16:27] d3x7r0: gkatsev, same here: long live json everywhere :P
[16:27] Kuroir: I don't like Python also
[16:27] Kuroir: hmm
[16:27] gkatsev: though, I guess c/c++ is also good if you want to extend node
[16:28] Kuroir: ok quick question: How much time does it make a blog with Node.js + Express
[16:28] gkatsev: python has a lot of cool stuff. Some of which js is actually copying, especially in mozilla's implementation.
[16:28] jakehow has joined the channel
[16:28] d3x7r0: gkatsev, I do know one persone who a couple of years back was building most of his logic in C with php for the frontend bits... nuts? Completely.
[16:29] tswicegood: d3x7r0: fast? Completely. :-)
[16:29] yozlet has joined the channel
[16:29] d3x7r0: tswicegood, yes it was, couldn't argue with that :P
[16:29] arpegius has joined the channel
[16:29] gkatsev: d3x7r0: yep, even a friend of mine who is a complete C nut, he can actually write lambdas and nested functions with the gcc extensions will not use it for webdev.
[16:29] yozlet has joined the channel
[16:29] gkatsev: Kuroir: probably not long.
[16:29] Kuroir: 10 minutes?
[16:29] Kuroir: 15 minutes?
[16:30] d3x7r0: also notice I said C and not C++ :P
[16:30] RevoOf: kuroir: yeah
[16:30] chapel: Kuroir: a blog in express? umm 8 hours if you wanted full features
[16:30] chapel: thats for me though
[16:30] chapel: :P
[16:30] gkatsev: Kuroir: especially if you use a db lik couch/mongo to store the data since it will allow you to add features later on VERY easily.
[16:30] RevoOf: kuroir: just write a html or jade template, then put some data in^^
[16:30] dandaman has joined the channel
[16:31] JusticeFries has joined the channel
[16:32] Kuroir: I'm seriously thinking about it since Node.js is fast and it seems like one server can handle a lot by itself.
[16:32] gkatsev: Kuroir: you can also use wheat, which is a git based node blogging system which is already made for you, lol https://github.com/creationix/howtonode.org
[16:32] Kuroir: hmm I noticed that has no MVC:
[16:32] aheckmann has joined the channel
[16:32] tswicegood: the "how long does it take to build " is a red herring, though. Sure, it takes 5 minutes to build a blog in Rails, but that's with very little to it.
[16:32] d3x7r0: git based? LOL
[16:32] gkatsev: I guess this specifically https://github.com/creationix/wheat
[16:33] gkatsev: d3x7r0: yeah, allows you to have the posts in git and have people contribute easily
[16:33] RevoOf: kurior: you can do mvc in node
[16:33] Kuroir: ok let me reformulate the question.
[16:33] d3x7r0: gkatsev, that's way too awesome. :)
[16:33] gkatsev: d3x7r0: there are a lot of people who are also moving to vcs based resumes now as well.
[16:33] gkatsev: Kuroir: express does mvc
[16:33] gkatsev: kind of
[16:34] gkatsev: there is also backbone which is awesome
[16:34] Kuroir: "What's the average time it takes to an experienced user to create a basic CRUD application that connects to a simple MySQL Table that follows the MVC paradigm."
[16:34] d3x7r0: gkatsev, well I do have my personal website versioned using git (so I do a simple git pull on the vps to update to the latest version when I change something)
[16:34] gkatsev: backbone actually has couchdb bindings, so, you don't even need a server, lol
[16:34] gkatsev: d3x7r0: yep, that's what i am starting to do.
[16:34] gkatsev: also, moving to a node based website
[16:35] d3x7r0: dvcs are awesome :)
[16:35] gkatsev: though, I like hg slightly better as it is easier for the simple stuff. Also, bitbucket, while not as social as github, has a few extra features such as unlimited public/private repos
[16:36] matjas has joined the channel
[16:36] tswicegood: Kuroir: I would say basic functionality is within hours (if not tens of minutes). That said, most of them aren't going to be talking to MySQL and Node's sweet spot (imo) isn't as a replacement for Rails/Django/Symfony, it's as a replacement for the Ruby/Python/PHP + Apache web stack
[16:36] d3x7r0: never tried hg, been happy with git so far
[16:36] tswicegood: Node is lower level, but still gives you the ability to do things like howtonode.org
[16:37] Kuroir: tswicegood: yeah I noticed about that.
[16:37] tswicegood: gkatsev: GH has unlimited public repos, just not private, so that's only half a + for bitbucket ;-)
[16:37] Kuroir: I mean I'm thinking of Node as a solution for stuff that needs to be async 100%. or as a separate service that works with something static.
[16:37] gkatsev: d3x7r0: it's pretty much the same thing. Git probably has better/more powerful branching.
[16:37] Kuroir: for instance, lets say I have the following setup: Ruby Rails
[16:37] Kuroir: ups;
[16:38] Kuroir: Ruby and Rails for the basic back-end, with Varnish setup to cache everything. Front-end connects through API sending JSON to Node which connects to the DB and gives info back to the front-end.
[16:39] d3x7r0: how about: simple node api and full html/js webapp on the other side? JK :)
[16:39] gkatsev: tswicegood: heh, yes. It also has 5 private collaborators. But yeah, no major plus for hg/bitbucket for git/github.
[16:40] sh1mmer has joined the channel
[16:41] tjholowaychuk has joined the channel
[16:41] tswicegood: gkatsev: I've been on the business plan since they released the Bronze, so I have unlimited collaborators (forgot they limited it on personals actually). But then again, I am a bit biased toward Git ;-)
[16:42] tswicegood: Kuroir: So the client connects to Node, which connects to Rails and serves stuff? Could be reasonable depending on what pain point you're trying to eliminate.
[16:42] Kuroir: d3x7r0: varnish does exactly that, it's plain html on teh end.
[16:42] d3x7r0: then why not lighttpd?
[16:42] gkatsev: tswicegood: yeah. Bitbucket was a good choice for me as a college student, especially before atlassian bought it. Though, a friend emailed github and told them he was using it for academics and they upgraded him for free.
[16:42] Kuroir: d3x7r0: did you ever try varnish? =P
[16:42] strixv has joined the channel
[16:43] d3x7r0: Kuroir, I have to admit I haven't touched ruby, rails or any other related projects :)
[16:43] gkatsev: tswicegood: and as I said, for most basic stuff, I think that hg is easier to use and understand but git has much more powerful branching, so, if you need/want to do a lot of branches, git is definitely the way to go. Otherwise, it's probably around the same.
[16:44] tswicegood: gkatsev: I've heard a lot of people say they think hg is easier, but I'm not sure why. I've only given hg a cursory glance, but the only thing it does that's really "easier" (imo) is numbered revisions.
[16:44] CrypticSwarm has joined the channel
[16:44] hunterloftis: I found hg easier to jump into, coming from no history of source ontrol
[16:44] hunterloftis: control*
[16:45] hunterloftis: but these days I use git, since it seems everyone does
[16:45] dandaman has joined the channel
[16:46] tswicegood: hunterloftis: I've always thought bzr filled that roll pretty well (the "I've never heard of VCS before")
[16:46] ajpiano has joined the channel
[16:46] tswicegood: ACTION looks and realized this is the #node.js channel and he's taken it completely off-topic...
[16:46] gkatsev: yeah, but bzr is much different and git/hg are practically the same, especially for the very basic commands
[16:49] chapel: Kuroir: the nice thing about node is that you can eliminate a lot of the latency that can be added by having so many stacks to handle
[16:49] chapel: varnish is good at what it does, but it is an ends to a means
[16:49] chapel: you could easily write your webapp to cache itself and serve rendered/cached files just as easily
[16:50] chapel: because with node you are writing not only the web app, but the http server, and in this case, the cache server as well
[16:50] deepthawtz has joined the channel
[16:50] Ari-Ugwu has joined the channel
[16:50] chapel: you could also handle the proxy as well between multiple node instances and machines
[16:53] tswicegood: chapel: +1
[16:54] Ori_P has joined the channel
[16:54] tswicegood: So much of the web the last 5 years has been dealing with the deficiencies of RAD frameworks instead of re-thinking them. Node gives developers the opportunity to rethink their architecture instead of just trying to plug holes everywhere.
[16:55] d3x7r0: tswicegood: +1
[16:55] chapel: +1
[16:55] chapel: tswicegood++
[16:55] v8bot: chapel has given a beer to tswicegood. tswicegood now has 1 beers.
[16:55] chapel: :)
[16:56] d3x7r0: LOL :D
[16:56] chapel: exactly how I see it with node
[16:56] chapel: and I am only barely touching the surface
[16:56] tswicegood: I've been known to write something worth a + or two every year or two... guess I just blew any shot of doing it for 2011 now :-/
[16:56] chapel: I can't wait until we get the whole browser dom emulated 100% in node and at acceptable speeds
[16:57] tswicegood: chapel: why do you want the DOM emulated?
[16:57] chapel: well
[16:57] chapel: there are cool things you can do parsing other websites
[16:57] gkatsev: render everything serverside?
[16:57] chapel: that too
[16:57] tswicegood: let me suffix it with: if you want the DOM in Node you're almost always doing something wrong :-)
[16:57] chapel: but not my main use case
[16:57] case__: tswicegood, +1 :)
[16:58] tswicegood: almost being the key word -- what's your use case?
[16:58] chapel: scraping websites as pure html is not very elegant or useful
[16:58] gkatsev: tswicegood: well, it would work really well for a mobile website, render everything in node and send just the rendered stuff to the client.
[16:58] chapel: a ton of sites/services still dont do apis
[16:58] mattcodes has joined the channel
[16:58] dandaman has joined the channel
[16:59] chapel: so be able to interface with anything really, and pass that on would be awesome
[16:59] d3x7r0: chapel, most of those sites would probably frown on scraping :P
[16:59] tswicegood: gkatsev: You could use Jade or Mustcache or to do the rendering
[16:59] chapel: sure d3x7r0
[16:59] chapel: but its a use case
[16:59] chapel: there are more, but atm my brain is fuzzy
[16:59] tswicegood: chapel: agreed on the scraping - I generally end up stepping back out to Python for something like that and PyQuery or Ruby and Hpricot, then store the data in something that Node can talk to
[17:00] chapel: anyways, mostly just think its cool
[17:00] pengwynn has joined the channel
[17:00] tswicegood: It would be nice to be able to use jquery sytnax on results from other sites... that's the biggest use case I can see for dom-like stuff in Node
[17:01] chapel: being someone that writes scripts (applescript eww) for a mac based irc client, Ive had to manually parse websites for data that I wanted to make scripts for
[17:01] chapel: rule 34: Generally accepted internet rule that states that pornography or sexually related material exists for any conceivable subject. Additionally it is accepted that the rule itself has limitations and you cannot be too specific on the content of the item in question. Most commonly used on various message... | Full Definition @ http://urbanup.com/define.php?term=rule+34
[17:01] chapel: thats all using applescript scraping
[17:02] chapel: made that long before node came out
[17:02] chapel: I just made both a node based gist cli script and applescript for my irc client
[17:05] marcostoledo has joined the channel
[17:05] skohorn has joined the channel
[17:06] chapel: https://gist.github.com/753249
[17:06] chapel: anyways
[17:06] mattcodes has joined the channel
[17:11] RevoOf has left the channel
[17:13] chapel: I've killed #node.js
[17:13] chapel: :(
[17:13] MattJ has joined the channel
[17:14] gkatsev: chapel: the only honorable thing to do now is seppuku
[17:14] chapel: heh
[17:14] chapel: well I could part
[17:14] chapel: but Id still be connected
[17:14] chapel: bouncer and all
[17:14] gkatsev: lol
[17:14] gkatsev: ACTION -> lunch
[17:14] msekimura has joined the channel
[17:14] chapel: sleep actually for me
[17:15] gkatsev: night
[17:15] chapel: then meeting at 3:30pm
[17:15] Sbioko has joined the channel
[17:15] chapel: after I get up
[17:15] Sbioko: hi all
[17:16] BrianTheCoder has joined the channel
[17:18] Gruni has joined the channel
[17:21] mattcodes has joined the channel
[17:22] mattcode_ has joined the channel
[17:23] tlrobinson has joined the channel
[17:23] Kuroir: hah
[17:23] Kuroir: so I had a meeting with the engineers.
[17:23] Kuroir: about node.js
[17:23] Kuroir: they were pretty excited.
[17:24] aurynn: node.js is pretty exciting.
[17:25] MikhX has joined the channel
[17:25] Kuroir: yeah looks like we'll ditch it
[17:25] Kuroir: i mean rails
[17:25] Kuroir: =p
[17:26] rpflo has joined the channel
[17:26] rpflo has joined the channel
[17:26] stephank has joined the channel
[17:27] herbySk has joined the channel
[17:30] tjholowaychuk: can only the topic in vows be async?
[17:31] bingomanatee: I'm not against seppuku; however if you have made the decision to take yourself out, isn't there at least one other person you want to take with you to hell?
[17:31] Kuroir: oh the famous tjholowaychuk
[17:32] Kuroir: tjholowaychuk: like most of the stuff I've been reading about node comes from your site lol
[17:32] tjholowaychuk: haha :) thanks
[17:32] chapel: bah didn't mean to send it twice
[17:32] tjholowaychuk: i have a site? or do you mean my blog
[17:32] tjholowaychuk: I havent blogged in a while
[17:33] bingomanatee: Why not just scrape your pearls of IRC wisdom back to your blog? save some time :D
[17:33] chapel: ..Rails of Django because all the cool companies use those, we might get to talk at a conference or two." "That doesn't sound so bad." "Have you been to a Node conference?"
[17:34] Kuroir: tjholowaychuk: your blog of course, tumbler
[17:34] tjholowaychuk: Kuroir: ah :) yeah should be announcing a few new libs soon
[17:35] arrty has joined the channel
[17:35] chapel: Idk, I just was reading a web comic, must be where I got the inspiration
[17:35] d3x7r0: LOL!
[17:36] tjholowaychuk: not sure I understand why vow has these topics, when you can just put more than one assertion in the callback. just causes way more work lol
[17:36] tjholowaychuk: and if you cant have async code in the test functions thats kinda lame
[17:37] d3x7r0: ACTION is stuck in an endless refactoring cause he can't get it throw his thick skull that doing all the work in one method and then refactoring is a bad idea
[17:37] d3x7r0: through*
[17:38] chapel: heh
[17:38] chapel: you know what would be fun
[17:38] chapel: using node to create comic images and then using it also to serve the comic site, actually could use canvas to render the comic
[17:38] chapel: :)
[17:39] d3x7r0: you would just be serving SVGs?
[17:39] Me1000 has joined the channel
[17:39] tjholowaychuk: chapel: and if that pdf support in you could have paginated stuff rendered :)
[17:39] benburkert has joined the channel
[17:39] Kuroir: anyone here knows Destructoid?
[17:39] case__: chapel, i haven't published the artistic module for nodejs yet... :)
[17:40] bingomanatee: Has anyone here used hashlib? does it work, and is it faster than crypto?
[17:40] Sbioko has left the channel
[17:40] chapel: :)
[17:42] bingomanatee: actually chapel I've been thinking about node/JS delivered interactive comics.
[17:42] omygawshkenas has joined the channel
[17:43] chapel: ah yeah
[17:43] chapel: thats a great idea
[17:43] bingomanatee: I think 80% of the experience of say, Fallout could be told with REST delivered interative web pages.
[17:43] possibilities has joined the channel
[17:43] chapel: yeah
[17:43] chapel: could be a new 'game' style
[17:43] Kuroir: node.js seems like a good bet for social sites. hm
[17:43] linac has joined the channel
[17:43] lmorchard has left the channel
[17:44] bingomanatee: My idea is that anyone should be able to create a "scene" on their blog that JSON characters can wander through. You could keep the state for a given player/group by cloning the rest resource to their ID and from there you could have a massive distributed shared world on peoples' blogs.
[17:44] Kuroir: *STEALSIDEA*
[17:45] bingomanatee: Hey this is too big for just me - if anyone else wants to work on this let me know.
[17:45] zomgbie has joined the channel
[17:45] bingomanatee: I think its too big for you too:D
[17:45] chapel: well, it would be similar to those browser plugins that do chat on websites
[17:45] chapel: but in this case, it would be a virtual world on top of websites
[17:46] dandaman has joined the channel
[17:46] bingomanatee: The way I see it is that you have a frameset UI for the players - they can load any page they want in the middle, that's their "place" - you would use node sockets in the parent to manage multiplayer interaction
[17:47] chapel: yeah
[17:47] bingomanatee: so basically, you write a stateless "scene" in a web page,provide interaction rules through javascript functions, and it plays on the clients page through socket-enforced networking.
[17:48] bingomanatee: With a central control mechanism to police cheaters, you could allow basically anyone with a modicum of skill to design "places" and just use social networking to keep things clean.
[17:48] chapel: could be fun, maybe have channels too for large sites
[17:48] bingomanatee: In fact you could use google earth as a basis and just place "places" in the real world as markers.
[17:49] bingomanatee: Anyway I'll toss out a drupal blog at mylinkedface.com over the weekend - for those interested in contributing.
[17:49] chapel: :)
[17:49] chapel: ACTION goes to bed
[17:49] chapel: zzz
[17:50] sechrist has joined the channel
[17:50] bingomanatee: what time zone you in?
[17:50] Kuroir has left the channel
[17:50] chapel: Spokane, WA / Fog / 30°F -1°C / Humidity: 100% / Wind: NE at 5 mph
[17:51] chapel: pst
[17:51] chapel: I work graves
[17:51] chapel: just got off of work a few hours ago
[17:51] chapel: so zzz bbl
[17:51] gkatsev: night shift?
[17:52] gkatsev: also
[17:52] gkatsev: `ugt
[17:52] gbot2: Universal Greeting Time or UGT is a convention that states the when a user enters an IRC channel it is always morning and upon leaving it is always night, regardless of the actual physical locations of the users in the channel. http://www.total-knowledge.com/~ilya/mips/ugt.html
[17:54] dandaman has joined the channel
[17:54] CIA-93: node: 03Brian White 07master * r8275d7c 10/ (src/node_os.cc src/platform_cygwin.cc): Fix Cygwin compatibility in the os module - http://bit.ly/gSiKUh
[17:56] bingomanatee: bye
[17:56] davglass has joined the channel
[17:56] omygawshkenas has joined the channel
[17:58] nuba has joined the channel
[18:02] mscdex: `node
[18:02] mscdex: hrm
[18:03] herbySk: strange. I can't see the newest commit in my github dashboard (it shows in ry/node page), though I am normally watching ry/node repository. Is it only me or does github has this bug for others, as well?
[18:03] Kuroir has joined the channel
[18:03] mscdex: i've never had that problem
[18:03] herbySk: neither had I, this is first time
[18:03] Kuroir: mscdex: anything in node that is MVC?
[18:04] gkatsev: there are a bunch of mvc frameworks for node
[18:04] mscdex: Kuroir: geddy
[18:04] mscdex: is one
[18:04] herbySk: `help
[18:04] mscdex: there's several others
[18:04] Kuroir: mscdex: which are the popular? :)
[18:04] gkatsev: there are also ones based on django
[18:04] mscdex: Kuroir: i'm not the one to ask, i have yet to do anything like that with node
[18:04] gkatsev: if you want an only front-end one that works with node, try backbone
[18:04] mscdex: i do all the oddball stuff
[18:04] mscdex: :P
[18:04] herbySk: v8: "are you there?"
[18:04] v8bot: herbySk: "are you there?"
[18:04] gkatsev: knockout does mvc too
[18:04] Kuroir: backbone <- already use it for the front-end
[18:05] herbySk: yay, it's back
[18:06] ryah: mscdex: thanks
[18:06] mscdex: np
[18:07] mscdex: hopefully somewhere down the road cygwin will work properly with node
[18:07] mscdex: right now it silently crashes :\
[18:07] ryah: % ./node --debug test.js
[18:07] ryah: hello
[18:07] ryah: world
[18:07] ryah: debugger listening on port 5858
[18:07] ryah: connecting...ok
[18:07] ryah: debug> bt
[18:07] Kuroir: hmm
[18:07] ryah: #00 [anonymous]() node.js line 507 column 46 (position 14523)
[18:07] ryah: #01 #._onTimeout() /home/ryan/projects/node/test.js line 9 column 7 (position 238)
[18:07] ryah: #02 #.callback() timers.js line 95 column 39 (position 2364)
[18:07] ryah: debug>
[18:07] mscdex: well, node master branch anyway
[18:07] ryah: :D
[18:07] Kuroir: does node.js actually need a cache lol
[18:07] c4milo: ryah: awesome
[18:08] amerine has joined the channel
[18:08] tjholowaychuk: :D :D
[18:09] Ori_P has joined the channel
[18:10] Aria has joined the channel
[18:10] CIA-93: node: 03Ryan Dahl 07debugger * rcb03d51 10/ (lib/_debugger.js src/node.cc): Start on frame zero - don't do extra break - http://bit.ly/gc7MDD
[18:11] mraleph: ryah: cool \o/
[18:14] naneau has joined the channel
[18:15] naneau has joined the channel
[18:17] pt_tr has joined the channel
[18:19] CIA-93: node: 03Ryan Dahl 07debugger * r99a4185 10/ lib/_debugger.js : debugger: 'scripts' command was conflicting with 's' - http://bit.ly/hvU0ba
[18:21] joeshaw: ryah: nice. do tracebacks cross the main loop barrier now?
[18:21] ryah: no
[18:21] ryah: just some basic debugging
[18:22] ryah: would be nice to revive that patch and see how it would work into the debugger
[18:25] bingomanatee_: Hey is there any common app that requires port 666?
[18:26] TheEmpath: hail nodites
[18:26] ryah: % grep 666 /etc/services
[18:26] ryah: ircd 6667/tcp # Internet Relay Chat
[18:26] ryah: i guess not
[18:26] joeshaw: mdqs 666/tcp doom #
[18:26] joeshaw: http://ftp.arl.army.mil/~mike/papers/82usenix-mdqs/usenix.html
[18:26] joeshaw: probably not many users of that
[18:27] mscdex: psh
[18:27] TheEmpath: there goes any chances at a future contract with Boeing
[18:27] mscdex: i was playing me some wolf3d the other week
[18:27] TheEmpath: we're gonna need 32-bit port conventions soon :(
[18:28] mscdex: eh?
[18:28] TheEmpath: just incase i go over 65,000 servers per box
[18:28] Kuroir1 has joined the channel
[18:29] joeshaw: you could fork and have multiple processes on the same port, i believe
[18:32] sh1mmer has joined the channel
[18:35] foertel has joined the channel
[18:35] foertel: hey ho you guys
[18:35] maushu_ has joined the channel
[18:35] stride has joined the channel
[18:35] Kuroir1: o hai foertel
[18:38] Kuroir1 has left the channel
[18:39] CIA-93: node: 03Ryan Dahl 07debugger * r2e343f5 10/ lib/_debugger.js : highlight current script - http://bit.ly/hstbQK
[18:39] CIA-93: node: 03Ryan Dahl 07debugger * r60b8123 10/ lib/_debugger.js : add 'info breakpoints' - http://bit.ly/eGGXcz
[18:39] ryah: tjholowaychuk: you should get into this hot dbg action
[18:40] tjholowaychuk: ryah: yeah man im going to check it out right away
[18:40] ryah: step one - look in http://code.google.com/p/v8/wiki/DebuggerProtocol for something you want
[18:40] ryah: step two - add interface to lib/_debugger.js
[18:40] ryah: step three - profit!
[18:42] mjr_: I prefer to skip directly to step 3
[18:42] rauchg_ has joined the channel
[18:42] ryah: extra tip: there are secret commands to be found in https://github.com/ry/node/blob/d75c338dd6e9afe09356870cde456fd0c0e87e76/deps/v8/src/debug-debugger.js#L1332-1376
[18:44] tjholowaychuk: haha the ideal candidate for a switch() but nooo
[18:44] ryah: i think they do if cascade because they know it compiles to that anyway :)
[18:45] tjholowaychuk: its just tough to read
[18:46] ryah: just stick "debugger;" in your code and do "node --debug code.js"
[18:46] gkatsev: don't you wish that js had pattern matching?
[18:46] ryah: gkatsev: yes
[18:46] vineyard has joined the channel
[18:46] gkatsev: spidermonkey has a weak version of it available.
[18:47] gkatsev: I think that if I had my compilers course and used java or C rather than SML, I would've shot myself.
[18:51] broofa has joined the channel
[18:51] Aikar: request = %CompileString('(' + json_request + ')')();
[18:51] Aikar: what the hell does that % do?
[18:51] tjholowaychuk: Aikar: its their intermediate kinda language
[18:51] pt_tr has joined the channel
[18:51] tjholowaychuk: to bind c++ and js together
[18:51] Aikar: O.o?
[18:52] Aikar: it references a C implementation instead of a js func?
[18:52] ryah: mraleph: have you looked at lldb (the llvm debugger?)
[18:52] ryah: mraleph: i wonder if it has a plugin interface that's easier to use
[18:54] tjholowaychuk: ryah: ../src/node.cc:1938: error: ‘OS’ has not been declared
[18:55] ryah: tjholowaychuk: reconfigure
[18:55] mraleph: ryah: I have not. I will take a look.
[18:55] tjholowaychuk: ryah: i did a distclean
[18:55] ryah: mraleph: http://llvm.org/svn/llvm-project/lldb/trunk/include/lldb/
[18:55] tjholowaychuk: ill try again
[18:57] mraleph: Aikar: % prefixed calls are called "natives". they are either intrinsics which are inlined directly or lightweight runtime calls.
[18:57] isaacs has joined the channel
[18:57] Aikar: is it something we can use in node?
[18:57] mraleph: ryah: lldb is pretty sweet. I just watched some videos from llvm developers meeting.
[18:58] mraleph: Aikar: why would you want to use them?
[18:58] fly-away has joined the channel
[18:58] Aikar: if there was a performance gain for inlining code vs function call
[18:58] tjholowaychuk: Aikar: I dont think you can
[18:58] Aikar: ie same reasons youd inline a function in C++
[18:58] tjholowaychuk: AFAIK they run the parser with different flags etc
[18:59] mraleph: Aikar: they are details of implementation. some of them are not safe to use without excessive checks.
[18:59] mraleph: Aikar: when I say "inlined" I mean they are written in assembly.
[19:00] mraleph: it's not like: you prefix something with % and you get it inlined
[19:00] technoweenie has joined the channel
[19:01] emerleite has joined the channel
[19:01] mraleph: this are pieces that could not be implemented in JS... user code should not use them. Ideally if your method can benefit from inlining Crankshaft will see that and do inlining
[19:01] mraleph: *these
[19:02] emerleite: quit
[19:02] mscdex: :P
[19:02] sh1mmer has joined the channel
[19:03] Zenwolf has joined the channel
[19:03] bjy_ has joined the channel
[19:06] tjholowaychuk: ryah: same error
[19:06] mraleph: ryah: I cannot find any information about their JIT interface.
[19:08] mraleph: ryah: apparently they just started working on it: http://lists.cs.uiuc.edu/pipermail/lldb-dev/2010-December/000314.html
[19:09] femtoo has joined the channel
[19:09] mraleph: ryah: I doubt it will be any different from GDB. so one still will need to emit ELF/DWARF
[19:10] sechrist: Is there a way in javascript to make a class that prints out all kind of arbitrary calls to it?
[19:11] sechrist: for debugging purposes
[19:12] jashkenas has joined the channel
[19:12] _mql has joined the channel
[19:14] foertel: hey … thinking of some ways to do http live streaming (chunking) of mp4 with node.js … are there any existing approaches out there?
[19:16] omygawshkenas has joined the channel
[19:17] omygawshkenas has joined the channel
[19:20] sechrist: actually, something like a catchall getter/setter would work
[19:21] ryah: tjholowaychuk: osx?
[19:21] tjholowaychuk: ryah: yup
[19:22] tjholowaychuk: sechrist: you could iterate the props and proxy each getter/method
[19:22] tjholowaychuk: thats about all you can do right now
[19:22] ryah: tjholowaychuk: git rev-list HEAD -1
[19:22] tjholowaychuk: f68114e657af0ed2170078c57c72d64b9d4e2bac
[19:23] tjholowaychuk: wtf
[19:23] tjholowaychuk: it merged
[19:23] tjholowaychuk: 60b8123
[19:23] tjholowaychuk: is the real commit
[19:23] ryah: it breaks on 60b8123111d52127d6b44e0544c39459df9f4e2b ?
[19:23] pquerna: ryah: in order to properly earn my place in hell, I'm using SCons to build java jars.
[19:24] ryah: ACTION gags
[19:24] tjholowaychuk: ryah: yup
[19:24] ryah: tjholowaychuk: okay. breaking out the macintosh.
[19:24] tjholowaychuk: haha :)
[19:24] tjholowaychuk: I can patch, just need to straighten out my fork something is messed
[19:25] robotarmy has joined the channel
[19:28] ryah: i like the thing from lldb
[19:28] ryah: we should do that in the node debugger
[19:30] joeshaw: it's a little verbose though
[19:30] joeshaw: at least, setting a breakpoint is
[19:30] ryah: with a default noun of 'this thread' or something?
[19:32] ryah: tjholowaychuk: works for me
[19:32] derferman has joined the channel
[19:32] prinzdezibel has joined the channel
[19:32] tjholowaychuk: ryah: wtf.. hmm, I will try re-forking
[19:33] ryah: tjholowaychuk: git checkout -b xxx origin/debugger
[19:33] prinzdezibel_ has joined the channel
[19:33] sh1mmer has joined the channel
[19:35] robotarmy has joined the channel
[19:39] twoism has joined the channel
[19:40] Ari-Ugwu has joined the channel
[19:41] jimt has joined the channel
[19:46] jimt_ has joined the channel
[19:48] tilgovi has joined the channel
[19:49] siong1987 has joined the channel
[19:54] siong1987 has joined the channel
[19:55] jimt has joined the channel
[19:56] adambeynon has joined the channel
[19:57] stagas: tjholowaychuk: in jade, span.#{myClassVar} or span(class=myClassVar)
[19:57] tjholowaychuk: stagas: second
[19:57] stagas: ok :)
[19:59] davidwalsh has joined the channel
[20:00] tekky has joined the channel
[20:01] ibolmo has joined the channel
[20:01] stagas: tjholowaychuk: also is there a way to continue a js statement on the next line? I have an if that's 577 cols long https://gist.github.com/753464
[20:01] prinzdezibel_: How would I specify multiple exports? Do I need the line exports.myFunc = myFunc for every exported function?
[20:02] ibolmo has left the channel
[20:02] Ezku\: prinzdezibel_: alternatively, you can declare exports = { myFunc: ..., foo: ... bar: ... }
[20:02] prinzdezibel_: Ezku\: I've tried this.
[20:02] prinzdezibel_: I must have made an error
[20:02] Ezku\: are you saying it doesn't work? i might be mistaken.
[20:02] prinzdezibel_: Ezku\: Yes, that was my impression
[20:03] prinzdezibel_: But I need to double check
[20:03] peritus_ has joined the channel
[20:03] sh1mmer has joined the channel
[20:04] yozlet has joined the channel
[20:04] prinzdezibel_: Ezku\: No, that doesn't work.
[20:04] Ezku\: interesting...
[20:05] prinzdezibel_: Probably there are other properties on exports, which are overwritten that way
[20:05] Ezku\: more likely the exports object is just magic and doesn't like getting messed with
[20:06] dgathright has joined the channel
[20:06] tlrobinson has joined the channel
[20:09] tjholowaychuk: stagas: 577 cols???? wtf lol
[20:09] tjholowaychuk: make a helper lol
[20:09] tjholowaychuk: that is madness
[20:10] stagas: tjholowaychuk: I know, I kind of added one by another before realizing I couldn't split the line and then I was just lazy :)
[20:12] vborja has joined the channel
[20:12] stagas: tjholowaychuk: it would be a nice if there was an operator like: -- all here is js\n js\ js \n--
[20:15] ibolmo has joined the channel
[20:15] stagas: tjholowaychuk: maybe in 0.7.0? :)
[20:15] ibolmo: having trouble running lessc through php
[20:15] ibolmo: I'm guessing it is that the Cellar from npm is not part of the _www path
[20:15] tlrobinson has joined the channel
[20:15] isaacs: Cellar stuff should get a lot nicer today
[20:16] isaacs: finishing up a new npm version.
[20:16] ibolmo: cool
[20:16] ibolmo: have you run into this issue before isaacs ?
[20:16] isaacs: ibolmo: yes.
[20:16] tlrobinson has joined the channel
[20:16] isaacs: brew rm npm ; brew rm node; then install them both from source.
[20:16] isaacs: ibolmo: https://gist.github.com/579814
[20:16] isaacs: that works ^
[20:17] isaacs: or you can install npm from my homebrew fork rather than the official one.
[20:18] ibolmo: yeah i'm
[20:18] ibolmo: err.. guess i'll go with the second option (git all the way)
[20:18] ibolmo: brb while i do this
[20:18] foertel: mh … shouldn't readStream open a stream and wait for data? or does it just walk throu the file once?
[20:19] foertel: i wanna open a file as stream and wait for incoming data
[20:19] isaacs: foertel: it walks thorugh the file once
[20:19] foertel: jah … i felt that :D
[20:19] isaacs: foertel: you want like a tail -f thing?
[20:19] foertel: yeah
[20:19] isaacs: i think there was a way to do that.
[20:19] foertel: i found something like
[20:19] foertel: var tail = process.createChildProcess("tail", ["-f", filename]);
[20:20] isaacs: ...
[20:20] isaacs: require("child_process").spawn
[20:20] isaacs: that's what you want ^
[20:20] foertel: mh
[20:20] isaacs: i thought process.createChildProcess was gone. what version are you on?
[20:20] foertel: i'm on 0.2.4, don't know what this snippet is from
[20:21] isaacs: ok
[20:21] isaacs: new version of npm. come and get it! `npm update npm`
[20:21] isaacs: 0.2.13
[20:21] thebigbad: yay!
[20:21] ibolmo: that was quick isaacs. congrats
[20:22] isaacs: ibolmo: well, not when you count the last 3 weeks of working on it ;)
[20:22] prinzdezibel_: As a beginner I really like node.js documentation, which is really comprehensive for a dynamic project like this!
[20:23] hellp has joined the channel
[20:23] foertel: mh i'm wondering if propably it would even be enough to monitor the files size instead of the hole content
[20:24] foertel: i wanna do http live streaming of an upload-in-process file
[20:24] foertel: so monitor and every $x byte send the new stuff to ffmpeg and create a chunk
[20:24] ibolmo: def. isaacs just meant that you had just mentioned the release a minute or two ago :D
[20:30] pt_tr has joined the channel
[20:30] aklt has joined the channel
[20:33] matjas has joined the channel
[20:34] tjholowaychuk: ryah: checking it out now, do you just telnet to 5858?
[20:35] cheney has joined the channel
[20:37] tjholowaychuk: oh
[20:37] tjholowaychuk: haha
[20:37] tjholowaychuk: nvm
[20:37] ben_alman_ has joined the channel
[20:39] ibolmo: hrm does node follow symlinks?
[20:40] ibolmo: looks like __dirname doesn't
[20:44] tjholowaychuk: ryah: shit I got a segfault and now I just get ECONNREFUSED constantly haha
[20:44] rpflo has joined the channel
[20:44] tjholowaychuk: --debug-brk fixed it
[20:45] tapwater has joined the channel
[20:45] cjm has joined the channel
[20:46] ryah: tjholowaychuk: node --debug test.js (put 'debugger;' into test.js)
[20:47] ryah: yeah, it's not pretty yet
[20:47] tjholowaychuk: yeah its working I just crashed it with a setInterval() but its working again
[20:48] consiglieri has joined the channel
[20:49] tjholowaychuk: ryah: will let you know if i come up with any decent patches
[20:49] bob_: anyone know about scgi?
[20:50] bob_: what am i doing wrong http://pastebin.com/70NerZWM
[20:53] jimt has joined the channel
[20:58] kkaefer: how do I use node 0.2.5 with ndistro?
[20:59] kkaefer: ah, it's https://github.com/visionmedia/nodes
[21:01] stagas: bob_: what's the error?
[21:03] sh1m has joined the channel
[21:03] tprice: i dont get any data from the server
[21:06] matjas has joined the channel
[21:06] herbySk has joined the channel
[21:08] astropirate has joined the channel
[21:09] dioxide: would a node.js ircd be more efficient than the c/c++ offerings being used widely?
[21:09] dioxide: could it
[21:11] ryah: ACTION is off to bakersfield. bye.
[21:12] sh1mmer: ryah: do we get access to chrome.Interval?
[21:12] sh1mmer: http://calendar.perfplanet.com/2010/bulletproof-javascript-benchmarks/
[21:13] foertel has left the channel
[21:14] ncb000gt has joined the channel
[21:14] ncb000gt: tjholowaychuk: ping
[21:14] tjholowaychuk: yo
[21:15] derferman has joined the channel
[21:15] tisba has joined the channel
[21:16] mikew3c_ has joined the channel
[21:17] tlrobinson has joined the channel
[21:18] ncb000gt: hey, question. if I'm using layout in my express app (with jade) and have #{body} will html entities be turned into their xml-safe forms?
[21:18] ncb000gt: eg. < into <
[21:18] tjholowaychuk: ncb000gt: they are escaped now yes
[21:18] ncb000gt: bleh
[21:18] tjholowaychuk: !{body}
[21:18] ncb000gt: ok
[21:18] tjholowaychuk: is the alternate
[21:18] ncb000gt: aha!
[21:18] marcostoledo has joined the channel
[21:18] tjholowaychuk: but I mean typically you just do body!= body
[21:18] tjholowaychuk: or similar
[21:19] kschzt has joined the channel
[21:20] ncb000gt: tjholowaychuk: i was ust doing #{body} as I had some boiler plate code so didn't want to overwrite all of body itself
[21:20] ncb000gt: but, !{body} works :)
[21:20] ncb000gt: thanks
[21:20] tjholowaychuk: you can use #wrappper!= body
[21:20] tjholowaychuk: anywhere you want
[21:20] ncb000gt: aye
[21:21] ncb000gt: which would be the same as I've setup
[21:21] ncb000gt: just on one line instead of 2 :)
[21:22] ncb000gt: thanks again
[21:23] tjholowaychuk: ryah: started stuff here https://github.com/visionmedia/node/commits/debugger
[21:24] consiglieri has left the channel
[21:31] vborja has joined the channel
[21:33] sh1m has joined the channel
[21:35] jfd has joined the channel
[21:36] jfd: Anyone got a clue how to use the new TTY module?
[21:36] jfd: Are there any examples somewhere?
[21:36] yozlet has joined the channel
[21:36] peritus_ has joined the channel
[21:37] yozlet has joined the channel
[21:37] skohorn has joined the channel
[21:39] dandaman has joined the channel
[21:40] hunterloftis: Trying to @import 'styles.less' and I get Cannot find module 'less' - but less has been working so far on this project. Does it not support importing other less documents?
[21:43] Sembiance: Well, today is the day! In a few hours I will be flipping the DNS switch, redirecting my sites traffic from the current server Apache/PHP/Postgres to one running Nginx/Node.js/redis. 3.5 million visits a month (generting a lot more requests than that, of course)
[21:43] Sembiance: I'm looking forward to having node.js running on a production system :)
[21:45] hunterloftis: Sembiance: congrats! Interested in how it goes
[21:45] hunterloftis: What's your url?
[21:49] dandaman has joined the channel
[21:49] Sembiance: hunterloftis: http://worldofsolitaire.com
[21:51] astropirate: Sembiance, Hi, i'm new to node.js and kind of confused
[21:51] astropirate: isn't it suppose to replace apache?
[21:52] Jeffrey_ has joined the channel
[21:52] astropirate: + php
[21:52] astropirate: i mean how come you are using Nginx and node.js
[21:52] Sembiance: astropirate: so right now when the browser needs to get something from the database or put something in it, the pattern is: browser -> apache -> php -> postgres. This is changing to browser -> nginx -> node.js -> redis
[21:52] naturalethic has joined the channel
[21:53] Jeffrey_: I had a quick question about event emitters. Currently I have a object I made and I am setting this.prototype = new events.EventEmitter(). Does that not work?
[21:53] Sembiance: astropirate: nginx will server up all static files. Javascript, html, css, images, etc. All 'data' requests get handed off to node.js
[21:53] astropirate: ahhhh
[21:53] joeshaw: astropirate: you don't need to run nginx in front of node servers, but you can
[21:53] astropirate: this makes sense
[21:53] joeshaw: and you might want to if you don't want to implement a lot of the nitty gritty in your sever
[21:53] dnolen has joined the channel
[21:53] joeshaw: like keep-alive connections
[21:54] RevoOf has joined the channel
[21:55] Sembiance: astropirate: I run nginx inf ront of node.js only to avoid any security restrictions in browsers when dealing with different ports or domain differences
[21:55] mikeal has joined the channel
[21:55] Jeffrey_: Anyone have an ideas on how I can get a custom made object to be an event emitter also?
[21:56] technoweenie: Jeffrey_: use Util.inherits http://nodejs.org/docs/v0.3.2/api/util.html#util.inherits
[21:56] Jeffrey_: What if I am using 0.2.5?
[21:56] technoweenie: same thing
[21:57] Jeffrey_: Ok thank you.
[21:57] Jeffrey_: There is no util in 0.2.5.
[21:57] Jeffrey_: technoweenie: ^^
[21:58] hunterloftis: tjholowaychuk: do you know if the less compiler supports @imports?
[21:58] tjholowaychuk: i think so
[21:58] hunterloftis: tjholowaychuk: It seems to be trying, but failing because it can't find less. Is that you guys' component or something in connect I should check out the code of?
[21:59] tjholowaychuk: if connect can require it, then it should be fine
[21:59] tjholowaychuk: @import is kinda useless though IMO
[21:59] tjholowaychuk: I dont see the point of it
[21:59] tjholowaychuk: if anything it makes it harder to optimize
[21:59] hunterloftis: yeah? Ok then maybe I'm going about this wrong
[22:00] technoweenie: Jeffrey_: it used to be called sys
[22:00] technoweenie: you can call it either in 0.2.5
[22:00] hunterloftis: What I'm actually trying to do is: html -> global.css, which is compiled from global.less, which @imports several different .less files
[22:00] killfill has joined the channel
[22:00] Jeffrey_: technoweenie: sys does not have a method inherits...
[22:00] tjholowaychuk: i would just reference them separately then compress/aggregate in prod
[22:01] hunterloftis: tjholowaychuk: So my goal was to have one giant css file served to the client, but several smaller more manageable less files for dev
[22:01] Jeffrey_: At least in 0.2.5
[22:01] tjholowaychuk: hunterloftis: yeah, you can still do that
[22:01] technoweenie: sys.inherits has been around for a long ass time
[22:01] tjholowaychuk: @import is still causing requests though, well not via less but regular css @import
[22:01] tjholowaychuk: is very lame
[22:01] hunterloftis: tjholowaychuk: But weirdly, it can @Import 'something.css' but fails on @import 'something.less'
[22:01] Figaroo has joined the channel
[22:02] hunterloftis: tjholowaychuk: Okay I see my error then
[22:02] tjholowaychuk: hunterloftis: @import 'something.css' is probably just literal
[22:02] tjholowaychuk: where as the other probably inlines or something
[22:02] hunterloftis: Right, yep
[22:02] hunterloftis: But I don't think the other inlines
[22:02] hunterloftis: I think that's why I'm getting can't find a 'less' module errors
[22:02] hunterloftis: I think it's handling both literally. easy to find out...
[22:03] hunterloftis: tjholowaychuk: Huh nope, I can't even get straight at the .css file. Get a compile error at connect's compiler :/
[22:04] sh1mmer has joined the channel
[22:04] tjholowaychuk: hunterloftis: the css needs to be served with staticProvider
[22:04] tjholowaychuk: compiler doesnt serve it just compiles
[22:04] hunterloftis: Yeah it's being served with static (and has been working)... compiler is crashing once I add @import 'anything.less'
[22:05] tjholowaychuk: dunno
[22:05] tjholowaychuk: shouldnt have anything to do with connect
[22:07] andrehjr has joined the channel
[22:07] hunterloftis: var less = cache.less || (cache.less = require('less')); <-- that's killing me. What project should I include to be able to require('less')?
[22:07] jimt has joined the channel
[22:07] tjholowaychuk: less
[22:07] tjholowaychuk: lol
[22:07] hunterloftis: lol well yeah
[22:07] tjholowaychuk: if connect can require it, i dont see why you couldnt
[22:08] hunterloftis: but googling 'less nodejs' doesn't give a lot of great results ;)
[22:08] hunterloftis: connect can't requiring it - that's where the error is happening in connect/lib/connect/middleware/compiler.js
[22:08] hunterloftis: require*
[22:08] tjholowaychuk: ohhhh
[22:08] tjholowaychuk: haha
[22:08] tjholowaychuk: fuck
[22:08] tjholowaychuk: that makes more sense now
[22:08] hunterloftis: hahah
[22:08] tjholowaychuk: well you just need to tamper with require.paths so that it can do the require
[22:08] hunterloftis: It's damn weird though, because it's compiling my 'oldfile.less' fine ;)
[22:09] hunterloftis: fucking require.paths
[22:09] tjholowaychuk: hm
[22:09] hunterloftis: tjholowaychuk: I guess what I need to figure out is, where is the less/index.js or less.js that it's trying to require?
[22:09] hunterloftis: I can fix it with that path
[22:09] rauchg_: it's a submodule
[22:09] rauchg_: or you can install it with npm
[22:09] rauchg_: or you can clone your own submodule
[22:10] rauchg_: and tamper require.paths
[22:10] hunterloftis: cool, I'll ndistro it ;)
[22:10] rauchg_: as long as it has a structure like lib/less/index.js or lib/less.js
[22:10] tjholowaychuk: hunterloftis: in connect its in support/less but those are for the examples / tests
[22:10] hunterloftis: right
[22:10] hunterloftis: I've found that one
[22:10] tjholowaychuk: I get mad when people done have a ./index.js lol
[22:10] tjholowaychuk: and name their lib the same as it is on npm
[22:10] tjholowaychuk: supes mad
[22:10] hunterloftis: me too, like you guys with your mongoose/mongoose.js ;)
[22:10] rauchg_: that's why I usually recommend the project structure project/{lib/project,support,test}
[22:10] rauchg_: hunterloftis: not anymore in 1.0 tho
[22:11] rauchg_: but also that works with
[22:11] rauchg_: telling npm lib is ./
[22:11] hunterloftis: rauchg_: yep we're using 1.0 now
[22:11] rauchg_: so you can just require('mongoose')
[22:11] rauchg_: i'll probably
[22:11] rauchg_: rewrite the driver
[22:11] rauchg_: -native is really bad
[22:11] rauchg_: has tons of edge cases, and we only use a limited part of it
[22:11] hunterloftis: agreed, we've just dropped mongo for our major stuff
[22:11] rauchg_: so, we'll probably have swappable drivers
[22:12] hunterloftis: moved onto sql, since advanced mongo stuff wasn't (easy) with the existing drivers, even with mongoose
[22:12] isaacs has joined the channel
[22:12] hunterloftis: but mongoose 1.0 makes -native bearable for some of our auth stuff
[22:13] spetrea_ has joined the channel
[22:13] cheney has joined the channel
[22:13] herbySk74 has joined the channel
[22:14] hunterloftis: anybody know the github url for nodejs connect/less compiler?
[22:14] tjholowaychuk: hunterloftis: http://github.com/cloudhead/less.js
[22:15] hunterloftis: tjholowaychuk: baller, thx
[22:15] cheney1 has joined the channel
[22:15] pietern has joined the channel
[22:15] hunterloftis: Ryan's "Less is More with Node.js" dominates google ;)
[22:15] Hello71 has joined the channel
[22:18] technoweenie: cloudhead/less dominates github
[22:19] tjholowaychuk: meh
[22:19] tjholowaychuk: scss is way better code, but its all we have on node I suppose
[22:19] technoweenie: well i mean a search for less brings up cloudhead/less
[22:19] technoweenie: css 4 life
[22:20] tjholowaychuk: oh lol
[22:21] hunterloftis: less/index.js, line 115: process.exit(1); ... awesome ;)
[22:21] hunterloftis: (@import 'something.less' wasn't found)
[22:21] technoweenie: if your stylesheet lib cant exit the process, it has no balls
[22:21] hunterloftis: hahah
[22:22] hunterloftis: I'm working on clickdummy, Aaron's old code from when he was bored @Ally
[22:22] tjholowaychuk: wtf
[22:22] hunterloftis: It's amazing how much the node landscape has changed
[22:22] tjholowaychuk: it calls exit()?
[22:22] tjholowaychuk: haha
[22:22] hunterloftis: fuck yeah it does
[22:22] tjholowaychuk: awesome
[22:22] hunterloftis: listening for connections on port: 90
[22:22] hunterloftis: file '/Users/HunterLoftis/work/clickdummy/app/public/css/library.less' wasn't found.
[22:23] tjholowaychuk: what a lovely thing to do
[22:23] hunterloftis: it's time for a fork
[22:23] Aria has joined the channel
[22:23] zemanel: MerryChristmas.js
[22:25] perezd has joined the channel
[22:25] perezd: chapel: you there?
[22:25] bingomanatee_: I know this is n00B - but can you have numeric keys in a JSON object, i.e., {0: 1, 1: 3}?
[22:26] perezd: bingomanatee_: why not just use an array? (stupid question)
[22:26] perezd: ACTION is asking stupid question
[22:26] kschzt: puuh
[22:26] sechrist: var Rudolf = new Reindeer(); Rudolf.nose.color = "red";
[22:26] bingomanatee_: perzed: I think chapel is zzzz in after a night shift
[22:26] kschzt: (whew)
[22:27] perezd: bingomanatee_: ah, wanted to thank him for his guidance yesterday, ended up taking his advice.
[22:27] bingomanatee_: I'm not sure that I shouldn't -- I want to be able to for (a In list...)
[22:27] hunterloftis: bingomanatee_: You can have numeric keys, but I believe they'll be essentially converted to strings
[22:28] hunterloftis: so really you're using {'0' : 1, '1': 3}
[22:28] benburkert has joined the channel
[22:28] kschzt: sechrist, Rudolf.nose.shiny = true;
[22:28] perezd: I've never thought to do that, but yeah, makes sense
[22:28] bingomanatee_: its a list of cost and values, I want to be able to get one from another, both ways.
[22:28] hunterloftis: bingomanatee_: Might be a good idea to map both ways then, to avoid searches
[22:29] bingomanatee_: probably, yeah.
[22:31] emilepetrone has joined the channel
[22:31] perezd: how do you guys normally deploy/host node apps? just curious
[22:31] hunterloftis: perezd: I've been really impressed with webbynode.com
[22:32] creationix has joined the channel
[22:33] kschzt: perezd, i have something similar to Forever as a bash script, I run expresso tests in Hudson before I package and deploy them
[22:34] perezd: oo forever is cool
[22:34] sh1mmer has joined the channel
[22:34] perezd: planning on rolling my own instances on EC2
[22:34] perezd: so was thinking nginx + proxypass
[22:34] kschzt: why proxypass?
[22:36] emilepetrone: Any preferences out there for framework? geddy or express? building my first node app..
[22:36] kschzt: perezd, yeah, I use nginx too, which routes various paths to different Node services
[22:37] perezd: kschzt: yeah, I am still considering how that might look...if you broke it up into bits like that, care to indulge more?
[22:37] hunterloftis: emilepetrone: I tried both, and found express to have better range and support (and stability)
[22:37] kschzt: which run on different ports on 127.0.0.1 or other hosts (nginx is a decent load balancer too?)
[22:37] kschzt: perezd, sure, sec
[22:37] emilepetrone: hunterloftis: thanks ..thats what i was wondering
[22:38] hunterloftis: emilepetrone: geddy is promising, but we've been able to implement a pretty simple set of mvc middleware on top of express that moves it closer to rails
[22:38] cardona507 has joined the channel
[22:38] perezd: kschzt: I def want to avoid the monolithic app model, and this seems like a brilliant way to do that
[22:39] chapel: emilepetrone: I recommend for your first app/s with node you should work with the basics a bit
[22:39] emilepetrone: hunterloftis: k i'm coming from a django background which is why i was checking out getty, but it does seem there is more momentum behind express
[22:39] tjholowaychuk: emilepetrone / hunterloftis: that yeah is the bonus with express, you can just bend it to whatever you prefer
[22:39] chapel: get a feel for node
[22:39] tjholowaychuk: express is far more flexible
[22:39] chapel: but express is no rails (thats a good thing)
[22:39] kschzt: perezd, http://pastie.org/1401821
[22:39] hunterloftis: emilepetrone: chapel has a point, I started with lots of libraries/frameworks and now I have difficulty judging what is "node" and what is, for example, express
[22:39] perezd: chapel: hi :), I think I am taking your advice and moving entirely to node
[22:40] chapel: :)
[22:40] emilepetrone: chapel:
[22:40] perezd: kschzt: I meant, more how you decided to separate things out.
[22:40] emilepetrone: chpel: yeah fair point
[22:40] chapel: yeah perezd, it is a lot of fun, but also worth it, and you are in good company here
[22:40] chapel: emilepetrone: but whatever you do, its all good
[22:40] kschzt: perezd, nginx doesn't support ETags. I could also use a Socket.IO / web socket load balancer, and a LB that could be more dynamic in its configuration, so I'm probably going to rewrite that part in Node
[22:41] chapel: express is a great framework imo, specially if you grok the sinatra way of handling things
[22:41] perezd: chapel: I am glad to hear that :) it definitely feels like this is going to be a smart arch decision
[22:41] kschzt: perezd, well, it's quite specific to the app you're building
[22:41] chapel: I am learning more advanced things about express here and there that are pretty awesome
[22:41] perezd: kschzt: yeah, I mean, I wanted to know, what specifics led you down that road
[22:42] kschzt: perezd, i wanted to be able to isolate and scale each service separately
[22:42] kschzt: shrug
[22:42] perezd: lol okay, can you give me a generic example of a few services?
[22:42] perezd: (just trying to conceptualize)
[22:43] tisba has joined the channel
[22:44] kschzt: services like, identity + logins, analytics + click tracking, application logic, web socket routing (we use AMQP to route Socket.IO messages)
[22:44] chapel: Okay, feel free to shout at me that I am wrong, but I am of the mind that you shouldn't squeeze your app before you make it, or even while making it, at least not to push out every last ounce of performance. The key is to get it functional, to get it clean, to do what you want/need and fast, but worry about the optimization step after youve built it?
[22:44] hunterloftis: chapel: unless you're a masochist
[22:44] kschzt: perezd, wherever you can logically draw the boundary :)
[22:45] perezd: kschzt: gotcha :)
[22:45] kschzt: perezd, that's where you should do it.
[22:45] perezd: yeah, I guess you can share models and such
[22:45] chapel: hunterloftis: heh, well it saves time too, its one thing to have a goal in sight, but dont let optimization be your only goal
[22:45] perezd: and just have different service nodes
[22:45] hunterloftis: chapel: agreed
[22:45] chapel: but eh, node is about speed
[22:46] chapel: gotta sqeeze as much speed out of it as you can :)
[22:46] kschzt: perezd, absolutely
[22:46] chapel: squeeze
[22:46] perezd: question about socket.io
[22:46] kschzt: perezd, and lots of shared npm
[22:46] bingomanatee_: Mister Chapel, Please don't suqeeze the performance!
[22:46] cjm has joined the channel
[22:46] chapel: oh no, I am scared
[22:46] perezd: if only 1 node instance is running, and its listening with socket io, can more than 1 websocket be connected and be receiving info?
[22:47] perezd: ie 1 node instance, 2 machines websocketed
[22:47] perezd: or should it be, 1 node instance, per websocket
[22:47] chapel: I guess the way I see it (again half formed ideas here from a half formed brain) that node is a fast and efficient platform, you can do a lot with little to no optimization, so might as well capitalize on that and worry about the minor tweaks when it really matters
[22:47] perezd: (trying to get bearings)
[22:47] hunterloftis: perezd: no 1 node instance can handle multiple sockets
[22:48] mjr_: bingomanatee_: what do you suppose your reference comprehension and appreciation rate is?
[22:48] perezd: hunterloftis: so whats sort of the "limit" / best practice
[22:48] mjr_: bingomanatee_: 10%?
[22:48] hunterloftis: perezd: you can host hundreds simultaneously from a laptop over a wireless network
[22:48] perezd: hunterloftis: resources limit it then alone?
[22:48] bingomanatee_: at best.
[22:48] eboyjr has joined the channel
[22:48] bingomanatee_: Okay kids I have to hit the airport.
[22:48] hunterloftis: perezd: good question, I don't know the answer about its limits.
[22:48] eboyjr: Where can I find the source for util.inspect?
[22:48] perezd: hunterloftis: its high, is all I guess :)
[22:49] hunterloftis: perezd: I'm sure they're there, but we haven't deployed anything with so many websockets at once. The hundreds is just from a little test game.
[22:49] perezd: hunterloftis: okay, that is good to know
[22:50] chapel: eboyjr: https://github.com/ry/node/blob/master/lib/util.js#L41
[22:50] perezd: everyone talks about how node relies on being single process, so I wanted to make sure I understood the true limitation
[22:50] kschzt: perezd, www.warimals.com so far runs hundreds simultaneously, and the whole stack is Node as I just described :)
[22:50] perezd: kschzt: how many instances of socket.io do you need?
[22:50] kschzt: perezd, it runs dozens of node processes on several ec2 nodes
[22:50] hunterloftis: https://github.com/Skookum/less.js <-- no process.exit() on import can't find file
[22:51] kschzt: perezd, so far just one -- peak 200 concurrent connected without problems, no need to scale out yet, although the design can
[22:51] perezd: kschzt: just start another node process running socket.io ?
[22:51] eboyjr: chapel: much appreciated
[22:51] kschzt: all i need to do is just add more backend fe/socket.io nodes into the ec2 load balancer
[22:51] perezd: on a new box maybe?
[22:51] kschzt: perezd, exactly
[22:52] perezd: beautiful
[22:52] perezd: this is going to be great.
[22:52] kschzt: so those nodes with that nginx config + the node processes :)
[22:53] hunterloftis: kschzt: Just made my little dog general dude. Very cool.
[22:53] hunterloftis: kschzt: Is this running on that game engine I saw the previews of a while back? client/server mirrored models, etc?
[22:53] kschzt: hunterloftis, thanks :) yes, it is
[22:54] kschzt: it was made with http://rocketpack.fi/engine/ which we should get public in q1 ...
[22:56] hunterloftis: The enemy has fallen!
[22:56] bingomanatee_: For those old timers looking for a fun retro way to entertain kids, I put up my old card based role playing game on http://mylinkedface.com/ - check out suits.
[22:57] [[zz]] has joined the channel
[22:57] hunterloftis: kschzt: interesting, is this like tower defense, multiplayer?
[22:57] c4milo1 has joined the channel
[22:58] kschzt: hunterloftis, it is like tower defense; async multiplayer; we have a realtime multiplayer demo working but not in the game :)
[22:58] hunterloftis: kschzt: well I'm impressed, it's slick
[22:59] kschzt: thanks :)
[23:00] saikat has joined the channel
[23:01] jakehow has joined the channel
[23:03] eee_c has joined the channel
[23:03] eboyjr has left the channel
[23:05] sh1mmer has joined the channel
[23:13] pt_tr_ has joined the channel
[23:15] kschzt: did everyone see http://impactjs.com/ ?
[23:16] kschzt: or his game http://playbiolab.com/
[23:20] kschzt: perezd, xhr-polling won't work with an nginx frontend without that socket.io definition line
[23:20] iFire has joined the channel
[23:20] kschzt: perezd, there are also all kinds of CORS issues to deal with there, which Socket.IO does
[23:22] kschzt: perezd, I suggest you develop against websocket and add support for other transports later; http://github.com/rocketpack/Socket.IO has support for trying various ports for particular transports :)
[23:22] perezd: kschzt: yeah, I've been reading it
[23:24] kschzt: i'm really considering dropping nginx because it doesn't support ETag, and maybe (?) we could make a websocket load-balancer out of it
[23:24] perezd: kschzt: what would you use in its place?
[23:25] kschzt: so rewrite nginx in node (very easy), with that kind of routing rules (easy), with support for tcp-level proxying for websocket (easy)
[23:25] perezd: nodeginx
[23:26] kschzt: not sure if that last one would work, but all that code is easy
[23:26] kschzt: and V8 is definitely fast enough
[23:30] kschzt: also coul adapt load-balancer setup dynamically based on running nodes
[23:33] perezd: for testing, what do people recommend?
[23:33] perezd: vows?
[23:33] kschzt: expresso
[23:33] kschzt: https://github.com/visionmedia/expresso
[23:34] tprice: what about v8 on the iphone?
[23:36] perezd: tprice: don't get what you mean
[23:36] perezd: tprice: you mean, writing an iphone app with V8 embedded in it?
[23:38] tprice: no just wondering how cool it would be to get v8 on the iphone or even android with node
[23:40] kschzt: what for?
[23:40] kschzt: you can forget about running V8 on Steve
[23:41] JimBastard has joined the channel
[23:41] tprice: maybe jail brocken
[23:41] tprice: but yeah this is it
[23:41] tprice: dammin iphone
[23:41] perezd: gotta run
[23:41] perezd: thanks all!
[23:41] JimBastard: hey SubStack, is there an easy way to pull out the full name of an optimist option based on its short name?
[23:42] hunterloftis: tjholowaychuk: connect calls less.render() without passing it a path option that tells it where to look for @imports; forking that now
[23:43] tjholowaychuk: hunterloftis: ah
[23:43] tjholowaychuk: another reason @import is a fail
[23:43] tjholowaychuk: lol
[23:43] hunterloftis: lol yeah
[23:43] hunterloftis: I may just work around it
[23:43] hunterloftis: But I would like it to work
[23:43] tjholowaychuk: for intermediate languages like less or sass its fine, to grab mixins etc
[23:43] tjholowaychuk: but for css i think its really dumb
[23:44] hunterloftis: well for css I never use it
[23:44] hunterloftis: that's why I was excited to user it serverside, with a cache
[23:44] hunterloftis: to combine everything into whatever.css
[23:44] tjholowaychuk: yeah
[23:44] hunterloftis: less passes its import test after creating a parser with "paths: [require('path').dirname(path)],"
[23:45] tjholowaychuk: dont patch with the require() in there though
[23:45] tjholowaychuk: more overhead
[23:46] kschzt: tj, have you measured how much overhead haml/sass/whatever is?
[23:47] kschzt: i'm thinking, in a single threaded context, getting out as fast as possible is key
[23:47] tjholowaychuk: kschzt: it statically compiles on mtime change only
[23:47] kschzt: you could offload that stuff via node-webworker
[23:47] tjholowaychuk: nah that is not needed
[23:47] tjholowaychuk: its a one-time hit
[23:47] tjholowaychuk: BUT
[23:47] kschzt: which we are using a lot and found very stable
[23:48] tjholowaychuk: I cant remember what I did exactly, in production ideally it should not check for changes
[23:48] tjholowaychuk: because that is the only cost really
[23:48] hunterloftis: tjholowaychuk: it's already using require() in compile, I just need to augment the options
[23:48] hunterloftis: (it has a cache)
[23:49] kschzt: tj, ja
[23:49] tjholowaychuk: hunterloftis: for less/sass yeah
[23:49] tjholowaychuk: but not for path
[23:49] tjholowaychuk: those two I have to
[23:49] tjholowaychuk: we can require('path') outside since its core
[23:49] hunterloftis: right
[23:50] kschzt: why do you guys render stuff server side?
[23:50] tjholowaychuk: why not
[23:50] tjholowaychuk: im not sold on this client side rendering thing
[23:50] kschzt: save cpu by doing it on the client :)
[23:50] tjholowaychuk: for some apps its great
[23:50] tjholowaychuk: for some not so much
[23:51] tjholowaychuk: haha yeah some person's shitty old grandma's computer
[23:51] kschzt: ah woops, we have had this conversation before :)
[23:51] tjholowaychuk: defering cpu to that is kinda lame
[23:52] desaiu has joined the channel
[23:53] kschzt: we just deliver flat files to the client from us/cdn, they boot up and get json from our Node nodes
[23:53] RevoOf has joined the channel
[23:53] emilepetrone has left the channel
[23:54] abresas has joined the channel
[23:54] kschzt: then you perhaps have a richer stack on the client, but you don't render anything on server, and it becomes somehow purer
[23:54] tjholowaychuk: yeah
[23:54] tjholowaychuk: i understand that
[23:55] tjholowaychuk: but when you are developing for people still using really old computers and ie6 etc it really screws with them
[23:55] killfill has joined the channel
[23:55] tjholowaychuk: to defer stuff like that
[23:55] tjholowaychuk: for a pure app aka like one page, i think its all good
[23:55] abresas has joined the channel
[23:55] kschzt: sure, if you have to support ie6, you render it for them, no question.
[23:56] jesusabdullah: What an interesting idea
[23:56] kschzt: (we don't)
[23:56] tjholowaychuk: plus if you are using a "right" template engine, you have to do xhr to grab them regardless
[23:56] tjholowaychuk: unless you inline them
[23:56] tjholowaychuk: which is gross
[23:57] tjholowaychuk: kschzt: what do you guys do for that?
[23:57] kschzt: yeah, rendering templates from server on client is gross
[23:58] kschzt: for what? ie6? it just doesn't work
[23:58] tjholowaychuk: kschzt: do you use haml or something? what do you use for a template engine on the client
[23:59] kschzt: ok. we are talking about different kinds of app.