Maja changed the topic of ##bash-crimes to: we bash back | club of folks preoccupied in whether they could, not whether they should | logs https://libera.irclog.whitequark.org/~h~bash-crimes
<spiderella> it's just slow on everything tbh
<spiderella> i recommend trying to execute brainfuck in bash in whatever way, and trying to run the famous mandelbrot.b
<spiderella> you'll learn soooo much
<spiderella> for instance did you know that bash re-parses every math expression every time? so removing spaces and using shorter variable names makes a significant impact in (( ))
<spiderella> also mandelbrot.b requires a lot of memory cells and you'll definitely hate how bash does arrays work
_catircservices has joined ##bash-crimes
whitequark[cis] has joined ##bash-crimes
<whitequark[cis]> test
<whitequark[cis]> ok, this is now bridged to #bash-crimes:catircservices.org
<whitequark[cis]> on matrix
<Maja> whitequark[cis]: thx
<Maja> spiderella: fun fact: if you have multiple (( )) in a row, it's much more performance to do (( a=b, c=d, e=f )) instead
whitequark[cis]1 has joined ##bash-crimes
<whitequark[cis]1> @meithecatte:badat.dev has admin rights to the matrix room, i can drop mine so i don't need them anymore, or i can keep them for the purpose of unfucking the room if it gets fucked somehow
<whitequark[cis]1> s/so/since/
<Maja> whitequark[cis]: we don't mind you keeping the admin rights
<whitequark[cis]1> okay, i'll retain them then
<whitequark[cis]1> if you op _catircservices you will then be able to change the topic via matrix, which can be convenient
<whitequark[cis]1> if you don't op it, you'll be able to have two different topics
<whitequark[cis]1> not sure if it will synchronize them IRC->Matrix but I think no, or maybe I'll need to clear the topic on the Matrix side first
whitequark[cis]1 has quit [Client Quit]
whitequark[cis]1 has joined ##bash-crimes
whitequark[cis] has quit [Quit: issued !quit command]
whitequark[cis]1 has quit [Client Quit]
whitequark[cis]1 has joined ##bash-crimes
whitequark[cis]1 has quit [Client Quit]
whitequark[cis]1 has joined ##bash-crimes
whitequark[cis]1 is now known as whitequark[cis]
<whitequark[cis]> okay, i think that's all! have fun
<spiderella> try PRINT= ./bf examples/mandelbrot.b
<spiderella> Fancy
<spiderella> As a result, certain C features are not supported, this includes:
<spiderella> • goto and switch case fall-through: The shell doesn’t have a direct way to implement this kind of control flow, and supporting it would require transformations that would diminish its readability.
<spiderella> • The address of (&) operator on local variables. Supporting this would prevent the direct mapping of C local variables to shell variables.
<spiderella> • Floating point numbers: Floating point numbers are not supported natively by the shell and would require a large amount of code to implement fully (recall that making use of external programs such as the Unix bc is forbidden by our design constraints).
<spiderella> sad
<spiderella> that's a lot
<spiderella> like & really
<Maja> > switch case fall-through: The shell doesn’t have a direct way to implement this kind of control flow
<Maja> bullshit
<Maja> end your case with ;& to fallthrough
<Maja> foo() { case "$1" in a) echo a ;& b) echo b ;; c) echo c ;; esac }
<Maja> do they support Duff's device?
<Maja> <- this bitch read the Bash reference manual
<JAA> ;& and ;;& are really neat.
<JAA> I always have to look up which is which though.
<Maja> single ; is like a separator between commands. so it'll go straight to the commands of the next case
<Maja> double ;; is a separator between cases, so it'll go back to matching other options
<JAA> Hmm, not bad, let's see if I can remember this until next time I need it. :-)
<spiderella> posix shell doesn't have ;&
<JAA> 💩SIX sh sucks. :-)