r/Compilers • u/musicvano • Jun 01 '26
Programming Language Without LLVM
Is it possible to build a new system programming language without LLVM? Can language have simple syntax? What if a tiny compiler installs packages and compiles code fast?
0
Upvotes
2
u/ApprehensiveBag3083 Jun 01 '26
Syntax i like
only for x86 systems ? not arm ?
and what about memory allocation ?
2
u/Only-Archer-2398 Jun 01 '26 edited Jun 01 '26
Guys! You’re talking to someone who’s either making a mockery of us, clearly doesn’t know what they’re doing, or is a scam.
First, let’s read the article together:
Do you realize what this means?! Of course you'll get your 12K LoC/s speed that you're claiming. However, "Hello, world" tooks `57ms` based on your youtube video where the user has to download Std via `rux add Std`. Come On!?
Pipeline looks like this:
They built 10 separates stages for a compiler that doesn't even optimize register usage! They are translating the code 10 times over through intermediate trees, dumping it into a custom
.rcubinary blob, and then passing it to a custom linker.Now, let’s analyse the spec in more detail, because that’s where the devil is in the details:
int256,int512,uint256,uint256,bool8,bool16,bool256,bool512,float80,float256,float512,char256,char512What on earth are we talking about here?!
I'm not against AI and we are glad to help anybody, but please Don’t come spouting your nonsense slop at us.
Moderators WDYT?
2
u/Farados55 Jun 01 '26
How is this different from Carbon?
6
u/Interesting_Buy_3969 Jun 01 '26
Yes, but it's lots more difficult than with LLVM.
yes, I'd say it should. Whether it can or can't depends on the design.
I am going to assume that you mean it'll do it faster than a LLVM-based compiler. The ability to install packages does not depend on the LLVM API itself, so yes, this is where you have to do things without LLVM. As for compiling, I don't think it is realistically possible to outperform LLVM in both running-time and compile-time, if a single person or a small team develops the compiler.
4
u/Top-Employ5163 Jun 01 '26
Yes it's possible but way harder and anyway you need nasm or fasm for compiling asm to binary.
4
u/vmcrash Jun 01 '26
Yes, sure it is possible. And if you do it from the beginning until the end (ASM or exe) you will learn the most.
4
u/zsaleeba Jun 01 '26
I've just built a C compiler with it's own built-in assembler and linker. It literally needs nothing else to produce executables.
0
u/[deleted] Jun 01 '26
[deleted] — view deleted comment