RX14 changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.21.0 | Fund Crystal's development: http://is.gd/X7PRtI | Paste > 3 lines of text to https://gist.github.com | GH: https://github.com/crystal-lang/crystal | Docs: http://crystal-lang.org/docs/ | API: http://crystal-lang.org/api/ | Logs: http://irclog.whitequark.org/crystal-lang
no0p has joined #crystal-lang
no0p has quit [Quit: Leaving]
A124 has quit [Quit: '']
A124 has joined #crystal-lang
<FromGitter> <drosehn> @jwoertink - your original tactic would work, but the common-method needs to be *named* `initialize` instead of `setup`. Consider issue #3334 , starting at the response I made on Oct 13, 2016.
<DeBot> https://github.com/crystal-lang/crystal/issues/3334 (Ivar type guesser is over ambitious (should _only_ guess types))
VectorGraphics has joined #crystal-lang
pawnbox has quit [Ping timeout: 264 seconds]
pawnbox has joined #crystal-lang
mgarciaisaia has joined #crystal-lang
bungoman has joined #crystal-lang
mgarciaisaia has quit [Read error: Connection reset by peer]
mgarciaisaia has joined #crystal-lang
_whitelogger has joined #crystal-lang
pawnbox has quit [Ping timeout: 260 seconds]
mgarciaisaia has quit [Quit: Leaving.]
pawnbox has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
_whitelogger has joined #crystal-lang
soveran has joined #crystal-lang
soveran has joined #crystal-lang
soveran has quit [Changing host]
chatter29 has joined #crystal-lang
<chatter29> hey guys
<chatter29> allah is doing
<chatter29> sun is not doing allah is doing
<chatter29> to accept islam say that i bear witness that there is no deity worthy of worship except allah and muhammad peace be upon him is his slave and messenger
<VectorGraphics> Does allah prefer tabs or spaces?
Philpax__ has joined #crystal-lang
Philpax_ has quit [Ping timeout: 246 seconds]
VectorGraphics has quit [Quit: Leaving]
chatter29 has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
Qchmqs has joined #crystal-lang
qchmqs_ has joined #crystal-lang
Qchmqs has quit [Ping timeout: 240 seconds]
olek_poz has joined #crystal-lang
Philpax__ has quit [Ping timeout: 260 seconds]
qchmqs_ has quit [Quit: Konversation terminated!]
<Yxhvd> Beats me, but in crystal the preferred format is what the built in formatter prefers.
Qchmqs has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
pawnbox has quit [Ping timeout: 260 seconds]
<FromGitter> <tekjar> Lol..Woww..Religious spam on a programming language forum..Never seen this before
<FromGitter> <tekjar> Anyway
<FromGitter> <tekjar> I'm trying to write unit tests to my library.. How do I specify exceptions in `spec`?
soveran has quit [Remote host closed the connection]
soveran has joined #crystal-lang
soveran has quit [Ping timeout: 256 seconds]
BlaXpirit has quit [Quit: Bye]
BlaXpirit_ is now known as BlaXpirit
soveran has joined #crystal-lang
soveran has joined #crystal-lang
soveran has quit [Changing host]
olek_poz has quit [Read error: Connection reset by peer]
mark_66 has joined #crystal-lang
<FromGitter> <tekjar> BlaXpirit: Thanks
bjz has joined #crystal-lang
<FromGitter> <tekjar> Hi. How do I create enum which raises exception for invalid values?
pawnbox has joined #crystal-lang
j2k has joined #crystal-lang
j2k has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
olek_poz has joined #crystal-lang
j2k has joined #crystal-lang
gloscombe has joined #crystal-lang
j2k has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Raimondii has joined #crystal-lang
gloscombe has quit [Ping timeout: 256 seconds]
jabb has quit [Ping timeout: 260 seconds]
Raimondi has quit [Ping timeout: 268 seconds]
Raimondii is now known as Raimondi
gloscombe has joined #crystal-lang
Gk-1wm-su has joined #crystal-lang
Gk-1wm-su has quit [Excess Flood]
<FromGitter> <lhz> @tekjar: If you have an enum `Foo`, you can do `Foo.from_value(i)`
soveran has quit [Remote host closed the connection]
<FromGitter> <tekjar> @lhz But I want it to return a custom exception
<FromGitter> <lhz> @tekjar: wrap it in a begin/rescue/end and raise your custom exception in the rescue block
<FromGitter> <tekjar> @lhz Cool Thanks. So it's not possible to call `QoS.from_num` method (the one in the example link)
<FromGitter> <tekjar> ?
<FromGitter> <lhz> @tekjar: Can't see the code anymore, but as long as you define it as a class method `def self.from_num` it should work to just add a rescue in there to raise a custom exception.
<FromGitter> <tekjar> @lhz Ohh. Ok. Thanks alot :)
bjz_ has joined #crystal-lang
bjz has quit [Ping timeout: 240 seconds]
soveran has joined #crystal-lang
soveran has joined #crystal-lang
soveran has quit [Changing host]
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
bew78 has joined #crystal-lang
<bew78> How can I set the i_know_what_im_doing flag ?
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
<shelvacu> crystal build -D i_know_what_im_doing file.cr
sz0 has joined #crystal-lang
bjz has joined #crystal-lang
bjz_ has quit [Ping timeout: 246 seconds]
bjz has quit [Read error: Connection reset by peer]
bjz has joined #crystal-lang
gloscombe has quit [Quit: leaving]
gloscombe has joined #crystal-lang
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
pawnbox has quit [Ping timeout: 256 seconds]
<bew78> ah ok, I can't do that from the sources (via a macro) ?
<crystal-gh> [crystal] bcardiff pushed 1 new commit to master: https://git.io/vy4OA
<crystal-gh> crystal/master fab030c Brian J. Cardiff: Playground: refactor instrumentation to allow specs (#4061)...
Qchmqs has quit [Ping timeout: 256 seconds]
pawnbox has joined #crystal-lang
jabb has joined #crystal-lang
mgarciaisaia has joined #crystal-lang
pawnbox has quit [Ping timeout: 246 seconds]
pawnbox has joined #crystal-lang
olek_poz has quit [Ping timeout: 240 seconds]
<FromGitter> <tekjar> Hi. I'm facing a weird issue in my unit tests which encodes/decodes mqtt packets
<FromGitter> <tekjar> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=58bd849ade5049082251aff6]
<FromGitter> <tekjar> Is this unit test expecting deep comparsion?
<FromGitter> <tekjar> Some other unit tests are passing while comparing structs
sz0 has quit [Quit: Connection closed for inactivity]
mark_66 has quit [Remote host closed the connection]
<FromGitter> <tekjar> But the example in `play` is working fine
<FromGitter> <tekjar> I'm doing something weird and unit tests here aren't giving proper feedback
mgarciaisaia has quit [Quit: Leaving.]
mgarciaisaia has joined #crystal-lang
mgarciaisaia has quit [Client Quit]
j2k has joined #crystal-lang
olek_poz has joined #crystal-lang
j2k has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<travis-ci> crystal-lang/crystal#fab030c (master - Playground: refactor instrumentation to allow specs (#4061)): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/208235148
<DeBot> https://github.com/crystal-lang/crystal/pull/4061 (Improve playground specs)
pawnbox has quit [Remote host closed the connection]
soveran has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
<FromGitter> <jwoertink> Thanks @drosehn I originally was using the calling initialize internally, but it was pointed out by someone else that it felt weird to do that. I personally don't have a strong opinion either way so I'm all open to suggestions about implementation
mgarciaisaia has joined #crystal-lang
<FromGitter> <drosehn> Well in the discussion I linked to, asterite followed up to say that tactic seemed fine to him, and he provided an `initialize`-based solution which looked nicer than the one I suggested. :smile:
<FromGitter> <jwoertink> yeah. He was the one that gave me the original suggestion a while back. I guess as long as there's no weird internal backfires from implementing like that, then it's safe
<FromGitter> <drosehn> I think we can trust asterite that this will continue to work okay! :smiley:
<FromGitter> <jwoertink> haha :D
<FromGitter> <lhz> Trying to run the sdl samples but getting the following error, any ideas? ⏎ ⏎ ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=58bd991ade50490822523804]
<FromGitter> <lhz> This is on Ubuntu 16.04.1, I have the sdl(-dev) packages installed.
<FromGitter> <lhz> Suspect it could be because the library is installed under `/usr/lib/x86_64-linux-gnu` while the cc command contains only `-L/usr/lib -L/usr/local/lib`, but don't know how to make it look elsewhere.
<crystal-gh> [crystal] asterite pushed 1 new commit to master: https://git.io/vy4Vh
<crystal-gh> crystal/master 3c6c75e Ary Borenszweig: Updated Changelog
bew78 has quit [Quit: WeeChat 1.7]
soveran has joined #crystal-lang
Ven has quit [Ping timeout: 260 seconds]
Ven has joined #crystal-lang
<FromGitter> <jwoertink> @lhz You could try out https://github.com/ysbaddaden/sdl.cr and see if that runs.
gloscombe has quit [Quit: Lost terminal]
Ven has quit [Ping timeout: 240 seconds]
Ven has joined #crystal-lang
j2k has joined #crystal-lang
j2k has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jabb has quit [Ping timeout: 268 seconds]
<travis-ci> crystal-lang/crystal#3c6c75e (master - Updated Changelog): The build was broken. https://travis-ci.org/crystal-lang/crystal/builds/208278490
splitty_ has quit [Quit: Leaving]
splitty_ has joined #crystal-lang
<travis-ci> crystal-lang/crystal#3c6c75e (master - Updated Changelog): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/208278490
bjz has joined #crystal-lang
Ven has quit [Ping timeout: 240 seconds]
Ven has joined #crystal-lang
soveran has quit [Remote host closed the connection]
soveran has joined #crystal-lang
mgarciaisaia has left #crystal-lang [#crystal-lang]
Ven has quit [Ping timeout: 260 seconds]
Ven has joined #crystal-lang
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Ven has quit [Ping timeout: 260 seconds]
Ven has joined #crystal-lang
jabb has joined #crystal-lang
olek_poz has quit [Ping timeout: 260 seconds]
Liothen has quit [*.net *.split]
Liothen has joined #crystal-lang
Ven has quit [Ping timeout: 260 seconds]
Ven has joined #crystal-lang
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
alxnlssn has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
soveran has quit [Remote host closed the connection]
<FromGitter> <ltran> I'm trying to save Time.now and using that value to calculate some timings later. But I noticed if I save current_time = Time.now, current_time will a different value later. Anyway to get the time for the moment of time?
olek_poz has joined #crystal-lang
soveran has joined #crystal-lang
soveran has quit [Changing host]
soveran has joined #crystal-lang
genericpenguin has joined #crystal-lang
genericpenguin has quit [Client Quit]
<Papierkorb> ltran, `current_time` won't change by itself
<FromGitter> <ltran> maybe it is because I'm using it inside icr? ```
<FromGitter> <ltran> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=58bde9b2872fc8ce62c5f4ef]
<Papierkorb> Yes, icr fakes a repl by saving all input into a temporary .cr file and rerunning it after each hit on enter
<FromGitter> <ltran> ah haha okay cool Thanks! =) good to know
<FromGitter> <ltran> Was going crazy for a while.
<Papierkorb> I'm working on a "real" REPL, but don't hold your breath just yet. Doesn't help that I'm pausing it for a few days ;)
soveran has quit [Remote host closed the connection]
<FromGitter> <jwoertink> lol. That's a horrible bug in ICR. @ltran You want to submit an issue for that? I can take a look in to it
<FromGitter> <ltran> Ya sure no problem. ⏎ @jwoertink done. https://github.com/greyblake/crystal-icr/issues/43
<FromGitter> <jwoertink> :thumbsup: