Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/zeroplayerrodent/cavycode
Code like a Guinea Pig!
https://github.com/zeroplayerrodent/cavycode
esolang esolangs guinea-pig programming-language programming-languages rodents
Last synced: about 1 month ago
JSON representation
Code like a Guinea Pig!
- Host: GitHub
- URL: https://github.com/zeroplayerrodent/cavycode
- Owner: ZeroPlayerRodent
- Created: 2024-03-18T22:56:17.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2024-05-19T23:20:57.000Z (8 months ago)
- Last Synced: 2024-05-20T00:25:57.770Z (8 months ago)
- Topics: esolang, esolangs, guinea-pig, programming-language, programming-languages, rodents
- Language: Common Lisp
- Homepage:
- Size: 53.7 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# CavyCode
Code like a Guinea Pig!CavyCode is a lightweight programming language with a strong Guinea Pig theme.
Each function and keyword is inspired by actions and objects relating to Guinea Pigs.
CavyCode is both an interpreted and compiled language with the ability to compile to Common Lisp.
## Code Examples
Here are some simple snippets of CavyCode code.
For more programs, check out the [sample programs directory](https://github.com/ZeroPlayerRodent/cavycode/tree/main/samples).
Hello World:
```
Wheek-string "Hello, World!"
```Infinite counter:
```
Mark-territory 1
Wheek-int Tunnel
Wheek-char 10
Eat-hay 1
Zoomies-to 1
```
Truth-machine:
```
Eat-pellet Beg-int
Poop
Mark-territory 1
Wheek-int Tunnel
Popcorn-if 0
Zoomies-to 1
```## Computational Class
CavyCode is [Turing-Complete](https://en.wikipedia.org/wiki/Turing_completeness) due to its ability to simulate any arbitrary [Cyclic Tag System](https://en.wikipedia.org/wiki/Tag_system#Cyclic_tag_systems).
Check out [cyclic-tag.cavy](https://github.com/ZeroPlayerRodent/cavycode/blob/main/samples/cyclic-tag.cavy) for a CavyCode program that interprets any cyclic tag system defined by the user.
See also: [BF-CavyCode](https://github.com/ZeroPlayerRodent/BF-CavyCode/tree/main), a [Brainfuck](https://en.wikipedia.org/wiki/Brainfuck) interpreter written in CavyCode.
## Get Started!
You can build/run CavyCode directly from source, or you can download a (possibly outdated) pre-compiled binary from the releases tab.
CavyCode is only confirmed to work with the [CLISP](https://clisp.sourceforge.io/) Common Lisp implementation. Any other implementation may not work or may have issues running CavyCode.
After starting CavyCode by typing `./cavycode.mem` in your terminal, you can interpret a program by typing `(cavy-i "filename.cavy")`, or you can compile a program by typing `(cavy-c "filename.cavy")`.
Now that you have CavyCode set up, learn to write programs by reading the [documentation](https://github.com/ZeroPlayerRodent/cavycode/blob/main/info.txt)!