00:19
ponga has joined #crystal-lang
00:23
ponga has quit [Ping timeout: 248 seconds]
00:41
bcardiff has joined #crystal-lang
00:41
DerisiveLogic has quit [Remote host closed the connection]
00:41
DerisiveLogic has joined #crystal-lang
00:55
strcmp1 has quit [Ping timeout: 264 seconds]
01:13
shama has joined #crystal-lang
01:24
bcardiff has quit [Quit: Leaving.]
01:35
ryanf_ is now known as ryanf
01:37
shama has quit [Remote host closed the connection]
01:57
shama has joined #crystal-lang
02:00
shama_ has joined #crystal-lang
02:03
shama has quit [Ping timeout: 265 seconds]
02:03
zipR4ND has joined #crystal-lang
02:07
chc4 has joined #crystal-lang
02:12
shama_ is now known as shama
02:12
strcmp1 has joined #crystal-lang
02:42
zipR4ND has quit [Ping timeout: 256 seconds]
03:05
ponga has joined #crystal-lang
03:10
ponga has quit [Ping timeout: 264 seconds]
03:11
<
crystal-gh >
crystal/master 1dcabc4 Ary Borenszweig: Fixed #576: when a class was inherited, only the direct superclass was being notified (missing recursive call)
03:20
<
travis-ci >
manastech/crystal#2260 (master - 1dcabc4 : Ary Borenszweig): The build passed.
03:28
shama has quit [Read error: Connection reset by peer]
03:28
shama has joined #crystal-lang
03:35
shama has quit [Read error: Connection reset by peer]
03:36
shama has joined #crystal-lang
03:59
shama has quit [Remote host closed the connection]
04:01
shama_ has joined #crystal-lang
04:04
strcmp1 has quit [Ping timeout: 256 seconds]
04:09
romanoff has joined #crystal-lang
04:10
romanoff has quit [Client Quit]
04:13
vikaton has quit [Quit: Connection closed for inactivity]
04:18
shama_ has quit [Remote host closed the connection]
04:26
Kache4 has joined #crystal-lang
04:53
chc4 has quit [Quit: AHHHHH BEES]
05:19
shama has joined #crystal-lang
05:24
shama has quit [Ping timeout: 276 seconds]
05:43
Kache4 has joined #crystal-lang
05:44
Kache4 has quit [Client Quit]
06:08
DerisiveLogic has quit [Remote host closed the connection]
06:09
DerisiveLogic has joined #crystal-lang
06:12
strcmp1 has joined #crystal-lang
06:51
ponga has joined #crystal-lang
06:55
ponga has quit [Ping timeout: 250 seconds]
07:12
BlaXpirit has joined #crystal-lang
07:30
ponga has joined #crystal-lang
07:37
dhruv has joined #crystal-lang
07:42
BlaXpirit has quit [Quit: Quit Konversation]
07:42
strcmp1 has quit [Ping timeout: 276 seconds]
08:01
Ven has joined #crystal-lang
08:01
colorisco has quit [Ping timeout: 250 seconds]
08:15
dhruv has quit [Ping timeout: 244 seconds]
09:02
BlaXpirit has joined #crystal-lang
09:29
<
BlaXpirit >
hidden integer division sucks
09:29
<
BlaXpirit >
took me more than an hour to debug because i didn't expect it
09:52
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
10:29
Ven has joined #crystal-lang
10:30
Ven has quit [Max SendQ exceeded]
10:39
DerisiveLogic has quit [Ping timeout: 250 seconds]
10:44
Ven has joined #crystal-lang
11:09
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
11:50
Ven has joined #crystal-lang
12:10
ponga has quit [Remote host closed the connection]
12:11
BlaXpirit_ has joined #crystal-lang
12:14
BlaXpirit has quit [Ping timeout: 240 seconds]
12:31
DerisiveLogic has joined #crystal-lang
12:31
DerisiveLogic has quit [Remote host closed the connection]
12:32
DerisiveLogic has joined #crystal-lang
12:41
ponga has joined #crystal-lang
12:48
zipR4ND has joined #crystal-lang
12:50
Ven has quit [Read error: No route to host]
12:50
ponga has quit [Remote host closed the connection]
13:28
ponga has joined #crystal-lang
13:40
zipR4ND has quit [Ping timeout: 250 seconds]
13:44
Ven has joined #crystal-lang
13:54
vikaton has joined #crystal-lang
14:10
JBat has joined #crystal-lang
14:11
wanderer_ has joined #crystal-lang
14:15
wanderer_ has quit [Ping timeout: 246 seconds]
14:18
HakanD has joined #crystal-lang
14:33
DerisiveLogic has quit [Ping timeout: 256 seconds]
15:07
HakanD_ has joined #crystal-lang
15:09
HakanD has quit [Ping timeout: 248 seconds]
15:26
jhass has quit [Quit: Bye]
15:28
jhass has joined #crystal-lang
15:48
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
15:52
Ven has joined #crystal-lang
15:54
havenwood has joined #crystal-lang
15:59
HakanD_ has quit [Quit: Be back later ...]
16:05
HakanD_ has joined #crystal-lang
16:11
<
vikaton >
I wonder where asterite si
16:59
wanderer_ has joined #crystal-lang
17:00
wanderer_ has quit [Client Quit]
17:01
wanderer_ has joined #crystal-lang
17:05
wanderer_ has quit [Ping timeout: 246 seconds]
17:18
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
17:19
HakanD_ has quit [Quit: Be back later ...]
17:22
HakanD_ has joined #crystal-lang
17:30
Dreamer3_ has joined #crystal-lang
17:30
<
Dreamer3_ >
where can i find documentation on {%
17:31
<
jhass >
I don't think there's any yet
17:31
<
jhass >
are you talking about macros or ecr?
17:33
<
Dreamer3_ >
no idea looks like pre-processor directives for generating code that you could do at runtime in ruby since it's truly dynamic
17:33
<
Dreamer3_ >
{% for method in %w(get post put delete patch) %}
17:33
<
jhass >
that's macro code, yeah
17:35
<
jhass >
do you have any question about it?
18:04
HakanD_ has quit [Ping timeout: 264 seconds]
18:22
strcmp1 has joined #crystal-lang
19:04
yawniek has quit [Remote host closed the connection]
19:26
HakanD_ has joined #crystal-lang
20:07
havenn has joined #crystal-lang
20:11
havenwood has quit [Ping timeout: 272 seconds]
20:15
havenn has quit [Ping timeout: 252 seconds]
20:15
havenwood has joined #crystal-lang
20:31
DerisiveLogic has joined #crystal-lang
20:36
DerisiveLogic has quit [Ping timeout: 245 seconds]
20:37
DerisiveLogic has joined #crystal-lang
21:17
JBat has quit [Quit: Computer has gone to sleep.]
21:20
dhruv has joined #crystal-lang
21:24
shama has joined #crystal-lang
21:29
<
Dreamer3_ >
what language is it? crystal inside crystal?
21:30
<
jhass >
no, the macro language is something on its own
21:30
<
jhass >
more like a templating language
21:30
<
jhass >
to generate code
21:36
<
Dreamer3_ >
i could have sworn i saw docs on blocks somewhere so you could change self inside the block
21:36
<
Dreamer3_ >
where was that?
21:38
<
jhass >
not sure, but you can change the context of a block with the with context yield statement
21:40
<
Dreamer3_ >
example?
21:40
<
Dreamer3_ >
found it
21:40
<
Dreamer3_ >
but that's only with default block
21:41
<
Dreamer3_ >
is there a way to do it with a specific block?
21:41
<
jhass >
not that I'm aware of
21:42
<
Dreamer3_ >
no instance_eval i assume?
21:42
<
jhass >
but you can easily write a helper that does it: def run_with_scope(scope); with scope yield; end; run_with_scope &some_proc
21:42
<
jhass >
no, no instance_eval
21:42
<
Dreamer3_ >
ah, good point :)
21:42
<
jhass >
with x yield is the sort of replacement for it
21:43
<
Dreamer3_ >
no crystal syntax for TM or Sublime yet?
21:44
<
jhass >
asterite still didn't add it to packagecontrol :/
21:45
<
Dreamer3_ >
so blocks can't be optional method arguments?
21:45
<
BlaXpirit_ >
jhass, i finally got around to utilizing your code for classmethod constructors. works nicely, thanks.
21:45
<
BlaXpirit_ >
what's the license on it? :p
21:46
<
jhass >
BlaXpirit_: consider stuff I post to IRC public domain ;D
21:46
HakanD_ has quit [Quit: Be back later ...]
21:47
<
jhass >
Dreamer3_: no, but it counts into the method signature, so you can add an overload that doesn't take a block
21:47
<
Dreamer3_ >
ah i see
21:47
<
Dreamer3_ >
forget about that :)
21:50
<
Dreamer3_ >
does yield not work inside initializers
21:50
<
Dreamer3_ >
does yield not work inside initializers
21:51
<
Dreamer3_ >
but is `self.yield` not expected to work?
21:51
<
Dreamer3_ >
i want to yield with the new class as the scope
21:51
<
jhass >
no, that syntax is obsolete, it's with self yield now
21:51
<
Dreamer3_ >
"self yield"?
21:52
<
jhass >
>> class Foo; property bar; def initialize; with self yield; end; end; Foo.new { self.bar = 1 }.bar
21:52
<
DeBot >
jhass: in line 3: there's no self in this scope
21:52
<
jhass >
>> class Foo; property bar; def initialize; @bar = 1; with self yield; end; end; Foo.new { p bar }
21:52
<
DeBot >
jhass: in line 3: undefined local variable or method 'bar'
21:53
<
jhass >
well, looks that doesn't work yet :/
21:53
<
jhass >
weird, I thought I did that already
21:53
<
BlaXpirit_ >
i never remembered this
21:53
<
BlaXpirit_ >
how to deal with nillable type?
21:53
<
BlaXpirit_ >
a function may return nil, but i know it won't be
21:54
<
BlaXpirit_ >
how do i use the return value?
21:54
<
Dreamer3_ >
i don't hit that error but i get undefined method 'get' when it should work if the scope was right
21:54
<
jhass >
BlaXpirit_: .try or .not_nil!
21:55
<
Dreamer3_ >
jhass: so the problem i using it inside init?
21:59
<
BlaXpirit_ >
hm, no opengl bindings
22:01
<
vikaton >
>> 0x0539 + 1
22:01
<
DeBot >
vikaton: 1338
22:01
<
BlaXpirit_ >
has very few functions
22:01
<
BlaXpirit_ >
maybe it's like bindings only for modern opengl
22:01
<
BlaXpirit_ >
or an arbitrary subset, whatever
22:01
<
BlaXpirit_ >
i want glVertex2f :D
22:02
<
BlaXpirit_ >
nothing important, just to port a simple sfml example
22:02
<
jhass >
I guess just quickly bind it by hand :P
22:03
<
BlaXpirit_ >
yeah, that's what i just thought
22:16
<
Dreamer3_ >
even trying to save the block to an instance variable seems to want to "run" it and throws an error
22:16
<
Dreamer3_ >
before i can even try to run it later
22:17
<
Dreamer3_ >
@block = block
22:17
<
Dreamer3_ >
blows up with the same error, without me even trying to run the block
22:17
<
jhass >
>> class Foo; getter code; def initialize(&@code); end; end; Foo.new { p "hey" }
22:17
<
DeBot >
jhass: #<Foo:0x98BBFF0 @code=#<( -> Void):0x8049E00>>
22:17
<
jhass >
>> class Foo; getter code; def initialize(&@code); end; end; Foo.new { p "hey" }.code.call
22:17
<
DeBot >
jhass: in /usr/lib/crystal/io.cr:339: undefined method 'inspect' for Void
22:17
<
jhass >
>> class Foo; getter code; def initialize(&@code); end; end; Foo.new { p "hey" }.code.call; 1
22:17
<
DeBot >
jhass: "hey"
22:18
<
Dreamer3_ >
must i set a getter?
22:18
<
Dreamer3_ >
if i'm only going to use it internally?
22:18
<
jhass >
>> class Foo; def initialize(&code); @code = code; end; def invoke; @code.call; end; Foo.new { p "hey" }
22:18
<
DeBot >
jhass: Syntax error in eval:7: expecting identifier 'end', not 'EOF'
22:19
<
jhass >
>> class Foo; def initialize(&code); @code = code; end; def invoke; @code.call; end; end; Foo.new { p "hey" }
22:19
<
DeBot >
jhass: #<Foo:0x9A0AFF0 @code=#<( -> Void):0x8049E00>>
22:19
<
jhass >
>> class Foo; def initialize(&code); @code = code; end; def invoke; @code.call; end; end; Foo.new { p "hey" }.invoke
22:19
<
DeBot >
jhass: in /usr/lib/crystal/io.cr:339: undefined method 'inspect' for Void
22:19
<
jhass >
>> class Foo; def initialize(&code); @code = code; end; def invoke; @code.call; end; end; Foo.new { p "hey" }.invoke; 1
22:19
<
DeBot >
jhass: "hey"
22:19
<
jhass >
seems to work :)
22:19
<
Dreamer3_ >
define a method on your class and try to call it from inside the block
22:20
<
jhass >
well yeah, the context changing is still a bit wonky I guess
22:20
<
Dreamer3_ >
>> 1 + 1
22:20
<
DeBot >
Dreamer3_: 2
22:20
<
jhass >
especially for a captured block
22:20
<
Dreamer3_ >
class Foo; def get; end; def initialize(&code); @code = code; end; def invoke; @code.call; end; end; Foo.new { get() }.invoke; 1
22:20
<
jhass >
so for now the saner choice might to just yield self
22:20
<
Dreamer3_ >
class Foo; def get(); end; def initialize(&code); @code = code; end; def invoke; @code.call; end; end; Foo.new { get() }.invoke; 1
22:21
<
jhass >
prefix with >>
22:21
<
Dreamer3_ >
>> class Foo; def get(); end; def initialize(&code); @code = code; end; def invoke; @code.call; end; end; Foo.new { get() }.invoke; 1
22:21
<
DeBot >
Dreamer3_: Error in line 3: undefined method 'get' (did you mean 'gets'?)
22:21
<
Dreamer3_ >
yield self how?
22:21
<
Dreamer3_ >
this is all because yielding self didn't seem to work :)
22:21
<
jhass >
>> class Foo; def get; end; def initialize(&code); @code = code; end; def invoke; @code.call(self); end; end; Foo.new {|x| x.get }.invoke; 1
22:21
<
DeBot >
jhass: Error in line 3: wrong number of block arguments (1 for 0)
22:21
<
jhass >
>> class Foo; def get; end; def initialize(&code : self ->); @code = code; end; def invoke; @code.call(self); end; end; Foo.new {|x| x.get }.invoke; 1
22:21
<
DeBot >
jhass: Error in line 3: undefined method 'get' for Foo:Class
22:22
<
jhass >
>> class Foo; def get; end; def initialize(&code : Foo ->); @code = code; end; def invoke; @code.call(self); end; end; Foo.new {|x| x.get }.invoke; 1
22:22
<
Dreamer3_ >
yeah i did'nt want to have to pass it to itself
22:22
<
Dreamer3_ >
that stopped being cool in Ruby like 5 years ago :)
22:23
<
jhass >
>> class Foo; def get; end; def initialize(&code); @code = code; end; def run_with_self; with self yield; end; def invoke; run_with_self &@code; end; end; Foo.new { get }.invoke; 1
22:23
<
DeBot >
jhass: Error in line 3: undefined local variable or method 'get' (did you mean 'gets'?)
22:23
<
jhass >
worth a try
22:23
<
jhass >
it just doesn't work well for captured blocks yet (or not at all)
22:24
<
jhass >
since tracking what the proc might be invoked with is very hard that way
22:24
<
jhass >
keep in mind the compiler needs to analyze that to type it correctly
22:29
<
Dreamer3_ >
trying to figure out what the diff is... Moonshine's code seems to let it save blocks for later
22:29
<
Dreamer3_ >
telling it the block in/out types doens't seem to help any
22:32
<
Dreamer3_ >
telling it the block in/out types doens't seem to help any
22:33
DerisiveLogic has quit [Ping timeout: 244 seconds]
22:42
dhruv has quit [Ping timeout: 248 seconds]
22:42
<
BlaXpirit_ >
>> fail ":("
22:42
<
DeBot >
BlaXpirit_: Error in line 3: undefined method 'fail'
22:44
<
vikaton >
>> raise "?"
22:44
<
DeBot >
vikaton: Exception: ?
22:45
<
BlaXpirit_ >
uh thanks
22:47
<
Dreamer3_ >
and now i hit a real bug in the compiler
22:48
<
Dreamer3_ >
and now i hit a real bug in the compiler
22:48
<
jhass >
you test with crystal head though?
22:48
<
Dreamer3_ >
no, installing via homebrew, how old is that?
22:48
<
Dreamer3_ >
Crystal 0.6.1 [48461ba] (Wed Mar 4 22:59:12 UTC 2015)
22:49
<
Dreamer3_ >
kinda of ol
22:49
<
jhass >
head as tons of fixes, yeah
22:50
<
jhass >
and if that worked out /path/to/crystal/bin/crystal to invoke it
22:51
<
ponga >
jhass: im on 0.6.0 is 0.6.1 update worth it
22:52
<
jhass >
you ask an archlinux user if updating something is worth it? :P
22:53
<
strcmp1 >
has arch linux reinstated the installer yet
22:53
<
ponga >
jhass: i installed it thru homebrew, can i update it with homebrew?
22:54
<
jhass >
strcmp1: no, but there's antergos which is basically a graphical installer for arch
22:54
<
jhass >
ponga: I'd expect so
22:54
<
ponga >
it gives warning its already installed
22:55
<
ponga >
uninstall crystal then install again?
22:55
<
jhass >
I have no clue about the os x stuff
22:55
<
ponga >
jhass: brew install fetches 0.6.0
22:55
<
jhass >
you probably need to update some index or so?
22:58
<
BlaXpirit_ >
instead of wasting time on random kinda-related libs someone should just make good bindings for GL and perhaps GLU
22:58
<
ponga >
jhass: solved, thanks
22:58
<
ponga >
i often forget this
22:59
DerisiveLogic has joined #crystal-lang
22:59
DerisiveLogic has quit [Remote host closed the connection]
22:59
DerisiveLogic has joined #crystal-lang
23:07
ponga has quit [Quit: Leaving...]
23:07
<
vikaton >
No problem Blax xP
23:08
<
vikaton >
BlaXpirit_: Also, some of those are just PoCs
23:11
BlaXpirit_ has quit [Quit: Quit Konversation]
23:11
<
Dreamer3_ >
ok lets try this again
23:11
<
Dreamer3_ >
installing llvm 3.5.1
23:11
<
Dreamer3_ >
36 didn't seem to do the trick
23:17
leafybasil has joined #crystal-lang
23:18
<
Dreamer3_ >
i have no idea how you'd compile crystal if your compiler got too old
23:20
<
jhass >
if there are no prebuilt binaries, you'd advance from version to version
23:23
<
Dreamer3_ >
yeah i guess
23:23
<
Dreamer3_ >
with git tags i suppose that would be doable
23:23
<
Dreamer3_ >
still building llvm, damn
23:23
<
jhass >
yeah, building llvm takes forever
23:25
<
Dreamer3_ >
ld: library not found for -levent
23:25
<
jhass >
yeah, libevent is now required
23:27
<
Dreamer3_ >
brew install libevent didn't seem to change antyhing
23:33
<
Dreamer3_ >
any idea?
23:34
<
Dreamer3_ >
building libevent from source vs bottle but dunno if that matters
23:34
<
jhass >
no, as said I never touched os x :/
23:36
strcmp1 has quit [Ping timeout: 250 seconds]
23:41
<
vikaton >
Dreamer3_ I was in your shoes with my debian vps, I just gave up till next release
23:47
DerisiveLogic has quit [Ping timeout: 264 seconds]
23:52
<
Dreamer3_ >
ok i just need to know how to pass the correct location of the event lib to make
23:52
<
Dreamer3_ >
it doesn't like it in .brew