From Esolang
Jump to navigation Jump to search

WALP (What A Limited Programming language) is a language designed by User:fr34k in 2008.

Basic WALP description

WALP is a programming language, consisting of a 16*16 "programming-grid", where the program is written. Inside this grid, there are several different static commands, called chunks, which can never be moved. Due to this, programming in WALP is extremely limited. Execution of different commands is done by moving the pointer trough the grid, by using other non-static commands, called flexes, which can be placed wherever inside the grid. When the pointer hits a static command, the command is executed and the pointer keeps moving. WALP has one memory pool represented by a '#', which one can increment, decrement or output. It has a minimum, starting value of 0 and a maximum value of 255. When the pool reaches above 255, it restarts at 0. Not only is # a memory pool, but also a chunk. Its different functions are stated below.

WALP chunks (static commands)

$ - Start of the pointer. From this, the pointer will begin moving right
# - Depending on from where it is hit by the pointer, it does the following
    Left - Increment pool by 1
   Right - Decrement pool by 1
      Up - Output pool
    Down - Empty pool
! - End of program. When the pointer hits this, the program exits

WALP flexes (non-static commands)

@ - Turn the pointer's direction clock-wise
o - While-statement. Depending on the accent of this letter, the while
    has different meanings. If the while-condition is true, the pointer will
    bounce back when it hits this instruction; if false, it will move straight
    through it.
  ó - While the pool is not 0
  ò - While the pool is not 255
/ - Bouncer. The pointer bounces back when it hits this.

Programming in WALP

When you start programming in WALP, you will begin with a 16*16 grid with the 3 chunks, looking like this:




This program will loop forever, because the pointer never reaches the exit. Whenever the pointer hits a wall, it will continue moving in the same direction, from the opposite wall.

This program increments the pool 1 time then outputs it and exit:

$        @

    @  @
     @ #  @
     @   @
    @     @
      @        @


The following program is a loop, constantly incrementing the pool, and User:PythonshellDebugwindow was here to explain how it works.

$  @

  @    #


The pointer starts at the "$", then moves right until it hits the first "@". It then turns clockwise, meaning it is traveling downwards, until it hits the furthest bottom-right "@". It then turns clockwise again, meaning it is going left, and then hits another "@", meaning it is traveling upwards, and then it finds yet another "@" and travels right again. It then reaches the "#" from the left and increments the pool, then eventually hits the wall, only to bounce back, reaches the "#" again but this time from the left, which decrements the pool, keeps going until it hits the "@" to its left, which causes it to move upwards, then it hits the top, bounces off the wall in a downwards direction, then moves of the same "@", now going right, and increments the pool by passing through the "@" again from the right, and this continues forever.

One of the difficulties when programming in WALP is the execution of a while-statement.


walp.rb - Ruby interpreter and graphic debugger by JayCampbell