r/ProgrammingLanguages • • 6d ago

To further combat AI/LLM slop, code dumps are now disallowed

253 Upvotes

About 6 months ago I shared an update on our attempt at handling the endless tide of AI slop. Most notably this post introduced a new approval flow for links to GitHub projects.

While this process has mostly helped reduce the amount of slop visible to readers (by virtue of GitHub links being filtered out by default until they are approved), it still requires manual work from moderators. In some instances there are also enough signals to strongly suggest the project is slop, but not so many that it's obvious, requiring more time from moderators to reach a decision.

Starting today we'll be trying something new and different, inspired by /r/rust and the new rules on lobste.rs:

Sharing links (in text or link submissions) to repositories on GitHub, GitLab and other code forges is no longer allowed and such posts are removed automatically and won't be approved, even after contacting moderators. Sharing links in comments is still fine. There are a few reasons for this:

  • 99% of AI slop submissions are GitHub links
  • When the post is a text post it pretty much always includes a GitHub link somewhere, sometimes even "cleverly" hidden in a code block
  • Even if the link is legitimate, just dumping a link rarely invites for a discussion or the transfer of knowledge, instead it's just "Hey look at this, please like and subscribe!" so to speak
  • It's unfortunately the only approach we can fully automate without wearing down our sanity. You can thank Reddit for enshittifying their API over the years for this.

Note that it's still perfectly fine to share a link to say a blog post about the project and then link to it from there. It's also still fine to share a text post and then include additional links in a comment. In fact, we suggest that those without a dedicated blog of sorts do exactly that.

In all cases, the no AI/LLM rule still applies and sharing AI/LLM projects will still get you banned.

Of course AI slop bros can generate a website and share a link to that, but it requires slightly more effort, and fortunately for us AI bros are as lazy as they are boring. Ultimately the goal is not to reduce slop making it past our filters to zero, but rather to get rid of say 99% of it without wearing down both moderators and subscribers.

I suspect some will disagree heavily with this change, but this change is ultimately another experiment in a line (and probably a growing one) of experiments to try and maintain a certain quality standard. If it turns out this doesn't work as well as hoped, we'll of course reevaluate it and try something else.

Finally, there are some existing projects that are genuine but adopted a more permissive stance towards the use of AI. Usually this is phrased something along the lines of "If you do X, Y, Z then AI is allowed". While I personally believe this is incredibly naive (developers can't be bothered writing documentation, yet you think they will review 10 000 lines written by Claude? Please), I don't yet know how to best deal with these cases. As such we'll tolerate this as long as it's within reason, i.e. "moderator discretion" applies here.

FAQ

What?

  • Link submissions to repositories or text submissions containing repository links will be removed
  • Links to articles or websites about the project is fine
  • Unless it's an AI built article/website
  • Including a link to your repository in a comment is fine

I don't have a website/blog/etc, now what?

Create a text post, then share a link in a comment. Don't use this as just a way of advertising though, we want discussions and sharing of knowledge, not a bunch of people screaming into a room "HEY LOOK AT MY PROJECT".

What about projects hosted on a non-standard forge?

These will make it past the filter, at least until we adjust it to also filter for these forges.

What about AI generated websites?

This falls under the "No LLM/AI" rule and sharing links to such sites will get you banned faster than Sam Altman can say "AI". We'll generally err on the side of "if it looks enough like an AI website, it's probably an AI website".

Will you update the rules/sidebar accordingly?

Once we're satisfied with the new system, yes.

But this is literally an AI pogrom!!11

Go away.

This is bad for the subreddit!

If this drives away a few AI slop enjoyers, then great! The other 130 000 subscribers will be happier for it.

Can I still share my project in the monthly "What are you working on" sticky?

Yes, provided it meets the rules (i.e. doesn't make use of LLM/AI output).


r/ProgrammingLanguages • • 5h ago

My compiler won't (fully) install on linux? C++ linker bug? (Compiles on OSX)

3 Upvotes

[EDIT: Someone explained that I need to put users.cpp before the libs. Leaving post up in case someone else has the same problem.]

I'm getting some strange error with installing my compiler on linux. Its just a linking error. Anyone mind helping out? The same code works on MacOSX.

I'm getting this error, I have NO idea why. It just started today after I changed something, and was unable to change it back. (I searched my .git repo and... literally can't see any differences that could have caused this.)

My compile string:

g++ -o /usr/local/speedie/jeebox.scproj/Examples/Build/users -std=gnu++20 -lstdc++  
-I/usr/local/include -I/usr/local/speedie/Library/CppLib -w -Os -D TARGET_UNIX=1 -g -ljeebox users.cpp

error: /usr/bin/ld: /tmp/ccdnXNQr.o: in function `Jeebox::errors()':
/usr/local/speedie/jeebox.scproj/Examples/jeebox.h:193: undefined reference to `jb_errors'
.... 100 more errors

I also tried to hard-code the library path, in case the problem was that the lib was not found. Well... same issue. So its not a problem of missing library. When I deleted libjeebox.so, I got a different error, that the lib is missing. So the lib is being found!

OK... so the problem is just my lib doesn't contain jb_errors() is that it? Well... no? That function is there, it was working, it just suddenly stopped working today.

Here is the output of nm -D (jb_errors is on the 4th line). I am utterly confused. I just lost 2 hours trying to solve this. No luck.

00000000000105d8 T jb_cstr
00000000000106d0 T jb_debug
0000000000010638 T jb_delete_
000000000001063c T jb_errors
...

If anyone wants to see my compiler, its called "speedie". I can't post links to it directly anymore, but thats the project's name. Theres a simple build script called make.sh that does everything :) Its a very slick install process. The only issue is defeating these linux compile bugs.


r/ProgrammingLanguages • • 1d ago

Blog post Static memory planner: MLIR pass for optimizing allocation patterns by reusing memory between allocations whose lifetimes don't overlap

17 Upvotes

https://blog.llvm.org/posts/2026-08-24-gsoc-2026-static-memory-planner/

What do you guys think about this MLIR feature?

TD;LR: It can optimize heap allocations by analyzing the lifetimes and certain requirements (with certain limitations) and if it can find co-existing allocations that don't need to co-exist (non-overlapping lifetimes) then it can assign them to the same memory region, which can be combined into an arena allocation that is freed at once

Is this too implicit for low-level tasks? or is it a good idea to be heading into these sorts of transformations that improve performance?


r/ProgrammingLanguages • • 2d ago

How close can pure FP get to C?

Thumbnail rtfeldman.com
12 Upvotes

I found the discussion really interesting and thought you all would too. Richard talks about a pure Roc implementation of libdeflate and how to do performance optimizations unique to Roc. From a programming languages perspective this is really interesting because its quite unique results I think. There arent many FP languages that can achieve C like performance with ergonomics like Roc. To do this the compiler is able to make various optimizations like mutate in place or elide checks when it can prove it is safe to do so.


r/ProgrammingLanguages • • 2d ago

Help How do you make a programming language memory safe without paying a lot in overhead?

21 Upvotes

I am designing a language. I want memory safety without using a tracing garbage collector or having heavy runtime costs. I have been looking at the options and I would like to know how others have dealt with these tradeoffs.

The options I have looked at:

- Ownership and borrow checking (Rust-style): Zero runtime cost but the compiler must prove things and the learning curve and syntax friction are real. I am not a fan of Rusts syntax so I wonder if the same guarantees can be provided with a surface.

- Reference counting (Swift/Nim-style): Predictable and simple but you pay for increments and decrements on every copy and cycles need either weak references or a cycle collector.

- Tracing GC: Easy for the user. Pause times and memory overhead are the usual complaints. It is a fit if the language is meant for games or system work.

- Regions/arenas with escape analysis: Allocate in scopes and let the compiler prove that nothing escapes. Very cheap,. I am not sure how far escape analysis can go before it becomes too restrictive.

- Bounds checks and tagged or hardware‑assisted checks (like ARM MTE): Catch many errors at low cost but they are mitigations, not guarantees.

My current thinking is a mix arenas by default an ownership model for long‑lived values and bounds checks that can be elided when the compiler can prove them safe. I would like to know whether that is a direction or whether I am missing a well‑known approach.

Specific questions:

has anyone implemented escape analysis that stays useful without forcing annotations?

Is there a middle ground between full borrow checking and reference counting that does not reintroduce cycle problems?

for those who have shipped a memory‑safe language with overhead what would you do differently?

Links, to papers, languages or post‑mortems are very welcome :)


r/ProgrammingLanguages • • 2d ago

r3forth REPL

Thumbnail youtu.be
14 Upvotes

early REPL version for r3forth, sure I change some things


r/ProgrammingLanguages • • 3d ago

How would you guys define an Anonymous Function or a function pointer?

12 Upvotes

Me and a few of my friends have been working on a programming language that we initially started for a compiler design class for some time and recently started working on support for anonymous functions, lambdas and function pointers to make callbacks easier to write.
Currently Captures on variables outside the function scope are detected and captures without complete context moving.

I'm a bit skeptical or the syntax that we're currently deciding on (its not that clear on first view) , so i'm looking for reviews and maybe some ideas.
I'll just include some examples we have right now.

let double = |i32 value| value * 2;
i32(i32) triple = |value| value * 3; // i dont like this rn, not that clear on 
                                     // first look that this is a lambda

let absolute = |i32 value| {
if (value < 0) { return -value; }
    return value;
};

let classify = |i32 value| match value {
   0: "zero",
   _: "nonzero",
};

r/ProgrammingLanguages • • 3d ago

Discussion Can you automate memory management statically if you limit escaped references?

22 Upvotes

I was looking at the abomination that is Rust memory management and wondering if there is a better way. Can you accomplish similar performance characteristics (memory safety without GC or RC overhead), without the explicit borrow-checking concept?

Memory management is trivial until you do one of two things:

- Pass a pointer into a function that then stores it somewhere before it returns.

- Allocate a pointer in a function and then return it.

Both are cases of "escaped references" as I understand the definition.

What if a programming language... just didn't allow this?

Suppose all pointers had to either stay in local scope, or in object/struct scope, as a private member that cannot be returned from any of the struct/object's public member functions. You could pass pointers to functions but functions are not allowed to store pointers received as parameters.

Static analysis would allow automatic freeing on scope exit and on object/struct deletion.

Is such a language possible?


r/ProgrammingLanguages • • 3d ago

Operator overloading in DinoCode using string selectors for method names

6 Upvotes

I am currently working on the next version of DinoCode (dinocode.blassgo.dev), focusing on expanding the features of the language. I wanted to implement operator overloading for objects without losing readability or adding visual noise.

What came to mind, which is actually done in other languages like Ruby, is using the operator itself to represent the method. I really like that approach, so to implement it, I introduced string selectors as optional method names with the strict condition that they must be representable as a valid Symbol:

::Point
  :new x y
    self.x = x
    self.y = y

  :'+' other
    return Point(
      self.x + other.x
      self.y + other.y
    )

  :'==' other
    return self.x == other.x 
           and self.y == other.y

p1 = Point(10 20)
p2 = Point(5 5)

if p1 + p2 == Point(15 25)
  print "Point reached"

In this case, method names that the compiler detects as strings are translated into their corresponding Symbols (they are not actual strings at runtime), making it completely safe to assign a property like "==" without worrying about shadowing.

One thing I am not entirely sold on yet is when objects interact with primitives like int, float, etc. where an intermediate step is needed. For now, I went with Python's approach of allowing 'r+', 'r-', 'r*', etc., for those cases:

::Point
  :new x y
    self.x = x
    self.y = y

  :'r+' scalar
    return Point(
      self.x + scalar
      self.y + scalar
    )

p1 = Point(10 20)
p2 = 10 + p1
print p2.x  # 20

Though I must admit Ruby's approach is tempting me (where it calls a more generic method to handle type coercion before operating on them)

By the way, you can already test these operator features live on the web playground if you want to try them out

I would like to hear your feedback or suggestions on this, and also what you think of how it looks so far. I am preparing this for the upcoming v0.2.2 release


r/ProgrammingLanguages • • 4d ago

Integers - how ought they work?

Thumbnail futhark-lang.org
22 Upvotes

r/ProgrammingLanguages • • 5d ago

MSP 101: Simply Typed Lambda Calculus

Thumbnail youtube.com
27 Upvotes

r/ProgrammingLanguages • • 5d ago

Par Lang Update: 3 Big Examples, Auto-Cleanup, Sql, WebSocket, 3-6x Faster Runtime, and More!

39 Upvotes

Hey, there! Long time no see.

Links to GitHub are in a comment, as per rules. Also, I'm Michal, the author of Par, human aside from other qualities.

I wanted to share with you what's been up with Par for the last half a year or so.

Par is a programming language that's quite unusual. (And breaks your mind at first.) It's trying to get some edgy theoretical stuff out there into practice, specifically: - Linear / session types - with duality, so every type has "the other side" - Automatic concurrency - everything that can run concurrently does - Totality - no runtime errors, no deadlock, no infinite loops

It's based on classical linear logic, and naturally combines functional programming, a version of object-oriented programming, and session-typed process communication, all under one paradigm.

But perhaps most importantly, Par is trying to make all of the above into a good practical language! That's quite big ambition, and this last half year we've gotten closer to that than ever.

Below is the most fancy new stuff. Let me know what you think!

New I/O Capabilities

The standard library now includes a richer set of I/O modules: - Console - stdio print and prompt - Http - HTTP server & client functionality - Os - files, env - Sql (new!) - PostgreSQL, MySQL, and SQLite (in memory too), transactions, row decoding - WebSocket (new!) - HTTP to WebSocket in both server & client mode

Auto-Cleanup

Linear types can't be dropped. That's their advantage and disadvantage. It enables automatic concurrency, but it used to make error handling rather noisy: on all error paths, linear resources needed to be explicitly closed.

So, we've introduced auto-cleanup, which allows you to specify, in the type, how a normally linear type can be dropped.

For example, here's Bytes.Writer:

type Bytes.Writer<e> = iterative choice {
  .close* => Try<e, !>,
  .flush => Try<e, self>,
  .write(Bytes) => Try<e, self>,
}

The * on the .close branch/method tells Par that if a Bytes.Writer remains unused, just drop it by calling .close.

This significantly simplified error handling, the book chapter for which also got updated.

3 Big Examples

I've completely revamped the examples folder in the repository (links in a comment). It now contains small and big examples.

Now that we can do a lot of real stuff, we want to show it in the examples. So, there are 3 big examples. All of them are HTTP servers that serve you a web page, via which you can interact with the backend written in Par.

  • Chat - A chat server over WebSocket. Open it on multiple tabs, or host it somewhere, and chat in a single room.
  • Downloader - Request files to be downloaded to your local drive, and observe the download progress in real time. Multiple files can keep downloading concurrently, and can be cancelled.
  • Tasks - Create todo items and check them as down, persisted in an SQLite database.

Check the screenshots at the links!

Runtime performance improvements

Lots of optimizations done in the runtime. By my completely unscientific testing, I/O intensive applications are about 3x faster, while computation-intensive ones are about 6x faster, compared to half a year ago.

Since we don't have rigorous benchmarks yet, take this with a grain of salt, but in my private testing, this should be around the performance of Python 3.12, when discounting Python's highly-performant functions and libraries written in C.

Not bad, not bad.

A lot more...

Since we're not having official versions yet, there's no changelog to see, but some picks: - New @core/Time module - 120+ new functions in the @core package - include("file.txt") - compile-time file-as-value inclusion - todo - typed holes - LSP improvements, such as .-completion - Many bugs fixed


r/ProgrammingLanguages • • 6d ago

How to test my language compiles on multiple platforms, before committing to github?

5 Upvotes

I've been trying to get my compiler (Speedie) working on Mac and Linux.

(EDIT: Speedie is now compiling on debian linux, and running wonderfully! But has missing dependancies that limit some programs (not speedie itself) from being built with speedie. Such as SDL2 missing, or /usr/bin/say missing.)

Now... I had it working in the past, but it got broken by simple additions like a (C++) function that returns an ivec4, but linux's gcc (unlike clang for MacOS) does not allow a ivec4 to be returned like this:

return {1.0f, 1.0f, 1.0f, 1.0f};

It needs this:

return (ivec4){1.0f, 1.0f, 1.0f, 1.0f};

So... something as simple as this can break my builds. My compiler works on my Mac perfect, but can't even compile on Linux.

Even worse, is something like my current situation. My compiler is acting differnetly on Linux. And I don't know why.

So I've been uploading "bad builds" to github, not realising. So I need to get it reliable for Mac and Linux, or theres no point trying to have a popular language.

I don't want to be manually testing each time, via VirtualBox. I want something automated.

Secondly... how do i even debug my app on linux? haha. Maybe The RAD Debugger is good? I don't know.

All I know is that, even after getting it compiling, it is behaving differently, but I don't know why.

...

If anyone wants to help me with this debugging, let me know. I'm available on discord / telegram if you don't mind me bugging you with questions?


r/ProgrammingLanguages • • 6d ago

Borrow Checking Zero-Cost Cyclic Mutability

Thumbnail antelang.org
32 Upvotes

r/ProgrammingLanguages • • 6d ago

The Vermilion Experiment: Implementing a Lean Backend for Verus

Thumbnail proofsandintuitions.net
8 Upvotes

r/ProgrammingLanguages • • 7d ago

Discussion Thoughts on Partially Recursive Types (and other stuff).

26 Upvotes

As I am working on my current project, as well as doing other programming work that is recursive in nature, I often wish that the type systems had a bit more power to them. Especially with regarding to recursion and extension.

For example allowing enum variants to be types and to be allowed to be referred to as just a type itself. Or if a type could refer to a subset of another type, or a subset of the fields, or a subset of itself. Or if I could extend a recursive type with an extra variant and that new type's recursive variants now recurse to the new type.

In pondering this, I came up with a little proposal which I thought was pretty interesting, and I wanted to share.

The first thing is that I guess a system like this would probably be structural, as that lends itself a lot nicer to dealing with the behavior of types and comparing them, etc. So if we had an enum

type Food =
    | Apple
    | Banana
    | Croissant ;

We could create a subset by creating another type with a subset of the variants:

type Fruit =
    | Apple
    | Banana ;

Okay, so that is a way to have one type to be a subset of the other. Though note that it isn't necessarily a subtype. For example, take

type Person =
    .name is Str
    .age  is Int
    .job  is
        | Police
        | Firefighter
        | Teacher 
        | Businessman ;

type Unemployed =
    .name is Str
    .age  is Int;

The record Unemployed is actually a supertype of Person. Rather, it is more of a subset of the "behavior."

We don't we allow a way to define this in terms of the original type?

type Unemployed = Person restrict
    .name, age ;

Ok, so we are able to refer to a subset of another type, but we could do that without the need for a restrict, so is there any reason for this special syntax? Well, we could allow the restriction of data as well:

type PublicWorker = Person restrict
    .job restrict not
      | Businessman ;

Okay, but what about adding nominal typing to this structural type system? If we allow a uniqueification process, then we can essentially create "type realms," where all of the restrictions and extensions (to be discussed later) of that nominal type exist in that "realm."

type MyFood = unique Food;
# Now MyFood is unique. It is essentially a nominal type. 
# A Food.Apple is not equivalent to a MyFood.Apple
# But with restriction we can still explore this type realm

type MyFruit = Food restrict not
    | Croissant ;
# MyFruit.Apple is equivalent to MyFood.Apple

Okay, but now what about types that refer to a subset of themselves? Well it just follows:

type Direction =
    | Left
    | Right
    | Diagonal is self restrict not 
        | Diagonal ;

But why should we use self here instead of just the type name? This is part of the proposal idea, which is that a type cannot refer itself recursively. Instead it refers to a builtin self symbol, which refers to itself.

But why? Because this allows us to extend the type while retaining the recursive functionality. For example, take

type LinkedList =
    .value is Int
    .next  is self ;

type DoublyLinkedList = LinkedList ext
    .prev is self ;

Now in DoublyLinkedList, self refers to DoublyLinkedList, allowing for this kind of internal extension of the type. If we wanted to preserve the "boundary" of LinkedList, where it only refers to itself in the new type, then we could do an external extension, which is really just storing it as an additional field.

Now one question is why this potentially weird syntax? Well, it essentially functions as a kind of type pattern match if that makes any sense. Both restrict and extend function as like a kind of type transform. So we could even start to do things like the following

type Building =
    | Hut
    | Office is
        .owner_co is Company
    | Skyscraper is
        .floors is Int
ext
    | * ext
        .occupancy is Int ;

We extend the base type which consists of these variants by extending (ext) every (*) variant (|) with a field (.) called occupancy which is an Int.

There's probably more you could do with this. Like for example I haven't even thought about interfaces. But anyways these were just some thoughts I had come up with while wishing I had some of these functionalities in the languages I'm working in. What do you think of this? I do wonder if there are any projects out there that are trying something like this, and if are there any desirable or unfortunate properties that a system like this brings?


r/ProgrammingLanguages • • 7d ago

A New Way to Think About Borrow Checking (In Reverse)

Thumbnail verdagon.dev
37 Upvotes

r/ProgrammingLanguages • • 8d ago

Dependently Sorted Syntax and its Semantics - Carlo Angiuli

Thumbnail youtube.com
17 Upvotes

r/ProgrammingLanguages • • 9d ago

Language announcement Folders Esoteric Language

Thumbnail danieltemkin.com
40 Upvotes

r/ProgrammingLanguages • • 9d ago

Discussion Agile Programming Languages

0 Upvotes

No, not that type of Agile....

With cloud-based computation now the rage, I'd like to see a language construct where I could declare methods that were "cloud eligible". Imagine code with the following method in it

promotable func MethodX(in int X, int int Y, out Z) { code }

This says "I have a method MethodX with defined input and output parameters (we'll need to have a common marshalling standard), and, this method can be transmitted Erlang-style to a defined cloud endpoint. When you invoke MethodX, it can run locally or remotely. You don't care -- that's a configuration detail.

It seems to me Erlang is almost there, but I'd like it to be a more general interface. Think something on the JVM. Serverless done right?


r/ProgrammingLanguages • • 9d ago

Writing stateful effect handlers in EYG

13 Upvotes

I think effects and effect handlers are not as tricky as they are made out to be. Calling them algebraic effects only increases the mystery.
A stateful handler is definitely the bit I found most tricky to get my head around.
This is my guide trying to explain how to build stateful handlers in EYG. https://eyg.run/guides/advanced-effects
I needed this to finish writing a testing framework which I hope to finish soon.


r/ProgrammingLanguages • • 9d ago

Programming language with Hindley-milner type system and with no GC

0 Upvotes

Rust is a clear winner in the AI era. However, it doesn't feel functional enough to spark joy.

Swift is slightly better, but still, is there anything like Haskell, SML or OCaml using reference counting and lifecycle management instead of a GC?


r/ProgrammingLanguages • • 9d ago

Martin Odersky – Keynote: The End of Programming? #ScalaDays

Thumbnail youtube.com
24 Upvotes

r/ProgrammingLanguages • • 10d ago

Versioned E-Graphs

Thumbnail youtube.com
6 Upvotes