jhass changed the topic of #crystal-lang to: The Crystal programming language | https://crystal-lang.org | Crystal 0.35.1 | 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
<postmodern> is there documentation for the static dependencies one needs to install in order to compile static binaries?
<FromGitter> <Blacksmoke16> Just use the alpine docker image
<postmodern> trying to test something on my system (fedora), so tracking down the -static packages
<jhass> ultimately it depends on your program. just link dynamically once and run ldd on the result
<FromGitter> <Blacksmoke16> ofc only need some of those if you're using those features
<postmodern> got it down to -levent and -lcrypto, fedora probably put those somewhere weird
<jhass> crypto is openssl fwiw
<postmodern> bingo
<postmodern> looks like no one made a libevent-static package, bummer
<postmodern> is there a flag() macro function that returns a flag value (ex: -Dfoo=bar ... flag(:foo) # => "bar")?
<FromGitter> <tenebrousedge> ^ @postmodern
<FromGitter> <tenebrousedge> @Blacksmoke16 o/
<FromGitter> <Blacksmoke16> Hey
<FromGitter> <Blacksmoke16> Flags don't have values
<FromGitter> <Blacksmoke16> Prob want env vars
<straight-shoota> oprypin, I've already switched completely to https://oprypin.github.io/crystal-book :D
rocx1 has joined #crystal-lang
<FromGitter> <tenebrousedge> @Blacksmoke16 sqlite is weird
<FromGitter> <Blacksmoke16> apparently so :p
<FromGitter> <tenebrousedge> I had no idea that it was loosely typed before today
<FromGitter> <tenebrousedge> it took me a long time to figure out what exactly that meant
rocx1 has quit [Ping timeout: 260 seconds]
<FromGitter> <Blacksmoke16> dont use it too much so im deff not real familiar with it
DTZUZU has quit [Read error: Connection reset by peer]
DTZUZU has joined #crystal-lang
<FromGitter> <Blacksmoke16> TIL `getter? nilable : Bool` doesn't define an ivar too like `getter`
<FromGitter> <Blacksmoke16> nvm i does
<FromGitter> <Blacksmoke16> it*
deavmi has quit [Ping timeout: 272 seconds]
deavmi has joined #crystal-lang
HumanG33k has quit [Remote host closed the connection]
f1reflyylmao has joined #crystal-lang
f1refly has quit [Ping timeout: 260 seconds]
<FromGitter> <tenebrousedge> day is done. Bugs are squished. Food is cooked, and nommed. It's time for some vidya games
deavmi has quit [Ping timeout: 272 seconds]
deavmi has joined #crystal-lang
avane has quit [Quit: ZNC - https://znc.in]
avane has joined #crystal-lang
wmoxam has joined #crystal-lang
postmodern has quit [Quit: Leaving]
<oprypin> straight-shoota: yay :> and good; maybe you'll spot some imperfection
<FromGitter> <asterite> Kaia Leahy: what are you playing?
_whitelogger has joined #crystal-lang
<FromGitter> <HertzDevil> thinking about crystal's equivalent of ⏎ ⏎ ```%w[foo bar baz quux].select.with_index(1) { |w, i| w.size == i }``` [https://gitter.im/crystal-lang/crystal?at=5fba60daba69631c7493180b]
<FromGitter> <HertzDevil> the closest we have is `.each.with_index(1).select { |(w, i)| w.size == i }.map(&.first).to_a`...?
<straight-shoota> @HerzDevil, you didn't need to immediately close your PR. It's just my opinion. Maybe others may find it useful... =)
f1refly has joined #crystal-lang
f1reflyylmao has quit [Ping timeout: 272 seconds]
<FromGitter> <tenebrousedge> @asterite I'm replaying Torchlight II
<FromGitter> <tenebrousedge> tay, I think that's all the bugs in sqlite3 that need squished
deavmi has quit [Ping timeout: 256 seconds]
deavmi has joined #crystal-lang
deavmi has quit [Ping timeout: 272 seconds]
deavmi has joined #crystal-lang
deavmi has quit [Ping timeout: 240 seconds]
<FromGitter> <Blacksmoke16> oh boy this is a fun bug
<FromGitter> <tenebrousedge> o.o?
<FromGitter> <Blacksmoke16> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5fba952afe857d71dc8ad6ae]
<FromGitter> <Blacksmoke16> 😆
<FromGitter> <tenebrousedge> so it's getting the wrong QueryParam ?
<FromGitter> <Blacksmoke16> no idea, the array isnt being created with it in it for some reason
<FromGitter> <tenebrousedge> the disappearing element is fun too
<FromGitter> <Blacksmoke16> ikr?
<FromGitter> <Blacksmoke16> oh interesting, the element comes back if i remove the `of ...` part
<FromGitter> <tenebrousedge> yeah are you sure about that syntax?
<FromGitter> <Blacksmoke16> yea otherwise it errors since its expecting the interface not an `Array(QueryParam)`
<FromGitter> <tenebrousedge> yeah but I expect to be able to do `[] of xxx` or `[param]` but I'm not sure about `[param] of xxx`
<FromGitter> <Blacksmoke16> ``` arr = [] of ART::Params::ParamInterfaceBase ⏎ arr << param ⏎ ⏎ pp arr # => []``` [https://gitter.im/crystal-lang/crystal?at=5fba9678e6f2b51c68ade6da]
<FromGitter> <Blacksmoke16> remember kids, this is why you should avoid generic inheritance :p
<FromGitter> <tenebrousedge> that's pretty crazy
<FromGitter> <naqvis> yeah, language doesn't fully support *co and contra variance*
<FromGitter> <tenebrousedge> you should have saner bugs
<FromGitter> <Blacksmoke16> holy shit check this out tho
<FromGitter> <naqvis> i guess you should be able to get above snippet working by explicitly casting `param` to parent type
<FromGitter> <Blacksmoke16> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5fba96f6f5849839ade8ce48]
<FromGitter> <Blacksmoke16> theres something in it, it just cant print it ha
<FromGitter> <Blacksmoke16> `arr.size # => 1` sorry
<FromGitter> <tenebrousedge> weeeeeeeeeiiiiird
<FromGitter> <tenebrousedge> pp bug?
<FromGitter> <Blacksmoke16> `puts arr.inspect` displays it
<FromGitter> <Blacksmoke16> i guess so
<FromGitter> <Blacksmoke16> the other side of this bug is i think it treats it wrongly in indexable too ⏎ ⏎ ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5fba97a3ba69631c74939a8e]
<FromGitter> <Blacksmoke16> which is
<FromGitter> <tenebrousedge> neat
<FromGitter> <Blacksmoke16> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5fba97b1b03a464f0826c62a]
<FromGitter> <RespiteSage> What's the output of `p! param.to_s`?
<FromGitter> <Blacksmoke16> the `i += 1`
<FromGitter> <Blacksmoke16> `param.to_s # => "Athena::Routing::Params::QueryParam(Int32 | Nil)(@name=\"foo\", @default=10, @incompatibilities=nil, @strict=true, @type=(Int32 | Nil), @has_default=true, @nilable=true, @key=\"foo\", @requirements=nil, @map=false)"`
<FromGitter> <Blacksmoke16> seems normal
<FromGitter> <RespiteSage> Yeah. Weird.
<FromGitter> <RespiteSage> Also, I just missed that line in the original code snippet... Oops.
<FromGitter> <Blacksmoke16> https://play.crystal-lang.org/#/r/9zjk here you go
<FromGitter> <RespiteSage> Wow, that simplified really well.
<FromGitter> <Blacksmoke16> indeed
<FromGitter> <RespiteSage> https://play.crystal-lang.org/#/r/9zjq
<FromGitter> <RespiteSage> Seems like an issue with `pp` when printing `Array(T(String | U))`.
<FromGitter> <RespiteSage> At least, when T has the inheritance structure there.
<FromGitter> <Blacksmoke16> https://play.crystal-lang.org/#/r/9zju illsee if i can just switch to not using modules with generic inheritence
<FromGitter> <Blacksmoke16> that seems to fix it :shrug:
<FromGitter> <Blacksmoke16> or maybe just move the ivar def for `default` and `type` to the children implementations, since those are the only things that its used for
<FromGitter> <RespiteSage> It just seems like it *should* work.
<FromGitter> <Blacksmoke16> theres a lot of things that *should* work but just dont in Crystal atm ha
<FromGitter> <Blacksmoke16> luckily theres usually a workaround/alternate solution to get around it for the time being
deavmi has joined #crystal-lang
<FromGitter> <naqvis> you can use modules but as i said above, you need to be explicit ⏎ `arr = [param.as(ParamInterfaceBase)] of ParamInterfaceBase` should work
<FromGitter> <naqvis> thing is, its mixin, not inheritance, so compiler require some hints (don't quote me on this), but that's my understanding :P
sagax has quit [Read error: Connection reset by peer]
<FromGitter> <Blacksmoke16> makes sense
<FromGitter> <Blacksmoke16> was able to get it to work by moving the generic to only the concrete type level
<FromGitter> <Blacksmoke16> not super clean but im okay with it for now i guess
sagax has joined #crystal-lang
sagax has quit [*.net *.split]
ua has quit [*.net *.split]
early has quit [*.net *.split]
sagax has joined #crystal-lang
ua has joined #crystal-lang
early has joined #crystal-lang
sagax has quit [Max SendQ exceeded]
FromGitter has quit [Ping timeout: 246 seconds]
FromGitter has joined #crystal-lang
iwq has quit [Ping timeout: 264 seconds]
bougyman has quit [Ping timeout: 264 seconds]
bougyman has joined #crystal-lang
iwq has joined #crystal-lang
sagax has joined #crystal-lang
<FromGitter> <tenebrousedge> cables within and without the desktop are tidied, at least as much as they're going to be without a full teardown
<FromGitter> <tenebrousedge> and it even boots! 😅
<FromGitter> <Blacksmoke16> 👏
hightower2 has joined #crystal-lang