Re: [nodejs] Running a javascript function in node.js

2014-07-25 Thread Conrad Pankoff
This is almost definitely a very, very bad idea. Instead of trying to serialise your code into JSON, you can just put it in a regular JavaScript file and require() it. For example, instead of this: // code.json {"myFunction":"function(a) { console.log(a); }"} var code = JSON.parse(fs.readFileSy

[nodejs] What is the relationship between writableStream.highwatermark in nodejs and PIPE_BUF in POSIX specification

2014-06-08 Thread Conrad Pankoff
They're completely unrelated. You're correct also in your assumption that writes are not (guaranteed to be) atomic. -- Job board: http://jobs.nodejs.org/ New group rules: https://gist.github.com/othiym23/9886289#file-moderation-policy-md Old group rules: https://github.com/joyent/node/wiki/Mai

[nodejs] node.js and request wait time

2014-06-08 Thread Conrad Pankoff
These are metrics from your client, so they won't give you a very detailed view into what your server is doing. You'll want to add some instrumentation to your server code to find out when it's doing certain things. A lo-fi version of this would be console.log statements tangled in at various p

Re: [nodejs] mongodb is so confusing!

2014-04-08 Thread Conrad Pankoff
om the last thread, so I'll use it to post this one. <http://i.imgur.com/UZfkIrs.png> On Wednesday, 9 April 2014 13:53:46 UTC+10, Frank Z wrote: > > Hahahahaha. > > This isn't fair I didn't even realize that was the problem. > > > On Tue, Apr 8, 2014 at 11:51

Re: [nodejs] mongodb is so confusing!

2014-04-08 Thread Conrad Pankoff
On Wednesday, 9 April 2014 13:43:31 UTC+10, Frank Z wrote: > > Can someone actually help me? YES, I am VERY GOOD at JavaScript. > > Here's the deal, I'm NEW TO BACK END!! > > I'm better with very direct and lower level stuff like, you know, actu

Re: [nodejs] mongodb is so confusing!

2014-04-08 Thread Conrad Pankoff
wow, dude. Just wow. On Wednesday, 9 April 2014 13:36:21 UTC+10, Frank Z wrote: > > By the way... What is your deal exactly? What makes you assume that I > don't know JavaScript? I'm guessing you're bitter because you're still a > virgin? I understand bro, it's cool. > > You are better at JavaSc

[nodejs] Re: mongodb is so confusing!

2014-04-08 Thread Conrad Pankoff
This isn't related to MongoDB at all. 1) Paste code 2) ??? 3) Profit! On Wednesday, 9 April 2014 10:10:27 UTC+10, Frank Z wrote: > > I installed mongodb through my unbuntu terminal after installing node.js. > > When I run sudo service mongodb start > > I get back "start: Job is already running: m

Re: [nodejs] Re: New to Node. How do I use package.json files and what exactly is it for??

2014-03-27 Thread Conrad Pankoff
Seriously? You realise you're just digging yourself deeper into the hole of "looking like a complete fucking idiot," right? On Friday, 28 March 2014 14:28:19 UTC+11, Frank Z wrote: > > Hey Karl, when was the last time you got laid? > > > On Thu, Mar 27, 2014 at 11:21 PM, Karl Yang > > wrote: > >

[nodejs] Re: What's a good way for a transform stream to pipe from one source into multiple destinations with different data per destination?

2013-09-10 Thread Conrad Pankoff
It's funny you should bring this up, because I just wrote this[1] last night. It sounds like it does exactly what you want. [1]: https://github.com/deoxxa/fork-stream On Tuesday, 10 September 2013 04:55:48 UTC+10, Tyler Neylon wrote: > > You can call pipe multiple times on a single readable stre

[nodejs] Re: [ANN] pillion: RPC over Stream.Duplex({objectMode: true})

2013-03-05 Thread Conrad Pankoff
Wow. I'm a genuine idiot. I forgot to link to the library. https://github.com/deoxxa/pillion On Tuesday, 5 March 2013 21:38:52 UTC+11, Conrad Pankoff wrote: > > Over the last few days I've put together an RPC system that works with any > streams2-style object-mode stre

[nodejs] [ANN] pillion: RPC over Stream.Duplex({objectMode: true})

2013-03-05 Thread Conrad Pankoff
Over the last few days I've put together an RPC system that works with any streams2-style object-mode stream. I took a fairly liberal helping of initial inspiration from SubStack's dnode, but ended up taking things in quite a different direction eventually, opting for imitating some of JavaScri

Re: [nodejs] [ANN] jsmc - Minecraft server written in Node

2012-10-31 Thread Conrad Pankoff
wrote: > >> Really nice and itersting work. >> Good job! >> >> -- >> Att, >> Alan Hoffmeister >> >> >> 2012/10/31 Conrad Pankoff >: >> > Hey noders! >> > >> > Over the weekend/first part of this week I've started

[nodejs] [ANN] jsmc - Minecraft server written in Node

2012-10-31 Thread Conrad Pankoff
Hey noders! Over the weekend/first part of this week I've started writing a Minecraft server entirely in JavaScript, to experiment with different types of applications in node. It's been surprisingly easy, with the help of a couple of support libraries I wrote for dealing with binary stuff. Ada

[nodejs] [ANN]: npmrc - a tool to switch between .npmrc files

2012-09-18 Thread Conrad Pankoff
At work, I've got a private npm registry set up for deployment of internal modules. While working with it, I found myself doing a lot of `ln -s ~/.npmrcs/work ~/.npmrc` stuff and it was getting a bit cumbersome. In true lazy hacker spirit, I spent a couple of hours writing a tool to do a job th

[nodejs] Tying externally triggered callbacks in native addons to JavaScript functions?

2012-06-03 Thread Conrad Pankoff
Hi everyone, I'm making my first steps into the somewhat murky and confusing waters that are native addons in Node.JS, wading through documentation on V8 and Node internals with only the light of my laptop screento learn to guide me. I'm trying to figure out how to fire a callback in JavaScript la