r/AskProgrammers • • 19h ago

We tested programming languages, compilers and runtimes before designing our own language. Here's what we found.

I've been working on KINN, a programming language project, and one thing became clear during development:

Designing a programming language shouldn't start with a collection of attractive features. It should start with understanding the problems existing languages and runtimes already face.

So instead of immediately implementing more features, we started a research and testing program.

What we did

· Studied memory safety, security, concurrency, resource management and execution models.

· Tested multiple programming languages and their toolchains.

· Used sanitizers, fuzzing, regression tests and concurrency experiments.

· Tested real libraries, HTTP servers, SQLite, process management, IPC and FFI.

· Asked an independent reviewer to challenge our findings and reproduce important results.

Some interesting findings

· A very small regular expression input triggered enormous memory allocation in glibc's regex implementation. Under a specific memory limit, we reproduced a segmentation fault in 5/5 runs.

· Unsynchronized shared-memory operations caused lost updates across several runtimes, while the tested atomic operations avoided those losses.

· We demonstrated torn reads when a logical 64-bit value was constructed from two 32-bit accesses.

· Different runtimes behaved very differently when memory was exhausted or when tasks and threads were cancelled.

· FFI boundaries allowed native memory errors and memory consumption to affect the host application.

· Our independent reviewer discovered a critical problem in our own testing infrastructure: a missing TypeScript compiler had initially been interpreted as a successful rejection. We corrected the harness and repeated the tests.

What surprised us most

The testing infrastructure itself can produce incorrect conclusions.

We had to correct several issues in our own experiments, including missing tools, incorrect execution directories, optimizer-eliminated test code and inconsistent result classification.

That changed how we think about compiler testing and verification.

Where KINN stands now

We have documented 23 architectural decisions and seven deferred questions. They are not all implemented features. They are proposals and requirements that must still be evaluated and, where necessary, prototyped.

Some questions remain open because our environment was limited to x86-64. We still need real ARM hardware, Android/ART, modern .NET and GPU testing.

We are not claiming to have found every vulnerability or solved programming language safety. The goal is to use reproducible evidence to make better architectural decisions.

I'd like to hear from language designers, compiler developers and systems programmers:

What would you prioritize when designing a new language that aims to support application development, systems programming, networking and graphics while maintaining strong safety guarantees?

What important experiments do you think we are still missing?

0 Upvotes

10 comments sorted by

3

u/Poddster 18h ago

Asked an independent reviewer to challenge our findings and reproduce important results.

Were they human? Or were they the same bot that wrote your post? 😄

-2

u/G_oni_vv 18h ago

First, for testing, I had agents run tests — but of course you only know how to talk. And I use it to translate text because I’m not a native English speaker, and I use AI together with my friends to run tests and reviews and give explanations so I don’t get stuck on bugs for too long, and we ask for help with complex things, but here on Reddit people only know how to criticize.

3

u/XLBilly 18h ago

Nice em dash bozo

3

u/Poddster 14h ago

but here on Reddit people only know how to criticize.

We know how to spot bullshit. If your "independent reviewer" is Claude just say it.

5

u/Known_Tackle7357 19h ago

Why? What would you language solve? Why do you think existing languages don't solve it/solve it incorrectly?

4

u/johlae 19h ago

Who are you? You use 'I' and 'we' in your text, are you alone or are you part of a group? Are you in academia? Do you have credentials?

2

u/pixel293 18h ago

For me your "interesting" findings aren't that interesting. They are more "yeah of course" or " i could see that happening."

And from your tests/findings I can't figure out what problem you are trying to correct/solve. For instance the only i know to "solve" the FFI boundary would be to put all 3rd party calls in another process space, and you are going to pay for that with performance. Which i guess, if that is important for you, go for it, for me it's more the price of using 3rd party libraries.

2

u/Adorable-Strangerx 18h ago edited 18h ago

https://xkcd.com/927/

Also, seems you want to address reliability and safety issues. Try Rust. I have weird filling it solves most of your issues already

1

u/CerberusMulti 18h ago

Some nice "Trust me and my AI slop" post bro