<FromGitter>
<Souravgoswami> But \e[38;2;r;g;bm should print the desired colour
<FromGitter>
<Souravgoswami> I am not compiling it though, I am running the program like a script once to test
<FromGitter>
<grkek> Open an issue on the issue page :)
<FromGitter>
<Souravgoswami> Umm is that worth it? Small stuffs 😂
<FromGitter>
<grkek> Yes it is, since it is an issue and it made your terminal feel sad
<FromGitter>
<Souravgoswami> Ok! Will do!
<FromGitter>
<HertzDevil> yeah of course the 16-color palette depends on your terminal
<FromGitter>
<HertzDevil> use `Colorize::ColorRGB` to construct the \e[38;2 sequence
<FromGitter>
<Souravgoswami> Yup that will be cleaner... But there's a problem... But it won't work on TTY. In a project of mine, I used to check if it's a colour term or not: ⏎ ⏎ CLEAR = COLOURTERM ? "\e[3J\e[H\e[2J" : "\e[H" ⏎ ⏎ Then the clear sequence changes. Similarly we have to do that with crystal too... [https://gitter.im/crystal-lang/crystal?at=5f93e64f3d172d78b39553b7]
<FromGitter>
<HertzDevil> that's a terminal problem not crystal's problem
<FromGitter>
<Souravgoswami> Yup
issyl0 has quit [Ping timeout: 272 seconds]
<FromGitter>
<HertzDevil> from what i see you have to do the same in ruby anyway
<FromGitter>
<HertzDevil> that requires crystal stdlib to assume a canonical rgb palette for the ansi colors
<oprypin>
Souravgoswami, the real question is, why did you configure your terminal to have wrong colors
<FromGitter>
<Souravgoswami> It can be. The light red can be dark red in other schemes. It's built into terminals. There are various schemes like Dark Pastel, Tango, Green on Black, Solarized light, Solarized dark, White on black, etc.
<oprypin>
yea so what's the problem?
<FromGitter>
<Souravgoswami> Not really an big issue TBH... Just saying
<oprypin>
i dont want any tool to be able to use actual "light red"
<oprypin>
then i couldnt see it on white
<oprypin>
it is actually called "intense red". and i'll make a choice about it, thanks
<FromGitter>
<Souravgoswami> Thank you, too!
zorp has joined #crystal-lang
zorp has quit [Remote host closed the connection]
zorp has joined #crystal-lang
zorp has quit [Ping timeout: 260 seconds]
<FromGitter>
<j8r> How can I sort a Hash alphabetically?
<FromGitter>
<j8r> I guess I have to use an intermediary Array?
<FromGitter>
<Blacksmoke16> yes
<FromGitter>
<Blacksmoke16> hash is sorted via insertion order, so would need to create a new hahs
<FromGitter>
<j8r> so, can be removed from your PR - and added a monthly cron now
<FromGitter>
<j8r> I'm glad to have achieved declarative CLI without all this macros hell: https://github.com/j8r/clicr. ⏎ There are little quirks, notably for the action method or composing options/commands, but overall it's worth it
<FromGitter>
<j8r> really too bad we can't have named arguments for procs :(
<FromGitter>
<Blacksmoke16> <3 thanks, will do
<FromGitter>
<j8r> Not sure if having casting is a good idea...
<FromGitter>
<j8r> not fan of their usage section (in the --help), though
<FromGitter>
<Blacksmoke16> apparently thats what symfony CLI component is based on
<FromGitter>
<Blacksmoke16> i dont mind it, shows all possible commands and what args they take etc
<raz>
wow yea that looks cool
<FromGitter>
<Blacksmoke16> also says it *can* have multiple patterns, idt its required
<raz>
that screen would get a little crazy tho if you have many sub-commands / combinations
<raz>
then again... any CLI impl gets crazy when you have many of those
<FromGitter>
<Blacksmoke16> i imagine its more for an example to show combinations of things
<raz>
probably a puzzle game to find the right combo to get what you actually want
<FromGitter>
<Blacksmoke16> i have plans to add a console component to Athena, *not* to be used to make CLI applications, but moreso for creating an internal CLI API for your applicaiton
<FromGitter>
<j8r> I prefer having a COMMANDS section
<FromGitter>
<j8r> à la docker, even busybox has a single-line Usage (or few lines)
<raz>
mine has that t.ly/u8mx
<raz>
but i'm too lazy to port that to crystal
<FromGitter>
<Blacksmoke16> oh wait, hold up
<FromGitter>
<Blacksmoke16> its used to generate the parser based on the docs
<FromGitter>
<Blacksmoke16> not generate the docs based on the parser
<FromGitter>
<Blacksmoke16> > docopt parses command-line arguments based on a help message. Don't write parser code: a good help message already has all the necessary information in it.
<raz>
yup, the idea is awesome
<raz>
i just wonder how well it works
<raz>
but given how many impls it has, some people seem to like it
<FromGitter>
<Blacksmoke16> and prob on the specific lang's implementation
<raz>
yup
<raz>
someone should make one for crystal to see how it goes :p
<FromGitter>
<j8r> dunno, I don't imagine a huge cli like Docker using this
<FromGitter>
<Blacksmoke16> i mean prob not, but seems pretty slick for just getting something working quickly
<FromGitter>
<Blacksmoke16> depending on the complexity if it
<raz>
i could see it being useful *especially* for go-lang
<raz>
i don't even wanna know how much boilerplate their cli code has
<raz>
they could probably trim >10k lines if they used docopt
<FromGitter>
<j8r> it is this ergnomic to write a help string?
<FromGitter>
<j8r> this means to indent and sort manually?