cranelift
MCHPRS
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
cranelift
-
Are there any static single assignment based languages that are higher level than IR? (expected to be written by your average programmer)?
(And then I'd turn them into normal BBs internally, since cranelift found out they're not that great for optimizing: https://github.com/bytecodealliance/cranelift/issues/796.)
-
Minecraft running on a redstone CPU/GPU implemented in Minecraft, running on a custom Minecraft server (written in Rust) capable of performing redstone calculations 10,000x faster than vanilla Minecraft
I was joking but thats almost what they are doing. Instead of using LLVM they're using cranelift for JITting
-
Replacing default codegen in rustc
Replace it with what, and why? There are codegen backends using Cranelift and GCC, but they are not feature complete yet.
-
Learning Clojure made me return back to C/C++
Thanks for taking the time to provide a detailed response. Need to think on this. I had actually started a regular Clojure parser using LLVM as a hobby, but then my friend said it was better to implement this in a safe-memory and. save-concurrency language like Rust and leverage cranelift for code generation. So, now I am learning rust, lol. (Btw, Rust has a persistent data structures lib too: https://github.com/orium/rpds )
- Open Discussion: To EBB or not to EBB
MCHPRS
-
A Minecraft server written in COBOL
A minecraft server isn't exactly a small side project. There are some in works for 3-5 years and they are not yet complete, some have very specific features (like https://github.com/MCHPR/MCHPRS which is meant for redstone showcases). This COBOL server doesn't yet implement lighting and that's one of the hardest parts since mob generation also depends on it. It also didn't fully implement some blocks. You need years to finish a minecraft server so getting something done fast isn't the best path along the way.
-
We built the best "Bad Apple!!" in Minecraft
> - Runs at 1 million ticks per second thanks to MCHPRS server - which is 5.8 kHz clock speed
I had to go look into this, because that's shockingly fast. The latest Intel CPUs have a 6.2 GHz clock rate when TVBing, so each Minecraft tick runs in ~1,000 CPU cycles. Each thread handles 65k surface blocks (256x256 plot), so that means each cycle is processing upwards of 10 surface cycles in the most lenient circumstances I can think of.
I went to go look into how on Earth they're doing that with all this Redstone around; there are some docs at [1] if anyone else is curious. It looks like they have some kind of Redstone "compiler" that converts the Redstone blocks into a graph, and execution happens on that graph.
That's crazy impressive. It does make using Minecraft feel a little silly, to me and perhaps only me. They have an input step where they basically parse the map, convert it to a graph that seems to resemble the AST of an LLVM IR, and then execute it. It makes Minecraft feel like a very awkward scripting language to me; why stack 16k Redstone cubes manually just so they can parse it into an IR instead of just scripting generating the IR or something like that?
1. https://github.com/MCHPR/MCHPRS/blob/master/docs/Redpiler.md
-
I don't know how CPUs work so I simulated one in code
The state of the art these days is https://github.com/MCHPR/MCHPRS
It's an implementation of the minecraft server that compiles redstone into a graph representation, and then does optimisations like constant folding, tree shaking, etc. Very cool project.
- Minecraft High-Performance Redstone Server
-
Can i make a minecraft mod with rust and what are the benefits?
You can compile redstone using Rust though, see https://github.com/MCHPR/MCHPRS and https://youtu.be/-BP7DhHTU-I
-
Am I wrong?
Someone made a Redstone JIT compiler.
-
Redstone Computer V2.1 Running Multiplication Algorithm
I don't know if you know about MCHPRS. It's a multi-threaded self-hosted MC Server made specifically for redstone. It gives you more control over redstone.
-
Minecraft - Rust Edition
https://github.com/MCHPR/MCHPRS (redstone only)
-
Will Rust become (more) High Level with time?
It sure is! https://github.com/MCHPR/MCHPRS
-
1Hz CPU made in Minecraft running Minecraft at 0.1fps with server imlemented in Rust
The relevant bit is https://github.com/MCHPR/MCHPRS and Rust snippet starting from 0:25
What are some alternatives?
rpds - Rust persistent data structures
ferium - Fast and multi-source CLI program for managing Minecraft mods and modpacks from Modrinth, CurseForge, and GitHub Releases
BrainJiT - Simple Brainf**k Just-in-Time compiler written in Kotlin (and also interpreter)
hematite - A simple Minecraft written in Rust with the Piston game engine
moodycamel - A fast multi-producer, multi-consumer lock-free concurrent queue for C++11
MinecraftHDL - A Verilog synthesis flow for Minecraft redstone circuits