Live data from Hacker News

Mancy: JavaScript REPL

mancy-re.pl

11–20 of 25 posts

Re: Mancy: JavaScript REPL

#11
post #6

Earlier quoted context omitted.

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.

400MB of RAM for a REPL!? That's absurdly high.

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

#12
post #6
post #4

Earlier quoted context omitted.

Why do you need to prevent 40MB downloads?

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.

>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

#14

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.

This feature is available in version 2. Target release : Nov 2. https://github.com/princejwesley/Mancy/wiki/Features-&-Roadm...

Re: Mancy: JavaScript REPL

#15

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.

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

#16

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.

You install lodash globally, and can then use the above line to use the module inside repl..

Re: Mancy: JavaScript REPL

#19
post #12
post #6

Earlier quoted context omitted.

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.

> 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…

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.
Post reply on HN