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
bcardiff has joined #crystal-lang
ozra has quit [Quit: Page closed]
NeverDie has quit [Quit: http://radiux.io/]
nakilon has quit [Ping timeout: 240 seconds]
greengriminal has quit [Quit: This computer has gone to sleep]
shama has quit [Quit: (╯°□°)╯︵ɐɯɐɥs]
fowlduck has joined #crystal-lang
blue_deref has joined #crystal-lang
bcardiff has quit [Quit: bcardiff]
barosl has joined #crystal-lang
fowlduck has quit [Remote host closed the connection]
greengriminal has joined #crystal-lang
greengriminal has quit [Client Quit]
nakilon has joined #crystal-lang
nakilon has quit [Ping timeout: 256 seconds]
<crystal-gh> [crystal] adlerhsieh opened pull request #1731: Fix typo in Char struct (master...add-doc-3) http://git.io/vC0XD
Philpax has joined #crystal-lang
blue_deref has quit [Quit: Taking myself out of hear.]
nakilon has joined #crystal-lang
nakilon has quit [Ping timeout: 250 seconds]
NeverDie has joined #crystal-lang
asterite has quit [Ping timeout: 244 seconds]
asterite has joined #crystal-lang
pawnbox has joined #crystal-lang
Philpax has quit [Ping timeout: 264 seconds]
pawnbox has quit [Remote host closed the connection]
barosl has quit [Quit: Leaving]
barosl has joined #crystal-lang
bcardiff has joined #crystal-lang
opal has joined #crystal-lang
opal has quit [Remote host closed the connection]
Philpax has joined #crystal-lang
havenwood has quit [Ping timeout: 250 seconds]
RX14 has quit [Ping timeout: 250 seconds]
vegai has quit [Ping timeout: 250 seconds]
havenn has joined #crystal-lang
havenn has joined #crystal-lang
RX14 has joined #crystal-lang
havenn is now known as havenwood
Philpax has quit [Ping timeout: 264 seconds]
vegai has joined #crystal-lang
pawnbox has joined #crystal-lang
Philpax has joined #crystal-lang
Philpax has quit [Read error: Connection reset by peer]
Ven has joined #crystal-lang
bcardiff has quit [Quit: bcardiff]
BlaXpirit has joined #crystal-lang
Ven has quit [Read error: Connection reset by peer]
Ven has joined #crystal-lang
brunto has joined #crystal-lang
Ven has quit [Read error: Connection reset by peer]
Ven has joined #crystal-lang
Nik- has joined #crystal-lang
Ven has quit [Read error: Connection reset by peer]
Ven has joined #crystal-lang
Ven has quit [Read error: Connection reset by peer]
Ven_ has joined #crystal-lang
Ven_ has quit [Read error: Connection reset by peer]
Ven has joined #crystal-lang
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Ven has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
Ven_ has joined #crystal-lang
Ven has quit [Read error: Connection reset by peer]
Ven_ has quit [Read error: Connection reset by peer]
Ven has joined #crystal-lang
Ven has quit [Read error: Connection reset by peer]
Ven has joined #crystal-lang
Ven has quit [Read error: Connection reset by peer]
Ven has joined #crystal-lang
Ven has quit [Read error: Connection reset by peer]
Ven has joined #crystal-lang
<crystal-gh> [crystal] ysbaddaden pushed 2 new commits to master: http://git.io/vCE4Y
<crystal-gh> crystal/master 858737e Julien Portalier: Merge pull request #1731 from adlerhsieh/add-doc-3...
<crystal-gh> crystal/master 8cdc680 Adler: fix typo in Char struct
Ven has quit [Read error: Connection reset by peer]
Ven_ has joined #crystal-lang
<travis-ci> manastech/crystal#858737e (master - Merge pull request #1731 from adlerhsieh/add-doc-3): The build passed. https://travis-ci.org/manastech/crystal/builds/85067697
<DeBot> https://github.com/manastech/crystal/pull/1731 (Fix typo in Char struct)
Ven_ has quit [Read error: Connection reset by peer]
Ven has joined #crystal-lang
<BlaXpirit> jhass, could you change the bot so it doesn't reply to notices or replies using the same type of message?
<BlaXpirit> (i did look at the source code, but it would take me too long to figure out)
Ven has quit [Read error: Connection reset by peer]
Ven has joined #crystal-lang
elia has joined #crystal-lang
Philpax has joined #crystal-lang
Ven has quit [Read error: Connection reset by peer]
Ven has joined #crystal-lang
Ven has quit [Read error: Connection reset by peer]
Ven_ has joined #crystal-lang
Ven_ has quit [Read error: Connection reset by peer]
Ven has joined #crystal-lang
leafybasil has quit [Remote host closed the connection]
leafybasil has joined #crystal-lang
leafybasil has quit [Ping timeout: 246 seconds]
NeverDie has quit [Quit: http://radiux.io/]
BlaXpirit has quit [Remote host closed the connection]
BlaXpirit has joined #crystal-lang
sfcgeorge has joined #crystal-lang
BlaXpirit has quit [Remote host closed the connection]
BlaXpirit has joined #crystal-lang
leafybasil has joined #crystal-lang
leafybasil has quit [Remote host closed the connection]
leafybasil has joined #crystal-lang
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Ven has joined #crystal-lang
<jhass> mmh, same type should be doable
pawnbox has joined #crystal-lang
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
leafybasil has quit [Read error: Connection reset by peer]
leafybasil has joined #crystal-lang
pawnbox has quit [Ping timeout: 265 seconds]
trapped has joined #crystal-lang
pawnbox has joined #crystal-lang
BlaXpirit has quit [Quit: Konversation]
Ven has joined #crystal-lang
Netfeed has quit [Quit: WeeChat 1.0.1]
pawnbox has quit [Remote host closed the connection]
Netfeed has joined #crystal-lang
pawnbox has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
Philpax_ has joined #crystal-lang
Philpax has quit [Ping timeout: 240 seconds]
Ven_ has joined #crystal-lang
Ven has quit [Read error: Connection reset by peer]
Philpax_ has quit [Ping timeout: 240 seconds]
Ven_ has quit [Ping timeout: 265 seconds]
badeball_ is now known as badeball
pawnbox has quit [Remote host closed the connection]
gamemanj has joined #crystal-lang
bcardiff has joined #crystal-lang
BlaXpirit has joined #crystal-lang
pawnbox has joined #crystal-lang
leafybasil has quit [Read error: Connection reset by peer]
leafybas_ has joined #crystal-lang
pawnbox has quit [Read error: Connection reset by peer]
olek_poz has joined #crystal-lang
cyjimmy264 has joined #crystal-lang
pawnbox has joined #crystal-lang
<olek_poz> Hello guys, is it possible to declare class variable using more advanced object like own class, or Logger? "@age :: Int32" works, but "@logger :: Logger" not. I'd like to be able to assign object A to object B after object B was initialized.
<jhass> olek_poz: try living without :: for a while, class variables are subject to autovivification and type inference should do the rest
<jhass> in general you should never need :: unless you interact with external C libraries directly
<olek_poz> error "was not initialized in all of the 'initialize' methods, rendering it nilable". I'm thinking about proper structure of code. In C/C++ I'd know how to do it with of h/hpp file.
<jhass> olek_poz: well, WebcamArray.new(logger) ideally
<jhass> @logger
<jhass> instead of making it a property
<jhass> the error just points out that if you forget to call setup WebCamArray's @logger is nil and you didn't handle that
<olek_poz> I understand error, but it's the most proper way is to add every object as parameter of initialize method?
<jhass> for most cases
<jhass> after all your WebcamArray instance will be dysfunctional without the logger set
<jhass> so it needs it to live so to say
<jhass> the alternative is that you make it handle living without it, that is check logger isn't nil before calling methods on it
trapped has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<olek_poz> I setup logger after initialize, before using them. And it would be more than okay for me, but it looks like it has to be initialized in 'initialize' method to works.
<jhass> crystal doesn't know that you will always or even have always done it
<jhass> it doesn't put all method calls into a global order and checks there's always something that sets a var before or something, that would take forever
<jhass> and I even think doing so would a lot more annoying in the long term
<jhass> because you reorder something and suddenly something probably only remotely and through 3 levels of abstractions becomes nilable
<jhass> *remotely related
<jhass> and then there's concurrency issues and meh
apt-get has joined #crystal-lang
brunto_ has joined #crystal-lang
<olek_poz> In c++ if I do something wrong it will result in segfault. I'm not c++ pro coder, but using header file and assigning pointers at runtime worked fine. It looks like crystal allow only to assign in initialize method, and not later. The only exception are primitive objects.
brunto has quit [Ping timeout: 260 seconds]
apt-get has quit [Ping timeout: 256 seconds]
<jhass> olek_poz: yes, Crystal aims to be a safe language
<olek_poz> Ok. Thank you for info.
<jhass> unless you explicitly touch unsafe parts (C bindings, :: and a few others), generating a binary that segfaults for another reason than a stack overflow is considered a compiler bug
Sadin has joined #crystal-lang
NeverDie has joined #crystal-lang
brunto_ has quit [Ping timeout: 240 seconds]
trapped has joined #crystal-lang
Ven has joined #crystal-lang
elia has quit [Quit: Computer has gone to sleep.]
alanwillms has joined #crystal-lang
Ven has quit [Read error: Connection reset by peer]
Ven has joined #crystal-lang
Ven has quit [Client Quit]
olek_poz has quit [Ping timeout: 264 seconds]
leafybasil has joined #crystal-lang
Ven has joined #crystal-lang
leafybas_ has quit [Ping timeout: 260 seconds]
leafybasil has quit [Ping timeout: 244 seconds]
alanwillms has quit [Read error: Connection reset by peer]
<jhass> so who wants to beta test http://nightly.crystal-lang.org/ ?
alanwillms has joined #crystal-lang
Ven has quit [Client Quit]
Ven has joined #crystal-lang
<crystal-gh> [crystal] adlerhsieh opened pull request #1733: Add documentation to Hash (master...add-doc-3) http://git.io/vCg46
Ven_ has joined #crystal-lang
Ven has quit [Read error: Connection reset by peer]
Ven_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
gamemanj has quit [Remote host closed the connection]
n0xff has joined #crystal-lang
olek_poz has joined #crystal-lang
greengriminal has joined #crystal-lang
shama has joined #crystal-lang
datanoise has joined #crystal-lang
bcardiff_ has joined #crystal-lang
bcardiff has quit [Ping timeout: 260 seconds]
bcardiff_ is now known as bcardiff
datanoise has quit [Quit: Textual IRC Client: www.textualapp.com]
datanoise has joined #crystal-lang
datanoise has quit [Client Quit]
datanoise has joined #crystal-lang
Nik- has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ozra has joined #crystal-lang
<ozra> Just saw the mention about `===` operator in #1730 - I can't find it in the manual. jhass: is there some doc somewhere, or could you explain it briefly?
<DeBot> https://github.com/manastech/crystal/issues/1730 (Equality comparison between Char and single character String give unexptected result)
<ozra> thanks
<jhass> like #== it boils down to just be a method call, so it depends on what you call it
<jhass> on
<jhass> Ruby defines it for many things making case/when powerful
<jhass> for example Proc#=== calls the proc even
<ozra> ok. "conceptual equality" sort of? Would it be reasonable to use as `/.*/ === "foo"`? Or is the thought different? Rather: `/.*/ === ".*" ?
<BlaXpirit> ozra, uh i think it does work like that
<BlaXpirit> >> /.*/ === "foo"
<DeBot> BlaXpirit: # => true - http://carc.in/#/r/it1
<BlaXpirit> it's not conceptual equality
<BlaXpirit> i think it's literally just made with `case` in mind
<jhass> yes, the Ruby term is "case equality", using it outside of implicitly in case/when and a few things like Array#grep is generally considered ugly
<BlaXpirit> "would it make sense if it matched inside case"
<ozra> ah. Super cool. That's what I would expect from that comparison.
<ozra> Good way to put it.
<jhass> it's a looser equality, unlike other languages who have both == and === where === is usually stronger
<ozra> Yeah.
<ozra> I think having == stronger, as in Crystal, (as discuseed in that issue) is better default.
<jhass> yeah
<ozra> Ok, then I grok it :) (sorry, reading Stranger In a Strange Land atm, so that expression sticks ;-)
<jhass> though I have to agree that '.' == "." being true feels right still
<BlaXpirit> nope
<ozra> no
<ozra> '.' === ".". I'm down with :)
<jhass> it's hard to argue, thus I didn't participate
<ozra> BlaXpirit: is there a term such as "conceptual equality"? I just made that up to explain atm, haha.
<BlaXpirit> ozra, i wouldn't call it any kind of equality
<BlaXpirit> it's just... matching
<ozra> jhass: Yeah, I'm happy the way it is anyway.
<ozra> BlaXpirit: Well put.
<ozra> Oh, shit, ok, now I get it - '===' is implicitly used in 'case'. Good thing I learned this! Thanks for bringing my attention to it.
trapped has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bcardiff_ has joined #crystal-lang
bcardiff has quit [Ping timeout: 264 seconds]
bcardiff_ is now known as bcardiff
alanwillms has quit [Read error: Connection reset by peer]
alanwillms has joined #crystal-lang
bcardiff has quit [Quit: bcardiff]
bcardiff has joined #crystal-lang
bcardiff has quit [Client Quit]
<ozra> I haven't realized till now that it's possible to write code directly in a class at root level. What purpose does this serve - any example?
<jhass> probably mostly a legacy from Ruby
<jhass> though allowing macro calls but normal crystal would be kinda weird
<jhass> also calling calls methods of the parent class in the child class can be useful sometimes
<jhass> er, *class methods
elia has joined #crystal-lang
<ozra> alright. yeah, macros makes sense, but I just couldn't think of a good reason for run-time code..
trapped has joined #crystal-lang
Sadin has quit [Ping timeout: 252 seconds]
trapped has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<crystal-gh> [crystal] asterite merged formatter into master: http://git.io/vC2yW
pawnbox has quit [Remote host closed the connection]
alanwillms has quit [Quit: This computer has gone to sleep]
<travis-ci> manastech/crystal#173ec32 (master - bin/crystal shows info message in stderr): The build passed. https://travis-ci.org/manastech/crystal/builds/85207155
qard has joined #crystal-lang
rappo has joined #crystal-lang
rappo has left #crystal-lang [#crystal-lang]
alanwillms has joined #crystal-lang
leafybasil has joined #crystal-lang
greengriminal has quit [Quit: Leaving]
<crystal-gh> [crystal] asterite pushed 2 new commits to master: http://git.io/vCavK
<crystal-gh> crystal/master 8728f46 Ary Borenszweig: Some formatter fixes making sure it's idempotent
<crystal-gh> crystal/master acf9b09 Ary Borenszweig: Fixed parser bug related to fun defs and arguments
<travis-ci> manastech/crystal#8728f46 (master - Some formatter fixes making sure it's idempotent): The build passed. https://travis-ci.org/manastech/crystal/builds/85217025
nakilon has joined #crystal-lang
alanwillms has quit [Read error: Connection reset by peer]
alanwillms has joined #crystal-lang
shama has quit [Quit: (╯°□°)╯︵ɐɯɐɥs]
NeverDie has quit [Quit: http://radiux.io/]
BlaXpirit has quit [Quit: Konversation]
elia has quit [Quit: Computer has gone to sleep.]
BlaXpirit|m has joined #crystal-lang
BlaXpirit|m has quit [Quit: AndChat]
alanwillms has quit [Ping timeout: 256 seconds]
cyjimmy264 has quit [Ping timeout: 268 seconds]
fowlduck has joined #crystal-lang