ChanServ changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.32.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
<Stephie> happy new UTC-year :)
alex`` has quit [Quit: WeeChat 2.7]
dwdv has quit [Ping timeout: 268 seconds]
ur5us has quit [Ping timeout: 260 seconds]
ur5us has joined #crystal-lang
<FromGitter> <dotism> It's lovely to be ringing in the New Year whilst fiddling with Crystal code...
chachasmooth has quit [Ping timeout: 240 seconds]
chachasmooth has joined #crystal-lang
ur5us has quit [Ping timeout: 260 seconds]
ur5us has joined #crystal-lang
_whitelogger has joined #crystal-lang
_whitelogger has joined #crystal-lang
<FromGitter> <ImAHopelessDev_gitlab> i just realized i could list out property names in one LINE, LOL! (`property x = 0, y = 0`)
_whitelogger has joined #crystal-lang
ur5us has quit [Ping timeout: 260 seconds]
ur5us has joined #crystal-lang
_whitelogger has joined #crystal-lang
return0e_ has joined #crystal-lang
return0e has quit [Ping timeout: 240 seconds]
return0e has joined #crystal-lang
return0e_ has quit [Ping timeout: 258 seconds]
dwdv has joined #crystal-lang
ur5us has quit [Ping timeout: 260 seconds]
JuanMiguel has joined #crystal-lang
JuanMiguel has quit [Quit: This computer has gone to sleep]
HumanGeek has joined #crystal-lang
HumanGeek has quit [Remote host closed the connection]
HumanGeek has joined #crystal-lang
Human_G33k has quit [Ping timeout: 268 seconds]
<FromGitter> <btihen> @watzon - Record looks interesting - is it really just a different way to define a struct - are their reasons one would / should use one over the ⏎ other?
HumanG33k has joined #crystal-lang
HumanGeek has quit [Ping timeout: 268 seconds]
<Stephie> @btihen it's really just a different way to define a struct
_whitelogger has joined #crystal-lang
JuanMiguel has joined #crystal-lang
Nicolab has joined #crystal-lang
SiinaCutie has joined #crystal-lang
<FromGitter> <Nicolab> Happy New Year filled of Crystal
<FromGitter> <Nicolab> and shards, and health
Nicolab has quit [Ping timeout: 265 seconds]
JuanMiguel has quit [Quit: This computer has gone to sleep]
JuanMiguel has joined #crystal-lang
JuanMiguel has quit [Client Quit]
<FromGitter> <ImAHopelessDev_gitlab> Happy New Year!
gangstacat has quit [Quit: Ĝis!]
gangstacat has joined #crystal-lang
<FromGitter> <btihen> @FromIRC - Thanks. Good to know.
JuanMiguel has joined #crystal-lang
JuanMiguel has quit [Quit: This computer has gone to sleep]
<FromGitter> <grkek> @FromIRC shhhh shut the fuck up
<FromGitter> <Blacksmoke16> wew finally think i landed in a good spot
<FromGitter> <Blacksmoke16> for handling configuration within listeners
<FromGitter> <Blacksmoke16> keeps the listener not directly coupled to how it gets the configuration, i.e. so much easier to test
<FromGitter> <grkek> an example please ?
<FromGitter> <grkek> @Blacksmoke16
<FromGitter> <Blacksmoke16> example of what?
<FromGitter> <grkek> also I am currently exploiting missconfigured routers, fiber networking is really interesting but scary once you fuck something up
vitallium has joined #crystal-lang
<FromGitter> <grkek> more than 4k routers already
<FromGitter> <grkek> :D
<FromGitter> <grkek> example of what you did
<FromGitter> <grkek> and how it helps you
<FromGitter> <grkek> with something
<FromGitter> <grkek> did it change the default way of defining things ?
<FromGitter> <Blacksmoke16> the commit i linked has all the relevant code
<FromGitter> <Blacksmoke16> essentially what i settled on is a YAML file that represents the configuration
<FromGitter> <grkek> Nice choice
<FromGitter> <Blacksmoke16> like ⏎ ⏎ ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5e0ce97f0c3aeb107d8b5813]
<FromGitter> <Blacksmoke16> each "level" in the config maps to a struct that includes ⏎ ⏎ ``` include YAML::Serializable ⏎ include YAML::Serializable::``` [https://gitter.im/crystal-lang/crystal?at=5e0ce9a907a1a67d1d95eb51]
<FromGitter> <Blacksmoke16> so that you dont have to work with the yaml directly and get type safety/exceptions on unknown properties etc
<FromGitter> <Blacksmoke16> or could add helper methods or validation etc
<FromGitter> <Blacksmoke16> there is another object ⏎ ⏎ ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5e0cea172d574c7d1ef388d9]
<FromGitter> <grkek> thats a pretty neat feature
<FromGitter> <Blacksmoke16> that can be injected/used (like the link i posted)
<FromGitter> <Blacksmoke16> so that in this case the listener doesnt have to fetch its configuration directly, which would be a nightmare to test
<FromGitter> <Blacksmoke16> since it would be expecting it to come from a yaml file, where now i can just mock the `ConfigurationResolver` and make it return what i need for a given test
<FromGitter> <Blacksmoke16> this is also a benefit of using interfaces versus concrete types in your type restrictions
vitallium has quit [Quit: Textual IRC Client: www.textualapp.com]
vitallium has joined #crystal-lang
alex has joined #crystal-lang
alexherbo2 has joined #crystal-lang
<FromGitter> <stnluu_twitter> it's probably documented somewhere but i couldn't find it. is there anyway to have the crystal API doc offline?
<FromGitter> <stnluu_twitter> like this: https://crystal-lang.org/api/0.32.1/, but offline
<FromGitter> <Blacksmoke16> then open `index.html` in your browser
<FromGitter> <stnluu_twitter> :thor-thumbs-up.gif:
<FromGitter> <stnluu_twitter> oh oops ^ habit
<FromGitter> <stnluu_twitter> thanks :D
<FromGitter> <stnluu_twitter> i suppose, one can write a quick script to always download from a URL like that
<FromGitter> <stnluu_twitter> pull git for the latest release tag maybe?
<FromGitter> <Blacksmoke16> Probably
<FromGitter> <stnluu_twitter> happy new year everyone! wish you a healthy and joyful year of 2020
alex has quit [Ping timeout: 258 seconds]
alexherbo2 has quit [Ping timeout: 260 seconds]
alex has joined #crystal-lang
alexherbo2 has joined #crystal-lang
JuanMiguel has joined #crystal-lang
alex has quit [Quit: WeeChat 2.7]
alex has joined #crystal-lang
Chioque has joined #crystal-lang
JuanMiguel has quit [Quit: This computer has gone to sleep]
alexherbo2 has quit [Quit: The Lounge - https://thelounge.chat]
alexherbo2 has joined #crystal-lang
Chioque has quit [Quit: WeeChat 2.7]
alexherbo2 has quit [Client Quit]
JuanMiguel has joined #crystal-lang
hightower4 has quit [Ping timeout: 268 seconds]
Chioque has joined #crystal-lang
JuanMiguel has quit [Quit: This computer has gone to sleep]
Chioque has quit [Client Quit]
<FromGitter> <stnluu_twitter> a quick blog post to help the next guy looking to use the compiler package. Anything else I should add? https://www.luu.io/posts/using-the-crystal-compiler-api/
JuanMiguel has joined #crystal-lang
<FromGitter> <stevedowney> Hello. Looking for a way to time code execution like: duration = Time.time do; some_code; end
<FromGitter> <stnluu_twitter> there's a benchmark module
<FromGitter> <Blacksmoke16> ```duration = Time.measure do ⏎ some_code ⏎ end``` [https://gitter.im/crystal-lang/crystal?at=5e0d01a00c3aeb107d8befba]
ur5us has joined #crystal-lang
<FromGitter> <plambert> Is there anyone who's doing crystal development for hire? I've got a project I'd want to pay someone to implement.
<FromGitter> <plambert> Specifically, I need some additional features added to the sqlite3 shard.
<FromGitter> <Blacksmoke16> what features?
JuanMiguel has quit [Quit: This computer has gone to sleep]
JuanMiguel has joined #crystal-lang
dwdv has quit [Ping timeout: 268 seconds]
<FromGitter> <Blacksmoke16> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5e0d0f11eaa2cd096fdacb41]
<FromGitter> <Blacksmoke16> first test done heh
JuanMiguel has quit [Quit: This computer has gone to sleep]
dwdv has joined #crystal-lang
ur5us has quit [Remote host closed the connection]
ur5us has joined #crystal-lang
return0e has quit [Read error: Connection reset by peer]