{"id":16002657,"url":"https://github.com/seldom-se/tower","last_synced_at":"2025-10-12T14:11:39.365Z","repository":{"id":82063766,"uuid":"457522246","full_name":"Seldom-SE/tower","owner":"Seldom-SE","description":"Tower is an esolang with painfully vertical data storage","archived":false,"fork":false,"pushed_at":"2022-02-11T22:48:44.000Z","size":25,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-05T01:28:32.230Z","etag":null,"topics":["esolang","esoteric-language","esoteric-programming-language","programming-language","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Seldom-SE.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-02-09T20:44:25.000Z","updated_at":"2022-02-11T09:37:01.000Z","dependencies_parsed_at":null,"dependency_job_id":"15af3f38-6266-41f2-876b-ed81edd43096","html_url":"https://github.com/Seldom-SE/tower","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Seldom-SE/tower","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Seldom-SE%2Ftower","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Seldom-SE%2Ftower/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Seldom-SE%2Ftower/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Seldom-SE%2Ftower/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Seldom-SE","download_url":"https://codeload.github.com/Seldom-SE/tower/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Seldom-SE%2Ftower/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279011544,"owners_count":26084963,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-12T02:00:06.719Z","response_time":53,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["esolang","esoteric-language","esoteric-programming-language","programming-language","rust"],"created_at":"2024-10-08T10:02:33.517Z","updated_at":"2025-10-12T14:11:39.315Z","avatar_url":"https://github.com/Seldom-SE.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# T\n# o\n# w\n# e\n# r\n\n[![MIT/Apache 2.0](https://img.shields.io/badge/license-MIT%2FApache-blue.svg)](./LICENSE)\n\n## What is...it?\n\nIt's a esolang with painfully vertical data storage. You only get 3 registers to work with, though you can compress the registers into archives, but an archive takes a register, and it's difficult to avoid overwriting your own data when extracting them.\n\nIt's still a work-in-progress while I figure out whether it's powerful enough to solve complex problems. I think it's almost done, though.\n\nYes, the name is written vertically like that. I'm avoiding writing it as much as I can.\n\n## Syntax\n\n### Data Types\n\nThere are two data types: numbers and archives. Numbers can also be treated as UTF-8 characters in certain statements and expressions. Numbers are stored as 32-bit signed integers. Nonzero numbers are truthy, and zero is falsy.\n\nArchives have up to three registers of their own, each of which may contain a number or another archive. All archives are truthy.\n\n### Statements\n\nAny character tries to be a statement by default. A symbol only becomes an expression if a previous statement or expression coerces it into one. Later characters have coercion priority over earlier ones. For example (you may want to reference the tables below for this example), in `?\u0026bc#a[`, `?` coerces `\u0026` into an expression, which coerces `b` and `c` into expressions. `#` is the next available character, so `?` coerces it into a statement, and `#` coerces `a` into an expression. `?\u0026bc#a` is a complete statement, so `[` becomes a statement by default.\n\n| Statement | Description | Example | Example notes |\n| --- | --- | --- | --- |\n| `. \u003cExpr\u003e` | Print the expression as a number | `.:1` | Prints `1` |\n| `, \u003cExpr\u003e` | Print the expression as a character | `,;A` | Prints `A` |\n| `a \u003cExpr\u003e`, `b \u003cExpr\u003e`, `c \u003cExpr\u003e` | Store the expression in register `a`, `b`, or `c` | `a:1` | Stores `1` in register `a` |\n| `? \u003cExpr\u003e \u003cStmt\u003e` | Execute the statement if the expression is truthy | `?:0.:1` | Prints nothing |\n| `[` | Jump forward, just after the matching `]` | `?:1[.:1].:0` | Skips `1` and prints `0` |\n| `]` | Jump back, just after the matching `[` | `?:0[.:1].:0` | Prints `1` forever |\n| `# \u003cExpr\u003e` | Extracts the expression, if it's an archive. Registers are overwritten with the registers stored in the archive. Registers that do not have a value in the archive are not overwritten. | `#a` | Extracts the archive `a` |\n\n### Expressions\n\n| Expression | Description | Example | Example notes |\n| --- | --- | --- | --- |\n| `: \u003cNumber\u003e` | A number literal | `.:-1` | Prints `-1` |\n| `; \u003cCharacter\u003e` | A character literal | `.;A` | Prints `65` |\n| `.` | Read a number from the buffer. If the buffer is empty, it is refilled from stdin. | `a.` | Stores a number from stdin to register `a` |\n| `,` | Read the next character from the buffer. If the buffer is empty, it is refilled from stdin. The buffer will always end with `\\r`, then `\\n`. | `,,` | Echos a character from the buffer to stdout |\n| `a`, `b`, `c` | Gets the value of register `a`, `b`, or `c` | `.a` | Prints the value of register `a` as a number |\n| `+ \u003cExpr\u003e \u003cExpr\u003e` | Add two numbers | `.+:1:2` | Prints `3` |\n| `- \u003cExpr\u003e \u003cExpr\u003e` | Subtract two numbers | `.-:1:2` | Prints `-1` |\n| `* \u003cExpr\u003e \u003cExpr\u003e` | Multiply two numbers | `.*:4:3` | Prints `12` |\n| `/ \u003cExpr\u003e \u003cExpr\u003e` | Divide two numbers | `./:12:5` | Prints `2` |\n| `% \u003cExpr\u003e \u003cExpr\u003e` | Modulo two numbers | `.%:12:5` | Prints `2` |\n| `! \u003cExpr\u003e` | Logical NOT. Evaluates to `1` for any falsey value, and `0` for any truthy value. All archives are truthy. | `.!:-1` | Prints `0` |\n| `\u0026 \u003cExpr\u003e \u003cExpr\u003e` | Logical AND | `.\u0026:1a` | Prints `1` if register `a` is truthy, and `0` otherwise |\n| \u003ccode\u003e\u0026#124; \u0026lt;Expr\u0026gt;\u003c/code\u003e | Logical OR | \u003ccode\u003e.\u0026#124;:0a\u003c/code\u003e | Prints `1` if register `a` is truthy, and `0` otherwise |\n| `= \u003cExpr\u003e \u003cExpr\u003e` | Checks whether the expressions equal. Any archive is considered equal to any other archive. | `.=:-1-:3:2` | Prints `1` |\n| `\u003c \u003cExpr\u003e \u003cExpr\u003e` | Checks whether the first expression is less than the second | `.\u003c:3:5` | Prints `1` |\n| `\u003e \u003cExpr\u003e \u003cExpr\u003e` | Checks whether the first expression is greater than the second | `.\u003e:3:5` | Prints `0` |\n| `? \u003cExpr\u003e \u003cExpr\u003e \u003cExpr\u003e` | Conditional. If the first expression is truthy, it resolves to the second expression. Otherwise, it resolves to the third expression. | `,?;A;B;C` | Prints `C` |\n| `[ \u003cRegisters\u003e ]` | Creates an archive of the given registers | `c[ac]` | Creates an archive containing the current values of registers `a` and `c`, and stores it in register `c` |\n\n`+`, `-`, `*`, `/`, `%`, `\u003e`, and `\u003c` evaluate to `0` if either expression is an archive\n\n## Examples\n\nYou can find the examples in the `examples` directory. I recommend trying to solve some of these problems yourself first, and looking at examples if you need help. If following examples are roughly ordered by difficulty.\n\n| Example | Description |\n| --- | --- |\n| `hello_world.twr` | Prints `Hello, world!` |\n| `fibonacci.twr` | Prints Fibonacci numbers until it crashes from overflow |\n| `primes.twr` | Prints prime numbers |\n| `factorial.twr` | Calculates the factorial of a given number |\n| `99_bottles.twr` | Prints the lyrics to \"99 Bottles of Beer\". Reuses as much of the text as is practical. |\n| `echo.twr` | Echos the given input to output |\n| `bracket_checker.twr` | Checks whether given brackets are balanced |\n| `sort.twr` | This is an unfinished implementation of a sorting algorithm. Once this example is completed, and necessary modifications are made to the language, I plan to release its 1.0. |\n\n## Installation\n\nInstall Rust and clone the repo.\n\n## Usage\n\nRun a .twr file with `tower \u003cfile\u003e`. If running through cargo (which you should), it will look like `cargo run \u003cfile\u003e`.\n\n## Contributing\n\nIf you have a suggestion, bug report, or contribution, feel free to open an issue or pr.\n\n## License\n\nT\\\no\\\nw\\\ne\\\nr\\\nis dual-licensed under either\n\n* MIT License (LICENSE-MIT or http://opensource.org/licenses/MIT)\n* Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)\n\nat your option.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseldom-se%2Ftower","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fseldom-se%2Ftower","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseldom-se%2Ftower/lists"}