Description
Toki Pona is a philosophical and artistic constructed language designed for its small vocabulary, simplicity, and ease of acquisition.
The idea is to bring the idea of simplicity to a new programing language using this language words and limitations to implement it.
The name for this programming language could be: "toki ilo" or "ilo pona". I will ask the community to get other ideas and also to get feedback about the initial design.
The idea is to start to implement something as a gcc frontend.
Goals
- The language design should be really simple but completely functional:
- functions
- variables
- conditional
- loop
- data structures
- The keywords should be from toki pona, and better if could be read as pseudo code in toki pona
- It should be possible to "compile" code written in sitelen pona
Resources
This project is part of:
Hack Week 25
Activity
Comments
-
8 days ago by dgarcia | Reply
I've started to work on the language initial definition in github
I've also shared the idea in the reddit community to get some feedback as soon as possible.
-
4 days ago by dgarcia | Reply
The week was very productive. At the end I have an almost functional programming language.
Current support:
- Variable declaration and assignment
- Basic arithmetic for int and float types
- Basic types: int, float, string literal
- Control flow with if-else
- Loops
- Basic functions. Support return, but don't support arguments yet
- Print statement
- An example source code that build can be found here
- The current compiler
gcctokican be built fromtokibranch in my gcc fork
This is the output that I get when running the binary compiled from
toki.ilo:$ ./gcc/install/bin/gcctoki -o toki examples/toki.ilo $ ./toki ma ale o, toki! nanpa li 5 tu en wan li seme e 3 nanpa li seme ala e wan nimi_lon li lon nimi_lon en nimi_ala li lon ala nanpa li lili luka la o sin - sin la nanpa li 0 - sin la nanpa li 1 - sin la nanpa li 2 - sin la nanpa li 3 - sin la nanpa li 4 - o pini - sin la nanpa mute li 0 e 0 - sin la nanpa mute li 0 e 1 - sin la nanpa mute li 0 e 2 - sin la nanpa mute li 1 e 0 - sin la nanpa mute li 1 e 1 - sin la nanpa mute li 1 e 2 - sin la nanpa mute li 2 e 0 - sin la nanpa mute li 2 e 1 - sin la nanpa mute li 2 e 2 ############# # toki pona # ############# mi insa e nasa_nanpa nasin nanpa nasa li 4 nanpa nasa li nanpa nasa
Similar Projects
This project is one of its kind!