faustinoaq has quit [Quit: IRC client terminated!]
faustinoaq has joined #crystal-lang
<FromGitter>
<sdogruyol> do we really use `===` operator
<FromGitter>
<Rinkana> `===` is used in `case..when` blocks
<FromGitter>
<sdogruyol> yeah, I mean...other than that is there any practical usage?
<FromGitter>
<Rinkana> Nope
<FromGitter>
<Rinkana> Afaik it's acually discouraged to use
_4d47 has joined #crystal-lang
<FromGitter>
<Rinkana> As it's meant to only be used for `case..when` blocks
<RX14>
it shouldn't be called ===
<RX14>
it should be cauused case_compare
<RX14>
to be ugly
<RX14>
and ensure it's only used in case
<RX14>
and that it's meaning is clear
<RX14>
(imo)
<_4d47>
Why does init generate `src/$app/version.cr` ? (I'm not coming from ruby)
<FromGitter>
<sdogruyol> it does
<FromGitter>
<sdogruyol> not as version.cr
<FromGitter>
<sdogruyol> oh sorr
<FromGitter>
<sdogruyol> it actually generates `src/app_name/version.cr`
<FromGitter>
<sdogruyol> how did you try?
<FromGitter>
<bew> You didn't get his question did you?
<FromGitter>
<bew> He's asking why
<FromGitter>
<bew> There is this file that is being generated
<FromGitter>
<sdogruyol> I shouldn't try to answer while multitasking..
<FromGitter>
<bew> Ahaha
<FromGitter>
<sdogruyol> thanks @bew
<_4d47>
yes wondering why it's useful etc? i'm not used to add version in code, eg. its already in shard.yml anyway
<FromGitter>
<bew> How would you implement `your_app --version` of you can't access the version from code?
<FromGitter>
<bew> s/of/if
<_4d47>
add constant to src/app.cr ?
<FromGitter>
<bew> Well that what this file contains basically
<FromGitter>
<bew> Just that it's in a separate file
<FromGitter>
<bew> That can be handy if you have a tool to increment the app version on demand (@elorest did one iirc), it can update the shards.yml and the version in its file (no need to specify the file contaning the version, it's already in a co sistent place between projects)
<_4d47>
puts {{ `grep version shard.yml`.stringify.chomp }}
faustinoaq has quit [Ping timeout: 240 seconds]
<FromGitter>
<bew> More difficult to do that for a library
<FromGitter>
<bew> As you don't know where its shard.yml os
<_4d47>
i have no luck, trying to compile 0.7.2 to update (i have 0.7.1) and error in src/spec.cr:76: undefined method 'location' for YAML::PullParser
<FromGitter>
<luislavena> @_4d47: you might be trying to compile master. I recommend you checkout the specific tag and compile with latest stable version of Crystal.
<FromGitter>
<luislavena> For master you need 0.24 and for 0.7.2 you need 0.23.1 if not mistaken.
<_4d47>
no download tar.gz
<_4d47>
shards-0.7.2.tar.gz
<FromGitter>
<luislavena> From release notes: Compatibility with Crystal 0.24.0 (unreleased) -- this means 0.7.2 requires Crystal 0.24.0
<_4d47>
ok right will update crystal
<FromGitter>
<codenoid> okay
snsei has joined #crystal-lang
alex`` has quit [Quit: WeeChat 1.9.1]
<_4d47>
not sure why crystal --version is now 0.23.0 ea4187c57 (was 0.23.1) but shards built successfully :)
DTZUZO has joined #crystal-lang
Papierkorb_ has quit [Quit: Konversation terminated!]
rohitpaulk has quit [Ping timeout: 255 seconds]
bmcginty has quit [Ping timeout: 255 seconds]
_4d47 has quit [Quit: Leaving]
Ven`` has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<FromGitter>
<jwaldrip> So then how can I get out of the block?
<Papierkorb>
return
<Papierkorb>
though honestly, while done with good intentions, this is kinda annoying: Break should always get out of a block, in case of a caught one, return. Return, if not possible, should simply error.