[nodejs] What's the final verdict on node/express route separation?

2013-06-18 Thread Ben
this is a great best practice for Node as well. I'm leaning towards using DI for tackling my route separation but I wanted to check to see if there were any major reasons why this wouldnt be a good idea? Thanks! Ben -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://gi

Re: [nodejs] Is anyone sending Apple push notifications (APNS) with node to iOS devices (iPhone/iPad)?

2012-06-25 Thread ben
https://github.com/argon/node-apn is pretty easy to setup and its working great for my project since last year Aug. Ben On Tue, Jun 26, 2012 at 9:02 AM, Ric wrote: > https://github.com/argon/node-apn -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/n

Re: [nodejs] Memory management and tuning

2012-11-02 Thread ben
thanks for the info :) On Sat, Nov 3, 2012 at 1:13 AM, Joel Rolfe wrote: > Hi All, > > Relatively new to node (about a month under the belt), from a > java/relational stack background. I spent today trying to understand > memory management and configuration, as I found it difficult to find a >

Re: [nodejs] patio - orm

2012-01-31 Thread ben
look nice :) On Wed, Feb 1, 2012 at 5:29 AM, Douglas Martin wrote: > Hi all, > > Just wanted to let you know we just recently published a new ORM/query > engine called patio , its > inspired by Sequel and supports most

[nodejs] ServerRequest: Not every end/close event is handled properly

2012-02-12 Thread Ben.
Hi Im new to node.js and having problems getting a proper connection handling to work. As far as I understand for every request the method http.createServer() is called. Within this function I add a request-handler for close and end. req.connection.addListener('close', function () { clearInter

[nodejs] need some help with writing docs and tests

2012-03-12 Thread ben
hows how a COKE generated code base look like. Please check https://github.com/dreamerslab/coke-dev. Or you can install coke with npm and just use the code generator which will give you nearly the same thing. ben :) -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/j

Re: [nodejs] recommended flow control library?

2012-05-26 Thread ben
https://github.com/dreamerslab/node.flow I wrote this lib a while ago, it supports both parallel and sequential flow control. It is fully tested, documented and has examples. I use it everyday along with other libs, you might want to give it a try. ben :) On Sun, May 27, 2012 at 2:54 AM

Re: [nodejs] Sample CRUD app source code

2012-05-30 Thread ben
this might help https://github.com/dreamerslab/express-todo-example also there is an online demo http://express-todo-example.dreamerslab.com/ ben :) On Thu, May 31, 2012 at 12:13 AM, Tim Caswell wrote: > If you write up the requirements for the simple app I can write up an > example.  

Re: [nodejs] Sample CRUD app source code

2012-05-30 Thread ben
sorry didn't see that you want to do it without any lib. just ignore the last post. On Thu, May 31, 2012 at 1:35 AM, ben wrote: > this might help > https://github.com/dreamerslab/express-todo-example > > also there is an online demo > http://express-todo-example.drea

[nodejs] Re: Unloading a module from require

2012-06-13 Thread Ben
I'm interested in this question too. I tried it once, but all the async operations started by the modules remained active even after "unloading" it. Try for example a simple setInterval() that writes something to the log every second, in the module - when you unload the module, the timer is sti

Re: [nodejs] Re: various failures on stable test suite

2012-11-12 Thread Ben Noordhuis
On Mon, Nov 12, 2012 at 11:52 PM, Mac Chambers wrote: > === release test-child-process-fork2 === > Path: simple/test-child-process-fork2 > PARENT send child server handle > CHILD got message: { hello: 'world' } > PARENT got message: { gotHandle: true } > CLIENT connected > CLIENT connected > CLIEN

Re: [nodejs] Picking modes in createCipher()

2012-11-14 Thread Ben Noordhuis
On Wed, Nov 14, 2012 at 1:46 PM, James Coglan wrote: > I'm wondering why crypto.createCipher() lets me pick aes-256-cbc but not > aes-256-ctr or aes-256-gcm. These modes are available in openssl and I can > invoke them from Ruby, no problem. Why are they not available in Node? They are - but only

Re: [nodejs] High number of event handlers problematic?

2012-11-15 Thread Ben Noordhuis
On Thu, Nov 15, 2012 at 10:21 AM, Felix E. Klee wrote: > Node reports: > > (node) warning: possible EventEmitter memory leak detected. 11 > listeners added. Use emitter.setMaxListeners() to increase limit. > > That there are more than 10 event listeners in my app is no surprise: > For ever

Re: [nodejs] Re: nodejs 100% cpu randomly

2012-11-15 Thread Ben Noordhuis
On Thu, Nov 15, 2012 at 10:41 AM, Anton Whalley wrote: > Can you put it on an illumOS based system temporarily and get DTracing? > At the very least this would tell you if its infrastructure or application. > > Spin up a Joyent SmartOS or do a local install of OpenIndiana. > Then install your app

Re: [nodejs] debug statement

2012-11-15 Thread Ben Noordhuis
On Thu, Nov 15, 2012 at 3:25 PM, Angelo Chen wrote: > Hi, > > looking at nodejs source code, notice this: > > debug('Module._load REQUEST ' + (request) + ' parent: ' + parent.id); > > where can i find the doc for debug? thanks, There are no docs. You enable debug tracing with `NODE_DEBUG="n

Re: [nodejs] How to be sure in delivering data between server and client?

2012-11-15 Thread Ben Noordhuis
On Thu, Nov 15, 2012 at 10:56 AM, greeka wrote: > I have TCP server written in NodeJS and clients on flash. The communications > between clients and server builded ower my own protocol (small commands - > max 50 bytes per command). But some time (aprox 10% from total commands sent > from server to

Re: [nodejs] Strange server behavior

2012-11-15 Thread Ben Noordhuis
On Thu, Nov 15, 2012 at 4:39 PM, Petar Petrović wrote: > Hi there, > > I am starting out with learning Node.js development, and I have a small > problem when it comes to running my code. I am using OS X Mountain Lion for > my development, and have a very basic Node.js app that I want to run. The >

Re: [nodejs] Strange server behavior

2012-11-15 Thread Ben Noordhuis
On Thu, Nov 15, 2012 at 5:10 PM, Ben Noordhuis wrote: >> function sendFile(response, filePath, fileContents) { >> >> response.writeHead( >> >> 'content-type', >> >> mime.lookup(path.basename(filePath)) >> >> ); > > The argument

Re: [nodejs] Compile Extension Module into node.exe

2012-11-15 Thread Ben Noordhuis
On Thu, Nov 15, 2012 at 8:56 PM, Mike Parsons wrote: > Is there a way to compile a custom extension module (i.e. > https://github.com/developmentseed/node-sqlite3) directly into the node.exe? Yes, but it's not supported so it might break anytime you upgrade. In no particular order: - drop your

Re: [nodejs] can I know compile option on node.js binary?

2012-11-15 Thread Ben Noordhuis
On Fri, Nov 16, 2012 at 2:58 AM, Outsider (JeongHoon Byun) wrote: > node.js have some compile option like --debug or --with-dtrace > ( https://github.com/joyent/node/blob/master/configure ) > > How can I check which options are enabled or disabled on node.js binary? You probably want process.conf

Re: [nodejs] syntax error in config on DreamHost

2012-11-16 Thread Ben Noordhuis
On Sat, Nov 17, 2012 at 1:08 AM, Ron Lambkin wrote: > I am trying to install node.js on a DreamHost VPS. Upon doing ./config, I > get this error: > File "./configure", line 273 > o['default_configuration'] = 'Debug' if options.debug else 'Release' >

Re: [nodejs] server.close() throws exception when processing an http request

2012-11-18 Thread Ben Noordhuis
On Sun, Nov 18, 2012 at 7:02 PM, Érick Lavoie wrote: > Hi, > > I am trying to update the server code while it is running. If my > understanding is correct, I should first close the http server and once the > close operation has been performed, I can create another HttpServer > listening to the sam

Re: [nodejs] How to find out *if* there is a memory leak?

2012-11-19 Thread Ben Noordhuis
On Sun, Nov 18, 2012 at 11:21 AM, Felix E. Klee wrote: > How do I find out if (not where) there is a memory leak in an app? > > Background: I am using Socket.IO for client/server communication, and I > want to make sure that server side resources are properly cleaned up > when a connection is clos

Re: [nodejs] linux binary

2012-11-19 Thread Ben Noordhuis
On Mon, Nov 19, 2012 at 12:20 PM, Angelo Chen wrote: > hi, > i tried the linux binary file of node in centos 5.x 32 bits, it returns: > > ./node: /lib/libc.so.6: version `GLIBC_2.9' not found (required by ./node) > ./node: /lib/libc.so.6: version `GLIBC_2.6' not found (required by ./node) > ./node

Re: [nodejs] Re: linux binary

2012-11-19 Thread Ben Noordhuis
On Mon, Nov 19, 2012 at 11:20 PM, Angelo Chen wrote: > will old glibc affect node apps? No, not really. > I am using a node compiled from source, but it does not include npm. node.js v0.8 installs npm by default. Check the output of `make install`. -- Job Board: http://jobs.nodejs.org/ Posti

Re: [nodejs] [EARLY ANN] V8 clone exposed to node.js

2012-11-22 Thread Ben Noordhuis
On Thu, Nov 22, 2012 at 12:05 PM, Alexey Kupershtokh wrote: > I see that almost every framework (underscore, lodash, moo, etc) creates its > own clone function. > But v8 engine already has it. > So I've created a module that exposes v8's clone function. Just as a proof > of concept. It needs asser

Re: [nodejs] [EARLY ANN] V8 clone exposed to node.js

2012-11-22 Thread Ben Noordhuis
On Thu, Nov 22, 2012 at 1:10 PM, Fedor Indutny wrote: > Ben, you're wrong. > > /** >* Clone this object with a fast but shallow copy. Values will point >* to the same values as the original object. >*/ > V8EXPORT Local Clone(); Hah, I hadn

Re: [nodejs] Re: Patch for http.Client multi interface

2012-11-22 Thread Ben Noordhuis
On Thu, Nov 22, 2012 at 9:01 AM, Kapil Sharma wrote: > I have this same issue. but my version of node is 0.8.14 and this > createConnection has changed a lot. If you can, then please suggest me what > changes this version requires, so that request is sent through the actual > ip.. and not from the

Re: [nodejs] TLS server error with Microsoft clients

2012-11-22 Thread Ben Noordhuis
On Thu, Nov 22, 2012 at 2:21 AM, Steve Freegard wrote: > Hi all, > > I'm using Haraka with STARTTLS enabled - I'm getting some strange behaviour > which only seems to happen when dealing with Microsoft clients and I wonder > if anyone might have any pointers as to how I can fix or workaround the >

Re: [nodejs] TLS server error with Microsoft clients

2012-11-22 Thread Ben Noordhuis
On Thu, Nov 22, 2012 at 3:47 PM, Steve Freegard wrote: > setOptions() doesn't appear to be documented yet - can you give me an > example of how to use it. > > I've tried this: > > if (!options) options = {}; > options.secureOptions = constants.SSL_OP_ALL; > var

Re: [nodejs] TLS server error with Microsoft clients

2012-11-23 Thread Ben Noordhuis
On Thu, Nov 22, 2012 at 9:19 PM, Steve Freegard wrote: > Ben, > > On Thursday, November 22, 2012 5:13:23 PM UTC, Steve Freegard wrote: > >> Ok - I tried various options OR'd together to no avail, so finally decided >> to hack this in rather than to rebuild Node

Re: [nodejs] TLS server error with Microsoft clients

2012-11-23 Thread Ben Noordhuis
On Fri, Nov 23, 2012 at 2:50 PM, Steve Freegard wrote: > Hi Ben, > > > On Friday, November 23, 2012 10:06:29 AM UTC, Ben Noordhuis wrote: >> >> >> I don't see why a change to the crypto/tls API is necessary. Haraka >> just needs to be a little more flex

Re: [nodejs] http.get and data

2012-11-23 Thread Ben Noordhuis
On Sat, Nov 24, 2012 at 1:51 AM, Angelo Chen wrote: > Hi, > how to obtain the data after a http.get? following is sample, that gets only > response code: > > var http = require('http') > http.get("http://nodejs.org/";, function(res) { > console.log("Got response: " + res.statusCode); > }).on('er

Re: [nodejs] Node.js sock.write() does not write data incoming from createConnection()

2012-11-25 Thread Ben Noordhuis
On Sun, Nov 25, 2012 at 11:23 AM, Bastian v.d Boomgaard wrote: > I'm sending messages trough a socket connection to a device. The device > sends a message on which i need to respond. > > This is my code for opening a socket connection: > > var lPORT = 4102; > // Create a server instance, a

Re: [nodejs] Issue connecting to Oracle db

2012-11-26 Thread Ben Noordhuis
On Mon, Nov 26, 2012 at 10:54 AM, Aishwarya Singhal wrote: > hi > > I am unable to use Oracle database along with Node JS. I have tried > installing node-oracle but it fails with the latest release of node. While > some folks on the net suggest that I downgrade node to v0.6, I wouldn't be > keen o

Re: [nodejs] How to run nodeJS

2012-11-26 Thread Ben Noordhuis
On Mon, Nov 26, 2012 at 3:32 PM, Đức Diện Đỗ wrote: > Hi all. > common when running node I have to type the command command: "node > hello.js".Is there a way to be able to run node without having to do so. Yes. Read up on UNIX shebangs. Only works in UNIX-y environments, of course. -- Job Boa

Re: [nodejs] Why does htop show mutiple threads for node.js ?

2012-11-26 Thread Ben Noordhuis
On Mon, Nov 26, 2012 at 9:17 PM, Stefan Happer wrote: > Sorry for maybe dumb question but why does "htop" show multiple threads for > node.js ? Isn't node.js single-threaded? > > This is on a 4-core server running Ubuntu 12.04 LTS node.js is single-threaded insofar that JS code is executed from o

Re: [nodejs] NodeJS Express Vs Python Flask : Benchmarking - help required

2012-11-26 Thread Ben Noordhuis
On Tue, Nov 27, 2012 at 4:15 AM, Barry Steyn wrote: > Hi All > > We attempted to benchmark nodejs against python by using the express > framework (for Node) versus flask framework (for Python). The idea was to > use basic auth on a database with ten thousand (10,000) usernames. The > database tabl

Re: [nodejs] Re: [EARLY ANN] V8 clone exposed to node.js

2012-11-27 Thread Ben Noordhuis
On Tue, Nov 27, 2012 at 10:11 AM, Alexey Kupershtokh wrote: > Dear v8 gurus, please help. > I see that there's a useful class v8::internal::ObjectHashTable that I could > use instead of the stacks to handle circular references. > But when I'm adding #include in my clone.cc file: > #define BUILDIN

Re: [nodejs] Re: [EARLY ANN] V8 clone exposed to node.js

2012-11-27 Thread Ben Noordhuis
On Tue, Nov 27, 2012 at 10:31 AM, Alexey Kupershtokh wrote: > So it's only for internal usage? > Maybe it's exposed to js land somehow? > Maybe any similar replacement for this? Yes, no and no. You could copy the code into your project or write a hash table from scratch, of course. -- Job Boar

Re: [nodejs] Node.js socket.write() does not write in socket connection

2012-11-27 Thread Ben Noordhuis
On Tue, Nov 27, 2012 at 3:41 PM, Bastian v.d Boomgaard wrote: > I've got a TCP socket in which I listen for data send from a device. This > works, but when I connect to that socket connection with > "net.createConnection" (from another part of the code) the incoming data > does not get send BACK t

Re: [nodejs] Node.js sock.write() does not write data incoming from createConnection()

2012-11-27 Thread Ben Noordhuis
On Tue, Nov 27, 2012 at 3:43 PM, Bastian v.d Boomgaard wrote: > I'm fairly sure i'm monitoring the right interfaces. The "other data" is > coming trough. Just not the data incoming from "createConnection" So what do you see with strace or dtruss? -- Job Board: http://jobs.nodejs.org/ Posting gu

Re: [nodejs] NodeJS Express Vs Python Flask : Benchmarking - help required

2012-11-27 Thread Ben Noordhuis
On Tue, Nov 27, 2012 at 4:25 PM, Barry Steyn wrote: > Yes, we ran connection pooling. And with respect to AWS micro instance, it > should still (no matter the variation) allow Node to come out tops, > shouldn't it? I put as much faith in benchmarks running on small and micro instances as I do whe

Re: [nodejs] cluster.fork, pass env vars in node v0.6 - how?

2012-11-27 Thread Ben Noordhuis
On Tue, Nov 27, 2012 at 3:17 PM, StevePL <6obcykont...@gmail.com> wrote: > I need to use old version of node (v0.6.17 || v0.6.2) and when I use > cluster.fork need to pass some vars to worker, that they have it when > starts. > In node v0.8 you can just do this: cluster.fork(env); but u can't in v0

Re: [nodejs] NodeJS Express Vs Python Flask : Benchmarking - help required

2012-11-27 Thread Ben Noordhuis
On Tue, Nov 27, 2012 at 9:05 PM, Barry Steyn wrote: > That being said, surely the instance size does not matter. I know Node likes > power, but using that reasoning, so does Python (it must also suffer from > the same garbage collector constraints). That being said, I will be ramping > my box and

Re: [nodejs] TLS server error with Microsoft clients

2012-11-27 Thread Ben Noordhuis
On Tue, Nov 27, 2012 at 10:46 PM, Steve Freegard wrote: > Did you want me to log this as an issue on Github joyent/node? Yes, please do. I can't promise we'll be able to fix it (I don't have remotely the proper setup for that) but at the very least we'll look into it. A test case would help obv

Re: [nodejs] Node.js sock.write() does not write data incoming from createConnection()

2012-11-27 Thread Ben Noordhuis
On Tue, Nov 27, 2012 at 11:09 PM, Bastian v.d Boomgaard wrote: > Are those for Linux? Forgot to mention that my nodejs server runs on Windows > :) > Is the program "wireshark" not good enough for tracing tcp packets? Ah, maybe Bert knows - he's our Windows guy. I may be misremembering it but I r

Re: [nodejs] HELP! Nodejs server side DES/AES decrypt with ActionScript client side encrypt

2012-11-28 Thread Ben Noordhuis
On Wed, Nov 28, 2012 at 6:32 PM, Yi Tan wrote: > 2. DecipherInitIv error when create DES decipher: > cipher = crypto.createDecipheriv('des', 'BEA12F82889BE82A', > '5725A92737DD73DD') // Error: DecipherInitIv error I see you already figured it out but I'm curious why you're using DES. It's co

Re: [nodejs] Cluster and file descriptors

2012-11-28 Thread Ben Noordhuis
On Wed, Nov 28, 2012 at 8:57 PM, Richard Crowley wrote: > How does the standard library cluster module pass a newly-opened file > descriptor from a parent process to a child process in a way that > allows the child process to accept(2) and not get EBADF? > > I made it to src/tcp_wrap.cc and from t

Re: [nodejs] Re: clients[i].sendUTF causing memory leak. Please help.

2012-11-28 Thread Ben Noordhuis
On Thu, Nov 29, 2012 at 12:20 AM, P. W. Croft wrote: > I found the issue! > > The outgoingFrameQueue doesn't clear itself. So, the array just increases > indefinitely. I clear it after my send, and no memory leak! Next time, you may want to familiarize yourself with [1] first before posting. You

Re: [nodejs] Why does htop show mutiple threads for node.js ?

2012-11-28 Thread Ben Noordhuis
On Thu, Nov 29, 2012 at 2:43 AM, Tolga Tekin wrote: > Actually that is not completely true - Both Windows and MacOSX's native file > APIs support async file operations. > The limitation might be coming from linux posix api. I'm aware of them but neither are really usable. Windows AIO only works

Re: [nodejs] HELP! Nodejs server side DES/AES decrypt with ActionScript client side encrypt

2012-11-29 Thread Ben Noordhuis
On Thu, Nov 29, 2012 at 2:50 PM, Yi Tan wrote: > Also, when I use NullPad in client, and set decipher.setAutoPadding(false) > in node, it will auto pad 0x0 at the end of the decrypted buffer if the > buffer doesn't match block size. That's quite anoying. Is there any way to > get rid of the traill

Re: [nodejs] Re: Processes

2012-11-30 Thread Ben Noordhuis
On Fri, Nov 30, 2012 at 5:16 PM, spqr wrote: > So, I guess this is a fairly stupid question because I can pass everything > to the process as part of the "env" > Maybe a new question is that since I'm talking about "quite a lot of junk," > is there any negative consequence > of passing a really la

Re: [nodejs] libuv watcher and c++ object method callback??

2012-11-30 Thread Ben Noordhuis
On Sat, Dec 1, 2012 at 2:24 AM, zocket.sprocket wrote: > How do you get a uv watcher to work with an object instance method as > callback? > > Below is what I am trying to do but it is not working for me. > > uv_idle_init(uv_default_loop(), &obj->idler_); > uv_idle_start(&obj->idler_, obj->CheckLi

Re: [nodejs] Re: HTTP client request headers (lowercase) issue

2012-12-01 Thread Ben Noordhuis
On Sun, Dec 2, 2012 at 2:07 AM, Mikeal Rogers wrote: > by default node.js sends headers in lowercase. The core http library sends headers as-is, it's only incoming headers that are lowercased. Maybe some frameworks force lowercase everywhere but node.js itself does not. -- Job Board: http://jo

Re: [nodejs] Re: HTTP client request headers (lowercase) issue

2012-12-01 Thread Ben Noordhuis
On Sun, Dec 2, 2012 at 3:53 AM, Mikeal Rogers wrote: > headers core sets, like transfer-encoding and host will be lowercase. Wrong again. Auto-added headers like Authorization, Date, Content-Length, Transfer-Encoding, etc. are all properly capitalized. -- Job Board: http://jobs.nodejs.org/ Pos

Re: [nodejs] Any Plans to support non-standard HTTP method?

2012-12-01 Thread Ben Noordhuis
On Sun, Dec 2, 2012 at 3:39 AM, Arunoda Susiripala wrote: > Hi, > > I've recently work on with some media streaming project (icecast and > shoutcast). > It sends streams to non-standard method calles SOURCE. > > Since node does not support non-standard methods I've to go with raw net > module. > I

Re: [nodejs] Re: Node.js memory leak detection?

2012-12-03 Thread Ben Noordhuis
On Mon, Dec 3, 2012 at 11:10 PM, mscdex wrote: > On Dec 3, 2:26 am, Jake Verbaten wrote: >> Alternatively take heapdumps (https://github.com/bnoordhuis/node-heapdump) >> and inspect them in Chrome's profiler. > > I recently tried this, but the comparison view doesn't seem to work > for me when tr

Re: [nodejs] Why does htop show mutiple threads for node.js ?

2012-12-05 Thread Ben Noordhuis
On Wed, Dec 5, 2012 at 9:35 AM, Alex Kocharin wrote: > Would it make sense to use AIO if filesystem supports it? How faster it would > be? Did somebody run any benchmarks? The answer lies somewhere between 'not at all' and 'lots'. >From anecdotal evidence, AIO on FreeBSD and Solaris can give a

Re: [nodejs] Why does htop show mutiple threads for node.js ?

2012-12-05 Thread Ben Noordhuis
On Wed, Dec 5, 2012 at 11:11 AM, Ben Noordhuis wrote: > On the other hand, Linux AIO only works with files opened in O_DIRECT > mode. You no longer benefit from the disk cache so in general it will > be slower, possibly a lot slower. O_DIRECT only makes sense for very > specializ

Re: [nodejs] Why does htop show mutiple threads for node.js ?

2012-12-05 Thread Ben Noordhuis
On Wed, Dec 5, 2012 at 11:56 AM, Ryan Schmidt wrote: > > On Dec 5, 2012, at 04:11, Ben Noordhuis wrote: > >> OS X is not worth considering even if it wasn't broken. No one runs >> his production systems on OS X. > > Certainly many users use node on OS X on thei

Re: [nodejs] Creating file into C++ addon of node.js

2012-12-07 Thread Ben Noordhuis
On Fri, Dec 7, 2012 at 1:03 PM, Mayur wrote: > Hi.. > > I want to know how i can create file and append string(text) data inside it > in c++ addon (.cc) file of node.js ?? > > I have used below code to do same, but not able to find file "data.txt" in > my ubuntu machine. > >FILE * pFileTXT; >

Re: [nodejs] Creating file into C++ addon of node.js

2012-12-07 Thread Ben Noordhuis
On Fri, Dec 7, 2012 at 2:01 PM, Mayur Dabhi wrote: > Sorry Ben, > > May be i have posted the question at wrong place. > > Let's we will not look at code, may be it contains errors, but can you guide > me on issue : it is possible to create file into c++ Addon for nod

Re: [nodejs] Re: A simple implementation of fs.write(fd, buffer, offset, length, position, [callback])

2012-12-09 Thread Ben Noordhuis
On Sun, Dec 9, 2012 at 7:35 PM, Eric Mill wrote: > The stereotype of developers responding to questions for help with "why do > you want to do that?" instead of an actual answer continues... With good reason. What someone _asks for_ is not necessarily what he _needs_. A newbie may ask "how can

Re: [nodejs] Installing NodeJs on Windows

2012-12-09 Thread Ben Noordhuis
On Mon, Dec 10, 2012 at 2:42 AM, Eenvincible wrote: > Hi everyone, > > I have tried so many methods to install NodeJs using Cygwin but every time I > run the Make command, It totally fails: Below the message that I get before > everything crashes down: > > -

Re: [nodejs] Is nodejs support arm of debug mode?

2012-12-11 Thread Ben Noordhuis
On Tue, Dec 11, 2012 at 10:08 AM, 谭虹斌 wrote: > hello: > Is nodejs support arm of debug mode? Throw error have stack information > in Release, Throw error have no stack information and print "Segmentation > fault" in debug. why? You mean node.js debug builds crash when a Javascript error is th

Re: [nodejs] How To get session of java

2012-12-12 Thread Ben Noordhuis
On Wed, Dec 12, 2012 at 8:39 AM, ayaz ali wrote: > hello everyone i have made a nodejs chat app with express and io. i want to > integrate it with existing java application which is mode on java spring. > flow will be like that when user login the application i want to get the > session of java in

Re: [nodejs] Function SHA256_Update is not being called in my C addon

2012-12-12 Thread Ben Noordhuis
On Wed, Dec 12, 2012 at 1:31 AM, Nathan Rajlich wrote: >> I am forced to wrap my header file for scrypt in `extern "c"` for correctly >> linking. This is correct, isn't it? > > Not *totally* positive but I believe this is correct. Ben or someone > else can

Re: [nodejs] Re: How To get session of java

2012-12-12 Thread Ben Noordhuis
On Wed, Dec 12, 2012 at 10:21 AM, ayaz ali wrote: > is it possibe to acess session from javascript? hop eits silly questuin :p > bt just for confirmation What exactly is unclear? It's been spelled out for you several times now. -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https:/

Re: [nodejs] Re: Does clearTimeout remove an unprocessed callback which is already in the execution queue?

2012-12-13 Thread Ben Noordhuis
On Thu, Dec 13, 2012 at 1:24 PM, Andrei Sedoi wrote: > Is this test accurate? > > var t1 = setTimeout(function() { > clearTimeout(t2); > }, 0); > > var t2 = setTimeout(function() { > console.log("hello world"); > }, 0); No. The order in which the timer callbacks run is unspecified, same as f

Re: [nodejs] Re: Does clearTimeout remove an unprocessed callback which is already in the execution queue?

2012-12-13 Thread Ben Noordhuis
On Thu, Dec 13, 2012 at 1:40 PM, Andrei Sedoi wrote: > I see. The test is inaccurate. Do you have an answer to the original > question? The original question being "Does clearTimeout remove an unprocessed callback which is already in the execution queue"? It does. -- Job Board: http://jobs.nod

Re: [nodejs] Re: Does clearTimeout remove an unprocessed callback which is already in the execution queue?

2012-12-13 Thread Ben Noordhuis
On Thu, Dec 13, 2012 at 2:49 PM, Jorge Chamorro wrote: > On 13/12/2012, at 13:34, Ben Noordhuis wrote: >> On Thu, Dec 13, 2012 at 1:24 PM, Andrei Sedoi wrote: >>> Is this test accurate? >>> >>> var t1 = setTimeout(function() { >>> clearTimeou

Re: [nodejs] Crypto Error - TypeError: Not a string or buffer

2012-12-14 Thread Ben Noordhuis
On Fri, Dec 14, 2012 at 2:21 AM, Arunprabu Durairaju wrote: > I am trying to use crypt in my code to hash the password and getting the > following error. I have given the code in the bottom of this post. I am > using node version 0.8.16 on osx Lion 10.7.5. > > I tried searching for the issue and f

Re: [nodejs] Clogged connection pool - connections opened/closed all at once

2012-12-15 Thread Ben Noordhuis
On Fri, Dec 14, 2012 at 11:20 PM, Jonathon Morgan wrote: > We make a high volume of requests over http between components in our > system, and running into what seems to be a connection pooling issue that's > difficult to track down. > > As far as I can tell, connection pools in Node are managed b

Re: [nodejs] Maybe of interest: Why we need a NodeJS application server or: writing boilerplate code considered harmful

2012-12-15 Thread Ben Noordhuis
On Sat, Dec 15, 2012 at 7:52 PM, Mark Hahn wrote: > I'm sure many would appreciate such a comprehensive large framework. > I and many others in the node community would not. > > One characteristic of the node "philosophy" is freedom. The freedom > to plug existing small modules together like a le

Re: [nodejs] Using ForeverAgent

2012-12-15 Thread Ben Noordhuis
On Sat, Dec 15, 2012 at 7:24 PM, David Lozano wrote: > Hi, > > To have connection reuse when making http requests, I'd like to use the > ForeverAgent without having to use the whole request module. My idea is to > use it instead of the http.globalAgent when making http.request. > > Is that possibl

Re: [nodejs] preferred license for node modules?

2012-12-15 Thread Ben Noordhuis
On Sat, Dec 15, 2012 at 6:48 PM, Isaac Schlueter wrote: > Apache2 has much more thorough coverage of patents and other IP stuff, > but I dislike it because it's so long and tedious, and I distrust long > legal documents for the same reason that I distrust large programs. > You should use it if you

Re: [nodejs] Efficient usage of a PaaS

2012-12-20 Thread Ben Noordhuis
On Thu, Dec 20, 2012 at 10:33 AM, Christopher Matheson wrote: > Hi all, This is my first post so please excuse if i've missed some > etiquette. > > Im currently developing my first 'Production' server that will be Node.js > running on a PaaS (likely a cloud foundry based solution) and while playin

Re: [nodejs] blog.nodejs.org rss feed?

2012-12-22 Thread Ben Noordhuis
On Sat, Dec 22, 2012 at 4:01 PM, Tristan Slominski wrote: > I'm probably missing something obvious. Is there an RSS feed for the blog? I > couldn't find it after searching actively for it for a few minutes. There is. It's here: http://blog.nodejs.org/feed -- Job Board: http://jobs.nodejs.org/

Re: [nodejs] WARNING: don't use IOWatcher, it'll be removed in v0.9

2012-12-22 Thread Ben Noordhuis
On Thu, Dec 20, 2012 at 10:49 AM, Moon Light wrote: > Hi, any news about it? I could not find anything. > I would need it for pcap package adaptation. Any up to date implementation > would help as well. I haven't gotten around to it yet. Maybe next week. -- Job Board: http://jobs.nodejs.org/ P

Re: [nodejs] Re: Version 0.9.4 (Unstable)

2012-12-24 Thread Ben Noordhuis
On Mon, Dec 24, 2012 at 9:13 AM, darcy wrote: > node: remove idle gc > > Does this mean the "--nouse_idle_notification" option is default since this > version? The default and the only option - node.js no longer calls V8::IdleNotification(). I've put up a module[1] for people who feel they still

Re: [nodejs] Speeding up Buffer read/write floating point operations

2012-12-24 Thread Ben Noordhuis
On Mon, Dec 24, 2012 at 7:22 AM, Trevor Norris wrote: > I've been working on a patch that will speed up read/write operations on > floating point numbers > (https://github.com/trevnorris/node/compare/buffer-float). This is largely > based on the work from src/v8_typed_array.cc. There's still a lot

Re: [nodejs] Cross-compiling node.js for MIPS platform with SSL enabled

2012-12-24 Thread Ben Noordhuis
On Mon, Dec 24, 2012 at 2:48 PM, Andrei Sedoi wrote: > I am trying to cross-compile node.js for MIPS platform with SSL enabled, but > it's failing since there is no 'target_arch=="mips"' branch here: > https://github.com/joyent/node/blob/master/deps/openssl/openssl.gyp#L900-L910 > Can anyone add i

Re: [nodejs] events.js:48 throw arguments[1]; // Unhandled 'error' event

2012-12-24 Thread Ben Noordhuis
On Mon, Dec 24, 2012 at 2:54 PM, Ohad Kravchick wrote: > Do you mind elaborating or refering to a node.js bug? Those error messages should all be fixed by now. If you still get spurious messages, please open an issue in the bug tracker. -- Job Board: http://jobs.nodejs.org/ Posting guidelines:

Re: [nodejs] node.js on Solaris 10

2012-12-27 Thread Ben Noordhuis
On Thu, Dec 27, 2012 at 11:19 AM, Eugene Zheganin wrote: > Hi. > > How do you guys build it on Solaris ? Because I'm stuck. I have a Solaris 10 > server and I need to put a node.js on it. First of all I tried to build it > with default gcc 3.4.x. After fixing most of the python tools errors (I > r

Re: [nodejs] node.js on a Solaris 11.1

2012-12-27 Thread Ben Noordhuis
On Thu, Dec 27, 2012 at 12:24 PM, Eugene Zheganin wrote: > Hi. > > I'm trying to build a node.js 0.8.16 on a Solaris 11.1 machine, and I'm > getting the error: > > gmake -C out BUILDTYPE=Release V=1 > gmake[1]: Вход в каталог `/home/emz/src/node-v0.8.16/out' > > LD_LIBRARY_PATH=/home/emz/src/node-

Re: [nodejs] node.js on Solaris 10

2012-12-27 Thread Ben Noordhuis
On Thu, Dec 27, 2012 at 3:11 PM, Eugene Zheganin wrote: > Hi. > > > Thursday, Dec 27 2012, 18:07:27 UTC+6 Ben Noordhuis wrote: >> >> >> Can you try a patch? Apply it with: >> >> curl -s https://github.com/bnoordhuis/libuv/commit/6e12bff.patch | >&

Re: [nodejs] problem with node-gyp when install v8-profiler

2012-12-28 Thread Ben Noordhuis
On Fri, Dec 28, 2012 at 11:25 AM, hashi101 wrote: > I try to install v8-profiler on shared hosting(freeBSD) but get these > errors: > http://pastebin.com/mtRX2hjR > > any ideas? I'll inline the paste for posterity. > npm install v8-profiler > npm http GET https://registry.npmjs.org/v8-profiler >

Re: [nodejs] Using http client on a high volume streaming socket and I have to put split chunks of XML back together - why?

2012-12-28 Thread Ben Noordhuis
On Thu, Dec 27, 2012 at 8:51 PM, am_p1 wrote: > Just fyi, I never get an "end" since this is streaming... just "data" always > and always... and 99.99% of them are not split chunks, ie; they are complete > and valid XML. > > So I've got the merging back together mostly working but it's a pain and

Re: [nodejs] node.js on Solaris 10

2012-12-28 Thread Ben Noordhuis
On Fri, Dec 28, 2012 at 9:49 AM, Eugene Zheganin wrote: > Hi. > > Nah, it was too soon to celebrate :(. > > Although node itself is working, npm (which, as far as I understand is the > node with script attached) is crashing: > > # /usr/local/gdb/bin/gdb node core > GNU gdb (GDB) 7.5.1 > Copyright

Re: [nodejs] node.js support for passing FDs on UNIX domain sockets

2012-12-28 Thread Ben Noordhuis
On Thu, Dec 27, 2012 at 7:14 PM, Adam Chappell wrote: > I've realised, with a mixture of confusion and frustration, that the latest > versions of node.js - 0.8.16 is what I'm using - no longer seems to support > the passing of file descriptors across UNIX domain sockets. > > I was intending to use

Re: [nodejs] Using http client on a high volume streaming socket and I have to put split chunks of XML back together - why?

2012-12-28 Thread Ben Noordhuis
On Fri, Dec 28, 2012 at 3:08 PM, am_p1 wrote: > I'm using this for sure: > response.setEncoding('utf8') > > but the problem is the chunks can be split more than once and with UTF8 > strings there doesn't seem to be any character that indicates the buffer was > split. I read that JSON responses hav

Re: [nodejs] Using http client on a high volume streaming socket and I have to put split chunks of XML back together - why?

2012-12-28 Thread Ben Noordhuis
On Fri, Dec 28, 2012 at 5:42 PM, am_p1 wrote: > I doubt there's anything wrong with the XML, given the company I'm getting > the data from. And I checked already that DB2 (the parser) has no issue in > this area. And well over 3 million a day are being parsed/inserted just > fine. > > I just don't

Re: [nodejs] SyntaxError when requiring a module is uncatchable

2013-01-01 Thread Ben Noordhuis
On Tue, Jan 1, 2013 at 3:45 PM, wrote: > I have the following code: > >> try { >> require('./index.js'); >> } >> catch(e) { >> console.log('--'); >> console.log(e.stack); >> } > > > When I run the code, the following gets logged to the console: > >> C:\[path]\inde

Re: [nodejs] Using http client on a high volume streaming socket and I have to put split chunks of XML back together - why?

2013-01-03 Thread Ben Noordhuis
On Thu, Jan 3, 2013 at 4:21 PM, am_p1 wrote: > Thanks for the assist and the suggestion of paid support but I finally > figured it out. > > Had two issues, both my bad: > 1 - javascript scope of some of my variables was wrong, especially in async > node.js world ("use strict" helped me since I'm s

Re: [nodejs] Re: many node vs single with eio.setMinParallel higher than 4

2013-01-04 Thread Ben Noordhuis
On Thu, Jan 3, 2013 at 11:57 PM, am_p1 wrote: > ok, so apparently eio is gone and libuv is what i'm actually using (not > knowing the history of node makes for a confusing day) > > no wonder eio or eio-simple didn't work :-) > > so I couldn't find any min/max controls on threads anywhere so i assu

Re: [nodejs] Long connections with Node.js, how to reduce memory usage and prevent memory leak?

2013-01-04 Thread Ben Noordhuis
On Fri, Jan 4, 2013 at 6:12 AM, Aaron Wang wrote: > I raised this problem on stackoverflow, didn't get proper answers yet, any > thoughts? It's good newsgroup etiquette to post the actual question (or questions) instead of linking to a website; it lets people reply to individual questions inline.

Re: [nodejs] Re: many node vs single with eio.setMinParallel higher than 4

2013-01-04 Thread Ben Noordhuis
On Fri, Jan 4, 2013 at 5:41 PM, am_p1 wrote: > It's working great but odbc to db2 queues and backs up some. I assume > because when using ps -eLf I can see that there are still only 4 threads per > node and the number doesn't change. > > Is the thread count suppose to change dynamically with libuv

Re: [nodejs] buffer: stability improvements feedback

2013-01-04 Thread Ben Noordhuis
On Fri, Jan 4, 2013 at 9:23 PM, Trevor Norris wrote: > This is for all the committers out there. > > While working on my latest Buffers PR, noticed there are > undocumented/unenforced ways things can go wrong. Say, for example, a user > wants to extend Buffer with their own set of methods/properti

[nodejs] Re: Simple chat-room example?

2013-01-04 Thread Ben Evans
Hi Josh, If it's any use to you, when i first gave Node a shot I wrote a very basic chat app. Feel free to use it/reference: https://github.com/bencevans/Little-Chat-Script Features: * Socket.IO Realtime Messaging * Connection Indicator and that's about it but I hope it's of some help. Good

  1   2   3   4   5   6   7   8   9   10   >