Skip to main content
Commonmark migration
Source Link

#AniRad, 237 bytes

AniRad, 237 bytes

#AniRad, 237 bytes

AniRad, 237 bytes

Source Link
Adnan
  • 44.5k
  • 6
  • 82
  • 246

#AniRad, 237 bytes

I doubt if this is the shortest solution:

 # # #   # # # #
#5+7*3      *2  =C
 / * +       *
#9*9+9+5+6      =C
   + *   +
#> 9*9+1+9  +9+8=C
   +     +   * *
#^ 9     > 4*6  =C
     +     *
#9+1*9+9+5+3  +4=C
   + -     * - +
#  6-6  +4*9+8 1=C
   = =     = = =
   C C     C C C

This is a 2D esolang which looks a bit like a magic square. This is a very early stage of the language, so a lot of new functions etc. will come in the future.

The # is the starting point of the pointer. The interpreter goes through every starting point. The order is based on the position of the #:

   4 5 6 7
   # # # #
1 #

2 #
 
3 #

If the position of the starting point is on the left, the pointer direction is right. If the position of the starting point is on the top, the pointer direction is down.

The +, -, * and / are just basic math operators. After reading a number from the pointer, every other number on it's path will be ignored until an operation has been executed, e.g. #4+3 5-2= is equivalent to #4+3-2=

The direction of the pointer can be changed with >, ^, < and v

To output a char, we use the =C. This outputs the result of all the math operators and converts the int to a char. If = is used, the interpreter will only print the result.

Here are all the paths executed in the program:

(1)  5+7*3*2           = (((5+7)*3)*2)            = 72  = H
(2)  9*9+9+5+6         = ((((9*9)+9)+5)+6)        = 101 = e
(3)  9*9+1+9+9+8       = (((((9*9)+1)+9)+9)+8)    = 108 = l
(4)  9*9+1+9+9+8       = (((((9*9)+1)+9)+9)+8)    = 108 = l
(5)  9+1*9+9+5+3+4     = (((((9+1)*9)+9)+5)+3)+4) = 111 = o
(6)  6-6+4*9+8         = ((((6-6)+4)*9)+8)        = 44  = ,
(7)  5/9*9+1+9+9+8     = ((((((5/9)*9)+1)+9)+9)+8)= 32  = 
(8)  7*9+9+9+6         = ((((7*9)+9)+9)+6)        = 87  = W
(9)  3+9*9+9-6         = ((((3+9)*9)+9)-6)        = 111 = o
(10) 6+9+4*6           = (((6+9)+4)*6)            = 114 = r
(11) 4*3*9             = ((4*3)*9)                = 108 = l
(12) 2*9*6-8           = (((2*9)*6)-8)            = 100 = d
(13) 8*4+1             = (8*4)+1                  = 33  = !