<FromGitter>
<tenebrousedge> @wontruefree please actually post a reminder here before that starts, I'd hate to miss it
<FromGitter>
<wontruefree> @tenebrousedge I will do that
<FromGitter>
<wontruefree> never know how much I can big this chat
<FromGitter>
<whidbey> and when we have hundres of .cr file? its a nightmare when we type and rolling files bettwen files to seeking a method and paramters ,its pain..
<FromGitter>
<whidbey> scry wont works when using vscode .
<FromGitter>
<tenebrousedge> @wontruefree I think you get extra allowances when it's Ary doing the presentation
<FromGitter>
<whidbey> @wontruefree do you have solution yet?
<FromGitter>
<whidbey> i dont' care new features of language itself...but IDE feature is bad need i thought...for most people.
<FromGitter>
<wontruefree> I do not have a solution
<FromGitter>
<wontruefree> good to know :)
<FromGitter>
<whidbey> :)
f1refly has joined #crystal-lang
f1reflyylmao has quit [Ping timeout: 245 seconds]
DTZUZO has quit [Ping timeout: 265 seconds]
<FromGitter>
<firejox> @christopherzimmerman this `(->self.itself).closure_data.as(Pointer(typeof(self)))` will work after initiate it ⏎ https://play.crystal-lang.org/#/r/84n4
ht_ has joined #crystal-lang
<FromGitter>
<leighmcculloch> Hi, how do folks access multi-dimension arrays in Crystal? I was just trying to make a two dimensional boolean array for a script and discovered that while I could create it with `Array.new(2000, Array.new(2000, Bool))`, when I tried to access it with `arr[i][j] = true` I get the following error: ⏎ `Error: no overload matches 'Array(Bool.class)#[]=' with types Int32, Bool`
raz has quit [Ping timeout: 268 seconds]
raz has joined #crystal-lang
ht_ has quit [Remote host closed the connection]
<Yxhuvud>
You are creating an array that contains 2000 copies of one other array, that in turn has 2000 copies of the Bool class. Try `Array.new(20) { Array.new(20) {false}}`
<Yxhuvud>
and by "copies", I mean "references to"
<FromGitter>
<igor-alexandrov> Hello. I am finishing plugin interface for Shrine and all seems to work well, except one thing. I am trying to pass a Proc as an argument to plugin configuration and if I pass it directly – everything works fine, but if I save it to variable and then pass this variable, it brakes. You can check it here: https://gist.github.com/igor-alexandrov/b80c1af4f786a4215a0ce331f765d796. Try to compile this code.
<FromGitter>
... To make it work, comment line 134 and uncomment line 135. Do you have any thoughts? Thank you!
<FromGitter>
<j8r> It really should have a repo like `awesome-crystal-for-rubyists` :)
<FromGitter>
<igor-alexandrov> Great job!
DTZUZO has quit [Ping timeout: 268 seconds]
<FromGitter>
<j8r> where there are the idioms, gems mapping, tools, tips and tricks
DTZUZO has joined #crystal-lang
DTZUZO has quit [Ping timeout: 250 seconds]
<FromGitter>
<ndbroadbent> ooh yeah, I just saw @Blacksmoke16's comment on this PR: https://github.com/veelenga/awesome-crystal/pull/457#issuecomment-552223501 ⏎ that's a really great idea to ensure that libraries have regular CI builds and are maintained to work with the latest version of crystal (especially before the 1.0 release)
<FromGitter>
<ndbroadbent> would it make more sense to add a README.rubyists.md to awesome-crystal?
<FromGitter>
<ndbroadbent> I don't know if I want to start a brand new project because I think there's already a bit too much fragmentation, but this PR / CI workflow seems a lot better than maintaining a wiki page
blassin has quit [Read error: Connection reset by peer]
blassin has joined #crystal-lang
DTZUZO has quit [Ping timeout: 250 seconds]
blassin has quit [Read error: Connection reset by peer]
blassin has joined #crystal-lang
blassin has quit [Read error: Connection reset by peer]
blassin has joined #crystal-lang
blassin has quit [Read error: Connection reset by peer]
blassin has joined #crystal-lang
blassin has quit [Read error: Connection reset by peer]
blassin has joined #crystal-lang
blassin has quit [Read error: Connection reset by peer]
blassin has joined #crystal-lang
blassin has quit [Read error: Connection reset by peer]
blassin has joined #crystal-lang
<FromGitter>
<j8r> Not really @ndbroadbent , awesome crystal is a curated list of crystal libraries
blassin has quit [Read error: Connection reset by peer]
<FromGitter>
<j8r> what do you mean by fragmentation?
blassin has joined #crystal-lang
DTZUZO has joined #crystal-lang
<FromGitter>
<ndbroadbent> lots of people working on things independently instead of under a shared organization
<FromGitter>
<ndbroadbent> which can cause problems if they lose interest and stop maintaining a library / resource
blassin has quit [Read error: Connection reset by peer]
blassin has joined #crystal-lang
blassin has quit [Client Quit]
<FromGitter>
<ndbroadbent> but I think that's normal for an open source community, and I've noticed the same issues with unmaintained ruby gems
DTZUZO has quit [Ping timeout: 240 seconds]
blassin has joined #crystal-lang
blassin has quit [Read error: Connection reset by peer]
blassin has joined #crystal-lang
blassin has quit [Read error: Connection reset by peer]
blassin has joined #crystal-lang
<FromGitter>
<christopherzimmerman> @leighmcculloch shameless plug for bottle. It provides a convenient interface for ndarrays. What you’re asking for is as simple as: Tensor.new([2000,2000]) { |_| false }
<FromGitter>
<christopherzimmerman> Tensor works for numeric and Boolean data, but you can extend the base array to support anything.
blassin has quit [Client Quit]
blassin has joined #crystal-lang
blassin has quit [Client Quit]
blassin has joined #crystal-lang
blassin has quit [Read error: Connection reset by peer]
blassin has joined #crystal-lang
blassin has quit [Client Quit]
<FromGitter>
<j8r> @ndbroadbent it's better to have this rather than having a big project, and parts inside that are not maintained anymore but still bundled
<FromGitter>
<j8r> Too bad that they are lots of tools unrelated to the very core language in the compiler
<FromGitter>
<j8r> Like the playground, init tool
coderobe8 is now known as coderobe
<FromGitter>
<ndbroadbent> I guess so, but I think it's even better to have regular CI builds that test everything and prevent anything from being unmaintained
<FromGitter>
<j8r> even the doc generator
<FromGitter>
<j8r> You can still have this in separate repos
<FromGitter>
<j8r> the problem: it is harder to delegate maintainer when you are in a big monorepo
<FromGitter>
<j8r> because rights are done per repo, not per path :/
<FromGitter>
<ndbroadbent> right
<FromGitter>
<j8r> But you're right on a point, packaging is more complicated
<FromGitter>
<ndbroadbent> I really like the crystal-lang-tools organization on GitHub
<FromGitter>
<kinxer> Do we have a private Crystal leaderboard for AoC 2019?
<FromGitter>
<tenebrousedge> oh, I suppose that has started, hasn't it?
DTZUZO has quit [Ping timeout: 250 seconds]
<FromGitter>
<yxhuvud> @kinxer not that I know of, but you can find my solutions on my github :)
<hightower4>
Blacksmoke16 wanted to ask you, why you chose not to use builting http handlers? Didn't like their pipeline-like structure or?
<hightower4>
builtin*
<FromGitter>
<Blacksmoke16> the main thought is that the event architecture would be more flexible
<FromGitter>
<Blacksmoke16> shards could define their own listeners that just get registered when its installed, so you dont have to add `MyHandler.new` to the handlers array when running the server
ht_ has joined #crystal-lang
<FromGitter>
<Blacksmoke16> priority allows the order the listeners get executed in to be controlled, i.e. a security listener should run before anything else etc
<hightower4>
cool
<FromGitter>
<Blacksmoke16> also allows each listener to have access to more information from the event obj, versus having to monkey patch things into the request context obj
<FromGitter>
<Blacksmoke16> just a better design imo
DTZUZO has joined #crystal-lang
<FromGitter>
<Blacksmoke16> @j8r is that static linking with libxml still an issue?
<FromGitter>
<Blacksmoke16> i imagine its quite simple?
<FromGitter>
<j8r> on macOS they use Instruments, which is based on DTrace
<FromGitter>
<watzon> Ok I don't get it ⏎ ⏎ ```code paste, see link``` ⏎ ⏎ How can I make it so that an Array of `UpdateHandler(Types::Base)` accepts UpdateHandlers with types that inherit from `Types::Base`? [https://gitter.im/crystal-lang/crystal?at=5de6c2ac1659720ca8f2a459]
<FromGitter>
<kinxer> I don't remember who was asking about iterating over multiple ranges with early exit (I think they were working on AoC 2019 day 2), but would this be useful to anyone, either in a shard or in a stdlib PR: https://carc.in/#/r/84rj ?
<FromGitter>
<tenebrousedge> interesting
<FromGitter>
<tenebrousedge> there already is a `product` for `Iterable` though
<FromGitter>
<Blacksmoke16> er you get the idea, seems i got that wrong
<FromGitter>
<watzon> This is how I'm initializing it `@event_handlers = {} of Types::Base.class => Array(UpdateHandler(Types::Base))`
<FromGitter>
<Blacksmoke16> yea if possible get an example going, that'll be easier
<FromGitter>
<watzon> Yeah hopefully carc.in will decide to start working for me
<FromGitter>
<watzon> Finally got it working
<FromGitter>
<Blacksmoke16> \o/
<FromGitter>
<kinxer> Anyone have any pointers for making this benchmark more realistic/useful? https://carc.in/#/r/84rz ⏎ No, I'm not trying to run it on carc.in. Yes, I'm running it with `--release`.
<FromGitter>
<watzon> Best minimal example I can come up with @Blacksmoke16 @kinxer
commavir has quit [Remote host closed the connection]
teardown has quit [Ping timeout: 268 seconds]
ht_ has quit [Remote host closed the connection]
teardown has joined #crystal-lang
commavir has joined #crystal-lang
HumanG33k has joined #crystal-lang
HumanG33k has quit [Remote host closed the connection]
HumanG33k has joined #crystal-lang
<FromGitter>
<watzon> Dealing with Procs and generic types is annoying af
<FromGitter>
<tenebrousedge> yes
<FromGitter>
<tenebrousedge> @kinxer why did you choose to write that `Iterator#product` code?
<FromGitter>
<kinxer> @tenebrousedge Someone asked on Gitter recently (in the last two weeks) essentially about a compact way to do a find on two `Enumerable`s. I don't remember who it was, though, and I couldn't find it when I looked earlier today. They first asked about `break`ing from nested loops, like ⏎ ⏎ ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5de6e9df08d0c961b7e6b470]
yukai has joined #crystal-lang
<FromGitter>
<tenebrousedge> I was involved in that conversation, yes
<FromGitter>
<kinxer> Ah, right. So I was trying to find a good, compact way to do that (the above, with the added requirement of returning the `i` and `j`), and I couldn't find one I was satisfied with without writing a custom iterator.
<FromGitter>
<tenebrousedge> well, neither could I, and I did start to write an iterator myself, but it was obnoxiously verbose
<FromGitter>
<tenebrousedge> and having just solved that particular problem, it seems like the effort was disproportionate to the task at hand
<FromGitter>
<tenebrousedge> I just did `(0..99).to_a.product((0..99).to_a).find`
<FromGitter>
<kinxer> Yeah, I agree. I used nested loops, which isn't as pretty but is still pretty simple.