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

Looking for hackers with the skills:

gcc tokipona language

This project is part of:

Hack Week 25

Activity

  • 8 days ago: dgarcia added keyword "language" to this project.
  • 8 days ago: dgarcia added keyword "gcc" to this project.
  • 8 days ago: dgarcia added keyword "tokipona" to this project.
  • 8 days ago: lkocman liked this project.
  • 14 days ago: mcalabkova liked this project.
  • 20 days ago: dpopov liked this project.
  • 20 days ago: dgarcia started this project.
  • 20 days ago: dgarcia originated this project.

  • Comments

    • dgarcia
      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.

    • dgarcia
      4 days ago by dgarcia | Reply

      The week was very productive. At the end I have an almost functional programming language.

      Current support:

      1. Variable declaration and assignment
      2. Basic arithmetic for int and float types
      3. Basic types: int, float, string literal
      4. Control flow with if-else
      5. Loops
      6. Basic functions. Support return, but don't support arguments yet
      7. Print statement
      • An example source code that build can be found here
      • The current compiler gcctoki can be built from toki branch 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!