RX14 changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.27.0 | Fund Crystal's development: http://is.gd/X7PRtI | GH: https://github.com/crystal-lang/crystal | Docs: http://crystal-lang.org/docs/ | API: http://crystal-lang.org/api/ | Gitter: https://gitter.im/crystal-lang/crystal
relyks has quit [Read error: Connection reset by peer]
ua has quit [Ping timeout: 252 seconds]
ua has joined #crystal-lang
druonysus has joined #crystal-lang
<FromGitter> <Blacksmoke16> @ljuti I filed an issue for that bug we found https://github.com/crystal-lang/crystal/issues/7083
akaiiro has joined #crystal-lang
_whitelogger has joined #crystal-lang
flaviodesousa has joined #crystal-lang
t0nyandre has quit [Quit: WeeChat 2.3]
lvmbdv has quit [Ping timeout: 264 seconds]
lvmbdv has joined #crystal-lang
<FromGitter> <drum445> @vladfaust @sdogruyol , where I work we use flask, which is similar to flask regarding it's lightweight and we have scaled fairly big without issue
<FromGitter> <drum445> Kemal seems like it would be able to scale just as well from what I can see anyway
<FromGitter> <vlazar> @drum445 There is this site where you can compare many frameworks. Here is flask vs Kemal for example https://www.techempower.com/benchmarks/#section=data-r17&hw=ph&test=json&l=zdk6pr-3&f=8-jz6rk-4ftog0-0-efew00-1ekg-ljdoi-hrlfcw-s40
<FromGitter> <pitosalas> What does "all previous -o files were reused" mean? I have a situation where I modified the source file but crystal xxx.cr seems to not be seeing the changes.
<FromGitter> <pitosalas> Ok. Its my bug. The code I was testing was doing an exit which stopped execution of the spec file. But it wasn't clear because the test runner still said "finished in x seconds, 0 examples, etc." I think it ought to say "SOT exited" or something.
lvmbdv has quit [Ping timeout: 260 seconds]
<FromGitter> <j8r> @mamantoha pls, stop killing kities with https://github.com/mamantoha/http_proxy/blob/master/src/http/proxy/client.cr#L72 - `Hash(Symbol, ...)`
<FromGitter> <bew> poor kitten... :/
devil_tux has joined #crystal-lang
<devil_tux> hey, can I override Time::class to have additional function?
<FromGitter> <bew> @j8r makes the argument after it be named arguments
<FromGitter> <Blacksmoke16> ```struct Time ⏎ def my_custom_method ⏎ end ⏎ end``` [https://gitter.im/crystal-lang/crystal?at=5bec43784e7ca14520a51556]
<FromGitter> <Blacksmoke16> ^^
<FromGitter> <j8r> @bew thanks, didn't now this syntax
<FromGitter> <bew> @j8r about that `Hash(Symbol, ...)` it should be a class instead (see how it's used!!)
rohitpaulk has quit [Ping timeout: 240 seconds]
<FromGitter> <drum445> @vlazar That site seems odd, Kemal is fullstack but flask is micro?
<devil_tux> here is the gist
<FromGitter> <Blacksmoke16> its `.to_unix` now, was a breaking change in `0.27.0`
<FromGitter> <pitosalas> Another question: is there a way to have an && condition in a case? (I think not, but just checking)
<FromGitter> <j8r> @bew yes, absolutely
<FromGitter> <j8r> @pitosalas no
<FromGitter> <bew> @devil_tux btw, you did `class Time` instead of `struct Time` (Time is a struct)
<FromGitter> <Blacksmoke16> https://play.crystal-lang.org/#/r/5iqb
<FromGitter> <Blacksmoke16> then ofc for an instance var you would just do `def my_method`
<FromGitter> <pitosalas> And is there a way for a case "when" clause to decide that it wants to "break" and go to the "else" clause? (I think not, but just checking)
<devil_tux> Blacksmoke16: bew: thank you, will try
<FromGitter> <mamantoha> @j8r one day I will rewrite this :)
<FromGitter> <j8r> @pitosalas no
<FromGitter> <bew> @pitosalas you can dimply use simple if/elseif/else if you need special behavior
<FromGitter> <j8r> you can also have a method called in the `else` and in the `when`
<FromGitter> <j8r> they will share the same code
<devil_tux> works :) <3
<FromGitter> <pitosalas> @j8r, @bew: thanks
<FromGitter> <bew> *gets back to work*
<FromGitter> <mamantoha> what is wrong with `def foo(*, x, y = 2)`?
<FromGitter> <j8r> nothing, I didn't know this syntax
lvmbdv has joined #crystal-lang
<FromGitter> <j8r> the only thing you can add is type annotations
<FromGitter> <mamantoha> what do you mean?
<FromGitter> <Blacksmoke16> `def foo(*, x : String, y : Int32 = 2)`
<FromGitter> <mamantoha> Well, yes
devil_tux has quit [Ping timeout: 245 seconds]
<FromGitter> <kinxer> @Blacksmoke16 I just took a look at the spec; I'm sure that generations to come will appreciate your regex efforts.
<FromGitter> <Blacksmoke16> i cant take the credit, just adapted Symfony's regex to work with crystal
<FromGitter> <Blacksmoke16> but thanks, id say it turned out well
<FromGitter> <vlazar> @drum445 ⏎ ⏎ > @vlazar That site seems odd, Kemal is fullstack but flask is micro? ⏎ ⏎ More on their terminology here https://www.techempower.com/benchmarks/#section=motivation&hw=ph&test=fortune ... [https://gitter.im/crystal-lang/crystal?at=5bec6897213872340508109e]
rohitpaulk has joined #crystal-lang
<FromGitter> <StephenStrickland> Is there anyway that I can manually manipulate the AST from a macro? I want to modify the body of the calling method and add some additional statements.
rohitpaulk has quit [Ping timeout: 246 seconds]
akaiiro has joined #crystal-lang
t0nyandre has joined #crystal-lang
z64 has joined #crystal-lang
<FromGitter> <bew> @StephenStrickland not really, or at least not as easily as you (and I) would like.. You have to recreate the method, paste its name, parameters (that's the tricky part), and the body, and you can add the lines you want in there
<FromGitter> <ArchaicLord> Hi, just came across this project . Not sure how. I littlerly just got roped into Rust without knowing about it . Am currently on Chapter 2 of the book and just read thats it is one of the hardest languages to learn. I came across which says its easier but it looks very new. I am in the mids of an IT support role. I am learning and use Linux. I am trying to get into vim and want to position myself to get a
<FromGitter> ... role in dev/ops development. how would this sit in those goals? and how the hell would i be able to convicen my boss/developers to give it a go? They are so JavaScript orientated its sickining
<FromGitter> <ArchaicLord> sorry i know I asked a lost of questions
t0nyandre has quit [Quit: WeeChat 2.3]
<FromGitter> <Blacksmoke16> welcome
<FromGitter> <diegogub_gitlab> Hello! Anyone with experience running Crystal into Docker? I'm planning to deploy using nomad crystal app on docker. But I'm having issues with DNS resolver
<FromGitter> <StephenStrickland> @bew coolio, that's what I was fearing.
<FromGitter> <Blacksmoke16> @diegogub_gitlab how are you running it? just adding in your binary?
<FromGitter> <diegogub_gitlab> I'm doing 2 step building, with the second one using scratch docker images, coping all libs (I followed this guide: https://manas.tech/blog/2017/04/03/shipping-crystal-apps-in-a-small-docker-image.html)
<FromGitter> <diegogub_gitlab> @Blacksmoke16 may be the scratch base image is too restrictive, but also using alpine had issues
<FromGitter> <Blacksmoke16> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5bec92582138723405093678]
<FromGitter> <Blacksmoke16> is what i use for my image, seems to work fine
<FromGitter> <Blacksmoke16> where the command on my compose file is like `command : /bin/App`
<FromGitter> <diegogub_gitlab> I will try it, I have libleveldb depency, but I will try to compile it with --static
<FromGitter> <Blacksmoke16> rgr, my app is just a simple kemal thing so might be bit more complicated if you have extra requirements
<FromGitter> <Blacksmoke16> but that seems to work fine for me, been running stable for few months
<FromGitter> <diegogub_gitlab> ups..the crystal docker is not running 0.27 :(
<FromGitter> <diegogub_gitlab> the latest..
<FromGitter> <Blacksmoke16> it should be
<FromGitter> <diegogub_gitlab> I will repull it
<FromGitter> <Blacksmoke16> `crystallang/crystal:0.27.0`
non-aristotelian has quit [Quit: non-aristotelian]
non-aristotelian has joined #crystal-lang
druonysus has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
druonysus has joined #crystal-lang
<FromGitter> <Blacksmoke16> is there a standard around enum names? `ExcludeAll` vs `EXCLUDE_ALL`vs `EXCLUDEALL`
<FromGitter> <Blacksmoke16> currently going with middle one as it matches constant style which it kinda is
<FromGitter> <diegogub_gitlab> @Blacksmoke16 the issue is the leveldb depency..trying to link it fails
<FromGitter> <Blacksmoke16> hmm
<FromGitter> <Blacksmoke16> can you just install that in the 2nd container?
<FromGitter> <Blacksmoke16> wont be as small as scratch but still quite small