<kodo[m]>
Is there a way to force a struct to return falsy?
<kodo[m]>
if foo = Thing.something and if Error then falsy
<kodo[m]>
rather than just turning a nil on failure. my pet peeve with that is you never know why operation failed if you just return nil
<FromGitter>
<fridgerator> raise an error?
<FromGitter>
<fridgerator> / exception
<kodo[m]>
meh I'm not a fan of exception handling
<kodo[m]>
heh
<kodo[m]>
> A contrasting view on the safety of exception handling was given by C.A.R Hoare in 1980, describing the Ada programming language as having "...a plethora of features and notational conventions, many of them unnecessary and some of them, like exception handling, even dangerous. [...] Do not allow this language in its present state to be used in applications where reliability is critical[...]. The next rocket to go
<kodo[m]>
astray as a result of a programming language error may not be an exploratory space rocket on a harmless trip to Venus: It may be a nuclear warhead exploding over one of our own cities." [14]
<kodo[m]>
I tried doing something like `if foo = Something.thing && foo.class != Error` but it complains about using variable name inside assignment
<kodo[m]>
I guess I can just put the assignment on the line above the conditional
<kodo[m]>
would be cool to have some assignment/conditional paradigm though
<FromGitter>
<mjago> hmmm its not SDL_Mixer is it? (I’m not familiar with SDL)
<FromGitter>
<jwoertink> SDL_Mixer is the 1.0 version. I have 2.0 installed through `brew install sdl2_mixer` which also requires a bunch of options for support with flac, mp3, etc...
<FromGitter>
<mjago> might still use SDL_mixer for object file names - worth a try
<FromGitter>
<mjago> *name
<FromGitter>
<jwoertink> `ld: library not found for -lSDL_mixer`
<FromGitter>
<mjago> there are references to ```SDL::Mixer``` in there
<FromGitter>
<jwoertink> yup. Everything else seems ok. It's just that one line that borks it
Raimondi has joined #crystal-lang
<kodo[m]>
Is there a way to get line number for logger?
A124 has quit [Ping timeout: 240 seconds]
snsei has quit [Remote host closed the connection]
<crystal-gh>
[crystal] bcardiff opened pull request #4208: Allow Iterator.stop to be used inside Iterator.of block (master...fix/iterator-of-stop) https://git.io/vS3JB
<jhass>
so we can no longer pass nil in place of a null pointer?
<jhass>
nvm something else is broken
olek_poz has joined #crystal-lang
mark_66 has joined #crystal-lang
Qchmqs has joined #crystal-lang
bjz has joined #crystal-lang
Raimondi has quit [Remote host closed the connection]
Raimondi has joined #crystal-lang
olek_poz has quit [Ping timeout: 260 seconds]
gloscombe has joined #crystal-lang
olek_poz has joined #crystal-lang
gewo has joined #crystal-lang
gloscomb1 has joined #crystal-lang
bjz_ has joined #crystal-lang
bjz has quit [Ping timeout: 268 seconds]
splitty_ has quit [Ping timeout: 260 seconds]
splitty_ has joined #crystal-lang
<crystal-gh>
[crystal] huacnlee opened pull request #4210: Add `HTTP::Client.put_form`, same as post_form. (master...feature/http-client-put-form) https://git.io/vS3Pb
<crystal-gh>
[crystal] huacnlee closed pull request #4210: Add `HTTP::Client.put_form`, same as post_form. (master...feature/http-client-put-form) https://git.io/vS3Pb
<FromGitter>
<samueleaton> I'll just leave this here. 👍 ://stackoverflow.com/questions/43100378/how-to-modify-the-httpresponse-after-it-has-been-written-to
<vegai_>
I'm swimming in this thing for the first time, and I'm a bit confused on how to make arbitrary projects (like Crystal) see all the libs Nix has hidden in non-fhs places
<FromGitter>
<crisward> @samueleaton I asked this a while ago, I wanted to write middleware which modified the output. However I was told that the output is write only because it's a pipe - so it would need to buffered to be modifiable and I believe it's streamed, though I could be wrong.
bjz has joined #crystal-lang
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
kragniz has quit [Ping timeout: 258 seconds]
kragniz has joined #crystal-lang
bjz has joined #crystal-lang
olek_poz has joined #crystal-lang
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bjz has joined #crystal-lang
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
fazibear has joined #crystal-lang
dzv has quit [Ping timeout: 258 seconds]
dzv has joined #crystal-lang
<FromGitter>
<N0r1x> Hey hello, I'm trying to use the tcp socket standard library class and the << operator doesn't quite work like I think it would (i.e like the cout << thing in c++): I'm making a irc-client for fun and I get a response from the server if I use puts <String> but not with the << operator
<FromGitter>
<N0r1x> Is this me being an idiot and not getting it (quite likely) or is there something wrong? If it's me being an idiot I could maybe add a more detailed doc
<FromGitter>
<fridgerator> would help if I could, but i'm not familiar