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
alexherbo26 has joined #crystal-lang
alexherbo2 has quit [Read error: Connection reset by peer]
alexherbo26 is now known as alexherbo2
alexherbo2 has quit [Ping timeout: 252 seconds]
alexherbo2 has joined #crystal-lang
alexherbo2 has quit [Ping timeout: 240 seconds]
alexherbo2 has joined #crystal-lang
f1refly has quit [Ping timeout: 246 seconds]
alexherbo2 has quit [Ping timeout: 246 seconds]
f1refly has joined #crystal-lang
Stephanie has joined #crystal-lang
Stephie has quit [Ping timeout: 260 seconds]
_ht has joined #crystal-lang
andremedeiros has quit [Read error: Connection reset by peer]
andremedeiros has joined #crystal-lang
hendursaga has joined #crystal-lang
hendursa1 has quit [Ping timeout: 240 seconds]
alexherbo2 has joined #crystal-lang
vasanth has joined #crystal-lang
vasanth has quit [Ping timeout: 260 seconds]
vasanth has joined #crystal-lang
vasanth has quit [Ping timeout: 240 seconds]
vasanth has joined #crystal-lang
vasanth has quit [Ping timeout: 240 seconds]
postmodern has quit [Quit: Leaving]
vasanth has joined #crystal-lang
vasanth has quit [Ping timeout: 265 seconds]
vasanth has joined #crystal-lang
vasanth has quit [Ping timeout: 268 seconds]
vasanth has joined #crystal-lang
DTZUZU has quit [Ping timeout: 252 seconds]
vasanth has quit [Ping timeout: 240 seconds]
DTZUZU has joined #crystal-lang
DTZUZU has quit [Ping timeout: 240 seconds]
DTZUZU has joined #crystal-lang
DTZUZU has quit [Ping timeout: 252 seconds]
DTZUZU has joined #crystal-lang
DTZUZU_ has joined #crystal-lang
DTZUZU has quit [Ping timeout: 240 seconds]
vasanth has joined #crystal-lang
vasanth has quit [Ping timeout: 265 seconds]
alexherbo2 has quit [Ping timeout: 246 seconds]
alexherbo2 has joined #crystal-lang
alexherbo29 has joined #crystal-lang
alexherbo2 has quit [Ping timeout: 240 seconds]
alexherbo29 is now known as alexherbo2
alexherbo2 has quit [Ping timeout: 240 seconds]
alexherbo2 has joined #crystal-lang
alexherbo2 has quit [Ping timeout: 265 seconds]
f1refly has quit [Ping timeout: 246 seconds]
alexherbo2 has joined #crystal-lang
alexherbo24 has joined #crystal-lang
alexherbo2 has quit [Ping timeout: 240 seconds]
alexherbo24 is now known as alexherbo2
mipmip has quit [Ping timeout: 260 seconds]
mipmip has joined #crystal-lang
mipmip has quit [Ping timeout: 260 seconds]
mipmip has joined #crystal-lang
postmodern has joined #crystal-lang
<postmodern> is it better to define methods that return/yield Int::Unsigned or some kind of type union for all possible values, or define the class as a generic that specifies the specific type that will be returned/yielded?
<FromGitter> <Blacksmoke16> prob the latter, but do you really need to be working with unsigned ints?
<FromGitter> <oprypin:matrix.org> postmodern, depends
<FromGitter> <Blacksmoke16> just because the value shouldnt be negative doesnt mean its "right" to use them
<FromGitter> <oprypin:matrix.org> agreed there too
<postmodern> it's for hexdumping code, so i'd prefer to keep them as unsigned. i'll eventually add support for printing signed words, then maybe floats as well
<FromGitter> <Blacksmoke16> https://crystal-lang.org/api/master/IO/Hexdump.html possibly helpful?
<postmodern> i'm more worried about word-size. if i'm only dumping 8bit or 16bit words, having a big type union seems needless
<postmodern> Blacksmoke16, yes i've seen IO::Hexdump and it's kind of limited, which is why i'm porting my hexdump ruby library to crystal
<FromGitter> <Blacksmoke16> 👍
<postmodern> can integer types automatically increase their size, or do you just have to decide whether to use Int32 or Int64 for counts/sizes?
<FromGitter> <Blacksmoke16> the latter
<FromGitter> <Blacksmoke16> well, is it an ivar or just a local var?
alexherbo20 has joined #crystal-lang
alexherbo2 has quit [Ping timeout: 240 seconds]
alexherbo20 is now known as alexherbo2
_ht has quit [Remote host closed the connection]
<postmodern> Blacksmoke16, ivar, since i initialize the Dumper class with the settings (word_size, endianness, base, etc), then #each_word is supposed to convert a byte stream into a word stream, which then gets formatted and written out
<FromGitter> <Blacksmoke16> yea, then in that case it would overflow
alexherbo22 has joined #crystal-lang
alexherbo2 has quit [Ping timeout: 246 seconds]
alexherbo22 is now known as alexherbo2
Xeago has quit [Ping timeout: 240 seconds]
Xeago has joined #crystal-lang
Xeago has quit [Ping timeout: 246 seconds]
Xeago has joined #crystal-lang
avane has quit [Quit: o/]
avane has joined #crystal-lang
avane has quit [Client Quit]
avane has joined #crystal-lang
<FromGitter> <asterite> I would avoid int unions if possible. Why do you need them?