ChanServ changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.22.0 | Fund Crystal's 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
leex_ has joined #crystal-lang
leex has quit [Write error: Broken pipe]
<travis-ci> crystal-lang/crystal#430bf0b (master - Correct spec case): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/239421788
<crystal-gh> [crystal] asterite pushed 1 new commit to master: https://git.io/vHauP
<crystal-gh> crystal/master b508e2a Ary Borenszweig: Fixed #4262: incorrect docs for Slice#copy_from and similar
<travis-ci> crystal-lang/crystal#755f73a (master - Fixed #4338: incorrect parsing of `exp rescue exp if exp`): The build was fixed. https://travis-ci.org/crystal-lang/crystal/builds/239427478
<DeBot> https://github.com/crystal-lang/crystal/issues/4338 (trailing conditionals v.s conditional blocks)
<travis-ci> crystal-lang/crystal#b508e2a (master - Fixed #4262: incorrect docs for Slice#copy_from and similar): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/239430962
<DeBot> https://github.com/crystal-lang/crystal/issues/4262 (Invalid docs for Slice#copy_from and Slice#move_from)
adam12 is now known as adam__
adam__ is now known as adam12
_whitelogger has joined #crystal-lang
Philpax_ has joined #crystal-lang
snsei has joined #crystal-lang
snsei has quit [Ping timeout: 260 seconds]
pduncan has joined #crystal-lang
duckqlz has joined #crystal-lang
pduncan has quit [Ping timeout: 272 seconds]
baweaver is now known as baweaver_away
baweaver_away is now known as baweaver
snsei has joined #crystal-lang
snsei has quit [Ping timeout: 272 seconds]
<crystal-gh> [crystal] bcardiff pushed 1 new commit to master: https://git.io/vHarN
<crystal-gh> crystal/master b4b701a Brian J. Cardiff: Avoid hiding Crystal module from docs
_whitelogger has joined #crystal-lang
_whitelogger has joined #crystal-lang
<travis-ci> crystal-lang/crystal#b4b701a (master - Avoid hiding Crystal module from docs): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/239458037
sz0 has quit [Quit: Connection closed for inactivity]
red_menace has joined #crystal-lang
red_menace has quit [Client Quit]
snsei has joined #crystal-lang
snsei has quit [Ping timeout: 260 seconds]
MatrixTraveler[m has quit [*.net *.split]
aemadrid has quit [*.net *.split]
Majost has quit [*.net *.split]
avdi has quit [*.net *.split]
kiliankoe has quit [*.net *.split]
avdi has joined #crystal-lang
Majost has joined #crystal-lang
aemadrid has joined #crystal-lang
kiliankoe has joined #crystal-lang
MatrixTraveler[m has joined #crystal-lang
Raimondii has joined #crystal-lang
Raimondi has quit [Ping timeout: 268 seconds]
Raimondii is now known as Raimondi
rohitpaulk has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 240 seconds]
rohitpaulk has joined #crystal-lang
pduncan has joined #crystal-lang
yogg-saron has joined #crystal-lang
pduncan has quit [Ping timeout: 246 seconds]
rohitpaulk has quit [Ping timeout: 260 seconds]
rohitpaulk has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 240 seconds]
_whitelogger has joined #crystal-lang
<FromGitter> <bararchy> Trying to work with crystal_db & mysql ⏎ I got a `SELECT * FROM my_table` and then this: ⏎ ⏎ ```not supported read``` ⏎ ... [https://gitter.im/crystal-lang/crystal?at=59353f1f167d046a7d6d37bf]
<FromGitter> <bararchy> lokking at the backtrace it fails at `rs.read(String)`
_whitelogger has joined #crystal-lang
<crystal-gh> [crystal] RX14 opened pull request #4517: Format multi-line braces blocks using do/end (master...feature/formatter-do/end) https://git.io/vHVfi
<RX14> looks like you aren't reading the schema correctly
<RX14> you probably use read() too many times or for the wrong datatypes
yogg-saron has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rohitpaulk has joined #crystal-lang
unshadow has joined #crystal-lang
snsei has joined #crystal-lang
unshadow has quit [Quit: leaving]
<FromGitter> <akzhan> may be implement something like DB.mapping macro?
<FromGitter> <bararchy> My DB looks like that: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=59355ad9ca6d4ae80ce279df]
<FromGitter> <bararchy> I dont see how else I can read that, maybe I dont get the query_each function
<FromGitter> <bararchy> Mטנק ן,ךך חודא םפקמ ש פרםפקר ןדדוק XD\
<FromGitter> <bararchy> Maybe I'll just open a proper issue
<RX14> @bararchy the id is an int and you're reading a string...
<FromGitter> <bararchy> Changed to Int32, still same issue :(
<FromGitter> <akzhan> @bararchy any you should use http://crystal-lang.github.io/crystal-db/api/0.4.2/DB.html#mapping%28properties%2Cstrict%3Dtrue%29-macro
<FromGitter> <bararchy> @akzhan Good idea, I'll try that
rohitpaulk has quit [Ping timeout: 255 seconds]
<FromGitter> <bcardiff> @bararchy the issue is mediumint I think. Is the only one of https://dev.mysql.com/doc/refman/5.7/en/integer-types.html that it is not mapped in crystal-mysql :-(
<FromGitter> <bararchy> Ohhhhhh
<FromGitter> <bararchy> I'll use something else then
<FromGitter> <akzhan> simply add mapping to crystal-mysql?
LastWhisper____ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<RX14> @akzhan mapping uses read() under the hood
<RX14> but yes the converters probably need to be updated
<FromGitter> <akzhan> @RX14 yes, of course. i simply mention aboutt mapping that’s more robust way.
rohitpaulk has joined #crystal-lang
pduncan has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 246 seconds]
dannyAAM has quit [Ping timeout: 258 seconds]
rohitpaulk has joined #crystal-lang
dannyAAM has joined #crystal-lang
Philpax_ has quit [Ping timeout: 260 seconds]
snsei has quit [Remote host closed the connection]
rohitpaulk has quit [Ping timeout: 240 seconds]
LastWhisper____ has joined #crystal-lang
rohitpaulk has joined #crystal-lang
wontruefree has joined #crystal-lang
Renich has joined #crystal-lang
wontruefree has quit [Ping timeout: 246 seconds]
rohitpaulk has quit [Ping timeout: 246 seconds]
rohitpaulk has joined #crystal-lang
Renich has quit [Quit: Renich]
rohitpaulk has quit [Ping timeout: 255 seconds]
Renich has joined #crystal-lang
<FromGitter> <elorest> What is the state of the official Docker image? I notice it has it been updated for two months but it claims to be an automated build.
<FromGitter> <akzhan> no new version release for approx. two months
<RX14> i think possibly a new release is coming soon
<FromGitter> <akzhan> Extended unicode support just in the middle. But yes, I want to new version be released asap.
<FromGitter> <akzhan> there a lot of bug fixes landed.
<FromGitter> <bcardiff> @elorest the docker images are updated on release (using /Dockerfile.release) . But docker hub is unable to build the /Dockerfile to have a head version.
rohitpaulk has joined #crystal-lang
<FromGitter> <akzhan> @RX14 just created https://github.com/crystal-lang/crystal-mysql/issues/33 (to not forget about).
<RX14> @akzhan we'd likely just serialise it to an Int32
<RX14> not create non power of two int sizes
<FromGitter> <akzhan> May be :) Anyway we need specific type, that handles overflow.
<RX14> do we?
<RX14> it'd be nice but it's not required
<FromGitter> <akzhan> hm, just seen in mysql sriver ⏎ ⏎ decl_type Int24, 0x09u8 ⏎ ⏎ so i will check for problem [https://gitter.im/crystal-lang/crystal?at=59358e7c6462d8493ce18ad2]
Kug3lis has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 255 seconds]
Winty has joined #crystal-lang
<Winty> hey guys. why in this code: https://play.crystal-lang.org/#/r/24y7 line 24 creates new var instead of calling Foos method while it prefers Foos function method over global function?
<FromGitter> <bcardiff> I think it is missleading. It should not compile since the `bar = `is creating a variable inside the block. Please, submit an issue @Winty .
greengriminal has joined #crystal-lang
greengriminal has quit [Client Quit]
<FromGitter> <bcardiff> A workaround is either use a different variable name, or call the setter`itself.bar = "FooBar"`if that is what you want.
<Winty> itself works but i think if i yield using with it should always prefer methods of the yielded class
<Winty> thats the reason why im yielding using with. so i don't have to type receiver for every call
<FromGitter> <bcardiff> it won't pick the setter. that's for sure. But it is missleading that the second call to getter resolves to the variable, but the first one doesn't. Since the variable will hide the getter, that snippet should refuse to compile with a "read before write variable"
<oprypin> took me a while to get what bcardiff was saying, but i agree
<Winty> it's the same here
<Winty> that's kinda diminishing why i would choose to have foo= method over set_foo
<Winty> if it creates new variable even if method with same name exists and is usable
<oprypin> Winty, that's deliberate
<oprypin> i would say that implicit getter access shouldnt work but whatever it's legacy from ruby, people don't dispute such things
<oprypin> use `self.bar = val`
<Winty> can't use self.bar = val because bar is not class method
<Winty> oh i can
<Winty> nevermind
<oprypin> not sure if there's an equivalent for the `with` thing but for the latest example it's the intended way
wontruefree has joined #crystal-lang
<Winty> ok then
mooe has joined #crystal-lang
wontruefree has quit [Quit: Textual IRC Client: www.textualapp.com]
<FromGitter> <elorest> @akzhan Ok thanks. I could have sworn 0.22.0 only came out a month ago.
<FromGitter> <bew> @bcardiff I don't get why the code shouldn't compile and give a "read before write variable" kind of error
<FromGitter> <bew> The first `puts bar` calls the getter, and the second refers to the variable.. I agree it'd not obvious when you read the block, but I don't see how we could prevent that use
<RX14> @bcardiff I agree with @bew, I see no reason to change the result of this: https://play.crystal-lang.org/#/r/24yx
<FromGitter> <bcardiff> It's true, there is no reason. I was being to strict. There is no reason to change that behavior. (I thought it was not allowed, hence my suggestion)
duckqlz has quit [Ping timeout: 258 seconds]
duckqlz has joined #crystal-lang
Renich has quit [Quit: Renich]
duckqlz has quit [Remote host closed the connection]
z64 has quit [Quit: WeeChat 1.7]
<FromGitter> <asterite> We should probably remove `with ... yield` too, it adds very little when one can simply pass a block argument and make explicit calls on that object
Winty has quit [Quit: Page closed]
<oprypin> oh yes
<FromGitter> <bew> Oh no
<FromGitter> <akzhan> It seems that I need to understand how LLVM works. Is there a quick way to understand how to replace many alloca with one?)
Kug3lis has quit [Ping timeout: 255 seconds]
<FromGitter> <akzhan> Looks like we need to define structure type for the constant expression on the fly
Kug3lis has joined #crystal-lang
Val has left #crystal-lang [#crystal-lang]
<FromGitter> <bigtunacan> How do you read/write cookies in Kemal on both server side and client side?
<FromGitter> <bigtunacan> I'm trying to using https://github.com/kemalcr/kemal-session for this, but can't quite figure it out.
<FromGitter> <akzhan> Kemal response object is http server response from crystal I suppose. Just ⏎ ⏎ response.cookies << HTTP::Cookie.new("foo", "bar")
<Yxhuvud> asterite: I really disagree on removing with yield as it make it easier to write less repetetive DSLs.
<FromGitter> <jwoertink> Oh yeah, I use that in kave https://github.com/jwoertink/kave/blob/master/src/kave.cr#L25 it helps to make kemal api cleaner and unobtrusive
mooe has quit [Quit: Connection closed for inactivity]
sz0 has joined #crystal-lang
LastWhisper____ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bungoman has quit [Quit: Leaving]
Kug3lis has quit [Quit: Textual IRC Client: www.textualapp.com]
<FromGitter> <guhenrique007> How do I manipulate multidimensional vectors (matrix) in Crystal? ⏎ I did not find anything about the documentation.
hako has joined #crystal-lang
Kug3lis has joined #crystal-lang