Earlier quoted context omitted.
> UNIX shells suck. Javascript sucks. How could one implement a UNIX shell in Javascript and have it not suck? What do you mean by "UNIX shells suck"? I'm fairly sure most people would consider UNIX shells to be one of the bigger revolutions in computing.
Perhaps it's my own shortcoming, but for any given script I write, I find that, say, 20% of all my code is productive, and the remaining 80% is massaging the output of one tool into a shape that's compatible with the input of the next tool. Compare with the exprience of using Windows PowerShell where cmdlets return objects and you can grab precisely the fields you want with minimum ceremony. Things are better now wit…
CoreUtils implemented in pure JavaScript
101–110 of 128 posts
Re: CoreUtils implemented in pure JavaScript
#102Apart from this being of questionable usability, why do people feel the need to solve every problem with (Node)JS? I can think about a ton of languages better suited for systems programming at the top of the hat.
Perl/Python/PHP/Ruby: Generally 10x or more slower than V8 Node.js, plus global interpreter lock = automatic no.
C/C++/etc? Fast, but too complex to work with build system / platform compat / 3rd party modules = generally no.
Java? Way too slow startup time; JVM install for users painful = automatic no
Scala/Clojure/etc: Fine languages but same practical problems as JVM languages = automatic no.
Go? Probably nice, but I just don't know it = maybe
Node.js: Fairly fast, easy to debug, fast startup time, easy to use 3rd party code = yes
Rust: safe, C perf, and easy to build and use 3rd party modules via Cargo = yes
Re: CoreUtils implemented in pure JavaScript
#103I'll wait for GNU/Windows.
Re: CoreUtils implemented in pure JavaScript
#104Earlier quoted context omitted.
Simpler is better. Cygwin is overkill unless you are trying to mimic your exact non-Windows environment, and it doesn't mix well with Windows' vanilla CMD environment. For those of us who want to be working with more Windows than UNIX, but who are used to standard coreutil commands, 1/100th the functionality of cygwin actually sounds kind of great! Not saying that the commands need to be written in JS, but it seems l…
node.js is not simple or even simpler
Re: CoreUtils implemented in pure JavaScript
#105Earlier quoted context omitted.
It's better to say nothing so people can be happy with what they've just done and continue to make the same mistakes in the future?
So I guess no one should write a toy kernel again the future, because it won't be perfect? What kind of logic is that?
This is presented as Unix Without the Suck, when in fact it's almost 100% suck.
Re: CoreUtils implemented in pure JavaScript
#106Earlier quoted context omitted.
I imagine most libraries has some common functions that ones from public API rely on (and of course some exports can be used within module itself). Let's say you never import `helperX` and `helperY` from a library, but you import `usefulFunction` which relies on `helperX`. How would webpack know to exclude `helperY` but not `helperX`? Unless it does some kind of code analysis, or lib is split in "module per function"…
I believe they are doing code analysis, at least that's what the README for Rollup says: > Rollup statically analyses your code, and your dependencies, and includes the bare minimum in your bundle.
var mod = {};
module.foo = function () { return 42; };
module.bar = function () { return -1; };
module[Math.random() > 0.5 ? "foo" : "bar"]();
How can `Rollup` determine that I need both functions here?Re: CoreUtils implemented in pure JavaScript
#107Earlier quoted context omitted.
node.js is not simple or even simpler
However, I already have it.
- it works on my laptop
- but I already have it
Re: CoreUtils implemented in pure JavaScript
#108Earlier quoted context omitted.
However, I already have it.
Yes, but - when you hit some bug or just need some specific combination of commands, there would be thousands posts on the web that explain how to do on unix that will work in Cygwin. Will they work in this environment?
Re: CoreUtils implemented in pure JavaScript
#109Earlier quoted context omitted.
I don't understand this at all. UNIX shells suck. Javascript sucks. How could one implement a UNIX shell in Javascript and have it not suck? Does the result suck so bad that it just wraps around becomes good again? Is the "way forward" recombining and rehashing the terrible technologies everyone is familiar with already, indefinitely?
> UNIX shells suck. Javascript sucks. How could one implement a UNIX shell in Javascript and have it not suck? What do you mean by "UNIX shells suck"? I'm fairly sure most people would consider UNIX shells to be one of the bigger revolutions in computing.
Re: CoreUtils implemented in pure JavaScript
#110Earlier quoted context omitted.
> UNIX shells suck. Javascript sucks. How could one implement a UNIX shell in Javascript and have it not suck? What do you mean by "UNIX shells suck"? I'm fairly sure most people would consider UNIX shells to be one of the bigger revolutions in computing.
Perhaps it's my own shortcoming, but for any given script I write, I find that, say, 20% of all my code is productive, and the remaining 80% is massaging the output of one tool into a shape that's compatible with the input of the next tool. Compare with the exprience of using Windows PowerShell where cmdlets return objects and you can grab precisely the fields you want with minimum ceremony. Things are better now wit…