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 joined #crystal-lang
ur5us has quit [Ping timeout: 240 seconds]
ur5us has joined #crystal-lang
ua__ has quit [Ping timeout: 256 seconds]
ua__ has joined #crystal-lang
ur5us has quit [Ping timeout: 240 seconds]
ur5us has joined #crystal-lang
ur5us has quit [Ping timeout: 240 seconds]
<FromGitter> <y8> Uh. I don't really get how to work around virtual types. I would love to have annotation to disable virtual typing for specific hierarchies. ⏎ ⏎ My case is: https://play.crystal-lang.org/#/r/cq9k ⏎ ⏎ I'm decoding wasm assembly and it got two formats: text and binary. ... [https://gitter.im/crystal-lang/crystal?at=620394e251bd8b580c94ff73]
<FromGitter> <y8> Im okay with generating stuff with macros. But only option that I see at the moment is to generate giant `case` switch
<FromGitter> <dscottboggs:matrix.org> is there really no way to get a reference to a value type? I tried to create an `Atomic(Time?)` and it says that you `Can only create Atomic with primitive integer types, reference types or nilable reference types, not (Time | Nil)`. So I says to myself "okay, no problem, `Atomic(Pointer(Time?))`. Nope, you can't have an `Atomic(Pointer)` either. I guess in my case I can use `UInt64` timestamps
<FromGitter> ... but it seems like there should be some way to box up a `Value` in a `Reference`...
mookie has quit [Ping timeout: 240 seconds]
mookie has joined #crystal-lang
mookie has quit [Ping timeout: 256 seconds]
<FromGitter> <y8> Not really what I imagined, but it is at least something: https://play.crystal-lang.org/#/r/cqaz
<FromGitter> <y8> With some kind of parsing generalization: https://play.crystal-lang.org/#/r/cqb2 ⏎ ⏎ Doesn't feel right though
<FromGitter> <y8> @dscottboggs:matrix.org like this, maybe? https://play.crystal-lang.org/#/r/cqbq
<FromGitter> <dscottboggs:matrix.org> Yup
SamantazFox has quit [Quit: Bye]
<FromGitter> <y8> `Module validation failed: Function return type does not match operand type of return inst!`. I'm breaking crystal all day long. This is third time I've crashed compiler :D
ur5us has joined #crystal-lang
ur5us has quit [Ping timeout: 240 seconds]
<FromGitter> <asterite> If you inherit generic types and continue inheriting types, things break. It's been known for a while. Until that's fixed you probably want to avoid doing those things :-)
notzmv has quit [Ping timeout: 250 seconds]
notzmv has joined #crystal-lang
ur5us has joined #crystal-lang
<FromGitter> <y8> @asterite I've surrended to virtual types and ended up with humongous case switch to parse things. But I'm still curious what's the secret sauce of cooking with virtual types? As you can see I *love* inheriting things! :D Virtual types defo will hunt me when I'll be dealing with vm implementation
<FromGitter> <alex-lairan> Hey! ⏎ What ORM do you use today with crystal?
waleee has joined #crystal-lang
<FromGitter> <Blacksmoke16> if you're not doing anything super complex, the driver + `DB::Serializable` works pretty well
<waleee> which lsp is considered the best these days for crystal? I was aware of 2 when I did some experiments in crystal about 2 years ago
<FromGitter> <Blacksmoke16> Afaik crystalline or something like that
<waleee> Back then it looked to have a wider scope of features compared to the one that's in the crystal-lang github org
<FromGitter> <Blacksmoke16> Afaik there isn't one in that repo
<waleee> yeah, it was not there now
<FromGitter> <Blacksmoke16> Mhm
<waleee> wow, the readme for crystalline wasn't joking about the long compile time
<FromGitter> <Blacksmoke16> Dunno, never used it
<waleee> about 5 minutes on my not-super-powered laptop
<waleee> ... and now it crashed on something
<waleee> oh. It went for the wrong llvm (13)
<riza> now you have me curious how long it'll take the m1
<waleee> wasn't it mostly various codec related stuff that's much faster?
<riza> compiling crystal is much faster
<riza> running webpack builds is also significantly faster
<riza> firing up a lucky project does both and on the intel mac I had from 2017 it would take 30-45s to finish booting, and on this m1 air it takes 10-15s
<riza> after 5 min ld failed ld: symbol(s) not found for architecture arm64
<waleee> aha! x86-64 had Inf times better compile times then :P
<riza> \o/