ChanServ changed the topic of #crystal-lang to: The Crystal programming language | | Fund Crystal's development: | GH: | Docs: | Gitter:
richbridger has joined #crystal-lang
aquijoule_ has quit [Ping timeout: 256 seconds]
<raz> even as a former pythonista i'll never understand how that language became so popular. seems not everyone gets to the point where they realize what a mess it is :<
<raz> after a couple years i just couldn't deal with the wrecked dep management, the cryptic list comprehensions everywhere, the 2vs3 mess, weird metaclasses, the lack of symmetry and chaining and a slew of other things anymore. then ruby came along and life was good again.
<FromGitter> <djberg96> What's the proper way of temporarily shutting off stderr?
<FromGitter> <djberg96> I tried this, but crystal seems unhappy:
<FromGitter> <djberg96> ```code paste, see link``` []
<FromGitter> <djberg96> that runs, but stderr is still making it to the console
<FromGitter> <> why do you need to do that?
<FromGitter> <djberg96> because i don't want output generated, i just want to know if the command succeeded or not
<FromGitter> <> @djberg96 are u sure u don't want the log module? that one can be reconfigured very nicely
<FromGitter> <Blacksmoke16> also fwiw ⏎ ⏎ > Standard input, output and error are inherited.
<FromGitter> <> hold up lol that's an entirely different question
<FromGitter> <Blacksmoke16> if you use like `` or something you can set what each IO would be. i.e. `File::NULL`
<FromGitter> <Blacksmoke16> but yes, deff look into `Log` module for general logging stuff
<FromGitter> <> if you don't write to STDERR, nothing will be printed...
<raz> or, if you want pain,
<FromGitter> <djberg96> I'll look at, thanks
<FromGitter> <> it is definitely better than ticks
<raz> it's fun tho, i think it even works as long as you don't fork
<raz> i think crystal should provide a clean way to close, mute or capture stdout and stderr tho. sometimes you just really want to.
<raz> but strangely all languages i know make that painfully hard, crystal didn't invent that
<FromGitter> <> I don't know if it is really necessary
<raz> then you've never fought the righteous fight for clean logging™
<FromGitter> <> It is your program, you're supposed to know which is outputting to STDERR/STDOUT
<raz> those web frameworks always insist on printing random non-json things at random times
<raz> it is my program, but it's blacksmoke's shard :P
<FromGitter> <> this should be configurable
<FromGitter> <Blacksmoke16> it is
<FromGitter> <Blacksmoke16> well for the most part...
<FromGitter> <> if it use `Log`, it is
<FromGitter> <Blacksmoke16> it does
Human_G33k has joined #crystal-lang
<FromGitter> <> raz: no hack should be needed then ;)
Human_G33k has quit [Remote host closed the connection]
<raz> yup, that's what they all think
Human_G33k has joined #crystal-lang
* raz chuckes in compiler warnings, deprecation notices and puts from shards
<FromGitter> <Blacksmoke16> got a more specific example? only thing athean logs by default is the `matched route` thing and exceptions, where both can fairly easily disabled/altered
<raz> yea not in athena to be fair, at least not at the moment
<FromGitter> <Blacksmoke16> 👍
<FromGitter> <djberg96> anything wrong with this?
<FromGitter> <djberg96> ```code paste, see link``` []
<FromGitter> <Blacksmoke16> what are you expecting it to print?
<FromGitter> <> why do u rescue, an error can happen only if the file doesn't exist
<FromGitter> <djberg96> i'm not expecting it to print anything. Change command to "ls" and it returns true
<FromGitter> <Blacksmoke16> right because you set it to true before running the command?
<FromGitter> <Blacksmoke16> and it prints `false` since thats not an actual command name
<FromGitter> <Blacksmoke16> to be clear, output is only closed for that process's output, *NOT* the entire program
<FromGitter> <djberg96> good :)
<FromGitter> <djberg96> and the port of mkmf-lite is on its way :)
f1reflyylmao has joined #crystal-lang
f1refly has quit [Ping timeout: 258 seconds]
avane has quit [Quit: ZNC -]
avane has joined #crystal-lang
sz0 has quit [Ping timeout: 240 seconds]
r0bby has quit [Read error: Connection reset by peer]
sz0 has joined #crystal-lang
r0bby has joined #crystal-lang
asterite has quit [*.net *.split]
yxhuvud has quit [*.net *.split]
Flipez has quit [*.net *.split]
bougyman has quit [*.net *.split]
Stephie has quit [*.net *.split]
repo has quit [*.net *.split]
FromGitter has quit [*.net *.split]
yxhuvud has joined #crystal-lang
FromGitter has joined #crystal-lang
Stephie has joined #crystal-lang
asterite has joined #crystal-lang
bougyman has joined #crystal-lang
Flipez has joined #crystal-lang
repo has joined #crystal-lang
hamoko[m] has quit [Ping timeout: 246 seconds]
Human_G33k has quit [Ping timeout: 240 seconds]
HumanG33k has quit [Ping timeout: 265 seconds]
_ht has joined #crystal-lang
HumanG33k has joined #crystal-lang
Human_G33k has joined #crystal-lang
fifr_ has quit [Quit: ZNC 1.8.1 -]
fifr has joined #crystal-lang
f1reflyylmao is now known as f1refly
<FromGitter> <alexherbo2> can a command expect an argument with optionparser?
<FromGitter> <alexherbo2> I noticed command could not contain dashes `-` in their name
<FromGitter> <alexherbo2> `evaluate-commands` in not recognized
<FromGitter> <asterite> Try it in Ruby. If it works in Ruby it should work in Crystal. If it doesn't work it's a bug
<FromGitter> <roduquen> Hi guys, I found this issue, it is the first time I have this so I share, maybe I can have some info : ⏎ ⏎ ```code paste, see link``` []
<FromGitter> <asterite> Do have code to reproduce this?
<FromGitter> <asterite> You probably should open an issue, as the error says
sorcus has quit [Quit: WeeChat 3.0]
deavmi has quit [Ping timeout: 272 seconds]
deavmi has joined #crystal-lang
<FromGitter> <alexherbo2> the ruby optionparser does not handle named command, while crystal does
<FromGitter> <alexherbo2> `on("evaluate-command", "eval commands")`
<FromGitter> <asterite> oh, it's the command name... I guess it's a bug then
<FromGitter> <roduquen> Unreproductible in my env
<FromGitter> <roduquen> I already had the same problem because of kemal environment
<FromGitter> <roduquen> Not the same issue but the same problem of unreproductibility
deavmi has quit [Ping timeout: 264 seconds]
deavmi has joined #crystal-lang
Human_G33k has quit [Quit: Leaving]
_whitelogger has joined #crystal-lang
sorcus has joined #crystal-lang
<FromGitter> <> try to narrow the problem
<FromGitter> <> what commit did introduce this
<FromGitter> <> copy your whole program, and remove code chunks by chunks
ua_ has quit [Ping timeout: 264 seconds]
ua_ has joined #crystal-lang
ua_ has quit [Ping timeout: 264 seconds]
ua_ has joined #crystal-lang
_ht has quit [Remote host closed the connection]
deavmi has quit [Ping timeout: 265 seconds]
deavmi has joined #crystal-lang
deavmi has quit [Ping timeout: 272 seconds]
deavmi has joined #crystal-lang
deavmi has quit [Ping timeout: 272 seconds]