ChanServ changed the topic of #crystal-lang to: The Crystal programming language | https://crystal-lang.org | Fund Crystal's development: https://crystal-lang.org/sponsors | GH: https://github.com/crystal-lang/crystal | Docs: https://crystal-lang.org/docs | Gitter: https://gitter.im/crystal-lang/crystal
ur5us has quit [Ping timeout: 244 seconds]
ur5us has joined #crystal-lang
ur5us has quit [Ping timeout: 255 seconds]
ur5us has joined #crystal-lang
ur5us has quit [Ping timeout: 244 seconds]
sagax has joined #crystal-lang
ur5us has joined #crystal-lang
Sankalp has quit [Ping timeout: 268 seconds]
Sankalp has joined #crystal-lang
ur5us has quit [Ping timeout: 255 seconds]
jmdaemon has quit [Ping timeout: 252 seconds]
<frojnd> Hi there.
<frojnd> Is there a better way to convert a number into single digits? For example 123.to_s.chars.each ...
sagax has quit [Quit: Konversation terminated!]
<FromGitter> <Blacksmoke16> Pretty sure there is a digits method
Starfoxxes has quit [Ping timeout: 252 seconds]
Starfoxxes has joined #crystal-lang
<frojnd> I see: https://crystal-lang.org/api/1.5.0/Int.html#digits%28base%3D10%29%3AArray%28Int32%29-instance-method
<FromGitter> <koffeinfrei:matrix.org> `123.digits.reverse`
SamantazFox_ has quit [Read error: Connection reset by peer]
_ht has joined #crystal-lang
jmdaemon has joined #crystal-lang
Sankalp has quit [*.net *.split]
notzmv has quit [*.net *.split]
ober_ has quit [*.net *.split]
Elouin has quit [*.net *.split]
oprypin has quit [*.net *.split]
Flipez has quit [*.net *.split]
_ht has quit [*.net *.split]
olbat has quit [*.net *.split]
raph_ael has quit [*.net *.split]
riza has quit [*.net *.split]
jmiven has quit [*.net *.split]
antoszka has quit [*.net *.split]
DeBot has quit [*.net *.split]
markmarkmark has quit [*.net *.split]
dannyAAM has quit [*.net *.split]
egality has quit [*.net *.split]
ua_ has quit [*.net *.split]
void09 has quit [*.net *.split]
dostoyevsky2 has quit [*.net *.split]
spuun has quit [*.net *.split]
rymiel has quit [*.net *.split]
hexology has quit [*.net *.split]
frojnd has quit [*.net *.split]
r0bby has quit [*.net *.split]
oz has quit [*.net *.split]
miketheman has quit [*.net *.split]
kiwiroy has quit [*.net *.split]
egality has joined #crystal-lang
notzmv has joined #crystal-lang
ua_ has joined #crystal-lang
ober_ has joined #crystal-lang
Flipez has joined #crystal-lang
Elouin has joined #crystal-lang
oprypin has joined #crystal-lang
raph_ael has joined #crystal-lang
_ht has joined #crystal-lang
Sankalp has joined #crystal-lang
void09 has joined #crystal-lang
jmiven has joined #crystal-lang
oz has joined #crystal-lang
olbat has joined #crystal-lang
spuun has joined #crystal-lang
dostoyevsky2 has joined #crystal-lang
kiwiroy has joined #crystal-lang
hexology has joined #crystal-lang
miketheman has joined #crystal-lang
rymiel has joined #crystal-lang
r0bby has joined #crystal-lang
markmarkmark has joined #crystal-lang
dannyAAM has joined #crystal-lang
antoszka has joined #crystal-lang
DeBot has joined #crystal-lang
frojnd has joined #crystal-lang
riza has joined #crystal-lang
jhass[m] has quit [Ping timeout: 255 seconds]
_ht has quit [Quit: _ht]
walez has joined #crystal-lang
<FromGitter> <mattrberry> ```code paste, see link``` ⏎ ⏎ I would have assumed this would work, but instead it fails with ⏎ `Error: instance variable '@a' of Foo was not initialized directly in all of the 'initialize' methods, rendering it nilable. Indirect initialization is not supported.` ⏎ I assume this is a bug? Just want to confirm before opening an issue. I feel like the `set_a` macro should be expanded before the
<FromGitter> ... field initialization check is performed [https://gitter.im/crystal-lang/crystal?at=630e7bf411a6a83d048f22ef]
<FromGitter> <Blacksmoke16> try wrapping it in `{% begin %} ... `{% end %}`
<FromGitter> <mattrberry> Which part?
<FromGitter> <Blacksmoke16> nvm
<FromGitter> <Blacksmoke16> https://play.crystal-lang.org/#/r/dor7
ur5us has joined #crystal-lang
<FromGitter> <mattrberry> What does adding `{{@type}}` there do?
<FromGitter> <Blacksmoke16> its somehow a workaround to a bug im trying to find iirc
<FromGitter> <Blacksmoke16> ayy nice, found it
<FromGitter> <Blacksmoke16> had a comment in my code that linked to it :P
<FromGitter> <mattrberry> Weird.. The example I shared is a cut down version of my code that's actually failing, and it looks like the `{{@type}}` solution doesn't work for my specific case
<FromGitter> <mattrberry> I'll play around with it some more. Thanks for the tip!
<FromGitter> <mattrberry> Well, I found my workaround.. Since it's all generated code and I have plenty of tests, I'm just declaring the instance variables as `uninitialized` for now..
<FromGitter> <mattrberry> Sad.
<FromGitter> <mattrberry> :p
<FromGitter> <mattrberry> This is closer to my actual code that's failing https://play.crystal-lang.org/#/r/dorf
walez has quit [Ping timeout: 268 seconds]
jhass[m] has joined #crystal-lang
ur5us has quit [Ping timeout: 268 seconds]