r/ProgrammingLanguages • u/ThomasMertes • 19d ago
r/ProgrammingLanguages • u/Athas • 20d ago
How should Futhark expose irregular arrays to the programmer?
futhark-lang.orgr/ProgrammingLanguages • u/LinqLover • 21d ago
Language announcement Squeak/Smalltalk 6.1 has been released!
r/ProgrammingLanguages • u/cflexer • 21d ago
Help Package Manager design for Seal programming language
Hey guys, I have been working on Seal. This language is embeddable into C/C++ apps like Lua. You can create libraries for Seal in either Seal or C. I have been creating Game Framework recently. I want to create a package manager in future for Seal to let users upload their own packages to share with others, but I don't know about one thing. Just like other languages, Seal can load both Seal scripts and .so/.dll files at runtime when you import them. Publishing Seal scripts on package registry is easy, since it is just code, but I don't really know about how to publish C or dynamic library files tho. Package publishers can inject malicious stuff (like backdoor) in that code. What are real life examples to prevent that? At first I can read every file and check manually but if this project grows, maintaining that will be difficult. I can maybe create a report system but I cannot always rely on that too. What is the efficient solution for that?
For those interested, they can check Seal here: https://github.com/huseynaghayev/seal.git
r/ProgrammingLanguages • u/mttd • 22d ago
Scope and lifetime restrictions in Swift
github.comr/ProgrammingLanguages • u/liztormato • 22d ago
Reasons to Improve Programming Languages in an Age of AI - Tim Nelson
wayland.github.ior/ProgrammingLanguages • u/reflexive-polytope • 22d ago
Design draft for a truly Affine OL
gist.github.comHello, everyone.
While recovering from an illness, in my state of delirium, I sketched the design of a type system inspired by Xi and Pfenning's Dependent ML, but which uses a key syntactic restriction that conjecturally restores ordinary ML's key metatheoretic properties: the existence of principal types and the decidability of type inference.
I very much welcome feedback that actually engages with the post's contents.
r/ProgrammingLanguages • u/Sufficient_Flower415 • 22d ago
GitHub - VoidCoderStudio/OnyxScript: An modern and easy languge made for making apps to make an apps just you will use 10 lines and its like normal english language and cointains modules
github.comI made this new language it's name OnyxScript if you have an idea to add it in this project so please say it
r/ProgrammingLanguages • u/PlayfulDuck3677 • 23d ago
Tyle, A virtual machine esoteric-programming-language
Tyle doesn't have a quirk or annoying thing, I just want to share it because as someone who just began C# a week or two ago, I'm very proud to make this (even if i know the code is kind of shitty).
It has a register and RAM kind of memory you'd see in assembly, That's why i called it a virtual machine.
You can use different \`-coreX\` flags to change the amount of RAM and Registers there are, The lowest you can go are 8 registers and 768 RAM registers.
Link: [https://github.com/orewaluffy500/Tyle\](https://github.com/orewaluffy500/Tyle)
r/ProgrammingLanguages • u/gooblywooblygoobly • 23d ago
Lefts: a domain-specific language for building machine learning model architectures
I work as a quant in the finance industry and spend a lot of my time building machine learning models to predict things. Over my career I've found that every place I work invests a lot of time in writing code for training and evaluation pipelines, and you're often blocked from building interesting model architectures because it would require rewriting the pipelines.
So, I built a small DSL (Lefts: https://nsmat.github.io/lefts/ ) that makes it easy to spin up training pipelines and transform models in expressive ways. Users start with the models they want to use, then apply commands to it to build up an AST. During training/test time, the lefts interpreter operates over the AST to enforce the behaviour users specified.
Lefts is designed around a functional view of ML models. We think of each model as a bundle of functions, and each lefts command is a functor that acts on that bundle, and the functors define a grammar on the space of ML models. The functors always compose, and always preserve the key structural properties required of a model (for example, no data-leakage), so the models you build are guaranteed to be correct by construction.
The DSL is written in pure Python, and by the standards of 'real' programming languages is very simple. The project was great fun though, and taught me that building DSL's to solve problems is very powerful, and also a step up in challenge from other programming.
P.S. I hope domain specific languages are within the field of interest of this sub-reddit! Apologies if not.
r/ProgrammingLanguages • u/mttd • 24d ago
Call for Papers: VMIL 2026 - Workshop on Virtual Machines and Language Implementations
conf.researchr.orgr/ProgrammingLanguages • u/LegendaryMauricius • 24d ago
A new grammar generation language
Hi everybody. I'm happy to share a small project I've been working on lately. I call it MGFF (Macro grammar functional form), and its specification can be found here: https://github.com/LMauricius/py-perg-mgff/blob/main/Docs/mgff-specification.md . It's related to a post that I made ages ago ( here ). After re-reading that version (called just MGF back then) when I wasn't tired I realized what monstrosity I made. MGFF is far more elegant. Here is an example:
# A tiny calculator language.
t Lex (
d Digit = 0-9
d Alpha = a-z|A-Z
d AlNum = a-z|A-Z|0-9
d Int = (Digit)+
> class(Int) push(tokens)
d Number = Int ( . (Digit)+ )?
> class(Number) push(tokens)
d Ident = Alpha (AlNum)*
> class(Ident) push(tokens)
# length-based: "<=" (the two-item "< =") takes precedence over "<"
d Op = < =
| <
| =
| +
| -
| *
| /
> push(tokens) string
d Space = ( _|\t|\n )+
d LParen = \(
> class(\() push(tokens)
d RParen = \)
> class(\)) push(tokens)
d Token = Number
/ Ident
/ Op
/ Space
/ LParen
/ RParen
d File = (Token)*
)
# mixfix macro: an R, then zero or more (S R)
d sep(R)by(S) = R (S R)*
t Parse (
# `Lex` runs first; the terminals here are still characters.
> post(Lex) over(tokens)
# order-based: the first alternative that succeeds is the match
d Expr = Term + Expr
/ Term - Expr
/ Term
d Term = Factor * Term
/ Factor / Term
# the second / on the line above is an ordinary item, not a marker
/ Factor
d Factor = Number
/ Ident
/ \( Expr \)
d Signed = ( (+)/(-) )? Number
d AssignList = sep(Ident = Expr)by(,)
)
It can also serve as a replacement for regexes:
# A grammar matching a "key = value" setting line
d Space = ( _|\t )*
d Word = ( a-z|A-Z|_ )+
# right-linear recursion: the same as ( 0-9 )+
d Digits = 0-9 Digits
/ 0-9
d Value = Digits
/ Word
# The field a match ends up in belongs to the rule, not to the place it is used,
# so the two sides of the line are productions of their own.
d Key = Word
> store(key)
d Val = Value
> store(value)
d Match = Space Key Space = Space Val Space
I'm sharing the MGFF spec rather than the generator using it because the generator is very much WIP and needs a lot of testing and refactoring. Still, since I've got a bunch of projects I love working on more, I'd like to know what's the interest for parser generator tools in the wider community.
Actually I doubt that I will link the generator itself here because I would risk a perma-ban. It's not vibe-coded, but it wouldn't be welcomed. Most of it was quickly prototyped with LLM. Still, it generates quite nice TextMate and Pandoc syntax highlighting grammars.
MGFF itself is of course manually defined by me. I just figured I like to work on languages themselves and parser algorithms than on CLI tools and understanding existing niche specifications 🤷♂️.
r/ProgrammingLanguages • u/mttd • 25d ago
Classifying Capabilities (Extended Version)
arxiv.orgr/ProgrammingLanguages • u/Avatar111222333 • 25d ago
Discussion Programming language similar to TS that is runtime typed
Found this language today. I don't like the marketing "Language for agents". But looking through some examples and their design phiolosphy I seem to be a fan.
Combines some nice stuff from Go, Rust and Typescript.
https://boundaryml.com/explore
I have NOT tried this locally so please take this with a grant of salt. Seems like it's still very much a play language - nonetheless it's interesting
What do you think ? Will it die in a year ?
r/ProgrammingLanguages • u/mttd • 25d ago
A Revised Haskell 2010 Language Report
blog.haskell.orgr/ProgrammingLanguages • u/Vovandosy • 25d ago
Aren't rust's lifetimes basically just coeffects?
I was talking with a LLM, discussing effects and coeffects and how they may be interestingly used in language design
So, in one moment after I understood coeffects and effects are often used in pairs (like async/async ctx , io/world, ect.), i thought that coeffect scopes sometime should be labeled somehow to avoid shadowing
for example in my syntax :
```
some_fn :=
## capturing the scope coeffect and assigning it into a label
().use 'label := ().use FnScope
## some function
longjump () ? :=
().use _ := ().use 'label
return () ?
##...
()
so, somewhere in some inner call we may write
another_fn :=
...
longjump() ?
...
and the execution will be returned into the function where longjump were declared
```
but for this to be valid, it is important for the label not to outlive the scope where it was declared
then, i also thought : it would be good to have an ability to write these labels in the effect's declaration
```
somewhere outside
().use 'ctx := ...
a function that is async for both contexts — don't know for which cases it may be useful but why not. instead of async, it may be some another effect that uses some context/scope/world/coeffect
f() use AsyncCtx do Async '_ do Async 'ctx := ...
```
so, then i thought : effects and coeffects in my system are declared just like type constructors without the last type (aka citizens of *→* kind), so it would be logical for any type to be able to take a context label as a polymorphic (or depending) parameter.. and rust's references do exactly this.
so rust's
```
fn f<'b, 'a : 'b>(smth : &'a mut &'b Smth2, smth2 : &'b Smth2) {
*smth = ...
}
```
just takes some coeffects 'a and 'b.
it is equivalent to that like for smth it raises an effect to overwrite the world 'a and for smth2 it just returns the value into scope, where 'b is active (and 'a : 'b means that the scope containing world 'a is located inside scope containg world 'b)
so, am i thinking right about it? may it have some practical uses in pl design? any more ideas?
p.s.: sorry for my english not being perfect.. don't be humble to re-ask something if you did not understand.
r/ProgrammingLanguages • u/mttd • 26d ago
Domain-specific hyperspecialization: Winning the SAT track at SC26 with LymphoSAT
c.movr/ProgrammingLanguages • u/Pie-Lang • 26d ago
What's Next? Any New "Cool" Language Features?
It's been roughly one year since Pie got in development. August 5th marks Pie's 1 year anniversary.
During this year, I implemented:
- Variables
- Collections
- Functions
- Named Parameters
- Variadic Functions
- Fold Expressions
- Loops
- Classes & Objects
- Operator Overloading
- Namespaces
- Modules
- A Structural Type System
- Tagged Unions
- Pattern Matching
- Structured Bindings
- File IO
- C FFI (I even made a simple game with Raylib!)
- Cascade Operator
I also made a website that has:
- Basic Examples
- Docs
- Spec
- A Playground (I compiled the language to WASM)
These are roughly all the features that I liked from other languages. Of course, the work is not done. I can improve the internals of the language to make it faster, but feature-wise, I'm out of "cool" ideas.
I've scoured the sub for new ideas, but they either involved compile-time evaluation (my language is interpreted), didn't go well with the design of the language, or were already implemented in Pie.
So, I'm here to ask, what is a feature that is missing from my language that you think would be very cool to have?
r/ProgrammingLanguages • u/matklad • 26d ago
Memory Safety's Hardest Problem
matklad.github.ior/ProgrammingLanguages • u/Bro8an • 26d ago
Discussion CatLang: feedback on my language design
dropbox.comI wrote a design for a new programming language, but I'm too lazy and burned out to implement a full compiler. I still want to share the idea so you can comment on it and tell me what you think. I know its a lot and there are many typos and gaps, and it still needs a concept to communicate the complex implicit borrowing rules. Keep in mind that I have no degree or any professional experience—this is just a concept.
i renamed it to qat
current version: https://www.dropbox.com/scl/fi/bpuxeaag4ox5huooqvgu2/qatdocumentation-edited.pdf?rlkey=456owymjqn64bik1faawb3wyw&st=6o621wyd&dl=0
this is how an algorithm for sqare roots would look like with custom syntax:
func newton(f64 x, f64 goal) -> f64:
f64 temp = (x + goal /x)/2 # Newton's method for calculating roots
return x if temp == x
return self(temp, goal)
func(f64)<f64> sqrt = reliable (f64 x) -> f64:
return Error if x < 0 # root of negative numbers is undefined
return newton(x, x)
sqrt(0) = 0 # root 0 must be defined explicitly as 0 would cause newtons method to devide by 0
syntax sqrt extends {expression} # lets multiplication akzept roots as they expect expressions
syntax sqrt( # defines the syntax for roots
keyword("√"),
_,
arg(0: expression)
)
print!(collapse!(√ 2)) # collapse makes the programm crash for negative roots
another example for custom defined while syntax:
func wLoop(demand bool! condition, demand T! body) -> void:
leave if condition
body
self(condition, body)
syntax wLoop(
keyword("until"),
_,
arg(0),
_,
arg(1)
)
i32 x = 10
until x <= 0:
print!(x)
x -= 1
r/ProgrammingLanguages • u/misterchiply • 26d ago
Gödel, Escher, Elisp: The Beauty of Macros
chiply.devThis post is a lover letter to Emacs Lisp macros. I've been a long time user as a lisp hacker, and my recent obsessions with Douglas Hofstadter's strange loop concepts and M.C. Escher's mind bending artwork have enhanced my appreciation of this language's most beautiful and thought provoking feature. This post can teach you about macros and what makes them useful, but I also hope it can instill a fascination with their concept. https://www.chiply.dev/post-elisp-macros-are-beautiful
r/ProgrammingLanguages • u/andeee23 • 26d ago
Why spawning work isn’t `async` in my language
I’m designing a native language with a closed set of five effects: async, throws, io, alloc, and task.
It uses the effect system to determine which functions can run in which context.
A gpu function should be pure so it can be compiled to gpu shader code, comptime and macros don't allow io, etc.
The unusual one is task. Starting, polling, or cancelling independent work does not necessarily suspend the caller, so it distinguishes interacting with a task from suspending the current control flow:
fn download(url: str): Data !{async, io, alloc, throws(NetworkError)} {
// This function may suspend and fail.
try await http.get(url)
}
fn begin_download(scope: mut TaskScope, url: str): Job[Data, NetworkError]
!{task, io, alloc} {
// Starts independent work, but does not suspend or throw here.
scope.start(() => download(url))
}
fn finish_download(job: Job[Data, NetworkError]): Data !{task, async, throws(NetworkError)} {
// This is where the current control flow may suspend
// and where the job's result or error is observed.
try await job
}
In other words:
asyncmeans this control flow may suspend.taskmeans this code interacts with independent task or executor state.
Why is task needed at all? Without it this function would appear pure:
fn surprise(scope: mut TaskScope) {
// Returns immediately, but schedules a later mutation.
scope.start(() => cache.clear())
}
That would make it legal to run during compile-time evaluation, a reactive computation, or any context allowed to repeat or discard “pure” work.
[async](vscode-webview://0v1pc1cob69b6kq09fv420kt4hnbfq4eplq9oeuane52r1p4k0rs/index.html?id=09dea5e8-a738-47de-8468-dd94143f4dfe&parentId=2&origin=aa0d3a3a-855e-47bf-9f0b-579c40110398&swVersion=6&extensionId=ZooCodeOrganization.zoo-code&platform=electron&vscode-resource-base-authority=vscode-resource.vscode-cdn.net&parentOrigin=vscode-file%3A%2F%2Fvscode-app&purpose=webviewView) cannot express this because the caller does not suspend. [io](vscode-webview://0v1pc1cob69b6kq09fv420kt4hnbfq4eplq9oeuane52r1p4k0rs/index.html?id=09dea5e8-a738-47de-8468-dd94143f4dfe&parentId=2&origin=aa0d3a3a-855e-47bf-9f0b-579c40110398&swVersion=6&extensionId=ZooCodeOrganization.zoo-code&platform=electron&vscode-resource-base-authority=vscode-resource.vscode-cdn.net&parentOrigin=vscode-file%3A%2F%2Fvscode-app&purpose=webviewView) cannot express it because the executor and affected state may be entirely internal. [alloc](vscode-webview://0v1pc1cob69b6kq09fv420kt4hnbfq4eplq9oeuane52r1p4k0rs/index.html?id=09dea5e8-a738-47de-8468-dd94143f4dfe&parentId=2&origin=aa0d3a3a-855e-47bf-9f0b-579c40110398&swVersion=6&extensionId=ZooCodeOrganization.zoo-code&platform=electron&vscode-resource-base-authority=vscode-resource.vscode-cdn.net&parentOrigin=vscode-file%3A%2F%2Fvscode-app&purpose=webviewView) cannot express it because scheduling and cancellation are observable even when allocation is optimized away.
r/ProgrammingLanguages • u/archlinux_is_god • 27d ago
TemplateLang: Everything is type
I designed a tiny language where the type system *is* the entire
language — no separate value level, no builtin integers/booleans/
control flow. It's essentially an untyped term-rewriting calculus
dressed up in C++-template-looking syntax. Three grammar forms,
three builtins, that's the whole spec.
Motivation: I was thinking about what's actually load-bearing in
C++ template metaprogramming — SFINAE picking an overload, partial
specialization pattern-matching on structure — and wanted to see
what a language looks like if that's *all* you keep.
Grammar:
`new type Name<param1, param2, ...>`
Declares a type constructor with fixed arity (no variadics).
`type Name<pattern, ...> = Body`
Adds a rewrite rule for that constructor. Multiple rules are
allowed; they're tried in declaration order and the first
matching pattern wins (Prolog-clause-style, not most-specific-
pattern-style). Omitting `= Body` marks that pattern as already
in normal form.
A bare expression on its own
is reduced call-by-value, bottom-up, until no rule applies
anymore, and the normal form is printed.
Builtins are pattern-position-only: `Any<>` (wildcard), `Same<x>`
(structural equality against an already-bound name), `As<Type, x>`
(bind the matched subterm to a local name if it matches `Type`).
Parameter names declared in `new type` are auto-bound in every rule
of that type, so `Same`/substitution can reference them without an
explicit `As`. All bindings in one rule — auto-bound params plus
`As`-introduced names — share a single namespace; rebinding a name
via `As` is a static error, `Same` is the only way to assert equality
against something already bound.
It's enough for recursive Peano arithmetic with no other primitives:
new type Zero<>
new type Succ<N>
new type Add<A, B>
type Add<Zero<>, Any<>> = B
type Add<Succ<As<Any<>, X, Any< = Succ<Add<X, B>>
Add<Succ<Succ<Zero<>, Succ<Succ<Succ<Zero<>>>
# -> Succ<Succ<Succ<Succ<Succ<Zero<>>>>>> (2 + 3 = 5)
No termination or confluence guarantees — self-referential rules
give you unbounded recursion, so it's Turing-complete and trivially
lets you write non-terminating programs. Rule order also means two
overlapping patterns can silently pick different winners depending
on how you wrote them, which I know is a real tradeoff versus a
most-specific-match or a confluence-checked system.
Small Python reference interpreter (no dependencies), plus worked
examples (structural equality via Same/As, Peano add/mul):
[GitHub link]
https://github.com/sunu15712/TemplateLang
Mainly curious whether the `Same`/`As` binding-and-scoping design
holds up, or if there's prior art doing this more cleanly — it feels
adjacent to logic-variable unification but I haven't seen it framed
quite this way before.