← Home ← Back to /g/

Thread 106396146

12 posts 2 images /g/
Anonymous No.106396146 [Report] >>106396241 >>106396373 >>106396376 >>106396409 >>106396432 >>106396464
Have you ever thought about making your own programming language?
Anonymous No.106396156 [Report]
yeah, been working on one for a while, it's nearly finished
Anonymous No.106396241 [Report]
>>106396146 (OP)
i did make one. i add a feature branch or two every year
keeps the brain mold growing in interesting ways.
Anonymous No.106396373 [Report] >>106396395
>>106396146 (OP)
>>>/pol/
Anonymous No.106396376 [Report]
>>106396146 (OP)
Based girl
No invaders
Anonymous No.106396395 [Report]
>>106396373
>>>/p/akistan is this way
Anonymous No.106396409 [Report] >>106396437
>>106396146 (OP)
Yes actually. I randomly have ideas about it and started making a list of what my language would theoretically have. I consider having your own language, or at the very least your own compiler, as a prerequisite for your own OS. But I'm still way too retarded to start making my own language, I need to learn a lot more about compiler codegen inner workings, IR, and how the fuck relocatable executables work.
I have a lot of either retarded or genius ideas, sometimes I can't really tell. Like as an example, one of the ideas for this language, is that you would edit the AST directly, instead of as a text file that gets parsed. It would mean really easy navigation by symbol, detailed version diffs (i.e. "added this function", "renamed this variable" instead of "added lines 20-34", "changed line 17") and consistent code style (since the actual code style is not saved), but it would require making a custom editor, build system, and version control to deal with versioning such files (because they are binary files instead of plaintext and git chokes on it). So I have to rewrite at the very least neovim, then later git, just for this language. It's unrealistic scope, but if it ever happens, it'll be so good.
Anonymous No.106396432 [Report]
>>106396146 (OP)
>Have you ever thought about making your own programming language?

No, because I use Lisp and if there is a feature missing in the language I can simply implement it straight away.

Instead of inventing a new programming language one should first review what is out there first. For example Ruby should have never been invented, it is just basically an inferior copy of Smalltalk.
Anonymous No.106396437 [Report] >>106396487
>>106396409
>is that you would edit the AST directly, instead of as a text file that gets parsed

Congrats, you have invented Lisp. Not bad.
Anonymous No.106396464 [Report]
>>106396146 (OP)
Yes. A kind of Pascal derivative.
Anonymous No.106396487 [Report]
>>106396437
Yeah, everyone copies Lisp nowadays. Another thing I steal from Lisp is have everything (e.g. math operators) as prefix functions instead of infix operators. The more I think about the language the more it looks more and more like Lisp. Maybe Lisp (or a dialect of it) is what I actually want. Heck, Lisp machines had OS made in Lisp, and there's some modern hobby OSes in Lisp too.
The problem is I got blackpilled hard on memory management and now despise garbage collectors. I want this language (if it ever exists) to compile to (as close as possible) perfect assembly code, and Lisp doesn't really have a notion of memory management. It's too high-level and abstract, which makes sense for what it was created for (science, machine learning, symbolic algebra), but unfortunately makes it difficult to achieve performance parity with C like Zig does.
Anonymous No.106396546 [Report]
No, we don't need another a hamster wheel for spergs.