News for hackers. Stuff that matters.
Re:Mancy: JavaScript REPL by jimmyhmiller on Friday October 30, 2015 @10:55AM (#10478165)
Well, rather than commenting on download size I'll talk about the program.

This looks really awesome! I've been wanting a nice js repl for a while and this one definitely has a lot of the qualities I was looking for.

Auto complete is very nice. Color syntax looks great. The biggest thing I would like to see is to persist history. I'd love to up arrow through previous sessions.

Overall nicely done!

Re:Mancy: JavaScript REPL by vortico on Friday October 30, 2015 @08:20AM (#10477355)
To prevent 40MB downloads for a REPL, is there a library version of Electron that can be installed globally, so that small scripts can use it to produce full applications?

(My expected response is that Electron and Node are both moving fast enough so that multiple versions may be incompatible. Global libraries tend to work for stable software, so it may be possible in the future for Electron.)

Re:Mancy: JavaScript REPL by princejwesley on Friday October 30, 2015 @09:21AM (#10477582)
I'll look into that :-) Version 2 will be released in three days(Nov 2).

Feature list : https://github.com/princejwesley/Mancy/wiki/Features-&-Roadm...

Re:Mancy: JavaScript REPL by vortico on Friday October 30, 2015 @09:41AM (#10477693)
Would

    npm install -g electron-prebuilt
do the trick for users, while they use a smaller version of your release without Electron included?
Re:Mancy: JavaScript REPL by brownegg on Friday October 30, 2015 @09:20AM (#10477577)
Why do you need to prevent 40MB downloads?
Re:Mancy: JavaScript REPL by vortico on Friday October 30, 2015 @09:38AM (#10477677)
If every package was 40 MB on my computer, my distribution would be 30 GB.

More importantly, these 40 MB of code and resources expand to about 400 MB in memory when the application is running, but a global library wouldn't fix that.

Re:Mancy: JavaScript REPL by coldtea on Friday October 30, 2015 @11:37AM (#10478447)
>If every package was 40 MB on my computer, my distribution would be 30 GB.

Only if you had installed 750 userland programs. Which are quite a lot. And even then, 30GB for your OS + your third party programs is negligible in even a 265GB flask disk (merely 12% of it).

>More importantly, these 40 MB of code and resources expand to about 400 MB in memory when the application is running, but a global library wouldn't fix that.

Not sure where you got those metrics. Code doesn't "expand" on memory, and binary size it's not a reliable metric of how much memory it will use (a trivial 5 line program that just mallocs can use TB of memory).

For the majority of very large programs, most of the size on disk is assets, not compiled code.

Re:Mancy: JavaScript REPL by michaelmrose on Friday October 30, 2015 @12:59PM (#10478988)
You are correct that code doesn't "expand on memory" but there is no fixed relationship between code size and memory usage. You could certainly write a tiny program that uses a ton of memory pretty easily.
Re:Mancy: JavaScript REPL by coldtea on Friday October 30, 2015 @05:20PM (#10480606)
Yeah, I say that: "a trivial 5 line program that just mallocs can use TB of memory".
Re:Mancy: JavaScript REPL by davexunit on Friday October 30, 2015 @10:22AM (#10477953)
400MB of RAM for a REPL!? That's absurdly high.
Re:Mancy: JavaScript REPL by dimgl on Friday October 30, 2015 @11:09AM (#10478276)
The REPL is currently using 20 MB of RAM on my computer, so I don't know what this guy is talking about.
Re:Mancy: JavaScript REPL by vortico on Friday October 30, 2015 @02:53PM (#10479763)
Electron consumes 117MB, npm takes 50MB, and gulp is consuming 114MB, although I don't know how much of this value is shared between the processes (since there are 40+ of them).
Re:Mancy: JavaScript REPL by fiatjaf on Friday October 30, 2015 @08:53AM (#10477468)
That would be great.
Re:Mancy: JavaScript REPL by msluyter on Friday October 30, 2015 @11:04AM (#10478237)
I was just looking for something like this. How do I load external node modules into the repl? I tried "File->Add module path" but it didn't seem to work for me. Basically, having done an npm install of lodash somewhere, I want to do

  var _ = require('lodash');
in the repl.
Re:Mancy: JavaScript REPL by princejwesley on Friday October 30, 2015 @11:47AM (#10478511)
This feature is available in version 2. Target release : Nov 2. https://github.com/princejwesley/Mancy/wiki/Features-&-Roadm...
Re:Mancy: JavaScript REPL by jimmyhmiller on Friday October 30, 2015 @01:41PM (#10479265)
I did the same thing and pointed to a node_modules folder on a project I had. Worked fine for me.
Re:Mancy: JavaScript REPL by ad1ttya on Friday October 30, 2015 @11:53AM (#10478547)
You install lodash globally, and can then use the above line to use the module inside repl..
Re:Mancy: JavaScript REPL by xixixao on Friday October 30, 2015 @12:10PM (#10478658)
Very relevant: https://tonicdev.com/
Re:Mancy: JavaScript REPL by princejwesley on Friday October 30, 2015 @12:22PM (#10478743)
Yes. Version 2 will be even more relevant(on demand modules loading, data vizualization ..)
Re:Mancy: JavaScript REPL by princejwesley on Friday November 06, 2015 @12:47PM (#10520748)
Mancy version 2 released. Feature documentation: https://github.com/princejwesley/Mancy/wiki/Version-II
Re:Mancy: JavaScript REPL by jonahx on Friday October 30, 2015 @01:40PM (#10479264)
Looks nice. I'd like to hear how this compares to lighttable from anyone who's used both.
Re:Mancy: JavaScript REPL by solidr53 on Friday October 30, 2015 @11:45AM (#10478495)
What kind of javascript engine is on this REPL? I tried some ES6 stuff with random success. For example arrow functions work while deconstructing doesn't.
Re:Mancy: JavaScript REPL by princejwesley on Friday October 30, 2015 @11:50AM (#10478526)
It depends on underlying electron's node version. In version 2, we have preference to enable babel integration to utilize ES2015 features
Re:Mancy: JavaScript REPL by hex13 on Friday October 30, 2015 @09:47PM (#10481495)
autocompletion is buggy: I wrote:

var fs = require('fs');

then pressed enter. Result:

var fs = require('fs');fs

(fs in the end).

And autocompletion is too agressive. I declared variable `b`` then in new line I entered: `b` and it automatically autocompleted me to `break`.

So I think it's pretty alpha right now, but overall idea is good :) We need better tools :)