babashka

https://github.com/babashka/babashka. Also see #sci, #nbb and #babashka-circleci-builds .
2021-06-28T01:20:12.224200Z

I'm officially replacing ZSH with babashka โ€“ for scripting, not for interactive shell. A lot to learn for me, but so far it works great and I'm really happy with the transition. ZSH is a great shell, but for writing long and complicated scripts it ain't no fun. Great job @borkdude, cheers!

โค๏ธ 3
๐ŸŽ‰ 1
solf 2021-06-28T02:11:35.224600Z

> not for interactive shell yet

2021-06-28T02:20:37.229600Z

@dromar56 Wouldn't that be just totally wicked? I really loved the idea of https://github.com/dundalek/closh, but it doesn't seem to be developed much these days and the current state is not really that great. I'd love a modern shell, one that works with structured data rather than treating everything as a string. But the barrier is high: as much as the traditional shells are not great in many things, they have good/great UI and are supported by everyone. ZSH completions for instance are really great. With that said I'm rooting for some modern solution, preferably CJ-based!

2021-06-28T14:02:17.246300Z

Yeah, I was hoping something based on CJ, especially since I already chose babashka for scripting. But you're right, there's eshell and I actually do want to look into it, the integration of shell with Emacs sounds great (so one doesn't have to copy file paths from the shell and the like, because we're already in Emacs etc). Any highlights / comments about eshell? Since I don't have much experience using it, I'd like to know how is it in practice. I'm pretty fond of ZSH I have to say. But only for interactive shell, not for scripting. It has many very handy features. Unfortunately the documentation is bloody awful. Still, I really wish for something that could mix some Lisp (preferably CJ) with commands. Closh does that. And stop treating everything as text, I mean it's so annoying when you parse output of something in tables, say ps aux with awk '{print $2}' and then there's a string with spaces in one of the columns, which throws off awk and now you have invalid data. (ps doesn't do that, but I run into this issue so many times and it's really hard to solve in shell). It's a difficult issue to solve though, since output of commands really is strings, but maybe there could be some way around it? New convention of printing out say JSON, so we could understand what the data really mean, where is beginning/end of a cell etc? Who knows, it's hard, but it should be solved.

solf 2021-06-28T02:22:37.229800Z

Besides closh, which Iโ€™ve heard before but never used, thereโ€™s also emacโ€™s eshell

solf 2021-06-28T02:23:29.230Z

I +1 the completions issue, not having them is for me one of the biggest issues using eshell

2021-06-28T10:12:14.233100Z

Some Monday morning programming fun: Game of Life on the command line (thanks to @cgrand for the brilliant data structure and accompanying neighbours and step function). ~ 20 loc and then some data to create some game of life objects ๐Ÿค“ https://gist.github.com/mmzsource/655b9dcfe56eed8a045022837186ed84

2021-06-28T10:15:37.233300Z

@borkdude already added to https://github.com/babashka/babashka/discussions/categories/show-and-tell ๐Ÿ™‚

borkdude 2021-06-28T10:49:30.233600Z

Awesome, thank you!

1
borkdude 2021-06-28T11:46:20.233900Z

@mmz what is next... tetris? :)

2021-06-28T12:20:23.234100Z

probably ๐Ÿ˜…

borkdude 2021-06-28T12:23:06.234300Z

if you don't want to do it from scratch, you could try to port https://github.com/borkdude/console-tetris

๐Ÿค“ 1
borkdude 2021-06-28T12:23:45.234800Z

this relies on the lanterna library but I think it would be nicer to have it as a "simple" script

1
borkdude 2021-06-28T12:26:33.235Z

the most complicated part is reading a single key without enter

2021-06-28T12:26:55.235300Z

good point :thinking_face:

2021-06-28T12:27:01.235500Z

:face_with_monocle:

greg 2021-06-28T22:55:15.248700Z

Hi, I'm using Cursive for writing Clojure. Recently I wrote some scripts in Babashka, but I couldn't manage to make code highlighting as good as it is for regular Clojure code. Do you have any hints how to write Babashka from Cursive?

greg 2021-06-29T11:44:16.249500Z

Thanks a lot @cfleming ๐Ÿ™‡