00:07
<
Dreamer3_ >
--link-flags doens't seem to have any effect :(
00:10
<
vikaton >
anyone here want postgres driver with Crystal?
00:35
<
Dreamer3_ >
i can't compile with the compiler i compile
00:38
<
Dreamer3_ >
Using compiled compiler at .build/crystal
00:38
<
Dreamer3_ >
or maybe it's not meant to work from inside the same dir?
00:38
<
Dreamer3_ >
that kind of makes sense but there should also be some easy way to test compiling with a just compiled compiler, no?
00:41
asterite has joined #crystal-lang
00:41
<
asterite >
Dreamer3_: you have to have LLVM on the path
00:41
<
Dreamer3_ >
that's not the issue
00:41
<
Dreamer3_ >
trying it again moving .build to .built and changing the makefile to use that
00:42
<
vikaton >
asterite: for the next release, will you be able to do this?: def foo(x,y): (Int32, Int32); return (x,y); end; ?
00:42
<
Dreamer3_ >
makefile sets path to include llvm
00:42
<
asterite >
You mean, specify a tuple as a return type?
00:43
<
vikaton >
I guess yeah
00:43
<
asterite >
Yes, but the syntax is {Int32, Int32}
00:43
<
vikaton >
asterite: do you have a twitter? :P
00:43
<
Dreamer3_ >
asterite: any other suggestions?
00:44
<
Dreamer3_ >
the compile works the first time
00:44
<
Dreamer3_ >
but i can't compile the compiler with my compiler version
00:44
<
Dreamer3_ >
*compiled
00:44
<
Dreamer3_ >
not sure what stage bc+obj is
00:44
<
asterite >
I have, it's asterite
00:45
<
asterite >
I go by asterite everywhere, nobody seems to like that character as much as I do :-P
00:46
<
asterite >
Dreamer3_: do you have any llvm-config binary in the shell you are doing that?
00:47
<
asterite >
doing llvm-config (or its versioned variants) should work for crystal to compile
00:47
HakanD_ has joined #crystal-lang
00:48
<
Dreamer3_ >
i don't think that's it
00:48
<
Dreamer3_ >
agian the first time it compiled just fine
00:48
<
vikaton >
asterite: you should follow @shardscrystal so you can be up2date on new crystal projects xP
00:48
<
Dreamer3_ >
it works
00:48
<
Dreamer3_ >
then i try to use the compiled one and it all falls apart (using same makefile, just changing the executable)
00:49
<
asterite >
Strange. Gotta go now, but the trace looks like it can't link against llvm for some reason
00:49
<
Dreamer3_ >
maybe homebrew is doing somethin gweird
00:50
asterite has quit [Quit: Page closed]
00:51
<
Dreamer3_ >
ok lets try this agian
00:51
HakanD_ has quit [Ping timeout: 248 seconds]
00:51
<
Dreamer3_ >
ok now it works
00:51
<
Dreamer3_ >
you might have been right
00:51
<
Dreamer3_ >
but the makfile is so borked
00:52
<
Dreamer3_ >
brew --prefix llvm36 is nothing
00:52
<
Dreamer3_ >
my llvm is "llvm" no number
00:52
<
Dreamer3_ >
and no idea why it compiled the FIRST time
00:52
<
Dreamer3_ >
maybe it's compiling the path to LLVM in the compiler?
00:56
<
Dreamer3_ >
why would it work the first time thru?
00:56
leafybasil has quit [Remote host closed the connection]
00:59
<
Dreamer3_ >
beacuse homebrew hacks bin/crystal to hardwire the LLVM path that is knows is correct
00:59
<
Dreamer3_ >
tisk tisk
01:00
<
Dreamer3_ >
now, what should be done about all this
01:20
endou_________ has quit [Ping timeout: 256 seconds]
01:20
jtarchie has quit [Ping timeout: 256 seconds]
01:22
endou_________ has joined #crystal-lang
01:23
jtarchie has joined #crystal-lang
01:25
<
crystal-gh >
[crystal] yyyc514 opened pull request #582: version of llvm should not be hardcoded (master...master)
http://git.io/vfypJ
01:25
<
Dreamer3_ >
annoying
01:31
<
vikaton >
Dreamer3_: :D
01:37
<
Dreamer3_ >
annoyingha
01:37
<
Dreamer3_ >
great my app won't compile on the latest version
01:41
<
Dreamer3_ >
ld: library not found for -lgc
01:41
<
Dreamer3_ >
now what am i missing
01:46
<
crystal-gh >
[crystal] yyyc514 opened pull request #583: libevent and boehmgc seem to be required now (gh-pages...patch-1)
http://git.io/vfSek
02:18
<
Dreamer3_ >
i think with self yield is totally weird now
02:18
<
Dreamer3_ >
it seems to do the opposite
03:23
<
Dreamer3_ >
with blah yield doesn't seem useful unless you do it immediately as soon as the first method has the block
03:23
<
Dreamer3_ >
seems you can't really pass blocks around
03:24
<
Dreamer3_ >
at least not expecting any sane behavior
03:25
DerisiveLogic has joined #crystal-lang
03:25
DerisiveLogic has quit [Remote host closed the connection]
03:25
DerisiveLogic has joined #crystal-lang
03:59
<
Dreamer3_ >
at least not expecting any sane behavior
04:39
havenn has joined #crystal-lang
04:42
sadin has joined #crystal-lang
04:43
havenwood has quit [Ping timeout: 256 seconds]
04:48
dhruv has joined #crystal-lang
04:58
Kache4 has joined #crystal-lang
05:01
dhruv has quit [Ping timeout: 244 seconds]
05:23
vikaton has quit [Quit: Connection closed for inactivity]
06:02
ponga has joined #crystal-lang
06:47
havenn has quit [Remote host closed the connection]
07:06
shama has quit [Quit: (╯°□°)╯︵ɐɯɐɥs]
07:29
HakanD_ has joined #crystal-lang
07:30
HakanD__ has joined #crystal-lang
07:34
HakanD_ has quit [Ping timeout: 255 seconds]
07:59
BlaXpirit has joined #crystal-lang
08:13
DerisiveLogic has quit [Ping timeout: 264 seconds]
10:04
HakanD__ has quit [Quit: Be back later ...]
10:19
HakanD__ has joined #crystal-lang
11:53
vikaton has joined #crystal-lang
12:07
ponga has quit [Remote host closed the connection]
12:08
ponga has joined #crystal-lang
12:10
BlaXpirit_ has joined #crystal-lang
12:14
BlaXpirit has quit [Ping timeout: 252 seconds]
12:17
ponga has quit [Ping timeout: 250 seconds]
12:23
HakanD__ has quit [Quit: Be back later ...]
12:24
HakanD__ has joined #crystal-lang
12:28
HakanD__ has quit [Ping timeout: 240 seconds]
12:29
HakanD__ has joined #crystal-lang
12:43
flan3002 has quit [Ping timeout: 264 seconds]
12:43
ponga has joined #crystal-lang
12:45
flan3002 has joined #crystal-lang
12:59
Dreamer3_ is now known as Dreamer3
13:08
<
Dreamer3 >
what is the purpose of an abstract class?
13:10
<
Dreamer3 >
trying to understand the variable scoping code in the compiler
13:13
<
jhass >
personally I still claim they're redundant to modules, the main reason for their addition was that it allowed for some huge speed optimizations in the type interference algorithm I heard
13:16
<
Dreamer3 >
semantic/call.cr is not easy reading
13:18
<
jhass >
yeah, I didn't dig into the compiler code much yet
13:23
havenwood has joined #crystal-lang
13:57
asterite has joined #crystal-lang
14:04
<
Dreamer3 >
is there any support for dynamic dispatch?
14:09
<
jhass >
if you mean what I think you mean with that, no
14:10
DerisiveLogic has joined #crystal-lang
14:11
<
ponga >
"if you mean what i think you mean" , English was never difficult
14:11
* ponga
shakes his head
14:15
DerisiveLogic has quit [Ping timeout: 245 seconds]
14:31
ismaelga has joined #crystal-lang
14:32
<
Dreamer3 >
i mean no way to turn resources :dogs into Dog class or "dogs#create" into Dogs.call(:create)
14:34
<
jhass >
not runtime, no
14:34
<
jhass >
it should be possible with a macro though
14:36
<
Dreamer3 >
how can i specify the in/out requirements when using the short proc notation?
14:37
<
jhass >
I'm not sure what you mean
14:38
<
jhass >
you can't directly specify the return type of a proc literal
14:38
<
jhass >
you can give the compiler a good hint though by casting the return value
14:38
<
jhass >
though that's only a workaround for when the type interference fails
14:39
<
Dreamer3 >
route "/test", -> (request : Moonshine::Request ) { Dogs.new.all(request) }
14:39
<
Dreamer3 >
def route(regex, &block : Moonshine::Request -> Moonshine::Response)
14:39
<
Dreamer3 >
trying to make that work
14:39
<
Dreamer3 >
but for some reason it's not lining up
14:39
<
Dreamer3 >
i'm guessing because the types don't match
14:41
<
asterite >
If it's &block, you just pass a block in the caller: route "test" { |request| Dogs.new.all(request) }
14:41
ponga has quit [Remote host closed the connection]
14:41
<
asterite >
but Dogs.new.all(request) must be Moonshine::Response
14:42
<
asterite >
Otherwise you can define it without the & and pass it as you are passing it now, with the arrow
14:44
<
asterite >
Shouldn't it always be crsfml and not csfml?
14:44
<
Dreamer3 >
any docs on macros?
14:44
<
BlaXpirit_ >
ok let's say I change everything to crsfml, what then>
14:45
<
BlaXpirit_ >
maybe if I do actually change it, everything will fix itself
14:45
<
Dreamer3 >
any docs on macros?
14:48
<
asterite >
BlaXpirit_: yes, I think so
14:48
<
BlaXpirit_ >
doesn't appear so, asterite
14:49
<
BlaXpirit_ >
now i have libs/crsfml/crsfml/graphics
14:53
dhruv has joined #crystal-lang
14:54
<
Dreamer3 >
trying to figure out how to build a smart router without dynamic dispatch
14:57
<
Dreamer3 >
that all works in latest?
14:57
<
Dreamer3 >
i thought macros were maybe going away?
14:58
<
Dreamer3 >
but i can't run real code there right?
14:58
<
Dreamer3 >
can't do :exclude => [:index]
14:58
<
jhass >
limited, see the json_mapping macro for example
15:00
<
Dreamer3 >
yeave i have it local
15:03
<
Dreamer3 >
what is the templating language?
15:03
<
Dreamer3 >
looks just like crystal sometimes
15:03
<
Dreamer3 >
and you're doing first, capitalize, split is_a?
15:04
bcardiff has joined #crystal-lang
15:04
<
Dreamer3 >
ok so that's the documentation for now :)
15:05
<
jhass >
as you can see it's quite easy to add new macro methods
15:05
<
jhass >
you find the right AST node you want to call it on and add a branch to the case when
15:05
<
jhass >
then recompile the compiler
15:18
HakanD__ has quit [Quit: Be back later ...]
15:19
<
Dreamer3 >
ok ECR is neatish
15:22
bcardiff has quit [Quit: Leaving.]
15:23
DerisiveLogic has joined #crystal-lang
15:25
leex_ is now known as leex
15:26
bcardiff has joined #crystal-lang
15:28
<
Dreamer3 >
do macros know anything about the current compile scope?
15:29
<
jhass >
uh, I don't know, we gotta ask asterite about that
15:30
<
jhass >
or maybe precise what you want to do first :)
15:30
<
Dreamer3 >
class Dog; def index; render "blah"... generates def _render_dog_blah, etc
15:30
<
asterite >
>> macro foo; {{@type.stringify}}; end; class Foo; def bar; foo; end; end; Foo.new.bar
15:30
<
DeBot >
asterite: "Foo"
15:32
<
Dreamer3 >
jhass: grrrr you paste is gone
15:32
<
Dreamer3 >
can you repaste and i'll save?
15:32
<
Dreamer3 >
i'm spoiled by pasties being forever
15:32
<
jhass >
eh, right default time is 30 minutes :D
15:32
<
Dreamer3 >
thought i could just save a link
15:33
<
jhass >
as said, just meant as a rough idea/to show some concepts
15:33
<
Dreamer3 >
i got it :)
15:37
asterite has quit [Ping timeout: 246 seconds]
15:48
JBat has joined #crystal-lang
16:09
bcardiff has quit [Quit: Leaving.]
16:10
<
Dreamer3 >
jhass: did you have that laying around or wrote that just for me?
16:17
<
jhass >
I just wrote that up
16:17
<
jhass >
it's no big deal once you grasp macros ;)
16:24
bcardiff has joined #crystal-lang
16:30
shama has joined #crystal-lang
16:31
bcardiff has quit [Quit: Leaving.]
16:53
dhruv has quit [Ping timeout: 245 seconds]
17:04
Kache4 has joined #crystal-lang
17:33
DerisiveLogic has quit [Ping timeout: 240 seconds]
17:37
DerisiveLogic has joined #crystal-lang
17:37
DerisiveLogic has quit [Remote host closed the connection]
17:38
DerisiveLogic has joined #crystal-lang
17:38
<
crystal-gh >
crystal/master f826bdf Ary Borenszweig: Optimized Slice#to_a
17:38
ismaelga has quit [Remote host closed the connection]
17:59
<
Dreamer3 >
&handler : Frank::Context -> _)
17:59
<
Dreamer3 >
what is _ ?
18:00
<
jhass >
didn't know you can use that as type
18:01
<
jhass >
>> def foo(&block : String -> _); typeof(block); end; foo do |s| "f" end
18:01
<
DeBot >
jhass: Syntax error in eval:3: expecting identifier 'end', not 'do'
18:01
<
jhass >
>> def foo(&block : String -> _); typeof(block); end; foo {|s| "f"; }
18:01
<
DeBot >
jhass: (String -> String)
18:02
<
jhass >
>> def foo(&block : String -> _); typeof(block); end; foo {|s| 1; }
18:02
<
DeBot >
jhass: (String -> Int32)
18:02
<
jhass >
>> def foo(&block : String -> _); typeof(block); end; foo {|s| 1; }; foo {|s| "f"; }
18:02
<
DeBot >
jhass: (String -> String)
18:02
<
jhass >
>> def foo(&block : String -> _); typeof(_); end; foo {|s| 1; }
18:02
<
DeBot >
jhass: Syntax error in eval:3: unexpected token: UNDERSCORE
18:02
<
jhass >
apparently "accept whatever"
18:03
<
jhass >
>> def foo(&block : String ->); typeof(block); end; foo {|s| 1; }
18:03
<
DeBot >
jhass: (String -> Void)
18:03
<
Dreamer3 >
interesting
18:04
<
Dreamer3 >
i guess the return type really doesn't matter in the case where this is being used
18:04
<
travis-ci >
manastech/crystal#2262 (master - f826bdf : Ary Borenszweig): The build passed.
18:13
DerisiveLogic has quit [Ping timeout: 256 seconds]
18:22
DerisiveLogic has joined #crystal-lang
18:25
ismaelga has joined #crystal-lang
18:32
ismaelga has quit [Remote host closed the connection]
18:34
ismaelga has joined #crystal-lang
18:51
ismaelga has quit [Remote host closed the connection]
19:10
DerisiveLogic has quit [Ping timeout: 250 seconds]
19:25
zipR4ND has joined #crystal-lang
19:32
zipR4ND has quit [Ping timeout: 256 seconds]
19:37
HakanD__ has joined #crystal-lang
19:48
JBat has quit [Quit: Computer has gone to sleep.]
20:33
<
BlaXpirit_ >
procrastination is nice
20:48
ssvb has joined #crystal-lang
20:50
zipR4ND has joined #crystal-lang
21:02
<
vikaton >
heh nice BlaXpirit_
21:16
Dreamer3 has quit [Quit: Computer has gone to sleep.]
21:21
DerisiveLogic has joined #crystal-lang
21:34
HakanD__ has quit [Quit: Be back later ...]
21:35
HakanD__ has joined #crystal-lang
21:39
HakanD__ has quit [Ping timeout: 250 seconds]
21:45
bcardiff has joined #crystal-lang
21:53
DerisiveLogic has quit [Ping timeout: 252 seconds]
22:11
bcardiff has quit [Quit: Leaving.]
22:28
BlaXpirit_ has quit [Quit: Quit Konversation]
23:06
fowl has joined #crystal-lang
23:07
ismaelga has joined #crystal-lang
23:14
leafybasil has joined #crystal-lang
23:18
waterlink has joined #crystal-lang
23:21
zipR4ND has quit [Ping timeout: 248 seconds]
23:28
bcardiff has joined #crystal-lang
23:28
ismaelga has quit [Remote host closed the connection]
23:33
ponga has joined #crystal-lang
23:37
ponga has quit [Remote host closed the connection]
23:43
bcardiff has quit [Quit: Leaving.]
23:48
<
waterlink >
Just got this: Could not raise Program terminated abnormally with error code: 1280. Any idea what that could mean?
23:55
<
crystal-gh >
crystal/master f29ed84 Ary Borenszweig: Added Pointer#clear
23:55
<
crystal-gh >
crystal/master 4bd4b07 Ary Borenszweig: Clear pointer values when doing Array#pop and other methods that shrink an array. Fixes #580