00:08
mgarciaisaia has left #crystal-lang [#crystal-lang]
00:09
Philpax has joined #crystal-lang
00:10
A124 has joined #crystal-lang
00:15
sp4rrow has quit [Quit: The Internet needs a break and I need a cookie]
00:17
tomchapin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
00:27
emancu has quit [Remote host closed the connection]
00:37
pawnbox has joined #crystal-lang
00:39
umurgdk has joined #crystal-lang
00:42
pawnbox has quit [Ping timeout: 264 seconds]
00:44
umurgdk has quit [Ping timeout: 244 seconds]
00:44
Gasher has joined #crystal-lang
01:03
sp4rrow has joined #crystal-lang
01:06
sp4rrow has quit [Client Quit]
01:12
Philpax has quit [Ping timeout: 260 seconds]
01:20
<
ragmaanir >
why does this raise an error? crystal eval 'require "json"; Time.new.to_json'
01:27
pawnbox has joined #crystal-lang
01:31
Gasher has quit [Quit: Leaving]
01:32
pawnbox has quit [Ping timeout: 252 seconds]
01:35
emancu has joined #crystal-lang
01:43
ragmaanir has quit [Quit: Leaving]
01:45
pawnbox has joined #crystal-lang
01:47
sp4rrow has joined #crystal-lang
01:49
pawnbox has quit [Ping timeout: 244 seconds]
01:50
pawnbox has joined #crystal-lang
01:55
pawnbox has quit [Ping timeout: 248 seconds]
01:58
kulelu88 has joined #crystal-lang
01:59
sp4rrow has quit [Quit: Textual]
02:23
Philpax has joined #crystal-lang
02:27
umurgdk has joined #crystal-lang
02:32
umurgdk has quit [Ping timeout: 244 seconds]
02:33
stef__ has quit [Read error: Connection reset by peer]
02:43
zodiak has joined #crystal-lang
03:01
A124 has quit [Read error: Connection reset by peer]
03:05
A124 has joined #crystal-lang
03:11
willl has quit [Quit: Connection closed for inactivity]
03:28
stef__ has joined #crystal-lang
03:30
zodiak has quit [Ping timeout: 244 seconds]
03:37
kulelu88 has quit [Quit: Leaving]
03:52
Philpax has quit [Ping timeout: 260 seconds]
04:23
marcosdsanchez has quit [Remote host closed the connection]
04:53
Dreamer3 has quit [Ping timeout: 244 seconds]
04:54
shadeslayer has quit [Quit: No Ping reply in 180 seconds.]
04:55
miketheman has quit [Ping timeout: 276 seconds]
04:55
onionhammer has quit [Ping timeout: 276 seconds]
04:55
Dreamer3 has joined #crystal-lang
04:56
slash_nick has quit [Ping timeout: 276 seconds]
04:56
slash_nick has joined #crystal-lang
04:57
shadeslayer has joined #crystal-lang
04:59
miketheman has joined #crystal-lang
05:00
onionhammer has joined #crystal-lang
05:10
umurgdk has joined #crystal-lang
05:15
umurgdk has quit [Ping timeout: 276 seconds]
05:50
Cidan has quit [Ping timeout: 244 seconds]
05:56
Cidan has joined #crystal-lang
06:23
Philpax has joined #crystal-lang
06:50
bjz has joined #crystal-lang
07:01
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
07:21
bjz has joined #crystal-lang
07:51
pawnbox has joined #crystal-lang
07:58
trapped has joined #crystal-lang
08:07
umurgdk has joined #crystal-lang
08:07
umurgdk has quit [Remote host closed the connection]
08:08
umurgdk has joined #crystal-lang
08:17
pawnbox has quit [Remote host closed the connection]
08:23
bjz has quit [Ping timeout: 240 seconds]
08:23
bjz has joined #crystal-lang
08:23
zodiak has joined #crystal-lang
08:24
stef__ has quit [Ping timeout: 248 seconds]
08:29
PragTob has joined #crystal-lang
08:34
Philpax has quit [Ping timeout: 276 seconds]
08:46
trapped has quit [Read error: Connection reset by peer]
08:47
matp has quit [Ping timeout: 252 seconds]
08:49
matp has joined #crystal-lang
09:03
matp has quit [Ping timeout: 250 seconds]
09:09
matp has joined #crystal-lang
09:56
Philpax has joined #crystal-lang
10:01
pawnbox has joined #crystal-lang
10:09
onec has joined #crystal-lang
10:09
onec has quit [Client Quit]
10:53
pawnbox has quit [Remote host closed the connection]
10:54
pawnbox has joined #crystal-lang
11:02
pawnbox has quit [Ping timeout: 260 seconds]
11:06
Gasher has joined #crystal-lang
11:06
Gasher has quit [Read error: Connection reset by peer]
11:07
Gasher has joined #crystal-lang
11:07
Gasher has quit [Read error: Connection reset by peer]
11:07
Gasher has joined #crystal-lang
11:18
pawnbox has joined #crystal-lang
11:30
trapped has joined #crystal-lang
11:30
ponga has joined #crystal-lang
11:35
<
BlaXpirit >
I don't understand how I can make a private module that can be used only by the library itself
11:35
<
BlaXpirit >
how to make a helper function and use it without exposing it
11:52
pawnbox has quit [Remote host closed the connection]
11:55
pawnbox has joined #crystal-lang
11:56
knoopx has joined #crystal-lang
12:01
<
BlaXpirit >
I also want some library-wide private utility macros
12:05
knoopx has quit [Remote host closed the connection]
12:08
pawnbox has quit [Remote host closed the connection]
12:08
pawnbox has joined #crystal-lang
12:13
<
emancu >
BlaXpirit: i think i have a
_hack_ to do that
12:16
<
emancu >
first of all, to do a private function (or method) just do `private def hola`
12:16
<
BlaXpirit >
yeah then I can't use it
12:17
<
emancu >
BlaXpirit: I'm using it
12:18
<
BlaXpirit >
emancu, this is within the same file
12:18
<
emancu >
so i don't get what you want to do
12:19
<
BlaXpirit >
emancu, make helper functions in one file and use them in other files of the library without exposing them to the user of the library
12:19
<
emancu >
give me a minute
12:21
pawnbox has quit [Ping timeout: 248 seconds]
12:29
<
asterite >
BlaXpirit: you can use protected for that
12:30
<
BlaXpirit >
I was under the impression that protected is more private than private
12:30
<
asterite >
we changed the meaning from ruby
12:30
<
asterite >
well, in ruby private is more private than protected too
12:30
<
asterite >
(but I changed that page a few days ago, previously protected was like in ruby)
12:31
<
emancu >
2. instances in the same namespace (class, struct, module, etc.) as the current type
12:32
<
BlaXpirit >
I'm gonna try that in a while
12:39
<
BlaXpirit >
aaand it worked! thanks!
12:51
<
crystal-gh >
[crystal] Ryuuzakis closed pull request #2297: Improved complex.cr documentation (master...ComplexDocumentation)
https://git.io/vaGtr
12:58
<
crystal-gh >
[crystal] Ryuuzakis opened pull request #2315: Improved complex.cr documentation (master...ComplexDocumentationV2)
https://git.io/vaKDm
13:16
trapped has quit [Ping timeout: 246 seconds]
13:29
Philpax has quit [Ping timeout: 244 seconds]
13:33
trapped has joined #crystal-lang
13:37
marcosdsanchez has joined #crystal-lang
13:48
<
crystal-gh >
[crystal] Nesqwik closed pull request #2234: Add shuffle with seed and tests for StaticArray (master...static_array)
https://git.io/v2unn
13:49
bjz has joined #crystal-lang
14:01
mgarciaisaia has joined #crystal-lang
14:01
mgarciaisaia has left #crystal-lang [#crystal-lang]
14:01
bjz has quit [Ping timeout: 244 seconds]
14:04
bjz has joined #crystal-lang
14:19
<
crystal-gh >
[crystal] Nesqwik opened pull request #2316: Add shuffle with seed and tests for StaticArray (master...shuffle_static_array)
https://git.io/vaKhn
14:21
ql6wlld has joined #crystal-lang
14:27
PragTob has quit [Ping timeout: 276 seconds]
14:27
matp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
14:40
matp has joined #crystal-lang
15:00
tamole has joined #crystal-lang
15:06
mgarciaisaia has joined #crystal-lang
15:06
<
BlaXpirit >
p(JSON.parse("5") as Int32) # can't cast JSON::Any to Int32
15:06
mgarciaisaia has left #crystal-lang [#crystal-lang]
15:16
<
BlaXpirit >
this must've changed. now .as_i is a thing
15:18
<
umurgdk >
BlaXpirit: isn't that expected result? since it is not possible to convert any json value to int32
15:19
<
umurgdk >
but i think Int32? should be possible
15:19
<
BlaXpirit >
umurgdk, no
15:19
<
BlaXpirit >
>> (true ? 5 : "a") as Int32
15:19
<
BlaXpirit >
>> (false ? 5 : "a") as Int32
15:19
<
BlaXpirit >
ok this is a compile time error so my exmaple shows nothing
15:20
<
umurgdk >
yeah compiler knows possible path in that example
15:47
ql6wlld has quit [Quit: WeeChat 1.4]
16:03
matp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
16:06
umurgdk has quit [Remote host closed the connection]
16:06
umurgdk has joined #crystal-lang
16:11
matp has joined #crystal-lang
16:13
<
crystal-gh >
[crystal] asterite closed pull request #976: [WIP] Implement ASTPrinter (master...feature/ast_print)
https://git.io/va62C
16:16
<
crystal-gh >
[crystal] asterite closed pull request #1091: Add type restrictions to `Array#concat` (master...fix/array_concat_type)
https://git.io/va62M
16:16
marcosdsanchez has quit [Read error: Connection reset by peer]
16:16
marcosdsanchez has joined #crystal-lang
16:17
<
crystal-gh >
[crystal] asterite closed pull request #1134: Add support for concurrency safe file operations. (master...f/openat)
https://git.io/va62b
16:22
<
crystal-gh >
[crystal] asterite closed pull request #1399: Add Singleton Module. (master...f/singleton)
https://git.io/va6Vf
16:23
<
crystal-gh >
[crystal] asterite closed pull request #1521: Changed 2 lines in time/time.cr to calculate local time correctily wh… (master...master)
https://git.io/va6V8
16:25
<
crystal-gh >
[crystal] asterite closed pull request #1601: Add reallocation and concatenation methods for slice (master...reallocate-slice)
https://git.io/va6wf
16:32
umurgdk has quit [Read error: Connection reset by peer]
16:32
umurgdk has joined #crystal-lang
16:35
<
crystal-gh >
[crystal] asterite closed pull request #1612: Mutex and thread attribute enhancements (master...f/mutex)
https://git.io/va6oJ
16:35
<
crystal-gh >
[crystal] asterite closed pull request #1627: Basic pthread_attr support. (master...f/pthread_attribute)
https://git.io/va6o3
16:55
pawnbox has joined #crystal-lang
17:01
umurgdk has quit [Remote host closed the connection]
17:01
mgarciaisaia1 has joined #crystal-lang
17:02
umurgdk has joined #crystal-lang
17:03
pawnbox has quit [Ping timeout: 260 seconds]
17:04
mgarciaisaia1 has left #crystal-lang [#crystal-lang]
17:05
pawnbox has joined #crystal-lang
17:07
tamole has quit [Quit: bye]
17:11
umurgdk has quit [Remote host closed the connection]
17:16
rok has joined #crystal-lang
17:24
<
donpdonp >
are there plans/ideas for defining the type of a method return value?
17:25
<
BlaXpirit >
donpdonp, but it's always been there
17:26
<
donpdonp >
BlaXpirit: orly
17:27
<
donpdonp >
only for method parameters
17:27
<
BlaXpirit >
donpdonp, that's a big oversight in docs then
17:27
<
jeromegn >
it's infered or you can do something like `def add(a, b) : Int32`
17:27
<
BlaXpirit >
def f(x : Int32) : Int
17:28
<
donpdonp >
ah, fantastic. yes that needs to be documented
17:28
<
jeromegn >
I think, in general, the best practice is not to specify types and just use the global inference.
17:29
<
donpdonp >
def value : Float64; "hi"; end
17:29
<
BlaXpirit >
jeromegn, nah that sucks
17:29
<
BlaXpirit >
best practice is specifying return type, for documentation
17:29
<
donpdonp >
type must be Float64, not Sting.
17:29
<
jeromegn >
oh is it?
17:29
<
BlaXpirit >
it's the easiest and most important part of documentation
17:29
<
donpdonp >
note that error was caught at compile time.
17:30
<
donpdonp >
whoops wrong channel sorry, ignore that last msg
17:30
<
donpdonp >
jeromegn: i find the value comes from specifying what I expected
17:30
<
RX14 >
BlaXpirit, I would specify return type, but not parameter type
17:31
<
RX14 >
because paramter types allow the user to duck type
17:31
<
RX14 >
but the return type is usually fixed
17:33
ssvb has joined #crystal-lang
17:38
ponga has quit [Quit: Connection closed for inactivity]
17:44
<
crystal-gh >
[crystal] marceloboeira opened pull request #2317: Add HTTP::Client::Response status code helpers (master...response-helpers)
https://git.io/va65w
17:47
pawnbox has quit [Remote host closed the connection]
17:48
pawnbox has joined #crystal-lang
17:49
pawnbox has quit [Remote host closed the connection]
17:49
pawnbox_ has joined #crystal-lang
18:04
bjz_ has joined #crystal-lang
18:06
bjz has quit [Ping timeout: 248 seconds]
18:21
greengriminal has joined #crystal-lang
18:24
pawnbox_ has quit [Remote host closed the connection]
18:26
pawnbox_ has joined #crystal-lang
18:27
pawnbox_ has quit [Remote host closed the connection]
18:27
pawnbox has joined #crystal-lang
18:58
mgarciaisaia has joined #crystal-lang
19:00
mgarciaisaia has left #crystal-lang [#crystal-lang]
19:06
luislavena has joined #crystal-lang
19:36
pawnbox has quit [Remote host closed the connection]
19:37
pawnbox has joined #crystal-lang
19:41
pawnbox has quit [Ping timeout: 244 seconds]
19:51
Excureo has quit [Remote host closed the connection]
19:53
tomchapin has joined #crystal-lang
19:59
Excureo has joined #crystal-lang
20:25
pawnbox has joined #crystal-lang
20:40
<
crystal-gh >
[crystal] asterite closed pull request #2080: Add Changelog episode badge to README (master...patch-1)
https://git.io/vaiR0
20:42
ragmaanir has joined #crystal-lang
21:21
umurgdk has joined #crystal-lang
21:23
emancu_ has joined #crystal-lang
21:24
trapped_ has joined #crystal-lang
21:25
braidn has quit [Ping timeout: 276 seconds]
21:25
emancu has quit [Ping timeout: 276 seconds]
21:25
ldlework has quit [Ping timeout: 276 seconds]
21:26
rok has quit [Ping timeout: 276 seconds]
21:26
ldlework has joined #crystal-lang
21:27
trapped has quit [Ping timeout: 248 seconds]
21:30
g3funk has joined #crystal-lang
21:36
umurgdk has quit [Ping timeout: 264 seconds]
21:36
_ has joined #crystal-lang
21:37
_ is now known as Guest81970
21:39
trapped_ has quit [Ping timeout: 244 seconds]
21:48
umurgdk has joined #crystal-lang
21:49
irvingprime has joined #crystal-lang
21:53
irvingprime has quit []
21:54
umurgdk has quit [Remote host closed the connection]
22:00
umurgdk has joined #crystal-lang
22:17
umurgdk has quit [Read error: Connection reset by peer]
22:18
umurgdk has joined #crystal-lang
22:26
Renich has joined #crystal-lang
22:39
bcardiff has joined #crystal-lang
22:48
umurgdk has quit [Read error: Connection reset by peer]
22:52
umurgdk has joined #crystal-lang
23:00
luislavena has quit [Quit: Leaving]
23:07
pawnbox has quit [Remote host closed the connection]
23:08
pawnbox has joined #crystal-lang
23:08
Philpax has joined #crystal-lang
23:10
Renich has quit [Quit: leaving]
23:11
Philpax has quit [Read error: Connection reset by peer]
23:12
pawnbox has quit [Ping timeout: 244 seconds]
23:18
umurgdk has quit [Read error: Connection reset by peer]
23:22
umurgdk has joined #crystal-lang
23:23
hwpplayer1 has joined #crystal-lang
23:24
ragmaanir has quit [Quit: Leaving]
23:26
pawnbox has joined #crystal-lang
23:28
pawnbox has quit [Remote host closed the connection]
23:31
Gasher has quit [Ping timeout: 260 seconds]
23:34
Gasher has joined #crystal-lang
23:45
greengriminal has quit [Quit: Leaving]
23:49
umurgdk has quit [Read error: Connection reset by peer]
23:54
umurgdk has joined #crystal-lang