@typhlosion You're not a REAL terminal wizard until you do it in shell! :P
(just kidding of course, this is pretty sweet! 👍)
@IceWolf do you mean running it using sh, or writing a shell script to do it?
@typhlosion Shell script. How would running a C program in sh be any different than in bash? (:
@IceWolf i have no idea how ANSI escape sequences actually work, so if someone told me sh didn't properly support 24-bit color somehow, i wouldn't be surprised
@typhlosion Escape sequences are literally just strings of characters you print to stdout. It's the terminal that matters, you can do them from any language at all. :3
@typhlosion Thanks for being so upfront about it and letting me know. I'll do my best to not do that in the future.
@IceWolf 's all good
@typhlosion Thanks. Thank you so much. (:
@IceWolf turns out you can just printf at the command line so this isn't as much of a flex as i thought it would be
@typhlosion A...flex?
@IceWolf y'know, a boast, a showoffy move. i thought it would make me feel more like a terminal wizard! but it's basically just a condensed, somewhat worse version of the C code haha
@typhlosion Ah! Haha, yeah, I was completely kidding on that. C is more impressive in the first place. Shell is handy, but it's...quick and dirty. (:
@IceWolf the piece de resistance of the internals is
calc() { awk "BEGIN{ print $* }"; }
which i legit have in my .bashrc file at work, it's super useful
@typhlosion Using awk as a calculator? Huh, neat! I just use my shell, $(( )) and I can do floating-point math. Also, zcalc is really handy for when I need something more interactive. (:
@typhlosion (I'm using zsh, it is absolutely fantastic.)
@IceWolf oh, no one ever told me about $(( )), what the fuck
@typhlosion Isn't it great? :D
Keep in mind bash only supports integer math, though.
I actually used zsh to do integration approximation (Reimann sums) in Calculus II. :P
@IceWolf ahh, see, awk has some floating point stuff too. it also has atan2 which is especially useful at work
@typhlosion Cool, that sounds really nice!
@typhlosion Huh? Oh, that wasn't my intention at all! I'm so sorry. ):