A language based around egirl slang...
Report Bug / Request Feature
uwucode is an interpreted language written in Rust and consists of a nonsensical grammar for keywords, for instance uwu and owo are used for function and variable declarations respectively. While the language itself brings no unique features, the code used to interpret the language is good for beginners who wish to learn about language design.
TBA.
To get a local copy up and running follow these simple steps.
The toml file contains information on any dependencies which are automatically fetched.
- Use Cargo to build uwucode.
cargo build
- Done.
Note: uwucode output often contains characters (emojis and colored text) that may not be readable by some terminals.
Upon building uwucode, one may open a REPL by passing in the argument repl as follows:
uwucode repl
Alternatively, you can execute a file by using the open argument, supplying a file path, for instance:
uwucode open example.uwu
uwucode does not enforce typing and is interpreted. It is also independent of whitespace, which means indenting and spaces don't matter, but you must terminate the end of a statement. To define a variable, one would write:
owo var = value :3
For the sake of reference, :3
can be replaced with ;
. For defining functions, the keyword uwu
is utilised:
uwu square(x) {sugoi x*x;};
There are more examples in the examples folder, however a list of all keywords include:
- owo - let
- uwu - define
- sugoi - return
- nuzzles - if
- dab - elif
- rawr - else
- truwu - true
- fowose - false
As of now, there are also three builtins:
- quwuit - Takes in zero arguments, terminates the program.
- len - Returns the length of a string.
- dprint - Takes in one argument, prints the object.
For more examples, please refer to the Documentation
TBD, but there's a lot I have in mind. As of now, a few things that will come are:
- while loops
- a more robust interpreter
- inputs
- basic logical operations
- compilation to bytecode
You forfeit any right to sue me should your sanity disappear while contributing to this code. Follow standard procedure if you wish to contribute, i.e fork->commit->pull request. You can also ask for a feature in the issues section.
Distributed under the MIT License. See LICENSE
for more information.
Sai kumar Murali krishnan - LinkedIn - [email protected]
Project Link: https://github.com/Theorvolt/uwucode
The inspiration for this language came about since a friend of mine had made a relatively simple gag language primarily using the letter X over here. I also wanted to learn a bit about language design and manually designing a parser was a painful but worthwhile experience. As for the actual language itself, we found it a funny idea to write docstrings in uwu speak, something I intend to add in the future. Either way, this language serves no practical use but is a great way to break into language design. I highly recommend checking out the following: https://interpreterbook.com/.
- Thanks to Satya for inspiration on keywords for the language and designing the logo.