Re: [nodejs] nodeconf videos?

2012-07-03 Thread Nuno Job
NodeConf has just finished, I think you will have to wait more than 3 hours to see them :) By the way the conference was spectacular :) Nuno On Tue, Jul 3, 2012 at 9:36 PM, dhruvbird wrote: > This might not be the best place to post this, but will the nodeconf > videos be available? > > -- > J

[nodejs] Re: Doing asynchronous processing before piping HTTP requests

2012-07-03 Thread mscdex
On Jul 4, 2:09 am, mark wrote: > the data event after .pause() should stop emitting events? i just > tried this and it still emits, i'am on node v 0.8.1 What if you add your 'data' event handler _before_ calling req.pause() ? -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://gi

Re: [nodejs] best practice for defining an interface

2012-07-03 Thread Dean Mao
I think it's more that nodejs is attracting server-side developers who have been accustomed to writing java-style interfaces & abstract classes so they feel strange when the language doesn't support them. I haven't seen that type of request in ruby/python server-side world. On Sun, Jul 1, 2012 a

[nodejs] Re: Doing asynchronous processing before piping HTTP requests

2012-07-03 Thread mark
so as far as i understand req.pause() req.on('data',function(){ console.log('this should not emit') }) the data event after .pause() should stop emitting events? i just tried this and it still emits, i'am on node v 0.8.1 On Jul 4, 7:35 am, Dominic Tarr wrote: > @mscdex you are correct. > >

Re: [nodejs] Re: Doing asynchronous processing before piping HTTP requests

2012-07-03 Thread Dominic Tarr
@mscdex you are correct. reading the code, in 0.8 http streams will not emit 'data' in the paused state. https://github.com/joyent/node/blob/master/lib/http.js#L117-125 which has changed from 0.6 https://github.com/joyent/node/blob/v0.6/lib/http.js#L97-107 On Wed, Jul 4, 2012 at 5:13 PM, mscd

[nodejs] Re: Doing asynchronous processing before piping HTTP requests

2012-07-03 Thread mscdex
On Jul 4, 12:24 am, Dominic Tarr wrote: > http://nodejs.org/api/stream.html#stream_stream_pause > > so, pause does not buffer. possibly changing to that behaviour will be > explored in 0.9 That's for streams in general. Check the http core module and you'll see it uses a _pendings array to buffer

[nodejs] Re: Doing asynchronous processing before piping HTTP requests

2012-07-03 Thread hasanyasin
If I were you, I would make an architectural change on system. 1. If I have control on how clients will work, I would definitely divide this into two requests. First client authorizes itself, I turn back a session key and keep it on memory to quickly look it up for the stream authorization. Whe

Re: [nodejs] best practice for defining an interface

2012-07-03 Thread Dominic Tarr
I'd probably write a function that asserted that each object implemented the right functions, and threw if something was wrong, and then call that from each file. Most people would just put that in the tests, however. to take that to the next level, you could wrap functions with functions that che

Re: [nodejs] process.env.hasOwnProperty

2012-07-03 Thread Brandon Benvie
Mission accomplished?" -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups "nodejs" group. To post to this group, send email to nodejs@googlegroups.

[nodejs] nodeconf videos?

2012-07-03 Thread dhruvbird
This might not be the best place to post this, but will the nodeconf videos be available? -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups "node

Re: [nodejs] Re: Doing asynchronous processing before piping HTTP requests

2012-07-03 Thread Dominic Tarr
If you check the current documentation: "Issues an advisory signal to the underlying communication layer, requesting that no further data be sent until resume() is called. Note that, due to the advisory nature, certain streams will not be paused immediately, and so 'data' events may be emitted fo

Re: [nodejs] Re: bus error building nodejs 0.8.0 / 0.8.1

2012-07-03 Thread Ryan Schmidt
On Jun 29, 2012, at 07:23, Ben Noordhuis wrote: > On Fri, Jun 29, 2012 at 11:10 AM, mscdex wrote: >> On Jun 29, 4:34 am, Ryan Schmidt wrote: >>> Finally, the build fails with: >>> >>> ACTION v8_snapshot_run_mksnapshot >>> out/Release/obj.target/v8_snapshot/geni/snapshot.cc >>> /bin/sh: line

Re: [nodejs] node v0.8.1 - higher memory consumption?

2012-07-03 Thread xiongjiabin
I met the same problem, add about 50m memory usage. I do not use socket.io. Here is the 0.8.1 file node result: file /usr/local/bin/node /usr/local/bin/node: ELF 64-bit LSB executable, x86-64, version 1 (GNU/Linux), dynamically linked (uses shared libs), for GNU/Linux 2.6.15, BuildID[sha1]=0x6a

[nodejs] Re: accessing a variable in a function that is exported from a module (using mapletree routing module)

2012-07-03 Thread hasanyasin
You can access the main module that node started with require.main from every module running in the same process, i.e both main module itself and all imported modules. main.js: module.touchable = "ouch!"; mdl = require('./module.js'); mdl.try_touching(); module.js: module.exports.try_touchi

[nodejs] Eclipse-based Debugger (ChromeDevTools project) 0.3.6 released

2012-07-03 Thread Peter Rybin
I'd like to promote *ChromeDevTools* Eclipse-based JavaScript debugger and its new version *0.3.6*. http://code.google.com/p/chromedevtools http://code.google.com/p/chromedevtools/wiki/Release_0_3_6 Its features should suit well for Node.JS development. Eclipse itself is platform where several

[nodejs] Re: Doing asynchronous processing before piping HTTP requests

2012-07-03 Thread mscdex
On Jul 3, 5:49 pm, Domenic Denicola wrote: > Thanks very much for pointing this out; I didn't know we would get this in > the 0.8 upgrade. Do you have any more details on the remaining piping > issue? Marco, would you recommend calling this new `pause` over using a > buffered stream? I can't find

Re: [nodejs] accessing a variable in a function that is exported from a module (using mapletree routing module)

2012-07-03 Thread josh
fast routing library. instead of using express i use plain node.js + routing lib - https://github.com/saambarati/mapleTree On Tuesday, July 3, 2012 2:49:06 PM UTC-7, Marak Squires wrote: > > What is a Maple Tree? > > On Tue, Jul 3, 2012 at 2:47 PM, josh wrote: > >> I have a variable in server.

[nodejs] Re: accessing a variable in a function that is exported from a module (using mapletree routing module)

2012-07-03 Thread mscdex
On Jul 3, 5:47 pm, josh wrote: > I have a variable in server.js. how to access it from within a function > that is exported from a module? One way is to pass it to your function like so: var usersCollections = {}; router.define( '/user', require('./routes/user.js')(usersCollections)) //routes/u

Re: [nodejs] Re: Pusher/Pubnub versus Socket.io

2012-07-03 Thread Stephen Blum
Mathew, Correct with #2 "*PubNub Plain - Send/Receive Only*" should be in fact "*PubNub Plain - Send/Receive OR PUB/SUB*" - Basically you have full control with PubNub core libarary, where as PubNub + Socket.IO you get higher level features while giving up some control of the data pipe to the

Re: [nodejs] Re: Pusher/Pubnub versus Socket.io

2012-07-03 Thread Stephen Blum
Hi Mathew, Excellent questions regarding Socket.IO on PubNub. To answer your question, I will list the two options and describe more details with pros/cons: 1. *Socket.IO + PubNub - Network Library* 1. You will pick this option to take advantage of a bunch of pre-built design p

[nodejs] Re: Doing asynchronous processing before piping HTTP requests

2012-07-03 Thread Domenic Denicola
On Friday, June 29, 2012 5:23:47 AM UTC-4, mscdex wrote: > > > Your reference for calling req.pause() "useless" is a set of mailing > list posts from early last year and things have improved at least > somewhat since then. Since node 0.7.x (specifically [1]), there > shouldn't be any 'data' ev

Re: [nodejs] accessing a variable in a function that is exported from a module (using mapletree routing module)

2012-07-03 Thread Marak Squires
What is a Maple Tree? On Tue, Jul 3, 2012 at 2:47 PM, josh wrote: > I have a variable in server.js. how to access it from within a function > that is exported from a module? > I use mapletree as my routes library that provide me define function - > > var usersCollections = {}; > router.define( '

[nodejs] accessing a variable in a function that is exported from a module (using mapletree routing module)

2012-07-03 Thread josh
I have a variable in server.js. how to access it from within a function that is exported from a module? I use mapletree as my routes library that provide me define function - var usersCollections = {}; router.define( '/user', require('./routes/user.js') //routes/user.js module.exports = user;

[nodejs] Re: Unbelievable Request...

2012-07-03 Thread hasanyasin
On Tuesday, July 3, 2012 5:34:51 PM UTC-4, hasanyasin wrote: > > @Tim: Thank you very much. For my book, I have already started working on > a website special to the book itself. I also plan writing on other sites > for short tutorials and how-to articles mostly based around the ideas > shaped

[nodejs] Re: Unbelievable Request...

2012-07-03 Thread hasanyasin
@Tim: Thank you very much. For my book, I have already started working on a website special to the book itself. I also plan writing on other sites for short tutorials and how-to articles mostly based around the ideas shaped by questions I see here and there. Thank you very much for these three

[nodejs] Re: many events transmitting small amounts of data compared to one final event transmitting all the data

2012-07-03 Thread hasanyasin
I think, the two approaches are not conflicting as in conflicting. :) Sending line by line or in very tiny amounts as data becomes available can be what you need in case of reading a file as it is written. Sending data in bigger chunks is a better approach if you have big amounts of data. In yo

Re: [nodejs] Default interfaces

2012-07-03 Thread Tim Caswell
I am working on such a file system interface. See it at http://github.com/c9/vfs. We use it internally in the new cloud9 version. On Sat, Jun 30, 2012 at 4:50 AM, Felix Böhm wrote: > Hello, > > after reading the Database API > thread,

Re: [nodejs] Running Node JS 0.8.0 FreeBSD 9

2012-07-03 Thread Ben Noordhuis
On Tue, Jul 3, 2012 at 3:02 PM, Ben Noordhuis wrote: > On Tue, Jul 3, 2012 at 2:02 PM, Ben Short wrote: >> Hi, >> >> Is it possible to run Node JS 0.8.0 on FreeBSD? >> >> I ask because libuv doesn't start that FreeBSD is a supported operating >> system and Node JS no uses libuv. >> >> Thanks >> >

[nodejs] many events transmitting small amounts of data compared to one final event transmitting all the data

2012-07-03 Thread P. Douglas Reeder
Don't "optimize" prematurely. Unless you've run tests that show sending each match separately is a problem because of inefficiency, don't batch your sends. If tests show it is a problem, you might calculate how many matches would fit in an IP packet, and aim for a little under. -- Job Board:

Re: [nodejs] spawn and stdout in 8.1

2012-07-03 Thread Alan Gutierrez
On 7/3/12 3:51 PM, Joshua Holbrook wrote: On Tue, Jul 3, 2012 at 12:47 PM, Mark Hahn wrote: Thanks... I guess I'll have to wait until modules I use have been updated for 0.8. > > I'd just start patching them, especially if the library's just > shelling out on the backend. Seems like it wouldn

Re: [nodejs] spawn and stdout in 8.1

2012-07-03 Thread Joshua Holbrook
I'd just start patching them, especially if the library's just shelling out on the backend. Seems like it wouldn't be too bad. :) --Josh On Tue, Jul 3, 2012 at 12:47 PM, Mark Hahn wrote: > Thanks... > > I guess I'll have to wait until modules I use have been updated for 0.8. > > > On Tue, Jul 3,

Re: [nodejs] spawn and stdout in 8.1

2012-07-03 Thread Mark Hahn
Thanks... I guess I'll have to wait until modules I use have been updated for 0.8. On Tue, Jul 3, 2012 at 12:28 PM, Charlie McConnell < char...@charlieistheman.com> wrote: > The most likely cause is that you now want to listen for the 'close' event > instead of 'exit'. 'exit' now fires when the

Re: [nodejs] spawn and stdout in 8.1

2012-07-03 Thread Charlie McConnell
The most likely cause is that you now want to listen for the 'close' event instead of 'exit'. 'exit' now fires when the child actually exits, 'close' fires when all stdio streams have closed. On Tue, Jul 3, 2012 at 11:25 AM, Mark Hahn wrote: > After switching to 8.1 several modules I use, like

Re: [nodejs] devil's advocate: why would I choose nodejs over MVC + IIS?

2012-07-03 Thread Martin Wawrusch
I agree with Dan on this one. The key benefits of node.js vs C#/IIS (I have been doing that since 2000): * Pleasant development experience * Access to the newest technologies and ides (just remember the drama getting coffeescript, sass etc support in the VS environment) * The module system (npm)

Re: [nodejs] devil's advocate: why would I choose nodejs over MVC + IIS?

2012-07-03 Thread Dan Milon
About performance, from my POV the differences are the concurrency models each platform uses. From one side, IIS has a thread pool, one thread per connection and blocking IO. At the other hand, node has one thread, and non blocking IO. First approach problem is that memory consumption is incr

Re: [nodejs] Re: Running Node JS 0.8.0 FreeBSD 9

2012-07-03 Thread Nathan Rajlich
Cool, I had a feeling it would be :) On Tue, Jul 3, 2012 at 11:30 AM, Ben Noordhuis wrote: > On Tue, Jul 3, 2012 at 8:08 PM, Nathan Rajlich > wrote: > > It looks like gyp is recognizing your OS as linux instead of FreeBSD. > > Possibly a gyp bug. > > It is but it's fixed upstream. I'll upgrade

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

2012-07-03 Thread Marc
I already knew this link, Ben. And I applied the changes to the C code. But there is some JavaScript code like this: var IOWatcher = process.binding('io_watcher').IOWatcher this._watcher = new IOWatcher; this._watcher.callback = this._flush.bind(this); this._watcher.set(this._fd, true, false); t

Re: [nodejs] Re: Running Node JS 0.8.0 FreeBSD 9

2012-07-03 Thread Ben Noordhuis
On Tue, Jul 3, 2012 at 8:08 PM, Nathan Rajlich wrote: > It looks like gyp is recognizing your OS as linux instead of FreeBSD. > Possibly a gyp bug. It is but it's fixed upstream. I'll upgrade gyp before the next release. -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.

[nodejs] devil's advocate: why would I choose nodejs over MVC + IIS?

2012-07-03 Thread Justin Collum
Had a discussion with a friend about Nodejs the other day. We are both C# / MVC / ASP.NET devs, with about 10 years experience. He asked me why someone would choose Nodejs over IIS + MVC . My argument was 1) performance 2) non-blocking IO. Keep in mind that I don't know a lot about node, I'v

[nodejs] Re: Unbelievable Request...

2012-07-03 Thread Justin Collum
Done. I'd minimize the chattiness of the conversation though. Things like: -- I have divided the work into pieces and every process will work on one of these pieces in parallel. -- Why don't you create threads? -- Sorry, I don't think it is usable. You can take your computer if you want? -- N

[nodejs] spawn and stdout in 8.1

2012-07-03 Thread Mark Hahn
After switching to 8.1 several modules I use, like imagemagick, seem to be having trouble getting stdout back from a spawn. Did something change in spawn? -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received t

Re: [nodejs] newbie question iso-8859-15

2012-07-03 Thread Mike Pilsbury
Or iconv-lite, which is pure JavaScript. -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups "nodejs" group. To post to this group, send email to no

Re: [nodejs] Re: Running Node JS 0.8.0 FreeBSD 9

2012-07-03 Thread Nathan Rajlich
It looks like gyp is recognizing your OS as linux instead of FreeBSD. Possibly a gyp bug. On Tue, Jul 3, 2012 at 10:32 AM, mscdex wrote: > Here is an error I get when trying to build the node 0.8.1 tarball on > FreeBSD 9 32-bit: > > In file included from ../deps/uv/src/unix/eio/eio.c:41: > ../de

Re: [nodejs] node v0.8.1 - higher memory consumption?

2012-07-03 Thread Ben Noordhuis
On Tue, Jul 3, 2012 at 6:02 PM, chusi wrote: > I updated nodejs on a ubuntu server (10.04.3 LTS) from v0.6.17 to v0.8.1. > The applications consists of a bunch of scripts that all connect together > over socket.io. I'm monitoring the memory usage i receive from > process.memoryUsage().rss and grap

[nodejs] Re: many events transmitting small amounts of data compared to one final event transmitting all the data

2012-07-03 Thread mscdex
On Jul 3, 1:49 pm, mscdex wrote: > fs.createReadStream. An example is [1] (you can substitute 'on' for > 'addListener'). Err... you can replace 'addListener' with 'on' :-) -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guideli

[nodejs] Re: many events transmitting small amounts of data compared to one final event transmitting all the data

2012-07-03 Thread mscdex
On Jul 3, 1:08 pm, Adeel Qureshi wrote: > yeah thats a good point .. i did noticed that for long response requests it > tends to disconnect the client and then the response never completes .. > however i am using socket.io so isnt that supposed to use websockets for > chrome and it still ends up d

[nodejs] node v0.8.1 - higher memory consumption?

2012-07-03 Thread chusi
I updated nodejs on a ubuntu server (10.04.3 LTS) from v0.6.17 to v0.8.1. The applications consists of a bunch of scripts that all connect together over socket.io. I'm monitoring the memory usage i receive from process.memoryUsage().rss and graph it. I recognized that all my scripts at least do

[nodejs] Re: Running Node JS 0.8.0 FreeBSD 9

2012-07-03 Thread mscdex
Here is an error I get when trying to build the node 0.8.1 tarball on FreeBSD 9 32-bit: In file included from ../deps/uv/src/unix/eio/eio.c:41: ../deps/uv/src/unix/eio/config_linux.h:4:27: warning: linux/version.h: No such file or directory ../deps/uv/src/unix/eio/config_linux.h:5:22: warning: fea

[nodejs] Re: Running Node JS 0.8.0 FreeBSD 9

2012-07-03 Thread Eric S
On Tuesday, July 3, 2012 5:02:44 AM UTC-7, Ben Short wrote: > > Is it possible to run Node JS 0.8.0 on FreeBSD? > I can't speak to its stability, but the current node-devel port currently installs 0.8.1. No clue why that's the case, as 0.8.X isn't a devel branch, and both ports are managed b

[nodejs] Re: many events transmitting small amounts of data compared to one final event transmitting all the data

2012-07-03 Thread Adeel Qureshi
yeah thats a good point .. i did noticed that for long response requests it tends to disconnect the client and then the response never completes .. however i am using socket.io so isnt that supposed to use websockets for chrome and it still ends up disconnecting the client infact another thing

Re: [nodejs] Running Node JS 0.8.0 FreeBSD 9

2012-07-03 Thread Nathan Rajlich
Invoke "./configure" from the root directory of the node source tree. On Tue, Jul 3, 2012 at 6:25 AM, Ben Short wrote: > Hi Ben, > > Thanks. > > FYI I get the following error when trying to configure version 0.8.0 > > [ben@freebsd ~/node-v0.8.1/build]$ ../configure > { 'target_defaults': { 'cfla

Re: [nodejs] Re: Unbelievable Request...

2012-07-03 Thread Tim Caswell
http://nodemanual.org/, http://docs.nodejitsu.com/, http://nodetuts.com/ On Sat, Jun 30, 2012 at 10:59 PM, hasanyasin wrote: > Thank you very much. howtonode is a blog so it is kind of different than > what I am doing. I will probably do it on a separate website designed for > this. > > Thank yo

[nodejs] Re: many events transmitting small amounts of data compared to one final event transmitting all the data

2012-07-03 Thread mscdex
On Jul 3, 10:25 am, Adeel Qureshi wrote: > hmm conflicting answers :) i guess ill try to run a test with a lot of data > and see which approach works more consistent .. meaning doesnt leads to > disconnects .. thanks for the input .. ill post my findings Additionally, in case the client disconnec

Re: [nodejs] Re: Pusher/Pubnub versus Socket.io

2012-07-03 Thread Matthew O'Riordan
Thanks for the wonderfully detailed response Stephen, but I hope you can answer one last question. I understand your point about Socket.io being a higher-level interface, but I am still struggling to understand a good use case for using Socket.IO with PubNub. Perhaps I am being a bit thick. C

[nodejs] Re: many events transmitting small amounts of data compared to one final event transmitting all the data

2012-07-03 Thread Adeel Qureshi
hmm conflicting answers :) i guess ill try to run a test with a lot of data and see which approach works more consistent .. meaning doesnt leads to disconnects .. thanks for the input .. ill post my findings On Monday, July 2, 2012 8:10:19 PM UTC-5, mscdex wrote: > > On Jul 2, 7:28 pm, Adeel Qu

Re: [nodejs] Convention for supporting proxying of outbound HTTP traffic from Node libraries

2012-07-03 Thread Daniel Rinehart
Support for environment driven enabling of HTTP(S) proxies would be great. I'd propose that they be separate parameters similar to Java. Something along the lines of: HTTP_PROXY_HOST HTTP_PROXY_PORT (default 80) HTTPS_PROXY_HOST HTTPS_PROXT_PORT (default 443) -- Daniel R. [http://danielr.neophi.

Re: [nodejs] Re: Testing: best practices

2012-07-03 Thread José F . Romaniello
I started this little thing to load a module in a sandbox where i can swap the result of a require() call: https://github.com/jfromaniello/mockuire it load the module in a sandbox and only the code, so it is not cached and i dont need to clean up anything. I didnt need sinon in node.js, but

Re: [nodejs] Running Node JS 0.8.0 FreeBSD 9

2012-07-03 Thread Ben Short
Hi Ben, Thanks. FYI I get the following error when trying to configure version 0.8.0 [ben@freebsd ~/node-v0.8.1/build]$ ../configure { 'target_defaults': { 'cflags': [], 'default_configuration': 'Release', 'defines': [], 'incl

Re: [nodejs] newbie question iso-8859-15

2012-07-03 Thread Ben Noordhuis
On Tue, Jul 3, 2012 at 11:32 AM, KLRUMPF wrote: > Hi all, > > I am new to this list. I have larger 4GL applications running with a > mysql in iso and would like to avoid switching the whole system > (debian) to unicode. Also have lots of Spanish and French and > German umlaut in the application an

Re: [nodejs] Running Node JS 0.8.0 FreeBSD 9

2012-07-03 Thread Ben Noordhuis
On Tue, Jul 3, 2012 at 2:02 PM, Ben Short wrote: > Hi, > > Is it possible to run Node JS 0.8.0 on FreeBSD? > > I ask because libuv doesn't start that FreeBSD is a supported operating > system and Node JS no uses libuv. > > Thanks > > Ben Hi, namesake. FreeBSD is not an officially supported platf

[nodejs] newbie question iso-8859-15

2012-07-03 Thread KLRUMPF
Hi all, I am new to this list. I have larger 4GL applications running with a mysql in iso and would like to avoid switching the whole system (debian) to unicode. Also have lots of Spanish and French and German umlaut in the application and the data, all running smoothly and simple to maintain so

Re: [nodejs] process.env.hasOwnProperty

2012-07-03 Thread Alan Gutierrez
On 6/30/12 2:17 AM, Brandon Benvie wrote: "Unterminated string literals ಠ_ಠ I don't understand this at all. I'd really appreciate a link, because all Google talks about are errors. How are Unterminated string literals "offloading the need to treat an API as asynchronous". -- Alan Gutierrez

Re: [nodejs] Web scraping and Memory leaking issue

2012-07-03 Thread Dan Milon
It is hard to read your code inside the email (you can use gist etc) you pop your links array all the time and check page and push page's links to links array But in this way the pages that are under investigation at a specific time are increasing exponentially, thus the high memory footprint. S

[nodejs] Running Node JS 0.8.0 FreeBSD 9

2012-07-03 Thread Ben Short
Hi, Is it possible to run Node JS 0.8.0 on FreeBSD? I ask because libuv doesn't start that FreeBSD is a supported operating system and Node JS no uses libuv. Thanks Ben -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guide

Re: [nodejs] Web scraping and Memory leaking issue

2012-07-03 Thread ec.developer
Thanks for cheerio =)) Have removed the jsdom with cheerio. Now after 6000 pages are checked - only ~200MB of RSS memory is used. It continue growing, but not so fast as it was earlier. On Tuesday, July 3, 2012 7:13:54 AM UTC+3, node-code wrote: > > +1 for Cheerio. > > On Tue, Jul 3, 2012 at 9:4

[nodejs] Re: Testing: best practices

2012-07-03 Thread Evgeny Bogdanov
Well, maybe I overdo the unit tests. Right now, I mock every external thing the function calls. I want it to be completely separated from all other things (be able to run without db, without internet, without browser) Alexey, what would be your test for this controller function without db mocking

[nodejs] Re: Testing: best practices

2012-07-03 Thread Evgeny Bogdanov
Thanks for the answers. I use expresso + should + gently Will switch to mocha + should + (gently?sinon) Question to sinon users: can it mock the required modules like gently does? https://github.com/felixge/node-gently#gentlyhijackrealrequire Could you post links to your code (if you can) where I

Re: [nodejs] Re: trying to wrap my head around "promises" - async vs Q

2012-07-03 Thread Bruno Jouhier
Hi José Transforming *every* construct of Javascript is exactly what streamline.js does. Here is a typical piece of code: function mongoSearch(_, q) { var t0 = new Date(); var db = new mongodb.Db('tutorial', new mongodb.Server("127.0.0.1", 27017, {})); db.open(_); try {