ChanServ changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.31.1 | Fund Crystal's development: http://is.gd/X7PRtI | GH: https://github.com/crystal-lang/crystal | Docs: http://crystal-lang.org/docs/ | API: http://crystal-lang.org/api/ | Gitter: https://gitter.im/crystal-lang/crystal
ur5us has quit [Ping timeout: 245 seconds]
ur5us has joined #crystal-lang
ur5us has quit [Read error: Connection reset by peer]
ur5us has joined #crystal-lang
dwdv has quit [Ping timeout: 240 seconds]
<FromGitter> <Blacksmoke16> np
alexherbo2 has quit [Quit: The Lounge - https://thelounge.chat]
<FromGitter> <Blacksmoke16> this is pretty slick, got the initial wiring done for implementing the listener stuff in Athena
<FromGitter> <Blacksmoke16> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5ddc89091bf5192e66a5c47b]
<FromGitter> <Blacksmoke16> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5ddc891dc52bc74c9690b30e]
f1refly has joined #crystal-lang
f1reflyylmao has quit [Ping timeout: 276 seconds]
<FromGitter> <Blacksmoke16> https://play.crystal-lang.org/#/r/82md does this make sense?
<FromGitter> <Blacksmoke16> not sure how i feel about being able have an abstract class inherit from a non abstract class?
<FromGitter> <Blacksmoke16> check this out, refactoring how i call my controller actions
<FromGitter> <Blacksmoke16> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5ddca42df3ea522f266bc624]
<FromGitter> <Blacksmoke16> is still a WIP, but basically this allows you to change the arguments of a controller via event listeners before it gets executed
<FromGitter> <Blacksmoke16> as you can do like `action.set_params ["foo", 19, false]` and still gives compile time safety if you try to pass the wrong types
<FromGitter> <Blacksmoke16> which brings me to a question, can you not use splat generics in a `Proc` type declaration?
<FromGitter> <Blacksmoke16> https://play.crystal-lang.org/#/r/82mk
<FromGitter> <Blacksmoke16> or is that a bug?
<FromGitter> <tenebrousedge> I didn't think you could use splats in procs
<FromGitter> <Blacksmoke16> :shrug:
ur5us has quit [Ping timeout: 250 seconds]
ur5us has joined #crystal-lang
sagax has joined #crystal-lang
HumanG33k has joined #crystal-lang
ht_ has joined #crystal-lang
<FromGitter> <igor-alexandrov> WTF is going on with CrystalLibHunt Twitter https://twitter.com/CrystalLibHunt/status/1198905976360800257 ? Who is its owner?
ht_ has quit [Quit: ht_]
DTZUZO has quit [Ping timeout: 240 seconds]
<FromGitter> <watzon> Maybe they got hacked?
<FromGitter> <watzon> What's the best way to replicate a C macro in a `lib`
ur5us has quit [Ping timeout: 250 seconds]
<FromGitter> <yxhuvud> regarding libhunt I think it rather is that someone created a web form connected to twitter and then some spammer found it
<FromGitter> <yxhuvud> but I could be wrong.
<FromGitter> <yxhuvud> @watzon I think your choices is to either copy what it does or to create a c shim file that you can link against.
<FromGitter> <yxhuvud> (I think the same is true for methods exported with `static inline` too, FWIW)
ur5us has joined #crystal-lang
dwdv has joined #crystal-lang
alexherbo2 has joined #crystal-lang
ur5us has quit [Ping timeout: 245 seconds]
<FromGitter> <watzon> Yeah I figured as much
<FromGitter> <watzon> Just trying to figure out if I was missing something
sagax has quit [Ping timeout: 240 seconds]
sagax has joined #crystal-lang
DTZUZO has joined #crystal-lang
alexherbo2 has quit [Quit: The Lounge - https://thelounge.chat]
DTZUZO has quit [Ping timeout: 265 seconds]
DTZUZO has joined #crystal-lang
<dom96> Would be nice to see some language diversity in the FOSDEM devroom for Emerging Languages, if anyone here is interested in doing a talk on Crystal that would be awesome, it's your last chance to submit a talk: https://forum.nim-lang.org/t/5577 :)
<FromGitter> <tenebrousedge> what sort of a talk on Crystal?
<FromGitter> <didactic-drunk> Is there a way to do a `responds_to` check inside a class definition?
<FromGitter> <tenebrousedge> with a macro you can use `TypeNode#has_method?`
<FromGitter> <didactic-drunk> What is `TypeNode` for the current class inside `class Foo`?
<FromGitter> <cserb> Can someone tell me what I'm missing? I have a crystal lib which by now has multiple versions. One version is `0.1.0-alpha` in shard.yml and the git tag is `v0.1.0-alpha`. But requesting it as a dependency with `~> 0.1.0-alpha` is not working. Any idea why?
<FromGitter> <Blacksmoke16> it would be `{{@type}}`
<FromGitter> <Blacksmoke16> does it work i you remove the `~>`?
<FromGitter> <cserb> nope
<FromGitter> <Blacksmoke16> whats the error?
<FromGitter> <cserb> `Error resolving probfin (0.1.0-alpha)`
<FromGitter> <Blacksmoke16> i had this issue the other day
<FromGitter> <Blacksmoke16> try like `rm -rf ~/.cache/crystal ~/.cache/shards`
<FromGitter> <Blacksmoke16> i also blew away .lock and the lib folder and that seemed to do it :shrug:
<hightower4> interesting
<FromGitter> <cserb> not really working for me. Maybe I'm doing something wrong in terms of versioning? The string in shard.yml doesn't have the `v` prefix...
<FromGitter> <Blacksmoke16> Should be fine
<FromGitter> <Blacksmoke16> What’s your shards version ?
<FromGitter> <cserb> Shards 0.8.1 [0147a56] (2019-09-30)
<FromGitter> <Blacksmoke16> maybe try `0.9.0`?
sorcus has quit [Quit: WeeChat 2.6]
<FromGitter> <straight-shoota> @cserb `Error resolving probfin` indicates a dependency conflict
<FromGitter> <straight-shoota> Can you share a reproducing example?
<FromGitter> <cserb> so it's this repo: https://github.com/cocol-project/probfin
<FromGitter> <cserb> but the lib has no dependencies
<FromGitter> <Blacksmoke16> is that lib a dep of another shard you're trying to install?
sorcus has joined #crystal-lang
<FromGitter> <cserb> no it's a dep of an app...
<FromGitter> <Blacksmoke16> hmm
<FromGitter> <cserb> so it's not a nested dep
<FromGitter> <cserb> ``` probfin: ⏎ github: cocol-project/probfin ⏎ version: 0.1.0-alpha``` [https://gitter.im/crystal-lang/crystal?at=5ddd4f1e8e906a1c8d1f986d]
<FromGitter> <Daniel-Worrall> version uses v prefixes to find the version iirc though
<FromGitter> <Daniel-Worrall> oh it has the v hmm
<FromGitter> <cserb> there is also the version `0.2.1` without the `-alpha` which works fine. I kinda suspect it might be the reason
<FromGitter> <cserb> ah yes... so this was it. I tagged the same commit also just as `v0.1.0` and now it works
ht_ has joined #crystal-lang
HumanG33k has quit [Remote host closed the connection]
sagax has quit [Ping timeout: 240 seconds]
HumanG33k has joined #crystal-lang
teardown has quit [Ping timeout: 276 seconds]
return0e_ has joined #crystal-lang
return0__ has quit [Ping timeout: 265 seconds]
dannyAAM has quit [Quit: znc.saru.moe : ZNC 1.6.2 - http://znc.in]
dannyAAM has joined #crystal-lang
straight-shoota has joined #crystal-lang
<FromGitter> <alehander92> about fosdem: @tenebrousedge https://forum.nim-lang.org/t/5330
<FromGitter> <alehander92> has more explanations
<FromGitter> <tenebrousedge> huh
<FromGitter> <tenebrousedge> I'm not sure Crystal is what I'd hold up as an example of minimalism
<FromGitter> <alehander92> sorry, it's not only about minimalistic languages
<FromGitter> <alehander92> it is about minimalistic + emerging languages : they got merged into one room
<FromGitter> <alehander92> and i guess the name might have not been updated yet, i have to ask PMunch
<FromGitter> <alehander92> our original idea was to create a room for emerging langs like nim, crystal, zig, pony etc
<FromGitter> <alehander92> but basically the organizers merged both rooms
<FromGitter> <tenebrousedge> ah, okay
teardown has joined #crystal-lang
alexherbo2 has joined #crystal-lang
ur5us has joined #crystal-lang
alexherbo2 has quit [Quit: The Lounge - https://thelounge.chat]
alexherbo2 has joined #crystal-lang
<FromGitter> <jwoertink> Can specs be ran with the preview_mt setting?
ht_ has quit [Remote host closed the connection]
alexherbo2 has quit [Quit: The Lounge - https://thelounge.chat]
ur5us has quit [Ping timeout: 250 seconds]
<Yxhuvud> I would assume so but havn't tested
tleydxdy has joined #crystal-lang
ur5us has joined #crystal-lang
<tleydxdy> Hi, I've been having trouble building an application that uses libxml2 on alpine, I've tried this but it didn't work https://forum.crystal-lang.org/t/building-static-apps-using-libxml-with-official-docker-image
<FromGitter> <christopherzimmerman> Does ameba have a verbose flag? Didn't see one in the docs, and my runs just went from 10s to like 5 minutes.
<tleydxdy> i.e. I used --link-flags -llzma, I also tried --link-flags "-static -llzma" or just giving it the full path "/usr/lib/liblzma.a"
<tleydxdy> yes, I'm static linking it
<tleydxdy> from what I can tell, it's because --link-flags put the flag in the front
<FromGitter> <kinxer> @tleydxdy Try `crystal build --release --static --link-flags "-lxml2 -lz"`.
<tleydxdy> the error https://bin.privacytools.io/?26ee8dafa722e4cf#NQhDsQw+qO3ExpDinAioREk8KIGfFEY1N+sy980hhlw=
<tleydxdy> those two flag is already in the command it seems
dwdv has quit [Quit: quit]
<tleydxdy> full error, I missed a couple line in the last one https://bin.privacytools.io/?4bbd136aa36912b3#yEgaiHntNPZJRUCnCrOGleFDCi8IwHaTe57SKoNHspg=
<FromGitter> <kinxer> Have you tried running the command I gave? I recall having similar issues on a VM, and explicitly giving those two flags helped.
<tleydxdy> I'm tring it
<tleydxdy> the build is just slow :(
<tleydxdy> I mean it might means it worked
<tleydxdy> ye, nope
<tleydxdy> same error
<FromGitter> <kinxer> Hm... That's odd. You're in the latest Docker container?
<tleydxdy> edge
<tleydxdy> latest won't build because of the crystal version, iirc
<straight-shoota> tleydxdy, are your sure you have liblzma.a available on your syste?
<straight-shoota> It should be provided by package xz-dev
<tleydxdy> yes
<tleydxdy> it's a dependency of libxml2-dev
<tleydxdy> I used --link-flags "-lxml2 -lz -llzma"
<FromGitter> <straight-shoota> oops
<FromGitter> <straight-shoota> Seems you broke the compiler
<FromGitter> <straight-shoota> Just a wild guess, but try removing `-Dmusl`. Passing that flag manually might have unexpected results. It shouldn't break the compiler though, so not sure what's going on
<FromGitter> <straight-shoota> Can you share the dockerfile?
<tleydxdy> upon running build again, it finished!
<tleydxdy> lemme try again
<tleydxdy> ye, building again also worked
<tleydxdy> perhaps it's just a fluke, will report back if it happens again
<FromGitter> <lbarasti> @straight-shoota, thanks for the review. We've now got two approval, green CI and no conflict: https://github.com/crystal-lang/crystal/pull/8356, are you OK with merging when you have a sec?
<hightower4> Is there a cmdline tool for installation of shards/programs? Like if I wanted to install program 'icr' or 'cry' to the system, is there some install-like command I can run and that's it?
<FromGitter> <Blacksmoke16> not built in
<hightower4> yes, yes, 3rd party is fine
<FromGitter> <Daniel-Worrall> hmm, can I use shards in crystal play?
<FromGitter> <Blacksmoke16> i doubt it
<FromGitter> <tenebrousedge> you can do `crystal play [file]`