Live data from Hacker News

Closh – Bash-like shell based on Clojure

github.com

11–20 of 138 posts

Re: Closh – Bash-like shell based on Clojure

#13
post #12

> npm install -g lumo-cljs closh why? seriously, is this the point that modern tooling has gotten to where for no apparent reason it has a node dependency?

Node is the runtime for ClojureScript. The whole shell runs in Node.

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

Re: Closh – Bash-like shell based on Clojure

#14
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?

One thing that would be killer in a cljs shell is some sort of paredit capability. I've been writing clojure long enough with good tools that when I have to use it in an environment without paredit it slows me down a ton.

This looks great, though, and I can't wait to try it out.

Re: Closh – Bash-like shell based on Clojure

#15
post #8
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?

Is there a way I can automatically import libraries? Also, what's the current status on autocompletion features? By the way, very nice work!

You can use node libraries by requiring them with (js/require). ClojureScript libraries are in theory possible too, but I need to figure out how to specify classpath options for them.

Check out the example: https://github.com/dundalek/closh/blob/master/doc/guide.md#c...

Re: Closh – Bash-like shell based on Clojure

#16
post #12

Earlier quoted context omitted.

Node is the runtime for ClojureScript. The whole shell runs in Node.

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

Steady-state performance tends to be better on the JVM but startup performance is always much better on top of JavaScript. That makes it an enticing trade off for shells which is a process that you start new ones of constantly and where the performance of the shell itself is often not very important. (Performance-critical or hard-to-duplicate code like, say, line editing code, can be done equally well on either platform via FFI.)

Re: Closh – Bash-like shell based on Clojure

#17
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 )

There is also the scheme shell: https://scsh.net

Re: Closh – Bash-like shell based on Clojure

#19
post #12

Earlier quoted context omitted.

Node is the runtime for ClojureScript. The whole shell runs in Node.

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).

Re: Closh – Bash-like shell based on Clojure

#20
Very cool! I use Clojure on a daily basis for coding, this is a great addition to the arsenal :) Actually, my main argument against _not using it_ is that Bash has this awkward syntax that is hard to remember if you don't use it often... But anyway, I keep forgetting it after years so I might as well embrace it and take the leap to use this. Thanks for the initiative!
Post reply on HN