02:46
_whitelogger has joined #crystal-lang
03:42
duane has joined #crystal-lang
04:12
moei has joined #crystal-lang
04:13
duane has quit [Ping timeout: 258 seconds]
04:35
ht_ has joined #crystal-lang
05:01
absolutejam has joined #crystal-lang
05:06
ht_ has quit [Quit: ht_]
05:44
moei has quit [Ping timeout: 248 seconds]
06:19
absolutejam has quit [Ping timeout: 244 seconds]
06:54
absolutejam has joined #crystal-lang
07:13
moei has joined #crystal-lang
07:44
sorcus has joined #crystal-lang
08:37
absolutejam has quit [Ping timeout: 248 seconds]
08:45
absolutejam has joined #crystal-lang
08:53
alex`` has quit [Quit: WeeChat 2.5]
08:54
absolutejam1 has quit [Quit: WeeChat 2.5]
09:28
laaron has joined #crystal-lang
09:30
absolutejam has quit [Ping timeout: 248 seconds]
09:37
laaron has joined #crystal-lang
09:41
absolutejam has joined #crystal-lang
09:42
laaron has quit [Client Quit]
09:42
laaron has joined #crystal-lang
09:54
laaron- has joined #crystal-lang
10:31
blassin278262 has joined #crystal-lang
10:34
blassin27826 has quit [Ping timeout: 245 seconds]
10:39
absolutejam1 has joined #crystal-lang
12:42
<
absolutejam >
how do I declare a property that's an anonymous func?
12:43
<
absolutejam >
of a class
12:43
<
absolutejam >
property of a class*
12:48
<
absolutejam >
func : Proc(Void) | Nil = nil
12:48
<
absolutejam >
:thumbsup:
12:49
<
absolutejam >
actually func : Proc(Void) = ->{ }
12:50
absolutejam1 has quit [Quit: WeeChat 2.5]
12:51
<
jokke >
does someone know if there's a way that math module functions raise a domain error?
12:53
laaron- has quit [Remote host closed the connection]
12:53
laaron has joined #crystal-lang
12:53
<
jokke >
ah ok it returns a NaN
12:59
duane has joined #crystal-lang
14:22
<
jokke >
is there a way to define a converter for an array field where the items of the array don't have a JSON::PullParser initializer so that i only need to implement the converter for the items?
14:26
absolutejam has quit [Read error: Connection reset by peer]
14:27
absolutejam has joined #crystal-lang
14:33
lucasb has joined #crystal-lang
14:50
DTZUZO has quit [Ping timeout: 258 seconds]
14:51
ht_ has joined #crystal-lang
15:05
absolutejam has quit [Ping timeout: 272 seconds]
16:03
laaron has quit [Remote host closed the connection]
16:05
return0e has quit [Read error: Connection reset by peer]
16:06
laaron has joined #crystal-lang
16:08
return0e has joined #crystal-lang
16:18
DTZUZO has joined #crystal-lang
16:23
DTZUZO has quit [Ping timeout: 246 seconds]
16:48
DTZUZO has joined #crystal-lang
17:08
dingenskirchen has quit [Quit: dingenskirchen]
17:08
dingenskirchen has joined #crystal-lang
17:12
absolutejam has joined #crystal-lang
17:26
absolutejam has quit [Ping timeout: 245 seconds]
17:44
absolutejam has joined #crystal-lang
17:44
DTZUZO has quit [Read error: Connection reset by peer]
17:49
DTZUZO has joined #crystal-lang
18:01
DTZUZO has quit [Ping timeout: 248 seconds]
18:23
<
absolutejam >
can anyone point me in the right direction in regards to declaring a proc as an instance property and then instantiating it
18:25
<
absolutejam >
I currently have a custom type for the proc's args: `alias CommandFunc = Hash(Symbol, String) ->`
18:25
<
absolutejam >
on my class `property func : CommandFunc | Nil`
18:41
duane has quit [Ping timeout: 245 seconds]
18:43
devil_tux has quit [Ping timeout: 245 seconds]
18:55
absolutejam has quit [Ping timeout: 248 seconds]
19:20
absolutejam has joined #crystal-lang
19:21
<
absolutejam >
and in addition to what I was saying, is a proc the best choice? I basically want crystal's equivalent of an anonymous function
19:21
laaron has quit [Remote host closed the connection]
19:21
<
absolutejam >
If a multiline proc works, I'll have that
19:25
<
dingenskirchen >
(i posted that verbatim before but you seem to have been absent there)
19:26
<
absolutejam >
oh my bad. I get disconnected when I close the lid on my laptop
19:26
<
absolutejam >
I feel liek i had that - let me check
19:27
<
absolutejam >
oh, it works when I change my definition from...
19:27
<
absolutejam >
c.func = ->(opts : CommandFunc) { puts "foo" }
19:27
<
absolutejam >
to: ` c.func = ->(opts : hash(symbol, string)) { puts "foo" }`
19:29
<
absolutejam >
ignore the case ^ I think my editor clobbered it
19:29
<
dingenskirchen >
^^
19:30
<
absolutejam >
second question - is this the right thing to do?
19:30
<
absolutejam >
a multiline proc seems weird as whenevery ou normally see this kinda thing, it's a block (do ... end vs { .. } over multiple lines)
19:32
<
absolutejam >
hmmmm, sweet
19:35
<
dingenskirchen >
so something like this:
19:38
<
absolutejam >
yeah, I got it, thanks
19:38
<
absolutejam >
That's much better
19:47
frojnd has joined #crystal-lang
20:00
duane has joined #crystal-lang
20:33
lucasb has quit [Quit: Connection closed for inactivity]
20:40
ht_ has quit [Quit: ht_]
21:03
sorcus has quit [Ping timeout: 250 seconds]
21:25
DTZUZO has joined #crystal-lang
21:32
DTZUZO has quit [Ping timeout: 245 seconds]
21:51
devil_tux has joined #crystal-lang
22:41
absolutejam has quit [Ping timeout: 258 seconds]
23:08
moei has quit [Quit: Leaving...]
23:09
return0e_ has joined #crystal-lang
23:11
return0e has quit [Ping timeout: 272 seconds]