asterite changed the topic of #crystal-lang to: #crystal-lang The Crystal programming language | http://crystal-lang.org | Crystal 0.6.0 | 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
<jhass> I can see Nil#=== returning true for a null pointer
<jhass> but I think Nil#==(nullpointer) and nullpointer#==(nil) being false is actually a good thing
<asterite> >> nil == Pointer(Void).null
<DeBot> asterite: false
<asterite> You mean, you think the above should be true?
<asterite> >> a = 1; 5.times { |a| }; a
<DeBot> asterite: Syntax error in eval:3: block argument 'a' shadows local variable 'a'
<asterite> :-P
<jhass> no
<jhass> >> case Pointer(Void).null; when nil; true; else; false; end;
<DeBot> jhass: false
<asterite> Ah, ok. I never compare things to nil manually… in fact, I don't even use .nil? for that matter
<jhass> this one I would consider
weskinner_work has quit [Ping timeout: 252 seconds]
asterite has quit [Quit: Leaving.]
asterite has joined #crystal-lang
asterite has quit [Client Quit]
ismaelga has joined #crystal-lang
weskinner_work has joined #crystal-lang
weskinner_work has quit [Ping timeout: 246 seconds]
weskinner_mac has joined #crystal-lang
weskinner_mac has quit [Quit: weskinner_mac]
ismaelga has quit [Remote host closed the connection]
ismaelga has joined #crystal-lang
panga has quit [Remote host closed the connection]
bcardiff has joined #crystal-lang
knoopx has quit [Remote host closed the connection]
bcardiff has quit [Quit: Leaving.]
havenwood has quit []
shama has quit [Remote host closed the connection]
ponga has joined #crystal-lang
ponga has quit [Ping timeout: 244 seconds]
shama has joined #crystal-lang
shama has quit [Quit: (╯°□°)╯︵ɐɯɐɥs]
ismaelga has quit [Remote host closed the connection]
ismaelga has joined #crystal-lang
ismaelga has quit [Ping timeout: 256 seconds]
ponga has joined #crystal-lang
ponga has quit [Ping timeout: 265 seconds]
ismaelga has joined #crystal-lang
ismaelga has quit [Ping timeout: 240 seconds]
ponga has joined #crystal-lang
ponga has quit [Ping timeout: 252 seconds]
ismaelga has joined #crystal-lang
ismaelga has quit [Ping timeout: 240 seconds]
ismaelga has joined #crystal-lang
ismaelga has quit [Ping timeout: 252 seconds]
ponga has joined #crystal-lang
leafybasil has quit [Remote host closed the connection]
leafybasil has joined #crystal-lang
ismaelga has joined #crystal-lang
ismaelga has quit [Ping timeout: 244 seconds]
ismaelga has joined #crystal-lang
ismaelga has quit [Ping timeout: 272 seconds]
ismaelga has joined #crystal-lang
ismaelga has quit [Ping timeout: 265 seconds]
ponga has quit [Quit: Leaving...]
ismaelga has joined #crystal-lang
ismaelga has quit [Ping timeout: 250 seconds]
ponga has joined #crystal-lang
ponga has quit [Read error: Connection reset by peer]
ponga has joined #crystal-lang
ismaelga has joined #crystal-lang
asterite has joined #crystal-lang
weskinner_mac has joined #crystal-lang
asterite1 has joined #crystal-lang
asterite has quit [Read error: Connection reset by peer]
weskinner_mac has quit [Quit: weskinner_mac]
ponga has quit [Quit: Leaving...]
ponga has joined #crystal-lang
ponga has quit [Remote host closed the connection]
weskinner_work has joined #crystal-lang
havenwood has joined #crystal-lang
ponga has joined #crystal-lang
asterite1 has quit [Quit: Leaving.]
asterite has joined #crystal-lang
asterite has quit [Client Quit]
asterite has joined #crystal-lang
waj has joined #crystal-lang
ismaelga has quit [Remote host closed the connection]
ismaelga has joined #crystal-lang
ismaelga has quit [Remote host closed the connection]
ismaelga has joined #crystal-lang
ismaelga has quit [Remote host closed the connection]
leafybasil has quit [Remote host closed the connection]
bcardiff has joined #crystal-lang
asterite1 has joined #crystal-lang
asterite has quit [Ping timeout: 256 seconds]
weskinner_work has quit [Ping timeout: 245 seconds]
leafybasil has joined #crystal-lang
weskinner_work has joined #crystal-lang
<crystal-gh> [crystal] asterite pushed 1 new commit to master: http://git.io/x9HU
<crystal-gh> crystal/master bb12198 Ary Borenszweig: Updated Changelog
shadeslayer has joined #crystal-lang
ponga has quit [Remote host closed the connection]
ponga has joined #crystal-lang
<shadeslayer> jhass: so I'm trying to port my ruby code to crystal and I found a bug in the compiler :p
<jhass> nice!
<jhass> I do all the time ;)
<shadeslayer> hehe
<asterite1> Hi shadeslayer
<shadeslayer> halo!
<shadeslayer> I don't really know to read that error message though
<jhass> shadeslayer: github pro tip: ```code fences``` to make your stuff more readable
<shadeslayer> done :)
<jhass> cool!
<asterite1> shadeslayer: just answered… I wonder if I can fix it and move the tag 0.6.1 without people thinking bad of me :-P
<shadeslayer> :D
<shadeslayer> asterite1: how do you even read that error message btw
<asterite1> shadeslayer: what error message?
<shadeslayer> asterite1: the one that dumps out "cast to Crystal::Generic failed"
<asterite1> >> a = 1 || "hello"; a as String
<DeBot> asterite1: Exception: cast to String failed
<shadeslayer> aha
<asterite1> That exception is thrown when you cast a union type to some type, but you are wrong about your assumption :)
<asterite1> The message could be much clearer, though, like "can't cast Int32 to String"...
<shadeslayer> right
<asterite1> So, the compiler assumes a type is a Generic in some place, but it isn't
<shadeslayer> *nod*
<travis-ci> manastech/crystal#2075 (master - bb12198 : Ary Borenszweig): The build passed.
* shadeslayer is still going through docs, so could very well be that I did something stupid
shama has joined #crystal-lang
<asterite1> Oh, no, you didn't do anything wrong, it's just a compiler bug. I forgot to add an error for the case where you extend a generic type and don't provide the necessary type arguments :)
<asterite1> But… porting a Ruby program to Crystal by copying everything is very brave from your part
<shadeslayer> heh ^^ :P
<shadeslayer> yeah, I wanted to see how far I'd get
<asterite1> I would port it little by little, I think it would be easier. Crystal is very different than Ruby, though it looks similar
<shadeslayer> before things start blowing up
<shadeslayer> I see, anyway, I'm going to sleep, I'm just exhausted, cya tomorrow
<asterite1> Good night
<crystal-gh> [crystal] asterite pushed 1 new commit to master: http://git.io/xHt5
<crystal-gh> crystal/master 10882b3 Ary Borenszweig: Fixed #460: compiler crashes when inherting a generic type and not specifying its arguments
waj1 has joined #crystal-lang
waj has quit [Ping timeout: 252 seconds]
ponga has quit [Quit: Leaving...]
<shadeslayer> asterite1: btw any reason why crystal has File.read_lines instead of File.readlines
<jhass> same reason it has includes? instead of .include? I guess :P
<travis-ci> manastech/crystal#2076 (master - 10882b3 : Ary Borenszweig): The build passed.
ponga has joined #crystal-lang
havenwood has quit []
<crystal-gh> [crystal] asterite pushed 1 new commit to master: http://git.io/xHxl
<crystal-gh> crystal/master 48461ba Ary Borenszweig: Implemented MD5 in Crystal
ponga has quit [Read error: Connection reset by peer]
<asterite1> shadeslayer: yes, "read lines" is two words, and words are separated by "_". We know it's incompatible with Ruby, but it reads better and anyway you can't just port a Ruby program by copy pastying...
<shadeslayer> asterite1: right, was just wondering why it was read_lines
ponga has joined #crystal-lang
waj1 has quit [Quit: Leaving.]
asterite1 has quit [Quit: Leaving.]
<travis-ci> manastech/crystal#2077 (master - 48461ba : Ary Borenszweig): The build passed.
asterite has joined #crystal-lang
asterite1 has joined #crystal-lang
asterite has quit [Ping timeout: 252 seconds]
asterite has joined #crystal-lang
asterite1 has quit [Ping timeout: 252 seconds]
asterite has quit [Client Quit]
weskinner_work has quit [Quit: weskinner_work]
asterite has joined #crystal-lang
asterite1 has joined #crystal-lang
asterite has quit [Ping timeout: 245 seconds]
asterite1 has quit [Ping timeout: 250 seconds]
asterite has joined #crystal-lang