TheSquare

From Esolang

Jump to: navigation, search

TheSquare is an esoteric programming language made by Ben Russell in 2006 which is inspired by Befunge.

Contents

[edit] Specification

[edit] Tasks & Memory

There is 32KB of shared RAM between the tasks.

There are 256 potential tasks with:

  • x and y position
  • direction
  • pointer to wherever it is in the 32KB memory given

Each task is allocated 128 bytes of the 32KB given; this is just so that it doesn't collide with other tasks.

If you make an interpreter that supports more than 256 tasks, please make sure that the memory size is at least 128*(number of tasks).

[edit] Commands

[edit] Movement

  • # - wall, programs bounce off
  • > - move right
  • v - move down
  • < - move left
  • ^ - move up
  • ] - rotate clockwise
  • [ - rotate counter-clockwise
  • J - jump over next instruction
  • L - leap: leap to next leap

[edit] Signals:

  •  ; - jolt, produce that value at jolt at other end, then bounce off
  •  : - unjolt, obtain that value at unjolt at other end, then bounce off
  • | - combined jolt/unjolt, hitting it just bounces you back
  • D - display; these show on the screen after a jolt or unjolt through one
    • a jolt makes it print from the task
    • an unjolt makes it print to the task
    • an unjolt will still pick up a value
  • K - keyboard access
    • one of these at the end of an unjolt will do a getch()

[edit] Calculations

  • + - increment accumulator
  • - - decrement accumulator
  • { - if nonzero go left
  • } - if nonzero go right
  • \ - same as BF's <
  • / - same as BF's >

[edit] Tasks

  • & - start new task on other end and bounce off
  • @ - kill the task

[edit] Examples

[edit] Hello World

This actually prints it in caps.

v#############@
+:DDDDDDDDDDD:[
+#;;;;;;;;;;;#
+              
+ ;;
+  >v      ;
+ JJ+      >v
+>^-+      J-
+/--+      --
v{>[<;;    --
/- +  >v;  --
+\ +;JJ+>v --
++ +>^++J- --
++ +J++++-;--
++ >^>^++->^-
++     ++-Jv<
>^     >^-+ ;
#      v-<+>[ ^
#      - ;+
#      >-[^

[edit] Licenses

[edit] Interpreter license

"TheSquare Interpreter" can be redistributed, and even modified, but it must be open-source and PLEASE contact me when you distibute it so I know what's where. Otherwise you can do whatever.

[edit] Specification license

It's now released as public domain. Just don't deface it.

[edit] Contact

Tell me here.

[edit] External resources

Personal tools