Live data from Hacker News

Cash: a cross-platform implementation of Unix shell commands in JavaScript

github.com

51–60 of 75 posts

Re: Cash: a cross-platform implementation of Unix shell commands in JavaScript

#51
post #37

Earlier quoted context omitted.

It does sound like stereotyping. It also sounds very hostile to new ideas. You're essentially telling "javascript developers" to get off of your lawn. I do actually agree with your point about compliance. It would be really cool if we had a POSIX-conformant set of shell commands written purely in JS, as an alternative to having to find and install compiled binary ports that run on our particular non-Unix systems. At…

Sorry, I actually despise C. When all is said and done, Javascript is not a horrible language but Javascript developers have a horrible track record. I know it sounds like saying ($my_country is good but foreach $person in $my_country->people are bad. However, why do we need to write shell commands in java script? I keep hearing about this new fancy systems language called rust which should be good enough for most pr…

What are you afraid will happen? That a JavaScript developer will get lazy and store function definitions in some globally-writable place, allowing untrusted logic to be injected into systems via some embarrassingly accessible route?

Because, yeah, that would be an awful thing to happen to shell utils.

Re: Cash: a cross-platform implementation of Unix shell commands in JavaScript

#52
post #15

Earlier quoted context omitted.

http://babun.github.io/ is wonderful. ConEmu is a great container for a tabbed interface of Babun, PuTTY or powershell instances.

Babun seems to solve none of the issues that the original commenter mentioned. Awful fonts, worse rendering, crappy copy/paste, limited size, no split screen or tabs The screenshots on the Babun site show the same 90s-era looking shell container. ConEmu looks to have more features, but is similarly stuck in the Win-98 design aesthetic.

What about Cmder then?

http://cmder.net/

It is slick, has nice copy/paste, can resize, do split terminals, and tabs.

Re: Cash: a cross-platform implementation of Unix shell commands in JavaScript

#53
post #20

I absolutely love msys2: http://msys2.github.io/ It comes with an easy to use installer and `pacman` package manager. Their repositories have lots of stuff already compiled to windows usage (the silver surfer, gnu global, etc). Also, sshd works mostly out of the box. Ability to ssh to Windows box into a functional shell (not crippled cmd.exe) is a killer feature for me.

Thanks for mentioning this. I just started using Windows at home after a long break and defaulted to setting up Cygwin with cmder. Before that I used Arch Linux for a while so seeing that msys2 uses a port of pacman is intriguing. Could you (or anyone else for that matter) share more information about what it's like using this as opposed to Cygwin? Pros, cons, etc.

MSYS2 is a fork of Cygwin. The goal is to make it easier to compile software targeting Windows.

Some notable changes are:

- It has its own package repository, using PKGBUILDs on github. It can also be updated from within its own shell. Cygwin doesn't do this, for very important reasons, involving autorebase hell which MSYS2 is certainly still subject to.

- In their fork of cygwin1.dll, they removed support for symlinks (i.e. `ln -s` creates a full tree copy); and the /cygdrive/ root directory was replaced with / (just like the old/deprecated MSYS1).

- It has three startup links, in which gcc/ld/make and the like are all "symlinked" to different versions (e.g. targeting win32, targeting win64, or targeting MSYS2 itself). It makes it easier to compile software targeting windows. You should install separate -devel packages for each "environment".

- MSYS2 focuses on packaging dependencies that would be useful for compiling software targeting the Windows platform (e.g. libXYZ). In comparison, Cygwin is more of a mini-OS, packaging applications for general use (e.g. rsync, BIND, MySQL and X11). There is a lot of overlap, but many exclusive packages.

- MSYS2 is amenable to merging back with Cygwin, but, the patches they've made to cygwin1.dll can't be upstreamed. Cygwin proposed a new plugin system that would allow MSYS2 functionality within Cygwin, but, nobody has done the work to port MSYS2 to this new system. (maybe outdated information)

Re: Cash: a cross-platform implementation of Unix shell commands in JavaScript

#54
post #53
post #20

Earlier quoted context omitted.

Thanks for mentioning this. I just started using Windows at home after a long break and defaulted to setting up Cygwin with cmder. Before that I used Arch Linux for a while so seeing that msys2 uses a port of pacman is intriguing. Could you (or anyone else for that matter) share more information about what it's like using this as opposed to Cygwin? Pros, cons, etc.

MSYS2 is a fork of Cygwin. The goal is to make it easier to compile software targeting Windows. Some notable changes are: - It has its own package repository, using PKGBUILDs on github. It can also be updated from within its own shell. Cygwin doesn't do this, for very important reasons, involving autorebase hell which MSYS2 is certainly still subject to. - In their fork of cygwin1.dll, they removed support for symlin…

One more important note about compiling software with MSYS2 is that the msys2 version of cygwin1.dll (i forget how it's renamed) obviously inherits the same license as cygwin1.dll. Cygwin1.dll is not LGPL. It is GPL. So any program you release compiled with MSYS2 inherits GPL virality, unless you pay Red Hat for a commercial Cygwin license.

Re: Cash: a cross-platform implementation of Unix shell commands in JavaScript

#56

Nice! I've been using ShellJS ( https://github.com/shelljs/shelljs ) for this purpose (replacing a bash script with a cross-platform version). Any compelling reasons to use Cash over ShellJS, besides slightly better coverage of UNIX commands?

The readme covers this (check near the bottom).

Re: Cash: a cross-platform implementation of Unix shell commands in JavaScript

#57

Earlier quoted context omitted.

Sorry, I actually despise C. When all is said and done, Javascript is not a horrible language but Javascript developers have a horrible track record. I know it sounds like saying ($my_country is good but foreach $person in $my_country->people are bad. However, why do we need to write shell commands in java script? I keep hearing about this new fancy systems language called rust which should be good enough for most pr…

https://github.com/uutils/coreutils - in Rust. https://github.com/aisola/go-coreutils - in Go. https://github.com/search?l=Nimrod&q=coreutils&type=Reposito... - in Nim (didn't seem to take off) You know how people write a to-do list, or a forum, or a blog to better learn a language? Some people write coreutils.

I was loosely involved in a project to reimplement all the Unix commands in Perl back around ~2000 or so.

Things seem to live on here:

https://metacpan.org/pod/PerlPowerTools

Re: Cash: a cross-platform implementation of Unix shell commands in JavaScript

#58
post #54
post #53

Earlier quoted context omitted.

MSYS2 is a fork of Cygwin. The goal is to make it easier to compile software targeting Windows. Some notable changes are: - It has its own package repository, using PKGBUILDs on github. It can also be updated from within its own shell. Cygwin doesn't do this, for very important reasons, involving autorebase hell which MSYS2 is certainly still subject to. - In their fork of cygwin1.dll, they removed support for symlin…

One more important note about compiling software with MSYS2 is that the msys2 version of cygwin1.dll (i forget how it's renamed) obviously inherits the same license as cygwin1.dll. Cygwin1.dll is not LGPL. It is GPL . So any program you release compiled with MSYS2 inherits GPL virality, unless you pay Red Hat for a commercial Cygwin license.

By default the gcc packages in the mingw-w64-... groups don't link against that library.

You can explicitly include it if you need the POSIX compatibility parts missing from Windows, but most software doesn't.

Re: Cash: a cross-platform implementation of Unix shell commands in JavaScript

#59

Earlier quoted context omitted.

Awesome! I don't use Windows except for gaming, but its good to know something like this exist. Just to fill up last information gap, is there any good terminal emulator on windows? I remember using something that came with Cygwin long time ago, and it was slow (I think I used Vim on that).

mintty comes with cygwin and msys2. It's the one I use. Other people have recommended other terminal emulators like ConEmu, but those have varying (subpar) levels of Unicode/color support.

I also use mintty. It's not great, but I haven't seen anything better (it seems that ConEmu is optimized for cmd.exe, not bash).

I'm really using `tmux` inside `mintty` so I have an emulation of tabs inside one terminal. It's not super-convinient, requires the user to setup his/her own .tmux.rc, but it gets the job done (still orders of magnitude better than cmd.exe or "even" powershell).

Re: Cash: a cross-platform implementation of Unix shell commands in JavaScript

#60

> Huh? Okay - think Cygwin, except: No GCC or compilers, which I would think is one of the biggest reasons most people use Cygwin? Cygwin isn't just shell commands, and surprisingly PowerShell doesn't suck as much it features some unixy commands. As well as others have mentioned Clink makes cmd.exe suck even less.

I only use cygwin to SSH into my irssi-box and that only because I have more control over how to looks than normal "cmd"

If you have something customizable, but not cygwin I'm all ears

Post reply on HN