@typhlosion Noice! You know more than me then, I just know how to make pretty colors and clear to the end of the line. :3
@typhlosion It's fantastic! A veritable playground of text arrangement! :D
@typhlosion when you're working on unbuffered keyboard input, if you have any questions about termios(3) I might be able to help, please feel free to ask 😁
@typhlosion (looks like the main problem is repl.it chokes on non-ascii characters in program output? also their terminal doesnt support true color mode, so it's using the nearest color from what i assume is xterm's 256 color palette instead)
@typhlosion (terminal codes are hella cool though, its 2019 and i fucking love text based user interfaces)
@bossposs fuck yeah
like i said, once i master raw input im gonna make some horrible nonsense and no one can stop me
@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 Basically all that's special about them is the terminal sees it, goes "oh, it's an escape sequence", and does things.
@IceWolf i kind of feel like you're talking down to me and i dont really appreciate it
@typhlosion Huh? Oh, that wasn't my intention at all! I'm so sorry. ):
@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 i mean i know that much, but everything about computers is slightly more arcane than it needs to be, so i have learned to be suspicious always
@typhlosion !!! That's so cool!
https://repl.it/@Kasran/colortest if anyone wants to inspect this code (do note that it emphatically doesn't work properly when you try to run it from repl.it, at least not for me)