this post was submitted on 01 Jul 2023
14 points (100.0% liked)

Programming Languages

1188 readers
1 users here now

Hello!

This is the current Lemmy equivalent of https://www.reddit.com/r/ProgrammingLanguages/.

The content and rules are the same here as they are over there. Taken directly from the /r/ProgrammingLanguages overview:

This community is dedicated to the theory, design and implementation of programming languages.

Be nice to each other. Flame wars and rants are not welcomed. Please also put some effort into your post.

This isn't the right place to ask questions such as "What language should I use for X", "what language should I learn", and "what's your favorite language". Such questions should be posted in /c/learn_programming or /c/programming.

This is the right place for posts like the following:

See /r/ProgrammingLanguages for specific examples

Related online communities

founded 2 years ago
MODERATORS
 

How much progress have you made since last time? What new ideas have you stumbled upon, what old ideas have you abandoned? What new projects have you started? What are you working on?

Once again, feel free to share anything you’ve been working on, old or new, simple or complex, tiny or huge, whether you want to share and discuss it, or simply brag about it - or just about anything you feel like sharing!

The monthly thread is the place for you to engage /c/programming_languages on things that you might not have wanted to put up a post for - progress, ideas, maybe even a slick new chair you built in your garage. Share your projects and thoughts on others’ ideas, and most importantly, have a great and productive month!

Also see: https://www.reddit.com/r/ProgrammingLanguages/comments/14ngaly/july_2023_monthly_what_are_you_working_on_thread/

you are viewing a single comment's thread
view the rest of the comments
[–] KindaABigDyl 2 points 2 years ago* (last edited 2 years ago)

I'm still working on a simple language, and I haven't finished code gen yet bc I redid the parser and lexer using parser/lexer generating libraries instead of by hand in order to clean up the code and hit edge cases more easily.

This redoing led to a redesign of the language in many ways and to refinement on the purpose.

There is a niche of simplistic languages. C is king, and C-likes follow in pursuit. These languages are simple in terms of syntax. Very few features/keywords. However, I feel they don't always hold up to their simple ideals. In other words, C is a simple language that doesn't stay simple.

What do I mean?

C is "math-based" (like most programming languages) in that it has things like expressions and functions. It's a high level language, although less high and more simple than many others. I think that's a compromise. It's not high level enough to make full use of the abstractions the math stuff gives it, but its fundamental orientation towards expressions and functions means the deeper you get in a library or function that calls others, the more complex and less C-like it gets. Assembly, on the other hand, stays simple but 1) it's not uniform across devices and 2) it doesn't have much in the way of abstractions.

I wanted a language that lets me have my cake and eat it to. I need a language that's simple like assembly, based around jumps and mutating data, but has an abstraction system also built around that.

So I coined the term "mutator" to refer to a very strict, side-effecty function that can mutate certain kinds of data and created a trait-like system that can store mutators and be implemented for different kinds of data. Every mutator just calls into other mutators. This gives you equivalents to polymorphism and things, but as you get deeper it always stays simple.

On top of that I have an ML inspired syntax and a module system and have it compile to C, so you should be able to easily set up projects and build them anywhere.

I'm now like a third of the way through code generation