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
<straight-shoota> Could be worth a shot, but until we understand the exact cause, we can't really be sure it's fixed in LLVM 12 because it could just be coincidence
<FromGitter> <asterite> I doubt it's an llvm bug, but maybe
<straight-shoota> llvm 12 support at least shouldn't be hard to implement, and it could help give more data
<FromGitter> <asterite> Btw it also reproduces in 11.1.0
<straight-shoota> oh, yeah I think you mentioned that. Did you do anything for that? I couldn't compile with 11.1
<FromGitter> <jrei:matrix.org> If it was a LLVM regression, it would have been fixed in LLVM 11.1.0
<FromGitter> <jrei:matrix.org> I tried with LLVM 12.0, but got: https://github.com/crystal-lang/crystal/issues/10434
<straight-shoota> ... if they know about it
<straight-shoota> and the bug already appears with LLVM 10, so it wouldn't be a regression in 11
<FromGitter> <lodenos> Actually I add a tiny number 1x10^-100 but ...
<FromGitter> <lodenos> How the BigDecimal was implemented ?
<FromGitter> <asterite> I added the versión to an llvm versions text file we have
teardown has quit [Ping timeout: 268 seconds]
teardown has joined #crystal-lang
aquijoule_ has joined #crystal-lang
richbridger has quit [Ping timeout: 240 seconds]
<FromGitter> <Blacksmoke16> just a heads up for anyone using the `snap` plugin, you need to manually add the `--release` flag
DTZUZU has quit [Read error: Connection reset by peer]
DTZUZU has joined #crystal-lang
<watzon> Anyone have an example of a github action handling automated releases for multiple platforms?
<FromGitter> <Blacksmoke16> oq has one for linux, mac would be pretty similar as well
<FromGitter> <Blacksmoke16> But only handles amd64
ua_ has quit [Ping timeout: 260 seconds]
ua_ has joined #crystal-lang
hendursa1 has joined #crystal-lang
hendursaga has quit [Ping timeout: 268 seconds]
_ht has joined #crystal-lang
deavmi has quit [Ping timeout: 272 seconds]
deavmi has joined #crystal-lang
ua_ has quit [Ping timeout: 256 seconds]
ua_ has joined #crystal-lang
<FromGitter> <Luj8n> Hi! Is anyone here?
<straight-shoota> yeah
<FromGitter> <Luj8n> First of all, I'm very new and want to learn Crystal.
<FromGitter> <Luj8n> The problem: I am on Arch (manjaro to be exact) and use Vscode with the "Crystal Language" extension. I have typed "shards init" and then "shards install". I create a file "start.cr" and then write puts "Hello World!" in it. I can run it with "crystal start.cr" and it works. But the extension shows "can't find file 'prelude'" error
<FromGitter> <Luj8n> Sorry if it's just me being dumb
<FromGitter> <Daniel-Worrall> You may need to configure your crystal install path
<FromGitter> <Daniel-Worrall> In the extension
<FromGitter> <Luj8n> hm. I just tried to run "shards build start.cr" and it said "Error target start.cr was not found in shard.yml."
<straight-shoota> `shards build` only works with targets specified in shard.yml
<FromGitter> <Luj8n> so that's not the problem
<straight-shoota> you shouldn't worry about that, IMO it's not very useful. You can just run `crystal build start.cr` instead
<straight-shoota> nope
<straight-shoota> Which extension are you using? Unfortunately, there are several. This one should be the best (and most up-to-date): https://marketplace.visualstudio.com/items?itemName=crystal-lang-tools.crystal-lang
<FromGitter> <Luj8n> > You may need to configure your crystal install path ⏎ ⏎ how should i get the path
<straight-shoota> `crystal env` shows the paths
<FromGitter> <oprypin:matrix.org> @Luj8n: the path is just `crystal` and it should be the default so that's probably not it
<FromGitter> <Luj8n> > *<straight-shoota>* `crystal env` shows the paths ⏎ ⏎ oh
<FromGitter> <Luj8n> whoops
<FromGitter> <Luj8n> wrong quote
<FromGitter> <oprypin:matrix.org> can u go to extension settings to make sure nothing is messed up
<FromGitter> <Luj8n> > can u go to extension settings to make sure nothing is messed up ⏎ ⏎ yeah, im using the wrnog extension
<FromGitter> <Luj8n> ill try with the new
<FromGitter> <oprypin:matrix.org> @Luj8n: how do you know it's wrong, what are u using?
<FromGitter> <oprypin:matrix.org> also *how* are you using the wrong extension, there should be only one
<straight-shoota> oprypin, the most-popular VS Code extension by Faustino hasn't been updated in a year
<FromGitter> <oprypin:matrix.org> straight-shoota, arch linux uses OpenVSX and theres only one https://open-vsx.org/?search=crystal&category=&sortBy=relevance&sortOrder=desc
<straight-shoota> but everyone installs that because it has like 22k installs
<FromGitter> <Luj8n> Thanks! It works now
<FromGitter> <Luj8n> > *<straight-shoota>* but everyone installs that because it has like 22k installs ⏎ ⏎ Yeah, i did exactly that
<FromGitter> <oprypin:matrix.org> oh you're probably not using Code - OSS, are you ...
<FromGitter> <Luj8n> Yeah, not on this computer. So there is a real difference?
<FromGitter> <Luj8n> I though that is was just like not microsoft's or something
<FromGitter> <Luj8n> *thought
<FromGitter> <oprypin:matrix.org> yea just not sending all infos to Microsoft and getting updates as part of normal system updates
<FromGitter> <Luj8n> Is there any good learning material?
<FromGitter> <oprypin:matrix.org> but nevermind, switching to the weird open marketplace is another side effect from it, and it's not for everyone
<FromGitter> <Luj8n> I know js, some c#, some c++, sql
<FromGitter> <oprypin:matrix.org> @Luj8n: https://crystal-lang.org/reference/ is good. it will not inspire you with amazing ideas but it's good to read first in any case
<FromGitter> <Luj8n> Ok, thanks!
<FromGitter> <js:nil.im> Has anybody tried bootstrapping Crystal from scratch?
<FromGitter> <oprypin:matrix.org> yes
<FromGitter> <Daniel-Worrall> > --lto=thin: Use ThinLTO, improving performance on release builds. ⏎ Is this still a thing?
<FromGitter> <Daniel-Worrall> It sounds like a good thing, though I've never seen anyone use it
<FromGitter> <js:nil.im> On what platform did you do it and how long did it take?
<FromGitter> <oprypin:matrix.org> i didnt do it
<FromGitter> <js:nil.im> ah, you just know *someone* did, I see 🙂
<FromGitter> <js:nil.im> deiv: How did your bootstrapping go?
<FromGitter> <oprypin:matrix.org> https://github.com/crystal-lang/bootstrap-script
<FromGitter> <oprypin:matrix.org> & no "deiv" in IRC now
<FromGitter> <js:nil.im> I'm aware of this script. I'm looking into adding crystal to pkgsrc, and if it's feasible to have an entire bootstrap from C++
<straight-shoota> not from C++
<FromGitter> <js:nil.im> it think it will probably be best to have a crystal package that can be compiled if you have a crystal compiler already, and a crystal-bootstrap that bootstraps it from C++, to avoid bootstrapping from scratch on every update
<FromGitter> <js:nil.im> oh? from what is it bootstrapped?
<straight-shoota> ruby
<FromGitter> <js:nil.im> ah. Yeah, makes sense 🙂
<FromGitter> <js:nil.im> any idea roughly how long it takes to go from scratch to the last release on a modern machine? Hours? Days? Weeks?
<FromGitter> <js:nil.im> also, kudos to the crystal project for not only thinking about bootstrap, but also having a script for it!
* FromGitter * js:nil.im rolls eyes at Rust
<straight-shoota> hm it has 160 stages, so maybe 2 days or so?
<FromGitter> <oprypin:matrix.org> js (https://matrix.to/#/@js:nil.im): maybe u gotta find this person https://freenode.irclog.whitequark.org/crystal-lang/2019-01-08#23835665;
<straight-shoota> that's a high estimate because I don't know about early stage performance
<straight-shoota> probably less
<FromGitter> <js:nil.im> oof. So definitely not something you want a regular user to do.
<straight-shoota> no, definitely not
<FromGitter> <js:nil.im> Are there any plans to make bootstrapping easier in the future? E.g. have a patched ruby that accepts crystal code that can be used to bootstrap?
<straight-shoota> no
<FromGitter> <js:nil.im> ☹️
<straight-shoota> I don't see how that would be useful
<FromGitter> <js:nil.im> if you only live in a Linux/amd64 world, not too much. But if you want to use something else, there's a lot of use 😉
<straight-shoota> you can just cross-compile
<straight-shoota> I understand the main use case of boostrapping is to build a binary from a trusted source
<FromGitter> <js:nil.im> that requires a system supported by Crystal to start with 🙂
<FromGitter> <js:nil.im> e.g. if I want to port to NetBSD, using the Linux binary to bootstrap would most likely not be considered acceptable
<straight-shoota> well then you can bootstrap from Ruby
<straight-shoota> but you only need to do that once
<oprypin> if what's acceptable is based only on purity considerations, that's their problem
<FromGitter> <js:nil.im> but I agree, if there were already let's say trusted NetBSD/amd64 Crystal binaries, these could be used to bootstrap e.g. NetBSD/AArch64
<straight-shoota> as soon as you have a native compiler, you can use that for following builds
<FromGitter> <js:nil.im> yep 🙂
<FromGitter> <js:nil.im> oh well, it's do the bootstrap for each arch once and provide a bootstrap binary package, I guess 🙂
<straight-shoota> so users don't need to bootstrap
<FromGitter> <js:nil.im> we do the same for Rust
<FromGitter> <js:nil.im> which is *insane* to bootstrap
<FromGitter> <js:nil.im> (compilation time of weeks)
<straight-shoota> oh, and I thought Crystal was slow :D
<FromGitter> <js:nil.im> nah, Crystal at least *thought* about bootstrap
<FromGitter> <js:nil.im> so you can skip a few releases
<FromGitter> <js:nil.im> for Rust, you need to basically compile every single release after they rewrote the compiler in Rust
<FromGitter> <js:nil.im> and they did a release every 2 weeks
<FromGitter> <js:nil.im> and compiling Rust itself takes 1h+ on a modern machine already
<straight-shoota> I don't think crystal boostrap skips any releases
<FromGitter> <js:nil.im> oh? I got the impression it's not *all* releases looking at that script
<straight-shoota> but there are way fewer
<raz> i still don't get this hype around rust. yea, it's great for low-level stuff, but the manual mem mgmt is such a ball on the chain for anything beyond that :/
<FromGitter> <js:nil.im> I have to say that Swift found a nice middle ground - and it is bootstrappable from just a C++ compiler
<straight-shoota> it's even more. There are 105 git tags and 160 stages
<FromGitter> <js:nil.im> and they have recently achieved ABI stability even
<FromGitter> <js:nil.im> too bad that adoption outside of Apple is essentially 0
ua_ has quit [Ping timeout: 265 seconds]
ua_ has joined #crystal-lang
<FromGitter> <faustinoaq> Hi <straight-shoota> thank you for reaching out to me. Testing crystal again, this time on my raspberry pi, anyone knows if this repo http://public.portalier.com/raspbian/ is being updated ? Would be nice to install crystal on raspberry pi from an official repo :D right now I'm cross compiling from source to run it in my raspberry pi :)
<FromGitter> <oprypin:matrix.org> i have no idea why there arent official binaries
<straight-shoota> there are docker images at https://hub.docker.com/r/jhass/crysta
<FromGitter> <faustinoaq> +!
<FromGitter> <faustinoaq> +1
ua_ has quit [Ping timeout: 276 seconds]
ua_ has joined #crystal-lang
_ht has quit [Remote host closed the connection]
<watzon> Generated code and it's fucking massive. The massive number of abstract classes is an unfortunate necessity that I can't figure out how to get away from.
<straight-shoota> that looks more like condensed Java code than crystal
<straight-shoota> In general, abstract classes are unnecessary in Crystal. Especially when they don't even provide any behaviour of their own (like Java interfaces)