Live data from Hacker News

CoreUtils implemented in pure JavaScript

github.com

81–90 of 128 posts

Re: CoreUtils implemented in pure JavaScript

#81
post #76

It's always mind blowing how when someone makes a neat project like this and the comments are nothing but complaining, vitriol, etc.

Lots of vitriol because it's yet another "I took something that works and rewrote it to be slower, less functional, and JavaScript" Making computing worse, one fork at a time.

This is the attitude that drives people away from working on open source.

Re: CoreUtils implemented in pure JavaScript

#82
post #76

It's always mind blowing how when someone makes a neat project like this and the comments are nothing but complaining, vitriol, etc.

Lots of vitriol because it's yet another "I took something that works and rewrote it to be slower, less functional, and JavaScript" Making computing worse, one fork at a time.

So..., just don't use it? If it's useful for just one person, it's useful.

Re: CoreUtils implemented in pure JavaScript

#83
post #70

>Huh? Okay - think Cygwin, except: Oh boy, another one of these. Cygwin is useful because it provides a POSIX C API on Windows. It is not useful because of its shell and coreutils. And saying it uses "pure ES6" is stretching it - it's using the plain ES5 Node.js require/export patterns instead of ES6 modules. >1/15th of the size [of Cygwin] Haha, and 1/100th the functionality

For my purposes, I don't need a POSIX C API. What I need are the shell commands that I commonly use as my IDE to be available on Windows without a massive hack. Cash seems to be right up my alley, and I'm excited for this.

I'm not saying that it's not without use-cases. I'm saying the readme is pompous and overstates its usefulness and was clearly written by someone who doesn't have a clue about the tools they're replacing.

Re: CoreUtils implemented in pure JavaScript

#84
post #63
post #60

Earlier quoted context omitted.

I'm not talking necessarily about elegance, but performance, safety, the ability to run on embedded devices, a widely-available toolchain and so on. Apart from that, it's great to have a favorite language, but choosing a hammer for every task does not seem like the mark of a great craftsman for me.

I believe most people in every profession are not/do not aspire to be great craftsmen. And in the end, if their tools work, nobody cares outside of their immediate colleagues.

...and herein lies the problem.

Re: CoreUtils implemented in pure JavaScript

#85

Earlier quoted context omitted.

In instances like this, there's no issue with it being ES5. However, in the web world, ES6 modules have a huge (pardon the pun) advantage that's just being realized. Because of the static nature of ES6 imports, you can eliminate unused code when you package it all together. The newest Webpack versions and Rollup are both taking advantage of this, and it can result in huge savings in filesize. For example, lodash is a…

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.

Re: CoreUtils implemented in pure JavaScript

#86
post #53

Apart 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.

For fun and education? I am not a fan of the idea from a practical point of view, but it seems like implementing these things could be a nice learning experience.

Re: CoreUtils implemented in pure JavaScript

#87
I understand why you'd use Node.js for I/O intensive tasks like web development and scraping, but for a cross-platform program meant to do everything? None of Node.js's benefits shine.

Sure, Node.js has a big community with lots of (mostly linux-only) packages, but you get a mediocre language and pretty crap cross-platform support. This doesn't matter as a web development language, but seriously gets in the way when you're developing a program designed to do literally everything.

A more useful project might be coreutils in rust, which several projects are already doing.

Re: CoreUtils implemented in pure JavaScript

#89
post #88

Earlier quoted context omitted.

However, I already have it.

You already have a processor too, and something running directly on that is, in fact, more simple.

It's more simple from the point of view of the processor, I suppose, but that's not a useful metric for me.

Re: CoreUtils implemented in pure JavaScript

#90
post #70

>Huh? Okay - think Cygwin, except: Oh boy, another one of these. Cygwin is useful because it provides a POSIX C API on Windows. It is not useful because of its shell and coreutils. And saying it uses "pure ES6" is stretching it - it's using the plain ES5 Node.js require/export patterns instead of ES6 modules. >1/15th of the size [of Cygwin] Haha, and 1/100th the functionality

For my purposes, I don't need a POSIX C API. What I need are the shell commands that I commonly use as my IDE to be available on Windows without a massive hack. Cash seems to be right up my alley, and I'm excited for this.

If you have npm already.. I guess?

I personally haven't had a windows machine without git in years. Distribution for windows includes somewhat proper shell with unix utils. I can use the same .bashrc I have on my linux machines, write commit messages using vim, have colors in the terminal, etc...

Post reply on HN