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
Sankalp- has joined #crystal-lang
Sankalp has quit [Ping timeout: 260 seconds]
Sankalp has joined #crystal-lang
Sankalp- has quit [Ping timeout: 268 seconds]
ur5us has joined #crystal-lang
Sankalp- has joined #crystal-lang
Sankalp has quit [Ping timeout: 272 seconds]
Sankalp- is now known as Sankalp
ur5us has quit [Remote host closed the connection]
ur5us has joined #crystal-lang
ur5us has quit [Ping timeout: 260 seconds]
notzmv has quit [Ping timeout: 246 seconds]
ur5us has joined #crystal-lang
_ht has joined #crystal-lang
notzmv has joined #crystal-lang
jmdaemon has quit [Ping timeout: 252 seconds]
ur5us has quit [Ping timeout: 255 seconds]
ur5us has joined #crystal-lang
ur5us has quit [Ping timeout: 246 seconds]
ur5us has joined #crystal-lang
__ht has joined #crystal-lang
_ht has quit [Ping timeout: 268 seconds]
__ht is now known as _ht
alexherbo2 has joined #crystal-lang
ur5us has quit [Ping timeout: 252 seconds]
Sankalp- has joined #crystal-lang
Sankalp has quit [Ping timeout: 252 seconds]
Sankalp- is now known as Sankalp
Sankalp- has joined #crystal-lang
Sankalp has quit [Ping timeout: 246 seconds]
Sankalp- is now known as Sankalp
Sankalp has quit [Ping timeout: 256 seconds]
Sankalp has joined #crystal-lang
Sankalp has quit [Ping timeout: 260 seconds]
Sankalp has joined #crystal-lang
__ht has joined #crystal-lang
_ht has quit [Ping timeout: 252 seconds]
__ht is now known as _ht
<FromGitter> <moe:busyloop.net> hrm, why does https://github.com/crystal-ameba/github-action build ameba from scratch every time
<FromGitter> <moe:busyloop.net> eatin' up all my build minutes :(
<FromGitter> <Blacksmoke16> prob more so a symptom of installing all shard deps each build
<FromGitter> <Blacksmoke16> could prob cache those and it would be fine
<FromGitter> <moe:busyloop.net> well yea, it uses the crystal container and then does a shards install for ameba, which spends 5 minutes compiling...
<FromGitter> <moe:busyloop.net> why not just curl the release binary or use a container that has it already baked in :confused_parrot:
<FromGitter> <Blacksmoke16> fair point, open an issue about it?
<FromGitter> <moe:busyloop.net> you mean complaining on matrix is not enough?
<FromGitter> <moe:busyloop.net> sigh... okeh
<FromGitter> <moe:busyloop.net> oh, i might see the problem. ameba doesn't seem to publish binary releases. hmpf.
<FromGitter> <Blacksmoke16> sounds ya need to make 2 issues then :P
<FromGitter> <moe:busyloop.net> nah, sounds more like 1 to me. on main crystal. "put ameba in stdlib already, `crystal lint`"
<FromGitter> <moe:busyloop.net> but i'll leave that for later, for now will just drop the linting from my action :P
<FromGitter> <Blacksmoke16> is it within a private repo?
<FromGitter> <moe:busyloop.net> yup. in public i'll leave it on as i don't push those that often anyway
<FromGitter> <moe:busyloop.net> just in this private wip it was getting a bit annoying. no biggie anyway, just biking the shed...
<FromGitter> <Blacksmoke16> could ofc make it so it only runs when you open a PR and each commit after its opened
<FromGitter> <Blacksmoke16> but fair enough :P
<FromGitter> <moe:busyloop.net> yea but shouldn't have to, 5min is too long for a linter
<FromGitter> <Blacksmoke16> it takes 5min to build? 🤔
<FromGitter> <moe:busyloop.net> yep
<FromGitter> <Blacksmoke16> wew, it takes 20s for my CI builds
<FromGitter> <moe:busyloop.net> using that same github action? 🤔
<FromGitter> <moe:busyloop.net> hm, not sure what extra stuff the action is doing
<FromGitter> <moe:busyloop.net> but a solid 5min here 🤷
<FromGitter> <Blacksmoke16> seems it builds in release mode
<FromGitter> <moe:busyloop.net> ow... yea, that explains it
<FromGitter> <moe:busyloop.net> well, but i can see how fixing it is prob a bit complicated, since ameba doesn't have binary releases
<FromGitter> <moe:busyloop.net> so i'll quit whining for a bit
<FromGitter> <Blacksmoke16> it's its own crystal application so yea that would do it
<FromGitter> <moe:busyloop.net> yea, easiest might be to bake a docker image with it and use that in the action
<FromGitter> <moe:busyloop.net> but then you have to think about quota allowances in the docker registry etc.
<FromGitter> <Blacksmoke16> ameba installs quickly (like <20s) then it builds another crystal app in release mode that takes a while
<FromGitter> <Blacksmoke16> so unless you care about it reporting failures in the PR diff, prob easier to just run it w/o the action itself. or have an issue about building it non-release mode. \cc @veelenga
<FromGitter> <moe:busyloop.net> yea that's what i had before. switched to the action because i liked the fancy github report
<FromGitter> <moe:busyloop.net> but it's not that important anyway, was just surprised why the official ameba action is so slow
<FromGitter> <toast:matrix.quietfeathers.space> With a union type is there a way to make a call only if the value is of a given type?
<FromGitter> <Blacksmoke16> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=63b9dd437de82d26161a31bf]
<FromGitter> <toast:matrix.quietfeathers.space> More concretely, I'm pulling a value from a json blob that may or may not be there I'm doing `json["key"]?` and I'd like to call `as_s` chained after that, but it doesn't work because of the union type
<FromGitter> <Blacksmoke16> got an example of the error?
<FromGitter> <toast:matrix.quietfeathers.space> oh that might help, I can make a helper that just defaults to empty string if the value isn't there
<FromGitter> <Blacksmoke16> is the structure of the data known ahead of time?
<FromGitter> <toast:matrix.quietfeathers.space> it is
<FromGitter> <Blacksmoke16> have you looked into https://crystal-lang.org/api/JSON/Serializable.html?
<FromGitter> <toast:matrix.quietfeathers.space> that's probably the better solution
<FromGitter> <toast:matrix.quietfeathers.space> thanks for your help!
<FromGitter> <Blacksmoke16> 👍
jmdaemon has joined #crystal-lang
_ht has quit [Remote host closed the connection]
oprypin has quit [Read error: Connection reset by peer]
FromGitter has quit [Read error: Connection reset by peer]
oprypin_ has joined #crystal-lang
FromGitter has joined #crystal-lang
brw has quit [Quit: The Lounge - https://thelounge.chat]
brw has joined #crystal-lang
alexherbo2 has quit [Remote host closed the connection]
alexherbo2 has joined #crystal-lang
<FromGitter> <abduct> hey all. im trying to generate every possible x, y, z coord between -50 and 50 to test a robot kinematics but it seems i have misunderstood the Array#combinations method? it seems it doesnt actually generate each combination. for example [1, 1, 1] does not exist?
<FromGitter> <abduct> here is my iterator loop: https://carc.in/#/r/ecm6
<FromGitter> <abduct> here is the iterator with logic testing for the 1, 1, 1 case: https://carc.in/#/r/ecma