Anyone have any experience of both?
Anyone have any experience of both?
The Nushell and Elvish scripting languages are similar in many ways. I personally find the "shell" experience better in Nushell than Elvish.
Nushell
- Bigger community and more contributors
- Bigger feature set than Elvish
- Built in Rust (Yay :-)! )
Elvish
- Mostly developed by one person
- Built in golang
- Amazing documentation and general attention to detail
- Less features than Nushell
- Feels more stable, polished, complete than Nushell. Your script written today more likely to work unaltered in Elvish a year down the line. However this is an impression. Nushell must have settled down since I last looked at it.
For "one off" scripts I prefer Elvish.
I would recommend both projects. They are excellent. Elvish feels less ambitious which is precisely why I like it to write scripts. It does fewer things and I think does them better.
Nushell feels like what a future scripting language and shell might be. It feels more futuristic than Elvish. But as mentioned earlier both languages have a lot of similarities.
> Built in golang
Does that matter?
If you intend to be a contributor, of course the chosen language matters, but only a very small proportion of users will be contributors.
Rust tends to be marginally faster and compile to smaller binaries.
Go projects tend to hit maturity faster and develop quicker.
Its a relevant factor to quickly stereotype certain characteristics of development, but its not anywhere close to important.
The language choice has certain implications and I would say Rust & Go have fairly similar implications: it's going to be pretty fast and robust, and it'll have a static binary that makes it easy to install. Implications for other languages:
C: probably going to have to compile this from source using some janky autotools bullshit. It'll be fast but segfault if you look at it funny.
Python: probably very slow and fragile, a nightmare to install (less bad since UV exists I guess), and there's a good chance it's My First Project and consequently not well designed.
I have not really had problems with installing C (on the rare occasions I have compiled anything of any complexity) nor Python applications. Xonsh is supposed to be pretty good and written in Python, and most existing shells (bash, zsh, csh etc.) are written in C.
Amusing aside, I use fish and until I decided to fact check before adding it to the list of shells written in C, I did not realise it was written in Rust.
Now you mention it I vaguely recall reading something about it somewhere as planned but its been done!
There's a few obvious features missing in fish like backgrounding an alias or an equivalent to set -e, other than that I have no complaints.
The first thing I do on any machine is install fish.
But for writing scripts I would reach for Elvish/Nushell. More powerful.