jhass changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.7.2 | Paste > 3 lines of text to https://gist.github.com | GH: https://github.com/manastech/crystal - Docs: http://crystal-lang.org/docs/ | API: http://crystal-lang.org/api/ | Logs: http://irclog.whitequark.org/crystal-lang
bcardiff has quit [Client Quit]
DerisiveLogic has joined #crystal-lang
zamith has quit [Quit: Be back later ...]
aemadrid has quit [Quit: Connection closed for inactivity]
mdz_ has joined #crystal-lang
mdz_ has quit [Ping timeout: 255 seconds]
datanoise has quit [Ping timeout: 272 seconds]
Cidan is now known as zz_Cidan
zamith has joined #crystal-lang
c355E3B has quit [Quit: Connection closed for inactivity]
zamith has quit [Ping timeout: 252 seconds]
Locke23rus has quit [Remote host closed the connection]
zamith has joined #crystal-lang
emmanueloga has quit [Read error: Connection reset by peer]
endou_________ has quit [Read error: Connection reset by peer]
willl has quit [Read error: Connection reset by peer]
willl has joined #crystal-lang
emmanueloga has joined #crystal-lang
zamith has quit [Ping timeout: 272 seconds]
endou_________ has joined #crystal-lang
datanoise has joined #crystal-lang
zamith has joined #crystal-lang
orliesaurus has quit [Ping timeout: 272 seconds]
zamith has quit [Ping timeout: 264 seconds]
orliesaurus has joined #crystal-lang
shama has quit [Quit: (╯°□°)╯︵ɐɯɐɥs]
mdz_ has joined #crystal-lang
zamith has joined #crystal-lang
zamith has quit [Ping timeout: 264 seconds]
zamith has joined #crystal-lang
zamith has quit [Ping timeout: 255 seconds]
zamith has joined #crystal-lang
zamith has quit [Ping timeout: 258 seconds]
mdz_ has quit [Remote host closed the connection]
mdz_ has joined #crystal-lang
mdz_ has quit [Ping timeout: 276 seconds]
zamith has joined #crystal-lang
zamith has quit [Ping timeout: 256 seconds]
unshadow has quit [Quit: leaving]
BlaXpirit has joined #crystal-lang
zamith has joined #crystal-lang
zamith has quit [Ping timeout: 272 seconds]
zamith has joined #crystal-lang
zamith has quit [Ping timeout: 250 seconds]
datanoise has quit [Ping timeout: 272 seconds]
Ven has joined #crystal-lang
havenwood has quit [Quit: Textual IRC Client: www.textualapp.com]
zamith has joined #crystal-lang
zamith has quit [Ping timeout: 276 seconds]
datanoise has joined #crystal-lang
zipR4ND has joined #crystal-lang
zipR4ND has quit [Ping timeout: 264 seconds]
datanoise has quit [Ping timeout: 258 seconds]
zamith has joined #crystal-lang
zamith has quit [Ping timeout: 255 seconds]
zamith has joined #crystal-lang
DerisiveLogic has quit [Ping timeout: 264 seconds]
zamith has quit [Quit: Be back later ...]
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
zamith has joined #crystal-lang
zamith has quit [Client Quit]
zamith has joined #crystal-lang
zamith has quit [Client Quit]
zamith_ has joined #crystal-lang
datanoise has joined #crystal-lang
mdz_ has joined #crystal-lang
mdz_ has quit [Ping timeout: 245 seconds]
zipR4ND has joined #crystal-lang
<zipR4ND> hey jhass: regarding yesterdays question: is there a way to capture a block, save it to some variable and then yield it later with a given environment: like: my_variable = (with @env yield &my_saved_proc)
<jhass> oh, I thought that was your initial question
<zipR4ND> hmm, yes your right. sorry, i was confused. so the answer is: no ..
<jhass> yes ;D
<zipR4ND> and it can't be achieved with a macro or smth?
<jhass> you can do def yield_with(env); with env yield; end; yield_with(@env, &block)
<jhass> that'll compile but the block's context won't be changed
<jhass> that's what I meant last time
<jhass> for now builder style simply will give you the least headaches
<zipR4ND> what is builder style?
<jhass> def configure(&block : Environment ->); @configure = block; end; ... configure do |env| env.x = y; end; ... @configure.call(@env)
<zipR4ND> ok, thanks jhass i will look into that ..
<jhass> the other DSL approach is to use macros to generate entire classes of which you then can control the ancestry in the macro
<zipR4ND> I don't understand
DerisiveLogic has joined #crystal-lang
<zipR4ND> ok
<jhass> so the base idea is to wrap the DSL calls code into a method of a class to which you can then add whatever context you want
zipR4ND has quit [Ping timeout: 246 seconds]
DerisiveLogic has quit [Ping timeout: 265 seconds]
Ven has joined #crystal-lang
zipR4ND has joined #crystal-lang
datanoise has quit [Ping timeout: 265 seconds]
Ven has quit [Read error: No route to host]
c355E3B has joined #crystal-lang
datanoise has joined #crystal-lang
zipR4ND has quit [Ping timeout: 244 seconds]
Ven has joined #crystal-lang
zipR4ND has joined #crystal-lang
BlaXpirit_ has joined #crystal-lang
BlaXpirit has quit [Ping timeout: 258 seconds]
zipR4ND has quit [Ping timeout: 265 seconds]
DerisiveLogic has joined #crystal-lang
DerisiveLogic has quit [Ping timeout: 256 seconds]
Codcore has joined #crystal-lang
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<crystal-gh> [crystal] asterite pushed 1 new commit to master: http://git.io/vkHRP
<crystal-gh> crystal/master bf53eff Ary Borenszweig: Fixed #726: class variables didn't work in generic type instances
bcardiff has joined #crystal-lang
bcardiff has quit [Quit: Leaving.]
havenwood has joined #crystal-lang
datanoise has quit [Ping timeout: 265 seconds]
Locke23rus has joined #crystal-lang
Locke23rus has quit [Client Quit]
Locke23rus has joined #crystal-lang
Sadin has joined #crystal-lang
bcardiff has joined #crystal-lang
BlaXpirit_ has quit [Quit: Quit Konversation]
BlaXpirit has joined #crystal-lang
datanoise has joined #crystal-lang
DerisiveLogic has joined #crystal-lang
DerisiveLogic has quit [Remote host closed the connection]
shama has joined #crystal-lang
mdz_ has joined #crystal-lang
mdz_ has quit [Ping timeout: 244 seconds]
bcardiff1 has joined #crystal-lang
bcardiff has quit [Ping timeout: 256 seconds]
unshadow has joined #crystal-lang
<unshadow> Sup ppl :)
unshadow has quit [Quit: leaving]
geksilla has joined #crystal-lang
zamith_ has quit [Quit: Be back later ...]
zamith_ has joined #crystal-lang
zamith_ has quit [Client Quit]
zipR4ND has joined #crystal-lang
<zipR4ND> hey all, what does smth. "like this: type must be Environment, not Lexer::Environment+" generally mean?
<jhass> That you used the wrong class I think? :P perhaps a namespacing issue?
<zipR4ND> hmm, i'am using a child of Environment ..
<jhass> mh
<zipR4ND> mhh
<BlaXpirit> mhhh
<jhass> check crystal hierarchy, really only one ancestry called Environment?
<zipR4ND> jhass: yes
<jhass> weird
<jhass> welp, no code no help I guess
<zipR4ND> the error occurs when i pass self (which is of class MyEnvironment << Environment) to a proc, that i defined as ->(String, Environment)-> ..
<zipR4ND> sorry, the code is pretty complicated atm and i didn't manage to strip it down to a simple example because of the hierarchies and proc passing ..
<jhass> what happens if you try to cast it? .call(env as Environment) ?
<zipR4ND> the same ..
<zipR4ND> this Environment+ i dont know what it means, tried not_nil! and casting ..
<jhass> might be a type interference bug, I don't know :/
<jhass> Environment+ means that it's a base class for other classes
asterite has joined #crystal-lang
<jhass> do you ever make an instance of Environment itself?
<asterite> zipR4ND: you'll have to try to reduce your code, or just give us the code to try it... I'm trying to reproduce it but can't
<BlaXpirit> asterite, how is Nim? :p
<asterite> BlaXpirit: you are there too? :-)
<zipR4ND> jhass, yes i do
<BlaXpirit> were
<asterite> Nim is nice, I like it
<zipR4ND> asterite: your right, maybe i have to do that ..
<asterite> I listened to the scala talk, but they only talked about the syntax sugar to write less java... I wanted to learn more about other things :(
<BlaXpirit> that one was indeed slow and boring
<asterite> and it's called "Building logging services with Scala"
<asterite> :-S
<BlaXpirit> ikr
<BlaXpirit> now u maybe have an idea of what Nim's macros can do
<BlaXpirit> sure is a unique feature
<asterite> Definitely, though I'm not entirely convinced too much compile-time power is good... it becomes hard to debug and understand what's going on
<BlaXpirit> asterite, did u give that lib generator another try?
<BlaXpirit> i identified your problem yesterday
<asterite> Yes! It worked, though it didn't work for some lib I tried, can't remember which
<asterite> maybe sqlite3
<BlaXpirit> needs a lot of polish for stability
<asterite> i'd like to continue crystal_lib, actually, but it takes a lot of time
<asterite> I wish I had a binding generator to generate clang bindings, and then use that to generate the binding generator... hmmm...
<BlaXpirit> i don't entirely understand
<BlaXpirit> is this a joke? :
<asterite> oh, just a silly recursive joke...
<asterite> why everything has to be recursive in computers?
<BlaXpirit> well that's not true
<BlaXpirit> so.. don't you already have clang bindings?
<asterite> we were writing them as we tried to do crystal_lib, but they are incomplete
<BlaXpirit> sure takes a lot of work if u want object wrapper
asterite has quit [Quit: Page closed]
<zipR4ND> ok, i managed to reproduce with a minimal example:
<zipR4ND> first this one, its running as expected:
<zipR4ND> no I inherit from the class:
<zipR4ND> any idea? btw. i am pretty excited about the fact that so much of rubies elegant inheritance and class logic is working in crystal ..
<jhass> no idea, worth sticking into an issue I'd say
<zipR4ND> ok, do i just paste the example or a link to the carc.in ?
<jhass> shouldn't matter, don't plan to take that down any time soon ;)
<zipR4ND> k
asterite has joined #crystal-lang
<asterite> zipR4ND: try defining all your classes and hierarchy before the "main" code
<asterite> it's a bug, of course, but that's your workaround
asterite has quit [Ping timeout: 246 seconds]
<zipR4ND> asterit, ok ill try
Sadin has quit [Ping timeout: 265 seconds]
<zipR4ND> asterite: doesn't work
zz_Cidan is now known as Cidan
asterite has joined #crystal-lang
<asterite> zipR4ND: it works for me: http://carc.in/#/r/1i6
<asterite> zipR4ND: this works too: http://carc.in/#/r/1i7
vikaton has quit []
<zipR4ND> asterite: interesting ..
vikaton has joined #crystal-lang
asterite has quit [Quit: Page closed]
bcardiff has joined #crystal-lang
bcardiff1 has quit [Ping timeout: 265 seconds]
bcardiff has quit [Quit: Leaving.]
DerisiveLogic has joined #crystal-lang
DerisiveLogic has quit [Remote host closed the connection]
NeverDie has joined #crystal-lang
NeverDie has quit [Max SendQ exceeded]
NeverDie has joined #crystal-lang
NeverDie has quit [Max SendQ exceeded]
NeverDie has joined #crystal-lang
NeverDie has quit [Max SendQ exceeded]
NeverDie has joined #crystal-lang
zipR4ND has quit [Ping timeout: 244 seconds]
bcardiff has joined #crystal-lang
zipR4ND has joined #crystal-lang
havenwood has quit [Quit: Textual IRC Client: www.textualapp.com]
mdz_ has joined #crystal-lang
BlaXpirit has quit [Quit: Quit Konversation]
mdz_ has quit [Ping timeout: 255 seconds]
Codcore has quit [Ping timeout: 246 seconds]
mdz_ has joined #crystal-lang
havenwood has joined #crystal-lang
NeverDie has quit [Quit: I'm off to sleep. ZZZzzz…]
NeverDie has joined #crystal-lang
NeverDie has quit [Max SendQ exceeded]
NeverDie has joined #crystal-lang
NeverDie has quit [Max SendQ exceeded]
NeverDie has joined #crystal-lang
mdz_ has quit [Remote host closed the connection]
Locke23rus has quit [Remote host closed the connection]
datanoise has quit [Ping timeout: 272 seconds]
mdz_ has joined #crystal-lang
mdz_ has quit [Remote host closed the connection]
mdz_ has joined #crystal-lang
mdz_ has quit [Remote host closed the connection]
mdz_ has joined #crystal-lang
havenwood has quit [Ping timeout: 272 seconds]
shama has quit [Ping timeout: 265 seconds]