[nodejs] Re: Hosting of Application in Europe

2014-11-08 Thread Mariusz Nowak
Get dedicated server on e.g. Hetzner (see http://www.hetzner.de/en/hosting/produktmatrix/rootserver ) they provide cheap an excellent service, and you can add additional disk when you need it. On Saturday, November 8, 2014 12:18:46 AM UTC+1, Markus Kuhn wrote: Hi Everybody, i found some

Re: [nodejs] Re: Bundle it all into one single js file

2014-03-06 Thread Mariusz Nowak
On Thursday, March 6, 2014 9:52:41 AM UTC+1, Axel Kittenberger wrote: Yes I tried. The resulting script will fail on execution with Error: Could not find module 'fs' Indeed, it will create a bundle, but internally in bundle there's no fallback to native Node's require, so it can't work.

[nodejs] Re: Bundle it all into one single js file

2014-03-02 Thread Mariusz Nowak
Any bundle, produced with good CJS bundler, should be runnable also on server side, as e.g. `node bundle.js`, For sure it does with Webmake (I'm the author) - https://github.com/medikoo/modules-webmake#modules-webmake Do you know of a tool that takes a js file as entry point and bundles all

[nodejs] Re: [ANNC] Node Inspector v0.7 is out - here's what's new...

2014-02-26 Thread Mariusz Nowak
That's great news. Thanks! On Tuesday, February 25, 2014 6:49:15 PM UTC+1, Jimmy Guerrero wrote: Hello, Whether you are new to debugging Node apps or have used Node Inspector in the past, it's time to check out what's new in the latest v0.7 release of Node Inspector! It's been a big

[nodejs] Re: Which promises library to use?

2014-02-15 Thread Mariusz Nowak
@Ian L. for strictly polyfill there are two options, first is `es6-promise`: https://github.com/jakearchibald/es6-promise and second is `es6-shim` https://github.com/paulmillr/es6-shim which includes now Promise polyfill. Still, I'd advise to hold your horses, and stick with one of the popular

[nodejs] Re: Announcing European npm mirror

2013-11-16 Thread Mariusz Nowak
Maciej, and how up to date is European mirror. If I publish new package or new version of a package, can it be right away installed via mirror? On Friday, November 15, 2013 6:03:21 PM UTC+1, Maciej Małecki wrote: All! Today I finished setting up the European npm mirror. It is now available

Re: [nodejs] node.js and promise

2013-10-21 Thread Mariusz Nowak
On 21 paź 2013, at 19:52, Reza Razavipour reza.razavip...@gmail.com wrote: we all of this I still can not figure out how to take an async function and change it from callback to a promise. Many libraries provide it's own utils for that, just check their documentation:

Re: [nodejs] node.js and promise

2013-10-21 Thread Mariusz Nowak
().then(function () { console.log(it really worked); }); ^ TypeError: Cannot call method 'then' of undefined How do I turn myAsyncFunction into a promise? On Monday, October 21, 2013 10:58:34 AM UTC-7, Mariusz Nowak wrote: On 21 paź 2013, at 19:52, Reza

[nodejs] Re: node.js and promise

2013-10-19 Thread Mariusz Nowak
Reza, check this before and after example: https://github.com/medikoo/deferred#plain-nodejs-callbacks-approach and once I tried explain promises to newcomers with following slides: http://www.medikoo.com/asynchronous-javascript/ it's nearly two years old, but still mostly up to date. Maybe

[nodejs] Re: Best practices managing node dependencies?

2013-08-14 Thread Mariusz Nowak
There was already discussion on that: https://groups.google.com/d/msg/nodejs/Dj8QZ-5qHoM/91ngmxr0NHsJ My approach is following: For generic packages: Never include node_modules within .git, just maintain well configured package.json For final projects: Include all content of node_modules

[nodejs] Re: JS or node? require(http://scripthost/myModule.js);

2013-06-12 Thread Mariusz Nowak
On Tuesday, June 11, 2013 9:49:43 PM UTC+2, nos...@hoodel.com wrote: I'm reading JavaScript on the Server Using Node.js and Express. Having just read the chapter on modules, it seems overly restrictive to make require() refer only to files. It seems to me that a hosted module server

[nodejs] v0.10 big performance issue (not observable with v0.11)

2013-05-29 Thread Mariusz Nowak
became more performant. My question is, are you (Node.js maintainers) aware of such issue? Do you know what's the cause? Is it in V8 or rather some Node.js layer? Is there a plan to fix it for v0.10 or it will stay with v0.10, but will be fixed with stable. v0.12 release? Thanks! Mariusz Nowak

[nodejs] v0.10 big performance issue (not observable with v0.11)

2013-05-29 Thread Mariusz Nowak
Node.js layer? Is there a plan to fix it in v0.10, or it will stay with v0.10, but will be fixed with stable. v0.12 release? Thanks! Mariusz Nowak -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received

[nodejs] Re: Our Contribution To Node Community, Introducing NodeJS Console

2013-05-05 Thread Mariusz Nowak
It's really nice, to be really serious misses just two things: 1. Should run latest Node.js (Currently it runs v0.8.21 which is not great) 2. Provide access to NPM modules. This could be done just by providing option to do npm install after edition of package.json and then exposing

[nodejs] Re: Retrieving values asynchroniously

2013-04-23 Thread Mariusz Nowak
Take a look into promises concept. e.g. with Deferred libraryhttps://github.com/medikoo/deferred you can configure it that way: deferred(Object1.retrieveNum1(), Object1.retrieveNum2(), Object1.retrieveNum3()).match(function (num1, num2, num3) { var result = (num1 + num2) / num3; }); On

Re: [nodejs] Gemnasium, now with NPM support

2013-02-14 Thread Mariusz Nowak
What changelog standard do you support? I provide changelog with my package, but It's not provided within gemnasium, see e.g. https://gemnasium.com/npms/cli-color/ and https://github.com/medikoo/cli-color/blob/master/CHANGES Other important note, you treat names case insensitive, which is

Re: [nodejs] Gemnasium, now with NPM support

2013-02-14 Thread Mariusz Nowak
, 2013 at 3:28 PM, Philippe Lafoucrière philippe.l...@tech-angels.com javascript: wrote: On Thu, Feb 14, 2013 at 2:58 PM, Mariusz Nowak mar...@medikoo.comjavascript: wrote: What changelog standard do you support? I provide changelog with my package, but It's not provided within gemnasium

Re: [nodejs] a pakage that exports few modules

2013-01-24 Thread Mariusz Nowak
I'm also getting confused, but still I'm after simplicity and rather happy that 'directories' are not supported any more. Isaac do you see any semantics in 'lib' folder? Do you feel that some modules should rather be placed in 'lib' than at 'root' fo the package (or other way) or it's totally

[nodejs] Re: How to revive a dead npm module?

2013-01-01 Thread Mariusz Nowak
I guess that about 50% of projects in npm reflect such state. It would be good if npm have some better procedures for that, like allow to retake the name, and give rights to publish greater versions. On Monday, December 31, 2012 2:18:31 PM UTC+1, toranb wrote: A few months back I took on a

[nodejs] Re: Checking node_modules into git

2012-12-27 Thread Mariusz Nowak
This is good approach, but only for final applications, you should never commit dependencies into repositories of resuable (generic) modules. I have great experience with that, and to me it's the *only* way to assure that installation of application is straightforward and the only way to make

Re: [nodejs] Re: trying to wrap my head around promises - async vs Q

2012-11-12 Thread Mariusz Nowak
If I would choose which tool is best for my project just by popularity factor I wouldn't go far. It's understood that Async is more popular as it doesn't introduce much learning factor and most developers are looking for quick solutions. To get promises you need to devote a while understand

[nodejs] Re: node_modules for private modules that need to be committed?

2012-10-11 Thread Mariusz Nowak
Tom: Have you tried following in .gitignore: node_modules/* !node_modules/my-private-package1 !node_modules/my-private-package2 On Wednesday, October 10, 2012 5:09:27 PM UTC+2, Tom wrote: I've added the node_modules folder to my .gitignore file, which works fine thanks to NPM Shrinkwrap

Re: [nodejs] NPM: How to install packages without compiling them

2012-10-11 Thread Mariusz Nowak
what you want to do is by using the npm rebuild command. -- Daniel R. dan...@neophi.com javascript: [http://danielr.neophi.com/] On Thu, Oct 11, 2012 at 6:06 AM, Mariusz Nowak mar...@medikoo.comjavascript: wrote: I'd like to create application bundle with all it's dependencies, so

Re: [nodejs] NPM: How to install packages without compiling them

2012-10-11 Thread Mariusz Nowak
build server. On Thursday, October 11, 2012 10:25:56 AM UTC-5, Bradley Meck wrote: https://npmjs.org/doc/config.html#rebuild-bundle On Thursday, October 11, 2012 8:49:10 AM UTC-5, Mariusz Nowak wrote: Daniel, I think 'npm rebuild' may work for installation of already created bundle, but still

[nodejs] Does fs.chmod have any effect on Windows platform?

2012-10-09 Thread Mariusz Nowak
fs.lchmod is only available on OSX, while fs.chmod is available on all platforms still it seems to have no effect on Windows. Is it just noop there? Or it has some effect in some cases? If anyone knows the answer I'll be grateful. Thanks. -- Job Board: http://jobs.nodejs.org/ Posting

Re: [nodejs] Does fs.chmod have any effect on Windows platform?

2012-10-09 Thread Mariusz Nowak
Thanks, that clarifies. I understand that is also works for files only? at least I think there's no effect when trying to change bits for directories (?) On Tuesday, October 9, 2012 4:14:05 PM UTC+2, Ben Noordhuis wrote: On Tue, Oct 9, 2012 at 4:03 PM, Mariusz Nowak mar

[nodejs] Re: [ANN]: Deferred - Maintainable asynchronous JavaScript with promises

2012-10-03 Thread Mariusz Nowak
Didn't know about that one, that's indeed big flaw, jQuery's solution is far from complete. On Wednesday, October 3, 2012 4:18:42 AM UTC+2, Domenic Denicola wrote: jQuery promises also aren't interoperable with other promise-consuming libraries, because they do not transform errors thrown in

[nodejs] Re: [ANN] promise-stream: Turn a stream into a commonJS promise

2012-10-03 Thread Mariusz Nowak
Raynos, I have a feeling that you are comparing apples and oranges. Streams are awesome, Promises are awesome but it's not the same, and not every use case can be addressed on equal level by both of them. From my experience there can be promises that are also a streams, but among them are also

Re: [nodejs] Re: [ANN] promise-stream: Turn a stream into a commonJS promise

2012-10-03 Thread Mariusz Nowak
(fileName) { return (file.slice(-3) === .js (file !== lib.js)) }) .map(readFile) .pipe(fs.createWriteStream(__dirname + /lib.js)) }) d.on(error, function ignoreIt() {}) ``` On Wed, Oct 3, 2012 at 1:11 AM, Mariusz Nowak mar...@medikoo.comjavascript

[nodejs] Re: [ANN]: Deferred - Maintainable asynchronous JavaScript with promises

2012-10-02 Thread Mariusz Nowak
Domenic, I'll be very happy to join. Where exactly you're discussing it? Q mailing list? On Tuesday, October 2, 2012 3:32:13 PM UTC+2, Domenic Denicola wrote: On Monday, October 1, 2012 3:46:19 PM UTC-4, Mariusz Nowak wrote: In Deferred I solved it by making end function with same

[nodejs] Re: [ANN]: Deferred - Maintainable asynchronous JavaScript with promises

2012-10-02 Thread Mariusz Nowak
Jeff, I think you're talking about different implementation: https://npmjs.org/package/Deferred it's still at v0.1.1 and in fact it resembles jQuery's Deferred. It was published later on npm with same name but uppercased (Today npm wouldn't allow that ;) For Deferred (one that opened this

[nodejs] Re: [ANN]: Deferred - Maintainable asynchronous JavaScript with promises

2012-10-01 Thread Mariusz Nowak
Jeff, Surprisingly I didn't know that one, I've added it to benchmarks, it turned out to be slower than jQuery's implementation, and what's weird and disturbing is that running concurrent calls using When is slower than queued calls one after another:

[nodejs] Re: [ANN]: memoizee - Complete memoize/cache solution

2012-09-24 Thread Mariusz Nowak
- easy to avoid parallel refresh requests Vitaly. среда, 19 сентября 2012 г., 2:06:21 UTC+4 пользователь Mariusz Nowak написал: https://github.com/medikoo/memoize npm install memoizee For one of my projects I needed memoizer, that would be both fast and would work with any type of input

[nodejs] [ANN]: Deferred - Maintainable asynchronous JavaScript with promises

2012-09-22 Thread Mariusz Nowak
Deferred is (another) promise solution for Node.js (and JavaScript in general). Originally inspired by Q, however more weight is put on functional capabilities of JavaScript and in result many things are solved differently. Everything is well documented at https://github.com/medikoo/deferred.

[nodejs] Re: [ANN]: memoizee - Complete memoize/cache solution

2012-09-21 Thread Mariusz Nowak
case), it would be great to have a LRU option. Just my thoughts for completing out the feature set. I think your project is great none the less. Jeff On Wednesday, 19 September 2012 10:47:07 UTC-5, Mariusz Nowak wrote: Jeff, It can easily be ported to browser with help of Webmake

[nodejs] Re: [ANN]: memoizee - Complete memoize/cache solution

2012-09-19 Thread Mariusz Nowak
Jeff, It can easily be ported to browser with help of Webmake https://github.com/medikoo/modules-webmake (it's mentioned in documentation) Anyway to make it even easier I prepared a bundle - https://github.com/medikoo/memoize/downloads ;) According to LRU option, you can achieve it with 'max'

[nodejs] [ANN]: memoizee - Complete memoize/cache solution

2012-09-18 Thread Mariusz Nowak
https://github.com/medikoo/memoize npm install memoizee For one of my projects I needed memoizer, that would be both fast and would work with any type of input arguments. Other projects demanded other common functionalities, so it's result of real world needs I approached in last months. To

[nodejs] Re: Weird problems with module.exports

2012-09-07 Thread Mariusz Nowak
Within Node.js such issue may occur *only* when your dealing with cyclic dependencies. If it's the case just move require's to modules in question to end of the file (after assignment to module.exports), it will fix that. You say it's Travis error, so maybe it's the case of circular

[nodejs] Re: Feature poll: Do you use the clientError event?

2012-09-01 Thread Mariusz Nowak
4 On Thursday, August 30, 2012 1:07:23 AM UTC+2, Isaac Schlueter wrote: Do you use the clientError event? Please choose one: 1. Yes, I use it all the time. Please don't change it ever, thank you. 2. I don't use it, but I'm aware of it, and I think I might someday. 3. I don't use

Re: [nodejs] Best practices for sharing code and data between the server and client

2012-08-13 Thread Mariusz Nowak
and 60% of those modules are also used on server-side. -- Mariusz Nowak http://github.com/medikoo http://twitter.com/medikoo On Saturday, June 2, 2012 3:20:29 PM UTC+2, al-Amjad Tawfiq Isstaif wrote: Thank you very much everybody for your notes! @Martin I tried to have a fast look at YUI

Re: [nodejs] Best practices for sharing code and data between the server and client

2012-08-13 Thread Mariusz Nowak
to consider. I like the elegance of your approach, seems to really make things easy. I will have to give it a try soon. All the best, Jeff On Monday, 13 August 2012 05:36:38 UTC-5, Mariusz Nowak wrote: See also https://github.com/medikoo/modules-webmake the idea is to use same module format

[nodejs] Re: Node v0.8.6 on Mac OS X Mountain Lion crashing

2012-08-10 Thread Mariusz Nowak
I have same issue when I do a lot of writes and reads to files and additionally I'm using a lot of watchers. However I'm not sure whether it affects just OSX 10.8, anyway it surely affects just OSX. I've looked on the web and in most sources it is said it's a OS issue not Node.js, I hope

Re: [nodejs] Node v0.8.6 on Mac OS X Mountain Lion crashing

2012-08-10 Thread Mariusz Nowak
On my side it's plain Node.js and strictly JavaScript modules. It started to happen when I started to close fs watchers on the way. Errors happen at random times, and when I tried to narrow it. I found out that they happen on calls to fs.writeFile (or other functions that do changes to file

Re: [nodejs] Node v0.8.6 on Mac OS X Mountain Lion crashing

2012-08-10 Thread Mariusz Nowak
of Computer Science, UW-Madison 2013 414-377-1041 / http://www.joshisgross.com / http://www.spandex.io On 10 August 2012 06:56, Mariusz Nowak mar...@medikoo.com javascript:wrote: On my side it's plain Node.js and strictly JavaScript modules. It started to happen when I started to close

[nodejs] Re: How to fork child in non persistent way?

2012-07-31 Thread Mariusz Nowak
and this: https://github.com/joyent/node/issues/3799 it looks this behavior may change in close future :) On Tuesday, July 31, 2012 9:53:01 AM UTC+2, Mariusz Nowak wrote: Accidentally I just found very related issue https://github.com/joyent/node/issues/2605 On Tuesday, July 31, 2012 9:15

[nodejs] Re: Seq parEach

2012-07-20 Thread Mariusz Nowak
I won't help you with Seq, but it looks as pretty easy case for other concept I'm familiar with, check: https://gist.github.com/3149506 I'm not sure how you want to fetch md5 and servers info so I just hidden that logic between fetchMd5 and fetchServers functions. On Thursday, July 19, 2012

[nodejs] Re: Emacs

2012-07-13 Thread Mariusz Nowak
Ruquay, I've once created not invasive fix for js2-mode to properly highlight json files, see http://code.google.com/p/js2-mode/issues/detail?id=50#c7 -- Mariusz Nowak http://github.com/medikoo http://twitter.com/medikoo On Friday, July 13, 2012 8:47:53 AM UTC+2, Ruquay Calloway wrote: I

[nodejs] Re: Emacs

2012-07-12 Thread Mariusz Nowak
Here's my .emacs.d https://github.com/medikoo/emacs-starter I don't use anything Node specific, just slightly modified js2-mode for highlighting js and json files. On Thursday, July 12, 2012 2:59:25 PM UTC+2, Mihamina Rakotomandimby wrote: Hi all, Just for curiosity, who's using Emacs in

[nodejs] Re: Defining a variable, difference btw node REPL and .js/require

2012-07-07 Thread Mariusz Nowak
@ajlopez get to know how variable scoping in JavaScript works (what is global, how this and how local variable works), and you'll get the answers :) On Saturday, July 7, 2012 2:11:56 PM UTC+2, ajlopez wrote: Hi people! A very simple question. When I write in the Node repl: this.foo =

Re: [nodejs] Re: Defining a variable, difference btw node REPL and .js/require

2012-07-07 Thread Mariusz Nowak
.exportLocalCode returns a String with var h1 = simpletags.h1; ... c2) var st = require('simpletags'); eval(st.exportLocalCode('st')); // the local variable name 'st' should be informed to be used in var ...= string result On Sat, Jul 7, 2012 at 10:38 AM, Mariusz Nowak mari

[nodejs] Re: Parallel Async Calls and Parallel Errors

2012-07-06 Thread Mariusz Nowak
You definitely should report with one error object, and you won't find function in Node.js API that returns more than one error. Most straightforward way would be to fail your function as soon as first error occurs, and report with that error. However if you'd like to have more complete

[nodejs] Re: XML DOM Libraries

2012-07-06 Thread Mariusz Nowak
Other thing you may check is https://github.com/tmpvar/jsdom it's very popular but unfortunately it's not pure JavaScript. On Friday, July 6, 2012 12:17:24 AM UTC+2, Alan Gutierrez wrote: I'd like to parse XML and manipulate it on the server using W3C XML DOM, so that the code can be

[nodejs] Re: Closures versus Prototypes for Flow Control

2012-06-21 Thread Mariusz Nowak
Alan, we use asynchronous programming for tasks that take time, so in that case, whether we wrap such tasks with closure or prototype solution wouldn't make difference in performance. I think debating on performance in that case is pointless. As a side node be sure to check also

Re: [node-dev] repl bug worth caring about?

2012-06-15 Thread Mariusz Nowak
It may be wise to wrap with parens, only if command starts with '{', at least newcomers (to JavaScript) may be puzzled to find not valid code giving strange success results. -- Mariusz Nowak https://github.com/medikoo On Friday, June 15, 2012 6:26:37 PM UTC+2, Isaac Schlueter wrote: It's

[nodejs] Re: nowjs - Error: Cannot find module 'now'

2012-06-02 Thread Mariusz Nowak
It looks that node is working properly but 'now' package is not installed. Are you sure you've installed it with npm install -g now ? -- Mariusz Nowak https://github.com/medikoo http://twitter.com/twitter On Saturday, June 2, 2012 2:36:22 PM UTC+2, Chris994 wrote: Hi, I successfully

Re: [nodejs] Re: Callback Style Preference

2012-05-31 Thread Mariusz Nowak
+1 I looked at the Node's source, and indeed path.exists (to be fs.exists) is just wrapper over fs.stat. If there's no lighter way for checking whether path exists, indeed it's best it it's not in the API at all. There are already two good reasons for that: it encourages bad practices and

Re: [nodejs] Re: Callback Style Preference

2012-05-31 Thread Mariusz Nowak
@Oliver Synchronous functions throw errors if there's any, they do not take any callback for that. On Thursday, May 31, 2012 9:22:05 PM UTC+2, Oliver Leics wrote: On Thu, May 31, 2012 at 9:15 PM, Mariusz Nowak mari...@medikoo.com wrote: @Oliver createServer is not asynchronous function

[nodejs] Re: Callback Style Preference

2012-05-30 Thread Mariusz Nowak
success value as first argument (in case of path.exists true or false). -- Mariusz Nowak - @medikoo On Wednesday, May 30, 2012 3:24:06 AM UTC+2, Daniel R. wrote: Is there consensus on the value to pass to a callback if there isn't an error and there may or may not be a resulting value. A quick

[nodejs] Re: FN.bind vs fn() { FN() }

2012-05-29 Thread Mariusz Nowak
Use what works for you, and don't bother with premature optimization. By the way it's not greatest bind use case, I wouldn't use bind here. In some older versions of node (v0.6.3 ?) , setTimeout passes one argument to the callback, and in your example it will be logged as well. On Tuesday,

[nodejs] Re: recommended flow control library?

2012-05-27 Thread Mariusz Nowak
Be sure to check also: https://github.com/medikoo/deferred a very *functional* promise/deferred concept implementation. On Saturday, May 26, 2012 8:54:13 PM UTC+2, Davis Ford wrote: There does not appear to be a shortage of libraries out there that help with flow control. I'm looking for

[nodejs] Re: Sharing code between client and server

2012-05-10 Thread Mariusz Nowak
https://github.com/medikoo/modules-webmake It works, it's fast, Currently I'm building all client/server web applications with that (on average I have 60% of modules shared between server and client) On Tuesday, May 8, 2012 11:05:26 AM UTC+2, Robert Chris Bang Larsen wrote: Hi all I am

[nodejs] Re: How to avoid callback hell?

2012-04-10 Thread Mariusz Nowak
, ...); fooCollection = db.invokeAsync('collection', ); fooItems = fooCollection.invokeAsync('query', ..); That's the way I work with mongodb driver for Node.js, if you find this attractive check https://github.com/medikoo/deferred -- Mariusz Nowak https://github.com/medikoo http://twitter.com/medikoo

[nodejs] Re: Request for feedback- Yet another client-side module loader (it's different, I promise:))

2012-03-27 Thread Mariusz Nowak
Guys, check https://github.com/medikoo/find-requires -- Mariusz Nowak https://github.com/medikoo http://twitter.com/medikoo On Tuesday, March 27, 2012 10:26:32 AM UTC+2, Bruno Jouhier wrote: Same way you do it: regexp On Monday, March 26, 2012 9:49:28 PM UTC+2, meelash wrote: btw, bruno

[nodejs] Re: Control over 'require' logic

2012-02-16 Thread Mariusz Nowak
@Tomasz Node.js doesn't allow easy customization of Module functionality, it's basically internal. You also need to be aware that internal API may change even between minor versions (e.g. one of my modules stopped working from v0.6.10 because it relied on internal function). For such specific

Re: [nodejs] Re: bundle javascript for reuse in the browser

2012-02-10 Thread Mariusz Nowak
which only purpose would be to walk the code and pick up requires. I've done once similar thing in python, it wouldn't be difficult to do. -- Mariusz Nowak https://github.com/medikoo http://twitter.com/medikoo -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent