IRC channel logs

2022-09-11.log

back to list of logs

<ArneBab>dsmith-work: I don’t know (re string->rx).
<lisbeths>is it technologically possible to use guile as system shell
<unmatched-paren>lisbeths: yes, see https://git.savannah.gnu.org/cgit/guix.git/tree/guix/build/bournish.scm
<lisbeths>is it possible that one day there will be a gnu system that uses lisp instead of bash?
<unmatched-paren>Unlikely.
<unmatched-paren>Bash is used all over the place in a typical posix system.
***Furor is now known as Colere
<lilyp>"typical posix system" that is
<lilyp>while bash is indeed mandated by posix, there's no reason you couldn't do most stuff in lisp
<lilyp>in fact, guix already gets quite close to this
<lisbeths>there are a huge number of programs designed to be accessed in the shell via bash
<rekado>lisbeths: history knows scsh. Its remnants are still found in Guile.
<lisbeths>is it not possible to emmulate the syntax of bash with macros
<rekado>what you’re describing sounds merely like implementing bash in guile
<rekado>what would be the point?
<lisbeths>bash is sometimes the first language a new programmer learns and its a language almost every programmer eventually has to learn
<unmatched-paren>lisbeths: Bournish seems to be exactly that (though it's a tiny subset)
<rekado>there’s also gash
<rekado>which implements more than just bash
<rekado>it’s also some of the coreutils
<lisbeths>it would need to be at least as good as busybox sh
<lisbeths>but also with macros
<unmatched-paren>rekado: I don't think gash is a guile frontend, though; bournish is
<lisbeths>the original bash was written in one weekend. in my opinion it is a very poor and not very extensible language
<unmatched-paren>yeah, you're not wrong there
<unmatched-paren>I think it (sh) is probably worse than even Perl
<rekado>unmatched-paren: what do you mean by “guile frontend”?
<unmatched-paren>rekado: I mean something like --language=guile or --language=ecmascript
<unmatched-paren>that compiles to tree-il
<rekado>true
<lisbeths>in unix init was a shell script. the reason systemd had to be created was that shell scripts were no longer able to keep up with industrial boot and process management scripts
<rekado>unmatched-paren: but does this matter? Is there any advantage to implementing it as a language on top of the compiler tower?
<lilyp>performance, arity checking, ...
<rekado>I mean: an advantage for the *user*?
<lilyp>performance, arity checking, ...
<lisbeths>macros, systems level programming
<lilyp>I don't think you should d systems programming in sh variants.
<lisbeths>indeed!
<lisbeths>sh is not a suitable systems language
<lisbeths>it isnt exensible >.<
<rekado>scsh exists – it’s a scheme shell.
<rekado>why bother with sh syntax when you also say that it isn’t suitable?
<lisbeths>the original language ken thompson wanted to port to unix was fortran
<unmatched-paren>Thank goodness they didn't.
<lisbeths>sh syntax for backwards compatibility
<lilyp>that doesn't mean you have to write your irc client in fortran tho
<lisbeths>indeed just as we neednt script in sh
<lilyp>I think you misunderstand the value of scripting languages such as sh
<lisbeths>it is trash
<lilyp>it's not
<lilyp>it serves its purpose
<lilyp>I can't say that for much of the javascript ecosystem
<lilyp>or rust for that matter
<lisbeths>I will say php is worse than sh
<lisbeths>The point is to extend the shell
<lisbeths>The shell needs full syntax macros it just does
<unmatched-paren>why?
<lisbeths>because we can
<lilyp>I assure you it does not
<lisbeths>imagine the bugs
<lisbeths>back in the 1980s programmers were not ready for macros
<unmatched-paren>you use the shell for quick hacks; if you need to write a large project that would benefit from syntax extensions, you should not be using shell anyway
<unmatched-paren>lisbeths: eh?
<lisbeths>macros can be used to invent languages that can invent languages that can write one-liners
<lilyp>p sure lisp existed in the 80s
<unmatched-paren>I think CL was actually reasonably popular then, too, iirc?
<lisbeths>it was funded by the military via symbolics
<lisbeths>The military funding dried up because their AI program was not able to deliver an AGI
<lisbeths>when symbolics tanked the stock market became shy to invest in anything that used lisp
<rekado>if you want macros in shell you can use m4 and eval ;)
<lilyp>rekado offering galaxy brain solutions 🙃️
<unmatched-paren>if you want macros in the shell just use cpp
<unmatched-paren>no programs other than a C toolchain and the shell required, for minimal bloat!(tm)
<lilyp>tbf cpp as sh preprocessor does't even sound like that bad of an idea
<unmatched-paren>Compared to using m4.
<lilyp>well, not quite sure about that, but on its own merits
<lilyp>the intricacies of C tokens don't matter, so you can just #define STUFF REPLACEMENT and it'll probably be valid and easy to understand sh
***maximed is now known as antipode
***rgherdt_ is now known as rgherdt