lang-party / Summer2022

Lang Party 2022
24 stars 1 forks source link

F♭m #6

Open Hypercubed opened 2 years ago

Hypercubed commented 2 years ago

Entry

I'd like to submit f-flat-minor: https://github.com/Hypercubed/f-flat-minor/tree/main/racket

f-flat-minor (F♭m for short) is a stack-oriented language I've developed. The language itself is a subset of a bigger language with the restriction that the stack contains only one type... Big Integers. It's main porpose is to provide a mechinism for learning new languges. So far F♭m has been implemented in several host languages including TypeScript, cpp, go, and now Racket. Details on the language can be found here: https://github.com/Hypercubed/f-flat-minor/blob/main/README.md

An example of F♭m is:

#lang reader ff

/* factorial */

fact: dup 1 > [ dup 1 - fact * ] ? ;

/* string printing */

(prints): dup [ q< (prints) q> putc ] ? ;
prints: (prints) drop ;

0 'Factorial' 32 '100:' 10 prints

100 fact .

More examples are located here: https://github.com/Hypercubed/f-flat-minor/tree/main/ff

Note: files ending with ffp require a preprocessor that is currently only implemented in deno. I hope to get some preprocessor commands into the Racket implementation soon.

Licence

Text in this issue is licensed under the Creative Commons Attribution 4.0 International License http://creativecommons.org/licenses/by/4.0/

F♭m is under the MIT License

spdegabrielle commented 2 years ago

Thank you for your contribution.

Can I ask how you found out about the the summer lang party event?

best wishes Stephen

Hypercubed commented 2 years ago

Hello @spdegabrielle , I've been working on other implementations of f-flat-minor for a while then saw the announcement on reddit. Figured it was a good time to try Racket.