Re: [nodejs] Re: js-git

2014-12-30 Thread Tim Caswell
Tim Caswell t...@creationix.com: On Monday, December 29, 2014 9:02:19 AM UTC-6, serapath wrote: i'm following tim and the js-git project already for a long time... https://github.com/creationix/js-git in feature goals here: https://www.bountysource.com/teams/js-git/ fundraiser it says

[nodejs] Re: js-git

2014-12-29 Thread Tim Caswell
On Monday, December 29, 2014 9:02:19 AM UTC-6, serapath wrote: i'm following tim and the js-git project already for a long time... https://github.com/creationix/js-git in feature goals here: https://www.bountysource.com/teams/js-git/fundraiser it says: - Clone remote repositories to

Re: [nodejs] Synchronous?

2014-04-23 Thread Tim Caswell
. Though I could see how saying this yield blocks on the non-blocking function would confuse someone. On Sat, Apr 19, 2014 at 7:50 PM, // ravi ravi-li...@g8o.net wrote: On Apr 19, 2014, at 1:02 PM, Tim Caswell t...@creationix.com wrote: I would like to bring some experience and history

Re: [nodejs] Synchronous?

2014-04-19 Thread Tim Caswell
sourcemaps. Generators are getting more widespread. Stable Firefox has them today without a flag. node 0.11.x has it today with a flag, meaning you can use it as long as you control the server (so app authors, not library authors). -Tim Caswell aka @creationix On Sat, Apr 19, 2014 at 10:20

Re: [nodejs] Re: Only by 1kb, is it possible to make node.js modules run in browser, like browserify, seajs or requirejs+r.js?

2014-03-07 Thread Tim Caswell
that because I need to run in environments where there is no node or command-line. The build tool that compiles a tree of node-style modules and emits a tree of amd wrapped modules is https://github.com/creationix/my-filters/blob/master/amd-tree.js --Tim Caswell On Fri, Mar 7, 2014 at 1:04 AM, Simeon

Re: [nodejs] Re: Only by 1kb, is it possible to make node.js modules run in browser, like browserify, seajs or requirejs+r.js?

2014-03-07 Thread Tim Caswell
be a way to configure it to not need as much boilerplate, but I'm not sure. For my personal needs, browserify was not an option and what I developed for tedit has worked very nicely for me. On Fri, Mar 7, 2014 at 12:05 PM, Tim Caswell t...@creationix.com wrote: Yes, if you just want the node

Re: [nodejs] Re: What do we call ourselves? Nodesters?

2014-03-04 Thread Tim Caswell
On Tue, Mar 4, 2014 at 10:51 AM, Rick Waldron waldron.r...@gmail.comwrote: Strange how Node is categorized along with programming languages. https://medium.com/cool-code-pal/cf72b588b1b On Tue, Mar 4, 2014 at 3:55 AM, Floby florent.j...@gmail.com wrote: Nodles On Thursday, 27 February

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

2014-02-10 Thread Tim Caswell
I'm not sure it's what you want, but yes, a single node process can listen on any number of ports. You can even have the same exact request handler function service all those ports. var http = require('http'); http.createServer(onRequest).listen(3000);

Re: [nodejs] Parsing GYP files?

2014-01-23 Thread Tim Caswell
They are called python comments in this case because gyp files are in fact python code. Yes, python does have a lot of syntax overlap with JS and shell code. On Thu, Jan 23, 2014 at 9:48 AM, Kevin Ingwersen ingwie2...@googlemail.comwrote: I thought those were more likely called „shell-like

Re: [nodejs] The Next Phase of Node.js

2014-01-15 Thread Tim Caswell
Awesome news! Congrats to both of you. On Wed, Jan 15, 2014 at 9:16 AM, Alex Kocharin a...@kocharin.ru wrote: Hi Isaac, What changes are you planning on npm registry? What services will it provide for money? Will there be any changes to replication? I'm worrying a lot about npm registry

Re: [nodejs] npm package mutability

2013-12-30 Thread Tim Caswell
For what it does and what it was designed for, the current NPM central repository system works great. It wasn't meant to be a secure system with evil actors that can't trust eachother, but must work together. It does at least have basic authentication so that an author has to change evil after

Re: [nodejs] npm package mutability

2013-12-18 Thread Tim Caswell
If you want this level of static dependencies you can check in your deps into node_modules in your git tree or use git submodules in there. Git does guarantee that the thing you point to can't be changed because the hash *is* the hash of the content. If anything changes, the hash changes. On

Re: [nodejs] malware, virus etc in node.js... how to protect?

2013-12-17 Thread Tim Caswell
The node.js security model is very simple. All npm modules you install on your system and require are assumed to be safe and trusted code. Don't require modules you don't trust! If you want to write an app that requires running untrusted user generated code in a sandbox, then there are many

RE: [nodejs] nodejs acting as git server....

2013-12-10 Thread Tim Caswell
Feel free to file an issue to js-git with details of your use case. That will help me keep your use case in mind. On Dec 10, 2013 11:55 PM, Chad Engler ceng...@blizzard.com wrote: A library in the works: https://github.com/creationix/js-git -Chad *From:* nodejs@googlegroups.com

Re: [nodejs] Re: Ben Noordhuis's Departure

2013-12-09 Thread Tim Caswell
candor and candor.io. other than the bad debugging experience, candor is a pretty fun language. Let's spend our precious time making and not destroying ok? I sure don't have near enough time as it is to work on all the cool things there are. -Tim Caswell (Aka @creationix) On Dec 9, 2013 10:10 PM

Re: [nodejs] how to best develop two related modules simultaneously

2013-12-08 Thread Tim Caswell
Though to be fair, I often prefer manually creating the symlink directly as you did since I use nvm and my global node_modules changes when testing different versions of node. On Dec 7, 2013 7:55 PM, Dave Horton d...@dchorton.com wrote: Ah, yes thanks! On Saturday, December 7, 2013 6:51:07 PM

Re: [nodejs] When will Chrome Beta for Android fully support webRTC and HTML5

2013-12-08 Thread Tim Caswell
Is this the mailing list you meant to send this to? On Dec 6, 2013 12:05 PM, Ket kettin...@gmail.com wrote: I've tested my web application on several android mobile devices (smartphone, tablets). None of it works. The test link is here: http://meldville.com/demo/broadcaster.php It streams

Re: [nodejs] Will node-graceful-fs make it's magic to all third party modules also?

2013-11-05 Thread Tim Caswell
If it monkey-patched existing modules in the current process, then you need to require it once per process you want patched. So in the case of cluster, you probably want it in the worker so that worker code gets patched. On Tue, Nov 5, 2013 at 4:15 PM, Filipe Deschamps fili...@gmail.com wrote:

Re: [nodejs] Re: node server can't show characters besides English

2013-10-25 Thread Tim Caswell
Also keep in mind that the native string type in JavaScript is UCS-16 which means that any code points higher than 16 bits have to be encoded using surrogate pairs. (Note that the native encoding is quite different from the UTF-8 encoding commonly used when serializing strings to binary data) A

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

2013-10-08 Thread Tim Caswell
On Tue, Oct 8, 2013 at 12:52 AM, jeevan kk jeeva...@gmail.com wrote: On Tuesday, 8 October 2013 11:13:24 UTC+5:30, Mark Hahn wrote: 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

Re: [nodejs] [ann] JS-Git Milestone #1

2013-10-07 Thread Tim Caswell
at 4:43 PM, Tim Caswell t...@creationix.com wrote: Just wanted to send a node out that my js-git project has reached the first milestone in functionality. This means you can use the library to: - Clone remote repositories over TCP, HTTP(s) and SSH. - Pull in incremental updates - Make

Re: [nodejs] [ann] JS-Git Milestone #1

2013-10-07 Thread Tim Caswell
interface to program against. On Fri, Oct 04, 2013 at 03:43:06PM -0500, Tim Caswell wrote: Just wanted to send a node out that my js-git project has reached the first milestone in functionality. This means you can use the library to: - Clone remote repositories over TCP, HTTP(s) and SSH

[nodejs] [ann] JS-Git Milestone #1

2013-10-04 Thread Tim Caswell
Just wanted to send a node out that my js-git project has reached the first milestone in functionality. This means you can use the library to: - Clone remote repositories over TCP, HTTP(s) and SSH. - Pull in incremental updates - Make shallow clones or clone only a specific branch or tag.

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

2013-09-30 Thread Tim Caswell
This is equivalent to asking Linus to bundle a graphical desktop environment with the linux kernel so that there is one common front-end that everyone uses and newbies don't have to build their own linux desktop from scratch. The difference between node and linux is that there are many competing

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

2013-09-30 Thread Tim Caswell
. Anyway high level -- will be cool feature. I hope someone's can overpower it. It's will be cool for user apps. понедельник, 30 сентября 2013 г. пользователь Tim Caswell писал: This is equivalent to asking Linus to bundle a graphical desktop environment with the linux kernel so

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

2013-09-21 Thread Tim Caswell
If you really want a safe map where any key is allowed and doesn't conflict with builtin javascript properties, just implement your own map. Here is a very simple one that allows storing *any* value as keys. This includes the string __proto__ as well as non-strings. If you want something faster

Re: [nodejs] Confused about Blocking and backpressure.

2013-09-09 Thread Tim Caswell
.pause() and .resume() are the proper way to use flowing mode aka streams 1. Read up on the modes at http://nodejs.org/api/stream.html#stream_class_stream_readable On Mon, Sep 9, 2013 at 4:02 PM, HungryHippo wilson.davidwil...@gmail.comwrote: isn't the use of .pause() deprecated with Streams1

Re: [nodejs] Re: The problem with the current working directory

2013-08-26 Thread Tim Caswell
Node's require is always relative to the file that calls require. In fact, the internal implementation of this is done by giving file a unique copy of the require function that embeds that file's directory. If you wanted to require relative to the cwd, then use process.cwd and path.resolve. If

Re: [nodejs] Re: How i can deploy nodejs in vps

2013-08-26 Thread Tim Caswell
On Mon, Aug 26, 2013 at 11:30 AM, Michael Pisarski mspis...@gmail.comwrote: I use forever and have not had any issues. Does forever handle machine reboots? On Sunday, August 25, 2013 4:57:10 AM UTC-4, Fernando Segura Gòmez wrote: Hi. I need help, im very newbie about how deploy my nodejs

Re: [nodejs] Node v0.11.6 (Unstable)

2013-08-21 Thread Tim Caswell
Impressive changelog. Congrats team. This reminds me a bit of the early days of fun. On Wed, Aug 21, 2013 at 3:30 PM, Timothy J Fontaine tjfonta...@gmail.comwrote: 2013.08.21, Version 0.11.6 (Unstable) * uv: Upgrade to v0.11.8 * v8: upgrade v8 to 3.20.14.1 * build: disable SSLv2 by

Re: [nodejs] Re: The future of node streams. We need to talk

2013-08-17 Thread Tim Caswell
both it's downstream chains have aborted. Feel free to create an issue in js-git to discuss simple-streams (or continue discussing here, but know I'm too busy writing code to read all the threads here). -Tim Caswell On Thu, Aug 15, 2013 at 7:23 PM, Jake Verbaten rayn...@gmail.com wrote: Yes

Re: [nodejs] Re: [ann] rec - A terminal recorder tool

2013-08-12 Thread Tim Caswell
/ascii.io#1-install-dependencies On Saturday, 10 August 2013 07:57:06 UTC+10, Tim Caswell wrote: Related to js-git, I wanted a way for people to record their terminal and send me debug info, so I spent a couple hours and wrote a simple, but awesome recorder. https://github.com/creationix/**rec

[nodejs] [ann] js-git-node

2013-08-09 Thread Tim Caswell
/creationix/036c175d18a8a692a89d and in the issue tracker for js-git. -Tim Caswell -- -- 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

[nodejs] Re: [ann] js-git-node

2013-08-09 Thread Tim Caswell
I should mention that the CLI tool should support all three kinds of git protocols. They are ssh:// (aka g...@github.com:...) git:// and http(s):// If one doesn't work for you, but does work with real git, it's a bug. On Fri, Aug 9, 2013 at 12:13 PM, Tim Caswell t...@creationix.com wrote

[nodejs] [ann] rec - A terminal recorder tool

2013-08-09 Thread Tim Caswell
Related to js-git, I wanted a way for people to record their terminal and send me debug info, so I spent a couple hours and wrote a simple, but awesome recorder. https://github.com/creationix/rec If you're testing out js-git-node or any node cli program, the output of this program can help when

Re: [nodejs] Future of asynchronous programming in node

2013-08-06 Thread Tim Caswell
. ( https://groups.google.com/d/msg/nodejs/eK00eDF-4Zw/FQhDrlEs0xUJ) -Tim Caswell -Mikeal -- -- 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

Re: [nodejs] Future of asynchronous programming in node

2013-08-06 Thread Tim Caswell
So I talked a bit to Mikeal about his concerns and there is a slight misunderstanding here. The best I can tell, his concern is that people will get used to using function* and yield with non-async code and then not notice when they are used in async code. In other words, he's worried

Re: [nodejs] Future of asynchronous programming in node

2013-08-06 Thread Tim Caswell
On Aug 6, 2013, at 2:33PM, Tim Caswell t...@creationix.com wrote: My question to people on the list is how is this any different than the same hazard with normal function? var sum, i; function reduce(arr) { sum = 0; i = 0; return function () { if (i

Re: [nodejs] Future of asynchronous programming in node

2013-08-06 Thread Tim Caswell
different. Tell me which is these will yield .. a() b() c() On Tue, Aug 6, 2013 at 2:54 PM, Tim Caswell t...@creationix.com wrote: On Tue, Aug 6, 2013 at 4:47 PM, Mikeal Rogers mikeal.rog...@gmail.comwrote: It is the *exact same* hazard as the code you posted, I don't think it is any

Re: [nodejs] Future of asynchronous programming in node

2013-08-05 Thread Tim Caswell
It doesn't On Mon, Aug 5, 2013 at 1:32 PM, Mikeal Rogers mikeal.rog...@gmail.comwrote: I don't see how generators are going to change how actual async programming happens in node.js, at least in ES6. It doesn't change how things work internally. Libraries and node core should only use

Re: [nodejs] Re: Weird error with generators (using suspend or galaxy)

2013-07-15 Thread Tim Caswell
-Tim Caswell On Mon, Jul 15, 2013 at 2:11 AM, cpprototypes cpprototy...@gmail.comwrote: Thanks for the replies, I have a better understanding now of how these libraries are using generators. I hope that one of these types of libraries becomes as popular as the async library and standard

Re: [nodejs] Best practice for Node module interface

2013-07-11 Thread Tim Caswell
// E var foo = module(); Keep it simple. On Wed, Jul 10, 2013 at 5:39 PM, Andy W. awillson...@gmail.com wrote: I have seen a wide variety in different style for creating custom Node modules. What style do you prefer or are there any best practices? I'm fairly new to the Node community.

Re: [nodejs] Best practice for Node module interface

2013-07-11 Thread Tim Caswell
Besides simplicity, there are several reasons to simply export a function that accepts config options and returns an instance of the module. - Instanceof is dangerous and doesn't work cross-context or if you have more than one copy of a module (something that's very common in the default

Re: [nodejs] Best practice for Node module interface

2013-07-11 Thread Tim Caswell
to application code (not installed via npm). I would at least rule out B though, as your functions should indicate in some way if they're intended to be used as a factory. Summary: A for constructors or factories, E for everything else. Cheers, Adam Crabtree On Thu, Jul 11, 2013 at 9:16 AM, Tim

Re: [nodejs] Best practice for Node module interface

2013-07-11 Thread Tim Caswell
, Adam Crabtree On Thu, Jul 11, 2013 at 9:16 AM, Tim Caswell t...@creationix.com wrote: Besides simplicity, there are several reasons to simply export a function that accepts config options and returns an instance of the module. - Instanceof is dangerous and doesn't work cross-context

Re: [nodejs] You're going to have to rewrite it anyway

2013-07-10 Thread Tim Caswell
memory you manage in it, but that's simple logic. My goal is to expose a very JS-like semantic to bindings authors since they are interfacing with JS. -Tim Caswell -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You

Re: [nodejs] You're going to have to rewrite it anyway

2013-07-09 Thread Tim Caswell
a general idea of the kind of API I'm looking for. The important thing is that it's as 1:1 with the JS it represents as possible, but in simple C. On Mon, Jul 8, 2013 at 9:58 PM, Tim Caswell t...@creationix.com wrote: I can vouch for a stable and documented C API. The main thing that stopped me from

Re: [nodejs] Re: You're going to have to rewrite it anyway

2013-07-09 Thread Tim Caswell
On Tue, Jul 9, 2013 at 4:16 AM, Floby florent.j...@gmail.com wrote: Tim's examples are pretty nice. The only things missing for all my use cases are storing pointers in JS objects so I can get them back when I need it. something like js_set_pointer(C, myObject, pointer); myType *pointer =

Re: [nodejs] Re: You're going to have to rewrite it anyway

2013-07-09 Thread Tim Caswell
references this and positive slots are passed in arguments. On Tue, Jul 9, 2013 at 10:08 AM, Tim Caswell t...@creationix.com wrote: On Tue, Jul 9, 2013 at 4:16 AM, Floby florent.j...@gmail.com wrote: Tim's examples are pretty nice. The only things missing for all my use cases are storing

Re: [nodejs] You're going to have to rewrite it anyway

2013-07-09 Thread Tim Caswell
to the set of GC roots (for storage in some C struct passed to the C callback later on). That should be enough to wrap the various libuv apis. – Micheil On 09/07/2013, at 6:08 PM, Tim Caswell t...@creationix.com wrote: On Tue, Jul 9, 2013 at 4:16 AM, Floby florent.j...@gmail.com wrote: Tim's

Re: [nodejs] You're going to have to rewrite it anyway

2013-07-09 Thread Tim Caswell
perspective as a C/C++ non-expert. Most node.js developers are JS developers. Most (not all obviously) of the binary node addons I know of were written by people with little C background. On Tue, Jul 9, 2013 at 1:04 PM, Tim Caswell t...@creationix.com wrote: On Tue, Jul 9, 2013 at 12:39 PM

Re: [nodejs] You're going to have to rewrite it anyway

2013-07-08 Thread Tim Caswell
it is. I can draft some APIs based on my experience with writing libuv bindings for various runtimes if you're interested. -Tim Caswell On Mon, Jul 8, 2013 at 1:35 PM, Timothy J Fontaine tjfonta...@gmail.comwrote: [cross post from http://atxconsulting.com/2013/07/06/rewrite-it-anyway/] Node

Re: [nodejs] Compressing requests (gzip?)

2013-07-07 Thread Tim Caswell
I'm using for js-git Also since msgpack supports binary data within the encoding, you could deflate certain messages if deflating the entire stream was too much. -Tim Caswell On Fri, Jul 5, 2013 at 5:45 PM, Ryan Schmidt google-2...@ryandesign.comwrote: On Jul 5, 2013, at 15:10, Guillermo

Re: [nodejs] Node.js ES6

2013-07-02 Thread Tim Caswell
because they are both usable with callbacks and generator helpers like gen-run and co. JS-Git is a great example of this. The library is completely usable without any ES6 features, but it's even nicer when you do have them. https://github.com/creationix/git-repo/blob/master/example/create.js -Tim

[nodejs] Announcing JS-Git and related projects.

2013-06-13 Thread Tim Caswell
software I've released in the open and is licensed MIT for anyone to use. I have open discussion on IRC (#js-git) and twitter and the jsgit google group every day looking for community feedback on the APIs. Let me know what you think. -Tim Caswell [bountysource]: https://www.bountysource.com

Re: [nodejs] Announcing JS-Git and related projects.

2013-06-13 Thread Tim Caswell
. -- Diogo Resende On Thursday, June 13, 2013 at 20:54 , Tim Caswell wrote: As some of you know, and many of you do not, I've been spending the last few months working on implementing git in javascript. I started out with a small, but successful [kickstarter] that enabled me to quit my day job

Re: [nodejs] Re: Announcing JS-Git and related projects.

2013-06-13 Thread Tim Caswell
implementation of the fs backend earlier today and I'll make an abstract implementation of the db backend that piggybacks on top of the fs interface (combined they will work like real git with the .git folder) On Thursday, June 13, 2013 11:54:14 PM UTC+4, Tim Caswell wrote: As some of you know, and many

Re: [nodejs] http parsing in node?

2013-06-10 Thread Tim Caswell
The core http parser is exposed via the private APIs just look at the source of http.js in node's source. I will warn however that it does seem to change between versions as the node core team tries to make every release faster than the last. I've written a couple pure-js http parsers, they are

Re: [nodejs] http parsing in node?

2013-06-10 Thread Tim Caswell
such a large API. Also, this just looks like the server side of things (decoding requests / encoding responses). Is that right? Any plans for the client side? Yes, I especially need client-side for git clone and push over http. Thanks, G On Mon, Jun 10, 2013 at 7:04 PM, Tim Caswell

Re: [nodejs] HTTP - how to send multiple pre-cached gzipped chunks?

2013-05-24 Thread Tim Caswell
gzip has internal headers that must only appear at the beginning. You can't send two gzip documents in the same document. The browsers don't support that. If you have the same two chunks all the time, you can combine and then gzip once and send the one resulting chunk. On Fri, May 24, 2013 at

Re: [nodejs] HTTP - how to send multiple pre-cached gzipped chunks?

2013-05-24 Thread Tim Caswell
gzip chunk? Or that header is binded to gziped data? On Friday, May 24, 2013 9:37:28 PM UTC+2, Tim Caswell wrote: gzip has internal headers that must only appear at the beginning. You can't send two gzip documents in the same document. The browsers don't support that. If you have the same

Re: [nodejs] NPK - Node.js packaging Utility

2013-05-13 Thread Tim Caswell
Alex, I share your pain. That is why I made a version/port of node that didn't use V8, but rather, the much lighter-weight luajit engine. It's at luvit.io. (warning, not compatible with node.js code or ecosystem, just the same idea / API style) On Sun, May 12, 2013 at 6:21 AM, Alex Kocharin

Re: [nodejs] NPK - Node.js packaging Utility

2013-05-13 Thread Tim Caswell
actually. As long as it doesn't run too terribly slow. On Mon, May 13, 2013 at 4:07 PM, Alex Kocharin a...@kocharin.ru wrote: If we are talking about non-compatible solutions, I might as well use python instead ;) -- // alex 14.05.2013, 01:04, Tim Caswell t...@creationix.com: Alex, I

Re: [nodejs] NPK - Node.js packaging Utility

2013-05-13 Thread Tim Caswell
it needs to read on startup... npm itself do 964 system calls to various */node_modules/*.js files when it's starting (use strace to check that). -- // alex 14.05.2013, 01:17, Tim Caswell t...@creationix.com: If you ever come across a JS engine that boots as fast as Lua, I'll port node

Re: [nodejs] Node v0.11.2 (Unstable)

2013-05-13 Thread Tim Caswell
I just noticed this has the version of V8 with harmony generators! (behind a flag) A very simple example of how to block on I/O within a generator is at https://gist.github.com/creationix/5544019 On Mon, May 13, 2013 at 5:55 PM, Isaac Schlueter i...@izs.me wrote: 2013.05.13, Version 0.11.2

Re: [nodejs] as/for: thoughts on adding aliases to npm as an alternative to dependency injection

2013-05-13 Thread Tim Caswell
I often have a similar need. In debian systems, I'm noticed that sometimes there are virtual packages that several competing packages all provide the concrete representation for. Maybe a simpler syntax using the idea of provides could be used here. My concrete example, is my js-git demo. I'm

Re: [nodejs] preferred license for node modules?

2013-05-08 Thread Tim Caswell
I've thought about this topic for years. The conclusion that I've come to is I never want to charge royalties for software I write. It's a terrible way to make money off software given the nature of open-source and how open-source markets work. As the OP has stated, the common ways of making

Re: [nodejs] ECMAScript 6, asm.js, can node.js dump V8 or be VM agnostic?

2013-04-03 Thread Tim Caswell
I would love to see luvmonkey finished. Once the core spidermonkey - libuv bindings were complete, the rest could be implemented in pure JS on top. Someone could clone the node.js APIs in pure JS on top of luvmonkey. From what I know about node's development, changing engines will never happen

Re: [nodejs] Newbie Question: How to push updates to CLI?

2013-04-02 Thread Tim Caswell
On Tue, Apr 2, 2013 at 1:16 PM, NM xenomorph...@gmail.com wrote: Hi there, I am completly new to node.js and got my first successful installation and examples done today. I wanted to use node.js to communicate with an raspi. Following idea: 1.) I wanted to set data in an LAMP enviroment

Re: [nodejs] Re: please include the full MIT license in your modules or they have none

2013-03-27 Thread Tim Caswell
I hereby agree to grant a MIT/BSD/ISC compatible license for any code I post publicly to my github account under creationix. If I forget to document this while creating a project and your employer's lawyers require more documentation, please send me a friendly pull request and I'll try to

Re: [nodejs] Cant install NPM as user not root

2013-03-26 Thread Tim Caswell
I tend to use the binaries posted on nodejs.org instead of the binaries in the debian/ubuntu repos. Here is how I get the latest node for a new linux server I'm setting up: wget http://nodejs.org/dist/v0.10.1/node-v0.10.1-linux-x64.tar.gz tar -xvf node-v0.10.1-linux-x64.tar.gz cd

Re: [nodejs] Re: Cant install NPM as user not root

2013-03-26 Thread Tim Caswell
As far as removing the old packages, I'm not sure how they are packaged on ubuntu, but `apt-get remove node-*` or something might help. If you don't mind having partially installed stuff and removing it the right is too hard, just delete /usr/bin/node and /usr/bin/npm and it will stay out of the

[nodejs] Re: npm link and global-ness

2013-03-25 Thread Tim Caswell
In your use case, I just manually create a symlink directly and bypass the local stuff: cd node_modules ln -s ../../base cd .. npm ls I use npm link to install a module globally, usually because I'm writing a CLI script and want to test it. On Sunday, March 24, 2013 6:21:43 PM

Re: [nodejs] Re: OO usage howto? (I think it's something about scopes.)

2013-03-25 Thread Tim Caswell
See the last diagram in http://howtonode.org/object-graphs to understand that functions on objects are in no-way bound to the object you initially assigned them to. On Mon, Mar 25, 2013 at 11:30 AM, mgutz mario.l.gutier...@gmail.com wrote: You may also need to bind `onConnection` to `this`

Re: [nodejs] Re: Is it possible to create a node.js module wich uses c libraries for database connection?

2013-03-22 Thread Tim Caswell
Node can easily consume C libraries through V8 Bindings written in C++ or through the ffi module as Bradley said. The only catch is those C libraries need to never block on I/O. If they do, they will kill the node server's performance since node is single-threaded. Any existing library that

Re: [nodejs] git server built with node

2013-03-18 Thread Tim Caswell
Tim, I do have a stretch goal in my kickstarter for your use case, but it's not my primary use case. If nothing shows up and I get enough funding, I'll have this for you in a few months. -Tim Caswell On Mon, Mar 18, 2013 at 8:14 PM, Arunoda Susiripala arunoda.susirip...@gmail.com wrote: I

Re: [nodejs] Re: Suggestion for the implementation of util.inherits()

2013-03-05 Thread Tim Caswell
On Tue, Mar 5, 2013 at 2:33 AM, greelgorke greelgo...@gmail.com wrote: Your version makes the prototype chain longer, which may have a performance impact on some important parts of the lib. Please Correct me if i'm wrong, but this could produce chains: CustomStream-(ReadableStream-)

Re: [nodejs] NPM Readme vs Github Readme

2013-02-23 Thread Tim Caswell
I would think the easiest route would be sending Isaac a pull request (assuming the npm website is on github). I can't imagine he would be against making this match github's markdown features. On Fri, Feb 22, 2013 at 7:13 AM, Michal Srb xixi...@seznam.cz wrote: Hi, I was trying to find any

Re: [nodejs] Need an offline npm-style repository - what's a good approach?

2013-02-18 Thread Tim Caswell
If you want a mirror of the public npm repo, one option is to replicate the couch database. It's pretty big, but once replicated would give you a full mirror. I'm pretty sure you can do delta updates later on by putting the couch database back online and syncing again. On Mon, Feb 18, 2013 at

Re: [nodejs] newbie question

2013-02-15 Thread Tim Caswell
You generally only listen and wait for the end event on the request body if you care about the request body. In both these examples you're not listening for the request data events, so I don't think the end event (part of the same stream interface) is interesting. Also I noticed that one example

Re: [nodejs] Re: which are the big applications running on node.js

2013-02-14 Thread Tim Caswell
The main cloud9 infra is closed source, but there is an open source version of the editor with a node.js backend. Also many of the open source projects we created when I was there are on github. http://github.com/c9/ Also, if you consider Microsoft a big name, they have quite a bit of node code

Re: [nodejs] Re: is node.js Buffer big endian or little endian?

2013-02-13 Thread Tim Caswell
Node buffers store data in 8-bit chunks, so endianess doesn't matter. In the helper methods on buffers, you have to specify the endianess when reading and writing anything over 8-bits long. ( http://nodejs.org/api/buffer.html). Here is an example using the node repl. b = new

Re: [nodejs] does libuv's event loop handle all callbacks?

2013-02-11 Thread Tim Caswell
/master/src/timer_wrap.cc . And here is the JS API wrapper to expose this as the well known setTimeout interface: https://github.com/joyent/node/blob/master/lib/timers.js#L180-L214 Hope this helps, let me know if you have more questions. There is a lot going on here. -Tim Caswell On Mon, Feb 11

Re: [nodejs] does libuv's event loop handle all callbacks?

2013-02-11 Thread Tim Caswell
um 16:34 schrieb Tim Caswell t...@creationix.com: The language itself has no I/O at all. Even setTimeout and setInterval are implemented by the libuv bindings using uv_timer_t instances. In the browser the language VM is bound to the browser natives and APIs. In node, the language is bound

Re: [nodejs] does libuv's event loop handle all callbacks?

2013-02-11 Thread Tim Caswell
than JavaScript (because of the native c bindings?). I will follow the project and look how it will develope. Regards, Bodo Am 11.02.2013 um 18:13 schrieb Tim Caswell t...@creationix.com: I'm a C++ newb myself, so I can't recommend any good resources. I learned most my libuv through

Re: [nodejs] Re: Convincing team to use Node

2013-01-09 Thread Tim Caswell
That's awesome Brian, I went a similar route in the early days of node. I quit my senior PHP position to work on node full time, and now some consider me a node expert. There is no shortage of smart people in the world, that's for sure. On Wed, Jan 9, 2013 at 1:15 PM, Brian Link

Re: [nodejs] Dependency based asynchronous flow

2013-01-09 Thread Tim Caswell
I also tried this approach in the early days and handed off the code to tmpvar as conductor. Personally it was too complex to be usable, but it sure was a fun challenge to write. On Wed, Jan 9, 2013 at 4:17 PM, Tatumizer tatumi...@gmail.com wrote: hi Tom, did you come up with this concept

Re: [nodejs] Dependency based asynchronous flow

2013-01-09 Thread Tim Caswell
Oops, forgot the link. Here is the article announcing it from almost 3 years ago http://howtonode.org/step-of-conductor On Wed, Jan 9, 2013 at 4:37 PM, Tim Caswell t...@creationix.com wrote: I also tried this approach in the early days and handed off the code to tmpvar as conductor

Re: [nodejs] Re: I need your help desperately for increase my streaming speed

2013-01-08 Thread Tim Caswell
Since you say it works fast locally and slow over internet, I'm guessing the issue is bandwidth and internet latency. If the node proceess isn't maxing out a cpu core, it's probably not the bottleneck. You may need to change your architecture not your runtime. For example use node to set up p2p

Re: [nodejs] Coping with invalid http headers

2013-01-08 Thread Tim Caswell
You can use the TCP client directly and hand-roll the http request. Your response won't be parsed as http (nor would you want to in the error case), but you can write a crude parser in js to get the bulk of it. On Tue, Jan 8, 2013 at 12:42 PM, Matt hel...@gmail.com wrote: We're doing web

Re: [nodejs] Coping with invalid http headers

2013-01-08 Thread Tim Caswell
of it. Depending on where node fails you might be able to use the underlying http_parser bindings directly. Look in http.js in the node source to see how it's used. On Tue, Jan 8, 2013 at 1:36 PM, Matt hel...@gmail.com wrote: On Tue, Jan 8, 2013 at 2:26 PM, Tim Caswell t...@creationix.com wrote: You can use

Re: [nodejs] Node web interface to execute and handle the Perl Shell backed process.

2013-01-07 Thread Tim Caswell
Node can easily call other processes and has full control over the stdio streams if desired. (or there are convenience wrappers if you don't need full control) Look at the child_process APIs. On Sun, Jan 6, 2013 at 9:41 PM, Suraj Singh Thapa thapa.suraj...@gmail.comwrote: Hi, I have number of

Re: [nodejs] Re: String.prototype.localeCompare

2013-01-03 Thread Tim Caswell
Unless it's changed recently, dropping in various versions of V8 are pretty safe in node. The V8 team doesn't change APIs that often, and usually it's adding new APIs, not breaking existing ones. I've never heard of v8-i18n, so I don't know how well that tracks. I would hope it's API compatible

Re: [nodejs] app 100% node...

2012-12-20 Thread Tim Caswell
I've never used http://locomotivejs.org/, but node itself is quite powerful for nearly any web project when coded with enough skill. If the question is if node itself has enough potential, then the answer is that, yes, node is plenty powerful. But practically speaking, the framework you use and

Re: [nodejs] best distributed multi-writer, single-reader store?

2012-12-18 Thread Tim Caswell
If the amount of data is small enough that it can all be kept in ram, a simple custom database using large node buffers would work great. I would use msgpack or some other compact serialization to store the data in the buffer efficiently. If it's too large for memory, then a single append-only

Re: [nodejs] Trouble understanding Callbacks

2012-11-26 Thread Tim Caswell
To further explain this. This is what node calls an async function. It's supposed to be the analogue to a sync function, except that it doesn't block the program (the call to fs.readFile will return right away). If this was a sync function (and in fact, there is a sync version of this one), it

Re: [nodejs] Does node require a lot of RAM

2012-11-20 Thread Tim Caswell
Node uses a lot depending on what that means. Besides the actual amount of buffer data you app logic keeps in ram, node itself uses about 10Mb overhead for the bare process. Also the GC is optimized more for speed than memeory usage. It doesn't really start freeing till it feels memory

Re: [nodejs] Re: ANN: ssh2 module

2012-11-15 Thread Tim Caswell
Great work! I've been wanting something like this for a long time. One quick question though. Is it possible to both spawn a child process and use it's stdio as raw binary data (no tty metadata) *and* spawn a tty powered child (like bash -l) in the same connection? I never could find a way to

Re: [nodejs] Try/catch not broken in node.js / How to properly handle uncaughtExceptions

2012-11-14 Thread Tim Caswell
Adam, I'm glad you're still using that code! Out of curiosity, have you compared it to domains? On Wed, Nov 14, 2012 at 11:57 AM, Adam Crabtree atcrabt...@gmail.comwrote: More than a couple people mentioned try/catch not working in node.js in the Fibers 0.5 thread (

Re: [nodejs] Re: process.env - documentation?

2012-11-01 Thread Tim Caswell
I've been using since before it was popular. Back in the early days, the docs for node were full of references to linux man pages like this. My background was scripting languages and I had never done any C programming so I had no clue what readdir(3) meant. To open a file back then you had to

  1   2   3   4   >