Re: [nodejs] Need some ideas for async image resize on template

2012-05-16 Thread Alan Hoffmeister
Tim that's a very good idea! But how can I share the hash and the dimensions between the view helper and the resizing route? -- Att, Alan Hoffmeister 2012/5/15 Tim Caswell : > btw, this code isn't perfect.  For example, there is no reason to use the > expensive md5 hash.  It's not like the brow

[nodejs] [ANN] AwsSum v0.5.0 - now with more Cowbell

2012-05-16 Thread Andrew Chilton
Hi everyone, Just wanted to mention the new release of AwsSum - v0.5.0 (the OAuth 1.0a version): * npm install awssum * https://github.com/appsattic/node-awssum/ * http://search.npmjs.org/#/awssum There have been a number of internal changes but the most important stats are the ever increasing n

Re: [nodejs] How to parse a utf-8 url?

2012-05-16 Thread Thijs Koerselman
Hi Isaac, > Well, if we do this, you'll get it with the spaces converted to %20. > It'll be up to you to call decodeURIComponent on it. > > Spaces are actually not allowed in URLs, after all. > Yep that's all fine with me. At least I don't have to replace the " " with "%20" manually before using t

Re: [nodejs] Need some ideas for async image resize on template

2012-05-16 Thread Tim Caswell
On Wed, May 16, 2012 at 6:14 AM, Alan Hoffmeister wrote: > Tim that's a very good idea! > But how can I share the hash and the dimensions between the view > helper and the resizing route? > Well that depends on the nature of your code. Is it a framework like express, is it something else. If

Re: [nodejs] Need some ideas for async image resize on template

2012-05-16 Thread Anand George
http://dropup.net/ seems to be a similar implementation. The code is available on Github https://github.com/daleharvey/dropup On Wed, May 16, 2012 at 5:57 PM, Tim Caswell wrote: > > > On Wed, May 16, 2012 at 6:14 AM, Alan Hoffmeister < > alanhoffmeis...@gmail.com> wrote: > >> Tim that's a ve

[nodejs] Need some help here.

2012-05-16 Thread randomnick
i'v been playing around with node for quite a while, did some applications in express, but coming from php i'm having hard time to understand what is process, thread, socket, workers etc where can i find this information, what good books really explains node without telling me its evented io

Re: [nodejs] Need some ideas for async image resize on template

2012-05-16 Thread yogesh agrawal
Not able to found any async image resize code in dropup On Wed, May 16, 2012 at 6:03 PM, Anand George wrote: > http://dropup.net/ seems to be a similar implementation. The code is > available on Github https://github.com/daleharvey/dropup > > > On Wed, May 16, 2012 at 5:57 PM, Tim Caswell wro

Re: [nodejs] Need some ideas for async image resize on template

2012-05-16 Thread Anand George
Guess the issue was implementing a 'method on the view'. If async image processing and manipulation is of interest, https://github.com/hacksparrow/node-easyimage would help. On Wed, May 16, 2012 at 6:10 PM, yogesh agrawal wrote: > Not able to found any async image resize code in dropup > > > On

Re: [nodejs] problems with changing process.env.TZ at runtime

2012-05-16 Thread Ben Noordhuis
On Wed, May 16, 2012 at 4:44 AM, SethP wrote: > Thanks, Ben - I figured you'd be the one to pick this up. (btw - how do you > pronounce your name?) 'North house' is a close enough approximation. :-) > The reason I think it may be a bug is that the output of the test script > (sans assertion) is

Re: [nodejs] Need some help here.

2012-05-16 Thread Anand George
Check out this thread. Lot of useful resources http://groups.google.com/group/nodejs/browse_thread/thread/acc89a8396038b57/1c275de40a7d27c1?lnk=gst&q=begin+with+node#1c275de40a7d27c1 On Wed, May 16, 2012 at 12:03 PM, randomnick wrote: > i'v been playing around with node for quite a while, did so

Re: [nodejs] Need some ideas for async image resize on template

2012-05-16 Thread Alan Hoffmeister
Thanks for the tip Anand. Tim, and if I have millions of images and more millions of dimensions, your method wouldn't blow up the server's memory? -- Att, Alan Hoffmeister 2012/5/16 Anand George : > Guess the issue was implementing a 'method on the view'. If  async image > processing and manipu

[nodejs] Problems with Nodejitsu servers?

2012-05-16 Thread Hakan Guzelgoz
Hi, It seems that nodejitsu servers are getting some problems? Our website http://www.hezenhotel.com which is on nodejitsu is not loading. And I have problems getting to nodejitsu.com too. Anybody having the same problem? Any idea why this may happen? Thanks, Hakan -- Job Board: http://jobs.no

[nodejs] Re: Problems with Nodejitsu servers?

2012-05-16 Thread Pitt Mak
Oh-good, nodejitsu app can be mapped to our own domain? guzelgoz於 2012年5月16日星期三UTC+8下午9時39分33秒寫道: > > Hi, > > It seems that nodejitsu servers are getting some problems? Our website > http://www.hezenhotel.com which is on nodejitsu is not loading. And I > have problems getting to nodejitsu.com t

[nodejs] Re: NodeJS on WLAN Router (DD-WRT, OpenWRT, FreeWRT)?

2012-05-16 Thread Pitt Mak
That is really depended on the OS of your router. Markus Tiefenbacher於 2012年5月15日星期二UTC+8下午4時04分48秒寫道: > > Hello, > > Would it be possible, to install NodeJS on a router? > > Maybe on a http://www.dd-wrt.com, https://openwrt.org, > http://www.freewrt.org > or one of these systems: > http://en

Re: [nodejs] Problems with Nodejitsu servers?

2012-05-16 Thread Dave Ryan
Hakan, Neither of those domains are accessible for me Dublin/Ireland. Nothing on twitter that i can see from @nodejitsu re issues cheers _dR On Wed, May 16, 2012 at 2:39 PM, Hakan Guzelgoz wrote: > Hi, > > It seems that nodejitsu servers are getting some problems? Our website > http://www.heze

Re: [nodejs] Re: NodeJs e-commerce solution?

2012-05-16 Thread Hakan Guzelgoz
I am ok with "learning by doing" approach. I think it would be a good start to build a simple website with products, a simple cart that sells these products. I would as much as possible keep things basic and simple so that it can grow up with time. I would suggest to go ahead with Mongo as DB. On

Re: [nodejs] Problems with Nodejitsu servers?

2012-05-16 Thread Hakan Guzelgoz
It is really weird, as I am able to access now hezenhotel.com domain but not nodejitsu.com. Would it be possible to have an issue depending on your location? I am based in Turkey. Anybody else using NodeJitsu as hosting solution out there? Thx. Hakan On Wed, May 16, 2012 at 4:43 PM, Dave Ryan wr

Re: [nodejs] Problems with Nodejitsu servers?

2012-05-16 Thread Pitt Mak
I can access hezenhotel.com , but a little slow. China here. guzelgoz於 2012年5月16日星期三UTC+8下午9時48分24秒寫道: > > It is really weird, as I am able to access now hezenhotel.com domain but > not nodejitsu.com. Would it be possible to have an issue depending on > your location? I am based in Turkey. > Any

Re: [nodejs] Re: NodeJS on WLAN Router (DD-WRT, OpenWRT, FreeWRT)?

2012-05-16 Thread Tim Caswell
Look at the architecture of the router and the memory constraints. On most architectures a node process starts around 10mb of ram. I know v8 builds on linux on i686, x64, and most arm variants. There is some mips support as well. Depending on what you're trying to do, raw libuv with C may be be

Re: [nodejs] Need some ideas for async image resize on template

2012-05-16 Thread Tim Caswell
It's best to not put millions of keys in any javascript object. More than blow up the memory, it will blow up the GC. Hopefully this gets fixed in the newer V8 with node 0.8.x. In that case you need some external way to look up and store the hashes. But the general idea still works. You could

[nodejs] Re: Why is 'require' not doing callbacks?

2012-05-16 Thread Guoliang Cao
Thank you all for replying. It seems it is reasonable to write synchronous code for special cases like require. Suppose there are other synchronous IO library written for V8, will my node.js app be able to call them? Regards, Guoliang -- Job Board: http://jobs.nodejs.org/ Posting guidelines:

Re: [nodejs] Need some help here.

2012-05-16 Thread Tim Caswell
Process, thread, and socket are operating system terms. Node is very close to the OS in abstraction so that's why you should be versed with how the OS works to be effective with node. Practically, a process is a program. It has it's own memory space, the operating system runs it on whichever CPU

Re: [nodejs] Problems with Nodejitsu servers?

2012-05-16 Thread samal gorai
Both working in India and is fast. May be local DNS issue. On Wed, May 16, 2012 at 7:25 PM, Pitt Mak wrote: > I can access hezenhotel.com , but a little slow. > China here. > > guzelgoz於 2012年5月16日星期三UTC+8下午9時48分24秒寫道: > >> It is really weird, as I am able to access now hezenhotel.com domain but

[nodejs] How to keep a queue active after a request is made in node.js amqp?

2012-05-16 Thread Cassio Melo
Do I really need to instantiate the queue "queue = connection.queue(...)" every time I want to use it? Server (node.js): queue = connection.queue('incoming', { // <--- DO I REALLY NEED THAT FOR EVERY REQUEST? durable : true, exclusive : false }, function() {}); queue.subscribe(

Re: [nodejs] Problems with Nodejitsu servers?

2012-05-16 Thread Anand George
+1 Samal On Wed, May 16, 2012 at 8:21 PM, samal gorai wrote: > Both working in India and is fast. May be local DNS issue. > > > On Wed, May 16, 2012 at 7:25 PM, Pitt Mak wrote: > >> I can access hezenhotel.com , but a little slow. >> China here. >> >> guzelgoz於 2012年5月16日星期三UTC+8下午9時48分24秒寫道: >>

[nodejs] Question about cpu usage

2012-05-16 Thread marcucio
I have a question about cpu usage, I noticed that my server cpu usage increases all day as the server is being used but it never goes back down until I restart the node process. I am wondering if there are any general reasons why this would happen. See the screen shot below, the cpu keeps risin

Re: [nodejs] Why is 'require' not doing callbacks?

2012-05-16 Thread Jake Verbaten
There are some valid use-cases for require.async Can you (or anyone else) recommend a reliable user land implementation of async require -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message becaus

[nodejs] Re: Reusing connections on http client requests

2012-05-16 Thread Dh
I am having the same problem with node v0.6.18. Does anyone have a solution ? Thanks, Donald -- 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 "n

Re: [nodejs] Why is 'require' not doing callbacks?

2012-05-16 Thread Axel Kittenberger
The true question is, why doesn't node follow its own naming conventions, and call it requireSync()? I know the answer is probably, because some code functions are older than these conventions. Anyway it makes a bad role model for module devs, if the core already takes it quite lenient. I'd sugge

[nodejs] Re: Problems with Nodejitsu servers?

2012-05-16 Thread mscdex
Works fine in the U.S. here. -- 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@googleg

Re: [nodejs] Re: Problems with Nodejitsu servers?

2012-05-16 Thread Stephan Bardubitzki
Works fast here in Canada. On Wed, May 16, 2012 at 8:55 AM, mscdex wrote: > Works fine in the U.S. here. > > -- > 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

[nodejs] Conversion between binary data (Buffers) and strings, will it be removed in nodejs as the docs says?

2012-05-16 Thread Mattias Ernelli
I am working on a test system/framework using nodejs where I need to send binary data as strings in some circumstances. One part of the system is a webserver/reverse proxy that will either serve a static file or forward the request to an external server unless the request will be intercepted an

Re: [nodejs] Reusing connections on http client requests

2012-05-16 Thread Ben Noordhuis
On Fri, May 11, 2012 at 11:38 PM, Marco Monteiro wrote: > What do I need to do to get http client to reuse connections and not create > a new one > for each request? Make sure that a new request is queued by the time the current request finishes. If there is one, the connection is reused. If not,

Re: [nodejs] Conversion between binary data (Buffers) and strings, will it be removed in nodejs as the docs says?

2012-05-16 Thread Ben Noordhuis
On Wed, May 16, 2012 at 5:37 PM, Mattias Ernelli wrote: > I am working on a test system/framework using nodejs where I need to send > binary data as strings in some circumstances. > > One part of the system is a webserver/reverse proxy that will either serve a > static file or forward the request

Re: [nodejs] How to keep a queue active after a request is made in node.js amqp?

2012-05-16 Thread Dan Milon
What do you mean "request"? Incoming HTTP request? Why would you connect to the queue again and again every time? About the connection.queue, yes you have to provide the configuration each time. I think it is the way amqp is defined, and not node-amqp issue. On 05/16/2012 06:06 PM, Cassio Melo

Re: [nodejs] Question about cpu usage

2012-05-16 Thread Mark Hahn
i would think that is an app logic problem. Can you do a profile at the end of the day? On Wed, May 16, 2012 at 8:21 AM, marcucio wrote: > I have a question about cpu usage, I noticed that my server cpu usage > increases all day as the server is being used but it never goes back down > until I

Re: [nodejs] Conversion between binary data (Buffers) and strings, will it be removed in nodejs as the docs says?

2012-05-16 Thread Mattias Ernelli
Ok so it has already been deprecated: https://github.com/joyent/node/commit/5979f096d1b702ca2ba95664a0bbc8210109775b while people still discuss the usefulness of binary strings... Anyway, I dont really care about internal processing in node such as regexp, indexOf, comparision or other string m

[nodejs] Re: Reusing connections on http client requests

2012-05-16 Thread Jimb Esser
We also ran into issues with node 0.6's connection keep-alive, it's rather dysfunctional the way it is now. You also need to set maxSockets on the agent rather low, or each request will just get a new socket, even if there was a recent one that could have been reused, and this can easily be orders

[nodejs] Re: Conversion between binary data (Buffers) and strings, will it be removed in nodejs as the docs says?

2012-05-16 Thread mscdex
On May 16, 2:56 pm, Mattias Ernelli wrote: > Anyway, found a loophole in the docs, 'binary' strings cannot be removed > yet, it will break > crypto:http://nodejs.org/api/crypto.html#crypto_crypto_createcipher_algorith... Yeah, although the code does use ASSERT_IS_STRING_OR_BUFFER *after* the arg

Re: [nodejs] problems with changing process.env.TZ at runtime

2012-05-16 Thread SethP
On Wednesday, May 16, 2012 9:06:12 AM UTC-4, Ben Noordhuis wrote: > > Thanks, Ben - I figured you'd be the one to pick this up. (btw - how do > you > > pronounce your name?) > > 'North house' is a close enough approximation. :-) > Thanks for clearing that up for everyone. Maybe that can go

Re: [nodejs] Re: Problems with Nodejitsu servers?

2012-05-16 Thread Nuno Job
Works for me. PS. I work for nodejitsu and see nothing wrong with your app. On Wed, May 16, 2012 at 6:07 PM, Stephan Bardubitzki wrote: > Works fast here in Canada. > > > On Wed, May 16, 2012 at 8:55 AM, mscdex wrote: >> >> Works fine in the U.S. here. >> >> -- >> Job Board: http://jobs.nodejs.

Re: [nodejs] problems with changing process.env.TZ at runtime

2012-05-16 Thread Nathan Rajlich
Let me know what kind of edge-cases you run into with node-time! On Wed, May 16, 2012 at 2:15 PM, SethP wrote: > > > On Wednesday, May 16, 2012 9:06:12 AM UTC-4, Ben Noordhuis wrote: > >> > Thanks, Ben - I figured you'd be the one to pick this up. (btw - how do >> you >> > pronounce your name?)

Re: [nodejs] How to parse a utf-8 url?

2012-05-16 Thread Isaac Schlueter
Landed on 9fc7283a403bb0dec096b76991226cba8e7b73c2 in master. On Wed, May 16, 2012 at 5:13 AM, Thijs Koerselman wrote: > Hi Isaac, > >> Well, if we do this, you'll get it with the spaces converted to %20. >> It'll be up to you to call decodeURIComponent on it. >> >> Spaces are actually not allowe

[nodejs] Nodejs scaling by running multiple processes: what's the optimal number of processes?

2012-05-16 Thread Qi Fan
Hi, On an 8-core computer, is it better to run 8 node.js processes, or is it better to run fewer? I'm speculating that if both the event loops and system IO are busy then 8/8 configuration may freeze at a lower load than 7/8 configuration since each IO operations will suspend nodejs processes.

[nodejs] Best practice resources for Node.js

2012-05-16 Thread Metin Pasaoglu
Hi, We are currently thinking of using node.js in our project but would like to go through best practices as much as possible. Can you please share any hints or links that we can find/read more information about node.js implementations? We are always welcome for architecture type of developer

Re: [nodejs] Re: Anyone Tried Mojito?

2012-05-16 Thread hisham muteb
also you can use YUI at the client and server side and support internationalization, testing, and building documentation. for more info read the Mojito Introduction http://developer.yahoo.com/cocktails/mojito/ and Mojito Quick Start http://developer.yahoo.com/cocktails/mojito/docs/quickstart/ On

Re: [nodejs] Why is 'require' not doing callbacks?

2012-05-16 Thread Isaac Schlueter
Synchronous require() not a "wart". Nor are fs.*Sync functions warts. They're a valuable API that's there for a reason. require() is for the startup time of your application. It's significantly faster and simpler than loading modules asynchronously. If you want a more complex module loader, the

Re: [nodejs] Re: Why is 'require' not doing callbacks?

2012-05-16 Thread Marak Squires
> > Sync require makes it hard to do things like loading code dynamically or > loading modules from a database *Good.* On Tue, May 15, 2012 at 11:45 PM, Bruno Jouhier wrote: > It's a wart in the system, and more generally, Sync calls are warts. > > Sync require makes it hard to do things like

[nodejs] Re: Best practice resources for Node.js

2012-05-16 Thread mscdex
On May 16, 7:37 pm, Metin Pasaoglu wrote: > We are currently thinking of using node.js in our project but would like to > go through best practices as much as possible. Can you please share any > hints or links that we can find/read more information about node.js > implementations? Here's a start

Re: [nodejs] Nodejs scaling by running multiple processes: what's the optimal number of processes?

2012-05-16 Thread Isaac Schlueter
Chances are that the workers are going to be spending the most time on CPU. If you have a few too many, it's not super bad. I'd try going with the same number of workers as you have CPUs. On Wed, May 16, 2012 at 4:33 PM, Qi Fan wrote: > Hi, > > On an 8-core computer, is it better to run 8 node.

Re: [nodejs] Re: NodeJs e-commerce solution?

2012-05-16 Thread Dave Clements
if its orders/payment data you might want to go with couchdb. If mongodb crashed theres a fair chance of data loss because it operates in RAM and periodically stores to disk. In this case that loss can be directly mapped to financial loss. There are ways to set mongo up that gaurd against this,

Re: [nodejs] Re: Conversion between binary data (Buffers) and strings, will it be removed in nodejs as the docs says?

2012-05-16 Thread Isaac Schlueter
Yeah, that was quite a loophole. It has kept 'binary' encoding alive for another stable branch, that's for sure. Expect it to warn in 0.9, and be removed sometime thereafter. The crypto module is a pretty sorry sight. It works just well enough to make everyone not want to do the tedious work of

Re: [nodejs] Re: NodeJs e-commerce solution?

2012-05-16 Thread Anand George
For payments you might consider node-stripe - https://github.com/abh/node-stripe.git Also checkout this nice tutorial on setting it all up - http://www.catonmat.net/blog/stripe-payments-with-node/ On Thu, May 17, 2012 at 7:24 AM, Dave Clements wrote: > if its orders/payment data you might want

Re: [nodejs] Re: NodeJs e-commerce solution?

2012-05-16 Thread Marcos Vinicius de Camargo Marcon
Hi! I'm interested, and just as Adem said "learning by doing" would like to be part of this project. I am developing a web application focused on measuring the experience of User in any possible scenario Thank! Em quarta-feira, 16 de maio de 2012 22h54min58s UTC-3, Dave Clements escreveu: > >

Re: [nodejs] problems with changing process.env.TZ at runtime

2012-05-16 Thread Ben Noordhuis
On Wed, May 16, 2012 at 11:15 PM, SethP wrote: > I figured something must be caching the TZinfo; here's a script that shows > some perplexing behavior on OS X: > > var d; > > console.log(new Date().toString()); > > process.env.TZ = 'America/Los_Angeles'; > > d = new Date('2012-1-12 02:00 PM'); > c

Re: [nodejs] Re: NodeJs e-commerce solution?

2012-05-16 Thread Mark Miller
Any plans to support bitcoin payments? On Wed, May 16, 2012 at 8:02 PM, Marcos Vinicius de Camargo Marcon < marcon...@gmail.com> wrote: > Hi! > I'm interested, and just as Adem said "learning by doing" would like to be > part of this project. > I am developing a web application focused on measuri

Re: [nodejs][ANN] mongoskin release 0.3.6, by kissjs.org

2012-05-16 Thread George Snelling
Thanks for your work Gui Lin. We are happy users of your library and big fans. -George On Tuesday, May 15, 2012 8:44:45 AM UTC-7, Jason.桂林(Gui Lin) wrote: > > mongoskin release 0.3.6, by > kissjs.org > > 0.3.6 > > * fix for node-mongodb 1.0.x > > m

Re: [nodejs] Sharing code between client and server

2012-05-16 Thread Davis Ford
On Tue, May 8, 2012 at 5:05 AM, Robert Chris Bang Larsen wrote: > Hi all > > I am planning on using Node.js for the server side of multiplayer > games based on JavaScript and HTML5. > > But how can I do this when using Node.js ? > > So, how would you go about having shared code between Node.js and

[nodejs] NodeJs step by step execution my actions

2012-05-16 Thread Jack
I have some problem. I have mini socket server. var net = require('net'); var server = net.createServer(function (socket) { socket.on('data', function(data){ // here i do xml parsing and run some action var xml2js = require('xml2js'), parser = new xml2js.Parser(); parse

[nodejs] [ANN] STLJS Meetup, Thursday, May 17 @ 6:30pm

2012-05-16 Thread Michael Bradley, Jr.
Tomorrow! Thursday, 17 May 2012, 6:30pm STLJS Meetup in the The Able Few's corporate offices: Bill Edney will present "Zero-Reload Web Development" http://www.stljs.org/events/50020662/ Don't forget to RSVP! Following that, we'll have a group hacking session -- experimenting with NodeJS an

Re: [nodejs] Re: Problems with Nodejitsu servers?

2012-05-16 Thread Hakan Guzelgoz
Thanks to all - it seems working as before now.. On Thu, May 17, 2012 at 1:11 AM, Nuno Job wrote: > Works for me. > > PS. I work for nodejitsu and see nothing wrong with your app. > > On Wed, May 16, 2012 at 6:07 PM, Stephan Bardubitzki > wrote: > > Works fast here in Canada. > > > > > > On Wed

Re: [nodejs] NodeJs step by step execution my actions

2012-05-16 Thread Mark Hahn
actionQueue = []; doingAction = false; doOneAction = function() { if (not actionQueue.length or doingAction) return; doingAction = true; actionQueue.unshift().run(); doingAction = false; doOneAction(); } And then inside you server loop replace c.run() with ... actionQue

[nodejs] Re: NodeJs step by step execution my actions

2012-05-16 Thread Pitt Mak
You may try like the following: var totalData; socket.on('data', function(data){ totalData += data; }) and then run all actions step by step elsewhere depended on your html parser. The html parsing may be the same as sokect.on(); Jack於 2012年5月17日星期四UTC+8下午1時24分34秒寫道: > > I have some problem