this post was submitted on 16 Jun 2023
9 points (100.0% liked)

Programming Languages

1190 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 1 year ago
MODERATORS
 

As in /r/ProgrammingLanguages, we will have a thread every month where you can post PL-related projects you are working on. Unlike the main posts, this thread is much more lenient: you should post even if you only have minor updates or something tangentially related to programming languages.

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/13x2iv3/june_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 1 year ago* (last edited 1 year ago) (1 children)

Update: I wrote up a quick manual for the language explaining concepts in more depth and reworking the syntax

[–] KindaABigDyl 1 points 1 year ago (1 children)

Here's a couple example programs.

hello_world.mjut

# Print a simple hello world message
let msg :: &Char = "Hello, world!\n"
mutate:
- stdout write msg

truth_machine.mjut

# Truth machine - if you input a 1, it prints 1 forever
# But a 0, it prints 0 & quits
let inp :: Char = 0
mutate:
- stdin alloc_read_line # Read data into stdin :: &Char
- inp := stdin:0
- inp -= '0'
- if inp - goto quit;
- forever:
    + stdout write "1"
    + goto forever
- quit:
    + stdout write "0"

I think I have it fleshed out enough to get a basic version working. I'll write up a lexer and parser tomorrow (it's after midnight, so actually today lol) probably

[–] KindaABigDyl 2 points 1 year ago (1 children)
[–] KindaABigDyl 1 points 1 year ago

Parser done. Time for Code Generation. I'm going to transpile to C for now