[00:00] pquerna: and i hate c++ extensions
[00:00] themiddleman has joined the channel
[00:00] indutny: pquerna: you can use my zlibcontext module ;)
[00:00] indutny: while it's c++ extension
[00:00] indutny: it's quite cool
[00:01] pquerna: indutny: https://github.com/kkaefer/node-zlib ACTION pquerna: https://github.com/indutny/node-zlib
[00:01] adrianmg has joined the channel
[00:02] indutny: fck, irccloud. Y U N Ctrl+Enter
[00:02] indutny: pquerna: oh, sorry. even not on master: https://github.com/indutny/node-zlib/tree/zlibdict
[00:02] pquerna: nah, i just need deflate(str);
[00:02] indutny: pquerna: ah, so node-zlib should be ok for you
[00:03] zivester_ has joined the channel
[00:03] pquerna: actually would be a good idea to the graylog2 guy
[00:03] pquerna: to suggest the preset context thing
[00:03] pquerna: like spdy does
[00:03] pquerna: its kinda a neat trick
[00:03] indutny: yeah
[00:04] indutny: ok, 7am here
[00:04] indutny: time to go sleeping
[00:04] indutny: or to continue hard working
[00:04] indutny: can't decide
[00:04] bnoordhuis: pquerna: preset context == preset huffman table?
[00:05] pquerna: yeah.. in spdy they preload it wiht all the common http headers/values
[00:05] pquerna: on both sides
[00:05] pquerna: so it makes it... very good for them :)
[00:05] indutny: :)
[00:05] bnoordhuis: sensible optimization, yes
[00:05] indutny: neat idea
[00:06] stagas: sensible soccer
[00:06] indutny: and even more, they ain't reseting context while connection is open
[00:06] indutny: so compression rate only grows
[00:06] indutny: with most probability
[00:07] rhdoenges: is there a way to drop to a node repl inside an application?
[00:07] langworthy has joined the channel
[00:08] c4milo1 has joined the channel
[00:08] rhdoenges: for debugging purposes or otherwise
[00:09] steffan has joined the channel
[00:10] junkee[]: bnoordhuis: how do I create a thread-safe data structure?
[00:10] duckspeaker has joined the channel
[00:10] Horofox has joined the channel
[00:10] bnoordhuis: junkee[]: broad question - are you familiar with pthreads rwlocks?
[00:11] igl: is there a way to do expressions in jade like: div(class=name || "default")?
[00:11] bnoordhuis: junkee[]: or pthreads mutexes in general?
[00:11] junkee[]: bnoordhuis: I'm reading about it... so, a bit ;)
[00:11] stagas: igl: that works
[00:12] bnoordhuis: junkee[]: simplest solution is to have e.g. a std::map and wrap all access to it in a big mutex
[00:12] bnoordhuis: junkee[]: doesn't perform great but it's easy to get right
[00:12] ryanfitz has joined the channel
[00:13] junkee[]: bnoordhuis: I would have done it like that but I thought it's not the best way.
[00:13] igl: stagas: nope o.O
[00:13] c4milo1: http://www.buglabs.net/jobs -> we are looking for noders
[00:13] mif86 has joined the channel
[00:13] junkee[]: bnoordhuis: Well, I will just make it work and then optimise it :)
[00:13] stagas: igl: unless name isn't declared at all so it throws. but you can do app.locals({ name: undefined })
[00:14] igl: i c
[00:14] bnoordhuis: junkee[]: alternatively, google for 'c++ thread safe map' (or data structure)
[00:14] bnoordhuis: junkee[]: there are tons of OSS implementations out there
[00:14] wbw72 has joined the channel
[00:15] stagas: igl: or use an object and do div(class=foo.bar || 'baz')
[00:15] kmiyashiro has joined the channel
[00:15] stagas: igl: so you don't need to undefine all vars
[00:16] justinTNT has joined the channel
[00:16] adrianmg: is it possible to stream video with node.js ?
[00:16] igl: stagas: ty mate o/
[00:18] devdazed has joined the channel
[00:18] Murvin: hi.. if I want to kill the server inside the code, i do this, process.exit(), right?
[00:19] aelaguiz has joined the channel
[00:19] indutny: Murvin: yep, but if you want to kill http server you can do: server.close()
[00:19] rhdoenges: Murvin: yes...
[00:19] montylounge has joined the channel
[00:20] kmiyashiro has joined the channel
[00:20] kbni has joined the channel
[00:20] Murvin: indutny: yea.. i need to actually kill the process. :) actually, what Im doing is that, I use 'fugue' to spawn multiple processes. and In some case, I want to kill the process to refresh everything. if I run app.close(), fugue won't restart a new 'worker' for me. :)
[00:21] davro has joined the channel
[00:21] indutny: Murvin: in that case - yes
[00:22] Murvin: indutny: question is.. if there are multiple request to my server, and while some of them are still process, and If I kill the process, what will the client get? a 404?
[00:22] indutny: nope
[00:22] indutny: connection should just close
[00:22] indutny: without any http status
[00:22] rhdoenges: Murvin: the client's connection will just cut out. they won't receive anything
[00:23] rhdoenges: Murvin: is there a way for you to reload without killing the whole process?
[00:23] rhdoenges: you probably want to think about that before making it part of your design.
[00:24] indutny: tjholowaychuk: is there any way to run cluster with socket.io?
[00:24] Murvin: rhdoenges: I don't know how to reload the server.. :) app.reload()? and the other reason is, i may need to restart process in order to have clean up leak.
[00:24] tjholowaychuk: indutny not currently, I know guillermo is working on having it scale
[00:25] indutny: tjholowaychuk: ok
[00:25] indutny: tjholowaychuk: thanks
[00:25] indutny: tjholowaychuk: btw, https://github.com/tmpvar/cluster-socket.io
[00:25] enr^ has joined the channel
[00:25] rhdoenges: Murvin: alright then, have at it. Maybe do a check beforehand so you don't interrupt someone's connection, if that could be a problem.
[00:26] Murvin: rhdoenges: ok. thanks for advise..
[00:26] [[zz]] has joined the channel
[00:28] adrianmg: How can I stream video with node.js?
[00:28] adrianmg: any advices, apis or something similar?
[00:30] indexzero has joined the channel
[00:32] kmiyashiro has joined the channel
[00:33] kmiyashiro: http://techcrunch.com/2011/06/24/opera-founder-jon-s-von-tetzchner-resigns-over-differences-with-board/
[00:33] kmiyashiro: how did opera even make money?
[00:33] grim_fandango has joined the channel
[00:33] rfay has joined the channel
[00:35] grim_fandango has joined the channel
[00:36] seawise: how is Node.js compared by speed with Ruby / Python / Java?
[00:36] unomi has joined the channel
[00:37] descipher has joined the channel
[00:40] leahculver has joined the channel
[00:40] leahculver has joined the channel
[00:41] saikat has joined the channel
[00:41] tim_smart: seawise: In terms of execution speed, pretty decent. Probably a bit behind Java, but pretty close to python. Ruby is probably a bit slower though.
[00:41] arpunk has joined the channel
[00:41] seawise: Java is 100 times faster than Python/Ruby
[00:42] kmiyashiro has joined the channel
[00:42] seawise: Python is 2x faster than Ruby
[00:42] tjholowaychuk: java boots super slow
[00:42] tim_smart: seawise: Node.js really shines in how it handles concurrency, what is where it gets its merit.
[00:42] seawise: and what about mem usage?
[00:43] thalll has joined the channel
[00:43] mikey_p: mem usage seems very reasonable to me
[00:43] tim_smart: seawise: I'll open a empty process and let you know...
[00:43] mikey_p: (coming from an Apache/mod_php background)
[00:44] jesusabdullah: java is really fast for a not-pre-compiled kinda thing. So fast in fact, that a lot of numerical code is now written in java.
[00:44] jesusabdullah: so comparing java to everything else is almost unfair.
[00:45] grim_fandango has joined the channel
[00:46] ryanfitz has joined the channel
[00:46] CodyGray has joined the channel
[00:46] tim_smart: seawise: A node process has a base of around 7mb RES
[00:46] Horofox has joined the channel
[00:46] CodyGray has left the channel
[00:47] jesusabdullah: I guess comparing to the CLR would be fair
[00:47] seawise: so only 1000 connections on 8 Gb RAM server?
[00:47] seawise: that's very small value :(
[00:47] tjholowaychuk: ?
[00:47] tjholowaychuk: node wont have a process per connection lol
[00:48] seawise: really?
[00:48] tjholowaychuk: really
[00:48] seawise: how much memory 1000 users will consume then?
[00:48] mikey_p: it depends
[00:48] seawise: how much memory typical Node.js node needs?
[00:48] seawise: 1 Gb?
[00:48] seawise: 2 Gb?
[00:49] bnoordhuis: seawise: that depends entirely on your application
[00:49] bnoordhuis: no offense but you ask questions that have no reasonable answer
[00:49] seawise: I'm saying typical
[00:49] forzan has joined the channel
[00:49] seawise: typical chat, multiplayer MMO
[00:50] bnoordhuis: anywhere between 2M and 20GB usually
[00:50] seawise: anyone have Node.js apps on production here?
[00:50] tjholowaychuk: thousands of connections in one node process is no problem at all
[00:51] seawise: anyone know what stack Turntable.fm uses?
[00:51] seawise: I've checked the code and it seems it use WebSockets
[00:51] seawise: also
[00:51] seawise: are there any debugger like Firebug for WebSockets messages?
[00:52] chjj: ive been running my blog with node.js completely naked, no nginx, if you count that as production, its been stable since i put it up
[00:52] aaronblohowiak has joined the channel
[00:53] angrymango has joined the channel
[00:56] JoshC1 has joined the channel
[00:58] mif86 has joined the channel
[00:58] AAA_awright: jesusabdullah: But you still don't want to be calling Java programs from a Bash script, the overhead on it is just over 9000
[00:59] rvb has joined the channel
[00:59] aaronblohowiak: is there a node.js form helper library like formtastic?
[01:00] chjj: the fail on java is over 9000
[01:03] Bwen: anyone got an example on how to encrypt and decrypt using the lib crypto and a SSL certificate?
[01:05] davidbanham has joined the channel
[01:07] igl: Bwen: there is in express/examples/auth
[01:07] maushu has joined the channel
[01:07] Bwen: i'll take a look, ty
[01:10] Prometheus has joined the channel
[01:14] kmiyashiro has joined the channel
[01:15] temp01 has joined the channel
[01:20] leahculver has joined the channel
[01:20] leahculver has joined the channel
[01:24] infynyxx has joined the channel
[01:28] shoebat has joined the channel
[01:29] steffan has joined the channel
[01:29] jerrysv has joined the channel
[01:30] ggg has joined the channel
[01:30] boaz has joined the channel
[01:30] euforic has left the channel
[01:31] micheil has joined the channel
[01:35] copongcopong has joined the channel
[01:37] MGT has joined the channel
[01:40] dgathright has joined the channel
[01:40] warz has joined the channel
[01:41] MGT has joined the channel
[01:44] boaz has joined the channel
[01:45] davidbanham has joined the channel
[01:48] jerrysv has joined the channel
[01:48] sourcode has joined the channel
[01:51] james78 has joined the channel
[01:52] james78: What does process.binding() do? I can't find any information anywhere on it...
[01:52] ditesh|cassini has joined the channel
[01:52] leahculver has joined the channel
[01:52] leahculver has joined the channel
[01:53] temp02 has joined the channel
[01:55] micheil: process.binding loads / calls down to the C / C++ layer of node.js
[01:55] micheil: it's undocumented for exactly that reason, it's one of the core low level api's
[01:56] mandric has joined the channel
[01:57] james78: micheil: Thanks.
[01:58] davidban_ has joined the channel
[01:59] Aria has joined the channel
[02:00] angrymango has joined the channel
[02:01] ryan0x2 has joined the channel
[02:02] Madonnaboy_ has joined the channel
[02:02] Madonnaboy_: Anyone using now.js?
[02:03] micheil: no.
[02:03] micheil: personally I don't quite like the idea of RPC over websockets, it feels wrong.
[02:03] KingJamool has joined the channel
[02:03] gavin_huang has joined the channel
[02:03] micheil: but then again, I like the event/channel pattern, ala, in pusher.com (disclaimer, I work for pusher)
[02:04] Madonnaboy_: micheil: Does it have to use wesockets?
[02:04] micheil: now.js?
[02:04] Madonnaboy_: yeah
[02:04] micheil: it'll fallback to socket.io alternatives, iirc.
[02:04] catshirt has joined the channel
[02:04] micheil: but either way, the core concept is RPC over websockets, the fallbacks are irrelevant for the most part.
[02:04] steffan has joined the channel
[02:05] micheil: there is, I've heard, a big update coming for now.js soon, as to what/when, I don't know
[02:05] al3xnull: How long has now.js been around?
[02:05] micheil: about 3 months, I think.
[02:06] sorensen: RPC over websockets? check out DNode
[02:07] Madonnaboy_: micheil: What
[02:07] micheil: sorensen: yeah, DNode does similar, as does SocketStream
[02:07] Madonnaboy_: micheil: What's the bigest flaw you see in RPC over websockets?
[02:07] sorensen: now.js isnt really RPC
[02:07] sorensen: its a little more boutique then that
[02:07] micheil: Madonnaboy_: the idea of RPC doesn't really gel with me; I don't like the idea of the client being able to guess what my remote functions are called.
[02:07] sorensen: or at least thats one developers opinion
[02:07] Tobsn has joined the channel
[02:08] Madonnaboy_: a
[02:08] Madonnaboy_: So for security reasons
[02:08] sorensen: michiel: if you have server callable functions, you have that problem
[02:08] micheil: sorensen: yeah, both nowjs and socketstream use RPC over websockets for communication, but still provide you with a tonne of exact functionality, like routing and code sharing.
[02:08] sorensen: its not a general RPC thing
[02:09] sorensen: i realize
[02:09] sorensen: which is why i said what i did
[02:09] sorensen: i have used now.js
[02:09] micheil: sorensen: if you use an event / channel pattern, you know that you can't call arbitrary functions on the server, that it may accidentally expose.
[02:10] micheil: it's a matter of personal preference as far as the whole RPC over websockets or not thing.
[02:10] smtlaissezfaire has joined the channel
[02:10] sharkbird has joined the channel
[02:10] sorensen: i am just trying to get at what your alternative would be
[02:10] micheil: oldest commit on now.js is March 02, 2011
[02:10] sorensen: the client can guess it either way
[02:11] sorensen: and i do use an event / channel pattern
[02:11] micheil: sorensen: the alternative would be like just socket.io or pusher.com
[02:11] micheil: it's less guessable, I feel.
[02:11] sorensen: not really sure how...
[02:11] sorensen: even if you use ajax its guessable
[02:12] micheil: RPC makes me feel uneasy, I don't like that idea really. I prefer other forms of uses
[02:12] sorensen: the problem to me is protecting things on the server-side, as the client is always going to be a security vulnerability
[02:12] micheil: I'm actually having coffee with one of the core socketstream guys next week, so I'll probably devel more into it then
[02:12] sorensen: fine by me ;)
[02:14] k1ttty has joined the channel
[02:14] sorensen: im not a fan of socketstream
[02:14] DTrejo has joined the channel
[02:14] sorensen: it looks to be an application in itself, not really a package or framework that would help me
[02:15] micheil: I've only briefly looked at it, so I can't comment much
[02:15] sorensen: the features it lists, i would much rather install the package that does that exact feature
[02:16] micheil: it's all a matter of preference there.
[02:16] micheil: feature wise, nowjs and socketstream are very similar
[02:16] sorensen: express/dnode/backbone is my current stack
[02:16] Tobsn: TIL what a locked selector lever is.
[02:16] sorensen: and is very much non-conflicting with anything else i would want to implement
[02:17] micheil: I currently use a mixed stack.
[02:17] sorensen: define mixed stack...
[02:17] mkrecny has joined the channel
[02:17] micheil: pusher internally is a ruby based setup, persoanlly I use the best tool for the job
[02:18] mkrecny: best static file server?
[02:18] Tobsn: ruby?!
[02:18] Tobsn: best job?
[02:18] mkrecny: hey micheil : )
[02:18] Tobsn: first time someone ever used those words together?
[02:18] Tobsn: :P
[02:18] micheil: like this uses node.js as a pusher.com client and as a server: http://brandedcode.com:9595/
[02:18] micheil: Tobsn: ruby and eventmachine with a _lot_ of custom code.
[02:19] Tobsn: oh pure ruby?
[02:20] micheil: yeah. as for other parts, like websites, it's either rails or sinatra::async
[02:20] Tobsn: well...
[02:20] Tobsn: as long as its not rails
[02:20] micheil: actually, rails is okay to be honest.
[02:20] Tobsn: brb 10.6.8 update
[02:21] sorensen: you guys lost me at ruby :)
[02:21] Tobsn: hehe
[02:21] Tobsn: well ruby itself is (now) good
[02:21] Tobsn: in the past it sucked terrible
[02:21] micheil: if you've lost your rocket there.. it's because you've flown off screen.
[02:21] Tobsn: but with rails its just really borderline of why youre using it in the first place if now you have node etc.
[02:22] micheil: to be honest, I wouldn't write something like our rails applications in node.js, it's just not worth it.
[02:22] DTrejo has joined the channel
[02:22] Tobsn: we had that discussion a couple days ago, or last week, and i looked into i was forced into ruby 3 years ago and told them to leave me alone because it sucked so terrible speed wise
[02:22] Tobsn: but it looks like now its okay
[02:22] micheil: they are fairly low-traffic domains, where we don't need to have 20,000 req / second things
[02:23] micheil: plus we don't really want to spend exact time playing NiH
[02:23] micheil: extra**
[02:23] sorensen: NiH?
[02:23] micheil: not-invented-here
[02:23] SubStack: not in house
[02:23] SubStack: that too
[02:23] sorensen: ahahah, substack from the shadows
[02:23] sorensen: :D
[02:24] Tobsn: i mean i see it sortof like that too, i'll never build frontend stuff in node.js... its just too much pain if you got it in php done so quickly... but for everything that gets hit hard with requests like APIs or background processing that needs to serve, its node
[02:24] micheil: sorensen: essentially, these are domains where we really just want to get shit done.
[02:24] sorensen: and...?
[02:24] sorensen: i dont see why you directed that to me
[02:24] SubStack: Tobsn: check out http://www.jspp.io/
[02:24] micheil: well, doing them in node.js wouldn't really serve any purpose.
[02:25] sorensen: understand that i dont know your business logic, dont want to, and am not suggesting you change anything
[02:25] micheil: so, that example at http://brandedcode.com:9595 is spending about 5000 messages / 5 minutes / connection
[02:25] micheil: I haven't tried to optimise it yet
[02:26] Tobsn: sorensen, just leave him alone
[02:26] Tobsn: :P
[02:26] Tobsn: SubStack, thats kinda weird
[02:26] Tobsn:
[02:26] Tobsn:
[02:26] Tobsn: ?!
[02:26] sorensen: hehe
[02:27] sorensen: Tobsn: sounds good :)
[02:27] micheil: sorensen: so, essentially, if I don't need to spend time implementing stuff without good reason to, I won't.
[02:27] micheil: time = money.
[02:27] sorensen: Tobsn: but i cant help it!
[02:27] sorensen: :(
[02:28] Tobsn: $(this).text(require("./module").text);
[02:28] Tobsn: what the heck?
[02:28] warz has left the channel
[02:28] Tobsn: why isnt that thing using a good template engine
[02:28] Tobsn: thats the only thing that bothers me
[02:28] Tobsn: cause it looks like php trash code
[02:29] sorensen: but php trash makes the world go round round!
[02:29] harth has joined the channel
[02:29] Tobsn: im using blitz for all the fast stuff
[02:30] leahculver has joined the channel
[02:30] leahculver has joined the channel
[02:30] Tobsn: its funny, i build a template engine like that a while ago, like blitz
[02:30] Tobsn: it takes the template and splits it up by seperator
[02:31] Tobsn: like test %VAR1% test %VAR2% now if you split that by % uneven is always something for the template engine
[02:31] micheil: okay.. it's 3.30am.. I'm heading to bed, night folks.
[02:31] Tobsn: and if you got an IF for example you know that following even is part of the if etc. - makes template processing so extremly fast
[02:32] Tobsn: n8 micheil
[02:32] micheil: if anyone has any further websocket or pusher related questions, feel free to contact us on either support@pusher.com (pusher-related preferrably) or micheil@pusher.com
[02:32] sorensen: ...
[02:32] Tobsn: oh i actually do
[02:32] Tobsn: why would i use it?
[02:32] Destos has joined the channel
[02:32] sorensen: ^++
[02:32] Tobsn: (serious question)
[02:33] micheil: Tobsn: because, scaling websockets is serious business.
[02:33] Tobsn: sooo
[02:33] Tobsn: you basically provide an API into a websocket cluster
[02:33] bentruyman has joined the channel
[02:33] sorensen: thats almost a microsoft-esq response
[02:33] sorensen: "because we said so"
[02:33] Tobsn: well hes right, sockets are a pain in the ass
[02:33] micheil: also, if you choose to use raw websockets, you'll more then likely implement something pretty similar to what pusher is anyway
[02:34] sorensen: no doubt, but it doesnt answer any question
[02:34] Tobsn: why do you think any of the companies using it dont do it themselfs?
[02:34] micheil: so, we can actually handle the enormous growth that some applications see, such as the other night, where one (slightly poorly coded) app decided to transmit about 90Gb's over pusher.
[02:35] Tobsn: wait a minute, the pricing is odd
[02:35] Tobsn: 100 connections is 20 bucks a month?!
[02:35] micheil: we handled that fine, with only slightly increased latency for a moment while we spun up a few more servers for our cluster
[02:35] sorensen: i dont see why i wouldnt just do that myself
[02:35] sorensen: and save myself a cost
[02:35] Tobsn: 90GB of what?!
[02:35] micheil: well, you're not.
[02:36] micheil: you don't actually save any cost, as you suddenly need to maintain your own websocket service.
[02:36] sorensen: whos not?
[02:36] sorensen: having to maintain code is the nature of the game
[02:36] sorensen: should i just abstract everything to someone else?
[02:36] Tobsn: youre asking the wrong questions hehe
[02:36] micheil: so, if you go the route of doing it yourself, you suddenly need to maintain extra code and infrastructure
[02:36] Tobsn: ask why groupon is using it
[02:37] sorensen: these are leading into too fundamental of questions
[02:37] micheil: I can't actually answer the details as to why specific clients are using us, they each have their reasons.
[02:37] sorensen: of why people do what they do
[02:37] al3xnull: I'm jumping in and probably rather uneducated. Why is scaling web sockets such a pain?
[02:38] Tobsn: al3xnull, port limits, interacting with live connections at the same time needs bandwidth, a lot of stuff
[02:38] Tobsn: besides the big loop that has to listen on all those damn ports
[02:38] al3xnull: Okay. Generally what I figured.
[02:38] micheil: al3xnull: because you need to handle the persistent connections, as well as the scaling of data through a cluster of servers, and the consistency and low-latency of that data
[02:38] Tobsn: well
[02:39] micheil: you also need to figure out how to balance load around your cluster, when most load balancers don't quite speak websockets.
[02:39] Tobsn: lets ask one little question before you go, for what is pusher used mostly
[02:39] skm has joined the channel
[02:39] micheil: for what is pusher used mostly?
[02:39] Tobsn: yep
[02:39] Tobsn: because if i look at the pricing model...
[02:40] Tobsn: it looks like its for tiny companies with tiny websites
[02:40] micheil: at the moment we're mainly used for data push (purely because it's still a bit inefficient to send data from client to us, only to make the trip to your server from us)
[02:40] micheil: not at all.
[02:40] Tobsn: hu?
[02:40] Tobsn: data pusher means exactly what?
[02:40] Tobsn: RL example?
[02:41] sorensen: Tobsn: are you asking for the lulz?
[02:41] benvie has joined the channel
[02:41] Tobsn: no
[02:41] Tobsn: i actually wanna know
[02:41] micheil: data push, as in, you have a change in your model on your server, so you send that to pusher, which then distributes via websockets
[02:41] sorensen: roger that
[02:41] Tobsn: RL scenario? web based notifications? chat?
[02:41] micheil: (rather than data pull, where the client tries to fetch any newer data)
[02:42] sorensen: so you handle all pub/sub
[02:42] micheil: chat tends to be done using client-to-client events, which we currently have in beta
[02:42] sorensen: why should i move away from my own redis implementation
[02:42] sorensen: or the new Thoonk
[02:42] micheil: think more data consistency, so, for example, http://backbone-pushable-todo.heroku.com/
[02:43] Tobsn: but wouldnt that be client to client too?
[02:43] jameson has joined the channel
[02:43] CodyGray has joined the channel
[02:43] andrewfff has joined the channel
[02:43] CodyGray has left the channel
[02:43] Tobsn: ah no it isnt
[02:43] Tobsn: gotcha
[02:43] micheil: Tobsn: no, as you want to synchronise data state on the server
[02:43] Tobsn: i see
[02:44] micheil: sorensen: okay, so, it's probably best to continue this in email form, as it's almost 4am for me.
[02:44] Tobsn: what about mailchimp, you cant say what exactly they use it for obviously, but they use it for clients stuff, frontend?
[02:44] sorensen: just continue the thread next time your in
[02:44] sorensen: i have no intention of emailing
[02:44] sorensen: as i am writing docs for the next few days
[02:44] micheil: I don't know anything about what mailchimp are using us for, sorry.
[02:44] Tobsn: lol
[02:44] al3xnull: micheil: I don't mean to keep you
[02:45] Tobsn: groupon? frontend? just curious if thats actually used for clients or inhouse
[02:45] al3xnull: But one more -- Is it worth looking at Pusher if we already have a Faye cluster up and running?
[02:45] dyer_ has joined the channel
[02:45] dyer_ has joined the channel
[02:45] micheil: so, you've got to weigh up what the cost of migrating code is, as well as the cost of keeping that faye cluster running is, versus the cost of using pusher
[02:46] sorensen: micheil: well said
[02:46] micheil: also, our pricing is actually based on the last 6 months of data, and patterns that we've observed; most applications tend to fall within the middle plans.
[02:46] Tobsn: even big sites?
[02:46] al3xnull: Good to know. Thanks for the information. =]
[02:46] micheil: so, by max connections, it's actually concurrent connections
[02:46] Tobsn: yeah
[02:47] Tobsn: ha
[02:47] cafesofie has joined the channel
[02:47] Tobsn: +but you would imagine that people pile up
[02:47] mrmanager has joined the channel
[02:47] Tobsn: anyway, n8 ;)
[02:47] sorensen: get to bed sleepy head!
[02:47] Tobsn: *restart
[02:47] sorensen: :D
[02:48] micheil: so, someone like cloudapp, would be on a custom plan, I believe.
[02:48] micheil: most users would only ever see a 10,000 max connections
[02:48] Tobsn: or like groupon, i mean if they have full house and they all stay 2 minutes on a page that piles up to a couple 10k connections or more concurret
[02:49] Tobsn: really?
[02:49] micheil: groupon actually use it for admin only tools.
[02:49] Tobsn: HA
[02:49] Tobsn: see thats what i wanted to know
[02:49] micheil: so, there usage is internal. I can't say anymore than that there.
[02:49] Tobsn: thats fine
[02:49] micheil: but our bigger users are people like cloudapp, gosquared, etc.
[02:49] Tobsn: see thats why i thought groupon would be weird
[02:49] micheil: erm
[02:49] micheil: wordsquared
[02:50] micheil: I keep referencing the wrong name when ever I think of "squared"
[02:50] Tobsn: cause with millions of people on their intl. app they would wrap up hundred thousands of connections concurrent
[02:50] micheil: possibly because I work in the same office as the gosquared guys
[02:51] micheil: Tobsn: so, I can't tell you how many connections each app currently has (that information is treated as sensitive data, hence can only be seen by employees of pusher and the authors of that app)
[02:52] Tobsn: yeah but none of those apps is as big as groupon
[02:52] micheil: Tobsn: but put it this way, feel free to deploy pusher to a site with more than 20,000 concurrent users. I don't think you'll break that mark.
[02:52] Tobsn: so even with like 20k conc. conenctions it wouldnt even be close i guess
[02:52] micheil: you'd be surprised.
[02:52] Tobsn: you think it would stay low?
[02:53] micheil: yeah.
[02:53] Tobsn: hmm
[02:53] micheil: I don't think you'd reach past about 20,000 concurrents
[02:53] micheil: also, remember, all our limits are soft limits.
[02:53] Tobsn: i guess you could say 10k req/sec evens out to probably 20k concurrent sockets open because people keep clicking around
[02:54] dget has joined the channel
[02:54] Tobsn: and 10k req/sec is actually a shitton of people
[02:54] micheil: we won't cut you off just because you go over your quota. We may just ask you to pay some more, as it does cost money for us to develop and run pusher.
[02:54] Tobsn: my biggest was 24k req/sec constant with a facebook app... but thats in super peak times
[02:54] micheil: exactly.
[02:54] Tobsn: nice
[02:55] Tobsn: hows the stability?
[02:55] micheil: it's pretty hard to break that ~25k mark, so most apps only ever actually reach the 10k mark
[02:55] cafesofi_ has joined the channel
[02:55] micheil: the servers and quite stable, and we do 24 hour monitoring with people on call to fix problems at all times
[02:55] Tobsn: yeah 20 and above means youre getting money coming in so you dont care either hehe
[02:56] avalanche123 has joined the channel
[02:56] Tobsn: but you dont do do any port closings after a certain time
[02:56] micheil: we also regularly monitor other statistics, such as message size, so we notice we things change.
[02:56] Tobsn: or force the client to reconnect
[02:56] micheil: we leave the clients open indefinitely, until they choose to close
[02:56] Tobsn: client libs avail?
[02:57] micheil: the only time that we may force a reconnect is when we deploy new versions of the websocket server, which we try to do in low usage periods (eg, very early in the morning (GMT)
[02:57] micheil: as for client libs, see: http://pusher.com/docs/libraries
[02:58] Tobsn: thx
[02:58] micheil: and there's also soon a client library for node.js, not just server library.
[02:58] Tobsn: and you can target single users right?
[02:58] micheil: currently not quite, we recommend create private channels for that purpose
[02:59] Tobsn: hmm
[02:59] Tobsn: one channel = one user?
[02:59] micheil: so, for example cloudapp, iirc, has one private channel per user
[02:59] micheil: that way no other users can see another users events and data
[02:59] Tobsn: ah perfect
[03:00] wilmoore has joined the channel
[03:00] Tobsn: see, good job, now i think a lot better about pusher ;)
[03:00] micheil: (you can see that in their javascript code to my.cl.ly/
[03:00] MGT has joined the channel
[03:00] Tobsn: and i will withdraw those ideas of building a websocket cluster by monday... and use pusher in 4-5 month when its done
[03:00] micheil: we're also working on improving the documentation at the moment, so stay tuned.
[03:01] micheil: (we've actually grown more than double in team size in the last month, so we're starting to get back into a rhythm)
[03:01] unibomb has joined the channel
[03:02] micheil: so, pusher is currently usable, but we are still actively working on things, and making improvements and adding more functionality and fixing any reported bugs
[03:02] micheil: or, alternatively, any bugs we find when reviewing our logs
[03:02] Tobsn: k, i got everything
[03:02] Tobsn: i think i know what i do on the weekend.
[03:02] Tobsn: n8 ;)
[03:03] micheil: Tobsn: once again, any further questions, support@pusher.com will be able to answer.
[03:03] Tobsn: nah dont worry i'll bother you directly
[03:03] Tobsn: hehe
[03:03] Tobsn: c ya tomorrow
[03:03] sorensen: http://blog.thoonk.com/
[03:03] micheil: okay, bye.
[03:03] Tobsn: ;)
[03:04] Tobsn: now i feel bad about keeping him up
[03:05] Tobsn: but im looking into this shit since 6 month now and had no idea he's working there...
[03:05] boehm has joined the channel
[03:05] sorensen: lol
[03:05] Tobsn: man i wouldve saved so much dumb surfing around
[03:05] Tobsn: fml
[03:05] Tobsn: we even follow each other on twitter
[03:05] Tobsn: god damnit
[03:06] sorensen: i still dont see a reason why *I* would use it
[03:06] Tobsn: well not you
[03:06] Tobsn: but im looking at like 100k+ concurrent connections
[03:06] sorensen: but i have no scaling problems atm
[03:06] Tobsn: (not really a webapp)
[03:06] sorensen: are you the lone dev?
[03:06] Tobsn: which gave me sleepless nights
[03:06] Tobsn: sortof
[03:06] Tobsn: CTO
[03:06] sorensen: then an abstraction might make sence
[03:07] Tobsn: i have a big stack of papers about "how to build this socket shit"
[03:07] Tobsn: yep
[03:07] Tobsn: dev
[03:07] sorensen: but, theres a reason I dont use oracle either
[03:07] sorensen: or any paid service where there is an OSS alternative
[03:07] dynamicpulse has joined the channel
[03:08] sorensen: but, i also despise now.js
[03:08] Tobsn: we have enough money to build and host it ourselfs but i was looking for a service and ignored pusher because i thought its a bunch of lame ass ruby coders playing big web2.0 company... but micheil is a smart kid
[03:08] sorensen: so i might just be one of them people
[03:08] jameson has joined the channel
[03:09] coleGillespie has joined the channel
[03:09] Tobsn: so even if that stuff cost like 10k a month thats like 1/10 of the build cost besides the upkeep etc.
[03:09] Tobsn: i mean you need one guy just for that stuff
[03:09] Tobsn: and thats easy 10k a month in employee cost
[03:09] Tobsn: so i rather go with a hosted solution
[03:09] sorensen: true enough
[03:10] dyer_ has joined the channel
[03:10] dyer_ has joined the channel
[03:10] sorensen: i've always had the mindset of if you can do it yourself, dont use an API
[03:10] sorensen: depending on someone else because its 'easier' isnt always the best choice
[03:10] Tobsn: it always depends if you actually want to do it
[03:11] sorensen: of course, but such is life
[03:11] andrewfff has joined the channel
[03:12] sorensen: generally speaking, i dont want to do anything
[03:12] sorensen: :D
[03:12] Tobsn: hehe
[03:12] sorensen: though i am compelled to
[03:12] Tobsn: we actually just spend 50k on something i couldve easly done, but i dont have the time
[03:12] Tobsn: its really a thing you have to learn
[03:13] sorensen: =\
[03:13] Tobsn: when is it better to buy vs. do it yourself
[03:13] Tobsn: delegation
[03:13] sorensen: just depends who you want to staff and what role you want to take in the co.
[03:13] Tobsn: im literally doing right now what a "sortof" competitor does with 40 people... and they needed a year, it took me so far 5 month and im almost done with the first phase
[03:14] Tobsn: just because i have money to play with and also throw away to speed it up
[03:14] sorensen: you know what they say
[03:14] sorensen: the last 10% takes 90% of the process
[03:15] Tobsn: oh it does
[03:15] warz has joined the channel
[03:15] sorensen: if your comming at it from a management level perspective, then i understand completely
[03:15] mhausenblas has joined the channel
[03:15] sorensen: for me as a developer, i dont
[03:16] devdazed has joined the channel
[03:16] Tobsn: oh you never build a full product
[03:16] Tobsn: youre done so quickly with the whole coding
[03:16] Tobsn: than come all the tiny features
[03:16] sorensen: slightly presumptuous
[03:16] Tobsn: im literally building the last 5% of jquery stuff over the last 4 weeks
[03:16] sorensen: i have built a full product
[03:17] sorensen: phone: brb
[03:17] dyer_ has joined the channel
[03:17] dyer_ has joined the channel
[03:17] Tobsn: well mostly it is that way, that it takes forever at the end to finish it up
[03:17] Tobsn: ;)
[03:17] sethetter has joined the channel
[03:18] jacobolus has joined the channel
[03:20] __jgr has joined the channel
[03:21] _jgr has joined the channel
[03:24] EyePulp has joined the channel
[03:26] tk has joined the channel
[03:27] mykul has joined the channel
[03:29] steffan has joined the channel
[03:30] rfay has joined the channel
[03:33] DTrejo has joined the channel
[03:34] skm has joined the channel
[03:34] sub_pop has joined the channel
[03:35] mwhooker has joined the channel
[03:35] buttbot-nodejs has joined the channel
[03:36] chapel: SubStack++
[03:36] v8bot: chapel has given a beer to SubStack. SubStack now has 39 beers.
[03:36] Melkor_ has joined the channel
[03:37] iffy|x200 has joined the channel
[03:37] davidbanham has joined the channel
[03:37] sorensen: bleh, back
[03:38] sorensen: any phone convo over 3 minutes is a pain
[03:39] abraham has joined the channel
[03:39] SubStack: chapel: eh?
[03:43] eggsby has joined the channel
[03:43] ryan[WIN] has joined the channel
[03:43] CodyGray has joined the channel
[03:43] CodyGray has left the channel
[03:45] mikech has joined the channel
[03:45] mikech has left the channel
[03:47] jacobolus has joined the channel
[03:49] dexter_e has joined the channel
[03:49] abraham has joined the channel
[03:49] bronson has joined the channel
[03:50] mrryanjohnston: why does this only _add_ the event emitter to the Counter class? Counter.prototype = new process.EventEmitter();
[03:51] mrryanjohnston: it seems like it should just set the Counter prototype to a new instance of eventemitter()
[03:52] seawise: guys, please point me to "10 things that should be implemented on Node.js"
[03:52] seawise: article
[03:52] seawise: can't Google it :(
[03:53] seawise: finally found it
[03:53] seawise: Marak rocks!
[03:53] chapel: `g 10 things node.js nodejitsu @ seawise
[03:53] gbot2: seawise: Ten node applications that need to exist - blog.nodejitsu.com ... - http://blog.nodejitsu.com/ten-node-apps-that-need-to-exist
[03:53] chapel: :)
[03:53] seawise: yeah
[03:53] Nuck: Thye need HTML5cocks for Node.
[03:54] seawise: anyone want to code location-tied chatroom service using node.js?
[03:55] seawise: so you are entering it stating your ZIP
[03:55] seawise: and get to the community, street, city chats
[03:56] seawise: able to chat w/ your neighbors
[03:56] seawise: great idea I think
[03:56] seawise: giving it to you guys
[03:57] seawise: anyone want to code it in pair w/ me or in team?
[03:58] catphive has joined the channel
[03:59] kriszyp has joined the channel
[03:59] sudhirjonathan has joined the channel
[04:00] catphive: do most people use connect with node js?
[04:00] catphive: any complaints?
[04:01] jesusabdullah: I think most people use connect or express, though some don't.
[04:01] mikeal has joined the channel
[04:02] jesusabdullah: I've heard some complaints about connect, but mostly from jsgi people that have some nitpick about how middleware should be written (so you can ignore that)
[04:02] jesusabdullah: That said, a lot of people roll their own stuff, and there are other tools out there for different things depending on what you want to do.
[04:02] Prometheus: meh, ignoring *sgi is kind of silly actually
[04:02] jesusabdullah: As far as *that* goes, my take is this: Do what feels best for you, and fuck the haters
[04:03] jesusabdullah: I'm not suggesting you ignore the existence of jsgi
[04:03] Prometheus: interoperability is kind of cool
[04:03] jesusabdullah: I'm suggesting that the commonjs guys are experts at bikeshedding
[04:03] Prometheus: don't do what Django people do :)
[04:03] mikeal has joined the channel
[04:03] Prometheus: oh, no doubt
[04:04] catphive: jsgi?
[04:04] catphive: that's like wsgi for pythong I'm guessing
[04:06] jesusabdullah: It's for javascript
[04:06] jesusabdullah: but inspired by wsgi
[04:06] niftylettuce: seawise: if you need frontend for it lmk
[04:07] Nuck: Okay, I need some Express help :D
[04:07] kimico has joined the channel
[04:07] jesusabdullah: conceptually it's similar to what connect does, it just has a slightly different api
[04:07] Nuck: How do I use app.error?
[04:07] Nuck: Or more specifically, why the fuck isn't it working?
[04:07] catphive: wsgi seemed almost too general purpose
[04:08] seawise: niftylettuce: yeah, I want more to concentrate on backend
[04:09] Nuck: https://gist.github.com/a03bd720b8e2af3262fa Somebody look this over, tell me where I fucked up?
[04:10] jesusabdullah: yeah, it probably was catphive
[04:11] Nuck: catphive: I feel so nerdy for immediately understanding your nick D:
[04:12] catphive: maybe just missing it. I see docs on how to use connect middleware, but I don't see any on how to write middleware.
[04:12] jesusabdullah: Hah, I didn't really think about it
[04:12] catphive: something mentioned a handle function?
[04:13] BenHu has joined the channel
[04:13] jesusabdullah: catphive: your middleware is just a function(req, resp)
[04:13] catphive: good, that's what I was hoping
[04:13] Nuck: That you pass to app.use()
[04:13] Nuck: jesusabdullah: ACTUALLY
[04:13] Nuck: No
[04:13] niftylettuce: seawise: an idea like that could be plugged into things like TV shows, so you can chat bout TV show while ur watching
[04:13] Nuck: It recieves a callback
[04:13] Nuck: so a third argument, next()
[04:14] niftylettuce: seawise: my cousin built a TV channel/location aggregate but never used...
[04:14] jesusabdullah: function(req, resp, next) ? Hmm
[04:14] niftylettuce: seawise: you'd select your location, then your service provider, and then it would output all channels, you pick channel and then TV show/time
[04:14] Nuck: jesusabdullah: Aye, I believe the next function takes req, resp too
[04:14] jesusabdullah: I don't remember the next, but then again it's been a while
[04:14] Nuck: IDK TBH
[04:14] jesusabdullah: IDK NEITHER BRAH
[04:14] Nuck: I've never used it, but that's what I remember from the docs :S
[04:14] catphive: hmm, wish this was documented somewhere
[04:14] jesusabdullah: WED BETTER LEAVE NODE.JS BEFORE EVERYONE LAUGHS AT US
[04:14] niftylettuce: seawise: pretty complicated considering there is no national tv guide listing per locale =)
[04:15] mike5w3c has joined the channel
[04:15] Nuck: catphive: Connect has some docs somewhere, I know
[04:15] seawise: ah, it's was about timetables and not streaming?
[04:16] seawise: when somebody says TV I think streaming first )
[04:16] Nuck: catphive: http://tjholowaychuk.com/post/664516126/connect-middleware-for-nodejs https://gist.github.com/1046171
[05:12] nodenews has joined the channel
[05:12] cummingscm1: .
[05:13] zmbmartin: Nuck: I seem to be having a hard time getting a grip on async stuff.
[05:13] Nuck: zmbmartin: Ah, I see. See, the data event fires for each section of the data you recieve.
[05:13] Nuck: You need to just append with each data to a variable
[05:13] Nuck: And then bind the 'end' event, and call next() then
[05:13] Nuck: zmbmartin: You follow?
[05:14] zmbmartin: Not really can you give me an example?
[05:15] zmbmartin: Nuck: like chaining them?
[05:15] nodenews has joined the channel
[05:15] cummingscm1: .
[05:15] Nuck: zmbmartin: https://gist.github.com/1046173
[05:17] zmbmartin: Nuck: Awesome I see what you mean.
[05:17] zmbmartin: Thanks
[05:17] mrmanager_ has joined the channel
[05:17] Nuck: zmbmartin: No problem. You'll use that pattern a lot in future, I'm sure.
[05:18] zmbmartin: Nuck: Anytime I need to be next() It should be in the end like that.
[05:18] Nuck: zmbmartin: Also ou don't get the whole content in one data event
[05:18] Nuck: That's why you do the body += data
[05:19] unlink has joined the channel
[05:19] unlink has joined the channel
[05:19] cummingscm1 has left the channel
[05:20] zmbmartin: Nuck: ok great, again thanks
[05:21] kmiyashiro: zmbmartin: what you using for crypto?
[05:22] cafesofie has joined the channel
[05:24] zmbmartin: I need to create md5 hashes of the paths for an api signature
[05:25] matyr_ has joined the channel
[05:25] JoshC1 has joined the channel
[05:28] kbni has joined the channel
[05:33] raidfive has joined the channel
[05:33] temp01 has joined the channel
[05:34] xeodox has joined the channel
[05:34] Nuck: Do you think Mongo-native might be directing errors straight to STDERR?
[05:34] SamuraiJack has joined the channel
[05:36] Xano has joined the channel
[05:37] temp02 has joined the channel
[05:37] fangel has joined the channel
[05:38] mike5w3c_ has joined the channel
[05:40] iffy|x200 has joined the channel
[05:40] Nuck: Ugh yeah, I'm gonna need to talk to tj...
[05:45] CodyGray has joined the channel
[05:45] temp01 has joined the channel
[05:45] nodenews has joined the channel
[05:48] cummingscm1 has joined the channel
[05:48] cummingscm1: .
[05:49] nodenews has joined the channel
[05:49] cummingscm1: .
[05:51] nodenews has joined the channel
[05:51] cummingscm1: .
[05:51] cummingscm1: test
[05:51] mwhooker has joined the channel
[05:53] josephboyle has joined the channel
[05:54] Nuck: cummingscm1: Seriously, the fuck are you doing? :/
[05:55] Skola has joined the channel
[05:57] dspree has joined the channel
[05:58] temp01 has joined the channel
[06:00] jakeg has joined the channel
[06:04] SomeRandom has joined the channel
[06:04] forzan has joined the channel
[06:05] desdur has joined the channel
[06:06] zmbmartin: Nuck: can I pick your brain one more time?
[06:08] unomi has joined the channel
[06:09] pHcF has joined the channel
[06:13] Corren has joined the channel
[06:14] mrsrikanth has joined the channel
[06:17] temp01 has joined the channel
[06:17] cafesofie has joined the channel
[06:20] ambroff has joined the channel
[06:27] butu5 has joined the channel
[06:30] rhdoenges: the best part about node is how easy to read the source code is.
[06:30] rhdoenges: If I'm not sure about a return value or something I just Ack away until I find the function definition.
[06:35] mscdex: Calvin: calvin
[06:35] mscdex: Calvin: Calvin
[06:35] mscdex: Calvin: are you dead
[06:35] Calvin: dead silence or are
[06:35] mscdex: heh
[06:35] mscdex: Calvin: how is Calvin
[06:36] Calvin: how many times it has a bug on github to seen if this is all they have been wrongly implemented
[06:37] marcello3d has joined the channel
[06:37] kitedawg has joined the channel
[06:39] Charuru has joined the channel
[06:39] steffkes has joined the channel
[06:41] rauchg has joined the channel
[06:46] hij1nx has joined the channel
[06:48] neurone-1337 has joined the channel
[06:52] mykul has joined the channel
[06:52] __doc__ has joined the channel
[06:53] confoocious has joined the channel
[06:54] hackband has joined the channel
[06:57] tmpvar has joined the channel
[06:58] herbySk has joined the channel
[06:58] herbySk has joined the channel
[06:59] simenbrekken has joined the channel
[06:59] Murvin has joined the channel
[07:03] andrewfff has joined the channel
[07:04] JoshC1 has joined the channel
[07:04] andrewfff has joined the channel
[07:08] mendel_ has joined the channel
[07:12] kmiyashiro has joined the channel
[07:13] KellyM has joined the channel
[07:15] smtlaissezfaire has joined the channel
[07:19] wibblymat has left the channel
[07:22] AAA_awright_ has joined the channel
[07:23] MrGoodbyte has joined the channel
[07:27] hwinkel has joined the channel
[07:29] sridatta has joined the channel
[07:31] jvduf has joined the channel
[07:33] PassiveFist has joined the channel
[07:33] PassiveFist: It does exist...
[07:34] Skola has joined the channel
[07:35] PassiveFist: Question, if anyone can help. When I run a program with node it leaves open sockets
[07:35] PassiveFist: Been looking around trying to find a solution and haven't come up with anything outside restarting the server...
[07:36] brianseeders has joined the channel
[07:37] Horofox: hi
[07:37] Horofox: PassiveFist: what do you mean?
[07:37] ryan0x2_ has joined the channel
[07:37] PassiveFist: I'm just getting into web based languages, so I haven't had to deal with socket handling.
[07:38] PassiveFist: How do I close sockets that have been opened during execution?
[07:38] Horofox: PassiveFist: a tcp socket?
[07:38] PassiveFist: ie, I start a server nearly identical to the example given in the video at nodejs.org
[07:38] PassiveFist: yes
[07:38] chjj: socket.destroy()
[07:38] chjj: or socket.end()
[07:39] PassiveFist: sweet, thanks.
[07:39] Horofox: PassiveFist: so you want to web develop?
[07:39] Horofox: PassiveFist: check out express.js, it's easy.
[07:40] PassiveFist: I downloaded the library but assumed I'd be better off learning the basics before I started tagging stuff onto it
[07:40] matyr has joined the channel
[07:40] chjj: Horofox: stop that, i dont want this channel to become stackoverflow where the answer to every legitimate question is "i dont know, just use jquery"
[07:41] Horofox: PassiveFist: I think it's a good idea to check out screencasts that shows how to develop using express.js
[07:41] PassiveFist: My new 'boss' actually told me they are doing a good amount of development with express, I'm supposed to go watch a demo on Wednesday
[07:41] pHcF has joined the channel
[07:42] chjj: PassiveFist: good idea to learn the basic api first, imo its dangerous using an abstraction if you dont know whats happening beneath the surface
[07:42] PassiveFist: chjj is there an API for socket functions with js? Firefox is shitting on itself...
[07:42] Horofox: PassiveFist: oh, good! you will see that it's way easier to use express than do from scratch like you are trying to, but what you are doing is a sure good way to learn
[07:42] chjj: PassiveFist: what do you mean?
[07:43] Horofox: chjj: i'm developing something big and i barely know what is happening beneath the surface
[07:43] jesusabdullah: What express is doing isn't rocket science
[07:43] Horofox: yes
[07:43] jesusabdullah: It's a useful abstraction, as is jquery.
[07:43] Horofox: its actually simple
[07:43] chjj: im not disputing that its a useful abstraction
[07:43] jesusabdullah: If you care to know what's happening beneath it, then go for it! You'll learn stuff and be more valuable
[07:43] jesusabdullah: but if you'd rather not, that's not a terrible thing either
[07:43] chjj: and express isnt rocket science i agree, but for someone new to node
[07:43] PassiveFist: chjj: Is there a central library that explains all parameters sub-programs or members and practical uses?
[07:43] chjj: its useful to learn the basic api
[07:44] jesusabdullah: Sure, but it's also useful to "just learn express" as long as you're aware that there's an underlying api
[07:44] jesusabdullah: you shouldn't use node's basic api just because it's what's baked in
[07:45] jesusabdullah: Using express without knowing the underlying api isn't dangerous imo, I guess is what I'm saying
[07:45] chjj: PassiveFist: if you want documentation on the socket object: http://nodejs.org/docs/v0.4.8/api/net.html
[07:45] chjj: maybe dangerous was a strong word, yeah
[07:46] PassiveFist: In my past experience it's always been a good thing to know what's under the hood...
[07:47] RC1140 has joined the channel
[07:48] LiamMagee has joined the channel
[07:49] mhauri has joined the channel
[07:55] sudhirjonathan has joined the channel
[07:55] PassiveFist: It seems like a lot of people are using npm and apt-get to install files vice manually extracting the binaries. Am I correct in assuming they use an environment variable for the install path?
[07:56] Horofox: hm
[07:56] Horofox: its actually pretty easy to install npm
[07:56] Horofox: do you use github?
[07:56] PassiveFist: yep
[07:57] Horofox: so go to npm's github and install it with one line
[07:57] Horofox: lol
[07:57] PassiveFist: haha... still doesn't answer the install path question though.
[07:59] Horofox: well
[07:59] Horofox: i don't know
[07:59] Horofox: i just installed it
[07:59] Horofox: them
[07:59] Horofox: then*
[07:59] Horofox: npm install something
[08:00] PassiveFist: meh, whatever works
[08:00] SomeRandom has joined the channel
[08:04] PassiveFist: How do I map node as an environment variable without needing the $ ?
[08:05] PassiveFist: right now when I type $node into the CLI the server starts
[08:05] PassiveFist: but without the $ I get nothing
[08:05] PassiveFist: I manually set the $node LEV..
[08:06] mobius__: anyone know why a client.request() on response.on('data') throws me a parse error? It looks like the http client doesn't like what the server is sending back.
[08:08] alessio_alex has joined the channel
[08:10] mehlah has joined the channel
[08:11] socketio\test\60 has joined the channel
[08:13] Skola has joined the channel
[08:13] mobius__: anyone?
[08:15] kbni: mobius__: show source?
[08:17] mobius__: kbni: http://pastebin.com/qDRq0V4A
[08:17] mobius__: nothing that trivial
[08:18] stagas: mobius__: probably some bad http breaking the parser. need to sniff the server response and check it out
[08:19] mxp has joined the channel
[08:19] mxp: :P
[08:19] mobius__: stagas: that's what I also thought since this is a non standard web server, however I've emulated the headers he sends out with apache, and on apache it worked
[08:19] jhurliman has joined the channel
[08:19] mxp: node.js with irc have anyone benchmarked it?
[08:20] mobius__: let me get a tcpdump just to compare the two
[08:20] nodenews has joined the channel
[08:21] thejh has joined the channel
[08:21] fly-away has joined the channel
[08:22] mobius__: does the parser do something if it sees the content type to be text/xml?
[08:23] stagas: mobius__: check for extra \r\n or something, I've had that issue in the past with some java servers
[08:23] mobius__: stagas: there is an extra \r\n at the end of the headers
[08:23] mobius__: is that correct?
[08:23] romanb has joined the channel
[08:24] FireFly|n900 has joined the channel
[08:25] stagas: mobius__: hm yeah, it should be headers\r\n\r\nbody iirc
[08:26] stagas: mobius__: what about content-length, is it correct?
[08:26] mobius__: yeah i've checked that already because I've seen it being mentioned before
[08:26] stagas: mobius__: can you paste the dump?
[08:27] mobius__: yep
[08:27] mobius__: let me get it out of wireshark
[08:29] mrsrikanth has joined the channel
[08:30] kbni has joined the channel
[08:30] mobius__: stagas:http://pastebin.com/Bubdb3Fe
[08:32] k1ttty has joined the channel
[08:33] stagas: mobius__: that's not very helpful, can't you get a raw hex dump?
[08:35] mobius__: yeah sure :)
[08:42] mobius__: hmm, where to put the pcap to get it?
[08:43] mobius__: ah hold on
[08:44] mobius__: www.foriamroot.org/trace.pcap
[08:48] __tosh has joined the channel
[08:50] sirdancealot has joined the channel
[08:50] n2liquid has joined the channel
[08:51] n2liquid: does node have typed arrays already?
[08:54] thejh: n2liquid: typed arrays? node has Buffers, but it doesn't seem to have Int32Array or so
[08:54] n2liquid: thejh, yeah, what I really wanted was Int32Array and stuff
[08:55] n2liquid: probably simple write a wrapper, though, isn't it?
[08:55] thejh: n2liquid: v8 seems to support it, so you probably just have to copy the new v8 version in nodes deps folder
[08:55] n2liquid: thejh, oh yeah, maybe
[08:55] stagas: mobius__: there is an extra \r\n after the headers, it has 3 \r\n when it should be 2
[08:55] thejh: n2liquid: there also is a wrapper for that stuff somewhere...
[08:56] n2liquid: hm
[08:56] n2liquid: well, thanks anyway, I think it mustn't be hard to make it happen if it's not there already
[08:56] thejh: n2liquid: https://github.com/rmustacc/node-ctype
[08:56] mobius__: stagas: hmm, when i print out the buffer received there is an empty line on top
[08:57] mendel_ has joined the channel
[08:57] n2liquid: thejh, yeah, I've seen those
[08:57] n2liquid: they had some problems if I remember
[08:57] yozgrahame has joined the channel
[08:57] mobius__: stagas: but i thought it was a part of the body
[08:57] n2liquid: native typed arrays would be best
[08:57] JaKWaC has joined the channel
[08:57] stagas: mobius__: it's considered part of the body
[08:58] Katibe has joined the channel
[08:58] stagas: mobius__: just that content-length doesn't count the 2 extra chars that the actual body has
[08:58] stagas: mobius__: because it says 146 and it sends 148 including the \r\n
[08:58] mobius__: ah now it make sense
[08:58] stagas: mobius__: so the parser breaks
[08:59] JaKWaC has joined the channel
[08:59] mobius__: i am gonna go check the source code to see why it adds it
[08:59] copongcopong has joined the channel
[09:00] stagas: mobius__: curl should work though, you could use it to get the response and grab it from node
[09:00] stagas: mobius__: but if you can fix the source it's better ;)
[09:00] mobius__: stagas, there is a wrapper for curl on node?
[09:01] mobius__: stagas, well i could submit a patch, put in order for it to get mainstream it would take well I don't know, a year :)
[09:01] stagas: mobius__: there's a sync one, but you can use child_process
[09:01] mobius__: stagas, hmm, does feel elegant
[09:02] angrymango has joined the channel
[09:02] stagas: mobius__: https://github.com/dhruvbird/http-sync
[09:02] JaKWaC has joined the channel
[09:02] Ansiktual has joined the channel
[09:04] MattJ has joined the channel
[09:05] mobius__: stagas, thanks! I will check it out right away
[09:07] JaKWaC_ has joined the channel
[09:07] aliem has joined the channel
[09:09] jacekp has joined the channel
[09:09] raidfive has joined the channel
[09:10] RC1140 has joined the channel
[09:10] JaKWaC__ has joined the channel
[09:13] Skola has joined the channel
[09:17] butu5 has joined the channel
[09:17] Yoric has joined the channel
[09:18] butu5: I am planing to create very basic node js screencast
[09:18] butu5: today tried one.. simple static app with connect and nodejs
[09:18] butu5: http://www.screenr.com/HoHs
[09:18] butu5: Sorry for accent problem... appreciate any feedback
[09:19] chunhao has joined the channel
[09:19] desdur has joined the channel
[09:22] johnnywengluu: is there a node.js javascript/css compressor?
[09:22] mape: johnnywengluu: take a look at uglifyjs
[09:23] blup has joined the channel
[09:23] jameson has joined the channel
[09:25] johnnywengluu: mape: ill do that
[09:26] johnnywengluu: mape: wow seems very popular
[09:26] mape: Jup, jquery uses it for their releases for example
[09:26] piscisaureus has joined the channel
[09:26] johnnywengluu: i used YUI compressor before
[09:27] johnnywengluu: but its on java .. wanna use something on node.js
[09:27] mape: Yeah, uglifyjs is faster, and pure js
[09:27] SubStack: uglify is awesome except for the part where the maintainer doesn't publishes to npm when the github changes
[09:28] hebz0rl has joined the channel
[09:28] mc_greeny has joined the channel
[09:28] maru_cc has joined the channel
[09:28] johnnywengluu: SubStack: why i always wanna use github instead =)
[09:29] johnnywengluu: npm install
[09:29] johnnywengluu: then you have the latest
[09:30] Kami_ has joined the channel
[09:31] zackattack has joined the channel
[09:31] zackattack has left the channel
[09:38] aron_ has joined the channel
[09:44] RC1140 has joined the channel
[09:46] temp02 has joined the channel
[09:47] mxp has joined the channel
[09:49] Nuck: SubStack: YOU! Smart person! I need assistance of the highest braincells.
[09:50] andrewfff has joined the channel
[09:50] Nuck: So I hope for your sake that you are high.
[09:51] cummingscm1 has left the channel
[09:52] johnnywengluu: uglifyjs author says: Unfortunately, for the time being there is no automated test suite. But I ran the compressor manually on non-trivial code, and then I tested that the generated code works as expected. A few hundred times.
[09:52] skm has joined the channel
[09:52] johnnywengluu: he meant he didnt test his code?
[09:52] Nuck: johnnywengluu: So? I don't either.
[09:52] Nuck: I don't do any automatic test suites
[09:52] Nuck: Unit tests? Fuck that noise.
[09:52] Nuck: I test as a go, and if something breaks, I figure it out.
[09:53] Nuck: I call it "agile" testing :P
[09:53] johnnywengluu: nice =)
[09:53] Nuck: SubStack: So, are you still awake?
[09:53] niftylettuce: any folks from Greece here?
[09:53] SubStack: mew
[09:53] Nuck: niftylettuce: no, but I've got lots of grease in me
[09:53] niftylettuce: Nuck++
[09:53] v8bot: niftylettuce has given a beer to Nuck. Nuck now has 2 beers.
[09:53] Nuck: SubStack: Look at this, tell me what I fucked up on? https://gist.github.com/f5fdb5f3de391c262b64
[09:53] Nuck: server is an Express thingy
[09:54] Nuck: But errors in the deep nesting don't bubble to the top and get caught by the Expres error shit
[09:54] Nuck: Is there some odd property of errors that I don't understand?
[09:55] SubStack: maybe
[09:55] SubStack: express can't catch async errors like that
[09:55] SubStack: nobody can
[09:55] Nuck: SubStack: I just throw the errors though? Shouldn't try { } catch {} handle that?
[09:56] SubStack: nope
[09:56] Nuck: SubStack: So I gotta rewrit everything with res.send stuff. Fun.
[09:56] SubStack: that only works for synchronous exceptions
[09:56] Nuck: Damn.
[09:56] SubStack: Nuck: you could use seq to thread the errors
[09:56] Nuck: SubStack: Well thanks for clearing that up for me.
[09:57] Nuck: SubStack: Are you suggesting I use a flow control library?
[09:57] Nuck: I'm already 216 lines in
[09:57] SubStack: if you like
[09:57] eldar has joined the channel
[09:57] Nuck: And I'm happy without :P
[09:57] SubStack: the thing about flow control libraries is you can just patch them in wherever
[09:58] Nuck: SubStack: You're sure up late. Is it because it's friday, friday, and you're looking forward to the weekend, weekend?
[09:58] Nuck: Ah true
[09:58] Nuck: But I'd like to keep my 1-second startup times ;)
[09:58] Wizek has joined the channel
[09:58] Nuck: Firing up a new instance of my server in 1 second is pretty fucking awesome.
[09:58] Nuck: That's why I dig Express is because it's INCREDIBLY lightweight.
[09:59] Nuck: SubStack: I'll probably just fix up all my error handling. I can figure out a one-liner and find + replace :D
[10:00] Nuck: aaaaaaactually... I have an idea >_>
[10:00] Nuck: I'll create function for server.error and also use it for my regular errors :D
[10:01] yozgrahame has joined the channel
[10:01] Nuck: ACTION names it "toErrIsHuman"
[10:01] Renegade001 has joined the channel
[10:01] alessio_alex has joined the channel
[10:02] adrianmg has joined the channel
[10:02] dall has joined the channel
[10:02] dall: hello everybody
[10:02] dgathright has joined the channel
[10:02] Nuck: Hi doctor dall
[10:03] Nuck:
[10:03] dall: Nuck, hi :)
[10:05] Nuck: FUCKING YES
[10:05] Nuck: SubStack: IT WORKS 8D
[10:05] AAA_awright: NuckingFuts?
[10:06] Nuck: AAA_awright: Ayup
[10:06] Nuck: Finally got the nick I'd originally wanted
[10:06] AAA_awright: Ah
[10:06] Nuck: Yup
[10:06] Nuck: http://peterlejeck.tk:8080/user/nuck/modules/art/
[10:06] Nuck: That's a working page
[10:06] Nuck: http://peterlejeck.tk:8080/user/nuck/modules/thisdoesnotexist/
[10:06] Nuck: That's an error
[10:07] AAA_awright: :-/
[10:07] Nuck: Or wait
[10:07] AAA_awright: It's... JSON?
[10:07] Nuck: Yeah, that's right
[10:07] Nuck: AAA_awright: Yup
[10:07] Nuck: That's my entire Fakooda site :P
[10:07] Nuck: a REST API
[10:07] AAA_awright: It needs some content management system magic
[10:08] Nuck: AAA_awright: http://peterlejeck.tk:8080/user/nuck/profile/
[10:08] Nuck: That page lists my userpage modules
[10:08] Nuck: I'll be able to manage my userpage modules and such
[10:08] Nuck: Once it's done.
[10:08] Nuck: AAA_awright: Honestly, at this rate, Fakooda's backend may consist of less than a thousand lines of code lol
[10:09] Nuck: I'm at 216 lines or so
[10:09] AAA_awright: My CMS is...
[10:09] AAA_awright: Hmm what's a command to tally that?
[10:09] Nuck: AAA_awright: I pulled up the file and Ctrl+End :P
[10:09] Nuck: It's one file
[10:09] AAA_awright: The. File.
[10:09] AAA_awright: I'l just cat it all together and count that
[10:09] Nuck: lol
[10:10] Nuck: AAA_awright: I did a line counter in JS once :slow:
[10:10] Nuck: :S
[10:10] Nuck: It took out comments with a RegExp
[10:10] Nuck: And then counted \n
[10:10] AAA_awright: 1911
[10:11] Nuck: AAA_awright: Yeah, I may manage to have the majority of this site in under a thousand
[10:11] Nuck: Hosting is gonna be an interesting setup
[10:11] Nuck: I'm gonna have the API server, the static server, and the database server
[10:11] AAA_awright: Why split it out?
[10:12] Nuck: The static is gonna be lighttpd or NGINX, something which can spit out a static file without much overhead
[10:12] Nuck: And which works VERY well with binaries
[10:12] Nuck: So that's why I didn't do it in Node
[10:12] AAA_awright: Well, for API?
[10:12] AAA_awright: Oh I see
[10:12] Nuck: Because while Node *can* do binaries, it can't do it as effectively as NGINX or lighttpd
[10:12] AAA_awright: How do you spit out HTML though?
[10:12] Nuck: AAA_awright: I don't.
[10:13] Nuck: I spit out a single page with JS
[10:13] Nuck: Which will be hosted on the aforementioned NGINX/lighttpd
[10:13] AAA_awright: That's just evi
[10:13] AAA_awright: l
[10:13] Nuck: And then that hits up my API
[10:13] Nuck: AAA_awright: I'll be building a seconary frontend fallback for the APIs
[10:13] AAA_awright: And it keeps formatting on the server side?
[10:13] Nuck: Erm, the AJAX
[10:13] AAA_awright: I mean, you store how to format all the API stuff on the client side?
[10:14] AAA_awright: That's not too friendly to the server
[10:14] Nuck: AAA_awright: Huh?
[10:14] Nuck: formatting API stuff?
[10:14] Nuck: It's just JSON/REST
[10:14] AAA_awright: Uh, how do you format the data?
[10:14] hojberg has joined the channel
[10:14] Nuck: AAA_awright: the JSON it spits out represents the data for the parts
[10:15] shinuza has joined the channel
[10:15] Nuck: User page modules, hwoever, are Express + EJS
[10:15] Nuck: It spits out the JSON with the HTML resulting from it.
[10:15] Eucharis has joined the channel
[10:15] Nuck: AAA_awright: Biggest pain in the ass is gonna be optimizing my algorithm.
[10:15] Nuck: That's gonna take a LOT of Mongo Magic.
[10:15] AAA_awright: What's the algorithm?
[10:16] Nuck: AAA_awright: trade secret.
[10:16] Nuck: :B
[10:16] Country has joined the channel
[10:16] AAA_awright: I mean what's it supposed to get done
[10:16] Nuck: AAA_awright: Art recommendations
[10:16] niftylettuce: ACTION views Nuck's source...
[10:16] AAA_awright: Ah
[10:16] Nuck: Telling you what you'll like based on what you've already liked.
[10:16] Nuck: It's a two part algorithm: one part retrieves the data, another part sorts it.
[10:16] AAA_awright: You can't count a non-vote against a work, for instance... yeah
[10:16] Nuck: I'll be needing to optimize.
[10:17] niftylettuce: Nuck... one question though about this algorithm
[10:17] Nuck: AAA_awright: I'm also figuring out the legal shit on the company
[10:17] niftylettuce: if I like poptarts, will it prompt me if I also like Nyan Cat?!
[10:17] Nuck: Gonna be filing as an LLC in October
[10:17] Nuck: niftylettuce: Depends on if you seemed to like things tagged with "cute", "cat", and "poptart"
[10:18] Nuck: If those three tags are quite popular with you, then yes, it will show nyancat.
[10:18] niftylettuce: Nuck: =) http://www.youtube.com/watch?v=QH2-TGUlwu4 (look at the slider)
[10:19] Nuck: niftylettuce: FUCK YEAH
[10:19] AAA_awright: Win
[10:19] niftylettuce: Youtube++
[10:19] v8bot: niftylettuce has given a beer to Youtube. Youtube now has 1 beers.
[10:20] niftylettuce: i have a hilarious video of myself eating a popcart to that song
[10:21] niftylettuce: man if I posted the little blurbs I record when humor comes a knockin'... 10mil views at least
[10:23] Nuck: YouTube++
[10:23] v8bot: Nuck has given a beer to YouTube. YouTube now has 1 beers.
[10:23] Nuck: ...
[10:23] Nuck: Fuck caps.
[10:23] Nuck: Youtube++
[10:23] v8bot: Nuck has given a beer to Youtube. Youtube now has 2 beers.
[10:23] Nuck: There we go.
[10:23] Nuck: YouTube--
[10:23] v8bot: YouTube is getting too many beers. Don't let YouTube get drunk!
[10:23] Nuck: :|
[10:24] niftylettuce: YouTube--
[10:24] v8bot: niftylettuce has taken a beer from YouTube. YouTube now has 0 beers.
[10:24] niftylettuce: ther u go
[10:24] Nuck: niftylettuce: Beat this. http://www.youtube.com/watch?v=3KT_89gi2Dk
[10:24] Nuck: WATCH IT.
[10:25] niftylettuce: Nuck: hahahahaha
[10:25] Nuck: niftylettuce :3
[10:25] niftylettuce: Nuck: omg, i love his paw
[10:25] jomoho has joined the channel
[10:26] Nuck: niftylettuce: Furry.
[10:26] niftylettuce: Nuck: he gets all excited and pedals faster
[10:26] Nuck: niftylettuce: Wait for the 2-minute mark.
[10:27] Nuck: It gets fucking AWESOME then
[10:27] niftylettuce: hahaha
[10:27] ts__ has joined the channel
[10:27] Nuck: niftylettuce: Didja see it?
[10:28] niftylettuce: Nuck: wtf was she doing
[10:28] niftylettuce: Nuck: like 10 different pulls LOL
[10:28] Nuck: niftylettuce: I just love how she DOESN'T FUCKING NOTICE HIM.
[10:28] shinuza_ has joined the channel
[10:28] AAA_awright: Nuck: Am I the only one who likes very wide works?
[10:29] AAA_awright: Of art, by chance?
[10:29] Nuck: THERE IS A MAN WITH A RAINBOW FLAG TAPED TO THE WALL BEHIND HIM, ON A STATIONARY BIKE. WHATTHEFUCK.
[10:29] AAA_awright: >2.4:1 aspect ratio
[10:29] AAA_awright: Also, What is that thing in that video
[10:29] Nuck: AAA_awright: I like my artwork 16:10 (So I can wallpaper it)
[10:29] Nuck: AAA_awright: That's a man.
[10:30] AAA_awright: But you just said it's a furry
[10:30] AAA_awright: ACTION ducks
[10:30] Nuck: ACTION fucks
[10:30] else has joined the channel
[10:30] niftylettuce: nucks
[10:30] Nuck: Not really.
[10:30] Nuck: I wouldn't fuck a furry.
[10:30] Nuck: Welll.... Shouldn't say that. I'd fuck horo, but any furrier and it's a no-no.
[10:30] AAA_awright: :-/
[10:31] AAA_awright: Nuck: What do you have for a template/theme
[10:31] Nuck: AAA_awright: For what?
[10:31] AAA_awright: This website
[10:32] Nuck: AAA_awright: Oh, the art site?
[10:32] AAA_awright: Yeah
[10:32] niftylettuce: Peterrrr
[10:32] Nuck: It's a work in progress, lemme grab the pic off mah dribbble
[10:32] Nuck: niftylettuce: eh?
[10:32] niftylettuce: Nuck: he?
[10:32] Nuck: niftylettuce: Why'd you just elongate my name?
[10:33] niftylettuce: Nuck: ?eman ym etagnoloe tsuj uoy d`yhW
[10:34] Nuck: niftylettuce... lolwat
[10:34] niftylettuce: Nuck: Nyan cat man is controlling mym ind.
[10:34] Nuck: AAA_awright: http://drbl.in/bucm
[10:34] niftylettuce: Nuck: my mind.*
[10:34] Nuck: niftylettuce: Do I know you?
[10:34] AAA_awright: Ooh
[10:34] niftylettuce: ACTION spots a WILD NYAN
[10:34] niftylettuce: Nuck: You know I do?
[10:34] Nuck: niftylettuce: Damnit, cleverbot, you're creeping me out!
[10:34] niftylettuce: lol
[10:34] Nuck: AAA_awrightThat's the top-right corner.
[10:35] Nuck: AAA_awright: The topbar is gonna be quite an interesting setup
[10:35] Nuck: I'm doing push-downs
[10:35] Nuck: Where you click something and a menu pushes the page down a big
[10:36] niftylettuce: Nuck: you living your life like its golden? http://www.youtube.com/watch?v=4QCXr79Rkcw
[10:37] AAA_awright: Nuck: pushes the page down a big?
[10:37] benvie has left the channel
[10:37] niftylettuce: bit
[10:37] AAA_awright: Oh bit?
[10:38] AAA_awright: hmm
[10:38] Nuck: what niggerlettuce said
[10:38] niftylettuce: LOL
[10:38] Nuck: ACTION typoed originally and just rolled with it :P
[10:38] Nuck: Anywho I needa go to sleep soon >_>
[10:38] Nuck: 3:40AM
[10:38] niftylettuce: 6:37AM
[10:38] Nuck: lol
[10:38] niftylettuce: ;)
[10:39] niftylettuce: 2 ltr cherry coke
[10:39] niftylettuce: gone.
[10:39] Nuck: 2 glasses of chai
[10:39] Nuck: gone.
[10:39] Nuck: And one internet startup
[10:39] Nuck: here.
[10:39] niftylettuce: Nuck++
[10:39] v8bot: niftylettuce has given a beer to Nuck. Nuck now has 3 beers.
[10:39] AAA_awright: 3:39AM
[10:39] niftylettuce: Nuck--
[10:39] v8bot: Nuck is getting too many beers. Don't let Nuck get drunk!
[10:40] AAA_awright: Oh that's right
[10:40] Nuck: AAA_awright: No, I think that's left.
[10:40] Nuck: Seriously, don't let me get drunk, I'm too young D:
[10:40] Nuck: Gimme a couple more years of sobriety.
[10:40] AAA_awright: That's my time, same as yours, at least until the DST change over here in AZ
[10:41] Nuck: AAA_awright: LOL ARIZONA SUCKS
[10:41] Nuck: AAA_awright: ur police got haxx0red.
[10:41] AAA_awright: For the lulz of course
[10:41] Nuck: Of course ;)
[10:41] Nuck: AAA_awright: You hear about the ceasefire?
[10:41] AAA_awright: No?
[10:42] AAA_awright: And what is this, I thought they were going after the Fed
[10:42] Nuck: They're willing to cease fire... If Obama wears a shoe on his head for the ENTIRE next speech.
[10:42] AAA_awright: Oh, Lulzsec
[10:42] Nuck: Inorite
[10:42] Nuck: I would laugh so fucking hard to see OBama with a shoe on his head
[10:42] Nuck: LulzSec consists of approximately 5 guys.
[10:42] Nuck: Apparently
[10:43] Nuck: 2 left when they hacked the FBI
[10:43] niftylettuce: omg
[10:43] AAA_awright: I kinda like the secrecy
[10:43] niftylettuce: shoe on head
[10:43] AAA_awright: I don't care if it's one person, or a thousand
[10:43] Nuck: It's 5 afterwards, mind you
[10:43] Nuck: They were 7-8 before
[10:43] niftylettuce: omg nyancat
[10:43] JaKWaC has joined the channel
[10:43] niftylettuce: HES IN A GYM WITH A RAINBOW FLAG
[10:43] kbni: I heard it was one guy
[10:43] kbni: and he has multiple personalities
[10:43] Nuck: kbni: lolwatno
[10:44] kbni: shut up I have a reliable source
[10:44] niftylettuce: itwasnyancatyoudumbidiotsheisthetruehacker
[10:44] Nuck: kbni: Mr. Binky, the man who lvies in your finger?
[10:44] niftylettuce: finger nail*
[10:44] Nuck: niftylettuce: No, it's a line from Muppet Treasure Island.
[10:44] kbni: anyone feel like apache benching my website for me?
[10:44] Nuck: ACTION is back in an hour or so
[15:56] eventii has joined the channel
[15:56] mynyml has joined the channel
[15:56] mikeal has joined the channel
[15:57] dtan: k bnoordhuis, also found the way to see what is being listened to on a mac: lsof -i | grep LISTEN
[15:58] dtan: and you're right, it's not listing :4001
[15:59] avalanche123 has joined the channel
[15:59] junkee[]: bnoordhuis: https://gist.github.com/1046614
[16:05] dguttman has joined the channel
[16:07] pastak has joined the channel
[16:08] mandric has joined the channel
[16:10] febits has joined the channel
[16:12] pastak_ has joined the channel
[16:13] tk has joined the channel
[16:14] christkv has joined the channel
[16:16] dget has joined the channel
[16:16] Swimming_bird has joined the channel
[16:19] jakeg has joined the channel
[16:20] rfay has joined the channel
[16:21] iffy|x200 has joined the channel
[16:22] jtsnow has joined the channel
[16:24] anno^da has joined the channel
[16:24] junkee[]: why is here such a silence? free beer or what?
[16:25] igl: http://www.youtube.com/watch?v=rJHZiQX2sFU there you go
[16:25] PassiveFist: I'm getting a weird npm error.. [WARNING] Out of OEM specific VK codes, changing to unassigned
[16:25] PassiveFist: any ideas?
[16:28] eyesUnclouded has joined the channel
[16:33] PassiveFist: nvm reinstalled npm as root instead of 'sudo curl..installFiles etc..' and now it works.
[16:35] isaacs has joined the channel
[16:35] vikstrous has joined the channel
[16:38] jbrokc has joined the channel
[16:38] Yoric has joined the channel
[16:40] Yoric has joined the channel
[16:41] riven` has joined the channel
[16:43] xandrews has joined the channel
[16:43] sethetter has joined the channel
[16:43] Aria has joined the channel
[16:44] m00p has joined the channel
[16:47] riven has joined the channel
[16:47] riven has joined the channel
[16:47] boaz has joined the channel
[16:49] PassiveFist: syn
[16:53] Pathin has joined the channel
[16:53] namdq has joined the channel
[16:54] Pathin_ has joined the channel
[16:57] quackquack has joined the channel
[16:57] riven` has joined the channel
[16:59] pickels has joined the channel
[17:01] riven has joined the channel
[17:04] is_null: i don't understand, if http.get is non blocking, how to process the http response in order to return our http response ?
[17:05] sudhirjonathan has joined the channel
[17:05] Pathin has joined the channel
[17:05] dgathright has joined the channel
[17:06] Bonuspunkt: is_null what are you trying to accomplish?
[17:09] Bonuspunkt: http.get(options, function(res) { res.on('data', function(chunk) { /*processChunk*/ });res.on('end', function() { /* done, usually join chunks and do something with it */ }
[17:10] Prism has joined the channel
[17:13] Pathin has joined the channel
[17:13] jensn has joined the channel
[17:14] Pathin has joined the channel
[17:14] Pathin_ has joined the channel
[17:15] is_null: Bonuspunkt: my bad, nodejs is blowing my mind
[17:15] Nican has joined the channel
[17:15] micheil: you'll usually want to set an encoding for the chunks, so you're just doing string concat operations
[17:15] micheil: rather than buffer concatenations
[17:17] josephboyle has joined the channel
[17:17] mykul has joined the channel
[17:18] is_null: what's the simplest way to parse an xml string ? i checked out two modules so far: node-o3-xml cannot install with npm and node-xml2js apparently is event based which won't work in my case
[17:18] is_null: (just tell me before i get too annoying :))
[17:18] isaacs: is_null: why won't "Event based" work in your case?
[17:18] micheil: generally, don't try and use xml.
[17:19] micheil: if you can avoid it, that is.
[17:19] SkyRocknRoll has joined the channel
[17:19] SkyRocknRoll has joined the channel
[17:19] jonaslund has joined the channel
[17:19] micheil: otherwise, you'd have to use one of the various xml parsers (like the SAX one)
[17:19] isaacs: is_null: xml2js is pretty simple. you give it xml, it returns a js object
[17:19] is_null: isaacs: i'm trying to parse this to generate the response: http://ws.audioscrobbler.com/2.0/?method=track.search&track=Believe&api_key=b25b959554ed76058ac220b7b2e0a026
[17:19] avalanche123 has joined the channel
[17:20] isaacs: is_null: libxmljs is pretty featureful, though
[17:20] piscisaureus has joined the channel
[17:20] is_null: thanks for the advice
[17:20] isaacs: is_null: why won't xml2js work for that?
[17:20] micheil: I think you can get that as json..
[17:21] micheil: http://ws.audioscrobbler.com/2.0/?method=track.search&track=Believe&api_key=b25b959554ed76058ac220b7b2e0a026&format=json
[17:21] isaacs: is_null: http://ws.audioscrobbler.com/2.0/?method=track.search&track=Believe&api_key=b25b959554ed76058ac220b7b2e0a026&format=json
[17:21] isaacs: ha
[17:21] micheil: isaacs: gee.. you're getting slow these days :P
[17:21] isaacs: haha
[17:21] confoocious has joined the channel
[17:21] confoocious has joined the channel
[17:22] is_null: awwwwww thanks i can't believe i was so blind ... now i see the light!
[17:22] micheil: hmm, I think you may also be able to use Nest by Votizen for interacting with that kind of api, not sure though.
[17:23] micheil: I think that's the kind of api tim built it for.
[17:23] butu5 has joined the channel
[17:23] arpegius has joined the channel
[17:24] jonaslund: ACTION built a xml parser/generator based on an extended jsonml syntax
[17:24] dipser has joined the channel
[17:24] jonaslund: with support for processing instructions,etc..
[17:24] junkee[]: bnoordhuis: are you back?
[17:25] bnoordhuis: junkee[]: yes
[17:25] Pathin_ has joined the channel
[17:26] junkee[]: bnoordhuis: i tried with EV_MULTIPLICITY but there is a sagfault also. https://gist.github.com/1046614
[17:26] bnoordhuis: junkee[]: that's a rather brief backtrace
[17:28] junkee[]: bnoordhuis: added bt
[17:28] Swimming_bird has joined the channel
[17:29] jtsnow has joined the channel
[17:30] theCole has joined the channel
[17:30] bnoordhuis: junkee[]: added a comment
[17:30] al3xnull has joined the channel
[17:31] bnoordhuis: junkee[]: btw, you need to *disable* EV_MULTIPLICITY
[17:31] brimster_ has joined the channel
[17:31] junkee[]: bnoordhuis: #undef EV_MULTIPLICITY
[17:31] bnoordhuis: right
[17:32] junkee[]: bnoordhuis: btw, just use a ogg you have. but why it is failing for me?
[17:32] avalanche123 has joined the channel
[17:32] beck5k has joined the channel
[17:34] kmiyashiro has joined the channel
[17:34] Aria: I really wish there was a way to tell if Node was compiled with Multiplicity on or off, and go accordingly.
[17:34] catshirt has joined the channel
[17:34] Aria: I had to turn it on to do some neat integration with another event loop and pass events back and forth
[17:34] bnoordhuis: junkee[]: don't know but w=0x01 is a bad sign - i suspect EV_MULTIPLICITY is still on
[17:35] Aria: Yeah. It looks like it.
[17:35] Pathin_ has joined the channel
[17:35] tuhoojabotti: http://www.tuhoojabotti.com/r/prsc/json_fck_yea.png Look at it go.. so slow. :D
[17:35] bnoordhuis: junkee[]: easy way to test, remove the EV_DEFAULT_s
[17:35] tuhoojabotti: 2x faster without debug
[17:36] fson_ has joined the channel
[17:37] mykul|Home has joined the channel
[17:37] iMiksu has joined the channel
[17:37] mandric_ has joined the channel
[17:37] junkee[]: bnoordhuis: error: cannot convert ‘ev_io*’ to ‘ev_loop*’ for argument ‘1’ to ‘void ev_io_start(ev_loop*, ev_io*)’ So, still enabled?
[17:37] bnoordhuis: junkee[]: yep
[17:38] blup has joined the channel
[17:39] junkee[]: bnoordhuis: that sucks. I wrote #undef EV_MULTIPLICITY in the very first line of init.cc
[17:39] bnoordhuis: junkee[]: i'll try to patch your wscript
[17:40] micheil: isaacs: hmm, sodn?
[17:41] isaacs: micheil: yessir
[17:41] isaacs: social dnodes
[17:41] micheil: isaacs: is this related to auto-meshing networks?
[17:41] isaacs: yes.
[17:41] isaacs: the goal is to just build a very resilient ring structure, which can then be built upon to do other more interesting things.
[17:41] micheil: neat. I was experimenting with similar a while back.
[17:42] isaacs: it's easy to get off-track wiht this sort of program, for some reason.
[17:42] micheil: yes
[17:42] isaacs: requires a lot of discipline, because almost every shortcut leads to ruin
[17:42] isaacs: hence the absurd TDD approach i'm taking with sodn
[17:42] isaacs: dnode is pretty much the exact right tool for this job, though. it's neat :)
[17:42] micheil: hmm, I was just using raw tcp sockets
[17:43] level09 has joined the channel
[17:43] isaacs: see, then you have to worry about the protocol, and the connection edge cases, and the tcp mumbo jumbo, while also juggling state management and updating, and ring structure.
[17:43] isaacs: gets too big.
[17:43] isaacs: (bt, dt)
[17:43] micheil: yeah
[17:44] wilmoore has joined the channel
[17:44] aliem has joined the channel
[17:44] isaacs: dnode takes out most of that complexity, so sodn is strictly focused on doing gossip, using the dnode rpc abstraction for message passing.
[17:44] micheil: my core idea was to keep every peer knowledgable of every other peer, but to reuse connections that already exist
[17:45] micheil: so, a mesh of two peers would have only 1 tcp connection
[17:45] isaacs: the Big Problem that something like that has to tackle is that information is often not 100% up to date, and the network is probably bigger than can be reasonably sent in a single message.
[17:45] micheil: three peers, three connections
[17:45] micheil: four, and you'd get 6 connections
[17:45] isaacs: 100?
[17:45] isaacs: ;)
[17:45] micheil: yeah, it's a bit of a mess that way.
[17:45] Pathin_ has joined the channel
[17:46] isaacs: i want to have the nodes maintain a target number of connections, perhaps with roles for "hubs" and "workers", and decide where to connect programmatically based on what will make the most resilient network.
[17:46] isaacs: i don't know what the best algo is for that, but there's been a fair amount of research on the subject.
[17:47] isaacs: cassandra, riak, etc. have all already solved this problem.
[17:47] isaacs: the diff is that i'm not building a database (though you could conceivably build a pretty neat BASE-style db on top of this)
[17:47] blup has joined the channel
[17:47] micheil: I'm thinking mesh networking would be required for a resilient websocket infrastructure
[17:48] micheil: currently most websocket infrastructure setups have a single point of failure which is usually the message broker (eg, redis)
[17:48] stagas has joined the channel
[17:49] bnoordhuis: junkee[]: i think node-waf is broken in master, it always sets EV_MULTIPLICITY the wrong way
[17:50] jtsnow has joined the channel
[17:50] isaacs: micheil: right
[17:50] sethetter: Is there any point to using websockets if your app is not going to be concerned with realtime multi-user updates?
[17:50] micheil: possibly not.
[17:50] thalll has joined the channel
[17:51] micheil: sethetter: although, in most cases adding realtime aspects into the mix can result in interesting apps
[17:51] sethetter: I'm new to server side technologies, so I'm trying to wrap my head around what I should be using in what scenarios.
[17:51] micheil: sethetter: also, the other case where you may want to use websockets could be if your transmitting a large number of updates (essentially realtime though)
[17:51] junkee[]: bnoordhuis: so, what to do?
[17:52] sethetter: micheil: good point. i guess i'm just trying to figure out if it's something I should be concerned with from the beginning or something I can mess with more down the line when I've better grasped server-side overall
[17:52] micheil: (slight disclaimer, I work for pusher.com)
[17:52] bnoordhuis: junkee[]: an `#undef EV_MULTIPLICITY` as the very first line of init.cc should do the trick
[17:52] junkee[]: bnoordhuis: but it does NOT!
[17:53] bnoordhuis: junkee[]: as the first line? does for me
[17:53] bnoordhuis: junkee[]: what version of node are you testing this with?
[17:54] junkee[]: bnoordhuis: 0.5-pre, but it doesnt event build when I remove EV_DEFAULT
[17:55] bnoordhuis: junkee[]: at what commit are you? should be (the very sexy) c95da94
[17:56] springify has joined the channel
[17:56] junkee[]: bnoordhuis: how to check?
[17:56] Pathin_ has joined the channel
[17:57] bnoordhuis: junkee[]: `git log`? assuming you cloned the GH repo
[17:57] bnoordhuis: piscisaureus: ping
[17:57] junkee[]: bnoordhuis: nah, no git repo. I will build newest node now.
[17:58] ed__ has joined the channel
[17:58] smtlaissezfaire has joined the channel
[17:58] mpoz2 has joined the channel
[17:59] ed__: I'm a node & ubuntu beginner. I'm trying to setup express. When I run: node app.js ... I get "Error: Cannot Find Module: 'ejs'". I tried npm install ejs ... and npm install ejs -g and both installed. Still get same error. Any idea how to fix?
[18:00] WestN has joined the channel
[18:00] WestN: Anyone installed nodejs using package for mac os x? and can tell me how to start?
[18:01] beck5k: @westn try http://mxcl.github.com/homebrew/
[18:01] beck5k: @ed_ can you find the line where ejs is required? also do a 'npm ls' to check you do actually have ejs
[18:02] sethetter: What do you guys recommend I try building for a first time app to get better with node? I'm a front-end guy trying to get into backend, and not sure where to start, there's a lot of new technology flying around right now.
[18:03] WestN: @beck5k it is installed.. but how to start the server and where is stuff located?
[18:03] piscisaureus: bnoordhuis: hey
[18:03] Charuru: a
[18:04] micheil: sethetter: for me, I'd already done some event based programming with network sockets (xulrunner ftw.), so I started with the simple http server, then wanted to try working with protocols
[18:04] sethetter: WestN: you start the server by running 'node filename.js' on a node application file.
[18:04] beck5k: assuming you run npm from inside your project directory you should have node_modules directory my guess is there is something wrong with the require line in your code
[18:04] micheil: sethetter: but then again, network programming and problems interest me, so that's that.
[18:05] WestN: @sethetter thanks =)
[18:05] ed__: @beck5k npm ls says: WARN express 2.3.12 Unmet dependency in /home/ed/burritohunter ... application-name@0.0.1 /home/ed/burritohunter ... aaa ejs@0.4.3 ... aaa UNMET DEPENDENCY express 2.3.12 ... aaa request @1.9.8 extraneous
[18:05] isaacs: ed__: can you please post the entire stack trace to a gist or pastie or something?
[18:05] micheil: sethetter: depends on what problems interest you as to where to start with node.js
[18:05] isaacs: ed__: the "cannot find module 'ejs'" error
[18:05] sethetter: micheil: networking is interesting to me, but it's still a gray area. I know the DOM inside and out, but this is all mostly new to me.
[18:05] zivester_ has joined the channel
[18:06] isaacs: sethetter: welcome to the party :)
[18:06] micheil: sethetter: well, ask your self what you'd like to build?
[18:06] bnoordhuis: piscisaureus: sup homie
[18:06] bnoordhuis: piscisaureus: found what i think is a bug in node-waf / ev.h
[18:06] micheil: most of the time I spend with node.js is writing experiments and figuring out the best way to work with data
[18:06] piscisaureus: bnoordhuis: ok
[18:06] sethetter: micheil: right. i suppose that's what I'm trying to figure out, haha. i like all the realtime desktop-like web apps that are emerging, i know that's mostly lots of ajax
[18:06] piscisaureus: bnoordhuis: what's it?
[18:07] micheil: sethetter: actually, a lot of realtime desktop-like webapps are starting to transition to using websockets
[18:07] Pathin_ has joined the channel
[18:07] ed__: @isaacs here is what I see in the command line: http://pastebin.com/Affv6bRQ
[18:07] bnoordhuis: piscisaureus: line 78 in ev.h seems to define EV_MULTIPLICITY to EV_FEATURE_CONFIG and that results in add-ons being compiled with multiple event loop support
[18:07] sethetter: micheil: i thought they worked together, not as alternatives
[18:07] isaacs: ed__: ok, so, express is installed in ~/node_modules
[18:08] sethetter: but cool, thanks for letting me know, thats something to look into for sure.
[18:08] isaacs: ed__: you should install express in your actual application
[18:08] bnoordhuis: piscisaureus: is that a regression of sorts? i.e. bug added through the libuv work?
[18:08] micheil: sethetter: true that they do work together, however, depending on your infrastructure will change how you structure your app
[18:08] isaacs: ed__: This should make it work: cd ~; npm rm express (or just rm -rf ~/node_modules); cd ~/burritohunter ; npm install express ejs
[18:08] isaacs: ed__: assuming that you have a package.json and/or node_modules folder in ~/burritohunter
[18:09] piscisaureus: bnoordhuis: that's unlinkely
[18:09] micheil: sethetter: like, using Pusher, you'd probably do all the data sending by ajax, but do the receiving over websockets
[18:09] beck5k: is anyone using Mongodb? I am thinking about giving up with mongoose are node-mongodb-native robust?
[18:09] piscisaureus: bnoordhuis: I don't think we touched node-waf in the process
[18:09] micheil: however, if you use websockets within your application process, you can do all data communication over websockets
[18:09] bnoordhuis: piscisaureus: okay, then i'll just go and fix it
[18:10] ed__: @isaacs I do have package.json and node_modlues in burritohunter.com. Should I cd to that directory and npm install express?
[18:10] ed__: @isaacs ... I mean I have those in the directory "burritohunter"
[18:10] micheil: (examples of websockets in application processes would be running things like socket.io, socketstream, faye, node-websocket-server)
[18:10] sethetter: micheil: gotcha. good to kno
[18:11] isaacs: ed__: yes.
[18:11] sethetter: micheil: i think websockets sounds like a good place to dig in
[18:11] isaacs: ed__: install stuff in the folder where you're developing stuff
[18:11] Aria: ed__: Yes. Possibly adding it to the package.json as a dependency, so you can just npm install
[18:11] TooTallNate has joined the channel
[18:11] isaacs: Aria: there's `npm install express --save` now, too ;)
[18:11] isaacs: or -S
[18:11] micheil: sethetter: there's a fair bit of code out there, just make sure you know the pros/cons when deciding to take a particular websocket stack to production
[18:11] isaacs: (not to be confused with -s, which is --silent)
[18:11] Aria: Hehe. Yep. I was just trying to remember what flag was decided on. And which version of npm that came in.
[18:11] seawise has joined the channel
[18:11] sethetter: micheil: I think I'll start doing experiments with it. what database do you usually use? i'm starting with mongoose, but have seen problems a little here and there so not sure if it's the best choice
[18:12] seawise: hi, guys
[18:12] micheil: sethetter: I do a lot of in-memory stuff, as I usually don't work with databases in node
[18:12] isaacs: Aria: always "the latest"
[18:12] isaacs: Aria: :)
[18:12] piscisaureus: bnoordhuis: it's oka
[18:12] micheil: sethetter: in the sense of, I don't develop standard webapps.
[18:12] piscisaureus: t
[18:12] isaacs: Aria: if npm -v !== npm view npm version, then you're out of date.
[18:12] piscisaureus: y
[18:12] seawise: anyone interested to write real-world Node.js application in pair or in team?
[18:12] ed__: @isaacs Works!!!! http://50.57.99.185/ Thank God! I've been trying to get this working for months!
[18:12] Aria: Yep.
[18:12] isaacs: ed__: months!? really?
[18:12] isaacs: ed__: you're very patient!
[18:13] micheil: sethetter: in the past I've used each of redis, mysql, and mongodb for databases in node; but I've heard good things about riak and couchdb
[18:13] sethetter: micheil: whats an example of one of those apps? in-memory stuff would be cool but i can't think of an application scenario for some reason
[18:13] Aria: I use redis for a URL shortener.
[18:13] ed__: @isaccs yeah... embarassing... I tried 4 different hosting companies... Had a really tough time. I'm a designer/front end guy, so this command line stuff is very difficult for me
[18:14] unomi has joined the channel
[18:14] Aria: key = short, value = url
[18:14] micheil: sethetter: most are just experiments, my most recent was one from yesterday, https://github.com/pusher/spacegame_example
[18:14] smtlaissezfaire has joined the channel
[18:14] ed__: @isaccs I'm making a list of instructions on a Google doc.. will share it with others
[18:14] seawise: ed_: how BurritoHunter.com should be working?
[18:15] micheil: sethetter: the core server-side logic is in sharing data and calculating vectors
[18:15] seawise: do not see any functionality
[18:15] seawise: only mobile template there
[18:15] sethetter: micheil: awesome i'm going to check it out. thanks for all the help
[18:15] sethetter: micheil: i'll probably be checking out your github a lot :)
[18:15] _fat_ has joined the channel
[18:16] micheil: I'm @miksago on github
[18:16] ed__: @seawise for now, I'm just trying to get a basic setup with express. It doesn't actually do anything now. My goal was just to get the node/express part setup. After that, I can handle the HTML & client-side js no problem. So, basically, now I can finally get to work on building the site
[18:16] sethetter: awesome, i'm @sethetter
[18:17] Pathin_ has joined the channel
[18:18] seawise: @ed__: so let's call it "early stage" :)
[18:18] ed__: @seawise forgot to mention... I'll be using data from a couch db to display on the site. Using "connect" and kizzy.js so far
[18:19] seawise: I'm using Mongo for persistence usually
[18:19] mehlah has joined the channel
[18:19] piscisaureus: bnoordhuis: I'll be gone soon. send me a pull request when you're ready
[18:20] bnoordhuis: piscisaureus: sorry, turned out to be false alarm :-/
[18:20] aelaguiz has joined the channel
[18:20] ed__: @seawise yep very early stage
[18:20] piscisaureus: bnoordhuis: oh, ok
[18:20] seawise: @ed__: can I help you with it or you're interested in develping it my yourself?
[18:21] jbrokc has left the channel
[18:22] micheil: isaacs: btw, props on the new npm folder structuring, enabled myself and damien tanner to really quickly build and share that spacegame example
[18:23] isaacs: micheil: awesome, thanks :)
[18:23] bnoordhuis: junkee[]: you have a pull request
[18:23] micheil: (no need to worry about each dev having to install modules)
[18:24] sethetter has joined the channel
[18:25] mendel_ has joined the channel
[18:25] hwinkel has joined the channel
[18:25] gazumps has joined the channel
[18:28] Pathin_ has joined the channel
[18:29] junkee[]: bnoordhuis: It only works for me when I add EV_DEFAULT_
[18:29] bnoordhuis: junkee[]: then something's not right in your setup
[18:30] junkee[]: bnoordhuis: and with #undef EV_MULTIPLICITY
[18:30] bnoordhuis: junkee[]: try `node-waf -v configure clean build`
[18:30] bnoordhuis: junkee[]: and watch the output - the g++ commands should have EV_MULTIPLICITY=0
[18:32] junkee[]: bnoordhuis: -DEV_MULTIPLICITY=0 but it chances nothing
[18:33] junkee[]: bnoordhuis: still segfault in ev_io_start
[18:33] DTrejo has joined the channel
[18:34] Minos has joined the channel
[18:35] brimster_ has joined the channel
[18:37] iffy|x200 has joined the channel
[18:39] Pathin_ has joined the channel
[18:40] bnoordhuis: junkee[]: ffs, same here
[18:40] bnoordhuis: junkee[]: don't know but is taking too much time right now
[18:40] bnoordhuis: junkee[]: you should file an issue at joyent/node
[18:40] Kami_ has joined the channel
[18:42] Horofox has joined the channel
[18:43] Corren has joined the channel
[18:44] MattJ has joined the channel
[18:44] yoav1 has joined the channel
[18:45] savid has joined the channel
[18:45] savid: wtf? http://manpages.ubuntu.com/manpages/oneiric/man1/mricron.1.html "npm" as in "node package manager" has nothing to do with "mricron", and is not even in that package. "mricron" does include an npm command but it is not node package manager.
[18:46] savid: Does anyone know what the real ubuntu package is for npm?
[18:46] isaacs: hahaha
[18:46] isaacs: savid: i don't think that there is one
[18:46] isaacs: savid: if there is, and it's using 0.2.19, then there's a problem
[18:47] isaacs: savid: just do the standard install, as detailed in the readme
[18:47] savid: isaacs, so you're saying just don't use the ubuntu package.
[18:47] ggg has joined the channel
[18:48] c4milo1 has joined the channel
[18:48] isaacs: savid: i'm saying that, while I'm sure that whoever put that package together had the best of intention, and is a clever a kind chap, and that I fully appreciate their interest, it wasn't me, and i can't vouch forit.
[18:48] isaacs: savid: so, if you come to me and say "How do I install npm?" I'm going to direct you to the instructions that I wrote in the npm readme file.
[18:48] ggg: i have a function(param1, param2) and my parameters dont seem to be deectable in my function...any clues why?
[18:48] isaacs: 0.2.19 is deprecatd, and no longer supported.
[18:48] isaacs: ggg: gist.
[18:49] isaacs: ggg: or pastie
[18:49] `3rdEden has joined the channel
[18:49] Pathin_ has joined the channel
[18:49] c4milo1 has joined the channel
[18:49] savid: isaacs, actually, I don't think whoever put that package together is very clever. It only includes nodejs docs. }:-|
[18:49] savid: so that pretty much answers my question :-P
[18:50] isaacs: savid: i usually try to assume positive intent and high intelligence in others.
[18:50] ggg: pastie?
[18:50] isaacs: savid: it leads to some disappointment, but mostly compassion and good feelings.
[18:50] Skola has joined the channel
[18:51] isaacs: ggg: http://gist.github.com client
[19:37] junkee[]: bnoordhuis: you think there is a bug in the build system?
[19:37] jameson has joined the channel
[19:37] micheil: however, we are working on ways to do full duplex, when it makes sense.
[19:37] aron_ has joined the channel
[19:38] xandrews has joined the channel
[19:39] Chani: so.. is there any fsync/fflush in node.js?
[19:40] Chani: I need to be absolutely completely sure that my fs.write calls are getting written before I continue
[19:40] Chani: (or, as sure as one can ever be in userland...)
[19:40] butu5 has joined the channel
[19:42] Pathin_ has joined the channel
[19:45] jhurliman has joined the channel
[19:46] jensn has joined the channel
[19:48] RC1140: hey guys having a issue with mongoose (the nodejs mongodb orm ) trying to do a regex search but it gives me the error ('Can\'t use $regex with String.') , i basically need to dynamically for text in a string
[19:49] mykul has joined the channel
[19:50] sethetter has joined the channel
[19:52] jetienne has joined the channel
[19:52] micheil: al3xnull: this is pretty much why we're used mainly for data-push: http://www.dabbleboard.com/draw?b=Guest730109&i=3&c=e9d6c746d72d98ce0e39dd54f4da91cde254d40f
[19:52] Pathin_ has joined the channel
[19:52] RC1140: heh as i type that message i get it working
[19:54] al3xnull: micheil: That's the normal setup?
[19:55] micheil: no
[19:55] micheil: the normal setup would be to have your browsers sending data to your server, then your server sending that to pusher for distribution
[19:55] sethetter has joined the channel
[19:55] micheil: so move step 1 to point to the server, and remove step 2
[19:56] al3xnull: Okay. That's what I thought.
[19:56] micheil: best shown by this lovely little diagram: http://pusher.com/stylesheets/images/hero_howitworks.png
[19:57] al3xnull: Ah. Yup. lol. Exactly what I was referring to.
[19:59] rfay has joined the channel
[19:59] jungly has joined the channel
[20:00] jamescarr: anyway to connect an express session up with socket.io>
[20:00] jamescarr: ?
[20:00] micheil: jamescarr: hmm.. not sure. I don't think you really have access to cookies and sessions from websockets and longpolling
[20:00] al3xnull: Just have to pass the express server to the socket.io instance no?
[20:01] jamescarr: oh really?
[20:01] jamescarr: lemme try ;)
[20:01] micheil: generally any authentication with realtime web tech is done on the first initialisation of the connection
[20:01] `3rdEden: jamescarr will be possible in socket.io 0.7.3
[20:01] jamescarr: oh
[20:01] `3rdEden: because we are going to store the headers + other data from the handshake + authentication
[20:02] micheil: `3rdEden: you don't store that already?
[20:02] jamescarr: micheil, yeah, I'm guessing I need to send a token back and forth each time
[20:02] micheil: node-websocket-server's been doing that for ages...
[20:02] `3rdEden: micheil nop, not yet
[20:02] micheil: (I'm just having a dig. ;P)
[20:02] `3rdEden: :'(
[20:02] Pathin_ has joined the channel
[20:02] micheil: `3rdEden: but anyway, the cookies are pretty much meaningless in this context
[20:03] `3rdEden: I just started fixing the unit tests for it jamescarr so I should land soon-ish
[20:03] `3rdEden: not really
[20:03] `3rdEden: as the cookie headers store the sesion id
[20:03] `3rdEden: of express sessions
[20:03] micheil: initial connection, and they have meaning, but after that, not really.
[20:03] patcito has joined the channel
[20:03] jamescarr: `3rdEden, sweet. I'll stop bugging so you can do it and commit it ;)
[20:03] jamescarr: cuz I need it :-P
[20:03] bosphorus has joined the channel
[20:03] `3rdEden: ;d
[20:03] micheil: but you don't always get cookie headers set from the client-side
[20:04] `3rdEden: micheil because?
[20:04] `3rdEden: Why not?
[20:04] micheil: jamescarr: I'd probably recommend sending it as a first message on the connection, rather than relying on the headers
[20:04] micheil: `3rdEden: the spec defines them as optional, last I recall
[20:04] `3rdEden: micheil we are not using the headers from the websocket connection or any other transport
[20:04] `3rdEden: but from the inital handshake
[20:05] `3rdEden: which is done with JSONP or xhr
[20:05] `3rdEden: and those does include the headers
[20:05] micheil: oh?
[20:05] micheil: I didn't realise socket.io needed that./
[20:05] `3rdEden: we using handshaking to allow or dissallow connections
[20:05] jamescarr: micheil, send the cookie on the first message?
[20:05] micheil: jamescarr: yeah
[20:05] jamescarr: micheil, thats actually a good idea... send as part of the start process
[20:06] `3rdEden: + its going to be used for protocol negotiations and other stuff
[20:07] gozala has joined the channel
[20:08] micheil: jamescarr / `3rdEden I don't actually have any statistics on browsers that send the cookie header in regards to the websocket connections.
[20:09] skawful has left the channel
[20:12] RC1140 has joined the channel
[20:13] hackband has joined the channel
[20:13] phused has joined the channel
[20:13] Pathin_ has joined the channel
[20:14] xeodox has joined the channel
[20:14] carpeliam has joined the channel
[20:15] Corren has joined the channel
[20:19] augustl: how do I upgrade npm itself?
[20:19] isaacs: augustl: same as instlaling it. after about 1.0.13, npm update npm -g works
[20:20] isaacs: augustl: but the curl | sh trick should always work
[20:20] isaacs: and always get you latest.
[20:20] augustl: cool, thanks
[20:20] carpeliam: is proxying from apache the recommended deployment method? what are most people doing to configure their deployment? i have some other apps that are just on apache
[20:20] jamescarr: socket.io has changes a bit since I last dabbled with it
[20:20] jamescarr: good stuff
[20:20] pkrumins: carpeliam: you dont need apache
[20:20] augustl: carpeliam: I tend to run node.js directly on port 80 or whatever
[20:20] pkrumins: carpeliam: just run node.js on port 80 directly. yes.
[20:20] chrisdickinson: isaacs: totally dumb question re: npm test; when it runs the provided package.json test command, will the commands from ./node_modules/.bin/* be available?
[20:21] pkrumins: unless you have multiple cpus
[20:21] carpeliam: augustl and pkrumins: but i have other apps on the box...
[20:21] isaacs: chrisdickinson: yes
[20:21] augustl: carpeliam: with that said, I haven't actually used node for websites, so I actually run on like 14723 or something
[20:21] chrisdickinson: isaacs: radical :) thanks.
[20:21] codeisforevea has joined the channel
[20:21] isaacs: np :)
[20:21] augustl: carpeliam: then you have to proxy, obviously
[20:21] pkrumins: then it makes sense to run node.js on ports like 8001 8002 8003 8004 (4 cpus) and set up equal probability routing via apache proxy
[20:21] pkrumins: round robin is the term.
[20:22] AvianFlu has joined the channel
[20:23] Pathin_ has joined the channel
[20:23] carpeliam: right now i'm proxying via apache but getting a 502 when working with websockets/socket.io so i was thinking there might be a better way, but i'll try to fix my 502 issue then
[20:23] socketio\test\17 has joined the channel
[20:24] tokumine_ has joined the channel
[20:24] micheil: I don't think it'd be wise to have apache sitting in front of node.js
[20:24] micheil: you'd loose a lot of the performance benefits at the network i/o level
[20:24] micheil: nginx is the better server to front node.js with
[20:25] carpeliam: micheil: i have apache serving up some other apps, is that doable?
[20:25] indexzero has joined the channel
[20:26] AvianFlu: apache gives a new thread to each new connection, which winds up with a bunch of overhead - overhead you'd otherwise largely escape by using node
[20:26] dgathright has joined the channel
[20:26] carpeliam: AvianFlu: i understand, but i'm serving up other non-node apps too
[20:27] augustl: carpeliam: alternatively, get more IPs ;)
[20:27] hij1nx has joined the channel
[20:27] augustl: but proxying should work fine too, unless you're doing HTTP stuff that Apache doesn't like of course
[20:27] blippedxd has joined the channel
[20:27] jbpros has joined the channel
[20:28] carpeliam: maybe i'll switch my other apps to nginx
[20:28] AvianFlu: yeah, the short answer would be to either separate them or live with what you've got, as long as it works
[20:28] AvianFlu: or switch to nginx if you don't have a specific need for apache
[20:29] hippich_away has joined the channel
[20:29] augustl: it's also technically possible to have node proxy to apache of course
[20:29] augustl: not sure how much of a bad idea that is
[20:29] AvianFlu: I have yet to hear a specific reason that it would be bad
[20:29] AvianFlu: seems like if you're listening on one port and your http parser isn't broken, you should be okay
[20:30] anatoo has joined the channel
[20:30] Nexxy: haproxy IMO
[20:32] augustl: looking for recommendations to a promise library
[20:32] augustl: currently not figuring out https://github.com/coolaj86/futures, specifically how to get the errors from a join() future.
[20:33] carpeliam: AvianFlu: i'm hearing from #socket.io that apache proxy doesn't proxy websocket requests
[20:33] AvianFlu: that doesn't surprise me at all
[20:33] augustl: me neither
[20:33] AvianFlu: so yeah, either get a new ip/port or ditch apache, would be my advice
[20:33] augustl: a new IP makes a lot of sense imo
[20:34] Pathin_ has joined the channel
[20:34] micheil has joined the channel
[20:34] augustl: most hosts lets you buy additional IPS for a VPS
[20:34] rhdoenges has joined the channel
[20:34] AvianFlu: also, http://github.com/nodejitsu/node-http-proxy can proxy websockets, if you aren't scurr'd to expose node :-P
[20:34] micheil: yeah, I'd recommend the node-http-proxy for that.
[20:35] fg3 has joined the channel
[20:35] d0k has joined the channel
[20:35] Chani: does node not have any way of ensuring that writes are flushed? :(
[20:35] AvianFlu: writes to where, chani?
[20:35] micheil: I think you can call flush()
[20:35] Chani: to the filesystem
[20:35] micheil: not sure
[20:35] Chani: micheil: no such function in the fs module
[20:36] micheil: hmm..
[20:36] boterham has joined the channel
[20:36] neurone-1337 has joined the channel
[20:36] AvianFlu: which fs function are you using
[20:36] necromancer has left the channel
[20:36] Chani: just to make it even more unreliable, I *bet* this assignment is gonna get tested on an NFS mount... >.<
[20:37] Chani: AvianFlu: fs.write*
[20:37] Chani: mostly the async. ones
[20:37] AvianFlu: try fs.createWriteStream
[20:37] AvianFlu: in my experience so far, node is more reliable when you use streams for stuff like that
[20:38] jdaltry has joined the channel
[20:38] Chani: AvianFlu: will that really give me a better guarantee than fs.close() ?
[20:38] blippedxd has joined the channel
[20:38] jamescarr: this feels like a dumb question... best way t access cookie on the client side? in express when I login I don't see anytyhing when I do a console.log(document.cookie)
[20:38] Chani: or fs.writeFile(), which doesn't require open/close..
[20:38] jamescarr: although the dev toolbar in chrome clearly tells me that there is one with the id connect.sid
[20:38] Chani: using createWriteStrame would make my code a fair bit more awkward
[20:39] AvianFlu: what makes you say that?
[20:39] AvianFlu: also, yes, fs.writeFile would be a good first try
[20:40] Chani: what makes me say what?
[20:40] bartt has joined the channel
[20:40] Chani: hmm, at least write streams have the 'drain' event...
[20:41] eldar has joined the channel
[20:41] AvianFlu: I would say, as general advice, get used to working with streams in node
[20:41] AvianFlu: they're everywhere
[20:42] fg3: how do you reset node so that it's ot waiting for events?
[20:42] fg3: err not waiting
[20:42] codeisforevea has left the channel
[20:42] Chani: AvianFlu: well, I already wrote the assignment with lots of writeFile
[20:42] AvianFlu: I mean, by all means keep your existing code if it works
[20:43] Chani: I'm not sure how to tell if *any* of this stuff will be reliable enough for the marker
[20:43] AvianFlu: I'm just saying it will benefit you to learn to use streams
[20:43] junkee[]: bnoordhuis: still here?
[20:44] Pathin_ has joined the channel
[20:45] davro has joined the channel
[20:50] Swizec has joined the channel
[20:50] Swizec: hey guys
[20:50] Aria: Jello!
[20:50] AvianFlu: sup swizec
[20:50] Swizec: quick question: is there a way to clear the event queue for an eventemitter?
[20:50] xeodox has joined the channel
[20:52] AvianFlu: what makes you want to clear it? i.e. what's going wrong for you
[20:52] swaj: weee, debian 6.0.2 was just released. Go update everyone :P
[20:52] AvianFlu: sweeeeeeeeeet
[20:53] swaj: http://www.debian.org/News/2011/20110625
[20:53] micheil: Swizec: there isn't exactly a queue
[20:53] micheil: the callbacks get fired as soon as emit() is called
[20:53] Swizec: I'm running tests and the "side effect" of a function is an event
[20:53] Swizec: since I'm not listening for the event in all tests
[20:54] Swizec: the wrong data tends to come through in the test where I'm actuallyt esting the event
[20:54] cafesofie has joined the channel
[20:54] AvianFlu: yeah, it isn't really set up the same as it is when you're making your own event loop and polling a queue
[20:54] zackattack has joined the channel
[20:54] AvianFlu: that stuff is all libev under-the-hood stuff from node's perspective
[20:54] Swizec: so what's the best approach to testing events?
[20:55] AvianFlu: can I see code?
[20:55] Swizec: just a sec
[20:55] AvianFlu: you should just be setting up listeners for the events you want to test
[20:55] AvianFlu: is the short answer, as far as I understand you
[20:55] rhdoenges: if the event is going to be triggered, you might as well test it.
[20:56] boogyman has joined the channel
[20:57] Pathin_ has joined the channel
[20:57] Swizec: the relevant code: https://gist.github.com/1046888
[20:58] Swizec: if I only run the one test then it works
[20:58] Swizec: so, I should just make sure I catch all the events and ignore them if they're not relevant to the test?
[20:59] AvianFlu: yeah, exactly
[20:59] AvianFlu: test each event by itself, unless you have a situation that involves a few in sequence or whatever
[21:00] AvianFlu: if you don't listen specifically, they just go away, most likely garbage collected down in v8 land somewhere
[21:00] tuhoojabotti: Is it possible to define a member to an object that is returned if no other match is made? :D
[21:00] Swizec: hmm .. think I ahve a cleaner solution
[21:00] Swizec: I can just recreate the emitter for every test in the setup function
[21:00] tuhoojabotti: like name:lol, age:lol, *:not_found
[21:01] jtsnow has joined the channel
[21:01] AvianFlu: swizec: that sounds interesting, I'd like to see an example of what you mean specifically
[21:01] chrisdickinson: tuhoojabotti: you might be looking for the switch statement in that case
[21:01] Swizec: AvianFlu actually, I have a hunch it won't work
[21:02] tuhoojabotti: mm-m
[21:02] chrisdickinson: or use node-proxy to define a proxy object that implements a trap for any property access
[21:02] Swizec: yep, didn't work
[21:02] AvianFlu: yeah lol it sounded overcomplicated
[21:02] Swizec: no wait, another idea :D
[21:03] AvianFlu: EventEmitter2 has wildcard events
[21:03] AvianFlu: you could always go that road :)
[21:05] neurone-1337 has joined the channel
[21:07] Pathin_ has joined the channel
[21:08] mhooks has joined the channel
[21:09] mhooks: Howdy, I'm new to node, I had some successes working locally on OSX and have been trying to deploy an example project on ubuntu. I appear to be having this problem.
[21:09] mhooks: https://gist.github.com/973870
[21:09] mhooks: mongodb is failing pretty much anything I'm trying to do. I'm trying to just set up an example blog with railway.
[21:10] mhooks: but mongo has this can't do install.sh issue.
[21:10] aredridel has joined the channel
[21:10] mhooks: I'm pretty sure I'm using 0.4.8, but I'm unsure of how to pull the version from the console to make sure.
[21:10] mhooks: Thanks in advance for any help at all.
[21:10] AvianFlu: node -v
[21:11] mhooks: hah
[21:11] mhooks: awesome
[21:11] mhooks: shit, it's totally a node 5 problem. I'm such a clown.
[21:11] mhooks: sorry, I'll lurk for a while, see if I can learn a thing or two.
[21:13] AvianFlu: accidentally using the 0.5.x branch is probably the most common issue at the moment, don't feel bad :-P
[21:13] Aria: It really is.
[21:13] Aria: Needs a big fat warning: "WARNING: use node v0.4.8 unless you're trying to test the new experimental integration of libuv"
[21:14] mhooks has joined the channel
[21:15] dibber has joined the channel
[21:16] dibber_ has joined the channel
[21:17] Pathin_ has joined the channel
[21:17] dibber has joined the channel
[21:22] coreb: in package.json, is it possible to specify that a dependency should be installed globally?
[21:23] Nexxy: mhooks, I did that too! ;3
[21:24] Nexxy: has anyone played with socketstream?
[21:25] AvianFlu: coreb: it's possible to specify that an individual package prefers a global install
[21:25] kkaefer: coreb: global: true
[21:26] Pathin_ has joined the channel
[21:28] junkee[]: I need help with sockets in libev.
[21:30] mrmanager has joined the channel
[21:30] jacekp has joined the channel
[21:32] coreb: AvianFlu, kkaefer; I mean one of the dependencies
[21:32] balaa has joined the channel
[21:33] wolfeidau has left the channel
[21:36] Nuck has joined the channel
[21:36] niftylettuce has joined the channel
[21:36] Pathin_ has joined the channel
[21:39] Chani: ACTION is tempted to add fsync support to the fs module, now
[21:39] Chani: unfortunately, I'm not sure I'll have time.
[21:39] Chani: ah well. we'll see.
[21:44] Aria: Shouldn't be too hard.
[21:45] devuo has joined the channel
[21:46] Pathin_ has joined the channel
[21:46] Nuck: Aria: Neither should I :P
[21:46] jhurliman has joined the channel
[21:47] Aria: Hah.
[21:47] LiamMagee has joined the channel
[21:48] mykul has joined the channel
[21:48] AvianFlu: coreb: it would be up to the individual dependency at this point
[21:49] quackquack: When configuring an express server, what is "app.use app.router"
[21:49] quackquack: Sorry, "app.use(app.router)"
[21:49] Aria: That adds the router middleware.
[21:49] Aria: Which is what actually handles path-based routing.
[21:49] Aria: (nice that it's optional)
[21:50] quackquack: Is it necessary? i am comparing two server files, and i cant tell what it is changing
[21:50] quackquack: ah, its optional
[21:50] quackquack: ty!
[21:50] andrewfff has joined the channel
[21:51] Aria: Sure thing. It's needed if you use the feature, but it's not universally needed.
[21:51] chjj: its actually not needed if you use the feature, it will be implicitly added to the stack
[21:52] boogyman has joined the channel
[21:55] Pathin_ has joined the channel
[21:56] robi42 has joined the channel
[21:56] darshanshankar has joined the channel
[21:58] sridatta has joined the channel
[22:01] catshirt: hi all, can anyoe explain to me why express's bodyParser (or JSON.stringify) is adding a key in my model?
[22:01] catshirt: http://pastebin.com/cbh2Si2v
[22:01] jacekp has joined the channel
[22:02] catshirt: particularly, {"points":{"0":["-32.966336103066496"
[22:02] catshirt: shouldn't have that 0 index
[22:02] bnoordhuis: Chani: fs.fsync() already exists
[22:02] adam- has joined the channel
[22:03] sorensen: they are array indexes
[22:04] catshirt: but it seems to add an index to points
[22:04] Aria: Yeah, it should come out as "points":[ not "points":{"0":
[22:04] sorensen: ah i see now
[22:04] catshirt: yeah the array indexes after that are fine, just that one leading 0 is weird
[22:05] Aria: Yeah, subtle. I don't know Coffeescript well enough to comment on that quirk.
[22:06] Pathin_ has joined the channel
[22:06] thejh: catshirt: which coffee version are you using? type "coffee -v"
[22:06] catshirt: ah yeah, didnt even consider its cs
[22:06] catshirt: so actually... this would be from coffee-script client right?
[22:06] catshirt: in which case its the coffee-script client version
[22:06] catshirt: thejh: particularly, v1.1.1
[22:07] Nuck: ewwwwww cs
[22:07] thejh: catshirt: I don't know - the version I'm using doesn't have such a bug, but maybe an older one does have it
[22:08] mdeboard has joined the channel
[22:08] chrisdickinson: catshirt: i think that might be jquery at work, actually
[22:08] mhooks has joined the channel
[22:09] chrisdickinson: it's probably trying to do a for(var name in post_data_argument) sort of thing.
[22:09] thejh: catshirt: there's no such bug in v1.1.1
[22:09] chrisdickinson: thejh: i
[22:09] chrisdickinson: *i'm 90% sure it's jquery.
[22:09] catshirt: yeah... it looks like cs is creating the object fine, but server is getting response.body wonky
[22:09] catshirt: i agree, def seems like jquery... good catch
[22:10] zackattack has joined the channel
[22:11] mrmanager has joined the channel
[22:11] empt has joined the channel
[22:11] Nuck: Seomebody tlk to #jquery?
[22:12] empt has left the channel
[22:12] empt has joined the channel
[22:12] mdeboard: Hi. So I'm hacking on node.js for the first time, and everything is going swimmingly except for CSS requests. The html loads, everything else on the page works (including streaming audio from a different directory), but the CSS rules are not applied. Here is the html head: http://dpaste.com/559095/ ... here is the node server: http://dpaste.com/559096/ and the CSS is garden variety (and very basc) css (i.e. body { fo
[22:12] mdeboard: nt-family: helvetica, arial, tahoma; } etc.). Can anyone either point me in the direction of relevant reading or tell me where I'm going wrong here?
[22:12] Nuck: Ugh, decisions, decisions. Gotta decide what thing to code today :D
[22:12] mhooks has joined the channel
[22:13] mdeboard: Oh, and if I view source on the page, and click the link for the CSS file, it opens and reads the file just fine.
[22:13] mdeboard: as in, prints the content. It's so trivial I hate to waste any time with CSS but..
[22:16] Pathin_ has joined the channel
[22:16] saschagehlich has joined the channel
[22:18] Aria: Is the CSS coming back with the wrong content-type?
[22:18] Aria: I'd think that's your problem, with the hard-coded text/html in there.
[22:19] mdeboard: Hm you know, I bet you're rght!
[22:19] Nuck: Aria: Ah, nice catch. That sounds likely.
[22:19] mdeboard: cool, let me flip that around thne.
[22:20] chrisdickinson: Nuck: (belatedly) I'm pretty sure that jquery is doing the right thing in that situation
[22:20] mdeboard: Aria: Copied some code from a websitewthout thinking, it even has the contentType variable right there
[22:20] chrisdickinson: since post data is supposed to be key-value.
[22:20] mdeboard: ACTION rolls his eyes at himself
[22:21] rhdoenges: that was pretty clever, mdeboard
[22:21] Chani: bnoordhuis: it does? it's not in the docs!
[22:21] rhdoenges: that way you said "flip that around thne"
[22:21] bnoordhuis: Chani: that's not unheard of :-/
[22:22] mdeboard: rhdoenges: thanks :P
[22:22] rhdoenges: :)
[22:22] Chani: ahh, I see it on the git repo...
[22:23] Chani: ...and in hte released version too!
[22:23] Chani: sneaky
[22:23] Chani: bnoordhuis: thanks :)
[22:23] Chani: someone ought to fix those docs.
[22:23] bnoordhuis: Chani: if you feel like writing the docs for it, documentation patches are always welcome
[22:24] Chani: ACTION puts that on the todolist
[22:24] Chani: if I get bored, amybe I will :)
[22:25] Chani: now if only I'd written down the other documentation holes I've seen..
[22:25] Chani: ooh, I did :)
[22:26] rhdoenges: get forkin', Chani!
[22:26] Pathin_ has joined the channel
[22:26] Chani: hehe
[22:26] Chani: well, I *was* complaining about being bored this morning...
[22:26] Chani: but I'm getting homework done now. so i'll keep doing that until I get sick of it
[22:27] bnoordhuis: Chani: belay that remark, fsync() is documented - only the documentation isn't online yet
[22:27] Chani: oh
[22:27] Chani: heh
[22:27] Swimming_bird has joined the channel
[22:27] rhdoenges: is the node manpage going to be restored to its former glory, if ever?
[22:27] Chani: mmm, man pages
[22:27] Chani: rhdoenges: what does that mean?
[22:28] rhdoenges: the old manpage had the entire api in it.
[22:28] rhdoenges: all the docs, one `man node` away.
[22:28] rhdoenges: now I gotta, like, use the internet or something.
[22:28] mrmanager has joined the channel
[22:28] bnoordhuis: rhdoenges: that page used to crash my n900's browser
[22:29] brolin has joined the channel
[22:29] Aria: I should write a good manpage set for node, see if I can't parse the docs out.
[22:29] Horofox has joined the channel
[22:30] sstephenson: Aria: that'd be great
[22:30] mdeboard: Aria: God that would be amazing
[22:30] mdeboard: *cough*
[22:30] rhdoenges: Aria: try ronn.js
[22:30] chrisdickinson: Aria: bonus points if you abstract what you use to generate the manpage out to be applicable to any node project with a docs directory.
[22:30] Chani: hmm
[22:30] Aria: ++
[22:30] rhdoenges: I put in a pull request a while ago doing just that, but the way I did it was convoluted and hideous and involved sed.
[22:30] Chani: it would be nice to have manpages for each node module.
[22:31] chrisdickinson: so like, `man node-postgres Query`
[22:31] rhdoenges: so it didn't fly :)
[22:31] rhdoenges: similar to perldoc, maybe, so it doesn't clutter up the man namespace
[22:31] rhdoenges: nodedoc
[22:31] Chani: it'd make more sense to me than one giant page :)
[22:31] chrisdickinson: rhdoenges: or maybe a `npm doc` command
[22:31] Aria: Yeah. Or man node-postgres-Query
[22:31] Aria: Since man doesn't have an extensible idea of sections.
[22:31] rhdoenges: ooh that would be snazzy
[22:31] chrisdickinson: Aria: i kind of like the above ^: npm doc someproject somesubdocument
[22:31] Aria: Yeah. npm might be a better place for it.
[22:32] chrisdickinson: oooh
[22:32] JoshC1 has joined the channel
[22:32] chrisdickinson: and, `npm doc someproject --serve` could run a local, gollum-like server for the docs.
[22:32] rhdoenges: chrisdickinson: npm docs exists whoa
[22:33] chrisdickinson: rhdoenges: awesome.
[22:33] rhdoenges: oh but it only points you to their website automatically.
[22:33] sstephenson: tcl uses a man section ("n") for its stdlib docs
[22:33] rhdoenges: bummer
[22:33] chrisdickinson: boo
[22:33] sstephenson: e.g. man n lindex
[22:33] chrisdickinson: i'd love a local documentation command for npm.
[22:34] Aria: Me too. Though I'm more into man than I am a docserver.
[22:34] Aria: (which is weird since I like nice type, but it's just so nice to have good search in-page)
[22:34] chrisdickinson: Aria: i'd probably use the man more, myself. but for discovery it'd rock
[22:34] Aria: Yeah.
[22:35] Aria: It'd be nice to keep the dependencies minimal or optional, though -- I wonder how extensions to npm would work. I've not looked into how isaac has done that.
[22:35] chrisdickinson: i'd also give a pretty penny to whoever makes docstrings exist/not suck.
[22:35] Chani: docstrings?
[22:35] Aria: Heh. Not sure I'm a fan of docstrins.
[22:35] chrisdickinson: Chani: from python. in python, any unassigned string directly under the function declaration becomes the docstring.
[22:35] Aria: Though I also hate most phpdoc type docs.
[22:35] lmorchard has joined the channel
[22:36] Chani: ahh.
[22:36] chrisdickinson: so in REPLs, you can type "myfunc?" and get a nice description of the module and how it works.
[22:36] catshirt: chrisdickinson: know what, i actually think that json issue is mongoose, check this: http://pastebin.com/LRbLCssE
[22:36] catshirt: fence is a mongoose/mongo object
[22:36] Chani: ACTION is used to javadoc style.
[22:36] Pathin_ has joined the channel
[22:36] Aria: I'm such a fan of readme-driven development that I really like my docs a little more cared-for.
[22:36] Aria: Also, Javascript's structure makes parsing such things intelligently hard.
[22:36] chrisdickinson: catshirt: try [].slice.call(params.points) -- it may transform it into an honest-for-true array object.
[22:36] Chani: Aria: metoo
[22:37] chrisdickinson: Aria: coming from a python background, i don't see a huge resemblance between phpdoc/javadoc and python docstrings.
[22:37] catshirt: chrisdickinson: actually seeing just [ ] for fence.points now
[22:37] Aria: Both rely on the parsing of structure.
[22:37] Mrfloyd has joined the channel
[22:37] chrisdickinson: Aria: granted.
[22:37] Aria: python's is easy and obvious. No closures, nothing weird.
[22:38] xerox: well since you are talking about docs
[22:38] xerox: http://i.imgur.com/Vr1ke.png
[22:38] xerox: this is from npm help folders
[22:38] Aria: Javascript's ... how do you handle (return function Foo() { this.bar = function bar() { } })() ?
[22:38] Aria: Yes indeed.
[22:38] chrisdickinson: Aria: it's certainly possible in JavaScript by parsing function strings. But i'd rather have (function(){}).__doc__ = 'docstring'; syntax.
[22:38] Aria: Besides, the good docs read more like an intro book with expanded reference than they do an aPI overview.
[22:38] Aria: Heh. Oy.
[22:39] chrisdickinson: They go hand in hand, really. Documentation should cover in depth. Docstrings should cover exactly what the function does -- sort of a view of how you would directly use the function -- not much more.
[22:40] chrisdickinson: Aria: on the other hand, Docco and friends are more embraced in the node community than python, and that fulfills a bit of the same idea of docstrings.
[22:40] Aria: Hm.
[22:40] chrisdickinson: Generally, they make working within the repl completely self-sufficient. That's the win of docstrings.
[22:40] Aria: ACTION nods.
[22:40] Aria: That's a definite plus.
[22:40] blup has joined the channel
[22:41] chrisdickinson: Aria: with substack's node-burrito out, it may not be hard to create a docstring parser that doesn't suck.
[22:41] jakehow has joined the channel
[22:41] chrisdickinson: Include it at top-level in the repl (with a flag, maybe?), and parse requires using the docstring parser to automatically assign docstrings to functions. Then return the resultant code.
[22:41] Aria: Hm.
[22:42] tbranyen: node-burrito? are devs running out of names?
[22:42] Aria: Still seems like a lot on top of the stack.
[22:42] AvianFlu: don't knock the substack
[22:42] catshirt: chrisdickinson: a little more weirdness... ? http://pastebin.com/NjBa5ZsV
[22:42] chrisdickinson: tbranyen: no, devs are just getting started on delicious names.
[22:42] AvianFlu: http://github.com/substack/node-burrito
[22:42] tbranyen: i had a burrito two days ago, it owned
[22:42] Aria: I kinda like docco's style /because/ it tries to be dumb.
[22:43] Aria: Let the programmer organize the code to make good docs, don't try to make good docs out of whatever shit comes out of the fan.
[22:43] catshirt: chrisdickinson: seems like slice wont treat points like an array either or something
[22:43] tbranyen: I'm working on some github wiki style documentation atm, especially like how you can clone the repo and work locally
[22:43] chrisdickinson: tbranyen: (automatically) jealous
[22:44] chrisdickinson: catshirt: in that case, try (out = []; for var i = 0; params.points[i]; ++i) out.push(params.points[i]); return out;) as a function to turn the object into an array.
[22:44] tbranyen: Been thinking about inline vs separate files for documentation, and i'm not so sure i dig inline... i really like header files tho
[22:44] adrianmg has joined the channel
[22:45] tbranyen: catshirt: did you try concat?
[22:45] chrisdickinson: Aria: i see two sides to docco -- on the one hand, it creates nice descriptions of your function in terms of "what" and possibly "why", not "how" it should be used.
[22:45] Aria: Yeah, though that, too, can be documented. It just doesn't try to magically help.
[22:45] catshirt: tbranyen: concat just sticks the object into an array
[22:45] tbranyen: catshirt: oh give it a length
[22:46] tbranyen: if you can
[22:46] catshirt: ah..
[22:46] tbranyen: to make it array-like
[22:46] chrisdickinson: Aria: true! but nothing short of inline docstrings can give you a really nice repl experience.
[22:46] Pathin_ has joined the channel
[22:46] Aria: True that. I'd not mind an addon for the repl that does more parsing. But it just seems brittle.
[22:47] chrisdickinson: Aria: I like the idea that a repl replaces the default require extension hook for JS, installs node-burrito, and hands you back docstrings when you type "? someexpr" in the repl.
[22:47] Aria: ACTION nods.
[22:47] Aria: I'd like it as a not-default.
[22:47] Aria: repl --docs
[22:48] adrianmg: hi guys
[22:48] Aria: I love that node's code is really so small.
[22:48] chrisdickinson: Aria: or as a separate repl entirely, a la ipython (vs. std python)
[22:48] Aria: YEah.
[22:48] Aria: node-featureful-repl
[22:48] AvianFlu: repl-for-noobs
[22:48] chrisdickinson: really, though, it requires the entire community to decide how it'd like to do docstrings -- or that it would like to do docstrings at all -- for something like that to be useful.
[22:48] AvianFlu: lol
[22:48] tbranyen: oh man best shortcut ever, ctrl alt n = urxvt - e node instant node repl :3
[22:49] tbranyen: if only i had a meta key
[22:49] tyler-iphone: bnoordhuis: is there documentation on how to have npm download the c++ dependency tarball, configure and install it so my extenion can run?
[22:49] chrisdickinson: maybe that means assigning __doc__ to functions, or maybe it means adding the documentation in a noop-string at the top of the function.
[22:49] chrisdickinson: but i'd love for it to get adopted.
[22:50] _jgr has joined the channel
[22:50] bnoordhuis: tyler-iphone: i don't think so but look at how node-iconv does it
[22:50] tbranyen: oh shit _fat_ was in here
[22:50] tyler-iphone: bnoordhuis: what file is that in?
[22:50] bnoordhuis: tyler-iphone: makefile and wscript
[22:50] tyler-iphone: bnoordhuis: thnx
[22:51] tbranyen: there is documentation in the manpage for npm
[22:51] tbranyen: there is a scripts section with preinstall and install commands
[22:51] bnoordhuis: tyler-iphone: got to warn you though, it's a hack to work around npm
[22:52] tyler-iphone: bnoordhuis: not surprisingly
[22:52] catshirt: chrisdickinson: http://pastebin.com/x8FN2Y6w dude am i crazy or something? what
[22:52] tyler-iphone: tbranyen: thnx
[22:52] catshirt: says its an object, i can access it via index[0] etc, cant loop through indexes though?
[22:52] tbranyen: catshirt: why didn't you just add a length to it?
[22:53] tbranyen: like i said
[22:53] catshirt: any length?
[22:53] chrisdickinson: catshirt: that's coffeescript for ya. for key of params.points / not for key in params.points
[22:53] catshirt: oooo
[22:53] tbranyen: catshirt: params.points.length = Object.keys(params.points).length
[22:53] tbranyen: then coerce it with slice
[22:53] tbranyen: bam array of arrays
[22:53] tbranyen: easy as shit and no looping needed
[22:54] catshirt: ah, almost there...
[22:54] catshirt: seems like slice is concatting subarrays though
[22:54] tbranyen: not in my testing
[22:56] tbranyen: catshirt: http://sharefilewith.me/u/b87f6f.png
[22:56] catshirt: tbranyen: http://pastebin.com/SevDzhq9 anything obvious?
[22:56] Pathin_ has joined the channel
[22:56] Swizec: what's the best way to execute a function at a specified time?
[22:56] Swizec: or to have an event triggered at time X?
[22:56] tbranyen: are you using coffeescript catshirt ?
[22:56] catshirt: indeed
[22:57] tbranyen: well i can't really help you with that sorry
[22:57] tbranyen: who knows what the hell its doing
[22:57] catshirt: haha
[22:57] AvianFlu: swizec: what makes time x be time x
[22:57] chrisdickinson: haha
[22:57] chrisdickinson: i do!
[22:57] catshirt: so close ^_^
[22:57] Swizec: AvianFlu external parameter, it's an expiry date on something
[22:57] Aria: Swizec: If the process will stay running, calculate seconds and setTimeout; if not, cron.
[22:58] Swizec: it will stay running
[22:58] Swizec: but that doesn't feel reliable enough
[22:58] chrisdickinson: catshirt: (params.points[key] for key of params.points) will turn it into an array
[22:58] Swizec: furthermore it could be split into many processes
[22:58] Swizec: on different machines etc.
[22:58] tbranyen: chrisdickinson: why can't he just coerce it with the two lines of normal javascript
[22:58] tbranyen: looping is unnecessary
[22:58] AvianFlu: mark the time with a date/time object and check it periodically then
[22:58] tbranyen: is this a limitation with coffeescript or something?
[22:58] chrisdickinson: tbranyen: no, it's necessary. Object.keys loops.
[22:59] tbranyen: chrisdickinson: with native code
[22:59] chrisdickinson: tbranyen: ...hopefully.
[22:59] tbranyen: ... this is node not client side
[22:59] Swizec: AvianFlu yeah polling might be the answer, still, I'd like to find something better :P
[22:59] avalanche123 has joined the channel
[22:59] tbranyen: also chrisdickinson your solution would iterate prototype'd properties and is inherently slower
[22:59] tbranyen: and is more code
[22:59] tbranyen: than two lines...
[23:00] catshirt: omg. wtf
[23:00] chrisdickinson: tbranyen: but the Object.keys(obj).length thing didn't work.
[23:00] chrisdickinson: or did it?
[23:00] chrisdickinson: ACTION eats his hat.
[23:00] tbranyen: it does in javascript
[23:00] tbranyen: the language of gods
[23:00] tbranyen: not coffeescript the language of confused pedestrians
[23:00] chrisdickinson: ergh.
[23:01] catshirt: what is this madness? http://pastebin.com/YbEQKdTA
[23:01] tbranyen: just kidding, but seriously, why won't it work right in coffeescript
[23:01] mdeboard: node is worth its weight in gold if for nothing else other than a freaking javascript repl
[23:01] catshirt: seems like now mongoose is flattening the array like .slice was before
[23:01] AvianFlu: swizec: so go make node-cron
[23:01] AvianFlu: cron but for events
[23:01] AvianFlu: instead of shell commands
[23:02] dgathright has joined the channel
[23:02] Swizec: hmm
[23:02] Swizec: no no, this is a feature for a task queue of some sort
[23:02] Swizec: what's the most popular task queue implementation?
[23:02] catshirt: chrisdickinson tbranyen: tell me to go away if i start to annoy you :) feel like im missing something obvious but also feel a little crazy at this point
[23:03] Swizec: at least I'm pretty certain firing inter-server (not only process) events could be a bit tricky
[23:03] tmpvar has joined the channel
[23:03] chrisdickinson: catshirt: it looks like fence.points is outputting the right thing, though.
[23:04] catshirt: fence.points looks like a flat array of 6 items?
[23:04] catshirt: whereas out was an array, of 3 arrays of size 2
[23:04] chrisdickinson: oh.
[23:04] chrisdickinson: of length 3, each object of size 2.
[23:05] tbranyen: catshirt: i don't know coffeescript i know javascript i can't really help
[23:05] catshirt: right- but before when i tried to [].slice method, it flattened it into array length 6...
[23:05] catshirt: and now, when i pass converted array into mongoose, it also flattens it
[23:05] catshirt: tbranyen not a problem, thanks kindly, did learn a bit :}
[23:06] chrisdickinson: catshirt: console.error Object.keys param.points
[23:06] chrisdickinson: would be nice to see the initial structure.
[23:06] Pathin_ has joined the channel
[23:06] chrisdickinson: tbranyen: coffeescript (generally) does what you'd expect.
[23:06] catshirt: chrisdickinson: [ '0', '1', '2', '3' ]
[23:06] tbranyen: chrisdickinson: well apparently not in this case
[23:07] tbranyen: as i already linked to a fully working example in js
[23:07] rhdoenges: if you're really confused do `coffee -c file` and look at the js output. CoffeeScript has its limitations.
[23:07] chrisdickinson: tbranyen: hence the "(generally)" :)
[23:07] rhdoenges: I actually just moved a project onto js because coffeescript was driving me mad
[23:07] rhdoenges: and it is much nicer.
[23:07] chrisdickinson: rhdoenges: i've really not had that many problems with coffeescript.
[23:08] catshirt: is it definitely coffeescript here? not mongoose? i mean i know im just assigning as a property of the mongoose object.. so my hunch is no...
[23:08] chrisdickinson: the biggest problem i've had is that... well,
[23:08] tbranyen: catshirt: testing the output for me
[23:08] tbranyen: with coffeescript
[23:08] tbranyen: first time using it
[23:08] chrisdickinson: i already get looked down at by the local python devs for using javascript. then i get looked down upon by the javascript devs for using coffeescript.
[23:09] chrisdickinson: (i really would've thought the javascript community would've been nicer to coffeescript based on it's own experience, being treated as a "toy language")
[23:09] Chani: ACTION looks down upon people who look down upon others for their choice of technology :P
[23:09] catshirt: http://pastebin.com/re1mMwx5 here is a super simple example of the failure at hand... again, fence is mongoose object, if that matters
[23:09] ryantm has joined the channel
[23:10] chrisdickinson: catshirt: i'm not getting the same result from my coffee repl
[23:11] springify has joined the channel
[23:11] bnoordhuis: chrisdickinson: tell your python devs that we c programmers in turn look down on them
[23:11] chrisdickinson: bnoordhuis: everyone looks up to c devs.
[23:11] catshirt: ah, crao
[23:11] bnoordhuis: chrisdickinson: except kernel devs :-/
[23:11] Chani: chrisdickinson: except the assembly programmers :)
[23:11] bnoordhuis: precisely :)
[23:11] tbranyen: catshirt: http://sharefilewith.me/u/85ad8b.png
[23:12] Chani: hehe
[23:12] _marks has joined the channel
[23:12] tbranyen: looks like coffeescript works fine
[23:12] catshirt: yeah i think its just because i didnt JSON.stirngify the output
[23:12] catshirt: of fence.points
[23:12] Aria: (Yeah. But it's weird since coffeescript tends to be a little parasitic, being seen as 'sugar' on the existing language.)
[23:12] chrisdickinson: and in turn, mathematicians looks down on asm devs.
[23:12] catshirt: when i stringify, i see the inner arrays
[23:12] catshirt: d'oh
[23:12] Aria: (But honestly? I'm willing to treat coffeescript as javascript as long as I don't have to learn it or deal with an indentation based language.)
[23:12] catshirt: :{
[23:12] tbranyen: chrisdickinson: coffeescript is safe another day
[23:13] chrisdickinson: tbranyen: having decided to give coffeescript a try for my next big project, i'm glad.
[23:13] sharkbird has joined the channel
[23:13] tbranyen: haha
[23:13] catshirt: w00t got it, pasting result in a second... just logging error on my part
[23:13] chrisdickinson: believe me, i was a doubting thomas re: coffeescript, but having used it for a bit now... it's really nice.
[23:13] rhdoenges: coffeescript confuses me because it is indentation based, like python, but it tries to be like ruby
[23:14] rhdoenges: and I get confused :)
[23:14] catshirt: chrisdickinson tbranyen http://pastebin.com/1rLytRM7
[23:14] chrisdickinson: rhdoenges: it turned me off because it's indentation based, without the strictness of python.
[23:14] rhdoenges: that's exactly it.
[23:14] rhdoenges: I want to put colons at the end of my lines! is that too much to ask?
[23:14] catshirt: so, the initial problem is the weird key index, but the second issue was just logging negligence on my part
[23:15] chrisdickinson: rhdoenges: in general, i agree with you.
[23:15] chrisdickinson: coffeescript allows some weird shit.
[23:15] Pathin_ has joined the channel
[23:15] rhdoenges: coffeescript IS neat, though.
[23:16] chrisdickinson: i just wish it didn't automatically condemn projects written in it to obscurity.
[23:16] tbranyen: i guess if it gets ruby and python devs into node it can't be all that bad
[23:16] Prometheus: if it gets them to javascript, that'd be a first ;)
[23:16] tbranyen: chrisdickinson: heh i won't use this b+ tree implementation because its coffeescript
[23:16] Prometheus: ACTION is a pythonista, poking around with node
[23:16] Nexxy: O_o
[23:16] Nexxy: getting ruby devs into things is always a bad idea
[23:17] Corren has joined the channel
[23:17] tbranyen: nah rails devs are the bad ones, ruby devs make some cool shit
[23:17] Prometheus: Nexxy: I thought most node.js folk were ex-rails folk? ;)
[23:17] Prometheus: they like to pick up trendy stuff
[23:17] chrisdickinson: tbranyen: i'm putting the finishing touches on an ORM for node-postgres/sqlite3 and i'm worried that it'll be panned because it's in coffeescript
[23:17] Nexxy: "most" ?
[23:17] Prometheus: okay, not most
[23:17] Prometheus: but some :)
[23:17] chrisdickinson: and then, you know, because it's an orm.
[23:17] Nexxy: node.js is much more than trendy
[23:17] CodyGray has joined the channel
[23:17] Prometheus: Nexxy: oh I know, I'm just saying, that's part of the reason they jump ship :)
[23:17] tbranyen: chrisdickinson: orms are cool, i've been working on a really basic git powered one
[23:17] Prometheus: it's gotten popular lately
[23:17] chrisdickinson: Prometheus: i'm originally a pythonista too :) i miss catching exceptions based on type.
[23:17] Prometheus: (which is a good thing btw, I like node)
[23:18] chrisdickinson: tbranyen: cool!
[23:18] chrisdickinson: i've got a weird, native-js git implementation i've been poking around with
[23:18] Prometheus: chrisdickinson: cool, liking node then? :)
[23:18] Prometheus: (besides the exceptions)
[23:18] chrisdickinson: Prometheus: oh yeah. i've used it for about a year now. :)
[23:18] tbranyen: chrisdickinson: https://github.com/tbranyen/tabdeveloper.com/blob/master/lib/git-engine/index.js
[23:18] tbranyen: no comments or documentation yet and i still need to break it out
[23:18] catshirt: awesome i am set, thank you so much guys... as you were :)
[23:19] chrisdickinson: tbranyen: this (probably) doesn't work anymore, but https://github.com/chrisdickinson/tempisfugit
[23:19] tbranyen: chrisdickinson: oh awesome
[23:19] tbranyen: your api is very similar to my own
[23:20] chrisdickinson: Prometheus: i work at mediaphormedia, birthplace of django, so my node.js evangelism doesn't fly as much as i wished it would :P
[23:20] tbranyen: oh shit you even implemented custom odbs
[23:20] tbranyen: thas awesome
[23:20] chrisdickinson: tbranyen: thanks :)
[23:20] Prometheus: chrisdickinson: ah, cool, I know media :)
[23:20] Prometheus: being a djangonaut myself
[23:20] tbranyen: chrisdickinson: oh really? i used django on my last project
[23:21] chrisdickinson: tbranyen: awesome!
[23:21] tbranyen: learned a lot of important lessons
[23:21] tbranyen: 1 being don't use django in a project that ends up escaping the scope of what django can do
[23:21] chrisdickinson: i was really hoping to get an in-browser git implementation working; but that requires a working deflate/inflate impl in browser.
[23:21] Prometheus: tbranyen: please do remember that django is just python, so.. ;)
[23:21] tbranyen: chrisdickinson: hmmm doesn't chrome have some need crypto stuff now?
[23:22] tbranyen: Prometheus: ummm yeah and thats a pretty huge fault
[23:22] chrisdickinson: tbranyen: the big problem is inflate/deflate
[23:22] tbranyen: wanna patch the admin? good luck duplicating like 10 classes
[23:22] chrisdickinson: i had pieces of a native js zlib implementation, but blegh. zlib deflate is one giant C switch statement that's a billion lines long
[23:22] Murvin has joined the channel
[23:22] Prometheus: tbranyen: well, I guess it depends on what you are doing, but that's probably a discussions for a different channel :)
[23:22] Prometheus: discussion*
[23:23] tbranyen: chrisdickinson: hmm looks like chrome's crypto stuff is lacking atm, a native deflate method would be tits
[23:24] chrisdickinson: tbranyen: you know, i went as far as to try and fake png files in chrome
[23:24] catshirt: a HA
[23:24] catshirt: just a hypothesis , but i bet i know the original issue
[23:24] catshirt: and can fix without the hacks
[23:24] tbranyen: man client side git would be sick
[23:24] dyer has joined the channel
[23:24] dyer has joined the channel
[23:24] chrisdickinson: tbranyen: agreed.
[23:24] tbranyen: drop a repo in with html5 and read it
[23:24] catshirt: jquery sends the post data by turning the array into an object with number indexes (duh)
[23:24] catshirt: but i have mongoose schema configured to accept an array as points
[23:25] catshirt: so my guess is mongoose is getting the object, and saying hey wait schema is an array
[23:25] catshirt: and just shoving the object into an array
[23:25] chrisdickinson: tbranyen: it's one of those things where you can't predict the utility of what having it around would be, but you know it would enable some really cool shit.
[23:25] Pathin_ has joined the channel
[23:25] tbranyen: chrisdickinson: really cool live visualizations
[23:25] chrisdickinson: tbranyen: really good in-browser IDEs
[23:26] jesusabdullah: I want to get into interactive installation pieces, I think
[23:26] tbranyen: true that
[23:26] jesusabdullah: I was just at an art museum, and the fact that you cqan't touch anything drives me nuts
[23:26] chrisdickinson: tbranyen: package management that could speak the git wire protocol
[23:27] catshirt: chrisdickinson: https://github.com/oampo/Audiolet
[23:27] catshirt: just along the lines of... future cool shit
[23:27] catshirt: pretty much full feature synth
[23:27] chrisdickinson: tbranyen: sqlite-backed gitolite-like repositories.
[23:27] catshirt: great for interactive pieces so long as youre in chrome :P
[23:27] tbranyen: chrisdickinson: localStorage backed even
[23:28] chrisdickinson: tbranyen: oh shit, that'd be cool.
[23:28] chrisdickinson: i'm pretty committed to getting my other two node.js projects as feature-complete as possible at the moment, though ):
[23:28] xerox: chrisdickinson: what does it mean fake pngs?
[23:28] chrisdickinson: xerox: png uses zlib for compression
[23:29] Aria has joined the channel
[23:29] chrisdickinson: so i'd take a git blob, pretend it was a png, render it into canvas, and read the decompressed bytes back out of canvas.
[23:29] Horofox: i've build something in node that is horribly coded, where can i find good node.js/js pratices?
[23:29] Horofox: lol
[23:29] Horofox: built*
[23:29] chrisdickinson: my (oft aforementioned, theoretical) hat would be off to whoever got that working.
[23:30] AvianFlu: horofox: linking your code could be a start :-P
[23:30] Horofox: AvianFlu: alots of lines, want to see it working?
[23:31] tbranyen: chrisdickinson: i've been meaning to take my api off libgit2 and move it to a pure js implementation
[23:31] tbranyen: looking into your stuff
[23:31] rhdoenges: Horofox: take a look at existing projects and mimic them.
[23:31] chrisdickinson: tbranyen: i looked at using libgit2, but it seemed like a pain to move it off of sync io
[23:32] Horofox: rhdoenges: what's a good existing project to check?
[23:32] chrisdickinson: i think i saw yours when i was starting the project, actually.
[23:32] micheil has joined the channel
[23:32] rhdoenges: hmm. node itself has some good code, and npm is excellent
[23:32] tbranyen: chrisdickinson: it is, i saw what samcday had to do with gitteh to get thread safety and object caching
[23:32] Horofox: rhdoenges: i've tried to read some mongoose code and i couldn't understand one thing
[23:32] Chani: ugh, zlib...
[23:32] tbranyen: i've explored other options, i just don't want to do thread locking
[23:32] chrisdickinson: tbranyen: i eventually got tempisfugit to read a 2 year old repo, with some weird problems.
[23:32] chrisdickinson: mostly that it would crash unexpectedly.
[23:33] chrisdickinson: without a stacktrace or anything.
[23:33] Chani: chrisdickinson: you might want to chat with vandenoever about js and zip. :)
[23:33] micheil: Aria: hmm.. have you read the lib uv stuff?
[23:33] Aria: I've been following from a distance.
[23:33] tbranyen: if i wasn't so hung over right now i'd start testing stuff out
[23:33] Aria: Haven't had a huge amount of time the past couple months since I just uprooted and am moving to Boston.
[23:33] chrisdickinson: Chani: thanks for the heads up :)
[23:33] micheil: Aria: I read the new networking code the other day, it's looking rather good, plus the flag based approach for status is looking good
[23:34] Chani: Horofox: for general javascript sanity, read Javascript: The Good Parts.
[23:34] chrisdickinson: tbranyen: i had to patch the version of node-compress i was using. it hard-coded the windowbits, and they were wrong for the compression that git uses.
[23:34] chrisdickinson: i'm not at all sure it still works.
[23:34] micheil: Aria: no excuse! I've just moved from australia to london in the last 3 weeks
[23:34] micheil: :P
[23:34] tbranyen: chrisdickinson: wondering if HTML5 Blob api can be of use
[23:34] chrisdickinson: it's on my list of "to revisit" after ormnomnom, plate, and (eventually) wilson
[23:34] Horofox: Chani: thanks
[23:34] mendel_ has joined the channel
[23:35] Chani: ACTION loves that book. it made js stop looking like a scary monster :)
[23:35] Pathin_ has joined the channel
[23:35] Chani: I probably ought to pay for it soon. :P
[23:35] burg has joined the channel
[23:35] unlink has joined the channel
[23:35] unlink has joined the channel
[23:36] micheil: Chani: which book?
[23:36] Chani: micheil: Javascript: The Good Parts
[23:36] micheil: ah
[23:36] sh1mmer has joined the channel
[23:36] micheil: morning sh1mmer
[23:36] micheil: erm, evening'
[23:36] sh1mmer: afternoon
[23:36] tbranyen: chrisdickinson: mind if i PM?
[23:36] chrisdickinson: tbranyen: not at all.
[23:38] burg: hello. i am writing websocket server in node.js . it works fine, except that if i want to send a message from server to websocket after a few minutes the connection was made, i get this error in node.js: http://codepad.org/3l25k5Ii
[23:38] micheil: uh-oh
[23:38] micheil: burg: why are you writing a websocket server?
[23:39] micheil: burg: have you looked at the ones already built?
[23:39] burg: micheil, part of a school project
[23:39] micheil: (I'm the author of node-websocket-server and node-websocket-protocol)
[23:39] gavin_huang has joined the channel
[23:39] catshirt: burg: is the socket disconnecting? or is it just unwritable
[23:40] Nuck: For an upload thing in REST, should I use PUT or PSOT?
[23:40] khug has joined the channel
[23:40] catshirt: post for new, put for update
[23:40] micheil: PUT is generally for modifying existing documents, POST is for creating
[23:40] micheil: that. what catshirt said
[23:40] arieru has joined the channel
[23:41] burg: on the clientside i`m not notified that it is disconnecting. nor on the server side (where i have a listener for 'end' event) - so just unwritable
[23:41] johnnywengluu: how do i install npm package on github?
[23:41] micheil: burg: can you share your entire code?
[23:42] micheil: burg: I can probably work out the problem, although, I'm strongly opposed to people writing websocket servers, as they aren't as easy to write as what some would have you think
[23:43] khug: Hey all, I spent a little time rewriting an old URL router I'd done for Geddy and built an npm package. Would love some feedback if anyone's interested! https://github.com/kieran/barista
[23:44] micheil: burg: hmm.. that stack trace looks a bit strange.
[23:44] micheil: although, I think I've encountered a similar thing before.
[23:45] burg: micheil, and how did you solve it?
[23:45] Pathin_ has joined the channel
[23:45] micheil: I solved it by changing the way I write packets to the network.
[23:45] khug: johnnywengluu: not sure what you mean exactly, does npm install packagename not work?
[23:45] mynyml has joined the channel
[23:45] anno^da has joined the channel
[23:45] johnnywengluu: i know you can do "npm install "
[23:46] bingomanatee: I want to include a 64 bit binary block into Mongo via Node.js - any suggestions as to how to do this? 64 yes/no's.
[23:46] c4milo1 has joined the channel
[23:46] TheFuzzball has joined the channel
[23:46] johnnywengluu: khug: eg. npm install http://github.com/waveto/node-crypto/tarball/v0.0.5
[23:46] johnnywengluu: but how do i get the tarball version of the github repo?
[23:46] micheil: burg: https://github.com/miksago/node-websocket-server/blob/master/lib/ws/connection.js#L288-302
[23:47] johnnywengluu: eg this one: https://github.com/davglass/yuidocjs
[23:47] mdeboard: I don't suppose the author of walk.js is around, is he? coolaj86 ?
[23:47] mdeboard: Or any users of walk.js
[23:47] Sorella has joined the channel
[23:47] Murvin: is there any good example how to use gzippo?
[23:47] micheil: burg: although, I think you should use one of the existing websocket servers / contributing back to them, rather than writing a brand new one, unless you have really good knowledge of the websocket specification.
[23:48] burg: micheil, i`m checking your code now and i see three lines that got my attention - socket.setTimeout(0); socket.setNoDelay(true); socket.setKeepAlive(true, 0); might that solve my problem, maybe?
[23:48] burg: i do not have that on my server
[23:48] micheil: burg: can you share your code at all, even if it's just privately?
[23:50] dyer has joined the channel
[23:50] dyer has joined the channel
[23:50] brolin has joined the channel
[23:50] Aria: Okay, I am in love with docco.
[23:51] khug: johnnywengluu: odd, seems to have a package.json, but it's not in npm
[23:51] micheil: burg: those three things do the following: set's the socket to not timeout after inactivity, disabled nagel algorithm, and sets the socket to send keep-alive packets.
[23:51] johnnywengluu: khug: yeah its not pushed to npm yet .. so i have to git clone it first then do npm install yuidoc -g
[23:51] khug: johnnywengluu: I'm not sure how to get a taglist from github without cloning the repo
[23:52] johnnywengluu: but wanna do it in one step with tarball .. anyone knows how to get the tarball version of a repo?
[23:52] burg: ok, let me try that and see what happens
[23:52] devuo has joined the channel
[23:52] dyer has joined the channel
[23:52] dyer has joined the channel
[23:52] micheil: burg: the root of your problem is how you write the data
[23:53] micheil: hence the reason I do the buffer concatenation
[23:54] khug: johnnywengluu: https://github.com/api/v2/json/repos/show/waveto/node-crypto/tags
[23:54] johnnywengluu: what is that?
[23:54] kbni has joined the channel
[23:54] _marks: re POST/PUT...nice, i had it totally backwards
[23:55] Pathin_ has joined the channel
[23:55] khug: github api - gives you a list of tags. You can use the latest key to fetch your tarball
[23:56] rhdoenges: I'm making a facebook client and facebook doesn't have an easy-to use realtime api. Should I just setInterval() and poll?
[23:57] dyer has joined the channel
[23:57] dyer has joined the channel
[23:58] micheil: rhdoenges: wrong, facebook does have a realtime API, see github.com/votizen/facebook-realtime-graph
[23:58] micheil: I wrote that when I worked at votizen, and it works very well to my knowledge.
[23:59] micheil: you do have to wait for manual callback url verification from facebook.
[23:59] dyer has joined the channel
[23:59] dyer has joined the channel
[23:59] micheil: as it uses a webhook style system
[23:59] namdq has joined the channel