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
f1reflyylmao has joined #crystal-lang
f1refly has quit [Ping timeout: 256 seconds]
f1reflyylmao is now known as f1refly
chachasmooth has quit [Ping timeout: 256 seconds]
chachasmooth has joined #crystal-lang
f1refly has quit [Ping timeout: 265 seconds]
chachasmooth has quit [Ping timeout: 265 seconds]
chachasmooth has joined #crystal-lang
where_is_x has joined #crystal-lang
where_is_x has quit [Quit: Connection closed]
where_is_x has joined #crystal-lang
_ht has joined #crystal-lang
where_is_x has quit [Quit: Quit]
where_is_x has joined #crystal-lang
mps has joined #crystal-lang
<FromGitter> <HertzDevil> 1) 0 should bring back crystal-lang/crystal#10214
hendursa1 has joined #crystal-lang
hendursaga has quit [Ping timeout: 268 seconds]
<FromGitter> <asterite> Definitely
<FromGitter> <asterite> There should be no difference between types and type restrictions. Or we should find another syntax for restrictions
<mps> my congratulation for 1.0 release
<mps> I hope now all tests will pass on musl libc
<FromGitter> <HertzDevil> thinking if `while x; ...; end` and `while true; break unless x; ...; end` are always equivalent
<FromGitter> <HertzDevil> the latter is way easier to reason about
<mps> yes, imo
<mps> though may depend on context
<FromGitter> <HertzDevil> what are the contexts in which the two aren't equivalent
<FromGitter> <HertzDevil> well strictly speaking, `while true; unless x; break; end; ...; end`
<mps> khm, I answered on wrong channel
<mps> but when I already started, 'while x' is more appropriate in counting while 'while true' in 'eventing' (so to say), I feel
<FromGitter> <HertzDevil> i'm referring mainly to their semantics
<FromGitter> <HertzDevil> most importantly, scoping and type inference
<mps> aha, I read it 'in general' (and as wrote my first answer was on wrong channel)
<mps> uh, even 1.0.0 failed compiler test on aarch64 and musl libc, runs subcommand in preference to a filename Invalid memory access (signal 11) at address 0xfff6f096a2d8
<mps> so, if it pass this on M1 then it is not arm64 problem related but musl related, tend to think
<straight-shoota> mps, yeah there are still some issues with aarch64 and musl (independently) unfortunately
<mps> straight-shoota: yes, and I'm not sure is it related to musl or gc (boehm GC)
<mps> because on x86_64 it segfaults in one specific spec (didn't noted which one) but on aarc64 it segfaults at the compiler spec
DTZUZU has quit [Read error: Connection reset by peer]
DTZUZU has joined #crystal-lang
<straight-shoota> I think x86_64 fails on different locations
<mps> yes
andremedeiros has quit [Read error: Connection reset by peer]
DTZUZU has quit [Ping timeout: 245 seconds]
<mps> this morning I tried 1.0.0 on x86_64, but had to delete build log because need to do some urgent fixes on other package
andremedeiros has joined #crystal-lang
<mps> will try to find some time this evening and upload build log somewhere for reference, probably on dev.alpinelinux.org/~mps/
postmodern has joined #crystal-lang
<FromGitter> <asterite> @HertzDevil oh, that's a great observation. It means there would be no special logic needed for the "while condition". I think right now there are some issues with it. I think the two snippets should be equivalent. Or... try it, and if all the compiler and std specs pass, there's a really high chance they are equivalent :-)
DTZUZU_ has joined #crystal-lang
<dfdx> hi everyone. I just started looking into Crystal yesterday because of the post on the HN frontpage yesterday. Looks really cool. One question I haven't been to answer yet is on whitespace -- is it enforced? Or could I, for example, put this all on one line: class CurrencyConversion def initialize(@amount, @target_currency) end
<dfdx> The only thing on whitespace I found was on style, but I don't know if its mandatory for the compiler: https://crystal-lang.org/reference/conventions/coding_style.html#whitespace
<FromGitter> <Blacksmoke16> you *could* but im pretty sure the formatter would change it
<FromGitter> <Blacksmoke16> can use `;` to represent a line break
<dfdx> I see. Thanks for the quick reply.
sorcus has joined #crystal-lang
<hightower2> Hey where's the online version of those new tutorial lessons?
<straight-shoota> it's not merged yet, preview at https://straight-shoota.github.io/crystal-book/feature/tutorials-initial/
<hightower2> great, thanks!
<FromGitter> <djberg96> I have to learn Golang for work. I really wish I could be using Crystal instead!
<hightower2> from your mouth to God's ears!
<FromGitter> <naqvis> golang isn't that awful ๐Ÿ˜„
<FromGitter> <Daniel-Worrall> Crystal is just that good
<FromGitter> <YanHuaSuiMei> Up Up Up, Crystal! Developers are good!
<FromGitter> <djberg96> @naqvis it still feels very old school. not as ugly as C, but still ugly.
<FromGitter> <djberg96> plus, i thought we were past pointer vs ref, but apparently not
<FromGitter> <djberg96> no default arguments :(
<FromGitter> <djberg96> manual error checking :(
sorcus has quit [Quit: WeeChat 3.1]
sorcus has joined #crystal-lang
postmodern has quit [Quit: Leaving]
<straight-shoota> @HertzDevil Still got https://github.com/crystal-lang/crystal-book/pull/464 on your radar?
Welog has quit [Ping timeout: 246 seconds]
Flipez has quit [Ping timeout: 245 seconds]
fifr` has quit [Ping timeout: 265 seconds]
Flipez has joined #crystal-lang
MassimilianoBert has quit [Ping timeout: 268 seconds]
SuperFamicom[m] has quit [Ping timeout: 258 seconds]
skrzyp has quit [Ping timeout: 265 seconds]
skrzyp has joined #crystal-lang
fifr` has joined #crystal-lang
Welog has joined #crystal-lang
vasanth has joined #crystal-lang
SuperFamicom[m] has joined #crystal-lang
vasanth is now known as hallucinations
hallucinations is now known as vasanth
vasanth has quit [Quit: WeeChat 3.1]
vasanth has joined #crystal-lang
vasanth has quit [Quit: WeeChat 3.1]
vasanth has joined #crystal-lang
<FromGitter> <RespiteSage> Is there a good way of getting `crystal docs` output to have links to types in the standard library docs?
<FromGitter> <riffraff169> 1) 0 yay!
<FromGitter> <oprypin:matrix.org> aand the shardgate is here ๐Ÿ˜‚
<FromGitter> <oprypin:matrix.org> https://forum.crystal-lang.org/latest 2 topics so far that shards just don't want to install
<FromGitter> <MrSorcus> https://www.opennet.ru/opennews/art.shtml?num=54813 - someone write article in russian about 1.0 release ๐Ÿ˜„
duane has quit [Read error: No route to host]
<yxhuvud> so, what does "Error in shard.yml: Missing resolver for dependency "crystal" at line 20, column 3" actually mean?
<FromGitter> <oprypin:matrix.org> yxhuvud, uhhhh can you provide the shard.yml and the versions
<FromGitter> <oprypin:matrix.org> i suspect that this happens when you wrote it nested like `dependencies: crystal:` but actually it's just `crystal:`
<yxhuvud> seems to be. Hmm. Do you see anything in https://github.com/yxhuvud/ior/blob/master/shard.yml that would block installation? I get No shard.yml was found for shard "ior" at commit 63fe85562673fbe, but that commit literally only contains a change to shard.yml
<FromGitter> <Blacksmoke16> shouldnt the repo have tags for the version?
<yxhuvud> it worked to install in the previous version at 209260a
<straight-shoota> yxhuvud, that shard.yml is invalid
<straight-shoota> you need to put the version in restriction in quotes
<yxhuvud> I see. thanks.
<FromGitter> <alexherbo2> is there a cross platform way to play system bell sound?
<FromGitter> <alexherbo2> on linux there is libcanberra and mac cocoa
duane has joined #crystal-lang
<FromGitter> <hugopl> if it's a terminal application, printing `"\a"` does that IIRC, and my guess is that it also works on windows.
<mps> puts "\7" also
<hightower2> \g
<hightower2> echo -ne \\g
<hightower2> sorry wrong lines :)
<FromGitter> <riffraff169> hmm, im getting a weird error with 1.0 that worked with at least 0.35.0 i think, ill downgrade and test
<FromGitter> <Blacksmoke16> be better if you shared the error
<FromGitter> <riffraff169> yes, im doing a quick test on an older version, then will provide my git repo
<FromGitter> <riffraff169> okay, just did a test, builded proprely with 0.35.1, failed with 0.36.0...here is git repo
<FromGitter> <riffraff169> just do a git clone, and a make
<FromGitter> <riffraff169> should compile cleanly
<FromGitter> <Blacksmoke16> but whats the error
<FromGitter> <riffraff169> ah, let me scroll up
<FromGitter> <riffraff169> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=605a390aa7dfe1372ef201fa]
<FromGitter> <Blacksmoke16> oof
<vasanth> Does Crystal have a port of Ruby's Object#method yet? Is there a way to find the source location of a method in Crystal?
<FromGitter> <Blacksmoke16> not at runtime
<straight-shoota> vasanth, what's your use case?
<FromGitter> <roduquen> Hey all
<straight-shoota> runtime reflection is limited in Crystal because being compiled...
<FromGitter> <roduquen> I have a big problem with new crystal version, the bintray stable image has changed
<FromGitter> <roduquen> Anyone knows how can I force bintray image to be in 0.36.1 ?
<FromGitter> <Blacksmoke16> cant just use `1.0.0`?
<FromGitter> <roduquen> none of my lib works with 1.0.0
<FromGitter> <roduquen> And I have 8 servers I will not change now
<FromGitter> <Blacksmoke16> due to deprecations, or when trying to install shards
<FromGitter> <roduquen> shards install
<FromGitter> <Blacksmoke16> try using `--ignore-crystal-version` until your deps are updated, or you migrate off them
<FromGitter> <roduquen> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=605a3bd228e6153d723b70ff]
<FromGitter> <Blacksmoke16> kemal just released a new version for `1.0.0`, prob just gotta upgrade it
<straight-shoota> older relases should be available in the bintray channel
<FromGitter> <roduquen> I launched my prod yesterday and my boss is like angry as fuck
<FromGitter> <roduquen> I ll try
<FromGitter> <roduquen> I use it yep
<FromGitter> <roduquen> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=605a3c6d3b9278255bcb5c3f]
<straight-shoota> I don't know how dnf works, but rpm packages are also available
<FromGitter> <roduquen> I don't know how I change package I search and try to change stable to 0.36.1 but didn't work
<straight-shoota> Just tell DNF wich version you want. I don't know how that works, though, but surely there is a way...
<FromGitter> <roduquen> I guess it is not the way
<straight-shoota> if nothing works you can just grab the .rpm directly from bintray or github release
<FromGitter> <roduquen> I'll not lie I don't really know how works this docker I just use the one we paid a devops to do and then copy paste from the web the little changes that had to be done
<FromGitter> <roduquen> for local I use this lol โŽ โŽ ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=605a3db7bc554b42d61c8e15]
<FromGitter> <roduquen> I ll try with no version check
<FromGitter> <roduquen> if it doesn't work I ll have to work on the docker
<FromGitter> <roduquen> thanks anyway
<FromGitter> <ezrast_gitlab> I think you can change `dnf install crystal` to `dnf install crystal-0.36.1`. Works for me noodling around in `centos:latest` from the command line anyway.
f1refly has joined #crystal-lang
<vasanth> straight-shoota, I am trying to start looking into the internals of Crystal to understand the language more. I am trying to figure out how basic things like the equivalents of Ruby's Module#include and Module#extend are implemented in Crystal.
<FromGitter> <Blacksmoke16> is where it happens at least
<f1refly> good job on hackernews today guys
<f1refly> I think you got a hell of a lot exposure
<vasanth> Thanks!
<FromGitter> <Blacksmoke16> however there are somethings crystal doesnt have, e.g. `Object#send` being the main one
<straight-shoota> on time with Crystal 1.0 my mouse died :(
<straight-shoota> it was 10 years old
<straight-shoota> So I don't have any fresh experience. Any advise on a good replacement? I was thinking just to grab the same Logitech M500 or upgrade to an MX Master...
<FromGitter> <erdnaxeli:cervoi.se> the mx master is nice, if you accept a bluetooth device that need to be charged
<straight-shoota> but they're holding out quite long these days, right?
<FromGitter> <roduquen> > I think you can change `dnf install crystal` to `dnf install crystal-0.36.1`. Works for me noodling around in `centos:latest` from the command line anyway. โŽ โŽ Thanks man
<FromGitter> <oprypin:matrix.org> straight-shoota, i use Logitech G203. very high quality and no frills
<FromGitter> <Daniel-Worrall> Just recently bought a SS rival 310. Very solid. Bit of a gamer. Personally, I recommend going in store and feeling the mice, but 'rona.
sorcus has quit [Ping timeout: 240 seconds]
<straight-shoota> Well, stores are actually open again here in Germany. You just have to make an appointment.
<FromGitter> <erdnaxeli:cervoi.se> yes, I am not sure but maybe two weeks?ย that's long enough so Iย forget ^^
<FromGitter> <erdnaxeli:cervoi.se> maybe one month
<FromGitter> <erdnaxeli:cervoi.se> I really don't know
<straight-shoota> recharging over USB also seems nicer than switching AAA batteries on the MS Bluetooth Mouse I had before
<FromGitter> <RespiteSage> I recently got the Logitech M720. It's definitely the nicest wireless mouse I've ever used; uses batteries, but makes it really easy to switch between the one USB dongle input and the two bluetooth inputs.
<FromGitter> <Daniel-Worrall> stores may be open, but whether or not you're able to touch the stock is another question
<FromGitter> <Daniel-Worrall> Also, wireless mice are fantastic these days. I don't trust them for fps games yet though
<straight-shoota> true. but it seems the sanitziation madness is over
<FromGitter> <erdnaxeli:cervoi.se> I though `{{debug}}` was outputing a formatted version on my macro generated code, but it isn't anymore
<mps> straight-shoota: here is build log on aarch64 https://dev.alpinelinux.org/~mps/crystal-1.0.0-aarch64.build.log
<FromGitter> <erdnaxeli:cervoi.se> is there a way to get the output formatted?
_ht has quit [Remote host closed the connection]
vasanth has quit [Ping timeout: 265 seconds]
DTZUZU has joined #crystal-lang
DTZUZU_ has quit [Read error: Connection reset by peer]
DTZUZU has quit [Ping timeout: 265 seconds]
<straight-shoota> yeah, {{ debug }} should be formatted again
<straight-shoota> mps, what's weird is that from the printed output it looks like the error happens between examples
<straight-shoota> `considers first the one with more arguments` is printed twice, but the next one isn't
<FromGitter> <erdnaxeli:cervoi.se> well, it is definitively not formatted :(
<mps> straight-shoota: yes, and segfaults happens at different 'points' when run again, looks like at random places
<straight-shoota> so it might the a similar codegen failure as on x86_64
<mps> yes, I think so
<mps> but don't have time now to run it on x86_64, will try tommorrow
<straight-shoota> interestingly the latest runs of test_alpine on CI seem to be successfull pretty consistently
<mps> ahh, could be because I didn't build 0.36.1 static to use it for building 1.0.0
<mps> still using 0.35.0 static for building
hendursa1 has quit [Quit: hendursa1]
hendursaga has joined #crystal-lang
<FromGitter> <636f7374> abstract + Serializable + useless property = Invalid memory access #10541
<DeBot> https://github.com/crystal-lang/crystal/issues/10541 (abstract + Serializable + useless property = Invalid memory access)
<FromGitter> <636f7374> Hi guys, I triggered another bug again. :)
<FromGitter> <636f7374> Maybe there should be a better title.
<FromGitter> <asterite> It's okay, thank you! It was a duplicate
<FromGitter> <asterite> Straight-shoota so your mouse was as old as Crystal... :-)
<straight-shoota> Probably older. Was just a guesstimate.