Live data from Hacker News

Closh – Bash-like shell based on Clojure

github.com

21–30 of 138 posts

Re: Closh – Bash-like shell based on Clojure

#21
post #3

Author here, thanks for posting. The project is still very early in the development and there is a lot of work to be done to make it ready for daily use. I would appreciate any feedback. What are the less known features of existing shells you really like? What things would you change about existing shells if you could?

The roadmap seems well thought out. Perhaps linking each unfinished item to a summary Github issue explaining how you see it being approached would assist with gaining contributors. You could then keep a list of "where to jump in" by assigning that sort of issue a tag ("start-hacking-here" or some such).

Re: Closh – Bash-like shell based on Clojure

#22
post #9
post #3

Author here, thanks for posting. The project is still very early in the development and there is a lot of work to be done to make it ready for daily use. I would appreciate any feedback. What are the less known features of existing shells you really like? What things would you change about existing shells if you could?

I really like this idea and I really like Clojure. Though I'm curious about performance. And do you know if anyone is doing something similar with Racket? (Looks like there is a Common Lisp shell http://www.cliki.net/CLISP-Shell )

At RacketCon this year, there was a presentation on something called “Rash”:

http://docs.racket-lang.org/rash/index.html

Re: Closh – Bash-like shell based on Clojure

#23
post #3

Author here, thanks for posting. The project is still very early in the development and there is a lot of work to be done to make it ready for daily use. I would appreciate any feedback. What are the less known features of existing shells you really like? What things would you change about existing shells if you could?

A reader macro for embedding shell commands within clojure forms would be interesting. Something like:

(let [x #sh ls] (pprint x))

Or some kind of way to embed shell execution directly in the form...

Re: Closh – Bash-like shell based on Clojure

#24
post #9
post #3

Author here, thanks for posting. The project is still very early in the development and there is a lot of work to be done to make it ready for daily use. I would appreciate any feedback. What are the less known features of existing shells you really like? What things would you change about existing shells if you could?

I really like this idea and I really like Clojure. Though I'm curious about performance. And do you know if anyone is doing something similar with Racket? (Looks like there is a Common Lisp shell http://www.cliki.net/CLISP-Shell )

eshell is another lispy shell that's been in Emacs for a very long time. Elisp is probably my least favorite lisp that's commonly available, but eshell probably has the largest user base and is certainly the most mature out of all of these contenders. You can reasonably use eshell as your primary shell.

Re: Closh – Bash-like shell based on Clojure

#25
post #23
post #3

Author here, thanks for posting. The project is still very early in the development and there is a lot of work to be done to make it ready for daily use. I would appreciate any feedback. What are the less known features of existing shells you really like? What things would you change about existing shells if you could?

A reader macro for embedding shell commands within clojure forms would be interesting. Something like: (let [x #sh ls] (pprint x)) Or some kind of way to embed shell execution directly in the form...

Or sh/ls, like we would do with js/alert, where sh is some handle to a global shell object we can call from within a form.

Re: Closh – Bash-like shell based on Clojure

#26
post #4

> Why try to reinvent bash? > ... > It treats everything as text while we mostly need to manipulate structured information. Looking at the examples given, it's more like Powershell, but with better compatibility with existing Unix text-based tools. Which is awesome.

It seems like the concepts are orthogonal though. The reason powershell works is that it replaced the entire shell toolchain with object-oriented equivalents. Without that you're fundamentally limited because your inputs are still plain text, so you're still doing the equivalent of awk/sed scripts to transform text into structured data.

Re: Closh – Bash-like shell based on Clojure

#27

Earlier quoted context omitted.

what's the tradeoff of clojurescript over native clojure? wouldn't the java clojure runtime be much faster?

yes. and multithreaded. Theres no meaningful reason to use cljs other than to avoid java or if the java runtime isn’t available (eg. browser).

startup time: not sure it's good ux to wait seconds for every command...

lumo/cljs is instantaneous

Re: Closh – Bash-like shell based on Clojure

#28
post #27

Earlier quoted context omitted.

yes. and multithreaded. Theres no meaningful reason to use cljs other than to avoid java or if the java runtime isn’t available (eg. browser).

startup time: not sure it's good ux to wait seconds for every command... lumo/cljs is instantaneous

It's not like you need to spin up a separate JVM for each command.

Re: Closh – Bash-like shell based on Clojure

#29
Nice, I've been waiting for a good modern shell to replace ZSH. Fish just wasn't enough of an improvement for me to abandon ZSH. This is an area where most open-source developers have avoided, as it's a "solved" problem, but it really isn't.

I'm currently waiting on Elvish [1] to mature. It's written in Go [2], but they're developing a new language on top of it for shell scripting, which I tried for a week. It's a nice modernization and is incredibly fast but still very alpha.

You don't realize how slow ZSH/Bash is (even without plugins) until you try a modern shell, and there are very few good modern shells around.

Besides performance my primary complaint is just how awful coding in ZSH is. I've been doing it for years and I still feel like I'm running into walls constantly and struggling to write 'clean' code that isn't full of hacks and workarounds.

High performance + modern scripting language = my ideal future shell

[1] https://elvish.io/

[2] https://github.com/elves/elvish

Re: Closh – Bash-like shell based on Clojure

#30
post #25
post #23

Earlier quoted context omitted.

A reader macro for embedding shell commands within clojure forms would be interesting. Something like: (let [x #sh ls] (pprint x)) Or some kind of way to embed shell execution directly in the form...

Or sh/ls, like we would do with js/alert, where sh is some handle to a global shell object we can call from within a form.

Ah, never mind, I just saw sh-ok.
Post reply on HN