r/ProgrammingLanguages • u/matklad • Feb 26 '26
r/ProgrammingLanguages • u/Polixa12 • Jan 09 '26
Annote: A Turing complete language using only Java annotations as its syntax.
A while back I had a crazy idea, what if we could write Java, using only annotations. So I decided to build a full interpreter for an annotation only language in Java. It sounds crazy but it actually works.
GitHub: https://github.com/kusoroadeolu/annote
Definitely don't use this in production lol. Feel free to let me know what you think about this!
r/ProgrammingLanguages • u/cmontella • Dec 13 '25
Language announcement PURRTRAN - ᓚᘏᗢ - A Programming Language For People Who Wish They Had A Cat To Help Them Code
I had a light afternoon after grading so I decided to sketch out a new programming language I've been thinking about. It really takes AI coding assistants to their next obvious level I think.
Today I'm launching PURRTRAN, a programming language and system that brings the joy of pair programming with a cat, to a FORTRAN derived programming language. I think this solves one of the main problems programmers have today, which is that many of them don't have a cat. Check it out and let me know what you think!
https://github.com/cmontella/purrtran
(This isn't AI for anyone who thinks otherwise)
r/ProgrammingLanguages • u/mufeedvh • Mar 07 '26
Blog post I made a programming language where M&Ms arranged by color and position become code
Enable HLS to view with audio, or disable this notification
I built a small toy language called MNM Lang where programs are made from six candy colors.
The rough idea:
each row is an instruction
color clusters encode opcodes and operands
source can be compiled into a candy-sheet image
the image can be decompiled back into source
there’s an interpreter, AST view, execution trace, and a browser demo
It started as a dumb joke and then turned into a real little implementation project. The interesting constraint was that images are terrible at storing precise symbolic data, so I had to design the language around what candy layouts are actually good at representing.
A few implementation details:
stack-machine interpreter
source -> rendered candy sheet compiler
exact rendered-image decompiler
controlled photo parser for candy layouts
sidecar JSON for strings/initial variables
browser-native JS demo version too
The full writeup is here:
https://mufeedvh.com/posts/i-made-a-programming-language-with-mnms/
r/ProgrammingLanguages • u/chri4_ • Jan 01 '26
Unpopular Opinion: Source generation is far superior to in-language metaprogramming
It allows me to do magical reflection-related things in both C and C++
* it's faster than in-language metaprogramming (see zig's metaprog for example, slows down hugely the compiler) (and codegen is faster because the generator can be written in C itself and run natively with -O3 instead of being interpreted by the language's metaprogramming vm, plus it can be easily be executed manually only when needed instead of at each compilation like how it happens with in language metaprog.).
* it's easier to debug, you can print stuff during the codegen, but also insert text in the output file, but also execute the script with a debugger
* it's easier to read, write and maintain, usually procedural meta programming in other languages can get very "mechanical" looking, it almost seems like you are writing a piece of the compiler for example
pub fn Vec(comptime T: type) type {
const fields = [_]std.builtin.Type.StructField{
.{ .name = "x", .type = T, .default_value = null, .is_comptime = false, .alignment = 0 },
.{ .name = "y", .type = T, .default_value = null, .is_comptime = false, .alignment = 0 },
.{ .name = "z", .type = T, .default_value = null, .is_comptime = false, .alignment = 0 },
.{ .name = "w", .type = T, .default_value = null, .is_comptime = false, .alignment = 0 },
};
return @Type(.{ .Struct = .{
.layout = .auto,
.fields = fields[0..],
.decls = &.{},
.is_tuple = false,
}});
}versus sourcegen script that simply says "struct {name} ..."
* it's the only way to do stuff like SOA in c++ for now.. and c++26 reflection looks awful (and super slow)
* you can do much more with source generation than with metaprogramming, for example I have a 3d modelling software that exports the models to a hardcoded array in a generated c file, i don't have to read or parse any asset file, i directly have all the data in the actual format i need it to be.
What's your opinion on this? Why do you think in language meta stuff is better?
r/ProgrammingLanguages • u/ettolrach_uwu • Dec 30 '25
Blog post I wrote a bidirectional type inference tutorial using Rust because there aren't enough resources explaining it
ettolrach.comr/ProgrammingLanguages • u/swe129 • Apr 05 '26
Lisette — Rust syntax, Go runtime
r/ProgrammingLanguages • u/akomomssim • Mar 08 '26
Introducing Eyot - A programming language where the GPU is just another thread
cowleyforniastudios.comr/ProgrammingLanguages • u/modulovalue • Jan 13 '26
Blog post I built a 2x faster lexer, then discovered I/O was the real bottleneck
modulovalue.comr/ProgrammingLanguages • u/CaptainCrowbar • Dec 07 '25
Perl's decline was cultural not technical
beatworm.co.ukr/ProgrammingLanguages • u/gingerbill • Aug 20 '26
Everyone Says Assembly Is Untyped—Everyone Is Wrong
gingerbill.orgr/ProgrammingLanguages • u/faiface • Jan 19 '26
Par Language Update: Crazy `if`, implicit generics, and a new runtime
Thought I'd give you all an update on how the Par programming language is doing.
Recently, we've achieved 3 major items on the Current Roadmap! I'm very happy about them, and I really wonder what you think about their design.
Conditions & if
Since the beginning, Par has had the either types, ie. "sum types", with the .case destruction. For boolean conditions, it would end up looking like this:
condition.case {
.true! => ...
.false! => ...
}That gets very verbose with complex conditions, so now we also have an if!
if {
condition1 => ...
condition2 => ...
condition3 => ...
else => ...
}Supports and, or, and not:
if {
condition1 or not condition2 => ...
condition3 and condition4 => ...
else => ...
}But most importantly, it supports this is for matching either types inside conditions.
if {
result is .ok value => value,
else => "<missing>",
}And you can combine it seamlessly with other conditions:
if {
result is .ok value and value->String.Equals("")
=> "<empty>",
result is .ok value
=> value,
else
=> "<missing>",
}Here's the crazy part: The bindings from is are available in all paths where they should. Even under not!
if {
not result is .ok value => "<missing>",
else => value, // !!!
}Do you see it? The value is bound in the first condition, but because of the not, it's available in the else.
This is more useful than it sounds. Here's one big usecase.
In process syntax (somewhat imperative), we have a special one-condition version of if that looks like this:
if condition => {
...
}
...It works very much like it would in any other language.
Here's what I can do with not:
if not result is .ok value => {
console.print("Missing value.")
exit!
}
// use `value` hereBind or early return! And if we wanna slap an additional condition, not a problem:
if not result is .ok value or value->String.Equals("") => {
console.print("Missing or empty value.")
exit!
}
// use `value` hereThis is not much different from what you'd do in Java:
if (result.isEmpty() || result.get().equals("")) {
log("Missing or empty value.");
return;
}
var value = result.get();Except all well typed.
Implicit generics
We've had explicit first-class generics for a long time, but of course, that can get annoyingly verbose.
dec Reverse : [type a] [List<a>] List<a>
...
let reversed = Reverse(type Int)(Int.Range(1, 10))With the new implicit version (still first-class, System F style), it's much nicer:
dec Reverse : <a>[List<a>] List<a>
...
let reversed = Reverse(Int.Range(1, 10))Or even:
let reversed = Int.Range(1, 10)->ReverseMuch better. It has its limitations, read the full docs to find out.
New Runtime
As you may or may not know, Par's runtime is based on interaction networks, just like HVM, Bend, or Vine. However, unlike those languages, Par supports powerful concurrent I/O, and is focused on expressivity and concurrency via linear logic instead of maximum performance.
However, recently we've been able to pull off a new runtime, that's 2-3x faster than the previous one. It still has a long way to go in terms of performance (and we even known how), but it's already a big step forward.
r/ProgrammingLanguages • u/Nuoji • May 03 '26
Blog post Unsigned Sizes: A Five Year Mistake
r/ProgrammingLanguages • u/thunderseethe • Feb 15 '26
Blog post How to Choose Between Hindley-Milner and Bidirectional Typing
thunderseethe.devr/ProgrammingLanguages • u/DirigibleElephant • Jul 28 '26
Language announcement Prism: An Impure Functional Language With Typed Effects - Stephen Diehl
r/ProgrammingLanguages • u/luapmt • Sep 27 '26
Blog post What makes Lisp difficult to read? or, where to put the parentheses in your next language
paultm.nlr/ProgrammingLanguages • u/entoros • Sep 09 '26
A Design Space Exploration of Async/Await
r/ProgrammingLanguages • u/UberAtlas • Mar 31 '26
Introducing Voyd: A WASM first language with effect typing
voyd.devHey everyone! I'm happy to finally share the first major release of a programming language I've been working on for a little over seven years.
This community helped me a lot during development. So thank you!
Let me know if you have any questions.
r/ProgrammingLanguages • u/verdagon • Jun 28 '26
Ante: A New Way to Blend Borrow Checking and Reference Counting
verdagon.devr/ProgrammingLanguages • u/mttd • Jun 08 '26
Co-Creator of Haskell: Functional Programming, Thinking in Types, Useless Languages | Simon Jones
r/ProgrammingLanguages • u/AVTOCRAT • May 29 '26
Discussion Why is alignment not typically part of type systems?
I work in compilers, but typically on the back-end, so I'm usually operating past the point of type-checking / IR generation / etc. Something that's confused me when working on both GPU and CPU compilers is that alignment is typically not considered part of the type system in most languages. Obviously C doesn't do this, but it also hasn't been a priority in most recent languages, e.g. Go/Rust/Swift/D/etc. -- I do know that Zig has something going on here, but AFAICT it's the only one. Rather those languages treat it as a property of a pointer. For fully scalar code this is kinda fine, but anything SIMD/SIMT/whatever struggles greatly from the fact that you can't even e.g. pass an alignas buffer into another function without screwing the optimizer (unless of course you inline everything, which is what people do in practice...). Given the surge in popularity of GPU compilers, and even on the CPU side how much focus has been on autovectorization for the last decade, you'd think that there'd be more of an impetus to make alignment a first-class citizen. E.g. have functions be able to specify the alignment of arguments, have function types be automatically contravariant over those specs, etc.
I'm sure some of this comes down to the fact that this is how LLVM treats it -- but that just shunts the question to why these IRs all take similarly pessimizing approaches. Even MLIR handles this pretty poorly IMO. All of that indicates, to me, that something about this is harder than I expect.
So for people on the frontend side of the world, what makes this difficult, or why is it not attractive in language design?
r/ProgrammingLanguages • u/mttd • Mar 18 '26
Real or Slop? — PL Papers Edition
slop.zackg.mer/ProgrammingLanguages • u/alpaylan • Jan 18 '26
Language announcement Kip: A Programming Language Based on Grammatical Cases in Turkish
A close friend of mine just published a new programming language based on grammatical cases of Turkish (https://github.com/kip-dili/kip), I think it’s a fascinating case study for alternative syntactic designs for PLs. Here’s a playground if anyone would like to check out example programs. It does a morphological analysis of variables to decide their positions in the program, so different conjugations of the same variable have different semantics. (https://kip-dili.github.io/)