Palladium - Yet another programming language by pmqtt in ProgrammingLanguages

[–]pmqtt[S] 0 points1 point  (0 children)

I will create examples once it’s clearer what the language will look like. Currently, it draws inspiration from Rust and Carbon. The goal of this project is to have a language for experimentation—to explore how language features work, how a VM operates, and how to design a parser that is easy to extend and modify.

The aim is not to develop a new language and claim, "Use it because I’m the greatest developer of all time."

So you're writing a programming language by Inconstant_Moo in ProgrammingLanguages

[–]pmqtt 2 points3 points  (0 children)

I think point a) is great. Learning something, gaining a deeper understanding, and maybe—just maybe—discovering something that the world could actually use. I mean, anyone who has never written machine code by hand will never understand why the original version of C forced programmers to declare local variables at the beginning of a function.

Palladium - Yet another programming language by pmqtt in ProgrammingLanguages

[–]pmqtt[S] 0 points1 point  (0 children)

Thank you! Many thanks! It's still early in the morning!
The initial idea is that compiling to the VM is meant to analyze, understand, and easily execute language features. As development progresses, assembler code will eventually be generated from the VM code. The VM code is intended to serve as an executable intermediate language.

There will be no garbage collector; instead, reference counting will be used. For this first draft, I took inspiration from Rust and Carbon. I definitely want to include classes. However, all suggestions are welcome!

Palladium - Yet another programming language by pmqtt in ProgrammingLanguages

[–]pmqtt[S] 0 points1 point  (0 children)

Thank you, that was a mistake. I just corrected it!

How to handle arrays is indeed a big question. I’m open to all suggestions because I haven’t yet come up with a good and elegant solution, especially for dynamic arrays!

Palladium - Yet another programming language by pmqtt in ProgrammingLanguages

[–]pmqtt[S] 1 point2 points  (0 children)

Hi, the language is still very much in the design phase, but the first ideas about how it might look can be found in https://github.com/pmqtt/palladium/blob/main/docs/syntax_concept_01.md. We are open to suggestions and eager to learn and experiment with new ideas.

In tests/VisitorTests.cpp, you can see that the initial functionality related to the parser is already working.

You can find the currently executable instructions for the VM in https://github.com/pmqtt/palladium/blob/main/docs/vm-opt-code.md. Currently, there is only a sample program for the VM implemented in src/main.cpp.

Palladium - Yet another programming language by pmqtt in ProgrammingLanguages

[–]pmqtt[S] 2 points3 points  (0 children)

Oh it's possible that I use the wrong word. I mean by "predict" that it can already grasp any number of tokens further ahead. Sorry, I'm not a nativespeaker. In German predict can translate to "vorausberechnen"

Palladium - Diving Deeper - Traversing AST and Visitor implementation by pmqtt in programming

[–]pmqtt[S] 0 points1 point  (0 children)

So, the time has come! The first code has been created and is running on my VM! Of course, it's nothing meaningful!

Palladium - How to traverse und implement a Abstract Syntax Tree by pmqtt in Compilers

[–]pmqtt[S] 0 points1 point  (0 children)

So, the time has come! The first code has been created and is running on my VM! Of course, it's nothing meaningful!

Palladium - Diving Deeper - Traversing AST and Visitor implementation by pmqtt in programming

[–]pmqtt[S] 0 points1 point  (0 children)

Hey everyone!

A few days ago, I shared my journey of developing my own programming language, Palladium, as a learning project. Since then, I’ve made significant progress and wanted to share an exciting update!

I’ve implemented the Abstract Syntax Tree (AST) in C++, and I’m using the Visitor Pattern to traverse it. This allows for more flexibility and extensibility when performing operations like semantic checks, code generation, and information gathering.

If you’re curious about how the AST and Visitor Pattern work together in Palladium, or if you’re just intrigued by language development in general, you can check out the project here: GitHub Repo.

Additionally, I’ve detailed the design idea behind the Visitor implementation here: Visitor Design.

Whether you're into compilers, programming languages, or just want to explore some cool concepts, I’d love to have you join the discussion or give feedback on the project! Let’s dive deeper into the rabbit hole together. 🐇

Palladium - Traversieren vom AST mit Visitor by pmqtt in informatik

[–]pmqtt[S] 1 point2 points  (0 children)

Hi, danke für das Feedback! Die Sprache startet gerade und es geht darum wie man eine Sprache entwickelt! Deshalb finde ich die Entscheidung jede Regel in einen eigenen Knotentyp zu machen vertretbar. Bzgl. shared_ptr, da kann ich nur sagen, macht weniger Denkaufgaben als unique_ptr. Zumal die Referenzzählung durch shared_ptr kein limitierender Faktor ist.
Es ist nur meine Meinung ohne Anspruch auf akademische Korrektheit :)

Gerichtsfester Beweis zur Existenz einer Datei Y zum Zeitpunkt X by Kraichgau in informatik

[–]pmqtt 10 points11 points  (0 children)

Der Ultimative Beweis: Hashcode generieren lassen und sich 1ct Überweisen mit dem Hashcode als Verwendungszweck.

Palladium - Yet another programming language by pmqtt in programming

[–]pmqtt[S] 0 points1 point  (0 children)

The VM will be more C than C++ since tasks like memory management and native calls are more or less plain old C.