jhass changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.8.0 | Fund Crystals development: http://is.gd/X7PRtI | 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
Philpax has joined #crystal-lang
lex__ has joined #crystal-lang
shama has quit [Quit: (╯°□°)╯︵ɐɯɐɥs]
greengriminal has joined #crystal-lang
qard has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dylanmei has quit [Ping timeout: 272 seconds]
lex__ has quit [Ping timeout: 246 seconds]
rmosolgo has joined #crystal-lang
rmosolgo has quit [Remote host closed the connection]
CraigBuchek has joined #crystal-lang
Papierkorb has quit [Ping timeout: 240 seconds]
Papierkorb has joined #crystal-lang
dylanmei has joined #crystal-lang
rmosolgo has joined #crystal-lang
fowlduck has quit [Remote host closed the connection]
greengriminal has quit [Quit: Leaving]
dylanmei has quit [Quit: ZZZzzz…]
fowlduck has joined #crystal-lang
fowlduck has quit [Remote host closed the connection]
dylanmei has joined #crystal-lang
dylanmei has quit [Client Quit]
dylanmei has joined #crystal-lang
dylanmei has quit [Client Quit]
rmosolgo has quit [Remote host closed the connection]
greengriminal has joined #crystal-lang
rmosolgo has joined #crystal-lang
rmosolgo has quit [Remote host closed the connection]
<crystal-gh> [crystal] adlerhsieh opened pull request #1662: Add type restrictions to methods' arguments in SecureRandom library (master...secure-random-type) http://git.io/vc4rO
rmosolgo has joined #crystal-lang
rmosolgo has quit [Remote host closed the connection]
rmosolgo has joined #crystal-lang
greengriminal has quit [Quit: Leaving]
havenwood has joined #crystal-lang
trapped has joined #crystal-lang
sooli has joined #crystal-lang
sadin has quit [Remote host closed the connection]
sadin has joined #crystal-lang
rmosolgo has quit [Remote host closed the connection]
<Philpax> is this intended behaviour? http://play.crystal-lang.org/#/r/hn1
<Philpax> http://crystal-lang.org/docs/syntax_and_semantics/instance_variables_type_inference.html tells me that catch-all initialization should take care of this
rmosolgo has joined #crystal-lang
rmosolgo has quit [Remote host closed the connection]
sadin has quit [Remote host closed the connection]
sadin has joined #crystal-lang
Ven has joined #crystal-lang
sooli has quit [Read error: No route to host]
NeverDie has quit [Quit: http://radiux.io/]
nakilon has joined #crystal-lang
CraigBuchek has quit [Quit: Leaving.]
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
sadin has quit [Remote host closed the connection]
havenwood has quit [Ping timeout: 260 seconds]
rmosolgo has joined #crystal-lang
elia has joined #crystal-lang
elia has quit [Read error: Connection reset by peer]
nakilon has quit [Ping timeout: 246 seconds]
rmosolgo has quit [Ping timeout: 240 seconds]
Ven has joined #crystal-lang
leafybasil has quit [Remote host closed the connection]
BlaXpirit has joined #crystal-lang
<crystal-gh> [crystal] ysbaddaden pushed 2 new commits to master: http://git.io/vcBlB
<crystal-gh> crystal/master 46e9a0d Anton Davydov: Fix typo in Deque class [skip ci]
<crystal-gh> crystal/master 0ff257d Julien Portalier: Merge pull request #1660 from davydovanton/doc-fix-typo...
<travis-ci> manastech/crystal#0ff257d (master - Merge pull request #1660 from davydovanton/doc-fix-typo): The build has errored. https://travis-ci.org/manastech/crystal/builds/83070173
<DeBot> https://github.com/manastech/crystal/pull/1660 (Fix typo in Deque class)
BlaXpirit has quit [Quit: Konversation]
sooli has joined #crystal-lang
BlaXpirit has joined #crystal-lang
BlaXpirit_ has joined #crystal-lang
BlaXpirit has quit [Killed (kornbluth.freenode.net (Nickname regained by services))]
BlaXpirit has quit [Remote host closed the connection]
BlaXpirit has joined #crystal-lang
ingsoc has quit [Quit: Leaving.]
ingsoc has joined #crystal-lang
BlaXpirit has quit [Read error: Connection reset by peer]
Excureo has quit [Remote host closed the connection]
BlaXpirit has joined #crystal-lang
Excureo has joined #crystal-lang
BlaXpirit has quit [Quit: Konversation]
<crystal-gh> [crystal] veelenga opened pull request #1665: [ci-skip] Fixed few typos in docs (gh-pages...patch-doc-1) http://git.io/vcB6y
nakilon has joined #crystal-lang
<crystal-gh> [crystal] ysbaddaden closed pull request #1665: [ci skip] Fixed few typos in docs (gh-pages...patch-doc-1) http://git.io/vcB6y
nakilon has quit [Ping timeout: 246 seconds]
BlaXpirit has joined #crystal-lang
<crystal-gh> [crystal] jhass pushed 2 new commits to master: http://git.io/vcB9R
<crystal-gh> crystal/master 0c2a7f4 Adler: Add type restrictions to methods' arguments in SecureRandom library
<crystal-gh> crystal/master 59c0822 Jonne Haß: Merge pull request #1662 from adlerhsieh/secure-random-type...
<travis-ci> manastech/crystal#59c0822 (master - Merge pull request #1662 from adlerhsieh/secure-random-type): The build passed. https://travis-ci.org/manastech/crystal/builds/83084647
<DeBot> https://github.com/manastech/crystal/pull/1662 (Add type restrictions to methods' arguments in SecureRandom library)
<jhass> Philpax: yeah I guess it's a bug
<Philpax> yeah, I've had some issues with the nil type deduction
<Philpax> I think they stem from that one issue
<Philpax> should I make an issue?
<jhass> sure, we can always close it if it turns out intended
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
sooli has quit [Ping timeout: 272 seconds]
sooli has joined #crystal-lang
sooli_ has joined #crystal-lang
BlaXpirit has quit [Read error: Connection reset by peer]
BlaXpirit has joined #crystal-lang
sooli has quit [Ping timeout: 240 seconds]
sooli has joined #crystal-lang
sooli_ has quit [Ping timeout: 255 seconds]
<crystal-gh> [crystal] jhass pushed 2 new commits to master: http://git.io/vcReR
<crystal-gh> crystal/master acd0b6a Guilherme Bernal: Fixes #1659: Do not try to read response body if request was HEAD
<crystal-gh> crystal/master fae0987 Jonne Haß: Merge pull request #1661 from lbguilherme/http-head...
sooli has quit [Ping timeout: 260 seconds]
sooli_ has joined #crystal-lang
sooli has joined #crystal-lang
ponga has joined #crystal-lang
BlaXpirit has quit [Quit: Konversation]
sooli__ has joined #crystal-lang
Ven has joined #crystal-lang
pawnbox has joined #crystal-lang
nakilon has joined #crystal-lang
nakilon has quit [Ping timeout: 260 seconds]
apt-get has joined #crystal-lang
irclogger_______ has quit [Ping timeout: 256 seconds]
irclogger_______ has joined #crystal-lang
unshadow has quit [Quit: leaving]
unshadow has joined #crystal-lang
Philpax has quit [Quit: Leaving]
cina has quit [Remote host closed the connection]
sooli__ has quit [Ping timeout: 272 seconds]
sooli has quit [Ping timeout: 264 seconds]
sooli_ has quit [Ping timeout: 268 seconds]
BlaXpirit has joined #crystal-lang
BlaXpirit has quit [Client Quit]
Philpax has joined #crystal-lang
apt-get has quit [Read error: Connection reset by peer]
sooli has joined #crystal-lang
sooli_ has joined #crystal-lang
sooli__ has joined #crystal-lang
alanwillms has joined #crystal-lang
trapped has quit [Read error: Connection reset by peer]
trapped has joined #crystal-lang
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
BlaXpirit has joined #crystal-lang
Ven has joined #crystal-lang
dylanmei has joined #crystal-lang
apt-get has joined #crystal-lang
NeverDie has joined #crystal-lang
<crystal-gh> [crystal] jhass closed pull request #1549: File#truncate (master...File#truncate) http://git.io/vn0Cm
greengriminal has joined #crystal-lang
sadin has joined #crystal-lang
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
apt-get has quit [Ping timeout: 246 seconds]
Ven has joined #crystal-lang
unshadow has quit [Ping timeout: 250 seconds]
sadin is now known as Sadin
unshadow has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
apt-get has joined #crystal-lang
ssvb has joined #crystal-lang
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
havenwood has joined #crystal-lang
pawnbox has joined #crystal-lang
Ven has joined #crystal-lang
pawnbox has quit [Ping timeout: 244 seconds]
rmosolgo has joined #crystal-lang
sooli615 has joined #crystal-lang
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Sadin has quit [Remote host closed the connection]
BlaXpirit has quit [Quit: Konversation]
lokulin has quit [Ping timeout: 240 seconds]
Ven has joined #crystal-lang
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Ven has joined #crystal-lang
Philpax_ has joined #crystal-lang
dylanmei has quit [Quit: ZZZzzz…]
Philpax has quit [Ping timeout: 268 seconds]
havenwood has quit [Ping timeout: 260 seconds]
<dzv> #1620 problems? comments?
<DeBot> https://github.com/manastech/crystal/pull/1620 (Return nil or correct value in various methods.)
Sadin has joined #crystal-lang
qard has joined #crystal-lang
gamemanj has joined #crystal-lang
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
sooli has quit [Ping timeout: 255 seconds]
sooli_ has quit [Ping timeout: 268 seconds]
sooli__ has quit [Ping timeout: 255 seconds]
sooli615 has quit [Ping timeout: 240 seconds]
jeromegn has joined #crystal-lang
dylanmei has joined #crystal-lang
sooli has joined #crystal-lang
sooli_ has joined #crystal-lang
sooli__ has joined #crystal-lang
BlaXpirit has joined #crystal-lang
sooli556 has joined #crystal-lang
jeromegn has left #crystal-lang [#crystal-lang]
jeromegn has joined #crystal-lang
jeromegn has left #crystal-lang [#crystal-lang]
jeromegn has joined #crystal-lang
alanwillms93 has joined #crystal-lang
alanwillms has quit [Ping timeout: 246 seconds]
<lex_> hello
<lex_> I am new to Crystal and is trying to implement linkedlist to get the feel of the language
<lex_> but can't get a hang of the type inference happening during the compile time
jeromegn has quit [Quit: jeromegn]
jeromegn has joined #crystal-lang
<lex_> here is a sample of the problem I have:
<lex_> in line 49: undefined method 'getItem' for Nil (compile-time type is Link(Int32)?)
Philpax_ has quit [Ping timeout: 265 seconds]
dylanmei has quit [Ping timeout: 240 seconds]
alanwillms93 has quit [Quit: This computer has gone to sleep]
<rmosolgo> I'm new here too
<rmosolgo> but I think that falls under "Nillable instance variables"
<rmosolgo> maybe it needs a `if var.is_a?(...)`
<jhass> lex_: you'll need to assign next to a local and check it's not nil (the list head)
<jhass> (or tail rather)
<jhass> since next may return nil since @next may be nil since setNext accepts nil
<jhass> (and so does the constructor)
alanwillms has joined #crystal-lang
<lex_> hmm, maybe I am writing crystal with Java in the back of my mind.
<dzv> Link.new that accepts nil seems odd. Why not just set @next to nil?
<jhass> lex_: that anyway, conventions are two spaces, underscore_case for method and variable names
<jhass> and no get_, set_ or is_ prefixes
<jhass> well, in Java your code would throw a null pointer exception at runtime I guess ;)
<lex_> thanks, I'll keep that in mind
<jhass> at least potentially
<lex_> in Java that will happen at the runtime, if the next is actually null
<jhass> yes, in crystal it won't, intentionally so
Ven has joined #crystal-lang
<lex_> hmm, I see. So basically the implementation needs to change.
<lex_> the way*
Ven has quit [Ping timeout: 264 seconds]
ssvb has quit [Ping timeout: 246 seconds]
ssvb has joined #crystal-lang
<lex_> thanks jhass, please correct me if I am wrong: 'next_link && next_link.item' tells me if link and item for that link are both not nil?
<jhass> it exploits the short circuiting behavior
nakilon has joined #crystal-lang
<jhass> the value of foo && bar is the first non-truthy (nil, false, null pointer) or the last truthy value
<jhass> >> nil && "foo"
<DeBot> jhass: # => nil - http://carc.in/#/r/hre
<jhass> >> true && "foo"
<DeBot> jhass: # => "foo" - http://carc.in/#/r/hrf
<rmosolgo> ^^ that's badass.
<rmosolgo> >> false && nil && "result"
<DeBot> rmosolgo: # => false - http://carc.in/#/r/hrg
<jhass> crystal knows that so it knows that if you reach link_item.item, link_item can't be nil
<rmosolgo> >> false || nil || "result"
<DeBot> rmosolgo: # => "result" - http://carc.in/#/r/hrh
nakilon has quit [Ping timeout: 265 seconds]
<lex_> sorry, i am new. could you also explain a bit about "p @curr.next.try &.item": it is printing the item from @curr.next ...
<jhass> do you understand @curr.next.try {|e| e.item } ?
<lex_> from the docs: Object.try
<lex_> This method is useful for dealing with nilable types, to safely perform operations only when the value is not nil.
<BlaXpirit> if @curr.next p curr.next.item
<BlaXpirit> i think that's (kinda) equivalent
<jhass> well, you'll need to go over a local
<jhass> but yes
sooli has quit [Ping timeout: 250 seconds]
sooli_ has quit [Ping timeout: 240 seconds]
sooli__ has quit [Ping timeout: 250 seconds]
<lex_> makes sense. Thanks everyone. I think I need more understanding of the language but it was a great help.
sooli has joined #crystal-lang
sooli_ has joined #crystal-lang
sooli__ has joined #crystal-lang
havenwood has joined #crystal-lang
fowlduck has joined #crystal-lang
lex_ has quit [Quit: Page closed]
thor77 has joined #crystal-lang
sdogruyol has joined #crystal-lang
<sdogruyol> hey
<jokke> hi sdogruyol
<sdogruyol> jokke: o/ how are you doing
n0xff has joined #crystal-lang
sdogruyo_ has joined #crystal-lang
sdogruyol has quit [Read error: Connection reset by peer]
<jokke> fine thanks, just reeeeally annoyed about netflix
<sdogruyo_> jokke: netflix? Do you have it in your country
<jokke> i have a server in the us with vpn
<jokke> but now netflix has somehow noticed, that i'm not from the us and i get the crappy selection of movies and series from my country
<sdogruyo_> jokke: oh now that's interesting :)
<jokke> but i guess that's a bit off topic :P
<sdogruyo_> heheh
<sdogruyo_> jokke: you from germany?
<jokke> yeah
<sdogruyo_> jokke: ok
greengriminal has quit [Quit: This computer has gone to sleep]
greengriminal has joined #crystal-lang
greengriminal has quit [Client Quit]
shadeslayer has quit [Ping timeout: 240 seconds]
shadeslayer has joined #crystal-lang
<crystal-gh> [crystal] asterite pushed 2 new commits to master: http://git.io/vcE6N
<crystal-gh> crystal/master ca2f892 Ary Borenszweig: Merge pull request #1658 from rhysd/sample/quine...
<crystal-gh> crystal/master ba46aa7 rhysd: Added new sample: Quine...
<travis-ci> manastech/crystal#ca2f892 (master - Merge pull request #1658 from rhysd/sample/quine): The build passed. https://travis-ci.org/manastech/crystal/builds/83171046
<DeBot> https://github.com/manastech/crystal/pull/1658 (Add new sample: Quine)
<crystal-gh> [crystal] rmosolgo opened pull request #1667: Add simple style guide to docs (gh-pages...styleguide) http://git.io/vcEMa
jwaldrip has joined #crystal-lang
sdogruyo_ has quit [Remote host closed the connection]
sooli_ has quit [Ping timeout: 240 seconds]
sooli556 has quit [Ping timeout: 246 seconds]
sooli has quit [Ping timeout: 272 seconds]
sooli__ has quit [Ping timeout: 240 seconds]
<crystal-gh> [crystal] davydovanton opened pull request #1669: Fix typos in Matrix documentation (master...doc-fix-matrix) http://git.io/vcE97
greengriminal has joined #crystal-lang
<crystal-gh> [crystal] technorama opened pull request #1670: Check libc function return values. (master...f/libc_return_checking) http://git.io/vcE7Y
<crystal-gh> [crystal] jhass pushed 2 new commits to master: http://git.io/vcE7X
<crystal-gh> crystal/master dc84c8d Anton Davydov: Fix typos in Matrix documentation [skip ci]
<crystal-gh> crystal/master 1ef69b4 Jonne Haß: Merge pull request #1669 from davydovanton/doc-fix-matrix...
<travis-ci> manastech/crystal#1ef69b4 (master - Merge pull request #1669 from davydovanton/doc-fix-matrix): The build passed. https://travis-ci.org/manastech/crystal/builds/83177550
<DeBot> https://github.com/manastech/crystal/pull/1669 (Fix typos in Matrix documentation)
<crystal-gh> [crystal] jhass pushed 2 new commits to master: http://git.io/vcEAx
<crystal-gh> crystal/master f289d4e Technorama Ltd: Check libc function return values.
<crystal-gh> crystal/master 2a85608 Jonne Haß: Merge pull request #1670 from technorama/f/libc_return_checking...
nakilon has joined #crystal-lang
lokulin has joined #crystal-lang
<travis-ci> manastech/crystal#2a85608 (master - Merge pull request #1670 from technorama/f/libc_return_checking): The build passed. https://travis-ci.org/manastech/crystal/builds/83180131
<DeBot> https://github.com/manastech/crystal/pull/1670 (Check libc function return values.)
jwaldrip has quit [Quit: Be back later ...]
jwaldrip has joined #crystal-lang
fowlduck has quit [Remote host closed the connection]
ponga has quit [Quit: Connection closed for inactivity]
ingsoc has quit [Quit: Leaving.]
ingsoc has joined #crystal-lang
sdogruyol has joined #crystal-lang
fowlduck has joined #crystal-lang
sdogruyol has quit [Ping timeout: 240 seconds]
fowlduck has quit [Ping timeout: 256 seconds]
alanwillms has quit [Quit: This computer has gone to sleep]
alanwillms has joined #crystal-lang
fowlduck has joined #crystal-lang
Sadin has quit [Remote host closed the connection]
jwaldrip_ has joined #crystal-lang
jbye has quit [Ping timeout: 255 seconds]
jwaldrip has quit [Ping timeout: 250 seconds]
unshadow_ has joined #crystal-lang
unshadow has quit [Ping timeout: 250 seconds]
qard has quit [Quit: Textual IRC Client: www.textualapp.com]
alanwillms has quit [Quit: This computer has gone to sleep]
alanwillms has joined #crystal-lang
unshadow_ has quit [Ping timeout: 240 seconds]
unshadow has joined #crystal-lang
gamemanj has quit [Ping timeout: 240 seconds]
apt-get has quit [Remote host closed the connection]
jbye has joined #crystal-lang
lokulin has quit [Ping timeout: 246 seconds]
ssvb has quit [Ping timeout: 246 seconds]
ssvb has joined #crystal-lang
lokulin has joined #crystal-lang
alanwillms has quit [Quit: This computer has gone to sleep]
qard has joined #crystal-lang
havenwood has quit [Quit: Textual IRC Client: www.textualapp.com]
<crystal-gh> [crystal] davydovanton opened pull request #1672: Fix typos in type_inference.cr (master...doc-fix-type-inference) http://git.io/vcu2T
havenwood has joined #crystal-lang
BlaXpirit has quit [Quit: Konversation]
jwaldrip_ has quit [Quit: Be back later ...]
fowlduck has quit [Remote host closed the connection]
jwaldrip_ has joined #crystal-lang
jwaldrip__ has joined #crystal-lang
trapped has quit [Read error: Connection reset by peer]
jwaldrip_ has quit [Ping timeout: 265 seconds]
unshadow has quit [Ping timeout: 246 seconds]
havenn has joined #crystal-lang
jwaldrip__ has quit [Ping timeout: 240 seconds]
havenwood has quit [Ping timeout: 250 seconds]
rmosolgo has quit [Remote host closed the connection]
jwaldrip__ has joined #crystal-lang
sdogruyol has joined #crystal-lang
rmosolgo has joined #crystal-lang
ingsoc has quit [Quit: Leaving.]
sdogruyol has quit [Ping timeout: 240 seconds]
qard has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<crystal-gh> [crystal] asterite pushed 1 new commit to master: http://git.io/vcuQk
<crystal-gh> crystal/master d4dd3d2 Ary Borenszweig: Fixed #1666: Catch-all instance variable initialisation doesn't work for struct variables
<crystal-gh> [crystal] jhass pushed 2 new commits to master: http://git.io/vcuQH
<crystal-gh> crystal/master dd5bb61 Anton Davydov: Fix typos in type_inference.cr [skip ci]
<crystal-gh> crystal/master b10c134 Jonne Haß: Merge pull request #1672 from davydovanton/doc-fix-type-inference...
rmosolgo has quit [Remote host closed the connection]
rmosolgo has joined #crystal-lang
<travis-ci> manastech/crystal#b10c134 (master - Merge pull request #1672 from davydovanton/doc-fix-type-inference): The build was broken. https://travis-ci.org/manastech/crystal/builds/83210119
<DeBot> https://github.com/manastech/crystal/pull/1672 (Fix typos in type_inference.cr)
<travis-ci> manastech/crystal#d4dd3d2 (master - Fixed #1666: Catch-all instance variable initialisation doesn't work for struct variables): The build passed. https://travis-ci.org/manastech/crystal/builds/83209680
<DeBot> https://github.com/manastech/crystal/issues/1666 (Catch-all instance variable initialisation doesn't work for struct variables)
qard has joined #crystal-lang
<crystal-gh> [crystal] jhass pushed 1 new commit to master: http://git.io/vcuFt
<crystal-gh> crystal/master 298ec0d Jonne Haß: Fix typo in type inference spec too
qard has quit [Client Quit]
benner has quit [Ping timeout: 252 seconds]
jbye has quit [Ping timeout: 265 seconds]
havenn has quit [Ping timeout: 252 seconds]
benner has joined #crystal-lang
jbye has joined #crystal-lang
fowlduck has joined #crystal-lang
<travis-ci> manastech/crystal#298ec0d (master - Fix typo in type inference spec too): The build was fixed. https://travis-ci.org/manastech/crystal/builds/83212454
greengriminal has quit [Quit: Leaving]
havenwood has joined #crystal-lang
sdogruyol has joined #crystal-lang
fowlduck has quit [Remote host closed the connection]
sdogruyol has quit [Ping timeout: 240 seconds]
havenwood has quit [Ping timeout: 268 seconds]
nakilon has quit [Ping timeout: 244 seconds]
lex_ has joined #crystal-lang
dylanmei has joined #crystal-lang