Hacker Newsnew | past | comments | ask | show | jobs | submit | more xiaq's commentslogin

It wasn't directly borrowed from any other language (https://news.ycombinator.com/item?id=40317577) but there's definitely something nice about the syntax that causes multiple languages to use it.

Elvish predates Nushell by quite a few years BTW :)


I had that backwards, perhaps they took inspiration from you :)


I take your comment as implying that https://elv.sh is nice, clean and elegant, and thank you for the compliment :)

I can't speak for other people, but I made it on my own and don't have any formal training in design.

With the risk of stating the obvious, you first have to realize that as a developer you can make a reasonably clean-looking website on your own. There are just a few basic ingredients: fonts, spacing, positioning, background shades, and rounded corners. You can do all of these from CSS and there is a lot of good resources for CSS today.

After that it's studying other websites, replicating the style you like, and a lot of trial and error. You can do a lot of experiments from the browser's dev tool before committing them into the stylesheet too. But at the end of the day, you have to put in some time. The layout of the current homepage was redone just a few months back and it took me (IIRC) 3 days to tweak everything to my satisfaction.


Thanks for the ideas, and yes it was a compliment :-)


Yes! I haven't been using it as my daily driver for almost 10 years now.

There are detailed instructions on how to get it and use it as your default shell in https://elv.sh/get/.


> I haven't been using it as my daily driver for almost 10 years now.

Is there some humor I'm missing there, or is that just a typo (and you meant to say "I have" )?


Ha it's just a typo.


While I don't agree with most of your analysis - in particular for the second example, I'd invite you to read its explainer that goes into much more depth (https://elv.sh/learn/scripting-case-studies.html#update-serv...) - I think you might be more interested in the Oil Shell project, which is trying to chart a smooth upgrade path from bash: https://www.oilshell.org

I think we simply can't say for sure which path is better for the future of shells, and I'm quite excited by the fact that different projects are exploring different directions. I will just stick to the path I find best and won't try to convert you :)


You can find this in the explainer linked from the example too :) https://elv.sh/learn/scripting-case-studies.html#jpg-to-png....

https://elv.sh/learn/tour.html also has a big list of syntax comparison between bash and Elvish.


Thanks, but I was thinking more along the lines of a single semi-complex script, like what https://todomvc.com/ does for selecting a framework.


Hiya! I, for one, would definitely welcome more promotion of Murex!

(Also just checked out Murex's website again, seems we reworked the style of the respective homepages around the same time :)


Your new website is nice. Particularly on mobile too, but even just generally. Though to be fair, I've always been impressed with your website layout -- even on the previous one.

I can't take any credit for Murex's site, it was a user who doesn't write Go but wanted to contribute in other ways. Open source is definitely a double edged sword but I'm still always surprised and impressed with how much time people are willing to invest into other peoples projects if they like them.

By the way, one killer feature of Elvish that I admire and think doesn't get talked about enough is how exceptions are raised in pipes. eg:

    ~> cat example | grep foo | grep bar
    Exception: (<nil> | grep exited with 1 | grep exited with 1)
It's really neat how you do that. It's readable, detailed, and valuable to the user.


Thank you for the compliment!


Tcl is actually an inspiration for Elvish, and Elvish has a "command language" flavor too.

The "everything is a string" idea sadly turned out to not work that well for most people though, so Elvish has lists, maps, and first-class functions :)


Modern Tcl has all of these, you know? "Everything is a string" should actually be "everything has a string representation allowing for lossless roundtrip", but it's a bit less snappy; maybe you mean the lack of typing and I'd kind of agree with you here, though it's what makes Tcl's weird homoiconicity work.

Tcl lists are arrays (and kind of deques since https://core.tcl-lang.org/tips/doc/trunk/tip/625.md), dicts are the first-class maps we should have had since the beginning and apply allows to build closures around it.


I would invite you to read the rest of the explainers, which go into deeper differences: https://elv.sh/learn/scripting-case-studies.html

Re "cosmetic" - I'd agree that the extent syntax matters is more limited compared to semantics, but that limited extent can be a lot of the daily experience with a language! I've ported many bash scripts to Elvish and I still find it liberating to not have to write double quotes everywhere for my script to handle whitespaces correctly.


Elvish's lambda syntax used to be [arg]{ ... }. But since [arg] is also the syntax for lists, it can get confusing - so I decided to move the argument list inside { ... }. And going through all the metacharacters Elvish already had, | was the one that was meaningless at the start of the lambda body, so I settled on {|arg| ... }.

I only realized the similarity with Smalltalk after that. I did learn a little Smalltalk many years ago but completely forgot about it, but it's possible that the knowledge was always somewhere in my subconscious brain.


Actually 1/2 is there because Elvish supports rational numbers, unfortunately there's no infix math. (Elvish supports arbitrary-precision integers and rationals.)


Bugger. Apologies for posting misinformation.

(at least I warned people I was undercaffeinated?)


Ha, no problem. The number syntax is documented in https://elv.sh/ref/language.html#number


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: