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
<FromGitter> <AlexCouch> Hey, I'm having a strange issue with shards and crystal compiler right now. Not sure what I did wrong but it was working just fine the other day. I have a dependency through shard.yml and it's installed inside the lib directory. When I try to require it, according to the rules for requiring files, it *should* find the file under lib/icmp/src/icmp.cr, but the compiler for some reason isn't finding it. I
<FromGitter> ... compiled it just the other day and it was fine but now it's not. I'm not sure what I did wrong. I'm running in the project root directory. This occurs if I run `shards build` or `crystal build src/main.cr`. I can't seem to find any reason why the compiler can't see the file anymore.
<FromGitter> <AlexCouch> Does this sound like something that has happened before due to some change to the environment somehow?
<FromGitter> <Blacksmoke16> can you share some code of how you're requiring it, shard.yml
<FromGitter> <AlexCouch> Sure
<oprypin> @AlexCouch `echo $CRYSTAL_PATH`
<oprypin> `which crystal`
<FromGitter> <AlexCouch> Yeah that's fine I already checked
<oprypin> `crystal env`
<oprypin> @AlexCouch: you shouldn't decide what's fine now that you're asking for help :o
<FromGitter> <AlexCouch> `crystal env` ⏎ ⏎ ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5fd9571dc614d23c2e0ece6c]
<FromGitter> <Daniel-Worrall> `rm -rf ~/.cache/crystal`
<FromGitter> <AlexCouch> Fair enough
<FromGitter> <Blacksmoke16> imma also ask the obvious, is the shard actually installed?
<FromGitter> <AlexCouch> Yes
<FromGitter> <AlexCouch> I didn't touch it from the other day. It's sitting there.
<oprypin> ok @AlexCouch crystal_path is not ok, in fact
<FromGitter> <jrei:matrix.org> what is the actual error?
<oprypin> it simply must not be set
<FromGitter> <AlexCouch> Oh really?
<FromGitter> <AlexCouch> Error: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5fd9576f3a35fc2758eac438]
<FromGitter> <Blacksmoke16> yea id try unsetting that var and clearing cache and try again
<FromGitter> <AlexCouch> I feel dumb now. Thanks
<FromGitter> <jrei:matrix.org> me I have `CRYSTAL_PATH=lib:/usr/bin/../share/crystal/src`
<FromGitter> <AlexCouch> It's working now. Glad to know I'm not supposed to touch the crystal_path. Oddly enough everything seemed fine when I set it
<FromGitter> <Daniel-Worrall> `CRYSTAL_PATH=/home/d/.anyenv/envs/crenv/versions/0.35.1/share/crystal/src:/home/d/.anyenv/envs/crenv/versions/0.35.1/src:libs:lib` crenv boi
<FromGitter> <AlexCouch> Oh odd...so...
<FromGitter> <AlexCouch> I'll just leave it the way it is now and be productive again. Thanks for the help
<oprypin> those people have `:lib:` manually as part of their crystal_path
<oprypin> that's the other option - u basically need to add that any time u set the var
<FromGitter> <AlexCouch> Ah okay
<oprypin> there's been a discussion that this `lib` should always be set implicitly but it stalled
<FromGitter> <AlexCouch> Ah okay
deavmi has quit [Read error: Connection reset by peer]
deavmi has joined #crystal-lang
zorp has quit [Ping timeout: 260 seconds]
psydroid has quit [Ping timeout: 268 seconds]
psydroid has joined #crystal-lang
teardown has quit [Ping timeout: 240 seconds]
teardown has joined #crystal-lang
f1reflyylmao has joined #crystal-lang
f1refly has quit [Ping timeout: 272 seconds]
chachasmooth has quit [Ping timeout: 256 seconds]
chachasmooth has joined #crystal-lang
avane has quit [Quit: ZNC - https://znc.in]
avane has joined #crystal-lang
chachasmooth has quit [Ping timeout: 256 seconds]
chachasmooth has joined #crystal-lang
_ht has joined #crystal-lang
foxxx0 has joined #crystal-lang
<foxxx0> does the Array#map combined with #any? or #all? support early-abort? e.g. I have something like my_array.map { |x| some_bool_expr(x) }.any? or .all? at then end. will it return `true` for .any? at the very first intermediate map result that evaluates to true? and likewise will it return `false` for .all? at the very first intermediate result that evaluates to false?
<foxxx0> or does it need to compute all intermediate results of the .map call?
<Andriamanitra> foxxx0: no, it first does the mapping, but you can call "break" inside the #map block
<foxxx0> okay, i'll try that
<Andriamanitra> also if you're not actually using the results of the #map you can just use #any? or #all? with a block
<foxxx0> oh really?
<foxxx0> and that will already return early then?
<Andriamanitra> yes
<foxxx0> sweet, i'm gonna give these a try and play with them. thanks!
<foxxx0> thanks, #any? / #all? with a block is exactly what i was looking for! :)
<FromGitter> <erdnaxeli:cervoi.se> is there a way to print many variable on a line?
<FromGitter> <Aaron-JM> Hey everyone, im currently facing the following error: fun redefintion with different signature. I have two functions in C code with thr sam
<FromGitter> <erdnaxeli:cervoi.se> puts/p a, b, c prints them on separated lines
<FromGitter> <Aaron-JM> The same identifier*
<Andriamanitra> i use puts [a, b, c]
<Andriamanitra> it's close enough for my needs
<FromGitter> <erdnaxeli:cervoi.se> good idea, thanks!
<foxxx0> is it possible to "rewind" an iterator back to the beginning / initial state?
<FromGitter> <naqvis> no, `Iterators` are forward only.
<Andriamanitra> depending on what exactly you're trying to achieve there's likely a better way, for example #cycle might be something to look at
<foxxx0> me, maybe allocating it as an array might actually be a good idea. i want to split the work to multiple fibers in parallel and need to know the size beforehand to equally distribute the chunks
<foxxx0> so looks like i need .to_a anyways
zorp has joined #crystal-lang
HumanG33k has quit [Remote host closed the connection]
HumanG33k has joined #crystal-lang
<FromGitter> <Blacksmoke16> https://crystal-lang.org/api/master/Iterator.html#chunk(reuse=false,&block:T-%3EU)forallT,U-instance-method
f1reflyylmao has quit [Quit: bye fags]
f1refly has joined #crystal-lang
<Andriamanitra> this doesn't seem right https://play.crystal-lang.org/#/r/a4dn
<FromGitter> <Blacksmoke16> pretty sure `m` is never going to be nil, but a specific capture group mght
<FromGitter> <Daniel-Worrall> m is nil if there's no match
<FromGitter> <Blacksmoke16> fair enough
<Andriamanitra> yeah but inside that block it can't be nil.. i guess the compiler isn't smart enough to know that it in this case it can't ever have nil groups here
<FromGitter> <Daniel-Worrall> It's always [] of String?
<FromGitter> <Daniel-Worrall> so you'll need to `not_nil!` as neccesary it seems
<FromGitter> <Blacksmoke16> > # When this regex has an optional group, result array may contain ⏎ ⏎ #a `nil` if this group is not matched.
<FromGitter> <Daniel-Worrall> It's incase you have an optional match, yea
<FromGitter> <Daniel-Worrall> That's a chonky text o.o
<FromGitter> <tenebrousedge> `not_nil!` or `try`
<FromGitter> <Blacksmoke16> quote picked up the `#` from the comments :p
krobin has quit [Quit: brb]
_ht has quit [Remote host closed the connection]
<FromGitter> <jrei:matrix.org> so much better to use the Element mobile app instead of Gitter :)
<straight-shoota> IRC is nice, too =)
<FromGitter> <jrei:matrix.org> IRC has done its time. There are less and less people using it (but still a lot)
<FromGitter> <jrei:matrix.org> at least reduced by half since the last 20 years
<straight-shoota> but it works
<FromGitter> <jrei:matrix.org> hopefully, other solutions don't?
<straight-shoota> sure, more modern ones do work as well.
<straight-shoota> but something that works, doesn't really need replacement
<straight-shoota> even if it's old
<raz> nothing beats IRC
<FromGitter> <jrei:matrix.org> It is really nice to chat to IRC through ELement now. It was always a pain to access to IRC
<straight-shoota> why pain?
<FromGitter> <jrei:matrix.org> I need the captcha, then a confirmation mail, then there were some other boring stuff to prevent bots
<raz> irc clients still suck. but i can conveniently follow and chat in two dozen unrelated channels here over years. and all important communities are still primarily on IRC.
<FromGitter> <jrei:matrix.org> The Element client, in which you can chat to Freenode channels, is so much easier to start using
<raz> ah gonna look into it. i want to like matrix. but the whole bridging is a pita
<FromGitter> <jrei:matrix.org> why, no?
<raz> e.g. i can't autocomplete your name because you talk through a bot
<raz> or two bots even...
<FromGitter> <jrei:matrix.org> tested, it works
<FromGitter> <jrei:matrix.org> they have much improved the clients since Riot.im :)
<raz> well maybe for you, but not for us on irc
<raz> FromGitter <jrei:matrix.org> tested, it works
<FromGitter> <jrei:matrix.org> you know, Element has nothing to do with this bot
<FromGitter> <jrei:matrix.org> that's the Crystal community one
<raz> well, it goes through matrix, which apparently goes through gitter somehow
<FromGitter> <jrei:matrix.org> Gitter and Matrix are binded yes. And this is a Gitter bot made in Crystal (Critter I think?)
<raz> hmm looks like matrix has a direct irc bridge now
<raz> try joining #freenode_#crystal-lang:matrix.org
<FromGitter> <jrei:matrix.org> yes I already done it.
<raz> i think that should remove the gitter nonsense from your posts ;)
<FromGitter> <jrei:matrix.org> but now I have a `err_needreggednick` error :/
<raz> that's why i like irc. none of that stuff. ¯\_(ツ)_/¯
<FromGitter> <jrei:matrix.org> I prefer to talk there than the IRC channel
<FromGitter> <jrei:matrix.org> if has a lot more features. Here it is limited by Gitter, the other by IRC
<raz> that's the other thing i like about irc. no features. :)
<FromGitter> <jrei:matrix.org> I don't know, because then we need other solution to call, and even send files/images
f1refly has quit [Quit: bye fags]
f1refly has joined #crystal-lang