RX14 changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.20.0 | 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
soveran has joined #crystal-lang
soveran has joined #crystal-lang
soveran has quit [Changing host]
tomchapin has quit [Ping timeout: 250 seconds]
tomchapin has joined #crystal-lang
soveran has quit [Ping timeout: 260 seconds]
tomchapin has quit [Read error: Connection reset by peer]
tomchapin has joined #crystal-lang
mbarbar has joined #crystal-lang
tomchapin has quit [Read error: Connection reset by peer]
tomchapin has joined #crystal-lang
pduncan has joined #crystal-lang
mbarbar has quit [Ping timeout: 250 seconds]
asterite has quit [Ping timeout: 250 seconds]
asterite has joined #crystal-lang
DeBot has quit [Ping timeout: 260 seconds]
tomchapin has quit [Read error: Connection reset by peer]
tomchapin has joined #crystal-lang
soveran has joined #crystal-lang
bjz has quit [Ping timeout: 244 seconds]
bjz has joined #crystal-lang
soveran has quit [Ping timeout: 260 seconds]
pawnbox has joined #crystal-lang
tomchapin has quit [Ping timeout: 246 seconds]
bjz_ has joined #crystal-lang
bjz has quit [Ping timeout: 268 seconds]
soveran has joined #crystal-lang
tomchapin has joined #crystal-lang
soveran has quit [Ping timeout: 256 seconds]
mbarbar has joined #crystal-lang
mbarbar has quit [Read error: Connection reset by peer]
pawnbox has quit [Ping timeout: 250 seconds]
pawnbox has joined #crystal-lang
pduncan has quit [Ping timeout: 245 seconds]
tomchapin has quit [Read error: Connection reset by peer]
pawnbox has quit [Read error: No route to host]
tomchapin has joined #crystal-lang
pawnbox has joined #crystal-lang
pawnbox_ has joined #crystal-lang
pawnbox has quit [Ping timeout: 250 seconds]
pawnbox_ has quit [Read error: Connection reset by peer]
_whitelogger has joined #crystal-lang
<travis-ci> crystal-lang/crystal#e84e2c4 (master - Added missing codegen/debug_spec): The build has errored. https://travis-ci.org/crystal-lang/crystal/builds/180569496
soveran has joined #crystal-lang
soveran has quit [Ping timeout: 256 seconds]
pawnbox has joined #crystal-lang
tomchapin has quit [Read error: Connection reset by peer]
tomchapin has joined #crystal-lang
soveran has joined #crystal-lang
soveran has quit [Ping timeout: 265 seconds]
Fichtenstein has joined #crystal-lang
<crystal-gh> [crystal] MakeNowJust opened pull request #3621: Add missing --no-color option to spec and eval command (master...fix/add-no-color-option-to-spec-and-eval) https://git.io/v1n7F
tomchapin has quit [Read error: Connection reset by peer]
tomchapin has joined #crystal-lang
tomchapin has quit [Read error: Connection reset by peer]
tomchapin has joined #crystal-lang
muelleme has joined #crystal-lang
soveran has joined #crystal-lang
Philpax has joined #crystal-lang
tomchapin has quit [Read error: Connection reset by peer]
pawnbox has quit [Remote host closed the connection]
tomchapin has joined #crystal-lang
pawnbox has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
<crystal-gh> [crystal] MakeNowJust opened pull request #3622: Accept to pass compiler options to crystal docs (master...feature/crystal-docs-accepts-compiler-option) https://git.io/v1np2
Fichtenstein has quit [Quit: Fichtenstein]
pawnbox has joined #crystal-lang
optikfluffel has joined #crystal-lang
gloscombe has joined #crystal-lang
swav has quit [Ping timeout: 260 seconds]
BlaXpirit_ has joined #crystal-lang
BlaXpirit has quit [Ping timeout: 245 seconds]
BlaXpirit_ is now known as BlaXpirit
swav has joined #crystal-lang
<FromGitter> <gamebusterz> @spalladino Thanks Santiago, I'll start on it :)
Philpax has quit [Ping timeout: 248 seconds]
muelleme has quit [Ping timeout: 250 seconds]
<FromGitter> <splattael> Is it on purpose that `Hash#merge` combines values *and* types whereas `Hash#merge!` only accepts the types specified? ⏎ ⏎ ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=584146b916207f7b0ed2b943]
matp_ has joined #crystal-lang
matp has quit [Ping timeout: 250 seconds]
Philpax has joined #crystal-lang
tomchapin has quit [Ping timeout: 250 seconds]
tomchapin has joined #crystal-lang
<Yxhuvud> merge! update in place. hence changing the type of it doesn't make sense. merge on the other hand create a new hash.
<FromGitter> <splattael> True, but I did not expect `#merge` to also union the types.
<FromGitter> <splattael> Is it just me?
soveran has quit [Remote host closed the connection]
soveran has joined #crystal-lang
soveran has quit [Changing host]
soveran has joined #crystal-lang
soveran has quit [Remote host closed the connection]
tomchapin has quit [Read error: Connection reset by peer]
<BlaXpirit> splattael, yes, just you. what else should happen?
soveran has joined #crystal-lang
soveran has joined #crystal-lang
soveran has quit [Changing host]
tomchapin has joined #crystal-lang
<FromGitter> <splattael> @BlaXpirit As the docs states. Just merge to values. Raise if types do not match.
<FromGitter> <splattael> Raise -> compile error.
<FromGitter> <splattael> Or, explain in the docs that types are also "merged" (union).
<FromGitter> <splattael> https://github.com/crystal-lang/crystal/blob/master/src/hash.cr#L445 "Similar to `#merge`, but the receiver is modified."
<FromGitter> <splattael> ...and checks types."
<FromGitter> <splattael> To be clear. I thought `#merge` is the same as `#merge!` except it modifies receiver.
<FromGitter> <splattael> The doc states it this way. But `#merge!` is quite different IMHO.
<FromGitter> <splattael> Maybe `Hash#union` should do what `#merge` is doing right now.
<FromGitter> <splattael> `Set#merge` works the way I would expected it. ⏎ ⏎ ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5841620789d179bf4df1fe45]
<FromGitter> <splattael> just my 2 cents
<crystal-gh> [crystal] asterite pushed 2 new commits to master: https://git.io/v1cWe
<crystal-gh> crystal/master dd4c33e Ary Borenszweig: Compiler: be more permissive with initialize as macro methods...
<crystal-gh> crystal/master 24b6395 Ary Borenszweig: Fix typo
DeBot has joined #crystal-lang
<crystal-gh> [crystal] asterite pushed 1 new commit to master: https://git.io/v1cly
<crystal-gh> crystal/master 49f52ea Ary Borenszweig: sprintf: make negative width left-justify. Fixes #3619
Philpax has quit [Ping timeout: 240 seconds]
pawnbox has quit [Remote host closed the connection]
<BlaXpirit> wow
<FromGitter> <sdogruyol> ugh
<FromGitter> <sdogruyol> isnt that a behaviour mismatch?
<BlaXpirit> "be more permissive with initialize as macro methods" - finally he ran into a usecase for what should've been there all along
<BlaXpirit> oh but it's just that case, seems like calling other macros still doesnt count as initialization
<FromGitter> <sdogruyol> should calling be count as init?
<FromGitter> <spalladino> @splattael the `Hash` vs `Set` `#merge` is definitely a nasty surprise; could you open an issue on the repo?
gloscombe has quit [Ping timeout: 245 seconds]
gloscombe has joined #crystal-lang
<crystal-gh> [crystal] Sija opened pull request #3623: Select anchor from location.hash on page load (master...docs-onload-anchor) https://git.io/v1cuJ
<RX14> @asterite are you around?
pawnbox has joined #crystal-lang
<FromGitter> <splattael> @spalladino sure!
tomchapin has quit [Read error: Connection reset by peer]
tomchapin has joined #crystal-lang
<RX14> @splattael Hash#merge should merge types, and so should Set#merge
<FromGitter> <splattael> @RX14 Oh, really. I would not expect that because `Hash#merge!` does not do this neither.
<FromGitter> <splattael> (yeah, I know why)
<RX14> thats because you can't change the type on an existing object
<FromGitter> <splattael> ^
<RX14> there's no rule that mege and merge! have to have exactly the same semantics
<RX14> merge on set should be called merge! actually
tomchapin has quit [Read error: Connection reset by peer]
<FromGitter> <splattael> @RX14 what do you mean by "rule"? In Crystal (and Ruby) it is common sense that bang-methods behave *exactly* like the "normal" ones except they modify the receiver.
<RX14> but in crystal they can't
<FromGitter> <splattael> Of course, there are exceptions but in most cases they both have the same semantics.
<RX14> so they act the same behaviourly
<RX14> but don't modify the type
<RX14> because they can't
<RX14> you can use type restrictions on your methods, or use `.as` to specify that the merge argument is a specific type
<FromGitter> <splattael> That's my point. IMHO `#merge{,!}` should only merge values and check types.
<FromGitter> <splattael> `#union` might also merge types.
<RX14> `.as` will fail at compile time if it's impossible always: https://carc.in/#/r/1fe8
<FromGitter> <splattael> @RX14 As for `.as`sure. But mostly I don't need to it explicitly.
<FromGitter> <splattael> Anyway, I was just very surprised and wondered if others are too...
<RX14> most are ruby developers and are surprised that merge! doesn't change the type rather than the other way around
<RX14> I think the current behaviour is fine and expected, once you get used to it
<FromGitter> <splattael> lol ok
<FromGitter> <splattael> @RX14 I think your last statement is a "oxymoron" ;)
<RX14> maybe
tomchapin has joined #crystal-lang
tomchapin has quit [Read error: Connection reset by peer]
<FromGitter> <splattael> @RX14 I saw it, it's still confusing for me ;) Thanks for taking your time :D
soveran has quit [Remote host closed the connection]
pawnbox has quit [Remote host closed the connection]
soveran has joined #crystal-lang
soveran has joined #crystal-lang
soveran has quit [Changing host]
vasilakisfil has quit [Quit: Konversation terminated!]
pawnbox has joined #crystal-lang
pawnbox_ has joined #crystal-lang
pawnbox has quit [Ping timeout: 260 seconds]
soveran has quit [Remote host closed the connection]
pduncan has joined #crystal-lang
soveran has joined #crystal-lang
soveran has joined #crystal-lang
soveran has quit [Changing host]
<travis-ci> crystal-lang/crystal#e84e2c4 (master - Added missing codegen/debug_spec): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/180569496
gloscombe has quit [Quit: Lost terminal]
soveran has quit [Remote host closed the connection]
rolha has joined #crystal-lang
<rolha> hi everyone
soveran has joined #crystal-lang
<rolha> can I include an .ecr file inside another one?
<FromGitter> <sdogruyol> @rolha you can
<rolha> hi sdogruyol. I'm using Kemal which you probably heard of ;)
<FromGitter> <sdogruyol> @rolha hello there, thanks for using kemal
<rolha> is there an easy way to do it in Kemal? or some docs I can read?
<FromGitter> <sdogruyol> sure http://kemalcr.com/docs/views/
<rolha> cool ,thanks!
<FromGitter> <sdogruyol> you're welcome
rolha has quit [Remote host closed the connection]
rolha has joined #crystal-lang
soveran has quit [Remote host closed the connection]
soveran has joined #crystal-lang
pawnbox_ has quit [Remote host closed the connection]
avdi has quit [Remote host closed the connection]
soveran has quit [Remote host closed the connection]
soveran has joined #crystal-lang
soveran has joined #crystal-lang
soveran has quit [Changing host]
danzilio has quit [Remote host closed the connection]
avdi has joined #crystal-lang
<travis-ci> crystal-lang/crystal#dd4c33e (master - Compiler: be more permissive with initialize as macro methods): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/180685181
soveran has quit [Remote host closed the connection]
danzilio has joined #crystal-lang
rolha has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<FromGitter> <paulcsmith> Is it possible to use a block like this with ecr? I'm trying to add some HTML helpers like this, but can't figure out how to get it to work: https://gist.github.com/paulcsmith/f3b29429dca292563c83027d42ffc9e5
<FromGitter> <paulcsmith> I've tried searching the mailing list and issue tracker and I haven't found anything about how to do this, so maybe it's not possible :S
<travis-ci> crystal-lang/crystal#49f52ea (master - sprintf: make negative width left-justify. Fixes #3619): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/180688949
<DeBot> https://github.com/crystal-lang/crystal/issues/3619 (Negative-widths on printf formats do not left-justify.)
soveran has joined #crystal-lang
<Papierkorb> Is there a ready-made crystal docker image?
<tilpner> Papierkorb - What would it do?
<Papierkorb> Crystal (as in, the compiler) with all dev and runtime dependencies
<FromGitter> <sdogruyol> @paulcsmith try using a has
<FromGitter> <sdogruyol> Hash
<tilpner> Papierkorb - I thought the convention is to not include compilers in your application containers. Did I get that wrong?
<tilpner> Or do you want a development/build container?
<Papierkorb> tilpner: Dunno, I don't care about it for production purposes
<Papierkorb> Mainly, yes. Trying to test networking code
<FromGitter> <paulcsmith> @sdogruyol I'm not sure what you mean. How would I use a hash?
<tilpner> I wonder why manastech/crystal didn't get a push since 9 months
<tilpner> RX14 - ^?
<Papierkorb> Ah, thanks
<tilpner> No, that's not what you want, but maybe you can build from it
<FromGitter> <paulcsmith> @sdogruyol Oh I see what you mean. Those are keywords args. Even when I use a hash or wrap the call to `form_for` in parens it throws the error. It doesn't throw the error when I use `<%` (no `=`_
<FromGitter> <paulcsmith> It only does it when I use the `<%= %>` with the block. So it seems like outputting the block is not supported. But that seems odd to me that it wouldn't be
<FromGitter> <paulcsmith> So I'm not sure if I'm just missing something obvious
<tilpner> (But I don't know what heroku/cedar is)
rolha has joined #crystal-lang
<FromGitter> <sdogruyol> @paulcsmith i've done that with kemal
<FromGitter> <sdogruyol> hold on
<FromGitter> <sdogruyol> ofc it has to be a macro for expansion
<FromGitter> <paulcsmith> Kind of a bummer it needs to be a macro, but that should work. Thanks @sdogruyol!
<FromGitter> <paulcsmith> Well I can see why it needs to be for the content_for stuff, but too bad it needs to be for form_for since it's not really doing much
<FromGitter> <sdogruyol> well since it's doing dynamic template generation
<FromGitter> <sdogruyol> it has to be at compile time like ecr
<FromGitter> <sdogruyol> @paulcsmith are you building a helper library for ECR?
<FromGitter> <sdogruyol> i think we really need something like that
<FromGitter> <paulcsmith> I'm building some view helpers for an app I'm working on. I'm sure it could be extracted and used for other libs though
<FromGitter> <sdogruyol> yeah
<FromGitter> <paulcsmith> For example, `form_for` would set the action in a hidden field for `PUT` requests, set CSRF, etc.
<FromGitter> <sdogruyol> someone has to do that for sure :)
<FromGitter> <sdogruyol> yup
<FromGitter> <sdogruyol> i was thinking of doing something like that
<FromGitter> <sdogruyol> for kemal ofc
<FromGitter> <sdogruyol> first step is to build a common library then plug kemal into it
rolha has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<FromGitter> <paulcsmith> Yeah I'll try to get it to a point that it's usable outside this project. Also tested so I know there aren't regressions :P
<FromGitter> <sdogruyol> @paulcsmith good job :)
<FromGitter> <catmando> is it possible to use crystal / kemal somehow with ActiveRecord?
<FromGitter> <sdogruyol> @catmando not with the AR from Ruby
<FromGitter> <catmando> but?
<FromGitter> <paulcsmith> So far thinking with static types has been tricky. I have to rethink a lot of things, but I think the design in the end is better
<FromGitter> <sdogruyol> there used to be activerecord.cr but it's not maintained
<FromGitter> <paulcsmith> Plus compiler catches a lot of stuff (which is nice)
<FromGitter> <sdogruyol> @paulcsmith it leads to a future proof design for sure
<FromGitter> <catmando> so what do people use for persistence in kemal?
<FromGitter> <paulcsmith> mongo :P
<FromGitter> <paulcsmith> jk crystal-pg
<FromGitter> <paulcsmith> or crystal-db if you use mysql
<FromGitter> <sdogruyol> @catmando for me i use Kemal + Tren with crystal-db
<FromGitter> <sdogruyol> or pg yeah
<FromGitter> <paulcsmith> There are also a few ORMs that people are working on, but most are pretty early stages
<FromGitter> <sdogruyol> https://github.com/sdogruyol/tren is interesting
<FromGitter> <sdogruyol> after leaving Ruby-land i dont wanna use any orm anymore
<FromGitter> <sdogruyol> SQL is pretty good at what it is
<FromGitter> <johnjansen> haha @sdogruyol im pretty sure its not the SQL part that most people want out of and ORM, they want the model end … happy to be wrong on this of course
<FromGitter> <sdogruyol> @johnjansen yeah, imho Repository pattern is much more better for that
<FromGitter> <sdogruyol> like ecto
<FromGitter> <sdogruyol> or rom-rb
<Papierkorb> Or sequel <3
<FromGitter> <sdogruyol> yup
<FromGitter> <sdogruyol> i'm really curious how this will turn out https://github.com/fridgerator/crecto
<FromGitter> <johnjansen> thats interesting, i havent tripped over any of those to date
<FromGitter> <johnjansen> must remember that
<FromGitter> <sdogruyol> i like ecto so this would be a great fit
<FromGitter> <sdogruyol> actually i'm curious if we can have LINQ for Crystal
<FromGitter> <catmando> The reason i ask is that we are loving http://ruby-hyperloop.io and I am trying to figure out how to port this to crystal. The two big missing pieces would be a crystal -> js (for the client side) and some kind of ORM. HyperLoop includes a gem (HyperMesh) that makes your AR models available directly on client.
<FromGitter> <sdogruyol> @catmando have you seen https://github.com/geppetto-apps/crow
<Papierkorb> That hyperloop thing looks like VoltRb
<FromGitter> <catmando> @sdogruyol yes I have started chatted with the author. I was surprised however that he was not just using emscripten which seemed like a much easier route.
vivus-ignis has joined #crystal-lang
<FromGitter> <sdogruyol> ugh
<Papierkorb> Why would they? Opal has come a long way
<FromGitter> <sdogruyol> hold on i have something useful for you
matp has joined #crystal-lang
<FromGitter> <paulcsmith> Whoah. I haven't seen emscripten before. Seems very cool
<FromGitter> <sdogruyol> @catmando my friend made this https://github.com/f/kreal
<FromGitter> <paulcsmith> Crystal -> js would be awesome
<FromGitter> <sdogruyol> you can share your Crystal code with JS with this
<FromGitter> <paulcsmith> That's pretty cool
<FromGitter> <paulcsmith> I was actually wondering about this the other day. How to share models with the front end so they never get out of date
<FromGitter> <paulcsmith> Combine with flow or typescript and it could even be checked at compile time
<FromGitter> <catmando> A lot of ideas from volt went into HyperMesh (the persistence part of HyperLoop) but the problem with volt (for me anyway) was I needed a way to integrate with an existing rails app.
<FromGitter> <sdogruyol> well kreal was a good idea but unfortunately @f is not maintaining it
matp_ has quit [Ping timeout: 250 seconds]
<FromGitter> <johnjansen> well @f that then ;-) JOKE
<FromGitter> <sdogruyol> hahaha
<FromGitter> <sdogruyol> nice one
<FromGitter> <sdogruyol> he is also known as fakin lol
<FromGitter> <johnjansen> ‘a’ not ‘u'
<FromGitter> <sdogruyol> i meant IRL name
<FromGitter> <johnjansen> :-)
shawn42 has left #crystal-lang [#crystal-lang]
soveran has quit [Remote host closed the connection]
vivus-ignis has quit [Ping timeout: 260 seconds]
<crystal-gh> [crystal] rdp opened pull request #3627: make builds cross compile to correct target for x86_64-apple-darwin16.1.0 (master...osx_triple) https://git.io/v1C9s
<crystal-gh> [crystal] rdp opened pull request #3628: mention that there are many other options, not shown in the default help (master...note_more_help_available) https://git.io/v1CQt
muelleme has joined #crystal-lang
Philpax has joined #crystal-lang
muelleme has quit [Ping timeout: 265 seconds]
soveran has joined #crystal-lang
optikfluffel has quit [Quit: Textual IRC Client: www.textualapp.com]
snsei has joined #crystal-lang
snsei has quit [Remote host closed the connection]
snsei has joined #crystal-lang
soveran has quit [Ping timeout: 256 seconds]
snsei has quit [Remote host closed the connection]
snsei has joined #crystal-lang
snsei has quit [Remote host closed the connection]