Hi @neuecc,
Do you know how to implement GetRef as instance method here:
public interface ITs<T> {
ref T GetRef(int index);
}
public struct Ts<T> : ITs<T> {
public T T0, T1;
public ref T GetRef(int i) {
switch (i) {
case 0: return ref T0; // ERROR CS8170
...
}
.@jdegoes is joining us at Effect Days 2026! 🇮🇹
John will speak at the conference and lead the first part of our hands-on workshop.
We're also excited to have @zivergetech on board as a Main Sponsor!
MONOMOON is my favorite game that I have played in this entire year of good indie games.
You explore and solve puzzles. If you liked the book of clues in Tunic, this is the first game to do a good job of following up on that (that I've seen!)
store.steampowered.com/app/3…
After YEARS of solo development, Fat Goblins is finally OUT NOW in Early Access on Steam!!!
16v16 castle battles where every hat is a different class, built from scratch in my own engine.
10% off for launch!
store.steampowered.com/app/2…#FatGoblins#indiegame#gamedev
In partnership with @PLAYISMJP, we're thrilled to announce Order of the Sinking Star is out now on Switch 2 & PlayStation 5 in Japan! 🧩
We’re excited for console players in Japan to jump into our massive puzzle adventure! 🎌
🌟 Get Order of the Sinking Star today > orderofthesinkingstar.com
Code optimization is absolutely fascinating.
When you multiply something by a constant (let's say 24), LLVM replaces multiplication (imul) with a combination of left shift (shl) and load effective address (lea)
Left shift by 3 is the same as multiplying by 8, load effective address does math of [base + index] in the brackets, and then stores its result.
All of this literally to save 1 cycle. Because imul takes 3 cycles, and shl and lea take 1 each.
And you can find tables with similar heuristics for a lot of different constants. These people who write optimizing compiler backends spend so much effort to save just one instruction, so don't throw it all away!
I just made a programming language doing exactly this. As many address-space-reserved huge stacks as the program statically needs, with bump alloc, stable pointers, all compile time safe and yet way faster than what you can do in C++/Rust: github.com/aardappel/goose
Meet TinyFFR: a real-time cross-platform 3D rendering lib for modern .NET that doesn't mess around.
Native AoT, SIMD math, PBR, FSR, SDF text, skeletal anims, multi-format 3D models, and drop-in UI support (Avalonia/WPF/WinForms/ImGui).
Check it out: hubs.li/Q04BtBnJ0