<robacarp>
yeah, it's a kind of shorthand for .try. Now that you bring that up, I think I remember reading some discussion on issues that "they" wanted to not implement a safe navigation op because it provides too much potential for abuse
<robacarp>
I'm guessing here that "they" is manas
<FromGitter>
<watzon> I see the potential for abuse, but I feel like the trade-off is worth it.
<FromGitter>
<watzon> A safe navigation operator would be very nice
rohitpaulk has joined #crystal-lang
<FromGitter>
<watzon> A dig method could also be very useful
<FromGitter>
<aisrael> I thought Crystal already have the safe navigation operator. Maybe I was just confused with `try`
<FromGitter>
<aisrael> I think it’d might get confusing to use the same `&.` for safe navigation, given that it’s already used to… uhm… ‘capture’ a function (borrowing a term from Elixir), e.g. `array.map(&.size)` vs `array&.size`
<FromGitter>
<aisrael> (Bah, Gitter OS X app will happily expand gists *way* past the window size, to the point where you can't see what you're typing anymore...)
<FromGitter>
<aisrael> Anyway, maybe we all could just have, like, `active_support/core_ext` and place stuff there until it makes sense to merge them in to stdlib? :D
<FromGitter>
<watzon> That might be a good idea
<FromGitter>
<watzon> Something community controlled with a little more flexibility than the stdlib
<FromGitter>
<aisrael> Personally, I would call the `map_keys` and `map_values` just for symmetry with `.map()`, though?
<FromGitter>
<watzon> Also shorter, not a bad idea
<FromGitter>
<watzon> Done
<FromGitter>
<aisrael> Yeah. Naming, one of the *hard* problems in CS
<FromGitter>
<watzon> One of the hard things in any language really
<FromGitter>
<watzon> Oh wait, you said CS not CR
<FromGitter>
<watzon> Lol
<FromGitter>
<watzon> Yeah naming is hard
DTZUZO has quit [Ping timeout: 256 seconds]
greengriminal has joined #crystal-lang
greengriminal has quit [Read error: Connection reset by peer]
rohitpaulk has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 240 seconds]
<robacarp>
@watzon you're not likely to get far with the activesupport idea around here, there's lots of hate for it in the crystal community
<robacarp>
just start submitting pulls to stdlib with the functions you've written
<FromGitter>
<aisrael> Well, it’s either we PR to stdlib with no guarantee of getting merged, or we place them individually in each of our projects under e.g. `core_ext`, or we factor it out as a shard and invite others to use and contribute, right?
rohitpaulk has joined #crystal-lang
<crystal-gh>
[crystal] CaDs opened pull request #5762: added documentation for IO#printf method (master...fix/added_documentation_for_printf_method) https://git.io/vA9vk
rohitpaulk has quit [Ping timeout: 256 seconds]
rohitpaulk has joined #crystal-lang
DTZUZO has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 245 seconds]
codenoid has joined #crystal-lang
<codenoid>
hi, i awnt aks something, what this syntax mean, `@@after_fork_child_callbacks ||= [->Scheduler.after_fork,->Crystal::Signal.after_fork,->Crystal::SignalChildHandler.after_fork,->Random::DEFAULT.new_seed,] of -> Nil` , there is `->`, copied from src/kernel.cr:190
<FromGitter>
<bew> what syntax? the `or -> Nil`? the `||=` ? the `->a_method` ?
<FromGitter>
<bew> of*
<codenoid>
the `->` in every array value
<FromGitter>
<bew> it is one of the literal proc syntax, it creates a proc that will call the method, so for example, `->a_method` will create a proc with no argument, and when called, will calle `a_method`
<FromGitter>
<faustinoaq> > RX14: Personally, local variable renaming, and small refactors such as "extract this subexpression to a variable" would be my 99% usecase for a refactoring tool. ⏎ ⏎ Maybe some basic rename? 😅
thews has quit [Ping timeout: 255 seconds]
thews has joined #crystal-lang
thews has joined #crystal-lang
thews has quit [Changing host]
andrewzah has quit [Quit: ""]
andrewzah has joined #crystal-lang
andrewzah has quit [Client Quit]
andrewzah has joined #crystal-lang
ua has joined #crystal-lang
<FromGitter>
<bew> I agree with rx14' comment
ua_ has quit [Ping timeout: 248 seconds]
<Yxhvd>
oh, nice. more progress in crystal-mode for eacs. sweet stuff, too
cyberarm has quit [Read error: Connection reset by peer]
andrewzah has quit [Quit: ""]
cyberarm has joined #crystal-lang
andrewzah has joined #crystal-lang
andrewzah has quit [Client Quit]
andrewzah has joined #crystal-lang
<FromGitter>
<bew> Scry is editor-agnostic, not specific to a specific one
alex`` has joined #crystal-lang
<crystal-gh>
[crystal] luislavena opened pull request #5763: Refactor spec runner CLI for extensibility (master...refactor-spec-runner-cli) https://git.io/vA9wU
greengriminal has quit [Quit: This computer has gone to sleep]
<crystal-gh>
[crystal] r00ster91 opened pull request #5764: Add WASD keys in 2048.cr (master...patch-4) https://git.io/vA9oJ
<FromGitter>
<bew> I'm trying right now on neovim :)
<FromGitter>
<faustinoaq> 😄 👏 ✨
stromwerk has joined #crystal-lang
<FromGitter>
<bew> @faustinoaq how to get make scry have some loggings?
<FromGitter>
<bew> ah nvm, found it
<FromGitter>
<bew> the LSP client for neovim makes a `LanguageServer.log` which was always empty.. But you made your own logfile so it's fine for now :)
<FromGitter>
<faustinoaq> Well, @kofno created it for vscode-crystal-ide first, so He put some settings for it. ⏎ ⏎ > ah nvm, found it ⏎ ⏎ I use `"crystal-lang.logLevel": "debug"` on VSCode, What settings are you using on NVIM? [https://gitter.im/crystal-lang/crystal?at=5a9b1793c3c5f8b90d2c9fa6]
<FromGitter>
<faustinoaq> Yeah, That happened to me as well, try putting your file inside a `src` folder 😅
<FromGitter>
<bew> ah lol x) I'll try that
<FromGitter>
<faustinoaq> Scry Auto-completion is very basic for now, there is some issues, but is a great init 👍
<FromGitter>
<bew> yes sure, it's the beginning of a very useful tool
<FromGitter>
<bew> I've put my file in `/tmp/src/bla.cr` still the same error
<FromGitter>
<bew> I also tried to declare a Foo class, with a class method bar in another file, require it, and write `Foo.<completion-trigger>`, it gave me `Couldn't find type Foo.class`
DTZUZO has quit [Ping timeout: 248 seconds]
<FromGitter>
<bew> @faustinoaq I can give you the logs, but I'm not sure it'll be useful
DTZUZO has joined #crystal-lang
<FromGitter>
<laginha87> Hey @bew can you post the full logs in the pr in scry so I can take a look at them later? Like @faustinoaq its still in very early stages it doesn’t provide completion for all cases but I’d like it to at least not error.
<FromGitter>
<bew> I can do that! for the IO::Memory ? or Foo ? or both?
<FromGitter>
<laginha87> Both
<FromGitter>
<laginha87> Thanks
<FromGitter>
<bew> Looking at the logs, it seems that `Foo.<trigger>` worked, but the LSP failed to get it or sth, because the scry response looks good
<FromGitter>
<bew> @laginha87 I can't reproduce the errors I mentioned above, and it seems to work ;) I'm just having issues with the LSP' implementation plugin for neovim, either because scry does not support sth, or just because the plugin fails to register a new source to my completion engine plugin.. So I can't show anything for now
qard has joined #crystal-lang
qard has quit [Client Quit]
<FromGitter>
<faustinoaq> > scry does not support sth, or just because the plugin fails to register a new source to my completion engine plugin ⏎ ⏎ LSP should be standard throughout editors and ides, I hope to see scry features being used on Visual Studio and Eclipse IDEs someday 😄 ⏎ ⏎ @bew Try disabling built-in features, like formatting, go-to definition, etc. I had to do it on sublime text to use scry features