<FromGitter>
<j8r> Hum don't know, you can try using the edge image instead, which use shards `0.9.0`
<repo>
jrei/crystal-alpine:0.31.1-edge?
<FromGitter>
<j8r> ho sorry, 0.31.1 is already based on edge
<FromGitter>
<j8r> I rebuild the image
<repo>
mmh
<repo>
should i try again?
<FromGitter>
<j8r> Sometimes `edge` is broken
<FromGitter>
<j8r> In 15 minutes
<repo>
ok
<FromGitter>
<j8r> you can try with `jrei/crystal-alpine:edge`
<FromGitter>
<j8r> and `jrei/crystal-alpine:latest`
<repo>
will do
alexherbo257 has joined #crystal-lang
<FromGitter>
<wontruefree> shameless plug for Chicago Crystal! Come watch @asterite speak on how the magic in crystal works chicagocrystal.org/events/bbhsjryzqbhb/
alexherbo25 has quit [Ping timeout: 240 seconds]
<FromGitter>
<asterite> If you want, give me an email and I'll send you the slides I have so far
ht_ has joined #crystal-lang
<FromGitter>
<vlazar> ❤️
<FromGitter>
<vlazar> waiting for recorded video
HumanG33k has quit [Ping timeout: 268 seconds]
HumanG33k has joined #crystal-lang
Human_G33k has joined #crystal-lang
duane has quit [Ping timeout: 250 seconds]
baweaver has quit [Ping timeout: 250 seconds]
Human_G33k has quit [Remote host closed the connection]
DTZUZU has quit [Quit: WeeChat 2.2]
Human_G33k has joined #crystal-lang
DTZUZU has joined #crystal-lang
duane has joined #crystal-lang
HumanG33k has quit [Ping timeout: 276 seconds]
fifr has quit [Ping timeout: 250 seconds]
fifr has joined #crystal-lang
dannyAAM has quit [Quit: znc.saru.moe : ZNC 1.6.2 - http://znc.in]
<raz>
is there a short-hand/macro to generate a constructor for all non-nilable properties on a class?
<raz>
i keep writing empty constructors like def initialize(@foo, @bar, @batz); end - which feels wrong somehw
<FromGitter>
<tenebrousedge> I would consider whether you want a struct instead
<raz>
in most cases i don't
<FromGitter>
<tenebrousedge> structs are kinda the workhorse data structure, and generally better for performance
<FromGitter>
<tenebrousedge> but there's also nothing wrong with empty initializers
<raz>
i know but their semantics make me uncomfortable. i know i'll forget them sometime and likely introduce a bug. so i only consider them for cases where performance/high-throughput is really a concern
<raz>
yea the empty initializers work. they just don't feel very DRY, order of arguments depends on my mood and caffeine/alcohol level, etc. - feels like there should be something automati
<raz>
c
<raz>
i mostly bump into it with classes that purely serve as a data-container with include JSON::Serializable
<raz>
i think JSON::Mapping used to auto-generate the constructor
<FromGitter>
<Blacksmoke16> it was a bug
<FromGitter>
<Blacksmoke16> that including it allowed you to call the parent constructor
<raz>
yea i remember it causing me headache so i'm actually glad it's not the default anymore
<raz>
but having it as an option might be handy
<FromGitter>
<Blacksmoke16> if there an initialize actually defined on the parent?
<FromGitter>
<Blacksmoke16> could probably do (not tested0
<raz>
ah no. my memory is blurry. i don't remember the details, just that i think had some issues with constructors and json-mapping
* FromGitter
* tenebrousedge continues to mumble something about structs
<FromGitter>
<Blacksmoke16> can just use `self.new`
<FromGitter>
<watzon> Trying to turn this (https://core.telegram.org/schema/json) into a list of Crystal classes is proving to be an enormous pain in the ass
<FromGitter>
<Blacksmoke16> gl ha
<FromGitter>
<watzon> It's mainly just deciding what should be abstract and not
<FromGitter>
<watzon> And for each abstract class I have to generate a mapping to use with `use_json_discriminator`
<FromGitter>
<Blacksmoke16> that working out well for you?
<raz>
tenebrousedge: the "problem" remans tho when using a struct. they also want an initializer (unless i'm mistaken). if i want to have setters/getters too, or use the json decorators, i have to repeat all vars in the ctor-def
<FromGitter>
<watzon> I haven't even gotten there yet haha. Too busy trying to get class generation to actually work right
<raz>
but, admittedly, setters should prob be avoided for structs anyway
<FromGitter>
<watzon> Yeah structs should generally only have getters
<FromGitter>
<Blacksmoke16> mhm
<FromGitter>
<watzon> They're meant to hold immutable data