https://github.com/molnarmark/onlytoday
📅 An esoteric programming language for no reason whatsoever.
https://github.com/molnarmark/onlytoday
esolang esolangs esoteric esoteric-interpreter esoteric-language esoteric-programming-language
Last synced: 9 days ago
JSON representation
📅 An esoteric programming language for no reason whatsoever.
- Host: GitHub
- URL: https://github.com/molnarmark/onlytoday
- Owner: molnarmark
- Created: 2018-02-27T23:45:44.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2018-02-28T20:00:15.000Z (about 7 years ago)
- Last Synced: 2025-04-10T14:26:20.606Z (13 days ago)
- Topics: esolang, esolangs, esoteric, esoteric-interpreter, esoteric-language, esoteric-programming-language
- Language: JavaScript
- Homepage:
- Size: 9.77 KB
- Stars: 10
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-dev-fun - OnlyToday - A date and time based programming language. (Esoteric languages)
README
## 📅 OnlyToday
OnlyToday is an esoteric programming language that works with dates and times.\
The source code of an OnlyToday program is never the same!\
The syntax of the language depends on the date, more specifically, the **HOUR** you write the code in.\
You can find both the EcmaScript 5 and EcmaScript 6 implementation in the `src` directory.### Examples
You can find some example(s) [here](https://github.com/molnarmark/onlytoday/tree/master/examples).### The Idea
OnlyToday is stack based, and works with 13 instructions. They are as follows:| Instruction | Example | Operation |
|:-----------:|-----------------------|------------------------------------------------------------------------|
| PUSH | 2018 | Pushes '1' onto the stack |
| POP | I hate monday | Pops off the top of the stack |
| ASCII | 19 | Converts the top of the stack to a character |
| JUMP | 28 | Sets the instruction pointer to the address on top of the stack |
| COMPARE | 2 | Compares the top of the stack and the value at the instruction pointer |
| SUM | + | Pops the top two elements of the stack and pushes the result on top |
| DIF | - | Pops the top two elements of the stack and pushes the result on top |
| MUL | * | Pops the top two elements of the stack and pushes the result on top |
| DIV | / | Pops the top two elements of the stack and pushes the result on top |
| OUTPUT | 2019 will be my year! | Prints the whole stack to stdout |
| TODAY | today is a nice day | You can use today for comments |*The table values are based on 28 February, 2018*
### Don't murder me
OnlyToday is one of my very first stack based interpreters, so go easy on me. :smile:### License
OnlyToday is licensed under MIT.> OnlyToday is being worked on as of February 2018, and it does not support looping as of version *0.0.1*.