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> <Dan-Do> Good blog post, can we do the same on crystal?
ur5us has quit [Ping timeout: 252 seconds]
jrayhawk has quit [Quit: debugging performance issues in 1.4.3]
jrayhawk has joined #crystal-lang
Sankalp has quit [Ping timeout: 260 seconds]
Sankalp has joined #crystal-lang
<FromGitter> <naqvis> > Good blog post, can we do the same on crystal? ⏎ ⏎ Yes, you can link that `nadeau.h` file and invoke `getCurrentRSS` method to get mem usage stats.
jmd_ has quit [Ping timeout: 260 seconds]
repo has joined #crystal-lang
Sankalp has quit [Quit: ZNC 1.7.2+deb3 - https://znc.in]
Sankalp has joined #crystal-lang
alexherbo2 has joined #crystal-lang
alexherbo2 has quit [Remote host closed the connection]
alexherbo2 has joined #crystal-lang
alexherbo2 has quit [Remote host closed the connection]
alexherbo2 has joined #crystal-lang
<FromGitter> <ismasan> Hi. I'm trying to get a numeric hash out of a string. I have this: ⏎ ⏎ ```Digest::MD5.hexdigest("stream1")[0...16].to_i64(16)``` ⏎ ⏎ That example works fine. However if the string is "stream3" instead I get ... [https://gitter.im/crystal-lang/crystal?at=636e5c010513b562e8a68f61]
<FromGitter> <ismasan> The same works fine in Ruby: ⏎ ⏎ ```Digest::MD5.hexdigest('stream3')[0...16].to_i(16)``` [https://gitter.im/crystal-lang/crystal?at=636e5c1e2cb657024021a7f8]
<FromGitter> <Blacksmoke16> try `.to_i128`
<FromGitter> <Blacksmoke16> the number is just too big to store in an int64
<FromGitter> <ismasan> Ha that was it. Always add more bits I guess! Thanks
alexherbo2 has quit [Remote host closed the connection]
alexherbo2 has joined #crystal-lang
alexherbo2 has quit [Remote host closed the connection]
jmdaemon has joined #crystal-lang
alexherbo2 has joined #crystal-lang
_ht has joined #crystal-lang
jmdaemon has quit [Quit: ZNC 1.8.2 - https://znc.in]
jmdaemon has joined #crystal-lang
jmdaemon has quit [Remote host closed the connection]
jmdaemon has joined #crystal-lang
<FromGitter> <oprypin:matrix.org> @ismasan: maybe it fits into UInt64 though?
<FromGitter> <oprypin:matrix.org> @ismasan : anyway perhaps you can avoid the roundtrip through a hex string? ⏎ https://crystal-lang.org/api/1.6.2/IO/ByteFormat.html#decode%28int%3AUInt64.class%2Cbytes%3ABytes%29-instance-method ⏎ ⏎ ```Digest::MD5.digest("stream1")[...8].read_bytes(UInt64, IO::ByteFormat::LittleEndian)``` [https://gitter.im/crystal-lang/crystal?at=636eb91babfb5860bb107815]
_ht has quit [Quit: _ht]
Guest9435 has joined #crystal-lang
Guest9435 has quit [Remote host closed the connection]
alexherbo2 has quit [Remote host closed the connection]
wwalker has quit [Remote host closed the connection]
Ober has quit [*.net *.split]
tsujp has quit [*.net *.split]
tsujp has joined #crystal-lang
Ober has joined #crystal-lang
Sankalp has quit [Quit: ZNC 1.7.2+deb3 - https://znc.in]
Sankalp has joined #crystal-lang