00:17
lanodan has joined #crystal-lang
01:27
ur5us has joined #crystal-lang
03:44
notzmv has joined #crystal-lang
05:43
ur5us has quit [Remote host closed the connection]
05:43
ur5us has joined #crystal-lang
05:48
ur5us has quit [Ping timeout: 250 seconds]
07:26
Sankalp has quit [Ping timeout: 256 seconds]
07:29
Sankalp has joined #crystal-lang
08:18
<
frojnd >
I'm trying to use MD5 function for a file that I just uploaded to the server
08:20
<
frojnd >
Not sure how can I perform this with crystal lang
08:23
<
Sankalp >
Perhaps something like this: Digest::MD5.digest
09:02
jmdaemon has quit [Ping timeout: 246 seconds]
09:20
ur5us has joined #crystal-lang
10:51
ur5us has quit [Ping timeout: 240 seconds]
11:40
notzmv has quit [Ping timeout: 260 seconds]
12:48
<
FromGitter >
<Blacksmoke16> frojnd: `Digest::MD5.digest &.file(file_path)`
13:35
<
frojnd >
@Blacksmoke16 yes, it prints in bytes e.g.: => Bytes[60, 215, 160, 219, 118, 255, 157, 202, 72, 151, 158, 36, 195, 155, 64, 140] I need hex, so Digest::MD5.hexdigest(file) prints in hex: "3cd7a0db76ff9dca48979e24c39b408c"
13:36
<
frojnd >
Or just: Digest::MD5.hexdigest &.file("./bla.txt")
13:36
<
frojnd >
What's called &. after hexdigest?
13:40
<
FromGitter >
<Blacksmoke16> its the same as like `Digest::MD5.hexdigest { |ctx| ctx.file "./bla.txt" }`
13:43
<
frojnd >
What's this called? Semanticlly?
13:44
<
frojnd >
s/Semantically/semantically
13:44
<
frojnd >
Ah blocks and procs
13:45
<
frojnd >
While I'm here, What's the meaning of `::` e.g. inside `Digest::MD5`
13:46
<
FromGitter >
<Blacksmoke16> i dont think its ever explicitly called out anywhere, but its the same as ruby
17:29
sorcus has quit [Quit: WeeChat 3.5]
19:01
jmdaemon has joined #crystal-lang
19:14
yxhuvud has quit [Read error: Connection reset by peer]
19:15
yxhuvud has joined #crystal-lang
19:30
sorcus has joined #crystal-lang
19:51
<
FromGitter >
<vgramkris> hi, is there any ways to check if a channel is empty w/o calling receive?
19:54
<
FromGitter >
<wrq> It's trying to enumerate 308915776 cases here, just as an example
19:57
notzmv has joined #crystal-lang
19:59
<
FromGitter >
<vgramkris> thanks George, let me check that
20:26
notzmv has quit [Ping timeout: 240 seconds]
21:01
ur5us has joined #crystal-lang
21:42
wolfshappen has quit [Quit: later]
21:43
wolfshappen has joined #crystal-lang