ChanServ changed the topic of #crystal-lang to: The Crystal programming language | | Fund Crystal's development: | GH: | Docs: | Gitter:
<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> <> If it was a LLVM regression, it would have been fixed in LLVM 11.1.0
<FromGitter> <> I tried with LLVM 12.0, but got:
<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 "" and then write puts "Hello World!" in it. I can run it with "crystal" 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" and it said "Error target 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` 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):
<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> <> @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> <> 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> <> @Luj8n: how do you know it's wrong, what are u using?
<FromGitter> <> 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> <> straight-shoota, arch linux uses OpenVSX and theres only one
<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> <> 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> <> 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> <> 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> <> @Luj8n: 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> <> Has anybody tried bootstrapping Crystal from scratch?
<FromGitter> <> 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> <> On what platform did you do it and how long did it take?
<FromGitter> <> i didnt do it
<FromGitter> <> ah, you just know *someone* did, I see 🙂
<FromGitter> <> deiv: How did your bootstrapping go?
<FromGitter> <>
<FromGitter> <> & no "deiv" in IRC now
<FromGitter> <> 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> <> 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> <> oh? from what is it bootstrapped?
<straight-shoota> ruby
<FromGitter> <> ah. Yeah, makes sense 🙂
<FromGitter> <> any idea roughly how long it takes to go from scratch to the last release on a modern machine? Hours? Days? Weeks?
<FromGitter> <> also, kudos to the crystal project for not only thinking about bootstrap, but also having a script for it!
* FromGitter * rolls eyes at Rust
<straight-shoota> hm it has 160 stages, so maybe 2 days or so?
<FromGitter> <> js ( maybe u gotta find this person;
<straight-shoota> that's a high estimate because I don't know about early stage performance
<straight-shoota> probably less
<FromGitter> <> oof. So definitely not something you want a regular user to do.
<straight-shoota> no, definitely not
<FromGitter> <> 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> <> ☹️
<straight-shoota> I don't see how that would be useful
<FromGitter> <> 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> <> that requires a system supported by Crystal to start with 🙂
<FromGitter> <> 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> <> 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> <> yep 🙂
<FromGitter> <> 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> <> we do the same for Rust
<FromGitter> <> which is *insane* to bootstrap
<FromGitter> <> (compilation time of weeks)
<straight-shoota> oh, and I thought Crystal was slow :D
<FromGitter> <> nah, Crystal at least *thought* about bootstrap
<FromGitter> <> so you can skip a few releases
<FromGitter> <> for Rust, you need to basically compile every single release after they rewrote the compiler in Rust
<FromGitter> <> and they did a release every 2 weeks
<FromGitter> <> and compiling Rust itself takes 1h+ on a modern machine already
<straight-shoota> I don't think crystal boostrap skips any releases
<FromGitter> <> 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> <> 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> <> and they have recently achieved ABI stability even
<FromGitter> <> 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 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> <> i have no idea why there arent official binaries
<straight-shoota> there are docker images at
<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)