Why Nomsu Exists
There's a lot of programming languages in the world, including many that you've never heard of. You might wonder why someone would bother to make another language. I'm not under any illusions that Nomsu is strictly better than another language like Python, C, Lua, or Lisp. However, it is absolutely possible for a small language like Nomsu to be better than any other language for a specific use case. Nomsu's specific use case is flexible natural language rule making.
The idea for Nomsu came from playing Nomic,
a game that revolves around manipulating its own rules. I played Nomic
with some friends in a group chat, and the initial rules were simply written
down and voluntarily enforced by the players. As the game's rules got more
complicated, I wrote some simple chat commands to facilitate gameplay. For
!end turn would end a player's turn, and
!give @person 5 points would give @person 5 points. It was a
simple and user-friendly syntax, and it helped keep things running smoothly.
However, it was very inflexible (e.g. you couldn't say
!give @person 2+3 points),
and I had to manually keep the code in compliance with the rules every time
I liked the idea of the chat commands, but wanted them to be more sophisticated and include a way to let users modify and make new commands. The commands necessarily had to express complex ideas like "you can only end your turn if it is your turn" or "you need majority approval to make a change to the rules". The original commands were implemented in Python, but I didn't want to have user-friendly commands that just forced you to write a bunch of Python code. I needed the user-friendliness to extend to encompass more complex ideas, which meant making a full programming language. Thus, Nomsu came into existence.
With Nomsu, a user could define an action like:
and use it by typing:
end my turn.
Or propose changes like:
The logic for
if it's your turn,
give $person $n points is written in Nomsu code.
Because of Nomsu's natural syntax, however, the meaning of the code should be a
lot more obvious than similar code written in other programming languages:
This is the heart of Nomsu: making it easy to write extremely readable
code and modify the rules of a system.