<FromGitter>
<wontruefree> just in case someone idling here was looking for one
<FromGitter>
<watzon> Got a 404 with that link
<FromGitter>
<watzon> Where's @Blacksmoke16 when you need him?
<FromGitter>
<wontruefree> @watzon it was private I just made it public
<FromGitter>
<watzon> Ahh there you go
<FromGitter>
<wontruefree> thanks for the response though I forget to make some of these repos public
<FromGitter>
<wontruefree> also made a quick readme and demo
DTZUZO has quit [Ping timeout: 245 seconds]
absolutejam3 has quit [Ping timeout: 268 seconds]
jhass has quit [Ping timeout: 245 seconds]
asterite has quit [Ping timeout: 264 seconds]
asterite has joined #crystal-lang
jhass has joined #crystal-lang
flaviodesousa has quit [Ping timeout: 246 seconds]
flaviodesousa has joined #crystal-lang
flaviodesousa has quit [Max SendQ exceeded]
<FromGitter>
<mwlang> hmmm...I just realized I have versioning in two places...once in the shard.yml and again in a version.cr file.
<FromGitter>
<watzon> Yup that's pretty typical
<FromGitter>
<watzon> Of course you can pull your version into your `version.cr` from `shard.yml` if you don't feel like keeping track in both places
<FromGitter>
<mwlang> Is there anything that actually checks these version numbers? I'm thinking to just remove the VERSION constant within the crystal code.
<FromGitter>
<mwlang> I know Ruby utilizes the VERSION constant in gems management, but I suspect crystal only looks at shard.yml
<FromGitter>
<mwlang> for any sort of dependency management, that is.
<FromGitter>
<watzon> Not really, I mean there could be times when other shards will want to keep track of the version or where you might want to use it in a CLI or something
<FromGitter>
<mwlang> ah...CLI -- that's a good use-case, which I don't have.
<FromGitter>
<mwlang> ok, it's a goner.
<FromGitter>
<j8r> @dscottboggs_gitlab what advantage does it bring to have `@[AlwaysInline]`?
<FromGitter>
<watzon> I believe it's the same principle as with C's inline functions
<FromGitter>
<j8r> So why not having it by default?
<FromGitter>
<watzon> That is a good question. I don't think all functions benefit from inlining. I don't know enough about it though.
<FromGitter>
<watzon> I haven't worked with C much
<FromGitter>
<mwlang> inlining is kind of a fine balance, micro-optimization thing
<FromGitter>
<mwlang> when there's not a lot of code in the function you're inlining, you can save the call overhead and realize some performance boost, esp. in heavy number crunching routines.
<FromGitter>
<mwlang> but when you have a lot going on in a function, it's better to take the call penalty for the space-saving, compiling speed, optimize once, etc. benefits gained.
<FromGitter>
<mwlang> in my particular case, it really doesn't even matter, so I didn't opt to do it since I'm pretty sure 99% of the utilized time is waiting on the network API call to return the data.
<FromGitter>
<j8r> 👍 that would be a kind of over-optimization
<FromGitter>
<mwlang> personally, I don't even consider this degree of optimization in building web-apps, esp. in Ruby, so it's interesting to suddenly be facing the possibility that I *can* consider such in Crystal. Kind of brings back memories of my Windows programming days and doing all kinds of micro optimizations to make things run as fast and as small as possible (before RAM, diskspace and CPU became plentiful and cheap)
<FromGitter>
<alex-lairan> Yes, I agree ⏎ ⏎ It's better to challenge code complexity in time and memory before inlining things :)
<FromGitter>
<alex-lairan> (But, inside a lib, it's interesting to optimize things)
<FromGitter>
<yxhuvud> see it like this: If it was optimal to always have it, the compilers would do it by default. Don't add it unless you try with it and without it and notice an improvement.
absolutejam3 has joined #crystal-lang
absolutejam3 has quit [Ping timeout: 245 seconds]
DTZUZO has joined #crystal-lang
alex`` has joined #crystal-lang
sorcus has joined #crystal-lang
alex`` has quit [Ping timeout: 246 seconds]
alex`` has joined #crystal-lang
absolutejam3 has joined #crystal-lang
<FromGitter>
<dscottboggs_gitlab> Hm. I just always use it for simple one-line functions like this out of habit... didn't realize it was such a controversial concept
absolutejam3 has quit [Ping timeout: 268 seconds]
<Yxhuvud>
not controversial, just useless most of the time. most of the time the compiler is smart enough to inline stuff itself
absolutejam3 has joined #crystal-lang
<FromGitter>
<watzon> Well it's been a long night, but I turned my pluscode project into a little API
<FromGitter>
<Blacksmoke16> which is like `string = string ? string : "empty"`
<FromGitter>
<watzon> That would be nice as well
<FromGitter>
<Blacksmoke16> also is `??`
<FromGitter>
<dscottboggs_gitlab> how is `?:` different from `||`? Like I've used it in kotlin because `or` works different in Kotlin but I don't see the point in crystal
<Yxhuvud>
you mean ||=. || break if lhs isn't assigned yet.
<FromGitter>
<Blacksmoke16> `||` only works the the first value is nil/false
<FromGitter>
<Blacksmoke16> `"" || "foo" # => ""`
<FromGitter>
<Blacksmoke16> well
<FromGitter>
<Blacksmoke16> that wouldnt wo
<FromGitter>
<dscottboggs_gitlab> yes, so does elvis?
<FromGitter>
<Blacksmoke16> right :P good call lol
<Yxhuvud>
do elvis work on stuff that isn't assigned?
<FromGitter>
<Blacksmoke16> in php you cant do like `false || 1` so prob why they implemented an operator for it
<FromGitter>
<Blacksmoke16> not really needed since you can do that in crystal
<FromGitter>
<dscottboggs_gitlab> yeah in Kotlin `nil or 1` is just false because the `or` operator only returns a boolean not lhs or rhs
snsei__ has joined #crystal-lang
snsei__ has quit [Ping timeout: 276 seconds]
absolutejam1 has joined #crystal-lang
snsei__ has joined #crystal-lang
absolutejam1 has quit [Ping timeout: 268 seconds]
absolutejam1 has joined #crystal-lang
snsei__ has quit [Ping timeout: 250 seconds]
<FromGitter>
<naqvis> Made my first contribution by submitting a shard for reading/writing `Tar` archives. This shard supports GNU, PAX and USTAR tar formats. Effort has been made to make the api as fluent as other archive modules in standard lib. ⏎ https://github.com/naqvis/crystar
<FromGitter>
<Blacksmoke16> neat
absolutejam1 has quit [Read error: Connection reset by peer]