Live data from Hacker News

Closh – Bash-like shell based on Clojure

github.com

41–50 of 138 posts

Re: Closh – Bash-like shell based on Clojure

#41
post #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 ni…

elvish looks a bit like powershell

Re: Closh – Bash-like shell based on Clojure

#42
post #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 ni…

Rash? Rust Already SHell (There's already a "RuSH" made with Ruby). Oh. https://github.com/redox-os/ion CLASH - Common Lisp Again SHell? Oh. http://www.cliki.net/CLISP-Shell Doh! https://docs.racket-lang.org/rash/index.html Someone put OO in my Linux shell! https://virtualizationreview.com/articles/2017/06/01/how-to-...

There's also "oh shell", written in Go but exposing a Scheme-like language: https://github.com/michaelmacinnis/oh

Re: Closh – Bash-like shell based on Clojure

#43
post #27

Earlier quoted context omitted.

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

500-600ms is, to be fair, a big one time cost. The downsides are pretty darn significant though. I can’t imagine a situation where I would trade ‘starts a bit faster’ for ‘throw away all parallelism in code’ personally... but hey. Plenty of people use node for very serious stuff. I suppose I just think this is an example of fast and cheap on the fast/cheap/good scale.

But this is a shell. You start _all the time_, including plenty of times where you don't really notice: other processes often start subprocesses via your shell to get your environment right. Meanwhile, the shell is usually just waiting for you, so it's not like it's an intrinsically parallel process. This doesn't impact the shell's ability to run multiple things at once: the shell eventually creates subprocesses. One would expect an event-loop like Node to be perfect for this sort of thing.

Re: Closh – Bash-like shell based on Clojure

#44
post #40
post #39

Earlier quoted context omitted.

What does your development environment look like? Every time I bail on a Cljs project it's because tooling is worse than for Clj.

I use Spacemacs and have the following in inside my .spacemacs in the dotspacemacs/user-config functions: (require 'cider) (setq cider-cljs-lein-repl "(do (require 'figwheel-sidecar.repl-api) (figwheel-sidecar.repl-api/start-figwheel!) (figwheel-sidecar.repl-api/cljs-repl))") Then I just use figwheel to manage my cljs projects (I think this is the default now for reagent and luminus projects, it's also the default fo…

Whoa, awesome. That was super helpful. I'm also a spacemacs user, but my pain was mostly for non-browser Cljs. I should have specified, you're right: developing browser Cljs is pleasant because of figwheel :)

Re: Closh – Bash-like shell based on Clojure

#45

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

i mean, really what is the point of Node ?

It's a highly performant platform, based on a rapidly evolving language that's easy to understand. As such it's largely democratised server/shell programming to millions of users and web developers who could have been turned off by more advanced syntaxes and programming concepts. These people have created millions of open source packages which now dwarf most other communities, and the platform has unlocked an incredible amount of untapped economic value that powers likely hundreds of thousands of businesses around the world. Need I go on?

Re: Closh – Bash-like shell based on Clojure

#46
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.

Agreed, you're still scraping, but being familiar to people used to scraping is a decent way to convert those people into using structured data.

Re: Closh – Bash-like shell based on Clojure

#47
post #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 ni…

Program in rc shell[0]. It has a much superior syntax, and can manage piped commands. The use of the single quote to mean "really fucking quote", and $* working as every user would expect.. makes it a joy.

[0]: https://github.com/rakitzis/rc

Secondly, I use rc in emacs shell-mode which poorly emulates a terminal, so advanced completion and all that other stuff I delegate to emacs. rc is just a programming language that supports shell commands extremely well.

Re: Closh – Bash-like shell based on Clojure

#49
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.

That aligns pretty much with my conclusion that to make an useful object shell, I'd be essentially rewriting the whole userland and probably some kernel bits too (/proc and /sys etc). So basically building a completely new OS on top of Linux kernel. I wouldn't expect such project to be very popular..

Re: Closh – Bash-like shell based on Clojure

#50
Call me old. But I want my shell to be a tight binary, preferably distributed (at some point) by major distros.

This needs freakin' Node.js.

I'm more looking in the Rust/Haskell/OCaml direction for a hip bash/zsh replacement.

Post reply on HN