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
<hightower3> Does crystal have a good terminal library like blessed and/or blessed-contrib for nodejs?
Kug3lis_ is now known as Kug3lis_off
Kug3lis_off is now known as Kug3lis_
Kug3lis_ is now known as Kug3lis_off
hightower3 has quit [Ping timeout: 255 seconds]
Raimondi has quit [Remote host closed the connection]
Raimondi has joined #crystal-lang
<crystal-gh> [crystal] bcardiff closed pull request #4478: Codegen: fixed #4470, to work a return in ensure block (master...fix/crystal/ensure-return) https://git.io/vHcUA
Kug3lis has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Kug3lis_off is now known as Kug3lis_
Kug3lis_ is now known as Kug3lis_off
<FromGitter> <elorest> checkout `amber` instead of `kgen`. Kemalyst has joined Amber now.
<FromGitter> <luislavena> @drosehn try doing a `rm -rf ~/.cache/crystal && make crystal stats=1`, will notice that most of the time is spent in codegen and bc+obj
mrus has quit [Ping timeout: 245 seconds]
onec has quit []
mrus has joined #crystal-lang
_whitelogger has joined #crystal-lang
duckqlz has joined #crystal-lang
duckqlz has left #crystal-lang [#crystal-lang]
rohitpaulk has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 240 seconds]
<FromGitter> <drosehn> well, this was the first time I had compiled it myself. I've been used to using `brew upgrade crystal`, and then waiting something like 20 minutes for it to finish. :smile:
<FromGitter> <johnjansen> finally jumped right in Garance ;-)
rohitpaulk has joined #crystal-lang
oz has quit [Ping timeout: 255 seconds]
binBASH has quit [Ping timeout: 245 seconds]
oz has joined #crystal-lang
binBASH has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 240 seconds]
Raimondii has joined #crystal-lang
Raimondi has quit [Ping timeout: 268 seconds]
Raimondii is now known as Raimondi
rohitpaulk has joined #crystal-lang
Raimondi has quit [Ping timeout: 268 seconds]
Raimondi has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 240 seconds]
Raimondii has joined #crystal-lang
Raimondi has quit [Ping timeout: 268 seconds]
Raimondii is now known as Raimondi
<FromGitter> <bew> hightower3 not yet as complete as them, if you want to do terminal apps, there is some shards for ncurses, termbox. You'll need to write you own widgets
flaviodesousa has joined #crystal-lang
rohitpaulk has joined #crystal-lang
cyberarm has quit [Ping timeout: 240 seconds]
cyberarm has joined #crystal-lang
mark_66 has joined #crystal-lang
Kug3lis_off is now known as Kug3lis_
Kug3lis has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 268 seconds]
Kug3lis_ is now known as Kug3lis_off
rohitpaulk has joined #crystal-lang
olek_poz has quit [Ping timeout: 255 seconds]
olek_poz has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 246 seconds]
hightower3 has joined #crystal-lang
jokke has quit [Read error: Connection reset by peer]
jokke has joined #crystal-lang
hightower3 has quit [Ping timeout: 260 seconds]
rohitpaulk has joined #crystal-lang
<crystal-gh> [crystal] MakeNowJust opened pull request #4564: Parser: correct to parse '/' following do as regex (master...fix/crystal/parse-slash-after-do) https://git.io/vH5jv
<FromGitter> <ultra2mh> Hihow can in install Crystal in windows ?
<FromGitter> <straight-shoota> There is an experimental branch for windows but it's still work in progress https://github.com/crystal-lang/crystal/pull/3582
splitty_ has quit [Read error: Connection reset by peer]
rohitpaulk has quit [Ping timeout: 240 seconds]
<FromGitter> <straight-shoota> at the moment you can use it only on a virtual machine or through windows subsystem for linux
<FromGitter> <ultra2mh> ruby have installer for windows that compile and run codes can we hope for crystal to release official installer in future?
<FromGitter> <sdogruyol> yeah
Kug3lis has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<FromGitter> <ultra2mh> good
<FromGitter> <ultra2mh> @sdogruyol thanks for your awesome work - kemal framwork
<FromGitter> <sdogruyol> @ultra2mh thank you, glad you like it
<FromGitter> <sdogruyol> BTW this is a great issue with a lot of information about implementing a performant Hash https://github.com/crystal-lang/crystal/issues/4557
<crystal-gh> [crystal] MakeNowJust opened pull request #4566: MatchData: support negative index (master...feature/regex-match-data/support-negative-index) https://git.io/vHdfq
Kug3lis has joined #crystal-lang
Kug3lis has quit [Client Quit]
rohitpaulk has joined #crystal-lang
xiljin has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 268 seconds]
rohitpaulk has joined #crystal-lang
Kug3lis has joined #crystal-lang
Kug3lis has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
flaviodesousa has quit [Ping timeout: 246 seconds]
rohitpaulk has quit [Ping timeout: 240 seconds]
Kug3lis has joined #crystal-lang
rohitpaulk has joined #crystal-lang
Kug3lis has quit [Client Quit]
<crystal-gh> [crystal] MakeNowJust opened pull request #4567: MatchData: fixed #4565: rename size to group_size and fix size behavior (master...feature/regex-match-date/size-group-size) https://git.io/vHdcf
rohitpaulk has quit [Ping timeout: 255 seconds]
olek_poz has quit [Ping timeout: 260 seconds]
<FromGitter> <bigtunacan> @elorest Is that official then that @drujensen is dropping kemalyst to join Amber?
<FromGitter> <bigtunacan> I know there was a bit of discussion about that, but I wasn't sure what the result was.
<FromGitter> <bigtunacan> I do see though that Kemalyst has a commit just 11 hours ago
<RX14> i don't think anything should be "dropped"
<RX14> but maybe bugfixes and updates only
<RX14> future efforts but i assume there are people using kemalyst
<RX14> and it's hardly a v2 where you can just migrate
<FromGitter> <bigtunacan> I'm not weighing in on the merits of it either way. Just wanting to know what's going on.
<FromGitter> <bigtunacan> Right now I'm developing my projects on Kemal since it is simple while I get a better understanding of Crystal.
<FromGitter> <bigtunacan> But I thought I would give either Kemalyst or Amber a try for a future site.
<FromGitter> <bigtunacan> So knowing the project status is helpful for deciding what I should use for a new project.
cyberarm has quit [Ping timeout: 240 seconds]
<FromGitter> <fridgerator> @drujensen Has
<FromGitter> <fridgerator> I would wait for him to respond
<FromGitter> <ultra2mh> Hi / in kemalyst framwork ... i built a model and controller and view manully ... now how can i set its route for example url localhost/db render the controler's view .ecr file ?
Kug3lis_off is now known as Kug3lis_
cyberarm has joined #crystal-lang
<FromGitter> <drujensen> @bigtunacan I will keep kemalyst running and in maintenance mode but will focus all new development on Amber
<RX14> yeah that seems like the best approach
<FromGitter> <drujensen> the change recently made was a bug fix for the method override header that we found when we were moving that functionality over
mark_66 has quit [Remote host closed the connection]
<FromGitter> <ultra2mh> guys i need help
<FromGitter> <drujensen> @ultra2mh in kemalyst, you should be able to add a route to the /config/routes.cr
<FromGitter> <drujensen> that points to your controller
<FromGitter> <drujensen> you can add a route for a specific method and path: `get "/", home, index`
<FromGitter> <drujensen> This will add a route to the HomeController::Index
<FromGitter> <drujensen> or you can add a full resource: `resources Post`
<FromGitter> <drujensen> this will add the 7 common RESTful routes
<FromGitter> <drujensen> you can find documentation in the readme. https://github.com/kemalyst/kemalyst#router
<FromGitter> <drujensen> hope this helps
<FromGitter> <ultra2mh> according you i just added ⏎ get "/db", DbController::Index ⏎ ⏎ to my toutes.cr ⏎ but i get errorr 500 [https://gitter.im/crystal-lang/crystal?at=59415ae0c59bd9c46416b1cf]
<FromGitter> <ultra2mh> @drujensen
<FromGitter> <bigtunacan> @drujensen thanks for the clarification
<FromGitter> <akzhan> @ultra2mh anyway I doesn’t recommend to start new projects using Kemalist. Switch to http://www.ambercr.io
<FromGitter> <ultra2mh> why ? is it mvc ?
<FromGitter> <bigtunacan> @ultra2mh See the comment from @drujensen above.
<FromGitter> <bigtunacan> @drujensen Is the developer for Kemalyst; he is joining Amber so the community can be more focused on that project.
<FromGitter> <ultra2mh> oh ok
<FromGitter> <bigtunacan> So probably it is a better idea to use Amber for new projects if you want a full stack framework
<FromGitter> <ultra2mh> very good i will swich to amber too
olek_poz has joined #crystal-lang
splitty_ has joined #crystal-lang
Kug3lis_ is now known as Kug3lis_off
Kug3lis has joined #crystal-lang
<FromGitter> <ultra2mh> guys i started new project with amber when i run project with amber w command it give me ⏎ ⏎ amber w ⏎ 🤖 Your SentryBot is vigilant. beep-boop... ⏎ 🤖 watching file: ./src/big.cr ... [https://gitter.im/crystal-lang/crystal?at=59416cdf142826e972b59544]
<FromGitter> <ultra2mh> im posting two side :D
<FromGitter> <drujensen> create a config directory
<FromGitter> <drujensen> and try again
<FromGitter> <drujensen> nm, thinking...
<FromGitter> <ultra2mh> that folder exist
<FromGitter> <ultra2mh> i dont know why give me error
<FromGitter> <drujensen> checking...
<FromGitter> <ultra2mh> i built my project by command => amber n big -d mysql -t ecr
<FromGitter> <drujensen> any changes in any of the config files?
<FromGitter> <ultra2mh> i didnt touch any thing
<FromGitter> <drujensen> did you run shards update?
<FromGitter> <ultra2mh> i did shards install ??
<FromGitter> <drujensen> bug with ECR
<FromGitter> <ultra2mh> :(
<FromGitter> <drujensen> thanks for catching that
<FromGitter> <drujensen> can you use slang?
<FromGitter> <eliasjpr> try using Slang
<FromGitter> <drujensen> amber n big -d mysql --deps
<FromGitter> <eliasjpr> also make sure you are running the commands from the project root
<FromGitter> <ultra2mh> your welcome ok but im not so familiar with slang :D // yes im using command from project root / rubymine terminal section
<FromGitter> <ultra2mh> please fix this bug thankyou
<FromGitter> <straight-shoota> how can it be that a type-restricted argument is not of that type? ⏎ ⏎ ```def foo(arg : Type) ⏎ arg.is_a?(Type) # => false ⏎ end``` [https://gitter.im/crystal-lang/crystal?at=594170e3c59bd9c4641723a4]
<Papierkorb> should never be the case, do you have a short code doing that?
<FromGitter> <straight-shoota> unfortunately not
<FromGitter> <straight-shoota> there is still the strange thing that my `Type` alias does not work in isolation: https://carc.in/#/r/26my ⏎ but in the whole project, this definitions compile and work fine (mostly)
<Papierkorb> We had that already, Type = Tuple(Type, ...) is illegal
<Papierkorb> sadly not caught by the compiler yet
<FromGitter> <straight-shoota> yes, I'm working on replacing it with a custom tuple object
<FromGitter> <straight-shoota> but this is not the reason
<FromGitter> <straight-shoota> and the recursion is still considered illegal without `Tuple(Type, Type)`: https://carc.in/#/r/26n4 :D
rohitpaulk has joined #crystal-lang
<crystal-gh> [crystal] asterite pushed 1 new commit to master: https://git.io/vHFtT
<crystal-gh> crystal/master be85fa4 TSUYUSATO Kitsune: MatchData: fixed #4565: rename size to group_size and fix size behavior
<crystal-gh> [crystal] asterite pushed 1 new commit to master: https://git.io/vHFtH
<crystal-gh> crystal/master 74b1bb4 TSUYUSATO Kitsune: Parser: correct to parse / following do as regex...
rohitpaulk has quit [Ping timeout: 240 seconds]
Kug3lis has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<Papierkorb> Are you sure you're not passing a tuple in any more? a tuple is Iterable
<FromGitter> <straight-shoota> this could be... but still would not really explain it
A124 has quit [Quit: '']
Kug3lis has joined #crystal-lang
A124 has joined #crystal-lang
<FromGitter> <straight-shoota> I finally reduced it to a small sample: https://carc.in/#/r/26nx
<FromGitter> <bew> typeof should return `Type` I think..
<travis-ci> crystal-lang/crystal#be85fa4 (master - MatchData: fixed #4565: rename size to group_size and fix size behavior): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/242942987
<DeBot> https://github.com/crystal-lang/crystal/issues/4565 (Confusing Regex::MatchData#size naming)
<FromGitter> <straight-shoota> yes, but it should not call this method in the first place but the other without the type restriction on target
<FromGitter> <bew> why not?
<FromGitter> <straight-shoota> because `target : Type`
<FromGitter> <bew> the compiler detects that `Array(Int32)` is a `Type` and choose the def with restriction on type
ghs39ghsggf has joined #crystal-lang
ghs39ghsggf has left #crystal-lang [#crystal-lang]
<FromGitter> <straight-shoota> but `Array(Int32)` is not `Array(Type)`, is it?
<FromGitter> <bew> well it is, as Type can be either `Int32` or `Array(Type)`, recursively `Type` could also be `Array(Array(Type))` or `Array(Int32)`
<FromGitter> <straight-shoota> `[1, 2, 3].is_a?(Type) # => false`
<FromGitter> <straight-shoota> As I understand it, generic structures with union types are not compatible to those with single types of the union
<FromGitter> <bew> then maybe is_a? and typeof are buggy, but you can see that using argument type restriction on method will use the "correct" one...
<FromGitter> <straight-shoota> no, they are correct. https://github.com/crystal-lang/crystal/issues/4483
<FromGitter> <bew> hmm I'm not sure what you mean by "they are correct"
<FromGitter> <bew> I don't see how this issue applies here (maybe I'm tired too, I'm not sure..)
<FromGitter> <bew> from my understanding, according to the type restriction, the agument should have the same type as the restriction, not his original type (in the scope of the method at least)
<FromGitter> <straight-shoota> yes, this is true
<FromGitter> <bew> (speak about compile-time of course)
<FromGitter> <bew> speaking*
<FromGitter> <straight-shoota> for `call_filter(1)` `typof` is `Type` https://carc.in/#/r/26oe
<FromGitter> <straight-shoota> this comment from RX14 explains the problem with `Array(Type)`: https://github.com/crystal-lang/crystal/issues/4483#issuecomment-304742421
<FromGitter> <bew> and here https://carc.in/#/r/26of
<FromGitter> <bew> I don't agree @straight-shoota his comment is about runtime conversion, here we're talking only about compile time type no? (typeof is resolved at compile time)
<RX14> no it's the same
<RX14> if the runtime can't convert it why would you expect the compiler to compile it?
<FromGitter> <bew> yes but here, there is no conversion involved... or are there any?
<RX14> of course there is
<RX14> you're trying to pass an Array(Int32) to a type restriction that only accepts Array(Type)
<RX14> (or Int32 but that doesn't matter here)
<FromGitter> <bew> oh true I missed that one...
<FromGitter> <bew> (I removed my comment on the issue @straight-shoota)
<FromGitter> <bew> @RX14 then is it normal the compiler compiles @straight-shoota's example?
<travis-ci> crystal-lang/crystal#74b1bb4 (master - Parser: correct to parse / following do as regex): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/242944362
<RX14> @bew yes because it performs a conversion assuming you mean https://carc.in/#/r/26nx
<RX14> oh hmm
<RX14> yes because it's a method
<RX14> but as soon as you assign that to an instance variable you'll get an error
<RX14> it's confusing because type restrictions on instance vars behave differently
<RX14> methods can be created on the fly to adapt to slightly different types
<RX14> instance vars don't have such flexibility
<RX14> of course "on the fly" is still at compile time
<crystal-gh> [crystal] akzhan opened pull request #4569: Introduce ENV["CRYSTAL_FAKE_SOURCE_FILENAME"] to compile source from STDIN (master...introduce-CRYSTAL_FAKE_SOURCE_FILENAME-env-var) https://git.io/vHFal
<FromGitter> <bew> Hmm I get what you mean about the differences between ivars and defs, but now I don't understand why it compiles in this case when `target.is_a?(T)` is always false (on each types represented by `Type`)
<FromGitter> <straight-shoota> asterite explains it in https://github.com/crystal-lang/crystal/issues/3803
<FromGitter> <straight-shoota> I didn't think of covariance as a reason...
<FromGitter> <straight-shoota> while this is kind of nice and saves unnecessary conversions it is also very contra intuitive that type differentiation through overloading and is_a?/case are not working the same way
<FromGitter> <bew> I've read it in diagonal the first time, thanks it makes sense now
<crystal-gh> [crystal] akzhan closed pull request #4569: [WIP] Introduce crystal --fake_source=sourcepath flag (master...introduce-CRYSTAL_FAKE_SOURCE_FILENAME-env-var) https://git.io/vHFal
<crystal-gh> [crystal] akzhan opened pull request #4571: Introduce crystal --fake_source sourcepath flag (master...introduce-crystal-compiler-flag---fake-source-source-path) https://git.io/vHF5M
Kug3lis_off is now known as Kug3lis_
Kug3lis_ has quit [Quit: Textual IRC Client: www.textualapp.com]
hightower3 has joined #crystal-lang
hightower2 has quit [Ping timeout: 240 seconds]
akwiatkowski has joined #crystal-lang
olek_poz has quit [Read error: No route to host]
olek_poz has joined #crystal-lang
akwiatkowski has quit [Ping timeout: 240 seconds]
phase has joined #crystal-lang
phase is now known as Guest28374
olek_poz has quit [Ping timeout: 260 seconds]