Re: [nodejs] Simple LightWeight OOP. 100% compatibility with JavaScript. Feedback please!

2012-11-01 Thread Karl
And is that a metric or an imperial doohickey? If it's imperial it will not wrap well everywhere, better to write a thingamabob... El jueves, 1 de noviembre de 2012 06:25:49 UTC+1, Isaac Schlueter escribió: > > Trololololol ;p > > On Wednesday, October 31, 2012, Mark Hahn wrote: > >> Or, just use

Re: [nodejs] https problem one server, two url, two ip addresses (eth0 and eth0:0)

2012-11-01 Thread Karl
I made filtered version with tcpdump/wireshark of the relevant packages like so: ip.addr == xx.xxx.xx.39 and tcp and ! tcp.port eq 22 should I dump that here on the list or mail it? sort of long El miércoles, 31 de octubre de 2012 20:21:22 UTC+1, Karl escribió: > > Hi, > thanks for your help, I'

[nodejs] Creating a stateful server using node.js

2012-11-01 Thread Arindam Mukherjee
I am trying to write a distributed monitoring and replication framework for files using node.js. I want to keep track of the last modified time, chksum, size, etc of files in a directory and bump up a version if something changes. For this I need to be able to compare older stored values of the

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

2012-11-01 Thread Matt
If the docs covered every aspect of how programming networks, child processes, systems and filesystems worked they would be huge. There's a place for tutorials though - but it's not in the core docs IMHO. If you don't know what an environment variable is then you have some basic learning to do bef

Re: [nodejs] Creating a stateful server using node.js

2012-11-01 Thread Dan Milon
Sounds like you need a database, not? Is there a particular reason you wont use a regular generic external database? You could even use embedded levelDB https://github.com/rvagg/node-levelup danmilon. On 11/01/2012 12:02 PM, Arindam Mukherjee wrote: > I am trying to write a distributed monitoring

Re: [nodejs] https problem one server, two url, two ip addresses (eth0 and eth0:0)

2012-11-01 Thread Ben Noordhuis
On Thu, Nov 1, 2012 at 11:37 AM, Karl wrote: > I made filtered version with tcpdump/wireshark of the relevant packages > like so: ip.addr == xx.xxx.xx.39 and tcp and ! tcp.port eq 22 > should I dump that here on the list or mail it? sort of long The blob you posted doesn't show anything obviousl

[nodejs] Re: Simple LightWeight OOP. 100% compatibility with JavaScript. Feedback please!

2012-11-01 Thread Alexey Petrushin
Take a look at functional mixins, it's native to JS, requires zero-framework and looks much simpler and powerful than prototype - based. https://speakerdeck.com/anguscroll/how-we-learned-to-stop-worrying-and-love-javascript On Thursday, November 1, 2012 2:37:33 AM UTC+4, Fredrik O wrote: > > Hi

[nodejs] Re: Simple LightWeight OOP. 100% compatibility with JavaScript. Feedback please!

2012-11-01 Thread Alexey Petrushin
Actually, after discovering functional mixins I stopped use classes in CoffeeScript. On Thursday, November 1, 2012 6:02:49 PM UTC+4, Alexey Petrushin wrote: > > Take a look at functional mixins, it's native to JS, requires > zero-framework and looks much simpler and powerful than prototype - bas

Re: [nodejs] https problem one server, two url, two ip addresses (eth0 and eth0:0)

2012-11-01 Thread Karl
Thanks to all, I'll come back if I find out what's the cause El jueves, 1 de noviembre de 2012 14:24:53 UTC+1, Ben Noordhuis escribió: > > On Thu, Nov 1, 2012 at 11:37 AM, Karl > > wrote: > > I made filtered version with tcpdump/wireshark of the relevant packages > > like so: ip.addr == xx.xxx

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

2012-11-01 Thread Alex Kocharin
I think that common nodejs related env variables like NODE_ENV or NODE_DEBUG should be there, but there's no need to add any others. On Thursday, November 1, 2012 5:13:39 PM UTC+4, Matt Sergeant wrote: > > If the docs covered every aspect of how programming networks, child > processes, systems

Re: [nodejs] a simple http server making current folder accessible from web?

2012-11-01 Thread david guttman
There's also "serve" by tjholowaychuk: https://npmjs.org/package/serve npm install serve -g serve On Wednesday, October 31, 2012 11:30:29 PM UTC-7, Arunoda Susiripala wrote: > > Thanks iz. > > Looks great will use it instead python :) > > > On Thu, Nov 1, 2012 at 10:56 AM, Isaac Schlueter > > wr

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

2012-11-01 Thread SL
Wow, thanks for the condescending and arrogant comment! I'm not suggesting there should be a 'tutorial' about any of those things you mentioned. However the docs at the moment are IMO a bit ambiguous about this point - it just says "An object containing the user environment. See environ(7)." I d

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

2012-11-01 Thread SL
That's what I initially assumed it related to. On 1 November 2012 15:11, Alex Kocharin wrote: > > I think that common nodejs related env variables like NODE_ENV or > NODE_DEBUG should be there, but there's no need to add any others. > > > On Thursday, November 1, 2012 5:13:39 PM UTC+4, Matt Serg

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

2012-11-01 Thread Chad Engler
It wasn't condescending; "topic(page#)" like "environ(7)" is a very common way to express man pages, and if you aren't aware of what the user environment is you should probably do more research. Had you typed "environ(7)" into google before getting butthurt at the docs, you probably would have foun

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 m

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

2012-11-01 Thread Matt
You maybe misread me - I *am* suggesting there should be a tutorial about those things. I just think it belongs outside of the node core docs. Or in a book. The node core docs should give you exactly accurate minimal information to point you in the right direction (aka google) if you need/want to

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

2012-11-01 Thread SL
As you guessed, I'm developing on Windows. Thanks for the understanding! Yes a link would have avoided all confusion. On 1 November 2012 17:42, Tim Caswell wrote: > 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 pa

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

2012-11-01 Thread Chad Engler
I really think all of this could have been avoided, and new knowledge consumed using this simple process that has guided me for years: 1. Encounter unknown term, phrase, or idea 2. Copy unknown term, phrase, or idea to clipboard 3. Paste unknown term, phrase, or idea into a

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

2012-11-01 Thread SL
Ok, last post as the vibe here is a distinctly unfriendly... It's quite simple: When I read 'see environ(7)' I assumed that was a reference to another part of the node docs. When a reference is made to another source, I'm used to seeing the source named. If it had said 'see: man-pages environ(7)'

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

2012-11-01 Thread Chad Engler
Ill repeat myself for the third time now: If you see something and are confused on what it means, Google is a great starting point. Had you attempting to figure it out on your own, you would have seen the first link, felt silly, and moved on. -Chad From: nodejs@googlegroups.com [mailto:node

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

2012-11-01 Thread Chad Engler
Also, the unfriendliness stems from the fact that after answering your question, you didn't like it. So we answered a different way, and you called us condescending. Which means that normal conversation doesn't work, so I have to try a different approach; actually being condescending. -Chad

Re: [nodejs] NodeJS Runtime for Chrome

2012-11-01 Thread Jeff Barczewski
I agree with what you are saying Tim, just adding a couple comments. On Wednesday, 31 October 2012 11:16:10 UTC-5, Tim Caswell wrote: > > ... > > Go through the node API, it's not that big. http://nodejs.org/api/ > And for each item, find a corresponding browser API that provides the > same abil

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

2012-11-01 Thread Dan Milon
I totally agree with Tim & SL here. I think the argument: "If you google'ed you'd find out" is invalid. The same argument could be used for almost every question in this mailing list. To keep away from over-documenting I agree with Tim, at least there should be a link to an online man page. But I

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

2012-11-01 Thread Tim Caswell
On Thu, Nov 1, 2012 at 12:04 PM, Chad Engler wrote: > Also, the unfriendliness stems from the fact that after answering your > question, you didn’t like it. So we answered a different way, and you called > us condescending. Which means that normal conversation doesn’t work, so I > have to try a di

Re: [nodejs] NodeJS Runtime for Chrome

2012-11-01 Thread Arunoda Susiripala
Hi, I'm talking about the chrome's canary build. It has both tcp/udp socket access and file-system access. But not sure about the child-processes. These api are for building add-ons and not for web apps. Here is the node net module implementation for Chrome - https://github.com/PaulKinlan/net-bro

Re: [nodejs] NodeJS Runtime for Chrome

2012-11-01 Thread Dean Mao
I have something similar as well called node-chimera, it's a meld of phantomjs inside of node basically. An example runtime code looks like this: var Chimera = require('chimera').Chimera; var c = new Chimera(); c.perform({ url: "http://mywebsite.com";, locals: { username: 'myuser', p

[nodejs] [ANN] node-kinect

2012-11-01 Thread Pedro Teixeira
Releasing node-kinect, which is libfreenect exposed in JS: https://github.com/pgte/node-kinect Supports controlling the LED, video and depth cameras. Jump in if you're interested, lots of pending work:) -- Job Board: http://jobs.nodejs.or

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

2012-11-01 Thread Chad Engler
People not Google'ing before asking the mailing list is exactly why I have 500 messages a day from this list, and can barely find interesting topics; and I am really tired of getting "how does one node" and "what is javascript" questions here. I agree that a link on the docs is useful, but I also

[nodejs] Module caching Caveats

2012-11-01 Thread Mike
The docs under Module Caching Caveats, it says Modules are cached based on their resolved filename. Since modules may resolve to a different filename based on the location of the calling module (loading from node_modules folder

[nodejs] Re: Module caching Caveats

2012-11-01 Thread Bradley Meck
Posix has the ability to have hard links on disk where they have the same inode but different paths, unsure if this affects Window's junctions in the same way though. -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines Y

Re: [nodejs] Re: Module caching Caveats

2012-11-01 Thread Isaac Schlueter
Mike, Depending on what you mean by a "single file", only hardlinks could cause that. For the purposes of node modules, though, a hardlink is indistinguishable from another copy of the file with the same contents, since it's only the parsed JS that matters. The point is that the resolved (ie, fs

Re: [nodejs] Re: Module caching Caveats

2012-11-01 Thread Mike Hatalski
Many thanks, especially for pointing out fs.realpath(). Interesting because of realpath, different symlinked files resolve to the same absolute pathname, and thus to the same module in the module cache. On Thu, Nov 1, 2012 at 1:19 PM, Isaac Schlueter wrote: > Mike, > > Depending on what you mea

Re: [nodejs] Simple LightWeight OOP. 100% compatibility with JavaScript. Feedback please!

2012-11-01 Thread Fredrik O
Thanks for answer, everyone :-) Isaacs: This is exactly what I am doing today, but I want to stop repeating myself, e.g "implement" the DRY principle, but stay 100% compatible with pure JavaScript prototype inheritance. So instead of manually create a function, assign a appropriate prototype t

[nodejs] Problem with using socket.io

2012-11-01 Thread _Kili_
Hi, I am beginner with node.js and just trying to make socket.io work with this guide http://socket.io/#how-to-use (the first example). I am just getting "Uncaught ReferenceError: io is not defined" in the java script console of the Chrome. Could someone help me? -- Job Board: http://jobs.nodej

Re: [nodejs] Problem with using socket.io

2012-11-01 Thread Dan Milon
Probably the browser (for some reason) did not fetch the socket.io.js file, so the global variable "io" does not exist. Make sure the server returns the file, and the client can talk to the server. danmilon. On 11/01/2012 11:12 PM, _Kili_ wrote: > Hi, > I am beginner with node.js and just trying

Re: [nodejs] Problem with using socket.io

2012-11-01 Thread Angel Java Lopez
Hmmm... you must open the index.html as http://localhost/index.html I guess you cannot start it as a local file On Thu, Nov 1, 2012 at 6:12 PM, _Kili_ wrote: > Hi, > I am beginner with node.js and just trying to make socket.io work with > this guide http://socket.io/#how-to-use (the first exampl

RE: [nodejs] Problem with using socket.io

2012-11-01 Thread Chad Engler
You may get more response form the Socket.io mailing list: socket...@googlegroups.com -Chad From: nodejs@googlegroups.com [mailto:nodejs@googlegroups.com] On Behalf Of Angel Java Lopez Sent: Thursday, November 01, 2012 5:28 PM To: nodejs@googlegroups.com Subject: Re: [nodejs] Problem wi

Re: [nodejs] Problem with using socket.io

2012-11-01 Thread _Kili_
Thanks, I posted the same question to the correct group. I did not yet solve the problem with the help in the previous answers. Thanks for the quick replies. torstai, 1. marraskuuta 2012 23.29.38 UTC+2 Chad Engler kirjoitti: > > You may get more response form the Socket.io mailing list: > > >

Re: [nodejs] Problem with using socket.io

2012-11-01 Thread John Fitzgerald
Try this for the html, loads socket.io from a CDN. (Works on my computer...) var socket = io.connect('http://localhost'); socket.on('news', function (data) { console.log(data); socket.emit('my other event', { my: 'data' }); }); On T

[nodejs] Re: Simple LightWeight OOP. 100% compatibility with JavaScript. Feedback please!

2012-11-01 Thread Brian Link
I like the look of those functional mix-ins. Thanks for the link. On Wednesday, October 31, 2012 3:37:33 PM UTC-7, Fredrik O wrote: > > Hi everyone, > > I have just wrote a simple lightweight OOP helper and want your thoughts > about it, the implementation "Class" is only 15 lines of code, but I

[nodejs] Re: Simple LightWeight OOP. 100% compatibility with JavaScript. Feedback please!

2012-11-01 Thread tjholowaychuk
I'm with isaac, personally I actually prefer re-declaring the "Foo.prototype. =" each method it re-establishes context. Lots of coffeescript is bad this way since you get half-way down the file, you see some indented code and you have no clue what it's part of. Same goes for JavaScript using object

[nodejs] Re: build a node addon on windows for linux

2012-11-01 Thread Jonathan Kunkee
> > You might be able to get away with using a cross-compiler under >> cygwin, but just mentioning that makes me cringe. >> > > Your advice is sound mscdex... > I couldn't find much info on the net for cross compiling on windows > possibly install linux on a vm is a good way to start! > >