7 ms·
A Shell Language in Lisp
- ephaeton 6y agoCompare that to this beauty: http://ftp.scsh.net/pub/scsh/0.6/scsh-manual.ps.gz http://ftp.scsh.net/pub/scsh/0.6/scsh-manual.ps.gz pp. 10 onward. It's such a pity scsh is dead ...
- bjoli 6y agoThe only thing I really miss from scsh is the process notation (which is arguably the hardest to implement). The rest is pretty well covered in most schemes. Srfi-115 has sexpr regular expressions, srfi-166 is, IMO, the best formatting utility there is.
- cat199 6y agonot very 'alive', but there is a 64 bit port to current scheme48 around, so it can still be used. didn't really make it to distro packages (yet) however
- chriswarbo 6y agoI found the shell-pipeline package for Racket pretty nice a few years ago https://docs.racket-lang.org/shell-pipeline https://docs.racket-lang.org/shell-pipeline The API seems to have changed a bit since I last used it, so not sure how nice the current version is. It's also apparently used by a shell-like language called Rash, but I've not used that either https://docs.racket-lang.org/rash https://docs.racket-lang.org/rash
- kwhitefoot 6y agoInteresting. But the readme doesn't say if the record and field separators can be changed. Space delimited fields are not always useful.
- clauderoux 6y agoYes, good idea. I don't think it would be that complicated... Actually, the language already exposes a "split" method that can be used exactly for that.
- musha68k 6y agoAlways nice to see cool new lisp projects. The shell angle there also reminds me of guile and especially babashka: https://github.com/babashka/babashka https://github.com/babashka/babashka
- rgrau 6y agoThere's also closh (https://github.com/dundalek/closh https://github.com/dundalek/closh) which also provides scripting capabilities appart from the pure interactive shell. As a newcomer to clojure my question is: what would be the practical differences and deciding factors for doing what would be a ".sh" in babashka vs closh?
- phyrex 6y agoPractically, mindshare, because that translates to longterm support and ability to get help if you need it. I know lots of people that use babashka but not a single one that uses closh. Of course, I see the irony in making the popularity argument for a lisp! :-)
- pandatigox 6y agoAs an aside, it's really cool to see that Naver is not only open sourcing a lot of their technologies, but doing it a lot of it in lisp too. For those who aren't aware, Naver is the Google/Yahoo equivalent in South Korea. Their main product is a search engine and web portal, but they also have community pages (Naver Cafe), Music, Translation, Webtoons (webcomics) and so on. They have a subsidiary company that's created the LINE messenger app.
- pdimitar 6y agoThis thread is likely a good place to ask: What modern alternatives to `.sh` scripting exist? Tcl? Is Fish objectively better than Bash and ZSH? Are there any thin wrappers and transpilers on top of sh? Or maybe just good old Perl? And how does this project address normal pain points of shell scripting, like using arrays and iterating on them for example? I was thinking a lot on the topic lately and currently have no good answers (never studied the topic in detail). I suppose just replacing `sh` scripting with Golang is also an option. Not the strongest typed or least verbosive language out there but it has a very good cross-compilation story, compiles really fast and produces single binaries that are easy to distribute. So might go with that. Python is out because startup time wasn't great last I used it for CLI tools (might be an outdated info however, any metrics)? Ruby is also a pretty solid candidate; the lack of static typing is, eh, 50/50 -- might not be important after all. I also know a guy who replaced Python with OCaml for quick scripting which is rather bizarre to me but knowing a bit more about OCaml nowadays, that actually can work just fine -- and OCaml is very terse. I would prioritize speed of startup and terse code over everything else. Static typing I want but can very likely do without. I don't care much how portable the program/runtime is; I can distribute it to my machines and I have some influence in my work about what tooling to use. Any practical recommendations?
- Y_Y 6y agoPerl, Julia, Python with PyPy, bash (but pretend it's something else)
- thaumasiotes 6y ago> I also know a guy who replaced Python with OCaml for quick scripting which is rather bizarre to me but knowing a bit more about OCaml nowadays, that actually can work just fine -- and OCaml is very terse. > I would prioritize speed of startup and terse code over everything else. If speed of startup and terse code are all you want... what's the problem with OCaml? It's got static typing too.
- pdimitar 6y agoThe only problem is that I'm a novice in it and it will take some significant investment of time and energy to learn it well. Which I still plan to do. Was just wondering if there are replacements for shell scripting that are quicker to learn.
- dmortin 6y agoEmacs also has a shell in Lisp EShell: https://www.gnu.org/software/emacs/manual/html_mono/eshell.html https://www.gnu.org/software/emacs/manual/html_mono/eshell.h...
- wejick 6y agoI wonder why this is under Naver company github, looks more like hobby project. Curious on how they use this kind of project in their environment.
- clauderoux 6y agoI have been interested for years in Data Programming, a weird expression coined by Christopher Ré (PR at Stanford). Basically, the idea is to be able to automatically apply filters on your data before building your model in an ML pipeline. This version of Lisp comes with data structures and pattern matching expressions, to detect some regular patterns in your data... This is the reason why we also have implemented a Python library so that your sieves can be called from within your Python code beforehand.