Skip to content

A strange and satirical language made from egirl slang coded in Rust.

License

Notifications You must be signed in to change notification settings

saikumarmk/uwucode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


Logo

uwucode

A language based around egirl slang...

Report Bug / Request Feature

Table of Contents

  1. What is uwucode?

    1. Technical details
  2. Getting started

    1. Cargo requirements
    2. Building
  3. Writing with uwucode

    1. Syntax
  4. Future plans

  5. Contributing

  6. License

  7. Contact

  8. Extra

    1. Why?
  9. Acknowledgements

What is uwucode?

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.

Technical details

TBA.

Getting Started

To get a local copy up and running follow these simple steps.

Cargo requirements

The toml file contains information on any dependencies which are automatically fetched.

Build Instructions

  1. Use Cargo to build uwucode.
    cargo build
    
  2. Done.

Writing with uwucode

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

Syntax

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

Roadmap

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

Contributing

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.

License

Distributed under the MIT License. See LICENSE for more information.

Contact

Sai kumar Murali krishnan - LinkedIn - theorvoltbusiness@gmail.com

Project Link: https://github.com/Theorvolt/uwucode

Extra

Why?

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/.

Acknowledgements

  • Thanks to Satya for inspiration on keywords for the language and designing the logo.

About

A strange and satirical language made from egirl slang coded in Rust.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages