r/ProgrammingLanguages • u/mttd • 17h ago
r/ProgrammingLanguages • u/Mean-Decision-3502 • 18h ago
Unambiguous Operator Specification for Programming Languages
nvitya.github.ioAs I changed recently the operators in my programming language I've created this specification:
https://nvitya.github.io/pluops/
I did not wanted to overload the operators like the C does with *, & and /. I was orienting for existing solutions so this is what I came up with. The specification contains the symbol usages and operator precedence too.
If you are developing a new programming language, it would be nice to follow some standard, so at least the expressions would be portable between the languages.
I'm open for debates or suggestions.
r/ProgrammingLanguages • u/mttd • 15h ago
Lost Bytes At The Crossroads Between User- And Kernel-Level Memory Allocation
ibr.cs.tu-bs.der/ProgrammingLanguages • u/Fine_Seaworthiness19 • 1d ago
Language announcement The gab programming language
Hi all!
I am a long-time lurker of this sub, and a language enthusiast. I have been working on my own programming language for several years, and I finally worked up the courage to post it.
The language is called gab. I'm heavily inspired by lua, clojure, and smalltalk.
All the code is on github here and I've built a small website for the language here.
The language design, runtime, and standard library are all entirely my own work without the use of an LLM. However, I did consult LLMs occasionally when I wanted to research certain subjects (such as the difference between c11 atomics on x86 and arm).
I'm looking for any kind of feedback on the language, its goals/ergonomics, and the website itself.
Thank you for taking a look!
r/ProgrammingLanguages • u/Bro8an • 1d ago
Discussion Auto-memoization for pure functions – how to decide when it pays off?
Im currently working on a compiler for my own programming language. I want the compiler to automatically memoize pure function calls, but only when it actually improves performance. The challenge: how does the compiler decide whether caching a specific recursive call (e.g., self(x-1) and self(x-2) in fibonacci) will save more time than the memory overhead? tracking how many times a function recieves the same input isnt an option as this requires all recieved inputs to be saved. too many saved calculations can cause finding the right result for a function call to be slower than the actual calculation. so the memoization table shouldnt get to big. naive fibonacci should be memoized but simple addition for an example should not be memoized. do you have any ideas?
r/ProgrammingLanguages • u/Ok_Researcher2061 • 1d ago
Discussion A self-hosting compiler-compiler where one grammar yields a C++ parser plus a binary form that C++/Java/Python/JS/Rust runtimes decompile byte-identically. Looking for design critique.
Disclosure first, since some subs ask: the compiler-compiler itself (CCS) is hand-written C++ I have built over a number of years with no AI involvement in its code. The website, b3u.dev, the packaged use cases and most of the reports linked below were written with Claude Code assistance.
What it is. A grammar file goes in, a generated C++ parser comes out. The generator is self-hosting:
the parser for its own meta-grammar is a committed generated artifact, and it is rebuilt from itself in a round trip (compile the meta-grammar, regenerate, diff). That round trip is the primary correctness oracle for the compiler.
The part I think is interesting. Every parse also produces a compact binary form of the document. That binary is language-agnostic: per-grammar modules are generated for C++, Java, Python, JavaScript and Rust, each sits on a small per-language runtime, and each runtime loads the binary and decompiles it back to source text. The five outputs are compared with plain diff and must be byte-identical. That diff is the whole cross-language verification story. It replaces "our test vectors agree semantically" with "the bytes are the same."
Numbers (public JSON corpora, g++ -O2, 100 iterations): the raw binary loads within roughly 2× of simdjson DOM on twitter.json, citm_catalog.json and canada.json, and 20–30× faster than the same content in the decimal-text form. I am not claiming to beat simdjson. I am claiming that a grammar-driven binary which is generic over formats lands in the same ballpark.
Applied so far to HL7 v2, X12 EDI envelopes, COBOL copybook data, a multisig custody model, and MeTTa as a full language. Reports for each are on the site.
Honest limits. The compiler is not open source; the runnable use cases and the demo code are published. No Go, no C#. No RPC layer. The obvious "why not protobuf" question has its own page, because the answer is "different problem": protobuf invents a wire format for data you control, this reads formats that already exist.
What I would like critique on:
Byte-identical decompilation across five runtimes as the oracle. It catches every parser-vs-runtime disagreement, but it passes when all sides are wrong in the same way. What would you add alongside it?
Shipping one grammar to five host languages: generate per-language modules over a hand-maintained runtime (what I do), or generate the whole reader? Where have you seen each break?
The binary-vs-text crossover. For a load-many-times workload the binary wins immediately. For parse-once workloads it does not. Is there a standard way to present that honestly without it reading as a hedge?
Links: overview paper b3u.dev/docs/CCS_Compiler_Compiler_arXiv_Draft_0.1.pdf, benchmark harness b3u.dev/usecases/ccs_json_bench, the protobuf comparison b3u.dev/docs/why_not_protobuf.pdf.
r/ProgrammingLanguages • u/Potato871 • 2d ago
Discussion What is the interesting part of a programming language to you?
I've been working on some "documentation" for my own language (see here), which got me thinking: do we all see languages the same way? I personally look for unification of concepts and extensibility in a design, yet I've seen those who care deeply about functional purity or clean decompositions.
What do you look for in a programming language? And why?
r/ProgrammingLanguages • u/ThomasMertes • 1d ago
A new Seed7 installer for Windows has been released
A new Seed7 installer for Windows has been released. The new installer is seed7_05_20260711_win.exe and it can be found here.
The installer installs the newest released version of Seed7. It writes all Seed7 related things into one directory, so it is easy to clean up, if necessary.
The installer can be used to download and install future releases of Seed7 as well.
r/ProgrammingLanguages • u/gingerbill • 1d ago
CTTI is Exponential, RTTI is Linear
gingerbill.orgr/ProgrammingLanguages • u/tjpalmer • 2d ago
Wasmi 2.0 - Engineering of the Fastest Wasm Interpreters
wasmi-labs.github.ior/ProgrammingLanguages • u/chipmunk-zealot • 2d ago
Show-and-tell: anna lang
I made the anna programming language for a Language Jam I hosted in the beginning of August. 1 week is not enough time to explore too many ideas but 2 interesting(ish) ideas I explored were
- all function invocation is infix with
.(dot) operator. This lets you chain/pipeline nicely. - the only looping semantic available is the
iterateoperator which produces a stream.
I made a playground if anyone wants to poke at it. https://jzwood.github.io/langjam2/submissions/anna/playground/
r/ProgrammingLanguages • u/AutoModerator • 3d ago
Discussion September 2026 monthly "What are you working on?" thread
How much progress have you made since last time? What new ideas have you stumbled upon, what old ideas have you abandoned? What new projects have you started? What are you working on?
Once again, feel free to share anything you've been working on, old or new, simple or complex, tiny or huge, whether you want to share and discuss it, or simply brag about it - or just about anything you feel like sharing!
The monthly thread is the place for you to engage /r/ProgrammingLanguages on things that you might not have wanted to put up a post for - progress, ideas, maybe even a slick new chair you built in your garage. Share your projects and thoughts on other redditors' ideas, and most importantly, have a great and productive month!
r/ProgrammingLanguages • u/False_Actuator_6236 • 3d ago
A teaching language that grew up a little: ABC v0.1 now talks to C libraries
r/ProgrammingLanguages • u/Maurycy5 • 3d ago
Blog post Blogpost #8 — Duckling's first programming contest
duckling.plr/ProgrammingLanguages • u/NoSubject8453 • 3d ago
Requesting criticism Do you find this syntax readable
github.comI feel like curly braces aren't enough alone for organizing code. I also want it to have natural steps that induce some blank lines after completion of the step. like with assembly. my main concern is readability and self documentation. It will mainly be for programming on windows. The 'thunk' libraries are mostly wrappers for tedious apis like writeconsole. I plan to add more for things like graphics and math in addition to the planned window/console/file. I see 'thunks' in ghidra so its a reference to them being wrappers. It will also support normal win32 imports.
thankz
edit 1: I have read all feedback so far. the language is case insensitive. for branch{}endbranch and alias.name{}end alias.name the idea was to make it a little more clear which curly brace belongs to what if someone had a bunch of nested stuff. with that being said, it seems the consensus is that the syntax is awkaward while readable, there are still some large wrinkles.
because of your feedback, i will 1. Allow the pattern "name{}end name"," name end name", and/or" {}". 2. Make the language case insensitive 3. Make whitespace completely optional 4. Sinilar to the first thing, allow parameters for functions to be entered either on seperate lines or within parenthesis and seperated by commas (but not both within the same function) 5. allow %/n% within a string, or a %hexConstant% for other characters instead of 'newline' on a seperate line.
i am still accepting feedback, and i appreciate those who have responded.
r/ProgrammingLanguages • u/_telesis • 4d ago
The story behind Java: interviews with James Gosling and the engineers who designed the language
youtube.comThis is the official documentary about the history and design of Java, featuring James Gosling and many of the engineers who were involved in creating and evolving the language.
Rather than focusing on Java as it’s used today, it covers the engineering decisions, constraints, and trade-offs that shaped the language over the last 30 years.
r/ProgrammingLanguages • u/hopeless__programmer • 4d ago
Discussion I call this "(a=aa)(a=a)" test
Many years ago while trying to make my own programming language I faced an issue. In short, parsers didn't parse specific inputs as expected, due to some implicit rules.
For instance, let's consider EBNF grammar for a sequence of expressions a=aaaa, where a on the right can repeat arbitrary number of times.
This will look something like this:
symbol = "a"
params = symbol params | symbol
Line = symbol "=" params
lines = Line lines | Line
I designed it without + and * notation on purpose, to narrow down the root cause to the most basic rules: terminals, and and or expressions, and recursion.
Using this grammar I expect the text a=aaa=a to be parsed as (a=aa)(a=a): as two separate Line.
But typically parser generators will not produce parser that can handle such case.
Instead, the parser will (typically) fail.
The root cause is of course the nature of such parsers: they don't scan for all possible combinations.
Instead, in case of collisions (like in this case a at the end of a=aa and a at the beginning of next a=a) it is expected that user will insert negation or something to "fail" a specific route fast, eliminating the collision.
But doesn't this challenge the whole purpose of grammars as "simple" description of language rules?
It might get very difficult to predict all possible such collisions for a large grammar, like for Python or C++.
Are there any generators that don't have such limitation and can pass (a=aa)(a=a) test?
r/ProgrammingLanguages • u/punk_dev • 4d ago
Help Your favourite comment syntax that's not // or /* */ or # or --
Hi all!
I'm making a DSL, and I am not sure which comment syntax to choose due to couple of constraints:
The DSL deals with URLs (unquoted), so preferably the comment syntax must use a character sequence that cannot occur in a URL.
I really want to keep lexer lookahead under 1 character.
This disqualifies familiar // and /* */ as urls containing those are common. # is a URL fragment and -- is valid path and is also quite common in crm-generated urls.
The thing i'm leaning towards right now is an xml/html-style <!-- -->. It is not valid in URLs and is still familiar, with the drawbacks being that it's a bit verbose and needs to have an end.
I really want to hear some suggestions on this, no matter serious or silly!
r/ProgrammingLanguages • u/__NORB__ • 4d ago
Requesting criticism My first compiled language, Arrokoth-0
Hey guys, since I've been lurking around this subreddit for some time, I have decided to throw my little compiled language into the open for criticism. I won't update the language itself, as there's no point in doing that to such a small toy language (that's not even that widely useful), but I would appreciate your thoughts and criticism going forward. I grew to admire LLVM IR and compiler engineering, and this definitely isn't my last compiler I'll make! (Yes I know LLVM has a whole API for building IR... I'll utilize it in bigger projects XD)
https://github.com/norbcodes/Arrokoth-0
r/ProgrammingLanguages • u/lisp_turns_me_on • 5d ago
Help Link me your favorite language specifications
I want some inspiration. I want to see a simple language spec/reference that is tiny and covers most of its features. eg: https://plasmalang.org/docs/plasma_ref.html
Thanks for all the specs, but I was hoping for recent languages (especially, amateur ones that get posted to this sub). What would I do with a spec from 1980s that was typeset with LaTex :) That's too much effort for hobbyist languages.
r/ProgrammingLanguages • u/AustinVelonaut • 6d ago
Language announcement Admiran 3.0 released (a pure, lazy, functional language and compiler)
I made a post introducing Admiran about 18 months ago, and have been making steady progress on migrating it towards the language I want to use each day. Since that time I've made a lot of performance and coding-style enhancements, such as:
escape analysis in the compiler's analyze pass to help determine if a lazy thunk is only evaluated at most once, allowing it to be emitted without extra code to update it to its value (saves ~15% code space and execution time!)
optimization to coalesce consecutive continuation closures on the stack during lowering to the Spineless Tagless G-machine (STG) implementation, deferring the popping of the entire closure until a tail-call or return
added a uniform set of left-to-right operators for creating computation pipelines
tweaking the inlining pass parameters to get the best performance / code-size tradeoffs
The latest big change was to fully migrate from an ad-hoc prefix naming convention to using qualified names, and deferring name conflict resolution to the name-resolution pass, allowing modules with conflicting imports to still be imported, as long as the conflicting unqualified names aren't used, or are used only in a qualified form.
During these changes, I've migrated new features into the (self-hosting) compiler's code base itself, through a continuous bootstrapping process.
If you have an interest in lazy functional languages and how they are implemented, you might be interested in looking at it. I'm open to any questions or comments about the language and it's compiler implementation.
git repository: https://github.com/taolson/Admiran
Lovingly hand-crafted with no AI.
r/ProgrammingLanguages • u/Alert-Neck7679 • 6d ago
Discussion Linux-like IO API
I'm building my own interpreted language.
I had an idea, to base my I/O API on the linux terminal commands, that many developers already know, so a user wouldn't need to learn an entire new API.
This is a basic example:
using io
// create a directory
mkdir("notes")
cd("notes")
// create files with content
echo("Do my math.", "A note about homework.txt")
echo("Buy milk and bread.", "shopping list.txt")
const currentCD = pwd()
const allFilesAndSubDirs = ls()
debug(cat("shopping list.txt")) // prints "Buy milk and bread."
but I'm not that sure that this is a good idea, maybe some techniques are good for terminals but bad for programming, and some of the function names might be confusing (like pwd() which is "print working directory" but in my language it does not exactly PRINT anything, but just returns a string value).
What do you think?
r/ProgrammingLanguages • u/InternationalFox5407 • 7d ago
For people who are interested in FV and Principia Mathematica (2)
Hi yall,
This is a continuation to my last post, on formalizing Principia Mathematica, as well as a slight status update. I am planning(*) to slowly substitute the shallow embedding on PM into a deep embedding. For any backgrounds, please check the old post.
If you want to transform the monster 100 years ago into a furry boy, you might want to read through the following Q&As. *tap tap*
- Why you suddenly want to make a deep embedding? Because I can't in the beginning.
- What makes you available to deep embedding? I have asked enough questions on internet to get rid of necessary technical details
- What's the major feature for deep embedding? It enables formalizing Axiom of Reducibility.
- How many ppl would you like to look for? At most 2 ppl. You are welcome to ask me for prerequisites and anything else related
- What do you expect them working on? Either the shallow embedding or the deep embedding, since they are both necessary.
- How many time do you expect to put in? My current plan is 3 hrs a week so make sure you also have the availability.
------------------
Alternatively, I'm still welcome to collaboration with 1 - 2 ppl onto another project - we pick another random mathy, esoteric, maybe sacred book and formalize it
(*): Yes, I have not written a single line of code so far and this remains to be a plan.