News for hackers. Stuff that matters.
Re:Elvish is a friendly interactive shell and an expressive ... by xiaq on Wednesday September 09, 2020 @02:41PM (#24424252)
Elvish author here, AMA :)
Re:Elvish is a friendly interactive shell and an expressive ... by ilaksh on Wednesday September 09, 2020 @06:07PM (#24426476)
Hello. Looks amazing. How does the command completion compare to fish? That's the feature I like about fish because it seems very predictive. But just the other day I needed to parse JSON from curl or whatever and ended up writing a Node.js script which would have been unnecessary with Elvish.
Re:Elvish is a friendly interactive shell and an expressive ... by xiaq on Wednesday September 09, 2020 @07:01PM (#24426923)
Elvish has a really simple API for writing completers (https://elv.sh/ref/edit.html#completion-api). The simplicity of the API stems from some fundamental language features like first-class functions, value pipes and composite data types. In more traditional shells without these language features (including fish), the completer API is usually made up of obscure naming conventions, specialized command for outputting candidates and controlling the format, etc.

I think Elvish's simple completer API (which is very similar to completion protocols used by editors, FWIW) is proof that serious programming capabilities is actually quite essential for a shell. You wouldn't write editor plugins using bash, but people have to write completers and other shell plugins in bash all the time.

However, what would affect your day to day experience the most is probably the coverage of existing completers. There are some community efforts you can find in https://github.com/elves/awesome-elvish#completion-scripts, but it's quite clear that Elvish is lagging behind.

This is mostly because I'm still trying to figure out a lot of things in the language itself, and I don't want people to invest a lot of completers before they get broken by language changes. Once the language becomes more stable (which will perhaps take another year or so) I'll invest much more in this area.

Re:Elvish is a friendly interactive shell and an expressive ... by weinzierl on Thursday September 10, 2020 @04:28AM (#24430121)
> "There are some community efforts you can find in https://github.com/elves/awesome-elvish#completion-scripts, but it's quite clear that Elvish is lagging behind."

clap-rs, which is a popular command line parser for Rust, can generate Elvish completion scripts automatically and it works really well. Maybe you want to add that to the list.

Re:Elvish is a friendly interactive shell and an expressive ... by ilaksh on Wednesday September 09, 2020 @09:00PM (#24427805)
The API looks awesome. But when I tried it just now, I see no color in the terminal, and it does not have anything like the completion I see in fish.

I don't know if you have tried it but fish basically predicts what you are going to enter based on the directory you are in and what you have entered before and gives a preview as you are typing, and then you can hit the right arrow to complete it.

Since that is extremely convenient for me and your shell seems to not have color (at least not in my Ubuntu terminal right now), I am going to stick with fish.

Re:Elvish is a friendly interactive shell and an expressive ... by warent on Wednesday September 09, 2020 @07:55PM (#24427389)
This is really exciting. I've been using zsh for years but would probably change to this shell with better completions and theming.
Re:Elvish is a friendly interactive shell and an expressive ... by bovermyer on Wednesday September 09, 2020 @08:57PM (#24427791)
How does Elvish compare to Powershell, at least in philosophy?
Re:Elvish is a friendly interactive shell and an expressive ... by xiaq on Wednesday September 09, 2020 @09:34PM (#24428006)
Elvish and PowerShell shares one big thing: let command outputs carry structured value. Everything else is quite different:

* Elvish is a more minimalist language influenced by the Lisp tradition, whereas PowerShell is a much larger language with its own distinct "flavor" (in a good way; the language has some quirks but seems decent overall).

* PowerShell has a lot of integration with the .NET ecosystem and Windows APIs. Elvish obviously has none of those.

* Elvish has a pretty sophisticated UI, whereas PowerShell seems to lag behind a bit in UI features.

Getting back to philosophy, it seems to me that the development PowerShell is largely driven by facilitating common Windows sysadmin tasks, and the team seems to have some very concrete use cases in mind.

On the other hand, the design of Elvish has two main tenets, one theoretical and one practical: make a good programming language that is still "shell like", and make a powerful flexible UI suitable for daily use.

Re:Elvish is a friendly interactive shell and an expressive ... by andreareina on Thursday September 10, 2020 @12:12AM (#24428819)
> Elvish is a more minimalist language influenced by the Lisp tradition, whereas PowerShell is a much larger language with its own distinct "flavor" (in a good way; the language has some quirks but seems decent overall).

Could you expand on what you mean by this? It sounds like you're conflating the size of the language with some measure of lispiness, but Common Lisp for example is huge.

Re:Elvish is a friendly interactive shell and an expressive ... by garmaine on Thursday September 10, 2020 @01:37AM (#24429206)
It's confusing to me that you don't consider LISP to be a simple/minimalist language.

Core language, not standard library, extensions, etc.

Re:Elvish is a friendly interactive shell and an expressive ... by dunefox on Thursday September 10, 2020 @04:39AM (#24430173)
Simplicity of core language and syntax does not necessarily translate into simplicity of the language, see Common Lisp.
Re:Elvish is a friendly interactive shell and an expressive ... by yumaikas on Thursday September 10, 2020 @01:56AM (#24429309)
So, trying out elvish a bit tonight, I've noticed that there are a lot of little quirky places that whitespace is significant in elvish? One example is lambda syntax. Do you have any plans on making that less of a thing, or is it here to stay?
Re:Elvish is a friendly interactive shell and an expressive ... by weinzierl on Thursday September 10, 2020 @04:24AM (#24430103)
I dabbled a bit with Elvish recently and enjoyed it. What I found harder than I expected it to be was getting an initial configuration to my liking. While the documentation is excellent I find that it lacks some kind of beginners tutorial for plain users. The Fundamentals section is a good intro to the language but what I wanted to know more as a newbie was that my startup file is expected to be ~/.elvish/rc.elv, for example. It's all there but the basic info could be more prominent in the docs in my opinion. Otherwise I'm happy with Elvish, thanks for the good work.
Re:Elvish is a friendly interactive shell and an expressive ... by KuhlMensch on Wednesday September 09, 2020 @11:22PM (#24428592)
Is there a road map?
Re:Elvish is a friendly interactive shell and an expressive ... by gdsdfe on Wednesday September 09, 2020 @08:41PM (#24427699)
kudos for the website
Re:Elvish is a friendly interactive shell and an expressive ... by xiaq on Wednesday September 09, 2020 @08:51PM (#24427761)
Thanks! Is there anything you particularly like, and anything that can be improved?