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
<FromGitter> <Blacksmoke16> https://play.crystal-lang.org/#/r/b3cs 🤔
<FromGitter> <Blacksmoke16> breaks the formatter, but also compiles somehow lol
<FromGitter> <Blacksmoke16> (notice the missing `,`)
<FromGitter> <tenebrousedge> yeah that's odd
<FromGitter> <Blacksmoke16> ill file some bugs for it
<FromGitter> <tenebrousedge> you always find the fun ones
<FromGitter> <Blacksmoke16> apparently so :P
chachasmooth has quit [Ping timeout: 260 seconds]
chachasmooth has joined #crystal-lang
HumanG33k has quit [Ping timeout: 240 seconds]
HumanG33k has joined #crystal-lang
_ht has joined #crystal-lang
hendursaga has quit [Ping timeout: 240 seconds]
hendursaga has joined #crystal-lang
vasanth has joined #crystal-lang
alexherbo2 has joined #crystal-lang
deavmi has quit [Quit: Eish! Load shedding.]
deavmi has joined #crystal-lang
alexherbo2 has quit [Ping timeout: 246 seconds]
alexherbo2 has joined #crystal-lang
vasanth has quit [Remote host closed the connection]
alexherbo2 has quit [Ping timeout: 246 seconds]
<FromGitter> <Blacksmoke16> https://play.crystal-lang.org/#/r/b3o1 does this not boil down to a `Bool`?
<FromGitter> <naqvis> nope, shouldn't be
<FromGitter> <Blacksmoke16> guess im just used to other langs boiling that down based on the truthiness of the value
<FromGitter> <naqvis> Crystal also have implicit truthiness
<FromGitter> <naqvis> so following the Crystal bool algebra `true && ""` is going to return blank string `""`
<FromGitter> <naqvis> that's why you are receiving that compiler error
<FromGitter> <Blacksmoke16> makes sense, but i guess i was thinking it would be equivalent to like `true && true`
<FromGitter> <naqvis> and I assume you were expecting to have logical operation
<FromGitter> <naqvis> then you should do `true && "".blank?`
<FromGitter> <Blacksmoke16> yea i guess im used to PHP `true && '' # => false` ha
<FromGitter> <Blacksmoke16> as it does logical operation i guess
<FromGitter> <naqvis> yeah, things get mixed up sometimes
<FromGitter> <Blacksmoke16> https://www.php.net/manual/en/language.operators.logical.php#77411 ha, thanks guy from 13 years ago
<FromGitter> <naqvis> yeah, but if Crystal has followed that, we would have missed the nice feature of `nilable_ivar ||= do_some_magic_to_instantiate`
alexherbo2 has joined #crystal-lang
<FromGitter> <Blacksmoke16> i think PHP made the wrong call :P
<FromGitter> <Blacksmoke16> but i suppose that's not surprising
<FromGitter> <naqvis> yeah, guess PHP followed the C
<FromGitter> <naqvis> C behave in similar fashion `1 && ""` would return 1
oddp has joined #crystal-lang
alexherbo24 has joined #crystal-lang
alexherbo2 has quit [Ping timeout: 246 seconds]
alexherbo24 is now known as alexherbo2
<FromGitter> <jrei:matrix.org> I got weird thing with Levenshtein distance
<FromGitter> <jrei:matrix.org> https://carc.in/#/r/b3pv
<FromGitter> <jrei:matrix.org> if tolerance is set to `nil`, which is the default, there should be no limit?
<FromGitter> <jrei:matrix.org> But it seems to have one somehow
<FromGitter> <Blacksmoke16> `tolerance || (target.size / 5.0).ceil.to_i`
<FromGitter> <jrei:matrix.org> unfortunately that's not documented :/
_ht has quit [Remote host closed the connection]
<FromGitter> <Blacksmoke16> nope
<FromGitter> <jrei:matrix.org> It was logical to think that having a tolerance to nil was having no tolerance, IMO
<FromGitter> <Blacksmoke16> you would think :P
<FromGitter> <Blacksmoke16> could pass `Int32::MAX` for now tho
<FromGitter> <jrei:matrix.org> lol haha
<FromGitter> <jrei:matrix.org> I used `(target.size / 6.0).ceil.to_i`haha
alexherbo2 has quit [Ping timeout: 260 seconds]
<FromGitter> <Blacksmoke16> is there a good way to have a fixed size buffer IO? Kinda like a mix between `IO::Sized` and `IO::Buffered`?
<FromGitter> <Blacksmoke16> e.g. an `IO::Memory` that stores at most n bytes, removing the earlier ones
<FromGitter> <Blacksmoke16> or maybe it'd be easier to just keep a string and `+=` and one of the sub string methods