<FromGitter>
<mjfiano:matrix.org> Question about inlining: Is the compiler smart enough to inline a function that is annotated `AlwaysInline` at its callsite if the definition of the to-be-inlined function has not been seen yet (such as if it is defined later in the file, or in a different file that hasn't been processed), or does the compiler ensure the ordering.
<FromGitter>
<Blacksmoke16> pretty sure all the code is loaded before doing any actual compilation
<FromGitter>
<Blacksmoke16> LLVM is pretty smart so you could prob get away with not worrying about perf so much until you run into an actual bottleneck
<FromGitter>
<mjfiano:matrix.org> Yes, I mostly am. I was just curious, and was hoping that would be the case, coming from Lisp where things are loaded and compiled in a strange way, so inlining has these problems.
<FromGitter>
<Blacksmoke16> prob be fine
ur5us has quit [Ping timeout: 252 seconds]
<FromGitter>
<mjfiano:matrix.org> Do any of you have a naming convention to distinguish partial types from types?
Nik- has joined #crystal-lang
r0bby has quit [Ping timeout: 272 seconds]
r0bby has joined #crystal-lang
hightower2 has joined #crystal-lang
<FromGitter>
<HertzDevil> if you can deal with the empty prelude you can try experimenting with `@[AlwaysInline]` on compiler explorer
<FromGitter>
<mjfiano:matrix.org> Thanks, will do
<FromGitter>
<HertzDevil> speaking of that
<FromGitter>
<HertzDevil> time to add 1.1.1 to ce
<FromGitter>
<mjfiano:matrix.org> @HertzDevil: check my (just edited) comment on 10711 when you get a chance. Would like to know the reasoning :)
<FromGitter>
<HertzDevil> that's because these two defs are currently considered redefinitions
<FromGitter>
<HertzDevil> every def is considered a redefinition of the preceding one, so only the last one remains
<FromGitter>
<mjfiano:matrix.org> that makes sense
<FromGitter>
<mjfiano:matrix.org> and your PR solves some of this?
<FromGitter>
<mjfiano:matrix.org> I only skimmed the referenced document
<FromGitter>
<mjfiano:matrix.org> I will read more later
<FromGitter>
<HertzDevil> all, to my knowledge
<FromGitter>
<HertzDevil> except where comparisons between the individual restrictions break down ig
<FromGitter>
<mjfiano:matrix.org> Very nice, so just waiting on some specs to be written?
<FromGitter>
<HertzDevil> more like waiting for 2.0, though if a proper warning is decided upon we might be able to see this in 1.x
<FromGitter>
<mjfiano:matrix.org> Great. I don't need it any time soon, as there wasn't any particular reason for optional arguments here, nor a T parameter.
<FromGitter>
<mjfiano:matrix.org> Ok, bed time. enjoy the ce hacking
iskra has quit [Ping timeout: 268 seconds]
iskra has joined #crystal-lang
HumanG33k has quit [Ping timeout: 258 seconds]
HumanG33k has joined #crystal-lang
<FromGitter>
<HertzDevil> crystal 1.1.1 is now live on ce
<yxhuvud>
nice, though there are some unmerged fixes I hoped for that isn't in yet.
<straight-shoota>
yxhuvud which ones?
<yxhuvud>
well 11002. But it is of course possible to work around
<straight-shoota>
Yeah, that's going into 1.2
<straight-shoota>
1.1.1 received only essential bugfixes (such as regressions in 1.1.0)
<yxhuvud>
well, the problem was that from_errno also stopped accepting a custom errno. So things broke with no replacement.
<yxhuvud>
But I guess I'm pretty alone in using that :D
<straight-shoota>
Did that change in 1.1.0?
<yxhuvud>
yes.
<yxhuvud>
basically `from_errno(errno: Errno.new(2)) ` used to work but now gives an error due to errno being injected twice.
<yxhuvud>
oh well, at least I can use the new interface if I provide a string. it might even provide some context so perhaps it isn't bad
<straight-shoota>
You can open an issue about backporting that fix and we could release it in 1.1.2
<yxhuvud>
not certain I care enough. I still have enough to rewrite due to your refactoring that it doesn't matter all that much :D
<yxhuvud>
but that is my problem as I monkeypatch private apis :)
_whitelogger has joined #crystal-lang
<FromGitter>
<djberg96> How long for a brew version of 1.1?
<FromGitter>
<mjfiano:matrix.org> Oh sigh. Dunno how I missed that
<FromGitter>
<mjfiano:matrix.org> Ty
Nik- has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
<FromGitter>
<mjfiano:matrix.org> It looks like the inheritance-based design wasn't very good either. Just finished what is hopefully the final design though, a hybrid mixin/inheritance dsign
<FromGitter>
<mjfiano:matrix.org> The problem was mostly that the relationships between shared methods isn't very hierarchical...it's all mix and match
<FromGitter>
<mjfiano:matrix.org> Otherwise would have been a lot of DRY violations and a pain to maintain
<FromGitter>
<mjfiano:matrix.org> Someone should write about the flexibility Crystal provides wrt mixins, interfaces, inheritance, etc. Maybe I will when some time. I'm sure it would bring some newcomers around.
<FromGitter>
<Blacksmoke16> i feel like thats just most OOP langs ;P
<FromGitter>
<mjfiano:matrix.org> You must have not used many of them :)
<FromGitter>
<mjfiano:matrix.org> Wishlist: Allow more lines of text after `:ditto:` to extend the previous text. Currently this causes a literal `:ditto: to be rendered.
<riza>
I have that wish as well
HumanG33k has quit [Ping timeout: 268 seconds]
HumanG33k has joined #crystal-lang
<FromGitter>
<mjfiano:matrix.org> I think the one thing missing from Crystal I'd really like to see is restrictive type ranges
<FromGitter>
<Blacksmoke16> I think he's mainly wanting to support compile time errors for number literals not in a specific range. i.e instead of checking in code and raising an argument error at runtime
<FromGitter>
<asterite> It can probably be done with macros too
<FromGitter>
<RespiteSage> @Blacksmoke16 Yeah, I know. I was giving an example of restricting values in generic type arguments.