Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 17:07
    straight-shoota milestoned #12800
  • 17:07
    straight-shoota milestoned #12800
  • 17:07
    straight-shoota milestoned #12773
  • 17:07
    straight-shoota milestoned #12773
  • 16:56
    HertzDevil labeled #12800
  • 16:56
    HertzDevil unlabeled #12800
  • 14:17
    HertzDevil labeled #12817
  • 14:15
    imsofi opened #12817
  • 14:15
    imsofi labeled #12817
  • 13:51
    straight-shoota milestoned #12784
  • 13:51
    straight-shoota milestoned #12784
  • 13:50
    straight-shoota milestoned #12808
  • 13:50
    straight-shoota milestoned #12808
  • 13:40
    HertzDevil synchronize #12784
  • 13:39
    HertzDevil ready_for_review #12784
  • 13:26
    straight-shoota milestoned #12816
  • 13:26
    straight-shoota milestoned #12816
  • 12:54
    straight-shoota synchronize #12816
  • 10:19
    straight-shoota ready_for_review #12802
  • 10:19
    straight-shoota edited #12802
Ali Naqvi
@naqvis
:smiley: no worries
Ali Naqvi
@naqvis
looking at the date of that article and date they ran the investigation benchmarks, Crystal might only be just known to manas tech :shrug:
moe
@moe:busyloop.net
[m]
also that looks like the silliest metric ever...
moe
@moe:busyloop.net
[m]

we're looking good here tho: https://www.techempower.com/benchmarks/#section=data-r21&test=composite

right in the middle (#48). sweet spot between enough performance to never worry
and enough convenience to actually enjoy work.

go and rust may still be faster when pushed.
but i'm plenty happy not having to deal with those monstrosities until
i actually need more than 100k reqs/sec on a single server (aka: never). 😊

From IRC (bridge bot)
@FromIRC
<Ober> so is it true cystal is written in crystal?
George Dietrich
@Blacksmoke16
yes
From IRC (bridge bot)
@FromIRC
<SamantazFox> Ober: lime many languages, the compiler is written in said language ^^
<SamantazFox> C/C++ compilers are written in C/C++, rustc is written in rust, the haskell compiler is written in haskell, and the crystal compiler is written in crystal
From IRC (bridge bot)
@FromIRC
<Ober> java is written in c++, ruby in c, etc.
From IRC (bridge bot)
@FromIRC
<SamantazFox> those aren't compiled languages ^^
From IRC (bridge bot)
@FromIRC
<riza> some of the Java JVMs are written in C++, and some of them are written in Java
j8r
@jrei:matrix.org
[m]
for python, there are compilers written in python
Lance Dillon
@riffraff169
the mark of a true language (ha) is when the language gets powerful enough that the compiler can be rewritten in itself
usually it starts out in c until it gets to the point it can be bootstrapped
just out of curiosity, i wonder when that point was? what version(s) did it switch from c to crystal? (assuming it started out in c)
George Dietrich
@Blacksmoke16
crystal was originally Ruby
Wayne Walker
@wwalker

I'm trying to build for amazon linux 2 on aarch64. I tried to cross compile:

crystal  build src/slimer.cr --release --cross-compile --target aarch64-unknown-linux-gnu
  $ file slimer
slimer: ELF 64-bit LSB relocatable, ARM aarch64, version 1 (SYSV), not stripped
  $ ll slimer
-rwxr-xr-x 1 waywalke waywalke 4829648 2022-11-23T22:28:49.323897648 slimer
  $ ./slimer
-bash: slimer: cannot execute binary file

My searches lead me to believe I can't compile on aarch64 at all.

Anyone know for sure?

George Dietrich
@Blacksmoke16
did you run the commands outputted via the cross complication? afaik it should emit some files and a command to run on the aarch system
Wayne Walker
@wwalker
ah! No. (stupid newbie's should pay attention to the docs...)
George Dietrich
@Blacksmoke16
:thumbsup:
that would do it
Wayne Walker
@wwalker
Well, maybe not. That requires that I have /usr/lib64/crystal on the aarch64 machine. If I had crystal on the aarch64, I wouldn't be cross compiling :-(
George Dietrich
@Blacksmoke16
you sure? my understanding of cross compiling was its already compiled and it just needs linked on the target system
Wayne Walker
@wwalker
It has me run this:
cc slimer.o -o slimer  -rdynamic -L/usr/lib64/crystal -lxml2   -lz \
  `command -v pkg-config > /dev/null && pkg-config --libs --silence-errors libssl || printf %s '-lssl -lcrypto'` \
  `command -v pkg-config > /dev/null && pkg-config --libs --silence-errors libcrypto || printf %s '-lcrypto'` \
  -lpcre -lm -lgc -lpthread -levent   -lrt -lpthread -ldl
George Dietrich
@Blacksmoke16
does it work if you just exclude the -L? pretty sure thats not actually the crystal binary, but the source of crystal libs
idk if that's expected or not, feels a bit weird its there...?
Wayne Walker
@wwalker

@Blacksmoke16 it felt weird. And I was getting "not found" for libs that were installed. but now it builds fine.

Thanks! I was about to switch all 20 machines to x86_64 (that is the nice part of AWS EC2... :-)

George Dietrich
@Blacksmoke16
:shrug: huh
any reason to run on aarch64? amd64 would deff be easier ha
Wayne Walker
@wwalker
the same performance level server for aarch64 costs 80% of what the x86_64 servers cost...
George Dietrich
@Blacksmoke16
oof
yea thats a fair reason ha
Wayne Walker
@wwalker
yeah, I need to set up 300 machines. so it is the difference between 217,700 USD and 174,200 USD per month. $45,500 / month.
j8r
@jrei:matrix.org
[m]
You could also use qemu, compile statically and put it on the server
stellarpower
@stellarpower
Earthly can be useful for this stuff:
I think it has a way of latching into QEMU to do cross-compilation without as much effort as it often takes
moe
@moe:busyloop.net
[m]
you need to set up 300 machines with an app called slimer. do you work for the ghostbusters? 🤔
1 reply
stellarpower
@stellarpower
I might be being stupid; is there a nice way to pairwise multiply two arrays without doing a zip then a map?
It's actually called slimmer
It optimises
moe
@moe:busyloop.net
[m]
ok that sounds less exciting then :P
stellarpower
@stellarpower
And the sign of a good optimiser is when it optimises away redundant information in itso wn name
moe
@moe:busyloop.net
[m]
ha
Wayne Walker
@wwalker
earthly looks interesting!
moe
@moe:busyloop.net
[m]
if cost is a concern, have you considered hetzner tho? around $60k would buy you the same compute there. probably less.
5 replies
stellarpower
@stellarpower
I've been having a play. IT still suffers form some of the arseyness of dockerfile syntax.
But it's a step in the right direction at lweast
We wanna use it to get reproducible builds, across differnt people's machines, but then the ease of debugging in a local IDE for development work