ChanServ changed the topic of #crystal-lang to: The Crystal programming language | https://crystal-lang.org | Fund Crystal's development: https://crystal-lang.org/sponsors | GH: https://github.com/crystal-lang/crystal | Docs: https://crystal-lang.org/docs | Gitter: https://gitter.im/crystal-lang/crystal
SamantazFox has quit [Ping timeout: 256 seconds]
ur5us has joined #crystal-lang
SamantazFox has joined #crystal-lang
notzmv has joined #crystal-lang
ur5us has quit [Ping timeout: 240 seconds]
ur5us has joined #crystal-lang
ur5us_ has joined #crystal-lang
ur5us has quit [Ping timeout: 240 seconds]
SamantazFox has quit [Ping timeout: 240 seconds]
notzmv has quit [Ping timeout: 240 seconds]
debayer948 has joined #crystal-lang
debayer948 has quit [Quit: The Lounge - https://thelounge.chat]
ur5us_ has quit [Quit: Leaving]
notzmv has joined #crystal-lang
debayer948 has joined #crystal-lang
debayer948 has quit [Quit: The Lounge - https://thelounge.chat]
debayer948 has joined #crystal-lang
ur5us has joined #crystal-lang
ur5us has quit [Ping timeout: 240 seconds]
debayer948 has quit [Quit: The Lounge - https://thelounge.chat]
Guest49 has joined #crystal-lang
<FromGitter> <jrei:matrix.org> Maybe your JSON is malformed then
<FromGitter> <jrei:matrix.org> You can also try to parse it elsewhere to see if it is specific to Crystal
Guest49 has quit [Ping timeout: 256 seconds]
<FromGitter> <charger> Hi, how I can tell compiler that variable is not Nil? ⏎ ⏎ ```code paste, see link``` ⏎ ⏎ Looks like it don't work. [https://gitter.im/crystal-lang/crystal?at=61e41eb02a210c38c1cf7db3]
<mikko> since you're parsing something you probably want to handle nil explicitly with "if new_value.nil?" rather than causing runtime error with .not_nil!, that said i think .not_nil! should work too
<mikko> unless that bit of code is in global scope? then it could technically become null between those two lines
<FromGitter> <charger> This value is parsed from CLI argument. I just exit if it nil.
<FromGitter> <charger> This is confuses me, why I can't coerce the variable to type `UInt8`? Even if I checked ⏎ ⏎ ```code paste, see link``` ⏎ ⏎ why?! [https://gitter.im/crystal-lang/crystal?at=61e4292c5ee4df335ae9aad1]
<mikko> does wrapping all that in a function fix it? i think what's happening is global variables could in theory be modified by another thread between the two statements
<FromGitter> <charger> In the function it works as expected. cool, thank you!
<FromGitter> <Blacksmoke16> mikko: `as` isn't used for casting a value from one type to another. its mainly used to specify that a virtual/parent type, or a union, is a specific child/member of that union.
<FromGitter> <Blacksmoke16> you prob want to use `.to_u8`
<FromGitter> <Blacksmoke16> if that still doesnt work, would want to do like `if v = new_value` then `v.to_u8`
<FromGitter> <spTorin> Trying to use `"compress/zip"` and `Compress::Zip::File.open(file)` with big archive (20 Gb) - get error: ⏎ ⏎ ```code paste, see link``` ⏎ ⏎ Zip archive is good and can be uncompressed with `unzip` - holding one file with 120 Gb size. ... [https://gitter.im/crystal-lang/crystal?at=61e45f3682a4667b257c18d4]
<FromGitter> <Blacksmoke16> `Compress::Zip` doesnt support zip64 which might be required for an archive that large
<FromGitter> <Blacksmoke16> is required*
SamantazFox has joined #crystal-lang
ur5us has joined #crystal-lang