Re: [nodejs] Nodejs Search Engine

2016-04-20 Thread Peter Rust
If it's just a proof-of-concept, it may be simpler to use something embedded like sqlite's Full Text Search, than firing off requests to a different process or different server. Note that a SQLite approach won't scale (at least, not without a significant amount of forethought, planning,

Re: [nodejs] Node V5 has issues with installing behind proxies

2015-12-01 Thread Peter Rust
Any idea why 0.12 would behave differently? On Monday, November 30, 2015 at 2:01:07 PM UTC-8, Ben Noordhuis wrote: > > On Mon, Nov 30, 2015 at 6:42 PM, Wyatt Biker > wrote: > > I am behind corporate proxy. I ve tried everything under the sun with > flags > > and configs.

Re: [nodejs] Good idea to auto-update using npm?

2015-08-30 Thread Peter Rust
Auto-updating is probably not what users expect when installing software with npm. I agree. If you're distributing via npm, then it should be a dev-facing product... and most developers will want to be in the driver's seat regarding when to update and if so, to what version (jumping to the

[nodejs] Re: Accessing stack traces of an Error object is extremely slow

2015-06-26 Thread Peter Rust
any possible workarounds, besides not logging the stack trace? This might fall under the not logging the stack trace category, but I typically only log the stack trace when there is an error. This way I only get the performance hit under infrequent circumstances, via if (err) return

[nodejs] Re: Newbie Question

2015-06-21 Thread Peter Rust
Ray, When you browse to http://www.google.com/, it is actually going to http://www.google.com:80/ -- the port 80 is the default for http, it's implied if you don't specify a number. So all you need to do is serve on port 80 and then the end user won't need to type a port number. A lot of

Re: [nodejs] Large process getting slower and slower

2015-06-06 Thread Peter Rust
Jimb: Thanks for the correction! Perhaps the joyent FAQ https://github.com/joyent/node/wiki/FAQ#what-is-the-memory-limit-on-a-node-process wiki page needs an update? (The limit can be raised by setting --max_old_space_size to a maximum of ~1024 (~1 GiB) (32-bit) and ~1741 (~1.7GiB) (64-bit))

Re: [nodejs] Large process getting slower and slower

2015-06-04 Thread Peter Rust
* what is the best way to determine what my memory footprint is* The *easiest* way is process.memoryUsage() https://nodejs.org/api/process.html#process_process_memoryusage, the *best* way depends on what exactly you want (there are some cool analytics/memory profiling tools in the

[nodejs] Re: Large process getting slower and slower

2015-06-04 Thread Peter Rust
If the time is exponentially increasing, it could be an indication that each iteration is adding event handlers and that old event handlers from previous iterations are being inadvertently fired. As zladuric mentions, you'll want to use a debugger or logging to get some insight into what your

[nodejs] Re: variable scope in for loops

2015-05-24 Thread Peter Rust
As others have said, we need more code to know for sure, but given the subject line, variable scope in for loops and the fact that you're using node, there's a decent chance that you're running into the gotcha described in the MDN article on Closures: Creating closures in loops: A common

[nodejs] Re: Error handling philosophy, when should you cb(err), cb(err, object) or cb(null, object) for non-success conditions

2015-05-18 Thread Peter Rust
Owen, I could be wrong, but I think your question stems from the only use exceptions for exceptional things philosophy. This philosophy is partly due to performance considerations http://blog.codinghorror.com/creating-more-exceptional-exceptions/ and mostly from the way exceptions bubble

[nodejs] Re: Announcement: CMake.js - a Node.js/io.js native addon build tool

2015-05-09 Thread Peter Rust
Looks very cool Gabor -- thanks for your work on this! -- 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/Mailing-List-Posting-Guidelines --- You received this message

[nodejs] Re: desktop wallpaper

2015-04-09 Thread Peter Rust
Sindre Sorhus, Very cool! One critique, though: I noticed that the underlying win-wallpaper module calls wallpaper.exe, which is included in the repo, but I couldn't find any indication of what the exe is built from... is it open-source? Shipping an exe without the source instructions on

[nodejs] Re: Cannot comprehend module-based inheritance and composition

2015-03-03 Thread Peter Rust
Aaron, When I dropped the above into 3 text files and ran them (with Node 0.10), I got an error about ENV being undefined, so I changed it to process.ENV and then got the expected output. I put the two calls to test() at the end of server.app.js: var Server = require('./Server'); // the

[nodejs] Re: Cannot comprehend module-based inheritance and composition

2015-03-03 Thread Peter Rust
Aaron, As an aside: you seem to have a strong drive for conceptual purity and solid object-oriented design patterns and correctness. While these are not completely dismissed in the Node community, I think you will find them much less emphasized than in the Java and C# communities. Design

[nodejs] Re: understanding node documentation for sockets

2015-03-02 Thread Peter Rust
bullet-pointed bits on an event are objects in your event handler? Yes, the bullets are the arguments passed to the event handler. -- peter -- Job board: http://jobs.nodejs.org/ New group rules: https://gist.github.com/othiym23/9886289#file-moderation-policy-md Old group rules:

Re: [nodejs] Re: Node.js foundation

2015-02-18 Thread Peter Rust
Issac Roth, Yes, thank you for posting and for taking the time to write the article so Node's userbase knows what's happening. I didn't realize StrongLoop was involved in the foundation; that's good to hear. -- Peter Rust -- Job board: http://jobs.nodejs.org/ New group rules: https

[nodejs] Re: Query Regarding Node JS

2015-02-17 Thread Peter Rust
Krishan, The first thing that comes to mind is the open-source stack under yet's Talky https://talky.io/ video chat called Otalk https://otalk.org/. The standard they're using is WebRTC (more info at SimpleWebRTC https://simplewebrtc.com/). Here are a few other OTalk links that may be

Re: [nodejs] Node.js interpreter as a C/C++ library

2015-02-16 Thread Peter Rust
https://github.com/riolet/nope.c, node.c https://github.com/trevnorris/node.c, or a combo of tiny clibs https://github.com/clibs/clib/wiki/Packages) with skia https://code.google.com/p/skia/ or cairo http://cairographics.org/ for cross-platform graphics/GUI. -- Peter Rust -- Job board: http

Re: [nodejs] Node.js interpreter as a C/C++ library

2015-02-16 Thread Peter Rust
Daniel, I missed a C/C++ implementation of Node's API: https://github.com/plenluno/libnode -- peter -- Job board: http://jobs.nodejs.org/ New group rules: https://gist.github.com/othiym23/9886289#file-moderation-policy-md Old group rules:

Re: [nodejs] Foxed by the 'juggling async' learnyounode lesson

2015-01-19 Thread Peter Rust
internally). -- Peter Rust Cornerstone Systems On Sunday, January 18, 2015 at 7:25:50 PM UTC-8, tomg...@gmail.com wrote: Ah yes! Thank you serapath, I figured it out from what you said (and I really was being stupid!) To clarify for anyone reading: the loop kicks off the callbacks

[nodejs] Re: nodes js module for desktop apps

2014-07-09 Thread Peter Rust
Rohit, Which of these modules are recommended for use? I haven't used Qt or GTK with Node, so I can't give any recommendations there... There may be some alternatives: it looks like there are bindings for wxWidgets, OpenVG and some OpenGL-related libraries (GLFW, GLEW and SDL). Though

[nodejs] Re: How to write code for routing and route handler's using nodejs(without using frameworks line express/compound)

2014-07-02 Thread Peter Rust
There's a very simple router here that's just a switch statement with regex patterns: http://www.idryman.org/blog/2013/08/16/minimal-nodejs-router/ -- Job board: http://jobs.nodejs.org/ New group rules: https://gist.github.com/othiym23/9886289#file-moderation-policy-md Old group rules:

[nodejs] Re: Creating a worker to pull messages off redis

2014-06-14 Thread Peter Rust
Jason, I couldn't spot anything in your code that would lead to the behavior you describe, but one option would be to use async.queue() with concurrency=10, or to use async.cargo() with payload=10... -- peter rust -- Job board: http://jobs.nodejs.org/ New group rules: https

Re: [nodejs] Best way to search through a big plain object

2014-05-19 Thread Peter Rust
On the in-core vs DB front, NeDB (https://github.com/louischatriot/nedb) might be worth considering -- it's a DB that runs in-core (implemented in JS) -- embedded/in-memory. To avoid having thousands/millions of objects in JS (which can kill performance due to garbage collection / tracking),

[nodejs] Re: Efficient node.js IPC

2014-05-15 Thread Peter Rust
-unix-sockets/ http://stackoverflow.com/a/18226566/194758 -- peter rust On Wednesday, May 14, 2014 12:42:58 AM UTC-7, greelgorke wrote: you could put a message queue between your udp and web servers. in this case you could scale them independently. as long as a delay between udp inbound

[nodejs] Re: unit testing using JSTestDriver

2014-05-09 Thread Peter Rust
Reza, Sorry, I just now noticed JSTestDriver in the subject. JSTestDriver is intended for browser javascript, not node javascript -- so your code either needs to not have any requires in it, or if it's built for node you need to browserify it before testing it, or if it's built for a

[nodejs] Re: unit testing using JSTestDriver

2014-05-08 Thread Peter Rust
Assuming you're testing javascript that is intended to run in node (javascript with require()s in it), you should run the tests in node, not the browser. That said, it's possible to browserify your node javascript to get it to run in the browser, but it's better and simpler to test node

[nodejs] Re: Security Issue

2014-05-07 Thread Peter Rust
-in-git.html) encourage checking node_modules into source control. Wouldn't this include machine-generated data, including the .lock-wscript file? Or would that be excluded by a .gitignore rule? -- peter rust -- Job board: http://jobs.nodejs.org/ New group rules: https://gist.github.com/othiym23

[nodejs] Re: Visual modelling design tools for node and web dev in general?

2014-05-06 Thread Peter Rust
Up Front (BDUF / waterfall). See: http://blog.izs.me/post/146672514/going-fast-frankenstein-and-refactoring http://blog.izs.me/post/48281998870/unix-philosophy-and-node-js http://martinfowler.com/articles/designDead.html -- peter rust -- Job board: http://jobs.nodejs.org/ New group rules

[nodejs] Re: Visual modelling design tools for node and web dev in general?

2014-05-06 Thread Peter Rust
One more thing: something that readily lends itself to the process of modelling a web app If you're after modeling the UI, http://balsamiq.com/ has worked well for us. -- peter -- Job board: http://jobs.nodejs.org/ New group rules:

[nodejs] Re: Reporting security concerns

2014-04-24 Thread Peter Rust
I'm also of the opinion that security isn't secrecy. If there is a security concern with node itself, then it's probably best for the whole community to know To quote isaacs re: a similar security

[nodejs] Re: Please advice on how to read variables and values from a Text File

2014-04-22 Thread Peter Rust
Dino, The most common plain-text format for this kind of thing in the npm community is JSON, which has native support via require() and via JSON.parse() / JSON.stringify(). It is used by node's/npm's package.json file. But there are plenty of people who prefer YAML or other alternatives and

[nodejs] Re: Write nodejs in java

2014-04-15 Thread Peter Rust
upuldi, most of the issues with nodejs is due to the fact that developers have to write javascript Developers who are transitioning to Node from Java (or a similar statically typed language like C++ or C#) may find it difficult to learn and/or appreciate a dynamic language like Javascript

[nodejs] Re: Creating a innosetup executable that would install nodejs on a windows system

2014-04-08 Thread Peter Rust
Assuming you actually want/need to run node *as a service*, it looks like your best bet is the module that this stackoverflow answer links to: http://stackoverflow.com/a/20724855. If you were to write something like that yourself, from scratch, you could follow the advice in this

[nodejs] Re: Node.js and datagrids, how do they work?

2014-04-01 Thread Peter Rust
If you're looking for a simple way to get the data from node to a web browser, your best bet would probably be to use a RESTful node.js server, coupled with a client-side data-grid that communicates with a REST server. There are a lot of REST servers available for node.js and a lot of

[nodejs] Re: What do I use for my client side development?

2014-03-22 Thread Peter Rust
Backbone.js is still a high-quality popular option for a client-side framework (though it lost the new kid on the block status to angular :-). Really any client-side framework should work well with express. That said, if this is a hobby project or you really aren't interested in clean

[nodejs] Re: Continuous Delivery , Versioning Artefacts with nodejs

2014-03-20 Thread Peter Rust
I'm not really experienced in this area, but some in the node community say that checking in your dependencies is better than using npm shrinkwrap: http://www.futurealoof.com/posts/nodemodules-in-git.html. The Golang community has the same stance. Here's one relevant paragraph from the above

Re: [nodejs] v0.12 Release

2014-02-23 Thread Peter Rust
What is left for 0.12 release (apart from bug fixes). ? Looks like there are 34 open issues slated for the 0.12 milestone: https://github.com/joyent/node/issues?milestone=17state=open -- peter -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines:

Re: [nodejs] blog post: Why We’ve Bet on Node plus Streamline (Hint: It’s Productivity)

2014-01-08 Thread Peter Rust
Seth, Thanks for the post and the write-up. It took me a year of full-time node programming -- all the while loving callbacks and caolan's async library -- until I finally reached some of the same conclusions. I landed on generators instead of streamline, but it's the same basic idea. None of

Re: [nodejs] blog post: Why We’ve Bet on Node plus Streamline (Hint: It’s Productivity)

2014-01-08 Thread Peter Rust
Alex, The biggest drawback so far was that debugger can't step in async calls, don't know what to do about it I always stick a breakpoint on the first line inside the callback and hit the run button, then remove the breakpoint. It's annoying -- especially if you need to step through a bunch

[nodejs] Re: Learning NodeJS: what's important?

2013-12-17 Thread Peter Rust
Orthoducks, In response to the subject line (what's important to learn about NodeJS), I was going to encourage you to play the Stream Adventure game -- but Mikeal beat me to the punch with the link to nodeschool.io, which includes Stream Adventure. The one thing I would encourage learning

Re: [nodejs] Re: Learning NodeJS: what's important?

2013-12-17 Thread Peter Rust
Orthoducks, I'm not sure I've gotten a direct answer to my title question, What's important? Perhaps I should have phrased it as What's the most useful way to approach learning Node.js, given my background and interests? Yeah, I don't think the cookbook is really an introductory book

[nodejs] Re: quick question about semver

2013-12-14 Thread Peter Rust
Someone more knowledgeable can correct me if I'm wrong, but to me it looks like the docs (https://npmjs.org/doc/json.html#version) only require that the version string be *parseable* by semver, not that they actually follow semantic versioning. I think I've seen modules that follow node's

[nodejs] Re: Can't install karma

2013-12-14 Thread Peter Rust
Luca, Looks like it's a postinstall problem with a package that karma depends on called chokidar. It looks like chokidar is supposed to work on Windows, but there may intermittent issues with the postinstall script, see:

Re: [nodejs] Node.JS for sysadmin scripting or non-web stuff - books, guides, examples?

2013-11-23 Thread Peter Rust
I have to agree with ravi, lith Matt. If you use node 24x7 for other things, then I guess it would make sense to use it for a few sysadmin scripts on the side, but it's not really the best fit. Personally I've written a few sysadmin scripts in Python as well as Node and found Python to be

[nodejs] Re: how to run node.js server on windows machine?

2013-11-18 Thread Peter Rust
It is not common or well-supported to run node directly from Apache. There are some attempts at a mod_node module that would allow this, but it doesn't look like the development has gotten very far. You can run Apache as a proxy to node, but that doesn't make a lot of sense from a performance

[nodejs] Re: How to do a PostgreSQL COPY with Node.JS?

2013-11-18 Thread Peter Rust
The brianc/node-postgres library is the main pg library for node, but the author, BrianC, is concerned about it growing too bloated and has been working recently to spin off non-core functionality into 3rd party modules. node-pg-copy-streams is one of these: Instead of adding a bunch more code

[nodejs] Re: NeDB question

2013-11-18 Thread Peter Rust
Perhaps Paul meant to just link to the repo, meaning go read the docs, but accidentally linked to the issues page? Oh -- now that I look into it -- perhaps it is actually a missing feature that you could open an issue about to see if the maintainer would be open to a pull request with the new

[nodejs] Re: WebSql and opendatabase

2013-10-27 Thread Peter Rust
surgemcgee, Thanks for your work on this! It's good to see your work split into two modules -- the opendatabase wrapper split from the indurate library -- so that people can use one without the other if they want. FWIW, the auto-generated openDatabase link under dependencies doesn't work

[nodejs] Re: Error handling: current state of affairs?

2013-10-27 Thread Peter Rust
Benjamin, You may find TJ Holowaychuk's Koa.js https://github.com/koajs/koainteresting -- middleware using generators. Apparently there are big performance benefits and you can catch both sync and async errors with try/catch... but as others have said, it's experimental: you have to be on the

Re: [nodejs] Re: Error handling: current state of affairs?

2013-10-27 Thread Peter Rust
Thanks for the pointers, Forrest, I'll definitely take a look! And thanks for the update on framework/middleware support for domains. -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message

Re: [nodejs] How do I install pdfsnag in NodeJS?

2013-10-23 Thread Peter Rust
I'm on Node 0.8.9 and Windows 7 and it appears to have installed without issue: C:\Users\prustnpm install pdfsnag npm http GET http://registry.npmjs.org/pdfsnag npm http 200 http://registry.npmjs.org/pdfsnag npm http GET http://registry.npmjs.org/pdfsnag/-/pdfsnag-0.1.5.tgz npm http 200

Re: [nodejs] how to have equivalent config on Node.js web server?

2013-10-23 Thread Peter Rust
My first thought was that you could keep your current config and run Node on top of Apache as a module, much as people run PHP and Perl via mod_php and mod_perl. However, I could only find one mod_nodehttps://github.com/aredridel/mod_nodeand it is preview code (expect it to only barely work.

[nodejs] Re: Questions/suggestions for nodejs stream object mode

2013-10-22 Thread Peter Rust
I'm no expert on streams, but when I was at nodeconf I did ask substack whether I could stream objects with node streams and IIRC his response was that that was what objectMode was for. It didn't sound at all like objectMode was just for strings/binary data. -- -- Job Board:

[nodejs] Re: Questions/suggestions for nodejs stream object mode

2013-10-22 Thread Peter Rust
The docs (http://nodejs.org/api/stream.html#stream_object_mode) seem pretty clear: Normally, Streams operate on Strings and Buffers exclusively. Streams that are in object mode can emit generic JavaScript values other than Buffers and Strings. -- -- Job Board: http://jobs.nodejs.org/ Posting

[nodejs] Re: Can we get openDataseSync into node?

2013-10-17 Thread Peter Rust
You could write a wrapper around node's main SQLite modulehttps://github.com/mapbox/node-sqlite3to make it conform to the WebSQL API, but I doubt you'll get a lot of traction from others, as WebSQL is deprecatedhttp://www.w3.org/TR/webdatabase/#status-of-this-documentin favor of IndexedDB

[nodejs] Re: npm hanging on Windows XP

2013-10-14 Thread Peter Rust
If it's related to the changes to npm config, you might verify that the npm config file (C:\Users\username\.npmrc on Win7) was deleted. It would probably be a good idea to save a copy somewhere, so that if that was the problem, you can report back to the group what it was in the config file

Re: [nodejs] How to prevent disasters caused by the callback getting called multiple times?

2013-10-03 Thread Peter Rust
The async flow-control library (https://github.com/caolan/async/pull/200) goes as far as to throw an error when a callback is called multiple times. Sure, you could mask the problem via the once library mentioned above or _.once (http://underscorejs.org/#once), but I agree with jmar777 --

[nodejs] Re: node.js only web site

2013-09-15 Thread Peter Rust
Reza, As the others have said, Express is lightweight, as far as frameworks go. If your needs are small, there's no need for a framework, but it will take some time to learn the edges and the details of how things work. You could do it all by hand with the http module. Here's the example on

[nodejs] Re: using twitter-bootsrap modules examples with node

2013-09-14 Thread Peter Rust
I usually use the node-static module ( https://github.com/cloudhead/node-static) for serving static files; I've had good success with it so far. I usually put all the static files in a tree of folders underneath one 'public' folder, but I suppose you could call it 'assets' or whatever you

Re: [nodejs] Because curiosity wins, nodejs embedded into PHP?

2013-09-12 Thread Peter Rust
The kind of integration you're talking about would take quite a bit of low-level C/C++ work and I don't think anyone has done it. You would probably be better off finding an alternative to AppJS that supports PHP, like TideSDK (previously Titanium Desktop): http://www.tidesdk.org/. There are

[nodejs] Re: GUI design advice

2013-09-09 Thread Peter Rust
Mathew Benson, I haven't seen a high-quality drag-and-drop layout editor that just works, though I have seen some attempts, like https://jetstrap.com/ (but I had issues trying to use it for anything real or complex). If you are interested in automating the layout of hundreds of objects and

[nodejs] Re: Is there any methods for using Web Sql in Nodejs

2013-09-06 Thread Peter Rust
The active sqlite module in node is https://github.com/developmentseed/node-sqlite3, it has an async API (like websql). The repository you found is an older one -- the last commit was 2 years ago, tested with node 0.4 (currently node is at 0.10). It does not have an async API (it is

Re: [nodejs] Is it possible to break v8's memory limitation?

2013-08-21 Thread Peter Rust
If all you need is a hash table, there are a lot of hash table C/C++ libraries that you could integrate with Node (like Judyhttp://judy.sourceforge.net/) and there are a few that have already been integrated, like https://npmjs.org/package/hashtable (that specifically lives outside of v8's

Re: [nodejs] Is it possible to break v8's memory limitation?

2013-08-21 Thread Peter Rust
/this-hash-table-is-faster-than-a-judy-array - a different comparison of hash table librarieshttp://attractivechaos.wordpress.com/2008/08/28/comparison-of-hash-table-libraries/ . -- peter On Wednesday, August 21, 2013 10:04:17 PM UTC-7, Peter Rust wrote: If all you need is a hash table

Re: [nodejs] Keep data in memory and periodlly push to mongodb ???

2013-08-14 Thread Peter Rust
It sounds like the core problem is syncing data between a local DB or local cache of a DB and a remote DB. You might consider couchDB/pouchDB as an alternative to mongo, since it has a really good built-in syncing story. If you really want to use MongoDB, you could consider having a local

Re: [nodejs] NodeJs debugging issue - Debugger not stopping on breakpoints

2013-08-12 Thread Peter Rust
Anand, Typically you have to start node with the --debug-brk argument (first, before your *.js file, like this: node --debug-brk your/short/node/script.js). The breakpoint also needs to be on a line that does something -- I don't think it works on blank lines or lines with an opening or

Re: [nodejs] Is node.js 0.6 still used in projects under active development? And 0.8?

2013-08-08 Thread Peter Rust
there's definitely still some weird issues with 0.10.x. Could you share details? Ditto. 0.10 has been the stable version of node for almost 5 months now; if there is the possibility that there are still lingering issues, I would love to see them confirmed or denied (perhaps they already are

[nodejs] Re: Problems Accessing Firebird DB

2013-08-07 Thread Peter Rust
vltreude, Yikes! I'm sorry this was your first experience with node. Creating a native add-on is one of the trickier things to do in node as it requires knowledge of Google's GYP make system, v8's C++ bindings to javascript and node's libuv C library (as well as C/C++ of course). It is

[nodejs] Re: Is NodeJS fit for local App with UI

2013-07-29 Thread Peter Rust
As others have said, node-webkit is probably the place to look for 1 (though there are other options in this space, like appjs -- with some googling, you'll probably find others). For 2, take a look at awesomium for a full webkit and libRocket for a streamlined subset of HTML/CSS. I would love

RE: [nodejs] Re: How to write a JavaScript library for client or server use

2013-07-22 Thread Peter Rust
you could create one: !-- script which defines `require`, `module.exports` -- This is essentially what brequire is (client-side CommonJS) -- https://github.com/weepy/brequire. This works and is nicer than the typical browserify usage because it doesn't bundle all dependencies into a large,

Re: [nodejs] How to write a JavaScript library for client or server use

2013-07-19 Thread Peter Rust
to import underscore: var _ = root._; if (!_ (typeof require !== 'undefined')) _ = require('underscore'); Best of luck! Let me know if you have questions. -- peter rust -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting

Re: [nodejs] How to write a JavaScript library for client or server use

2013-07-19 Thread Peter Rust
but the Underscore comments / annotations still incorrectly state that it's `global` on the server ... I still need to issue a pull request FWIW, this has been corrected now (https://github.com/jashkenas/underscore/pull/1211) -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines:

Re: [nodejs] Blogs and Further Reading?

2013-07-05 Thread Peter Rust
Follow the node 'thought leaders' on twitter. Thought Leaders may be a bit subjective; for something more objective, I believe the node core team is currently: - Bert Belder - Ben Noordhuis - Fedor Indutny - Isaac Schlueter - Nathan Rajlich - Scott Blomquist - TJ

RE: [nodejs] Re: Retrieving values asynchroniously

2013-05-23 Thread Peter Rust
is there a resource somewhere that lists the most popular libs by useful categories? The closest thing I know of is to work down NPM's most depended on list (https://npmjs.org/browse/depended), for each package, you can look at the description and keywords to get a sense of what the category

RE: [nodejs] Re: Retrieving values asynchroniously

2013-05-23 Thread Peter Rust
There's also nipster (http://jiyinyiyong.github.io/nipster/), which combines github rankings with npm packages. -- peter -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you

Re: [nodejs] Getting multiple responses from express get (app.get)

2013-05-20 Thread Peter Rust
With traditional platter (non-SSD) hard drives (and most DBs, which are reading from the disk if the data hasn't been cached to memory), it is most efficient to do multiple requests in parallel (rather than serial) because this allows the operating system to read the various bits of data from

[nodejs] Re: https, GoDaddy SSL cert, node.js under Microsoft Azure

2013-05-17 Thread Peter Rust
Sushil, Glad you got it working, but it might be worth double-checking what Tomasz Janczuk says above (it looks like he's on the Windows Azure team). My impression is that configuring your custom node app for SSL shouldn't be necessary because Azure (via IISNode) can communicate via SSL

Re: [nodejs] Re: Any suggestions for running mocha tests multiple times against different scenarios?

2013-05-17 Thread Peter Rust
Perhaps a little simpler than what you have above (though perhaps you want the additional layer, I'm not sure) is to put your tests in a loop, like: var fruits = [{'name': 'apple', 'juicy': true}, {'name': 'orange', 'juicy': true}]; fruits.forEach(function(fruit) { describe(fruit.name,

[nodejs] Re: Retrieving values asynchroniously

2013-04-25 Thread Peter Rust
Slobodan Blazeski, As others have said, the idiomatic way to do this in node is to use the async library and to have callback functions that take an error (err) as the first argument. The reason why it's important to have each asynchronous function pass an error object to your callback is

[nodejs] Re: Retrieving values asynchroniously

2013-04-25 Thread Peter Rust
Addendum: Caolan McMahon (the author of async library) provides a nice example and more details regarding prefering closures over object methods in the first point of his article http://caolanmcmahon.com/posts/nodejs_style_and_structure/. Many of his other points are also helpful to someone

[nodejs] Re: Templating engines

2013-04-03 Thread Peter Rust
Jade does seem to be the most popular on npm, with 235k downloads in the last month, but it's not a landslide (handlebars has 74k, EJS has 59k, and there are *four pages* of packages with the keyword template). Is everyone burnt out arguing over template engines? I suspect so. Since your

Re: [nodejs] NodeJS, Socket.io Chat script, preventing flood messaging

2013-03-28 Thread Peter Rust
The standalone libraries of underscore and async have throttling and limiting methods (_.throttle, _.debounce, async.eachLimit, async.mapLimit, async.parallelLimit -- also async.queue takes a concurrency limit and async.cargo takes a payload limit). I don't know for sure, but I would think

[nodejs] Re: brequire - commonJS on the clientside

2013-03-28 Thread Peter Rust
Weepy, Thanks for working on this for open-sourcing it! When I first started working with node, I searched for this kind of thing landed on brequire as a way to reduce boilerplate on files that I wanted to use in the browser as well as from node. It worked well for me and eased my

[nodejs] Re: json data filters defined in json

2013-03-01 Thread Peter Rust
Stephen, For simple AND filters, there's `_.where()`. For robust filtering, grouping, bisecting, etc, there's crossfilter (https://github.com/square/crossfilter). Another alternative I've seen is the underscore mixin _.data (aka _.query) https://github.com/dvv/underscore-data, which has a

[nodejs] Re: Re - Reusing the schema validation both on client side and server side

2013-03-01 Thread Peter Rust
Sri, I think it's common to re-use Backbone Models on both client and server, implementing the validate() method with custom validation logic that is run on both client and server. Backbone doesn't come with validation mechanisms built-in, but there are 3 backbone validation plugins listed on