ChanServ changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.19.4 | Fund Crystals development: http://is.gd/X7PRtI | Paste > 3 lines of text to https://gist.github.com | GH: https://github.com/crystal-lang/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
willl has joined #crystal-lang
Majost has joined #crystal-lang
bjz has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
pawnbox has quit [Ping timeout: 260 seconds]
soveran has joined #crystal-lang
soveran has quit [Ping timeout: 244 seconds]
jadams has joined #crystal-lang
Dreamer3 has quit [Quit: Leaving...]
pawnbox has joined #crystal-lang
pawnbox has quit [Ping timeout: 248 seconds]
soveran has joined #crystal-lang
soveran has quit [Ping timeout: 260 seconds]
mrslowly has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Guest32991 is now known as adam12
bjz has joined #crystal-lang
bjz has quit [Ping timeout: 248 seconds]
bjz has joined #crystal-lang
pawnbox has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
dhk has joined #crystal-lang
eizua has joined #crystal-lang
soveran has joined #crystal-lang
soveran has quit [Ping timeout: 268 seconds]
pawnbox has joined #crystal-lang
bjz has quit [Ping timeout: 268 seconds]
bjz has joined #crystal-lang
soveran has joined #crystal-lang
soveran has quit [Ping timeout: 260 seconds]
snsei has joined #crystal-lang
snsei_ has joined #crystal-lang
snsei has quit [Ping timeout: 240 seconds]
snsei_ has quit [Ping timeout: 260 seconds]
dhk has quit [Quit: Leaving]
onethirtyfive has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
sandelius has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
sandelius has quit [Quit: Textual IRC Client: www.textualapp.com]
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
DeBot has joined #crystal-lang
bjz has joined #crystal-lang
soveran has joined #crystal-lang
soveran has quit [Ping timeout: 250 seconds]
bjz has quit [Ping timeout: 260 seconds]
bjz has joined #crystal-lang
bjz has quit [Ping timeout: 240 seconds]
bjz_ has joined #crystal-lang
soveran has joined #crystal-lang
soveran has quit [Remote host closed the connection]
soveran has joined #crystal-lang
soveran has quit [Remote host closed the connection]
soveran has joined #crystal-lang
soveran has quit [Remote host closed the connection]
soveran has joined #crystal-lang
<crystal-gh> [crystal] asterite pushed 1 new commit to master: https://git.io/vP4iL
<crystal-gh> crystal/master 8d793e7 Ary Borenszweig: Removed `ifdef` from the language. Fixes #2710
<travis-ci> crystal-lang/crystal#8d793e7 (master - Removed `ifdef` from the language. Fixes #2710): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/166055106
<DeBot> https://github.com/crystal-lang/crystal/issues/2710 (Replace ifdef with flag? macro method)
eizua has quit [Quit: Leaving]
eizua has joined #crystal-lang
Philpax_ has quit [Ping timeout: 260 seconds]
bjz_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
soveran has quit [Remote host closed the connection]
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
kulelu88 has joined #crystal-lang
pawnbox has quit [Ping timeout: 244 seconds]
eizua has quit [Remote host closed the connection]
eizua has joined #crystal-lang
pawnbox has joined #crystal-lang
eizua has quit [Remote host closed the connection]
eizua has joined #crystal-lang
soveran has joined #crystal-lang
<FromGitter> <alex-lairan> Hi guy's ! I have an object an I want to puts this object like this:
<FromGitter> <johnjansen> you need to implement a to_s method
<FromGitter> <alex-lairan> It's already done: ⏎ ```crystal src/Crolor_usage.cr ⏎ #<Crolor::Rgb:0x1741f40>``` [https://gitter.im/crystal-lang/crystal?at=57f9246b70fcb5db0c3da180]
<FromGitter> <benoist> you need implement def to_s(io)
<FromGitter> <alex-lairan> Oh ok ! :)
<FromGitter> <alex-lairan> Thanks ! It works ⏎ ``` def to_s(io) ⏎ io << "#{@r} + #{@g} + #{@b}" ⏎ end``` [https://gitter.im/crystal-lang/crystal?at=57f924c44fde7203141de056]
<FromGitter> <benoist> :smile:
<FromGitter> <johnjansen> hah, im too slow
<FromGitter> <alex-lairan> ^^
<FromGitter> <johnjansen> cant look away for a second @benoist
<FromGitter> <benoist> nope you can’t :-P
<FromGitter> <johnjansen> ;-)
soveran has quit [Remote host closed the connection]
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
<FromGitter> <alex-lairan> I'm create a RGB (and more) lib. ⏎ For create the object, we have two initialize. ⏎ ```code paste, see link``` ⏎ ⏎ Do you have a better idea to test if the input is ok? [https://gitter.im/crystal-lang/crystal?at=57f92ab584f1db06149308be]
<FromGitter> <alex-lairan> I think is a bit ugly ^^
<FromGitter> <johnjansen> use an unsigned 8 bit Int
<FromGitter> <alex-lairan> For example, I think create a third initialize with Uint8 object could be good idea
<FromGitter> <johnjansen> UInt8 not Int32
<FromGitter> <johnjansen> why not just def initialize(@r : UInt8 = 0, @g : UInt8 = 0, @b : UInt8 = 0)
<FromGitter> <alex-lairan> because I don't want to enforce the user to write ```white = Crolor::Rgb.new(255_u8, 255_u8, 255_u8)```
<FromGitter> <johnjansen> fair enough
<FromGitter> <benoist> what is your input source?
<FromGitter> <benoist> are you gonna have input come in from the web
<FromGitter> <benoist> or just from code
<FromGitter> <alex-lairan> From web, code and database
<FromGitter> <benoist> cause you can also just write 0xFFFFFF
<FromGitter> <benoist> which is a Int32
<FromGitter> <alex-lairan> it's planned :)
<FromGitter> <alex-lairan> I want to be the more generic possible
eizua has quit [Quit: Leaving]
<FromGitter> <johnjansen> seems like accepting Int32’s on init (r,g,b) you dont get any choice but to limit the range
soveran has joined #crystal-lang
soveran has joined #crystal-lang
soveran has quit [Changing host]
<FromGitter> <johnjansen> you could trap like this ` raise "out of range" if [r,g,b].any?{ |a| a > 255 } ⏎ `
<FromGitter> <alex-lairan> :+1:
<FromGitter> <johnjansen> add `a < 0` also
<FromGitter> <alex-lairan> This is realy clean, I like it !
<FromGitter> <alex-lairan> thank you :)
soveran has quit [Remote host closed the connection]
soveran has joined #crystal-lang
<crystal-gh> [crystal] asterite opened pull request #3395: [WIP] Support http server request streaming (master...feature/http_server_request_stream) https://git.io/vP4Fk
soveran has quit [Remote host closed the connection]
bjz has joined #crystal-lang
soveran has joined #crystal-lang
soveran has quit [Remote host closed the connection]
Ven_ has joined #crystal-lang
ponga has quit [Quit: Connection closed for inactivity]
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bjz has joined #crystal-lang
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
onethirtyfive has quit [Remote host closed the connection]
Ven_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bjz has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang