Skip to main content

A simple 2D programming language.

Project description

Symbolang

a 2-dimensional, interpreted, programming language, inspired by befunge

intro

The main concept of a Symbolang program is the 'pointer'. the pointer is the imaginary cursor that executes each character one by one.

Variable scope

This is a stack based language, (at least for now)

There aren't really any variables, but you are able to push and pop values to and from the stack.

Syntax

Symbol Function
> Makes the pointer start moving left
< Makes the pointer start moving right
^ Makes the pointer start moving up
v Makes the pointer start moving down
? Random pointer direction
h horizontal if statement; pops value from stack, if value is 0, set direction to right, if it's anything else set it to left.
" toggles stringmode. if on, every character's ascii value will be pushed to the stack.
(single space) go to the next character
, pops value from stack and prints ascii character corresponding to that value.
. pops value from stack and prints it.
1-9 pushes corresponding value to stack.
/, *, +, or - pop two values from stack (a, then b), and then performs the operation on a and b and pushes result to stack.
I (CAPITAL I) gets a number or character from user, and pushes it to the stack.

Example Program

>" !dlroW ,olleH"v
^ ,,,,,,,,,,,,,, <

Table of functions

Use

simply clone the repo, git clone https://github.com/thelegendofmario/symbolang.git, then, place your .symb file into the directory, and in your terminal, type symbolang [argument] [your-file-here].

Arguments

if you run it with --debug, it will print debug info. docs on what it displays coming soon!

Changelog

  • v0.1.0
    • Made a debug mode. I feel like this is the first real version
  • v0.1.2
    • HUGE quality of life upgrade :)
    • programs usually looked like this: > 0 . 0 <, but now they look like this: >0.0<
  • v0.1.3
    • now this can be run as an actual CLI app.

Roadmap

  • At some point, it would be AMAZING if this had an interpreter in a compiled language (instead of being interpreted to be interpreted).
  • up and down movement of cursor <- completed
  • interactive REPL would be awesome
  • a tulip port

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

symbolang-0.1.3.tar.gz (3.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

symbolang-0.1.3-py3-none-any.whl (4.4 kB view details)

Uploaded Python 3

File details

Details for the file symbolang-0.1.3.tar.gz.

File metadata

  • Download URL: symbolang-0.1.3.tar.gz
  • Upload date:
  • Size: 3.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.14

File hashes

Hashes for symbolang-0.1.3.tar.gz
Algorithm Hash digest
SHA256 e22b191a16def2937eb07e7f838ac0b19a2664c9ec782ee02f4079498bfe838a
MD5 f25c4b791ee7977c5d230dfec31561e8
BLAKE2b-256 79616bf3f4c3faff9982a365d7566cdc6e69543b301f9cd2a0b0b632dfc79746

See more details on using hashes here.

File details

Details for the file symbolang-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: symbolang-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 4.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.14

File hashes

Hashes for symbolang-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 1d18807aaa36dfb47c9cf5fc19d7ed5933b9406f1eb0fb1e97294c05fbbeb4ee
MD5 f72f57be4434c3689583123b25becc8b
BLAKE2b-256 76e3c2d6f7f87d8f07b1ffefea90dfc684ddb20a4791defd701e52f1468e4466

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page