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 [Quit: Leaving]
ur5us has joined #crystal-lang
ur5us has quit [Client Quit]
ur5us has joined #crystal-lang
irc_user has joined #crystal-lang
ur5us has quit [Ping timeout: 252 seconds]
sagax has joined #crystal-lang
ur5us has joined #crystal-lang
jhass has quit [Ping timeout: 252 seconds]
jhass has joined #crystal-lang
ur5us has quit [Ping timeout: 256 seconds]
irc_user has quit [Quit: Connection closed for inactivity]
ur5us has joined #crystal-lang
ur5us has quit [Quit: Leaving]
HumanG33k has quit [Quit: WeeChat 3.0]
HumanG33k has joined #crystal-lang
jhass[m] has quit [Ping timeout: 260 seconds]
alexherbo2 has joined #crystal-lang
Sankalp has quit [Ping timeout: 260 seconds]
Sankalp has joined #crystal-lang
jhass[m] has joined #crystal-lang
jmdaemon has quit [Ping timeout: 260 seconds]
alexherbo2 has quit [Remote host closed the connection]
alexherbo2 has joined #crystal-lang
alexherbo2 has quit [Remote host closed the connection]
alexherbo2 has joined #crystal-lang
alexherbo2 has quit [Remote host closed the connection]
alexherbo2 has joined #crystal-lang
<fifr> Hi. The following example crashes with stack overflow: when calling the `size` method: https://bpa.st/X57KI is this expected?
alexherbo2 has quit [Ping timeout: 260 seconds]
<FromGitter> <Blacksmoke16> yes
Starfoxxes has quit [Ping timeout: 265 seconds]
<FromGitter> <Blacksmoke16> the gist of it is including indexable also includes enumerable which overrides the `size` method of the `Base` type, turning it into essentially an infinite loop
Starfoxxes has joined #crystal-lang
<fifr> aah, I see ... and that implementation basically "counts" ... that was surprising (to me), haven't though of that
<fifr> thanks
<FromGitter> <Blacksmoke16> normally more specialized containers override `#size` to implement it in a more performant way
<fifr> yes, in my case a had a generic data structure without a specific container api (but a `size` method) and a derived class with a certain (array-like, i.e. `Indexable`) container api, and only the subclass can meaningful include `Indexable`
<fifr> that's no problem, of course, I can just reimplement `size` in the subclass
<FromGitter> <Blacksmoke16> 👍
<FromGitter> <rolandoam> anyone with experience with Clear ORM? trying to figure out how to run the migrations, and it's not clear how to either run the cli, or do it from the API
<FromGitter> <rolandoam> or is there another ORM that's better maintained that I should look into?
SamantazFox has joined #crystal-lang
<FromGitter> <moe:busyloop.net> i've used clear a bunch but i never use the builtin migration thing. i always stick with https://github.com/amacneil/dbmate
<FromGitter> <moe:busyloop.net> no point in learning new custom migration magic for every project/framework
<FromGitter> <moe:busyloop.net> i don't think you'll find a more mature ORM for crystal atm (clear is pretty nice one you have it running). ⏎ the only other contender that i'm aware of would be jennifer.cr - but i've found that one a bit messier than clear.
<FromGitter> <Blacksmoke16> for simple cases using the raw driver shard + `DB::Serializable` can work quite well
_ht has joined #crystal-lang
<FromGitter> <moe:busyloop.net> until you need a JOIN ...
<FromGitter> <rolandoam> got it, thanks @moe! I'll stick to Clear for now and just have a custom init file to create the initial schema. I'm still very early in the dev where having migrations is not really a must, I was just curious if there was something obvious I was missing
ur5us has joined #crystal-lang
jmdaemon has joined #crystal-lang
_ht has quit [Remote host closed the connection]
ur5us has quit [Read error: Connection reset by peer]
ur5us has joined #crystal-lang
SamantazFox has quit [Remote host closed the connection]
SamantazFox has joined #crystal-lang