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,
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.
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
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
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
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))
* 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
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
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
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
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
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
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
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
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:
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
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
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
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:
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
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
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:
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
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),
-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
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
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
-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
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
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:
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
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
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
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
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
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
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
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:
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
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
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
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
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
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:
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
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
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
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
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
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
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
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
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.
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:
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
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
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
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 --
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
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
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
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
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
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
/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
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
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
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
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
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
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,
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
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:
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
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
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
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
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
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,
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
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
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
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
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
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
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
86 matches
Mail list logo