ChanServ changed the topic of #crystal-lang to: The Crystal programming language | https://crystal-lang.org | 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
deavmi_ has quit [Read error: Connection reset by peer]
postmodern has quit [Remote host closed the connection]
postmodern has joined #crystal-lang
deavmi has joined #crystal-lang
chachasmooth has quit [Ping timeout: 252 seconds]
chachasmooth has joined #crystal-lang
<FromGitter> <naqvis> @oprypin:matrix.org just raised an issue https://github.com/oprypin/install-crystal/issues/4
avane has quit [Ping timeout: 240 seconds]
avane has joined #crystal-lang
<FromGitter> <oprypin:matrix.org> @naqvis: btw you gain nothing from using a specific version number rather than just v1
<FromGitter> <naqvis> you mean `install-crystal` version?
<FromGitter> <naqvis> I had switched to version as there was problem with OSX https://github.com/oprypin/install-crystal/issues/3
<FromGitter> <oprypin:matrix.org> yes. v1 covers v1.* and auto-updates
<FromGitter> <naqvis> gotcha
<FromGitter> <naqvis> so replacing specific version with v1 gonna fix this?
<FromGitter> <oprypin:matrix.org> and i don't expect to break stuff within those updates :>
<FromGitter> <naqvis> 👍
<FromGitter> <oprypin:matrix.org> @naqvis: yes v1 or v1.4.0
<FromGitter> <naqvis> ❤️
<FromGitter> <naqvis> let me try that
<FromGitter> <naqvis> that works. Thanks @oprypin:matrix.org
_ht has joined #crystal-lang
<FromGitter> <tkshnwesper> Hi all
<FromGitter> <naqvis> \o
<FromGitter> <tkshnwesper> My travis builds have started failing (https://travis-ci.com/github/tkshnwesper/agyan/builds/225295620)
<FromGitter> <tkshnwesper> Has ubuntu removed the crystal package?
<FromGitter> <naqvis> i assume so, Travis-CI wasn't officially supported even before. You should be migrating to GitHub Actions
<FromGitter> <tkshnwesper> Ok, will do. But the travis config file is part of the `crystal init` template (https://github.com/crystal-lang/crystal/blob/421fa11bf05b11441b74bbeb2762b673f96fec3f/src/compiler/crystal/tools/init/template/travis.yml.ecr). It would fail for everyone else too
<FromGitter> <naqvis> true, you can raise an issue to have that removed
<FromGitter> <tkshnwesper> ok 👍
hendursa1 has quit [Ping timeout: 240 seconds]
hendursa1 has joined #crystal-lang
deavmi has quit [Read error: Connection reset by peer]
deavmi has joined #crystal-lang
<FromGitter> <Daniel-Worrall> Theres already an issue tracking the init and CI config
<FromGitter> <Daniel-Worrall> I'd leave a comment in there about it
yxhuvud has quit [Quit: No Ping reply in 180 seconds.]
yxhuvud has joined #crystal-lang
vasanth has joined #crystal-lang
<FromGitter> <naqvis> Just published a Unicode Char and String Width shard https://github.com/naqvis/uni_char_width
<FromGitter> <naqvis> @Blacksmoke16 don't know if it will be of any use to your CLI development
vasanth has quit [Ping timeout: 240 seconds]
postmodern has quit [Quit: Leaving]
<FromGitter> <Blacksmoke16> oh snap, nice one!
<FromGitter> <naqvis> ❤️
<FromGitter> <Blacksmoke16> totally should add that stuff to the unicode data file and stdlib ❤️ looks super useful
vasanth has joined #crystal-lang
<FromGitter> <Blacksmoke16> https://github.com/naqvis/uni_char_width/blob/main/spec/char_width_spec.cr#L37-L38 ⏎ ⏎ FWIW i think you can do like `wid.should eq(tc[1]), "Char width(#{tc.first}) = #{wid}, want #{tc[1]} (east_asian = false)"` now.
<FromGitter> <naqvis> 👍 Thanks
<FromGitter> <Blacksmoke16> prob not worth changing, but for future use :)
<FromGitter> <naqvis> yeah, wasn't aware of this idiom
<FromGitter> <naqvis> thank you
<FromGitter> <naqvis> definitely helpful
<FromGitter> <naqvis> TIL this new feature. Thank you again ❤️
<FromGitter> <Blacksmoke16> np, maybe you'd be interested in https://athenaframework.org/Spec/TestCase/DataProvider/ 😉
<FromGitter> <naqvis> let me go through the docs
<FromGitter> <Blacksmoke16> essentially is just a syntactical sugar on `Spec` module. i.e. adds an `it` block for each item that'll be provided
<FromGitter> <naqvis> WoW
<FromGitter> <naqvis> so framework will invoke the method for all data inside the `Provider` ?
<FromGitter> <Blacksmoke16> ```code paste, see link``` ⏎ ⏎ expands to this. I.e. normal `Spec` code [https://gitter.im/crystal-lang/crystal?at=6096a071d964ec553898e11b]
<FromGitter> <Blacksmoke16> where all the code happens in a `.run` method that's like `instance = new`
<FromGitter> <naqvis> @oprypin:matrix.org 😺
yxhuvud has quit [Remote host closed the connection]
vasanth has quit [Ping timeout: 260 seconds]
<FromGitter> <naqvis> @Blacksmoke16 move to `Athena::Spec` was quite smooth 👍
<FromGitter> <naqvis> Love that `Provider` stuff
<FromGitter> <Blacksmoke16> ❤️ pretty cool eh?
<FromGitter> <naqvis> yeah, beautiful 👍
yxhuvud has joined #crystal-lang
<FromGitter> <Blacksmoke16> i really like having a type to use when writing specs for non trivial things
<FromGitter> <naqvis> yeah, same is here
<FromGitter> <Blacksmoke16> otherwise there just isnt really a good way to share helpers/tests between common types
<FromGitter> <naqvis> the best thing I love is, it count each iteration as a separate run
<FromGitter> <naqvis> as previously I was iterating through the array inside a single TC
<FromGitter> <naqvis> so in console it was just a one TC
<FromGitter> <naqvis> though not a big deal, but why can't I mark those provider methods as private?
<FromGitter> <naqvis> i know this is Crystal limitation
<FromGitter> <Blacksmoke16> protected should do
<FromGitter> <Blacksmoke16> maybe
<FromGitter> <naqvis> yeah, that's how I circumvent this
<FromGitter> <Blacksmoke16> ☝️ May 8, 2021 10:30 AM (https://gitter.im/crystal-lang/crystal?at=6096a071d964ec553898e11b)
<FromGitter> <naqvis> but shouldn't the same scope things has access to scoped value
<FromGitter> <Blacksmoke16> because this is just syntactical sugar, it essentially does `instance.provider_name` so has to be visible
<FromGitter> <naqvis> yeah, i was talking about compiler limitation
<FromGitter> <Blacksmoke16> i mean is it a compiler limitation? this isnt any diff than like ⏎ ⏎ ```instance = new ⏎ instance.private_method``` ⏎ ⏎ which ofc that wuldnt work [https://gitter.im/crystal-lang/crystal?at=6096ae320845c416dccfe26a]
<FromGitter> <naqvis> yeah, but thing is it doesn't even allow the scoped access
<FromGitter> <naqvis> actually as long as you add Namespace name infront of private methods, compiler start screaming
<FromGitter> <naqvis> This will work ⏎ ⏎ ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=6096af3bd5e2793379fcf3c7]
<FromGitter> <Blacksmoke16> ahh yea, private method invocations cant have a receiver other than `self`
<FromGitter> <Blacksmoke16> :shrug:
<FromGitter> <Blacksmoke16> private and protected in crystal arent like private and protected in other langs like PHP
<FromGitter> <Blacksmoke16> took a bit of getting used to
<FromGitter> <straight-shoota> it's like Ruby =)
<FromGitter> <Blacksmoke16> coming from a more PHP background it was diff
<FromGitter> <straight-shoota> deffinitely
<FromGitter> <straight-shoota> some background on private self https://github.com/crystal-lang/crystal/issues/5995
<FromGitter> <naqvis> Thanks @straight-shoota , last comment in that thread is :P ⏎ ⏎ > I guess we can do the same then.
<FromGitter> <naqvis> but issue is already closed, shouldn't it be opened again? :P
<straight-shoota> But this was already merged before in #6075
<DeBot> https://github.com/crystal-lang/crystal/pull/6075 (Allow private method invocation with self receiver)
vasanth has joined #crystal-lang
vasanth has quit [Ping timeout: 268 seconds]
yxhuvud has quit [Remote host closed the connection]
yxhuvud has joined #crystal-lang
<FromGitter> <naqvis> thanks
vasanth has joined #crystal-lang
vasanth has quit [Ping timeout: 240 seconds]
vasanth has joined #crystal-lang
vasanth has quit [Ping timeout: 246 seconds]
vasanth has joined #crystal-lang
DTZUZU has quit [Ping timeout: 252 seconds]
DTZUZU has joined #crystal-lang
DTZUZU has quit [Ping timeout: 265 seconds]
vasanth has quit [Ping timeout: 260 seconds]
HumanG33k has joined #crystal-lang
hendursa1 has quit [Quit: hendursa1]
hendursaga has joined #crystal-lang
_ht has quit [Remote host closed the connection]
<FromGitter> <Blacksmoke16> https://play.crystal-lang.org/#/r/b3bo well this was unexpected
<FromGitter> <Blacksmoke16> was able to get it to work via `NONE = 0`
<FromGitter> <Blacksmoke16> :shrug:
<FromGitter> <tenebrousedge> works
hendursaga has quit [Remote host closed the connection]
hendursaga has joined #crystal-lang