<FromGitter>
<mattrberry> Is there a way to accomplish circular references in the initialize function similar to how you would in ruby? ⏎ ⏎ ```class B ⏎ getter bar : A { A.new self } ⏎ end``` ⏎ ⏎ I'm guessing the best approach would just be to define a post_init function to call immediately after initialize? [https://gitter.im/crystal-lang/crystal?at=5f8e681ec7ef520fffb0f54d]
<FromGitter>
<mattrberry> Also, unrelated: where's the best place to submit a feature request? I just learned that both clang and gcc warn "-Wshift-count-overflow" when doing the following ⏎ ⏎ ```code paste, see link``` ⏎ ⏎ In Crystal, there is no compiler warning, so the result is just "0" since all the bits are shifted out. I've accidentally done this a number of times when working on my emulators haha
<FromGitter>
<bararchy> Is there an easy way of going over a string looking for a pattern and get in yield or array of indexes for where those patterns are in the string? ⏎ ⏎ ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5f8ec4d2a7e77a0ff15b79f6]
<FromGitter>
<grkek> Added the Swagger UI support to the framework :)
<FromGitter>
<bararchy> yxhuvud: also, it seems StringScanner uses Regex, and it won't allow String input for pattern.
Liothen has quit [Ping timeout: 260 seconds]
Liothen has joined #crystal-lang
<FromGitter>
<asterite> @bararchy there's `String#scan` and you can get indices by passing a regex: `"adasdasdasd123fdsdfsdfsdf123".scan(/123/) { |match| p! match.begin, match.end } ⏎ `
<FromGitter>
<bararchy> @asterite that would be great for me, but Regex and LibPCR usage is a nogo, as the data might be binary which means libPCRE goes boom
<FromGitter>
<asterite> Oh, I see... then I would make sure to use `byte_index` instead of `index` because `index` returns the codepoint index, not the byte index
<FromGitter>
<bararchy> ohhhh
<FromGitter>
<bararchy> nice one, does `byte_index` as a search option as well?
<FromGitter>
<asterite> I don't think so. I was just saying, I saw the "solutions" above but they use `index` and they should use `byte_index` to loop over the string
<FromGitter>
<j8r> why can't we use kwarg with `Proc#call`?
<FromGitter>
<Blacksmoke16> jhass: you have any ideas on how to handle the case when my `run` script depends on the user's code itself?
<FromGitter>
<Blacksmoke16> like id be nice if it inherited the scope of the caller
<FromGitter>
<Blacksmoke16> it'd*
yukai has joined #crystal-lang
<FromGitter>
<Blacksmoke16> or maybe add some flag to the `run` compiler run so that i could not invoke the `run` script again when its required
<FromGitter>
<Blacksmoke16> even that wouldnt work tho I think tho, since the build script itself needs user code + lib code which i cant just require the users code in it :/