RX14 changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.26.1 | 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
daemonwrangler has quit [Ping timeout: 260 seconds]
daemonwrangler has joined #crystal-lang
marmotini_ has joined #crystal-lang
akaiiro has quit [Quit: Ping timeout (120 seconds)]
akaiiro has joined #crystal-lang
Tortice has quit [Read error: Connection reset by peer]
Tortice has joined #crystal-lang
Heaven31415 has quit [Quit: Leaving]
marmotini_ has quit [Remote host closed the connection]
marmotini_ has joined #crystal-lang
marmotini_ has quit [Remote host closed the connection]
return0xe has joined #crystal-lang
marmotini_ has joined #crystal-lang
return0e has quit [Ping timeout: 244 seconds]
_whitelogger has joined #crystal-lang
marmotini_ has quit [Ping timeout: 245 seconds]
Tortice has quit [Ping timeout: 276 seconds]
rohitpaulk has joined #crystal-lang
return0xe has quit [Remote host closed the connection]
return0xe has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 244 seconds]
<FromGitter> <Blacksmoke16> is there a way to unset a field that was set in a JSON::Builder
<FromGitter> <proyb6> @Blacksmoke16 in which scenario you would unset the field?
rohitpaulk has joined #crystal-lang
<FromGitter> <proyb6> I want to know the underlying technical details of Crystal http server is rely on fiber? Does it speed up requests if we run 2 instances of http program on the same machine
<FromGitter> <proyb6> ?
<FromGitter> <Timbus> if you use a frontend like nginx to balance between two crystal http programs, yes it would speed up requests if the CPU was the bottleneck
<FromGitter> <Timbus> (and you had a multi-core machine, which these days is almost a given)
akaiiro has quit [Remote host closed the connection]
<FromGitter> <proyb6> @Timbus i tried to benchmark with wrk in macOS Mojave by running 2 wrk to 2 Crystal http of different port, it still hit the same req/s as 1 Crystal program - hello world string
<FromGitter> <proyb6> same amount of requests of 40k+ req/s, not sure if macOS has limitations but I wish someone could test on Linux
<FromGitter> <Timbus> .. a 'hello world' string would take like.. nanoseconds to generate. your bottlenecks would
<FromGitter> <Timbus> would be in the core*
<FromGitter> <Timbus> also how did you make the requests to both instances? did you use a load balancer?
<FromGitter> <proyb6> No load balancer, just ran on 2 wrk on 2 separate terminals at the same time, I see Crystal could hit 100% (Single core) instead of 400% (4-cores) based on the top command, stress test to 200% on 2 Crystal
<FromGitter> <proyb6> didn’t see any improvements
<FromGitter> <proyb6> I guess by setup is not sufficient for benchmark
<FromGitter> <proyb6> By -> my
<FromGitter> <Timbus> how would wrk test them both? you ran two instances of it?
<FromGitter> <yxhuvud> @timbus: the normal way to do it is to use a shared socket that both processes listen on
<FromGitter> <rishavs> has anyone used cockroachdb? Can the current PG drivers be used for it?
<FromGitter> <proyb6> @Timbus perhaps, I could send you the code to try in PM
<FromGitter> <Timbus> I can't say that's something I've ever seen done, @yxhuvud .. But it sounds interesting.
<FromGitter> <yxhuvud> @Timbus SO_REUSEPORT is a good term to look after.
<FromGitter> <Timbus> yeah i did a quick search
rohitpaulk has quit [Ping timeout: 246 seconds]
<FromGitter> <Timbus> Works well in crystal I see. Thanks @yxhuvud! I can see it being useful for a bunch of cases.
ashirase has quit [Ping timeout: 252 seconds]
ashirase has joined #crystal-lang
rohitpaulk has joined #crystal-lang
return0xe has quit [Read error: Connection reset by peer]
return0e has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 252 seconds]
DTZUZO_ has quit [Ping timeout: 245 seconds]
return0xe has joined #crystal-lang
return0e has quit [Ping timeout: 244 seconds]
rohitpaulk has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 244 seconds]
DTZUZO_ has joined #crystal-lang
marmotini_ has joined #crystal-lang
<FromGitter> <iambudi> Everytime require “http”, code can not run. Osx Mojave. ⏎ ⏎ ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5bc48c9af0a85e40a750f8a2]
<FromGitter> <iambudi> how to install dev package of libssl ?
<FromGitter> <fusillicode_twitter> @iambudi try this buddy: ⏎ `export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/opt/openssl/lib/pkgconfig`
<FromGitter> <bew> Ask google?
<FromGitter> <iambudi> @bew nothing works
<FromGitter> <fusillicode_twitter> I think it's a known issue
<FromGitter> <fusillicode_twitter> 🤔
<FromGitter> <iambudi> @fusillicode_twitter still failed
<FromGitter> <fusillicode_twitter> ok then try this just to be sure: ⏎ ⏎ ```brew uninstall openssl ⏎ brew install openssl ⏎ brew link openssl --force``` [https://gitter.im/crystal-lang/crystal?at=5bc48d60f659e67772bcf21f]
<FromGitter> <iambudi> well i did that before, but let me try again
<FromGitter> <fusillicode_twitter> and then ⏎ `export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/opt/openssl/lib/pkgconfig`
<FromGitter> <fusillicode_twitter> if nothings work then I don't know :(
<FromGitter> <iambudi> still failed, now this makes me headache 😅
marmotini_ has quit [Ping timeout: 250 seconds]
<FromGitter> <iambudi> Found the issue, it’s because i run on fish shell
<FromGitter> <iambudi> switching to bash works nicely
<FromGitter> <fusillicode_twitter> well I'm using zsh
<FromGitter> <fusillicode_twitter> XD
<FromGitter> <iambudi> there was something wrong with fish config i guess so crystall failed to find ssl
<FromGitter> <iambudi> yes, zsh also works good. I have 3 shells on my mac. I will find out the cause. Thanks @fusillicode_twitter
<FromGitter> <fusillicode_twitter> I didn't do anything XD
<FromGitter> <bew> for fish, there's no `export`: https://fishshell.com/docs/current/tutorial.html#tut_exports
<FromGitter> <aboeglin> I have a little question regarding union types
<FromGitter> <aboeglin> say I have a type X | Y
<FromGitter> <aboeglin> and X has a method a, Y has a method b
<FromGitter> <aboeglin> if I know I get a X, I still need to use as ?
<FromGitter> <bew> How do you know?
<FromGitter> <aboeglin> because I put it there
<FromGitter> <aboeglin> the use case is the context storage of Kemal
<FromGitter> <aboeglin> I have an Auth handler that takes care of querying my user service for endpoints that require auth
<FromGitter> <aboeglin> and puts the user info in the context
<FromGitter> <aboeglin> with context.put "user", user
<FromGitter> <aboeglin> but without as, I get `undefined method 'id' for Bool (compile-time type is (Bool | Float64 | Int32 | Int64 | String | User | Nil))`
<FromGitter> <aboeglin> I just find it makes the code uglier to have these as everywhere
<Yxhuvud> aboeglin: `case value; when X; value.a; when Y; value.b; end` ?
<FromGitter> <aboeglin> what would be great would be to be able to write something like this: ⏎ user : User = env.get "user"
<FromGitter> <aboeglin> even though get may return `Bool | Float64 | Int32 | Int64 | String | User | Nil`, it would cast it at that time.
<FromGitter> <aboeglin> I guess using as() on a union type and getting the wrong type would lead to a runtime exception anyways no ?
<FromGitter> <bew> Yes but then the cast is implicit, that may introduce hidden problems
<FromGitter> <aboeglin> @yxhuvud this seems way too complex for a simple use case, here I know I'll get a User in 100% of cases.
<FromGitter> <aboeglin> Do you guys often end up using as ?
<FromGitter> <bew> Then yes, use as
<FromGitter> <yxhuvud> then fix your type to something that make sense instead of someting that ca be everything.
<FromGitter> <aboeglin> I can't in that case
<FromGitter> <aboeglin> I don't control it, it's from Kemal
<FromGitter> <aboeglin> it can be found here at context storage: http://kemalcr.com/guide/
<FromGitter> <yxhuvud> so add a layer of abstraction
<FromGitter> <aboeglin> I added my type like this: add_context_storage_type(User)
<FromGitter> <yxhuvud> or ,if it is possible to tell kemal what type that particular attribute is, do that.
<FromGitter> <aboeglin> well, it'd be too much in that case, I'd rather try to follow the guidance of the web framework I use though. I'll stick with as in that case.
<FromGitter> <aboeglin> I don't think it is
<FromGitter> <aboeglin> I guess the env has a Map
<FromGitter> <aboeglin> and they just provide you with put and get to access it
<FromGitter> <aboeglin> But I can double check the docs
<FromGitter> <aboeglin> anyways, I just wanted to know about the union types handling, I guess I have my answer, thanks guys !
<FromGitter> <bew> Indeed you can't, you need to use as
<FromGitter> <j8r> I'll rather check the type and restrict if with a `case`/`when`, and raise an exception
<FromGitter> <j8r> if something goes wrong, you'l get a more meaningful error
<FromGitter> <aboeglin> so you'd do: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5bc49ac7384492366142b5c1]
<FromGitter> <aboeglin> and inside that when, I wouldn't need to use as then right ?
<FromGitter> <aboeglin> sounds good though
<FromGitter> <aboeglin> the weird part is that I have a middleware doing exactly that, in case I wouldn't get a User it would already just return a 4xx to the client without even going through that code.
<FromGitter> <aboeglin> one last question, when should we just the keyword `return` ?
<FromGitter> <aboeglin> I had the compiler screaming at me once because I didn't use it, but most of the time if I do it screams at me too, I'm not sure there's a mention of that in the docs or I must have missed it.
<FromGitter> <j8r> generally `return` is used to return the value and finish the method call. This avoids executing the code after the return
marmotini_ has joined #crystal-lang
<FromGitter> <Blacksmoke16> @proyb6 say when you would be using `JSON::Serializable` and you want to setup some custom logic in the `on_to_json` method
<FromGitter> <Blacksmoke16> don really have a specific use case but im not thinking you can
_whitelogger has joined #crystal-lang
marmotini_ has quit [Remote host closed the connection]
marmotini_ has joined #crystal-lang
rohitpaulk has joined #crystal-lang
flaviodesousa has joined #crystal-lang
Jenz has joined #crystal-lang
<Jenz> Haha, RX14: Loving your roles here https://github.com/tfcat/Leafgem#contributors
marmotini_ has quit [Ping timeout: 244 seconds]
rohitpaulk has quit [Ping timeout: 252 seconds]
flaviodesousa has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
marmotini_ has joined #crystal-lang
<FromGitter> <aboeglin> @j8r my issue had something to do with captured blocks, is it common to explicitly use the return keyword ? I don't see it used anywhere in the docs.
Jenz has quit [Quit: leaving]
<FromGitter> <bmulvihill> @aboeglin It is common to use return for guard clauses (returning early from a method if some condition is met).
Jenz has joined #crystal-lang
rohitpaulk has joined #crystal-lang
akaiiro has joined #crystal-lang
<FromGitter> <drujensen> dumb question. When I ran `crystal -v` a couple week ago, the version was `Crystal 0.26.1 (2018-08-27) LLVM: 6.0.1` but now I get `Crystal 0.26.1 (2018-09-26) LLVM: 6.0.1`. The reason I’m asking is its ~15% slower on my benchmark and I’m wondering if there was a change. I checked the tagged released but there is no bump in date or version so not sure. I did update my Mac OS to mojave so maybe that
<FromGitter> ... would explain it but just curious why the date changed. I’m using `brew` to install it.
<FromGitter> <aboeglin> ```code paste, see link``` ⏎ ⏎ So, I ended up doing this after @j8r 's advice, so any route handler that needs to access user data can just call this [https://gitter.im/crystal-lang/crystal?at=5bc4bc1ec7bf7c366216d2e9]
<FromGitter> <j8r> @aboeglin you can drop the return here, since there is no code after the `case`'s`end`
<FromGitter> <Blacksmoke16> could prob simplify that to like
<FromGitter> <Blacksmoke16> er nvm, is a type check not nil
<FromGitter> <Blacksmoke16> well ⏎ ⏎ ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5bc4bf0b600c5f6423b39524]
<FromGitter> <Blacksmoke16> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5bc4bf2ff659e67772be607e]
<FromGitter> <Blacksmoke16> that should work i think..
<FromGitter> <j8r> if you have only an union of two types, this is a good solution @Blacksmoke16 :)
<FromGitter> <bew> @Blacksmoke16 with long lines, it's hard to see the condition, i always put it as a boock in this case (`unless xxx; raise... ; end` with newlines of courses, not `;`)
<FromGitter> <j8r> even https://carc.in/#/r/58q9 lol, ugly
<FromGitter> <bew> @j8r it works with unions of N types, you can "only" handle one of them
<FromGitter> <girng> i love crystal!
<FromGitter> <drujensen> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5bc4c1f9c7bf7c366216f98e]
<Jenz> I love crystal as well!
<FromGitter> <drujensen> #metoo
<FromGitter> <kingsleyh> if anyone is interested I've written this: https://github.com/kingsleyh/kemal-session-rethinkdb
<FromGitter> <kingsleyh> and this: https://github.com/kingsleyh/crystal-rethinkdb
<FromGitter> <Blacksmoke16> `return user if typeof((user = context.get "user')) == "User"`
<FromGitter> <Blacksmoke16> ;)
<FromGitter> <j8r> @drujensen you have the best answer ass for now!
<FromGitter> <drujensen> its a collaborative effort with multiple refactorings. ;-)
<FromGitter> <j8r> hom no this won't work https://carc.in/#/r/58qj
<FromGitter> <drujensen> :-(
<Jenz> Looks good @kingsleyh
<FromGitter> <drujensen> https://carc.in/#/r/58ql
<FromGitter> <Blacksmoke16> https://github.com/Blacksmoke16/CrSerializer my weekend project
non-aristotelian has joined #crystal-lang
<FromGitter> <drujensen> @Blacksmoke16 great stuff for API development
<FromGitter> <Blacksmoke16> oh yea :) works well with granite + consuming third party api as well
<FromGitter> <Blacksmoke16> or even deserializing front end js post body directly to db model obj
<FromGitter> <Blacksmoke16> while validating it as well
<FromGitter> <drujensen> right, nice!
<FromGitter> <Blacksmoke16> `Model.import(Array(Model).deserialize(response.body))` ;)
<FromGitter> <drujensen> hhmm, need to make sure you don’t allow someone to update fields you don’t want updated but its pretty cool idea!
<FromGitter> <drujensen> I guess if the field isn’t annotated, you won’t be able too update it
<FromGitter> <Blacksmoke16> `readonly: true`
<FromGitter> <Blacksmoke16> can add that annotation to not set that property from the json
<FromGitter> <drujensen> 👍
<FromGitter> <Blacksmoke16> but thats a good point, i should look into how to best handle an update case
<FromGitter> <Blacksmoke16> currently if its readonly it just sets that field to the default value, which could override a saved record if you dont have logic to set that field
<FromGitter> <drujensen> yeah, i guess it depends on your business logic on how that would work. Usually you use params validation to avoid directly updating a model. Github was hacked because Rails didn’t have param validation for a while.
<FromGitter> <Blacksmoke16> but i think that's outside the scope of the project, update/create would be user/orm specific i think
<FromGitter> <Blacksmoke16> ^^ year
<FromGitter> <drujensen> right, that would be the dev’s responsibility to avoid it
Jenz has quit [Ping timeout: 252 seconds]
<FromGitter> <drujensen> Back to my question about versions. If someone can explain why my benchmark for Crystal lost a full second from 5.5 to 6.5, it would be much appreciated. https://github.com/amberframework/granite/blob/master/README.md
<FromGitter> <drujensen> lots of eyes on it because it was posted on hacker news and would love to have crystal in the top 5.
<FromGitter> <drujensen> oops, wrong project. This one. https://github.com/drujensen/fib/blob/master/README.md
<FromGitter> <bew> The other languages changed their performance too? Or only crystal?
<FromGitter> <drujensen> Only Crystal.
<FromGitter> <drujensen> Its weird because the version of Crystal didn’t change but the date did.
<FromGitter> <drujensen> LLVM is the same as well
<FromGitter> <drujensen> I did perform a brew update on all of them
<FromGitter> <drujensen> I need to update the versions still. Crystal was 2018-08-27 but now shows 2018-09-26
<FromGitter> <bew> The date is the build date
<FromGitter> <drujensen> oh, ok
<FromGitter> <drujensen> same code though?
<FromGitter> <bew> So there's been a new build for the new osx i guess
<FromGitter> <proyb6> @drujensen How about moving all to Linux?
<FromGitter> <bew> Yes i suppose
<FromGitter> <drujensen> yeah, I have a docker image i’m working on
<FromGitter> <drujensen> so I can run this anywhere
<FromGitter> <drujensen> it was just a pet project to demonstrate at a macro level how much faster crystal is compared to ruby
<FromGitter> <elorest> Are the speeds the same on linux? After all most projects outside of development will be running in linux.
<FromGitter> <drujensen> dunno, never tried
<FromGitter> <drujensen> still working on the docker image
<FromGitter> <drujensen> to install all the languages
<FromGitter> <proyb6> Do without docker
<FromGitter> <drujensen> ok. So is the consensus that its because i’m running on a Mac?
<FromGitter> <proyb6> DigitalOcean gives you 2 months free to try if you like
<FromGitter> <drujensen> I have a server, not an issue
<FromGitter> <drujensen> just time to install all the compilers
<FromGitter> <proyb6> 👍🏻
<FromGitter> <drujensen> thanks for the advise
<FromGitter> <drujensen> I will try linux and see if that fixes it
tankf33der has left #crystal-lang [#crystal-lang]
<FromGitter> <elorest> :)
akaiiro has quit [Ping timeout: 252 seconds]
<FromGitter> <Blacksmoke16> is there a way to iterate over all the annotations on an ivar?
<FromGitter> <Blacksmoke16> far as i can tell it looks like you have to know the class off the annotation first
<FromGitter> <Blacksmoke16> which means you would have to define a macro variable for each annotation manually
rohitpaulk has quit [Ping timeout: 252 seconds]
rohitpaulk has joined #crystal-lang
<FromGitter> <bew> What's your usecase?
rohitpaulk has quit [Ping timeout: 245 seconds]
akaiiro has joined #crystal-lang
<FromGitter> <fridgerator> It is possible to specify a required option when using `OptionParser` `parse!` ?
<FromGitter> <bew> Looks like it's not directly possible
<FromGitter> <Blacksmoke16> idea was to change the syntax for my serialization shard to: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5bc4e3a9435c2a518eb0a991]
<FromGitter> <Blacksmoke16> but if it isnt possible to iterate over each annotation, there would be quite bit more boilerplate to define each assertion annotation macro var manually
helaan has joined #crystal-lang
<FromGitter> <j8r> there is no doc about annotations :(
<FromGitter> <Blacksmoke16> yea, what i know is just from going thru the JSON::Serialization stuff
<helaan> I'm trying to get a piece of Crystal code running on my RPi2 with both my devbox and the RPi2 running Gentoo, but I'm having issues getting a cross-compiler going: I installed LLVM with LLVM_TARGETS="ARM" set, but when I try to crosscompile I get "ERROR: LLVM was built without ARM target (Exception)". Anyone has experience with crosscompiling/Crystal on ARM?
<FromGitter> <api984> hello
<FromGitter> <api984> is there any shard for LDAP?
<FromGitter> <j8r> helaan: you'll need to be aarch64
<jokke> Hey! Is anyone using traefik as reverse proxy infront of a crystal webapp? I'm experiencing a bug with a webapp run like this: after a while (a few minutes) responses that write json to a reponse object (i.e. object.to_json(context.response)) fail with Broken pipe. Weirdly other requests that access files bundled into the binary with BakedFileSystem work fine. I'm super confused...
<FromGitter> <j8r> armhf isn't supported yet
<helaan> Well, that's a good excuse to get my Rpi3 going then
<FromGitter> <j8r> the most simple is to put Alpine Linux - the edge channel is up to date for aarch64/x86
akaiiro has quit [Remote host closed the connection]
helaan has quit [Quit: WeeChat 2.2]
akaiiro has joined #crystal-lang
Heaven31415 has joined #crystal-lang
<Heaven31415> Hi
<FromGitter> <girng> @jenz <3
<Heaven31415> How can I benchmark Crystal code?
<Heaven31415> and I don't want to use Benchmark from std, I want to see for example how long do I spend in every method call.
<Heaven31415> method execution*
<FromGitter> <Blacksmoke16> ```start = Time.now ⏎ {{run_method}} ⏎ end = Time.now ⏎ pp end - start``` [https://gitter.im/crystal-lang/crystal?at=5bc4fd12271506518d199fbd]
<Heaven31415> well
<Heaven31415> I know how to measure time
<Heaven31415> but thanks
<Heaven31415> I was just hoping that there is a tool that can help me
<FromGitter> <Blacksmoke16> hmm might be some shard out there, but i dont know of any off the top of my head
<FromGitter> <bmulvihill> I think you should use `Time.monotonic` for measuring elapsed time
<FromGitter> <bmulvihill> or `Time.measure`
<FromGitter> <drujensen> @helaan I don’t think this is official repo but i found this. http://public.portalier.com/raspbian/ It hasn’t been updated
<Heaven31415> Thanks, I didn't know about Time.monotonic``
return0xe has quit [Read error: Connection reset by peer]
<FromGitter> <straight-shoota> @Blacksmoke16 `Time.new` is not good for measuring elapsed time. You should use `Time.monotonic` (or `Time.measure`).
<FromGitter> <Blacksmoke16> oops
* FromGitter * Blacksmoke16 goes and updates his code
<FromGitter> <bajro17> how to see error in http server
<FromGitter> <bajro17> code normally compiled start server on first page just see directory list other pages dont work at all
<FromGitter> <bajro17> I fix now just still localhost:9090/ show just directory
<FromGitter> <bajro17> ((https://ibb.co/ezQFbL))
<FromGitter> <bajro17> [url=https://imgbb.com/][img]https://image.ibb.co/nhO1GL/Screen-Shot-2018-10-15-at-23-43-50-1.png[/img][/url]
return0e has joined #crystal-lang
<FromGitter> <bajro17> Its so weird if I use ⏎ ⏎ ```HTTP::StaticFileHandler.new("./public/", directory_listing = false),``` ⏎ ⏎ then it dont work [https://gitter.im/crystal-lang/crystal?at=5bc50d89ef4afc4f287d106d]
<FromGitter> <bew> `fallthrough: true`
<FromGitter> <bew> Not =
<FromGitter> <bew> @bajro17 you were just setting local variables
<FromGitter> <bew> If fallthrough is the second argument, then your second argument will pass false to that argument (and a local variable directory_listing will be created..)
<FromGitter> <bajro17> Thank you so much it work :)
<FromGitter> <bew> Your second *exemple
<FromGitter> <bajro17> I dont know about this hahah
<FromGitter> <bew> About what?
<FromGitter> <bajro17> with = and :
<FromGitter> <bajro17> it mean if override local variable I need to use :
<FromGitter> <bajro17> if I want follow order of all variables then I can use =
<FromGitter> <bew> What?? No
<FromGitter> <bew> Given `def foo(arg);end`, calling `foo(arg = "bar")` is the same as writing `arg = "bar"; foo(arg)`
<FromGitter> <bajro17> oh I understand now
<FromGitter> <bajro17> with directory_listing = false I just create new variable
<FromGitter> <bajro17> Thank you for explain me
<FromGitter> <bew> Yes exactly
<FromGitter> <bajro17> I was work before in golang now I little mix programming languages
<FromGitter> <bew> Ahah no worries, it'll come
<FromGitter> <bew> https://crystal-lang.org/docs/syntax_and_semantics/default_and_named_arguments.html (section named argument for the foo: bla syntax)
<FromGitter> <bajro17> also one quick question what is & used for
<FromGitter> <bajro17> if I have &variable
<Heaven31415> it's a block
<Heaven31415> You mean something like this? `def foo(&block)`
<FromGitter> <bajro17> yes exactly
<Heaven31415> so yes, it's a block
daemonwrangler has quit [Ping timeout: 244 seconds]
<FromGitter> <bajro17> I know its some silly questions but thank you just my brain be little tired of so much switching between languages easy forget some stuff
<Heaven31415> it's cool, don't worry
daemonwrangler has joined #crystal-lang
marmotini_ has quit [Ping timeout: 252 seconds]
_whitelogger has joined #crystal-lang