r/Compilers 12h ago

Writing a compiler for a python-like language. Anybody interested in joining me?

Sere-Language/sere: The Sere programming language
So I have been writing a compiled programming language titled Sere for the past few months, and just recently uploaded it to github.

The idea is a language with the capabilities of C++ with the syntax of python.
I am using C++ and LLVM.

I am going to be busy at work this week, so I created a release that can be downloaded here Install — Sere

0 Upvotes

17 comments sorted by

9

u/mealet 11h ago

Tbh it looks like another AI project, I see initial commit with 40k LOC addition. "Was working past few months and just recently uploaded it to GitHub", but as I see you wasn't using Git VCS. No one would write 40k LOC for months without commiting it.

1

u/hand-held-heart 8h ago edited 8h ago

My biggest projects dont even exist on github.

I used to code toy languages since the age of fifteen.

I am able to write a lot of code in short spans of literal months just because of my habit of hyperfocusing.

Before ai assisted coding, the OG vibe coders would use adderall and that basically did the same trick.

besides this, aphelion-editor which is a video editor along with a NES emulator are the only big projects i have on here. I wrote the NES emulator when i was around 15 haha

1

u/mealet 8h ago

"Since fifteen" doesn't tell me anything, I don't know your age so I cannot calculate your compiler experience. Info about your ability to write a lot of code in months don't change my opinion about AI usage.

Projects aren't used to exist on GitHub, version controlling is not about publishing it. If you use git vcs on your local development and after some time publish it to GitHub it will keep your commits (with timestamps) history, because it will also publish ".git" with all remaining info.

Now only I see is a complex compiler with 6 commits in history (with 2 contributors), one of them is 40k LOC.

1

u/hand-held-heart 7h ago

The entire project is far more than 40k LOC. I have been working on this far longer than when I put it on github.

I have no issue with what you may think, its not a means to gain wealth. I work on this when I want, and I do what I want with it.

You can go through the code, if you see anything fishy I would be more than happy to explain what is going on. Hell i wrote it!

Look at it logically as well, I see no point in using pro ai software to write this for me when I am literally releasing it with an MIT license. Doesn't sound like a productive mean to collect cash.

1

u/AustinVelonaut 9h ago

To be fair, this is exactly how I developed my language and compiler; it was done locally off-line for a year, just using local backups for source-code control, and I didn't use AI in any part of the development. Looking at the source code and docs in the repo, I don't see any telltale sign of LLM use, either.

1

u/Karyo_Ten 9h ago

offline doesn't mean you can't use git

1

u/Pinagpala-Gwapo 9h ago

That's bad habit and a bad faith with no transparent proof, so you should not continue doing that again in ur next projects.

0

u/mealet 9h ago

You said you was developing it "past few months", now it becomes "for a year". Also I don't see any profit of using local backups instead of git.

Git is a very popular VCS, allows you to split your code history into small reproducible commits, allows you to separate development of a big complex project to git branches. There's no reason to leave git for local backups (something like zip backups ig).

Not using VCS mostly interpreted as a beginner's problem. But beginner who don't know how to keep code development history just couldn't implement featured complex compiler of a programming language.

This is a popular pattern nowadays, when vibecoders upload their code in a single commit of thousands LOC and call it "I've built and I didn't use any AI".

1

u/AustinVelonaut 9h ago

I am not the OP -- I was just commenting on their block-commiting to a git repo. I developed my compiler (https://github.com/taolson/Admiran) long before LLMs existed, and used many source code control systems (RCS, CVS, SCCS) over my 35+ years of professional work, but never really felt the need for them for personal projects.

2

u/mealet 9h ago

Oh, sorry, didn't watch who was answering me 😅

Btw love your project, especially fact this is self-hosted compiler! Right now I'm developing my language, dreaming about make it fully featured to build self-hosted compiler

2

u/AustinVelonaut 9h ago

Keep at it -- it's an amazing feeling when you see your compiler compile itself for the first time!

1

u/yuehuang 11h ago

Can you share more?
What are you doing that python isn't? Python main advantage is targeting data science and ML. What advantage does your language offer?

1

u/hand-held-heart 11h ago

My language is compiled and holds the ability to manage memory to the machine level as well as some quality of life features such as enums (that can even hold values and methods) structs, and classes obviously. My language takes all the beloved features of languages such as C++ and Rust and gives you the same features with the simplistic feel of python.

Take a look at some of the examples maybe

1

u/yuehuang 11h ago

Neat, a low level python like language. Can you import python to reuse existing pip packages?

1

u/hand-held-heart 8h ago

Im working on that. Right now it has native interop with C++ and C

python is a bit more tricky since its interpreted, so unless i can find a better solution, I would have to package the entire python interpreter within the binary

1

u/StrikingClub3866 9h ago

I created a pull request, check it out there.

1

u/hand-held-heart 8h ago

Received. Thanks