ChanServ changed the topic of #crystal-lang to: The Crystal programming language | | Fund Crystal's development: | GH: | Docs: | Gitter:
ur5us has quit [Ping timeout: 252 seconds]
notzmv has joined #crystal-lang
ur5us has joined #crystal-lang
<FromGitter> <> 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> <> 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> <> 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> <> Thanks, will do
<FromGitter> <HertzDevil> speaking of that
<FromGitter> <HertzDevil> time to add 1.1.1 to ce
<FromGitter> <> @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> ```code paste, see link``` []
<FromGitter> <> o.O
<FromGitter> <HertzDevil> basically once there are optional positional params a lot of things break down
<FromGitter> <HertzDevil> for example
<FromGitter> <HertzDevil> ```code paste, see link``` []
<FromGitter> <HertzDevil> every def is considered a redefinition of the preceding one, so only the last one remains
<FromGitter> <> that makes sense
<FromGitter> <> and your PR solves some of this?
<FromGitter> <> I only skimmed the referenced document
<FromGitter> <> I will read more later
<FromGitter> <HertzDevil> all, to my knowledge
<FromGitter> <HertzDevil> except where comparisons between the individual restrictions break down ig
<FromGitter> <> 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> <> 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> <> 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: ` 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> <Blacksmoke16> its already live
<FromGitter> <Blacksmoke16> ```code paste, see link``` []
hightower2 has quit [Ping timeout: 250 seconds]
<FromGitter> <RespiteSage> Is this expected behavior?
<FromGitter> <RespiteSage> `Int#//` doesn't make note of that behavior, though it mentions other cases where it would raise.
postmodern has joined #crystal-lang
<FromGitter> <djberg96> @Blacksmoke16 looks like i needed to `brew update`
<FromGitter> <Blacksmoke16> that would do it
<FromGitter> <> Does Crystal have a bit-vector type of sorts?
<FromGitter> <> Oh sigh. Dunno how I missed that
<FromGitter> <> Ty
Nik- has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
<FromGitter> <> 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> <> The problem was mostly that the relationships between shared methods isn't very's all mix and match
<FromGitter> <> Otherwise would have been a lot of DRY violations and a pain to maintain
<FromGitter> <> 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> <> You must have not used many of them :)
<FromGitter> <> 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> <> I think the one thing missing from Crystal I'd really like to see is restrictive type ranges
<FromGitter> <asterite> What is that?
<FromGitter> <> @asterite: Like, being able to restrict a numeric parameter to a specific domain ⏎ ⏎ ```code paste, see link``` ⏎ ⏎ Or at the very least be able to do something like Nim's range type, which is different from ours: []
<FromGitter> <asterite> I see. Yeah, I don't see that ever happening. You can restrict it in generic type arguments, I think. Not sure
<FromGitter> <Blacksmoke16> Afaik you'd have to check and manually raise in the method
<FromGitter> <RespiteSage> Yeah. But it works.
<FromGitter> <RespiteSage> And you can do it in a constructor.
ur5us has joined #crystal-lang
<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.
<raz> why limit it to numerics tho
ua_ has quit [Ping timeout: 250 seconds]
ua_ has joined #crystal-lang