00:01
Doug_ has quit [Ping timeout: 246 seconds]
00:05
Philpax has joined #crystal-lang
00:07
nietzschette has joined #crystal-lang
00:12
Philpax has quit [Read error: Connection reset by peer]
00:13
Philpax has joined #crystal-lang
00:13
sferik has joined #crystal-lang
00:21
tomchapin has joined #crystal-lang
00:21
Philpax has quit [Read error: Connection reset by peer]
00:24
nietzschette has left #crystal-lang [#crystal-lang]
00:25
Philpax has joined #crystal-lang
00:26
tomchapin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
00:31
lex has joined #crystal-lang
00:32
sferik has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
00:32
lex is now known as Guest89627
00:44
<
Guest89627 >
puts "hello"
00:44
Guest89627 has quit [Quit: Page closed]
00:48
Philpax has quit [Read error: Connection reset by peer]
00:50
n0xff has joined #crystal-lang
00:51
Philpax has joined #crystal-lang
01:04
Philpax has quit [Read error: Connection reset by peer]
01:05
Philpax has joined #crystal-lang
01:07
Philpax_ has joined #crystal-lang
01:07
Philpax__ has joined #crystal-lang
01:09
Philpax has quit [Ping timeout: 240 seconds]
01:09
rmosolgo has quit [Remote host closed the connection]
01:11
Philpax_ has quit [Ping timeout: 255 seconds]
01:12
Philpax has joined #crystal-lang
01:13
Philpax__ has quit [Ping timeout: 260 seconds]
01:13
rmosolgo has joined #crystal-lang
01:18
rmosolgo has quit [Remote host closed the connection]
02:19
buggs has quit [Quit: WeeChat 0.4.2]
02:56
rmosolgo has joined #crystal-lang
03:19
rmosolgo has quit [Remote host closed the connection]
03:27
rmosolgo has joined #crystal-lang
03:30
rmosolgo has quit [Remote host closed the connection]
03:44
rmosolgo has joined #crystal-lang
04:10
willl has joined #crystal-lang
04:44
rmosolgo has quit [Remote host closed the connection]
04:44
rmosolgo has joined #crystal-lang
05:13
rmosolgo has quit [Remote host closed the connection]
05:39
rmosolgo has joined #crystal-lang
05:48
rmosolgo has quit [Remote host closed the connection]
05:53
rmosolgo has joined #crystal-lang
05:57
rmosolgo has quit [Remote host closed the connection]
06:06
rmosolgo has joined #crystal-lang
06:08
rmosolgo has quit [Remote host closed the connection]
06:17
_jungh4ns has joined #crystal-lang
06:23
andrew-l` has joined #crystal-lang
06:27
andrew-l has quit [Ping timeout: 256 seconds]
06:47
pawnbox has joined #crystal-lang
06:58
buggs has joined #crystal-lang
07:39
Philpax has quit [Read error: Connection reset by peer]
07:39
Philpax has joined #crystal-lang
07:50
Philpax has quit [Read error: Connection reset by peer]
07:50
Philpax has joined #crystal-lang
08:02
Philpax has quit [Read error: Connection reset by peer]
08:02
Philpax has joined #crystal-lang
08:10
sferik has joined #crystal-lang
08:29
Philpax has quit [Read error: Connection reset by peer]
08:29
Philpax has joined #crystal-lang
08:36
gamemanj has joined #crystal-lang
08:41
sferik has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
08:47
Philpax has quit [Read error: Connection reset by peer]
08:47
Philpax has joined #crystal-lang
08:57
<
crystal-gh >
crystal/master 93002f1 Adler: Add methods documentation to File class
08:57
<
crystal-gh >
crystal/master a87b984 Jonne Haß: Merge pull request #1610 from adlerhsieh/master...
09:03
kulelu88 has joined #crystal-lang
09:03
kulelu88 has quit [Changing host]
09:03
kulelu88 has joined #crystal-lang
09:05
Philpax has quit [Read error: Connection reset by peer]
09:05
Philpax has joined #crystal-lang
09:05
Philpax has quit [Client Quit]
09:06
Philpax has joined #crystal-lang
09:35
<
crystal-gh >
crystal/master 48e0b50 Jonne Haß: Merge pull request #1606 from rhysd/spec-no-color...
09:35
<
crystal-gh >
crystal/master 5177026 rhysd: Add --no-color option to 'crystal spec' subcommand...
09:56
trapped has joined #crystal-lang
10:24
apt-get has joined #crystal-lang
11:15
ozra has quit [Ping timeout: 246 seconds]
11:18
kulelu88 has quit [Ping timeout: 264 seconds]
11:31
kulelu88 has joined #crystal-lang
11:34
<
crystal-gh >
[crystal] technorama opened pull request #1612: Mutex and thread attribute enhancements (master...f/mutex)
http://git.io/vcfTv
11:37
toydestroyer has quit [Remote host closed the connection]
11:38
toydestroyer has joined #crystal-lang
11:40
kulelu88 has quit [Ping timeout: 264 seconds]
11:43
pawnbox has quit [Read error: Connection reset by peer]
11:44
toydestroyer has quit [Remote host closed the connection]
11:45
toydestroyer has joined #crystal-lang
11:55
kulelu88 has joined #crystal-lang
11:55
sferik has joined #crystal-lang
11:56
pawnbox has joined #crystal-lang
12:32
sferik has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
12:41
<
pawnbox >
jhass: how do i check if something is send to STDERR
12:41
<
jokke >
pawnbox: you can mock STDERR
12:42
<
jokke >
but you can redirect STDERR to a file for example
12:42
<
pawnbox >
jokke: I don't how i would do that.
12:42
<
pawnbox >
`STDERR.puts "file or directory #{name} already exists"`
12:42
<
jhass >
mmh, yeah redirect it to a pipe
12:43
<
jokke >
STDERR.reopen(File.open('tmp/test_stderr'))
12:43
<
jhass >
but get a backup first
12:44
<
pawnbox >
lemme try that
12:44
<
jokke >
that should give you something to start with
12:46
<
jokke >
pawnbox: in your case: `stderr = File.open("/dev/null"); stderr.reopen(STDERR); STDERR.reopen(File.open("tmp/test_stderr")); "do your stuff here"; STDERR.reopen(stderr)`
12:46
<
jhass >
I'd use a pipe though
12:46
<
jokke >
you're right
12:46
<
jokke >
a pipe is nicer
12:46
<
jhass >
and package it up in a neat capture_stderr method or so
12:46
<
jokke >
then you can just use stringio
12:46
<
jhass >
nah, no need for stringio
12:46
<
jhass >
a pipe is already an IO
12:48
Philpax_ has joined #crystal-lang
12:49
Philpax__ has joined #crystal-lang
12:51
Philpax has quit [Ping timeout: 264 seconds]
12:53
Philpax_ has quit [Ping timeout: 255 seconds]
12:54
Philpax__ has quit [Ping timeout: 260 seconds]
12:54
<
trapped >
so i'm getting a segfault when calling .inspect()
12:55
<
trapped >
i'll try and open an issue
12:55
<
trapped >
but if anyone wants to give a look at the core dump it'd probably be helpful
12:55
<
jokke >
jhass: how are getters for bools defined?
12:55
<
jokke >
do i have to write a method foo? for @foo?
12:55
<
jokke >
or is there some nice macro i can use? :)
12:56
<
jokke >
crystal > ruby in that case :)
13:01
BlaXpirit has joined #crystal-lang
13:01
Philpax has joined #crystal-lang
13:03
<
jokke >
jhass: how do you handle global gems on arch?
13:03
<
jhass >
I usually package them
13:03
<
jokke >
jhass: gem2arch?
13:03
<
jhass >
copy paste an existing one :P
13:03
<
jhass >
but fine too I guess
13:04
<
jokke >
problem is, i have many packages that way that aren't available in the aur
13:05
<
jhass >
well I also just install stuff into my home
13:05
<
crystal-gh >
[crystal] technorama opened pull request #1613: ConditionVariable enhancements. (master...f/condition_variable)
http://git.io/vcflw
13:05
<
jhass >
install: -n ~/.bin/
13:06
<
jhass >
got that in my ~/.gemrc
13:06
<
jhass >
and added it to my PATH
13:06
<
jokke >
jhass: yeah
13:06
<
jokke >
i think that's way less hassle
13:09
<
crystal-gh >
crystal/master efca897 Ary Borenszweig: BigInt: create from float, and `**`
13:18
sferik has joined #crystal-lang
13:36
<
jhass >
pawnbox: STDERR.flush perhaps
13:38
<
pawnbox >
And where should i flush? before puts?
13:39
<
jhass >
before read
13:41
<
pawnbox >
On compilation it says `Could not raise`
13:43
<
jhass >
guess we destroyed stderr and it's raising an exception?
13:43
<
pawnbox >
yeah lloks like it
13:44
<
jhass >
mmh, default mode for open is read only, no?
13:46
<
pawnbox >
jhass: got it.
14:15
<
pawnbox >
jhass: is there a way to mock `exit 1`
14:16
<
jhass >
I guess you could monkey patch Crystal::Init and define a stub exit there
14:17
ssvb has quit [Ping timeout: 246 seconds]
14:18
<
pawnbox >
stub in Crystal::Init?
14:19
<
pawnbox >
ok i'll try
14:20
Philpax has quit [Quit: Leaving]
14:32
<
jokke >
is there some reason not to have map! in Slice?
14:33
<
BlaXpirit >
jokke, real reason is Array has too much stuff that should be generic but nobody got around to
14:33
<
BlaXpirit >
there should be a random access container module, then Array, Slice and others could use it
14:34
<
jokke >
so no point in implementing map! specifically for Slice
14:34
<
jokke >
that module sounds like lots of work though
14:35
<
jokke >
which is probably why no one has got around to it
14:35
<
BlaXpirit >
meh, just move some stuff from array into it and call it done
14:35
<
jokke >
i'll take a look
14:35
<
BlaXpirit >
jokke, well, first you'd have to make sure it's not against language creators' wishes
14:35
<
BlaXpirit >
i'm just hypothesising here
14:36
<
jokke >
i think it's easier to implement it and provide a pull request
14:36
<
jokke >
if they don't like it they can reject it
14:37
<
crystal-gh >
[crystal] technorama opened pull request #1615: Futures on objects. Solves some issues raised in #1589. (master...f/object_futures)
http://git.io/vcf13
14:42
<
BlaXpirit >
jokke, there are many interesting issues with this. for example, should there be a distinction for mutable/immutable random access container?
14:42
apt-get has quit [Ping timeout: 240 seconds]
14:43
<
jokke >
i was thinking about that myself
14:48
<
BlaXpirit >
also, we could just start with one that assumes mutable, then if needed add a general one, again move some functionality from mutable to it
14:48
<
BlaXpirit >
i dunno
15:04
apt-get has joined #crystal-lang
15:13
ssvb has joined #crystal-lang
15:24
pawnbox has quit [Remote host closed the connection]
15:32
rmosolgo has joined #crystal-lang
15:45
pawnbox has joined #crystal-lang
15:47
<
pawnbox >
jhass: I am not able to figure out how to monkey patch exit. I want to be able to exit from `Crystal::Init.run(["lib", "#{__DIR__}/tmp"])` and not the whole spec run instance.
15:48
<
jhass >
class Crystal::Init; def exit(status=0); end; end; ?
15:49
<
jokke >
jhass: how are backreferences of regexes used in crystal?
15:50
<
jhass >
>> "foo".gsub(/(.{2})/, "b\\1")
15:50
<
jhass >
>> "foo".gsub(/(.{2})/, "b\1")
15:51
<
jhass >
I guess its broken
15:51
<
jokke >
>> "Foo".gsub(/(.{2})/, "b#{$1}")
15:51
<
jhass >
>> "foo".gsub(/(.{2})/) {|m| "b#{m[1]}")
15:52
<
jhass >
>> "foo".gsub(/(.{2})/) {|m| "b#{m[1]}" }
15:53
<
jokke >
not in macro
15:55
<
pawnbox >
File.read("#{__DIR__}/test_stderr").should eq("file or directory #{__DIR__}/tmp already exists")
15:56
<
pawnbox >
jhass: I tried you version that also doesn't work. Above line does not execute.
15:57
<
jhass >
guess you have to use `crystal init foo` then and evaluate $?
15:57
<
jokke >
any way to get the type variables of a @type in macro context?
15:59
<
jokke >
asterite: ^
16:00
<
pawnbox >
what do you mean by using `crystal init foo`?
16:12
<
crystal-gh >
[crystal] rmosolgo opened pull request #1617: fix(alias) add alias keyword to example (gh-pages...alias-typo)
http://git.io/vcJLg
16:17
rmosolgo has quit [Remote host closed the connection]
16:32
rmosolgo has joined #crystal-lang
16:49
pawnbox has quit [Remote host closed the connection]
16:59
pawnbox has joined #crystal-lang
16:59
NeverDie has joined #crystal-lang
16:59
<
crystal-gh >
[crystal] jreinert opened pull request #1618: add type_vars method for type nodes in macros (master...type-vars)
http://git.io/vcJ8a
17:01
rmosolgo has quit [Remote host closed the connection]
17:01
<
crystal-gh >
[crystal] jhass closed pull request #1617: fix(alias) add alias keyword to example (gh-pages...alias-typo)
http://git.io/vcJLg
17:03
<
jhass >
pawnbox: I'm confused, your spec and the code doesn't go together
17:03
<
jhass >
the spec calls Crystal::Init.run(["lib", "#{__DIR__}/tmp"]) like I expect
17:04
<
jhass >
but "the code" and the the monkey patch makes no sense in relation to it
17:04
<
jhass >
so I have no clue as to what you're actually trying
17:19
<
grindhold >
what's the crystal-pendant to mutex.synchronize do ?
17:24
<
crystal-gh >
[crystal] adlerhsieh opened pull request #1619: Add documentation to Colorize class (master...master)
http://git.io/vcJEj
17:32
<
grindhold >
s/pendant/equivalent/
17:35
<
BlaXpirit >
grindhold, same thing..?
17:42
<
grindhold >
BlaXpirit: i get "undefined method 'synchronize' for Mutex:Class" for "Mutex.synchronize do"
17:43
<
grindhold >
aand i know what i got wrong
17:43
<
BlaXpirit >
grindhold, no, u need to use an instance of mutex
17:44
<
grindhold >
yeah it werks :)
18:14
havenwood has joined #crystal-lang
18:44
Ven has joined #crystal-lang
18:46
bmcginty has quit [Ping timeout: 250 seconds]
18:52
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
18:53
<
crystal-gh >
[crystal] jhass closed pull request #1613: ConditionVariable enhancements. (master...f/condition_variable)
http://git.io/vcflw
18:56
gamemanj has quit [Remote host closed the connection]
18:56
gamemanj has joined #crystal-lang
18:57
bmcginty has joined #crystal-lang
19:01
rmosolgo has joined #crystal-lang
19:04
Ven has joined #crystal-lang
19:06
rmosolgo has quit [Ping timeout: 268 seconds]
19:44
Ven has quit [Ping timeout: 260 seconds]
19:50
<
crystal-gh >
[crystal] jhass closed pull request #1600: Modified crystal init to check for pre-existing files and folders. (master...issue-1472-1555)
http://git.io/vnNQ1
19:55
Ven has joined #crystal-lang
20:08
<
jokke >
why is working with enums so painful?
20:08
<
jokke >
foo & MyEnum::FOO
20:08
<
jokke >
not working
20:09
<
jokke >
i need to add .value
20:12
tomchapin has joined #crystal-lang
20:13
<
jhass >
jokke: I think if you mark it with @[Flags] you don't
20:16
tomchapin has quit [Client Quit]
20:16
havenwood has joined #crystal-lang
20:18
tomchapin has joined #crystal-lang
20:22
<
jhass >
well at least |-ing works then
20:22
<
jokke >
no overload matches 'UInt8#&' with types HTTP::WebSocketFrame::Flags
20:23
<
jokke >
what use is it if you can't check if the flag is set?
20:32
Ven has quit [Read error: No route to host]
20:33
Ven has joined #crystal-lang
20:38
tomchapin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
20:39
<
jokke >
jhass: yeah sure
20:56
tomchapin has joined #crystal-lang
20:58
tomchapin has quit [Client Quit]
21:04
Ven has quit [Ping timeout: 265 seconds]
21:10
Ven has joined #crystal-lang
21:12
apt-get has quit [Remote host closed the connection]
21:15
gamemanj has quit [Ping timeout: 252 seconds]
21:28
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
21:57
pawnbox has quit [Remote host closed the connection]
22:01
ssvb has quit [Ping timeout: 246 seconds]
22:13
tomchapin has joined #crystal-lang
22:15
ssvb has joined #crystal-lang
22:44
trapped has quit [Read error: Connection reset by peer]
23:08
rmosolgo has joined #crystal-lang
23:09
rmosolgo has quit [Remote host closed the connection]
23:11
rmosolgo has joined #crystal-lang
23:12
BlaXpirit has quit [Quit: Konversation]
23:17
rmosolgo has quit [Remote host closed the connection]
23:32
tomchapin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
23:40
rmosolgo has joined #crystal-lang
23:50
rmosolgo has quit []
23:53
<
crystal-gh >
[crystal] asterite closed pull request #1585: add has_constant? macro method (master...has-constant)
http://git.io/vnHTK