<crystal-gh>
[crystal] MakeNowJust opened pull request #6392: Format: fix to use right alignment only if all whens are number literal (master...fix/crystal-format/right-alignment-only-if-all-whens-numbers) https://git.io/fNYop
<crystal-gh>
[crystal] MakeNowJust opened pull request #6393: Format: fix comment indentation in case's else (master...fix/crystal-format/6391) https://git.io/fNYKt
phvse has joined #crystal-lang
renzhi has quit [Quit: WeeChat 2.1]
renzhi has joined #crystal-lang
phvse has quit [Ping timeout: 240 seconds]
<FromGitter>
<snadon> Anyone using heroku with crystal and got `Error R10 (Boot timeout)`?
benharri has quit [Remote host closed the connection]
benharri has joined #crystal-lang
return0e has quit []
<FromGitter>
<snadon> NVM I found my error, was using `127.0.0.1` instead of `0.0.0.0`
benharri has left #crystal-lang ["not here right now..."]
<FromGitter>
<j8r> that's not a bug, you print a Class
<FromGitter>
<bew> I think he's talking about the abstract def that's not implemented
<FromGitter>
<bew> It's not a bug, when you include a module with abstract defs, if you don't try to call the method it doesn't complain about it being missing
<FromGitter>
<bew> Iirc that abstract defs in a class (or struct) are different (don't ask me why) they errors if the're not implemented in the child classes (can't check right now..)
<FromGitter>
<Grabli66> I does not throw error that i have to implement abstract def
<FromGitter>
<Grabli66> Ok
<FromGitter>
<j8r> you have to use inheritance with the `Myclass < Other`
rohitpaulk has joined #crystal-lang
<crystal-gh>
[crystal] RX14 closed pull request #6392: Format: fix to use right alignment only if all whens are number literal (master...fix/crystal-format/right-alignment-only-if-all-whens-numbers) https://git.io/fNYop
<FromGitter>
<straight-shoota> maybe 2 gig will suffice
<FromGitter>
<straight-shoota> if you want to keep your server instance small (because you probably don't need that much memory for running the server), you could just build locally / on a different system and deploy the compiler binary to your server
<FromGitter>
<fridgerator> `$?` is the Process::Status, I'm just curious if it will ALWAYS be the last `Process.run` status, or if there is a better way to get the status
<FromGitter>
<talbergs> wow does that one above actually work? `$?` <- looks like bash
<FromGitter>
<j8r> Running processes in Crystal isn't intuitive, for me :|
<FromGitter>
<talbergs> yes there is some blocking idk.. thats why I do not create pipe my own. But us the default one created (process run without "output: " passed) ⏎ ⏎ ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5b4ccc7d66c1e833a9ef5a9f]
<FromGitter>
<fridgerator> @j8r yes I can do `output.to_s` after it has run, that works for me as well
<FromGitter>
<fridgerator> It seems like returning the process status from `Process.run` with a block should be in stdlib
<FromGitter>
<bew> No, you must handle the case where index can't find something @Daniel-Worrall
alex`` has joined #crystal-lang
<FromGitter>
<Daniel-Worrall> Shame
<FromGitter>
<Daniel-Worrall> I think I found a different solution to my problem though
<FromGitter>
<bew> But nilable is good, you should not dismiss them
<FromGitter>
<Daniel-Worrall> It is, but I wanted to get an index of something I knew had to exist there without the extra assign and `if` check
<FromGitter>
<bew> If you're 100% sure, you can use `not_nil!`
wontruefree has joined #crystal-lang
<FromGitter>
<Daniel-Worrall> `Enumerable#find` has a `if_none` parameter, I think `#index` should too
<FromGitter>
<Daniel-Worrall> The difference being find can find any object, and index is always 0-size which is why nil makes the most sense
<FromGitter>
<Daniel-Worrall> so the if_none is for giving a nil-like object of the Enumerable returns
<FromGitter>
<bew> What do you mean by "nil-like"?
duane has joined #crystal-lang
<FromGitter>
<bew> Ah just a default... You can do the same with `idx = en.index(x) || -1`
<FromGitter>
<Daniel-Worrall> ah yeah
<FromGitter>
<Daniel-Worrall> I'm running into so many X-Y problems with this
<FromGitter>
<jwaldrip> Does crystal have support for assymetric encryption?
return0e has joined #crystal-lang
DTZUZO has joined #crystal-lang
<FromGitter>
<jwoertink> When using the `SO_REUSEPORT` and you have the app booted multiple times, is a process manager needed to direct traffic between all the apps? Or does the OS just handle that?
<FromGitter>
<jwoertink> like if I have 4 processes booted, how will it know to use all 4 of them, and not just keep sending requests to the first process?
FromGitter has quit [Remote host closed the connection]
oprypin has quit [Quit: Bye]
FromGitter has joined #crystal-lang
oprypin has joined #crystal-lang
<FromGitter>
<talbergs> Looks a lot like OS level decision.
<FromGitter>
<jwoertink> Sweet. I guess that makes it easier to use
<FromGitter>
<diegogub> @Blacksmoke16 I had JSON:Any object, what I did is : event.data.as_h.to_json()
<FromGitter>
<diegogub> I don't know if its the best solution..but it worked
<FromGitter>
<diegogub> ``` e = {{event_type}}.from_json(event.data.as_h.to_json()) ```
<FromGitter>
<Blacksmoke16> take a look at that link
<FromGitter>
<Blacksmoke16> should allow you to do like `e = {{event_type}}.from_json(event)`once you define your properties and such
<FromGitter>
<Blacksmoke16> er assuming event is the json string...
<crystal-gh>
[crystal] straight-shoota opened pull request #6397: (WIP) Optimize String#gsub with block (master...jm/feature/gsub-optimize) https://git.io/fN33z
<FromGitter>
<fridgerator> is JSON::Serializable meant as a replacement for JSON::Mapping ?
<FromGitter>
<Blacksmoke16> atm they do pretty much the same thing, just in a diff manner, but Serializable has a few more features
<FromGitter>
<Blacksmoke16> afaik
<FromGitter>
<fridgerator> Ok thats what I thought
<FromGitter>
<aisrael> Hey, so TIL about annotations, e.g. `@[JSON::Field(key: "my_key", emit_null: true)]`. I can't seem to find the documentation on them though?