00:25
hightower3 has joined #crystal-lang
00:25
hightower2 has quit [Ping timeout: 260 seconds]
00:28
hightower4 has joined #crystal-lang
00:30
hightower3 has quit [Ping timeout: 256 seconds]
00:33
hightower4 has quit [Ping timeout: 256 seconds]
00:51
irc_user has quit [Quit: Connection closed for inactivity]
03:06
ur5us has quit [Ping timeout: 246 seconds]
04:09
rocx has left #crystal-lang [ERC 5.4 (IRC client for GNU Emacs 28.1)]
05:25
straight-shoota has joined #crystal-lang
07:16
Starfoxxes has joined #crystal-lang
07:17
Starfoxxes has quit [Max SendQ exceeded]
07:55
_ht has joined #crystal-lang
08:02
Starfoxxes has joined #crystal-lang
08:03
Starfoxxes has quit [Max SendQ exceeded]
08:25
_ht has quit [Quit: _ht]
09:06
irc_user has joined #crystal-lang
11:11
luna has joined #crystal-lang
11:11
luna has left #crystal-lang [#crystal-lang]
11:15
irc_user has quit [Quit: Connection closed for inactivity]
11:36
<
jhass[m] >
A bit hard to judge from the example what you want, but you could for example a.map {|x| x.something }.should ["something1", "else"]
13:06
<
FromGitter >
<djberg96> @Blacksmoke16 in the end I punted on that, and just look for double zeroes, seems to pass :)
13:24
jmdaemon has quit [Ping timeout: 255 seconds]
15:12
alexherbo2 has joined #crystal-lang
15:47
alexherbo2 has quit [Remote host closed the connection]
15:47
alexherbo2 has joined #crystal-lang
15:58
taupiqueur has quit [Ping timeout: 256 seconds]
15:58
taupiqueur has joined #crystal-lang
17:04
alexherbo2 has quit [Remote host closed the connection]
17:04
alexherbo2 has joined #crystal-lang
17:06
repo1 has quit [Ping timeout: 255 seconds]
17:17
repo1 has joined #crystal-lang
17:56
repo1 has quit [Ping timeout: 260 seconds]
18:04
Starfoxxes has joined #crystal-lang
18:51
_ht has joined #crystal-lang
19:44
jmdaemon has joined #crystal-lang
20:46
alexherbo2 has quit [Remote host closed the connection]
20:47
alexherbo2 has joined #crystal-lang
20:59
Sankalp has quit [Ping timeout: 252 seconds]
21:02
Sankalp has joined #crystal-lang
21:02
_ht has quit [Remote host closed the connection]
22:20
hightower2 has joined #crystal-lang
22:57
<
FromGitter >
<Blacksmoke16> prob a good usecase for `#sum`?
22:58
<
FromGitter >
<Blacksmoke16> something like that?
23:06
<
FromGitter >
<rjnienaber> i'm trying to get rid of that `opponent, outcome = line.split` line
23:14
alexherbo2 has quit [Remote host closed the connection]
23:14
alexherbo2 has joined #crystal-lang
23:18
taupiqueur has quit [Ping timeout: 252 seconds]
23:19
alexherbo2 has quit [Ping timeout: 260 seconds]
23:24
<
FromGitter >
<Blacksmoke16> whats each line look like?
23:28
<
FromGitter >
<Blacksmoke16> sec
23:31
alexherbo2 has joined #crystal-lang
23:32
taupiqueur has joined #crystal-lang
23:40
<
FromGitter >
<Blacksmoke16> you going for performance or readability?
23:40
<
FromGitter >
<rjnienaber> readability
23:42
<
FromGitter >
<Blacksmoke16> okay in that case id start by doing `total = ARGF.each_line.sum do |line|` instead
23:42
<
FromGitter >
<Blacksmoke16> other than feels pretty good?
23:42
alexherbo2 has quit [Ping timeout: 260 seconds]
23:42
taupiqueur has quit [Ping timeout: 260 seconds]
23:46
<
FromGitter >
<rjnienaber> yeah, it does. i was curious if you can capture values while pattern matching but i'm guessing that's a no?
23:48
<
FromGitter >
<Blacksmoke16> not that im ware of. it is possible to use tuple literals with a case, but not sure that would work with arrays, which is what `.split` returns
23:58
hightower2 has quit [Read error: Connection reset by peer]
23:59
alexherbo2 has joined #crystal-lang