Re: [nodejs] need help debugging server app that silently stops

2015-10-03 Thread Mark Hahn
> > > Have you tried setting NODE_DEBUG? > No, but I'll remember that. It seems a little limited but worth a try. -- Job board: http://jobs.nodejs.org/ New group rules: https://gist.github.com/othiym23/9886289#file-moderation-policy-md Old group rules:

Re: [nodejs] need help debugging server app that silently stops

2015-09-30 Thread Mark Hahn
I found the problem. I was calling result.writeHead and result.end in the callback from the static file server module "node-static", which had already called them. I am blown away that this would work fine and then die when idle for a few hours. Also I am surprised that node could silently

[nodejs] need help debugging server app that silently stops

2015-09-29 Thread Mark Hahn
I have a pretty simple server using the normal pattern containing `http.createServer`. When testing, it works great. But when the server has been sitting idle with no access for a few hours it behaves strangely. After the idle time, when I try to load the site the server responds perfectly

[nodejs] web worker problem

2014-11-07 Thread Mark Hahn
When I try to start a web worker in node I'm getting this error ... myWorker = new Worker('./web-worker.js'); ReferenceError: Worker is not defined Is there something I have to do to use a web-worker? -- Job board: http://jobs.nodejs.org/ New group rules:

Re: [nodejs] yet another sync/async question

2014-10-29 Thread Mark Hahn
Later on, Lu Wang created his own fork of emscripten with an async extension. This allowed him to eliminate the streamline.js pass. So maybe you should not completely rule out the transpiler route. Bruno On Tuesday, October 28, 2014 7:59:07 PM UTC+1, Mark Hahn wrote: So Atom pinwheels when

Re: [nodejs] yet another sync/async question

2014-10-28 Thread Mark Hahn
making normal http requests. On Mon, Oct 27, 2014 at 10:15 PM, Mark Hahn m...@hahnca.com wrote: What're you dealing with that uses sync calls? OK, I wasn't going to admit how crazy I am, but I'm considering running the Atom editor in the browser by providing all the node calls it needs. What

Re: [nodejs] yet another sync/async question

2014-10-28 Thread Mark Hahn
simulated file systems in the browser before with emscripten and I'm pretty confident performance will be ok. I want to add fs to browserify. On Mon, Oct 27, 2014 at 8:59 PM, Aria Stewart aredri...@nbtsc.org wrote: On 27 Oct 2014, at 23:54, Mark Hahn m...@hahnca.com wrote: explicitly

Re: [nodejs] yet another sync/async question

2014-10-28 Thread Mark Hahn
So Atom pinwheels when the disk is slow? No. The disk is fast enough to not notice. It is node itself that slows down atom, at least compared to an editor written in C++. On Tue, Oct 28, 2014 at 7:39 AM, Aria Stewart aredri...@nbtsc.org wrote: On Oct 28, 2014, at 1:20 AM, Mark Hahn m

Re: [nodejs] yet another sync/async question

2014-10-27 Thread Mark Hahn
explicitly designed in the way so you cannot do this I understand. I am unfortunately facing a pragmatic problem that could be solved if a library could simulate a sync call with an async over-the-net call. Maybe I should restate the immense task I'd like to tackle. I'd like to implement

[nodejs] yet another sync/async question

2014-10-24 Thread Mark Hahn
I've been following async to sync discussions for years but I have one fundamental question. Is it possible to wrap an async function in a library such that it can be called from code that is written expecting a sync function? In other words could I make a library containing a readFileSync

Re: [nodejs] buffer toString with partial utf8 character?

2014-09-09 Thread Mark Hahn
Thanks everyone for the detailed answers. I almost feel like I understand this stuff now. I wonder if there could have been an easier way to handle universal characters than unicode. It seems overly complex. -- Job board: http://jobs.nodejs.org/ New group rules:

[nodejs] buffer toString with partial utf8 character?

2014-09-03 Thread Mark Hahn
What happens if I convert an entire buffer to a string using toString and the end of the buffer only has a partial character encoding? Will it just ignore the extra byte(s)? (This is what I want). Or will it have garbage at the end of the string or throw an exception? -- Job board:

[nodejs] read error with empty buffer?

2014-07-27 Thread Mark Hahn
Why does this throw an exception? fd is valid. The file is larger than 6 bytes, although even that shouldn't be a problem. This works with non-empty buffers and other more normal values. buf = new Buffer(0); fs.readSync(fd, buf , 0, 0, 6); -- Job board: http://jobs.nodejs.org/ New

[nodejs] Re: what happened to node.js ?

2014-07-13 Thread Mark Hahn
maybe a kickstarter could pay for devs who are approved by a board. On Thursday, July 10, 2014 11:48:19 PM UTC-7, Andrew Kelley wrote: I'd be happy to start working on Node.js and pick up the pace. Any companies want to sponsor me https://github.com/andrewrk? :-) On Thursday, July 10, 2014

Re: [nodejs] Re: node.js API documentation clean up

2014-06-24 Thread Mark Hahn
/getConnections. You don't usually need alphabetic order when you have Ctrl+F, but grouping is very useful as is. 23.06.2014, 08:32, Mark Hahn m...@hahnca.com: It has driven me crazy for years the the api docs (methods) are in no particular order, at least none that I can discern. I usually have

Re: [nodejs] Re: node.js API documentation clean up

2014-06-24 Thread Mark Hahn
used to least commonly used. I'm actually not sure I understand the value of alphabetizing them, given that if you know the name already you can search the page. -- Rebecca On June 24, 2014 at 5:50:07 AM, Mark Hahn (m...@hahnca.com) wrote: similar methods are grouped together It should

Re: [nodejs] Re: node.js API documentation clean up

2014-06-24 Thread Mark Hahn
It’s two key presses. Is that really so much effort? It's two plus how many letters you need to specify what you are looking for, which I never know. It's just a PITA. I can't argue why, I just know it is for me and I assume many others used to alpha sorts. On Tue, Jun 24, 2014 at 3:49 PM,

Re: [nodejs] Re: node.js API documentation clean up

2014-06-23 Thread Mark Hahn
, 2014 at 2:10 AM, Mark Hahn ma...@hahnca.com wrote: It has driven me crazy for years the the api docs (methods) are in no particular order, at least none that I can discern. I usually have to scroll through most of the list to find anything. Why not list them alphabetically? Your comment has

[nodejs] Re: node.js API documentation clean up

2014-06-22 Thread Mark Hahn
It has driven me crazy for years the the api docs (methods) are in no particular order, at least none that I can discern. I usually have to scroll through most of the list to find anything. Why not list them alphabetically? On Saturday, June 21, 2014 4:19:43 PM UTC-7, Norbert Fuhs wrote: I

Re: [nodejs] does os.networkInterfaces work in windows

2014-06-08 Thread Mark Hahn
I'm running as administrator. I'm on win 8.0 so it should be the same as Win 7. I'll do experiments on other PCs. On Saturday, June 7, 2014 4:12:57 PM UTC-7, Denys Khanzhiyev wrote: In 10.24 and 10.28 works for me under Win 7. 2014-06-07 2:45 GMT+03:00 Mark Hahn ma...@hahnca.com

Re: [nodejs] does os.networkInterfaces work in windows

2014-06-08 Thread Mark Hahn
. P.S. It just occurred to me that some variable/function might have been overridden but I have no idea why someone would to that. On Sun, Jun 8, 2014 at 1:33 AM, Denys Khanzhyiev xden...@gmail.com wrote: Just checked on Win 8.1 node 10.28 - works. 2014-06-08 7:23 GMT+03:00 Mark Hahn m

[nodejs] does os.networkInterfaces work in windows

2014-06-06 Thread Mark Hahn
When I run os.networkInterfaces() in node 10.25 I get the result [ null ]. Is there something I have to do to use this in windows? -- 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: What is the difference between dependency file and injections?

2014-03-23 Thread Mark Hahn
Usually you would only use jquery on server side along with a DOM emulator like phantom.js. On Saturday, March 22, 2014 12:43:32 PM UTC-7, Alex Kocharin wrote: For the same thing as on the client-side. Working with DOM. It's very slow, but nevertheless possible. 22.03.2014, 21:55,

Re: [nodejs] What type of syntax is this ?

2014-02-13 Thread Mark Hahn
Coffeescript transpiles to plain javascript so they are interchangeable. On Thursday, February 13, 2014 4:04:14 PM UTC-8, Kevin Ingwersen wrote: Thats CoffeeScript o.o Am Fr. Feb. 14 2014 00:26:16 schrieb Ziobudda: Hi all, I have found this syntax in node-gd page on npmjs.org:

Re: [nodejs] Running multiple instances of node.js servers on different ports

2014-02-10 Thread Mark Hahn
It should be as simple as running a different node executable for each server. In other words you'd do node server1.js node server2.js node server3.js where each executable is using a different port. You might want to make the port an argument so you could say `node server.js 8080`. On Mon,

Re: [nodejs] Running multiple instances of node.js servers on different ports

2014-02-10 Thread Mark Hahn
arman.didan...@gmail.comwrote: So there is no way to run one executable that listens to different ports? On 10 February 2014 13:58, Mark Hahn m...@hahnca.com wrote: It should be as simple as running a different node executable for each server. In other words you'd do node server1.js node

Re: [nodejs] Running multiple instances of node.js servers on different ports

2014-02-10 Thread Mark Hahn
not very good at these things YET! Cheers On 10 February 2014 14:21, Mark Hahn m...@hahnca.com wrote: Interesting question. One would think than you could put the http server example in the code multiple times with a different variable for each httpserver. I don't see any reason why

Re: [nodejs] Running multiple instances of node.js servers on different ports

2014-02-10 Thread Mark Hahn
10, 2014 2:58 PM, Mark Hahn m...@hahnca.com wrote: I'm sorry but I'm getting lost at this sentence ... I trying to deploy a similar connection for the DB over the network You haven't mentioned a DB before. A node server is a very different thing than a DB server. Maybe someone else can

Re: [nodejs] My desk is URDESK (a very good client for node)

2014-02-10 Thread Mark Hahn
It is tl;dr for me and there is no way I'm going to a web page and clicking on a button called install me with no indication of what is being installed. On Mon, Feb 10, 2014 at 12:18 PM, Dennis Kane dkan...@gmail.com wrote: (If this is tl;dr, just go to http://urdesk.net right now) What does

Re: [nodejs] Running multiple instances of node.js servers on different ports

2014-02-10 Thread Mark Hahn
to run his specific veraion of the code, locating on his machine. Not sure if it makes any sense? As I said, since I am newbie, I might ask silly questions. On Feb 10, 2014 3:29 PM, Mark Hahn m...@hahnca.com wrote: I may be oversimplifying your request but if you mean can one node executable

Re: [nodejs] Running multiple instances of node.js servers on different ports

2014-02-10 Thread Mark Hahn
. This is not a choice for me now. Another is for each one of those under development codes to be served on the server, each on a specific port. Since codes are in javascript plus sone python/R, I have both client and server side codes. On Feb 10, 2014 3:41 PM, Mark Hahn m...@hahnca.com wrote: each user

Re: [nodejs] Running multiple instances of node.js servers on different ports

2014-02-10 Thread Mark Hahn
it starts to know what port to use. On Mon, Feb 10, 2014 at 2:47 PM, Arman Didandeh arman.didan...@gmail.comwrote: I still think that your suggestion might work properly. Do you have instructions on how to do that? On 10 February 2014 17:43, Mark Hahn m...@hahnca.com wrote: Then may I propose my

Re: [nodejs] When is 0.11.x stable?

2014-02-09 Thread Mark Hahn
it is one of several popular version numbering schemes. It is semver: http://semver.org/ On Sun, Feb 9, 2014 at 5:51 PM, Ryan Schmidt google-2...@ryandesign.comwrote: On Feb 9, 2014, at 15:02, Kevin Ingwersen ingwie2...@googlemail.com wrote: On Sun, Feb 9, 2014 at 3:23 PM, Harald

Re: [nodejs] Print form node

2014-02-05 Thread Mark Hahn
We output PDFs which can be easily printed. I'm not aware of any other way that any user can print. On Wed, Feb 5, 2014 at 10:57 AM, Lincoln Lemos lemoslinc...@gmail.comwrote: How i can print automatically with node from front-end? I found a module (Ipp - internet print protocol ). This

Re: [nodejs] Callback functions prefixed with __

2014-01-26 Thread Mark Hahn
I use `cb` for 100% of my callbacks. Reading that is easy. Strangely enough I have never gotten a collision of names, even when the use of cb() is nested deep within functions. I suspect it cannot collide. I'll have to investigate the logic and see if I can come up with a proof. Maybe the

Re: [nodejs] Prevent spam requests?

2014-01-26 Thread Mark Hahn
Debugging code is your best prevention. Otherwise you can do something like ... handlingEvent = no emitter.on 'event', - if handlingEvent then return handlingEvent = yes blah.blah.blah() handlingEvent = no On Sun, Jan 26, 2014 at 11:38 AM, FirstName LastName

Re: [nodejs] Re: A decent client for a node backend...

2014-01-24 Thread Mark Hahn
I'll put this on my list to look at but the post was way too long to read now. On Fri, Jan 24, 2014 at 8:29 AM, Alexey Petrushin alexey.petrus...@gmail.com wrote: Nice. On Wednesday, 22 January 2014 17:28:16 UTC+4, Dennis Kane wrote: It has been kind of an obsession for me to create the

Re: [nodejs] Re: Web Scraping Frameworks for Node.JS? (e.g. like Python's Scrapy)

2014-01-24 Thread Mark Hahn
I have no problem using phantom as a child process. You can communicate with it while it is running. I would imagine one could write a module to make the interaction quite transparent. On Fri, Jan 24, 2014 at 9:02 AM, // ravi ravi-li...@g8o.net wrote: On Jan 24, 2014, at 11:30 AM, Alexey

Re: [nodejs] Dependency injection (DI) framework feedback

2014-01-20 Thread Mark Hahn
This looks nice. I'm just now learning angular and dips seems to match it well. I'm also just now starting a new project so I'll give DI a whirl on both server and client. Fun fun fun. On Mon, Jan 20, 2014 at 7:54 AM, Christoph Rust chr.r...@googlemail.comwrote: I know there are already

Re: [nodejs] More opendatabase ranting..

2014-01-15 Thread Mark Hahn
Opendatabase allows us to tie Mobile, Web and system applications with a single database (Sqlite). CouchDB does the same thing and gives you free master-less syncing. It is from apache. Check it out. On Wed, Jan 15, 2014 at 8:12 AM, Arvind Gupta arvind.bernau...@gmail.comwrote: May be

Re: [nodejs] Re: All your images in one request, no sprite sheet required

2014-01-15 Thread Mark Hahn
The technique of monitoring the requests would be a nice way to automatically generate single packed files of all images. The single file could be broken apart in the browser. At least it seems this should be possible. Ir would be a nice nginx extension. On Wed, Jan 15, 2014 at 12:46 PM,

Re: [nodejs] [ANN] gee

2014-01-14 Thread Mark Hahn
If you're updating JSON by hand, you're doing it wrong. No exceptions. I don't understand. How does one maintain a file like package.json or any other config file? On Mon, Jan 13, 2014 at 10:07 PM, Alex Kocharin a...@kocharin.ru wrote: JSON scripts are for GUIs so they can be updated by

Re: [nodejs] Node.js V0.12 release

2014-01-09 Thread Mark Hahn
He probably meant the fiscal year. :-) On Thu, Jan 9, 2014 at 9:45 AM, Ryan Zec bas...@gmail.com wrote: On Thursday, June 20, 2013 3:24:46 AM UTC-4, Андрей Листочкин wrote: One thing that's certain - Node 0.12 will be released sometime later this year. Out of curiosity, any updates on

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

2014-01-07 Thread Mark Hahn
The examples are missing in my browser. I'm seeing the titles with nothing between them. I'm on the latest chrome. On Tue, Jan 7, 2014 at 10:52 AM, Seth Pollack s...@pollackphoto.com wrote: I've written up a blog post here http://bit.ly/KtMIYS that explains why we've chosen Node.js plus

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

2014-01-07 Thread Mark Hahn
://gist.github.com/spollack/8260776 Let me look into why that is happening (I am on latest Chrome too, and i’m seeing them inline ok) On Jan 7, 2014, at 11:10 AM, Mark Hahn m...@reevuit.com wrote: The examples are missing in my browser. I'm seeing the titles with nothing between them. I'm

Re: [nodejs] Re: New to Node.js - How to Return Status 200 by Give a URL http(s)://localhost:8080/.../ping

2014-01-07 Thread Mark Hahn
Look at the built-in url module. It does exactly what you want. On Tue, Jan 7, 2014 at 3:16 PM, JPJen caroline@gmail.com wrote: Thanks for your response. I am trying to code in the Node.js from scratch. In fact, what I would liked to learn is how to walk down the path of a URL to

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

2014-01-07 Thread Mark Hahn
Can you debug node on a linux server remotely from webstorm on windows? On Tue, Jan 7, 2014 at 8:45 PM, Seth Pollack s...@pollackphoto.com wrote: The way we debug our code is via the WebStorm debugger, and we run Streamline with the fibers backend. This experience is very slick -- you are

[nodejs] nodejs serial?

2014-01-06 Thread Mark Hahn
Is there any node module to give access to a serial port on windows that does not require compiling an extension? The author of node-serialport has this weird idea that you can't offer a c++ extension unless the user compiles it himself. -- -- Job Board: http://jobs.nodejs.org/ Posting

Re: [nodejs] nodejs serial?

2014-01-06 Thread Mark Hahn
wrote: On Mon, Jan 6, 2014 at 3:29 PM, Mark Hahn m...@reevuit.com wrote: Is there any node module to give access to a serial port on windows that does not require compiling an extension? What is the problem with using extensions that have native bindings that must be compiled when

Re: [nodejs] nodejs serial?

2014-01-06 Thread Mark Hahn
wrote: On Mon, Jan 6, 2014 at 4:15 PM, Mark Hahn m...@reevuit.com wrote: What is the problem with using extensions that have native bindings that must be compiled when they are installed? The instructions directed me to install visual studio which led me to believe that I had to compile

Re: [nodejs] nodejs serial?

2014-01-06 Thread Mark Hahn
Visual Studio Command Prompt not sure On Mon, Jan 6, 2014 at 6:39 PM, Mark Hahn m...@reevuit.com wrote: BTW, by researching the node-gyp docs I see that visual studio and python need to be installed for any windows node-gyp build. I didn't realize this. I have installed many binary

Re: [nodejs] npm package mutability

2013-12-30 Thread Mark Hahn
and people start to depend on it, it should be hard to remove it. Are you referring to some central authority you would have to petition to be allowed to remove? I can't imagine any other process that could be implemented to stop me from removing my module. In other words a computer can't

Re: [nodejs] npm package mutability

2013-12-30 Thread Mark Hahn
the changes to make sure no backdoors or bugs get introduced in the changes. On Mon, Dec 30, 2013 at 10:16 AM, Alain Mouette amlista...@fastmail.fmwrote: Em 30-12-2013 14:10, Mark Hahn escreveu: and people start to depend on it, it should be hard to remove it. Are you referring

Re: [nodejs] Anonymous Function Return Value

2013-12-28 Thread Mark Hahn
Waiting until a file is closed is not easy. Google it. On Sat, Dec 28, 2013 at 2:51 PM, Matthew Hazlett hazl...@gmail.com wrote: I want to share my idea for an execSync tailored to this issue. The commands it execs usually are less then 1 second long (run time).

Re: [nodejs] npm package mutability

2013-12-23 Thread Mark Hahn
I lock versions down because each upgrade would create a need for an exhaustive test of my app which takes a day or more. I'm a one man shop and I have about 30 npm modules in my app. On Sun, Dec 22, 2013 at 10:28 PM, Alex Kocharin a...@kocharin.ru wrote: Oh, you're right, that would work. I

Re: [nodejs] Re: horizontal scaling with NodeJS on same physical machine

2013-12-23 Thread Mark Hahn
If somebody has multicore computer and wants to utilize all cores, it'll be nice to launch multiple instances That's pretty much the whole reason. On Mon, Dec 23, 2013 at 7:54 PM, Alex Kocharin a...@kocharin.ru wrote: 1) If somebody has multicore computer and wants to utilize all cores,

Re: [nodejs] Ben Noordhuis's Departure

2013-12-10 Thread Mark Hahn
I joined this list to discuss technical topics It is very easy to tell which threads are politics just by looking at the subject line. Use your delete key. On Tue, Dec 10, 2013 at 8:46 AM, Edmond Meinfelder cstd...@gmail.comwrote: I'd like to suggest this thread is not accomplishing

Re: [nodejs] node.js needs a new home

2013-12-10 Thread Mark Hahn
GH is suppose to have a new feature soon that should let us kill the mailing list You aren't referring to google hangouts are you? I and many others refuse to join google+ or facebook. I'm not going to deal with all that social crap. On Tue, Dec 10, 2013 at 12:03 PM, Mikeal Rogers

Re: [nodejs] node.js needs a new home

2013-12-10 Thread Mark Hahn
but email beats “forums” I only use email for this forum. I've never gone to google groups website since I signed up. I hope anything we switch to also supports email. On Tue, Dec 10, 2013 at 1:57 PM, Mikeal Rogers mikeal.rog...@gmail.comwrote: On Dec 10, 2013, at 12:47PM, Mark Hahn m

Re: [nodejs] node programming style question

2013-12-06 Thread Mark Hahn
You're not a bad person if you do `var x = function(){}`. That's good because everyone using coffeescript has to use this. :-) On Fri, Dec 6, 2013 at 8:51 AM, Isaac Schlueter i...@izs.me wrote: Named function is better, for hoisting, debugging, and recursion. ## hoisting It's hoisted

Re: [nodejs] what is best ide for node?

2013-11-27 Thread Mark Hahn
Git support in webstorm is excellent. I don't ever need to go to tortoisegit or the command line. On Wed, Nov 27, 2013 at 12:58 AM, Marc Diethelm marc.diethe...@gmail.comwrote: You should take a look a WebStorm (or PHPStorm) from JetBrains. The IDE understands JavaScript is chockful with

Re: [nodejs] Should I use 64bit or 32bit of node

2013-11-24 Thread Mark Hahn
Running a 32 bits binary on a 64 bits operating system is certainly possible but system call performance generally takes a hit. I thought it was the opposite. All 64-bit does is give you more address space. 64-bit is slower because the code is larger and fewer instructions fit in cache. On

Re: [nodejs] Should I use 64bit or 32bit of node

2013-11-24 Thread Mark Hahn
Thanks ... On Sun, Nov 24, 2013 at 3:14 PM, Ben Noordhuis i...@bnoordhuis.nl wrote: On Sun, Nov 24, 2013 at 8:08 PM, Mark Hahn m...@reevuit.com wrote: Running a 32 bits binary on a 64 bits operating system is certainly possible but system call performance generally takes a hit. I

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

2013-11-22 Thread Mark Hahn
running external commands and reuse their output isn't as easy as it should be. How hard is it to do exec rm -rf / or if you are coffeescript-impaired ... exec('rm -rf /'); On Fri, Nov 22, 2013 at 6:33 AM, lith minil...@gmail.com wrote: I'm curious on people's experiences with using

Re: [nodejs] file upload module with progress

2013-11-21 Thread Mark Hahn
Check out https://github.com/blueimp/jQuery-File-Upload. I use it for node uploading and it is awesome. Shows great progress bars and will even show thumbnail before upload starts. Supports drag-and-drop. On Thu, Nov 21, 2013 at 11:38 AM, Mark Hahn m...@reevuit.com wrote: Any uploader

Re: [nodejs] file upload module with progress

2013-11-21 Thread Mark Hahn
Any uploader will work. There are some great jquery-based ones. On Thu, Nov 21, 2013 at 1:54 AM, Jarrad Salmon jamhead...@gmail.com wrote: Hi I am looking for a client side module to upload files to my server via post. I thought this would be really easy to find but seems to be more

Re: [nodejs] How to match steam data with its sender

2013-11-14 Thread Mark Hahn
That's a pretty general coding question. Can you narrow it down? It sounds like a simple string append operation. On Thu, Nov 14, 2013 at 12:32 AM, Ket kettin...@gmail.com wrote: On one end of the websocket pipeline I’ve an application that let user stream data in a json format. On the

Re: [nodejs] let's face it, /usr/bin/nodejs is better than /usr/bin/node

2013-11-10 Thread Mark Hahn
Let's face it, it was a little bit arrogant to use as the binary name. No, it was a simple non-arrogant mistake. Imagemagick using convert and several other common verbs is arrogant. It's not too late to make this change. It's not too late for debian to change and fix their mistake. Having

Re: [nodejs] Re: Edit existing pdf in node

2013-11-09 Thread Mark Hahn
convert the html back to a pdf using something like jspdf. I don't know if anyone on this list has had better luck, but I spent almost a week trying every html to pdf solution I could find and every one had some fatal flaw. Just saying. On Sat, Nov 9, 2013 at 1:58 PM, Morgan Herlocker

Re: [nodejs] Just started used node, is something like this possible and how?

2013-11-02 Thread Mark Hahn
First of all, I'd look into sockjs if I were you. I used socket.io for years and started having trouble. Sockjs is simpler and more robust. Node has a very simple way to spawn a process and get the results. Look up exec in the docs under child processes. You just do `exec cmd, function(err,

Re: [nodejs] Will vert.x pose a threat to node.js?

2013-10-31 Thread Mark Hahn
How does one find year-old node mailing list threads? Easy. Just google anything and find old threads. On Thu, Oct 31, 2013 at 1:38 PM, Alex Kocharin a...@kocharin.ru wrote: You're replying to the wrong message. I have the same questions though. 01.11.2013, 00:35, Charlie McConnell

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

2013-10-22 Thread Mark Hahn
Node has no config. You have to write code to do everything. On Tue, Oct 22, 2013 at 1:21 PM, jai bharat cooldoon...@gmail.com wrote: Hello, I have this sample virtual host config file on apache, the webserver config file. I am confused how can i have equivalent config if i decide to

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

2013-10-07 Thread Mark Hahn
a connect is successfully fired and after that an error is being fired I don't see why these multiple callbacks are a problem. They are happening exactly as they are supposed to if they are actually convenience callbacks for event emitters like http.createServer. You should handle each type

Re: [nodejs] Re: Real Time Web App: NodeJs + Socket.io with Express or partial use CakePHP/RoR for backend and rendering pages?

2013-10-05 Thread Mark Hahn
Facebook is using Node? I would be very surprised if there was anything they didn't use. On Sat, Oct 5, 2013 at 1:08 PM, Stephen Belanger cyruzdr...@gmail.comwrote: If I recall correctly, they use node for their online/offline indicators. For some odd reason the chat component isn't node. I

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

2013-10-01 Thread Mark Hahn
I'm seeing those bugs much more frequently than I'd like to. Me too. And I also see the opposite where I don't remember to put cb() everywhere it is needed and no callback happens at all. At least I know the symptom well. Everything just stops. On Tue, Oct 1, 2013 at 12:43 PM, Alex Kocharin

Re: [nodejs] Node.js high level API needed

2013-09-30 Thread Mark Hahn
All newcomers will fall in asynchronous black hole. Is that flame-bait? Learning callbacks is a necessary part of using javascript. It has nothing to do with node. Is there a reason why node.js must have higher-level API? No. The philosophy is the opposite, to make it as lean and mean as

Re: [nodejs] Node.js should delete __proto__ while we still have a chance (before we hit 1.0)

2013-09-24 Thread Mark Hahn
I don't know why this is in a node discussion group. Obviously node is not going to change V8. On Tue, Sep 24, 2013 at 3:21 PM, Tim Smart t...@fostle.com wrote: Please don't, `__proto__` is great if not abused. Swapping out the prototype of an object is extremely useful. function

Re: [nodejs] Node.js should delete __proto__ while we still have a chance (before we hit 1.0)

2013-09-24 Thread Mark Hahn
On Tue, Sep 24, 2013 at 8:24 PM, Mark Hahn m...@reevuit.com wrote: I don't know why this is in a node discussion group. Obviously node is not going to change V8. It's relevant to the community to have technical discussions about the platform. Rick -- -- Job Board: http

Re: [nodejs] Re: node application hangs sometimes, how to track down problem?

2013-09-22 Thread Mark Hahn
Also does anyone has similar problems with AWS S3 library? I have never had any problem with the S3 library. On Sat, Sep 21, 2013 at 5:04 PM, Alexey Petrushin alexey.petrus...@gmail.com wrote: Also does anyone has similar problems with AWS S3 library? It seems like it may caused by it.

Re: [nodejs] node.js and front end JS code

2013-09-12 Thread Mark Hahn
Node is usually an http server like any other. It returns whatever response you want. The contents of a file containing Hello world HTML text is a good example. On Thu, Sep 12, 2013 at 9:01 AM, Reza Razavipour reza.razavip...@gmail.comwrote: I am not understanding the data flow from the

Re: [nodejs] node.js and front end JS code

2013-09-12 Thread Mark Hahn
, Reza Razavipour reza.razavip...@gmail.com wrote: I want the browser to display the content of the HTML page and not the name. On Thursday, September 12, 2013 11:03:40 AM UTC-7, Mark Hahn wrote: correction: Change it to `res.end(MyFileName + '\n');` where MyFileName contains the name

Re: [nodejs] node.js and front end JS code

2013-09-12 Thread Mark Hahn
correction: Change it to `res.end(MyFileName + '\n');` where MyFileName contains the name of the file you want. BTW, I have no idea why you want to return a file name. You will just see that name on your browser page. On Thu, Sep 12, 2013 at 11:01 AM, Mark Hahn m...@reevuit.com wrote: Just

Re: [nodejs] node.js and front end JS code

2013-09-12 Thread Mark Hahn
: On Thursday, September 12, 2013 2:21:23 PM UTC-4, Mark Hahn wrote: change `res.end('Hello World\n'` to fs.readFile( yourFilePath, 'utf8', function(err, data) { res.end( data); } ); Or better yet: fs.createReadStream(filePath).pipe(res); -- -- Job Board: http://jobs.nodejs.org/ Posting

Re: [nodejs] node.js and front end JS code

2013-09-12 Thread Mark Hahn
Just use the http server example on the node front page and change `res.end('Hello World\n'` to `res.end('MyFileName\n');` -- -- 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

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

2013-09-12 Thread Mark Hahn
to not use SQL in an e-commerce application, it would be stupid Huh? I don't understand. What is your logic? On Thu, Sep 12, 2013 at 5:21 PM, Lucas Schmidt lucastschm...@gmail.comwrote: I should explain myself :D When I say developing in SQL is boring, I should state that I meant that

Re: [nodejs] Domain-bound variables

2013-09-09 Thread Mark Hahn
at the same time, and I've seen cases of 3rd party middleware functions doing incompatible things with req and res. F On Sun, Sep 8, 2013 at 9:06 PM, Mark Hahn m...@reevuit.com wrote: From the continuation-local-storage readme: anywhere where you might have set a property on the request

Re: [nodejs] Domain-bound variables

2013-09-08 Thread Mark Hahn
From the continuation-local-storage readme: anywhere where you might have set a property on the request or response objects in an HTTP handler, you can (and should) now use continuation-local storage. Why? I add a lot of properties to request and response objects using unique property-name

Re: [nodejs] Re: When is it safe to catch errors?

2013-08-30 Thread Mark Hahn
Core is allowed to break all the rules because the people working on it know (or are supposed to know) when it's safe and when it's not. And the rest of us are just idiots, On Fri, Aug 30, 2013 at 2:37 PM, Ben Noordhuis i...@bnoordhuis.nl wrote: On Fri, Aug 30, 2013 at 10:49 PM, Peter

Re: [nodejs] Downside to not wrapping sync callbacks in nextTick()?

2013-08-29 Thread Mark Hahn
But it's irrelevant if it's also possible to construct situations that do have problems. That is illogical. Code that is bulletproof is always OK. You are confusing philosophy with practice. On Thu, Aug 29, 2013 at 11:19 AM, Bryan Donovan brdono...@gmail.com wrote: Thanks, I just wanted

Re: [nodejs] Downside to not wrapping sync callbacks in nextTick()?

2013-08-29 Thread Mark Hahn
But if you are talking about providing a library to others then that is not bulletproof. I was only thinking of my own code, which uses mixed sync and async all the time. On Thu, Aug 29, 2013 at 12:51 PM, Mark Hahn m...@reevuit.com wrote: But it's irrelevant if it's also possible

Re: [nodejs] Re: Callbacks are Pretty Okay

2013-08-20 Thread Mark Hahn
I meant to show that applying this pattern without knowing what it actually does can lead to cases where it simply doesn't work. Of course if someone doesn't apply the pattern correctly it won't work. This is true for all patterns. There is nothing inherently dangerous about this one. I don't

Re: [nodejs] Re: Callbacks are Pretty Okay

2013-08-20 Thread Mark Hahn
. On Tuesday, August 20, 2013 2:47:57 PM UTC-4, Mark Hahn wrote: I meant to show that applying this pattern without knowing what it actually does can lead to cases where it simply doesn't work. Of course if someone doesn't apply the pattern correctly it won't work. This is true for all patterns

Re: [nodejs] Re: Callbacks are Pretty Okay

2013-08-19 Thread Mark Hahn
I said the code I posted wasn't working on coffeescript. But yours does in certain cases. The actual code I posted always works. The coding pattern I am suggesting always works. It wouldn't be very useful otherwise. -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines:

Re: [nodejs] Re: Callbacks are Pretty Okay

2013-08-18 Thread Mark Hahn
I know coffeescript functions don't hoist. I've been coding in nothing but coffeescript for almost three years. Hoisting *is* needed to call a definition that hasn't been encountered yet in time. But hoisting is *not* needed to call a function defined further down in the file. It's the

Re: [nodejs] Re: Callbacks are Pretty Okay

2013-08-18 Thread Mark Hahn
Yes, I know it isn't hoisting. I never claimed it was. I'm just saying (over and over) that callbacks can call the functions while going downwards in the file. This is how I code everything. Here is a more detailed example. Note how readable it is when the control flows downward, just like

[nodejs] command-line script question

2013-08-18 Thread Mark Hahn
When I run this bash script ... #!/bin/bash tail -f log echo tail is working log it prints out tail is working as expected. My question is how can I do the same thing with a node command-line script? I've tried everything but I can't come up with anything that works. Most of my

Re: [nodejs] Re: Callbacks are Pretty Okay

2013-08-18 Thread Mark Hahn
I agree with everyone, although I don't think it is a hack. I'm very happy that we all understand each other now. I just wanted to put this option out there. There seemed to be a general consensus that this wasn't possible in coffeescript and I wanted to provide this counter-opinion. I do feel

Re: [nodejs] command-line script question

2013-08-18 Thread Mark Hahn
...@gmail.comwrote: If this is indeed your test file it won't output. I think you may want to run your source through coffeescript first ;) On Aug 18, 2013, at 3:52 PM, Mark Hahn m...@reevuit.com wrote: When I run this bash script ... #!/bin/bash tail -f log echo tail is working log

Re: [nodejs] command-line script question

2013-08-18 Thread Mark Hahn
Thanks. I should have looked for these. It didn't occur to me. On Sun, Aug 18, 2013 at 6:18 PM, // ravi ravi-li...@g8o.net wrote: On Aug 18, 2013, at 8:41 PM, Mark Hahn m...@reevuit.com wrote: I'll try again using these ideas. It was mentioned that I'm not using a tail module. Does

Re: [nodejs] Callbacks are Pretty Okay

2013-08-17 Thread Mark Hahn
First to note - Coffee-Script actually *prohibits* this kind of code organization, because all functions are necessarily assignments. It is a myth that you have to put function definitions before the calling code in coffee. Here is a pattern I use in all my code ... start = - doNext() doNext =

  1   2   3   4   5   6   >