<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>
<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]