From Esolang
Jump to: navigation, search

Elevator ambiguity

Is code like this illegal?





Or is this?




Betaveros 09:25, 4 January 2010 (UTC)

If an elevator can go both up and down it will go up. -Wh1teWolf 19:21, 7 January 2010 (UTC)

Some questions about walls and elevators

What will be behaviour in such a situation (error or something else)?


And, besides, another question. In the example in the article there is a part in which three elevators are situated near each other. What exactly is behaviour after lifting at first elevator and hitting the '>'? I think Mario should fall onto next '#', then continue moving right, fall onto the third elevator and fall from it before lifting to '"'. BurSer 15:45, 26 February 2010 (UTC)

This will not produce an error. It will simply continue, using the wall as a floor --(this comment by Wh1teWolf at 09:10, 24 July 2010 UTC; please sign your comments with ~~~~)


Does Mario destroy the objects he uses or do they stay there? For instance what does the following program:


Does it print 1 once and then nothing, or does it print 1 an infinite amount of time? Koen (talk) 22:50, 11 September 2012 (UTC)

Looking at this (though sadly, non-working) program, I suppose Mario does not destroy objects. T.J.S.1 (talk) 18:08, 24 August 2013 (UTC)
Correcting myself: it 'does' work! T.J.S.1 (talk) 13:13, 7 April 2014 (EDT)


Is there an interpreter for MarioLANG? If not, I can make one and publish it here. T.J.S.1 (talk) 20:57, 22 August 2013 (UTC)

No, T.J.S.1, there is no interpreter. But if you make one, I've got a good sample you can use to test it! It is in the thread "Good Sample Programs", and it is a Hello World program with comments. (Mario is supposed to ignore non-commands, right?) I also added a "castle" to end it in! --JWinslow23 (talk) 23:25, 21 September 2013 (UTC)

I found on Ohloh a project called "SuperMarioLang" based on this language, which unfortunately linked to a dead bitbucket page (which Wayback told was forbidden due to robots.txt). --Ørjan (talk) 23:47, 21 September 2013 (UTC)

Looked like a nice one indeed. A quick search on bitbucket revealed that neither that user of that repository still exist under the given name. However, my own interpreter is working and doing great (although there are of course still points for improvement). It can be found here. Slahh I add it to the wiki page? T.J.S.1 (talk) 00:51, 8 April 2014 (EDT)
Of course, please do. --Ørjan (talk) 06:07, 8 April 2014 (EDT)

Good sample programs

Is anyone willing to make any of the classic program examples in this language, like Hello World, Cat Programs, or working 99 Bottles programs? --JWinslow23 (talk) 18:23, 21 September 2013 (UTC)

I created a Hello World program (hoping MarioLANG won't crash when faced with $s and letter characters).

               MarioLANG Hello World    <
         = =============================^<
           |   Created by JWinslow23   |=^<
         = ==============================="=
========== =
         =================================#======= =
= ==================================================
================ =        |*
                        $$ $$
                >       $$ $$
               =========== ======

Anyone have any others? --JWinslow23 (talk) 19:31, 21 September 2013 (UTC)

I suspect the letters will work fine as the spec says unknown characters are comments. I am more uncertain about your castle made of elevators. :P

However, the original author never fleshed out everything exactly, and hasn't been seen in 3 years. His website is dead (and not on Wayback) and I don't remember him making any interpreter, so in my opinion whoever actually makes one gets to decide the missing details. --Ørjan (talk) 23:42, 21 September 2013 (UTC)

Oerjan, I didn't mean to make the castle out of elevators. I'll change it to $s. --JWinslow23 (talk) 00:25, 22 September 2013 (UTC)

Also, I think there should really be a Mario starting point command. It could be unclear. Anyone who makes the interpreter, either specify a character to use, or make you specify it with input. --JWinslow23 (talk) 03:57, 22 September 2013 (UTC)

Well, the other example programs seem to just start in something like the upper left corner/first character in file, and are written so that all the obvious interpretations of this are unambiguous. Your "Hello, World" on the other hand would have different effects dependent on interpretation, here are some I could think of:

  • First character of file would make Mario fall down onto the row of +'s, which probably doesn't give the right result.
  • First non-comment character means the < on the first line, and would probably work.
  • First character where Mario doesn't immediately fall would be above the first = on the second line. Happens to work because the > below gets him to move in the right direction either way.

None of these interpretations makes Mario go toward the right across the top text, which somehow seems to me like what was intended. Actually, making Mario start on the first non-space character would work for that, but means comments matter for the starting point.

And of course none of these interpretations work if you want to have stuff above the starting point for esthetic reasons. And I seem to recall that in Donkey Kong games Mario often starts at the bottom, not the top...

On the other hand I don't think it is appropriate for people other than the original author to add things to the language spec that are inconsistent with what's already there, including the examples. --Ørjan (talk) 13:10, 22 September 2013 (UTC)

Oerjan, there are two problems with your theory.

1. The first character is actually what I intended (this is my MarioLANG interpretation of the brainfuck Hello World example on this wiki), provided Mario automatically moves right when he hits ground and no directions are already specified. Apparently, the example in the article (and what I could make out of the 99 Bottles program) shows that that is how it would work out.

2. It will work. Mario goes in the loop after adding 10 to cell 0. Then you drop into the While loop, doing what is specified in the loop. Then, if cell 0 is not equal to 0, it stops moving after it gets on the elevator. If cell 0 is equal to 0, however, it ignores the ! and keeps moving after it triggered the elevator. Then it goes through the rest of the program, and then walks into my "castle" made out of dollar bill signs. It is a non-command, so Mario ignores these symbols. Then it falls through a hole in the ground, ending the program. --JWinslow23 (talk) 15:11, 22 September 2013 (UTC)

Oh, OK. I guess I should have actually read the program before assuming. :) --Ørjan (talk) 01:32, 23 September 2013 (UTC)

Cat program: (On the first input, input 0 for ASCII input and 1 for numeric input) (Assumes Mario starts in the top-left corner)

       <   <
  =====" =="

Poolala (talk) 16:52, 22 September 2013 (UTC)

Nice, Poolala! Now for my versions.

For numeric input:


For ASCII input:


Good, huh? I'm working on Just Another MarioLANG Hacker. --JWinslow23 (talk) 17:09, 22 September 2013 (UTC)

Truth machine:


Poolala (talk) 18:41, 22 September 2013 (UTC)

Weird! I am also working on a truth machine!

This version only accepts 1 and 0 as input, otherwise it starts again.

>;[!: Truth

Good, huh? --JWinslow23 (talk) 19:53, 22 September 2013 (UTC)

This program is a countdown program.

                      3 2 1 < BOOM by JWinslow23 <
                    = ======"=     = ============"
============================#====================#== =
                            |*  = ====================
                          $$ $$
                          $$ $$  <
                      ====== ======



Good, huh?--JWinslow23 (talk) 19:29, 24 October 2013 (UTC)

I also made a verbose Fibonacci calculator. It displays infinitely many Fibonacci numbers.

))))))++++++++++((((((+:)))))).(((((+:))))).(((((                                                                                                                                 <
================================================= ================================================================================================================================"=
                                                 >(            < >             <  >        < >        < >          <              >           <  >   <  >   < >         < >   <
=================================================== ==========="=" ============"==" ======="=" ======="=" ========="==============" =========="==" =="==" =="=" ========"=" =="=== =

Wow. --JWinslow23 (talk) 21:17, 24 October 2013 (UTC)

Smaller Fibonacci:

)  >((+)                                                                               
+  "===)
 ( ![<-<
>[!( !-< 
( "(+=")
+  +(  +

myname (talk) 02:47, 25 October 2013 (UTC)

Unverified brainfuck-to-MarioLANG translation

Unimplemented and untested. Could be moved to the article as a TC proof after some testing.

The non-loopy brainfuck instructions have trivial translations:

 bf  MarioLANG
 >   )
 <   (
 +   +
 -   -
 .   .
 ,   ,

The following construction should work for loops. For nested loops, simply put the lower two tracks as far down as necessary.

 brainfuck "aa[bb]cc":
    >          >
    "==        "=
 aa[! >  bb  [!!>cc
 ===# "=======##"==
      !  <<   <
         >>     !

Avoided attempts to walk over the top " ends of elevators due to timidity/uncertainty. If that works in a reasonable manner (drops to the bottom, then comes back up; or skips directly), the loop construction can be simplified.

--fizzie (talk) 21:46, 24 October 2013 (UTC)

Shouldn't it be...


A[!  [<>C
==# ==""=



A[!         <>E
==# ========""=
  >B[!   <>D[!!
  "==# ==""==##

--(this comment by JWinslow23 at 00:09, 25 October 2013‎ UTC; please sign your comments with ~~~~)

I don't see how the above can work. In both examples, after A, whether you skip the ! command or not, you will nevertheless fall down to B, so B will be executed at least once, unlike in the brainfuck version.

The following simplified construction might work, assuming you are allowed to walk over "s of elevators, but that seems unspecified:

 A[! [<>C

Although I personally think it's cleaner to have all the actual code on the same top floor, and only use the "basement" for skipping loops. It is probably possible to alter my original construction to only use one basement floor for going both directions, though.

--fizzie (talk) 17:53, 25 October 2013 (UTC)

Looking at the interpreter, it is possible to walk over "s. --JWinslow23 (talk) 19:36, 25 October 2013 (UTC)

99 Bottles of Beer help

I need help with this.

++)+)++))+)))++++++++++[!                     <>))))++++++++++[!                                                                     <>+)-)+++)++++++)-)+++++)+++)+++++)+)+)+)+)++)+)+)++[!    <>((((((([!                                               <>
========================# ====================""===============# ====================================================================""===================================================# ===""========# ==============================================""
                        >>-)+)+)++++++++++((([!!               >>-)+++++)++++++++++)+++++++++++)++++++++)++++++++)+++)++++)+(((((((([!!                                                   >>-([!!        >>-))[!                                      <>[!!
                        "=====================##               "=====================================================================##                                                   "====##        "=====# =====================================""=##
                                                                                                                                                                                                               >>))))))))[!                        <>[!!
                                                                                                                                                                                                               "==========# =======================""=##
                                                                                                                                                                                                                          >>((((((([!           <>[!!
                                                                                                                                                                                                                          "=========# ==========""=##
                                                                                                                                                                                                                                    >>-)[!   <>[!!
                                                                                                                                                                                                                                    "====# ==""=##

And that's only 266 commands into the BF program! HELP!

Either someone find me a shorter version, or make a BF-MarioLANG compiler, or SOMETHING!

--JWinslow23 (talk) 01:16, 25 October 2013 (UTC)

Never mind, there is a shorter version of 99BoB, and there is a BF-MarioLANG compiler in Python. is the file, the syntax is at as an example.

--JWinslow23 (talk) 19:40, 25 October 2013 (UTC)