Readit News logoReadit News
tekknolagi commented on Type-based alias analysis in the Toy Optimizer   bernsteinbear.com/blog/to... · Posted by u/chunkles
tekknolagi · 21 days ago
Oh hi! Thanks for posting. As I wrote this I wasn't sure if it was enough of a post. Let me know if you wanted to hear about anything else that seemed missing.
tekknolagi commented on SectorC: A C Compiler in 512 bytes (2023)   xorvoid.com/sectorc.html... · Posted by u/valyala
einpoklum · a month ago
An interesting use case - for the compiler as-is or for the essentiall idea of barely-C - might be in bootstrapping chains, i.e. starting from tiny platform-specific binaries one could verify the disassembly of, and gradually building more complex tools, interpreters, and compiler, so that eventually you get to something like a version of GCC and can then build an entire OS distribution.

Examples:

https://github.com/cosinusoidally/mishmashvm/

and https://github.com/cosinusoidally/tcc_bootstrap_alt/

tekknolagi · a month ago
tekknolagi commented on Writing a Lisp JIT Interpreter with GraalVM Truffle   kyo.iroiro.party/en/posts... · Posted by u/todsacerdoti
tekknolagi · a month ago
As I said on Lobsters as well, this is a superb overview.
tekknolagi commented on Ask HN: Share your personal website    · Posted by u/susam
tekknolagi · 2 months ago
https://bernsteinbear.com

I write about programming languages and compilers

tekknolagi commented on T-Ruby is Ruby with syntax for types   type-ruby.github.io/... · Posted by u/thunderbong
dudeinjapan · 2 months ago
Two reasons.

First, YJIT/ZJIT do much better when they know the type signatures of methods. You pay a performance penalty for implicit polymorphism, e.g. using a mix of types (Integer, Symbol, String) etc in the same method argument.

Second, from my experience with Typescript, as much as I naturally dislike type declarations, I find it does help LLMs. Having strongly typed libs/gems and being able to mix in untyped app code would be a nice balance.

tekknolagi · 2 months ago
YJIT and ZJIT don't use method annotations.
tekknolagi commented on ZJIT is now available in Ruby 4.0   railsatscale.com/2025-12-... · Posted by u/ibobev
zingar · 2 months ago
I’m assuming that when you talk about crashing processes as the status quo you’re referring to earlier versions of zjit rather than current Ruby on yjit? Because I’ve never seen a Ruby process crash because + was called with different arguments.
tekknolagi · 2 months ago
Yes; see the first ZJIT blog post. https://railsatscale.com/2025-05-14-merge-zjit/
tekknolagi commented on ZJIT is now available in Ruby 4.0   railsatscale.com/2025-12-... · Posted by u/ibobev
aapoalas · 2 months ago
I'm a little sad to see YJIT go down in favour of a traditional design. (Yes, YJIT isn't "deprecated" but the people working on it are now mainly working on something else. That's hardly a great place to be in.)

I'm personally quite interested in trying out an LBBV JIT for JavaScript, following in Chevalier-Boisvert's Higgs engine's footsteps. The note about a traditional method JIT giving more code for the compiler to work with does ring very true, but I'd just like to see more variety in the compiler and JIT world.

Like: perhaps it would be possible to conjoin (say) an LBBV with a SoN compiler such that LBBV takes care of the quick, basic compilation and leaves behind enough data such that a SoN compiler can be put to use on the whole-method result once the whole method has been deemed hot enough? This is perhaps a totally ridiculous idea, but it's the kind of idea that will never get explored in a world with only traditional method JITs.

tekknolagi · 2 months ago
In that scenario, what would you hope to get out of the LBBV?
tekknolagi commented on ZJIT is now available in Ruby 4.0   railsatscale.com/2025-12-... · Posted by u/ibobev
ComputerGuru · 2 months ago
I guess I’m confused why an actual add instruction is emitted rather than whatever overloaded operation takes place when the + symbol (or overloaded add vtable entry) is called (like it would in other OOP languages).
tekknolagi · 2 months ago
If all you're doing is summing small integers---frequently the case---it's much preferable to optimize that to be fast and then skip the very dynamic method lookup (the slower, less common case)

u/tekknolagi

KarmaCake day1801October 6, 2011
About
[ my public key: https://keybase.io/tekknolagi; my proof: https://keybase.io/tekknolagi/sigs/3yeAq3H_gbqDnK8_Il6wEe8ncwrDEkYiZc0ld5NxGIE ]

https://bernsteinbear.com

email on website

View Original