Victory Road  

Go Back   Victory Road > General > Technology
FAQ Community Today's Posts Search

Notices

 
 
Search this Thread
  #1  
Old December 18, 2008, 05:44:59 PM
SpaceMan++'s Avatar
SpaceMan++ SpaceMan++ is offline
Zoroark
 
Join Date: Aug 2008
Location: BC
Posts: 288
Default Esoteric Programming Languages

Recently, I browsed some esoteric programming languages(esolangs). Most esolangs are small, obfuscated.
Here are some:
Befunge
Code:
<v"Hello world"0
 <,_@#:
Befunge is 2D, ^V<> controls the flow of the program. For example, the program hits "V", then the interpreter will look down. After it detected ">", it will move right. The following code is an infinite loop:
Code:
>V
^<
It just goes right-down-left-up-right.
Brainf**k
Brainf**k has only 8 operators, they are:
+ increase current memory cell
- decrease current memory cell
< decrease memory pointer
> increase memory pointer
. prompt input
, print current memory cell
[ start loop
] go back to last [ if current memory cell is not zero
The following code will make first cell 5, second cell 3 and third cell 4:
Code:
+++++>+++>++++

Esolang wiki has all of them: http://esolangs.org/wiki/Main_Page
  #2  
Old December 18, 2008, 08:25:17 PM
Cat333Pokémon's Avatar
Cat333Pokémon Cat333Pokémon is offline
Administrator

 
Join Date: Nov 2006
Location: Nevada
Posts: 10,303
Default Re: Esoteric Programming Languages

I remember actually finding Brain**** on Wikipedia. I thought it was probably the weirdest language at that point. Befunge actually looks kind of cool.
  #3  
Old December 20, 2008, 07:01:33 PM
SpaceMan++'s Avatar
SpaceMan++ SpaceMan++ is offline
Zoroark
 
Join Date: Aug 2008
Location: BC
Posts: 288
Default Re: Esoteric Programming Languages

I created a new esolang based on BF and Befunge. It is BrainSpace 1.0 .
http://code.google.com/p/brainspace/

Let's think for an esolang based on Snowpoint City Gym, where you slide on ice.
  #4  
Old December 20, 2008, 07:08:10 PM
Cat333Pokémon's Avatar
Cat333Pokémon Cat333Pokémon is offline
Administrator

 
Join Date: Nov 2006
Location: Nevada
Posts: 10,303
Default Re: Esoteric Programming Languages

. = blank space (like the ice).
^v<> will only left you through if you come from the open end. Otherwise, you stop on the space in front of it (and accepts input).
x = space you stop on (and accepts input for a direction to move).
* = end.
+ = start.

Does that work?

Here is a sample field:
Code:
...<*>...
vv..^....
.x>.x..vv
.........
.......+.
.........
.xx....x.
  #5  
Old December 20, 2008, 09:29:28 PM
SpaceMan++'s Avatar
SpaceMan++ SpaceMan++ is offline
Zoroark
 
Join Date: Aug 2008
Location: BC
Posts: 288
Default Re: Esoteric Programming Languages

That will become a puzzle.
We should add some operators for input/output
  #6  
Old December 22, 2008, 08:46:46 PM
Cat333Pokémon's Avatar
Cat333Pokémon Cat333Pokémon is offline
Administrator

 
Join Date: Nov 2006
Location: Nevada
Posts: 10,303
Default Re: Esoteric Programming Languages

Input is requested at every stopping space, asking for a direction to move. Output is presented at every space, telling you what directions you can move.

Another way is that the map could be hidden and the output will be what is in each direction.
  #7  
Old December 23, 2008, 07:45:15 AM
SpaceMan++'s Avatar
SpaceMan++ SpaceMan++ is offline
Zoroark
 
Join Date: Aug 2008
Location: BC
Posts: 288
Default Re: Esoteric Programming Languages

It should have a way to do math and output texts.

Memory Registers:
  • Direction: Integer from 0 - 3 When it reached 3, it set back to 0[list:1zsf7pgb]
  • 0=right[/*:m:1zsf7pgb]
  • 1=down[/*:m:1zsf7pgb]
  • 2=left[/*:m:1zsf7pgb]
  • 3=up[/*:m:1zsf7pgb]
[/*:m:1zsf7pgb][*]Memory Pointer like in BF can be -1 (-1 for changing direction)[/*:m:1zsf7pgb][*]Memory: 3000(or pre-allocated) memory cells like in BF[/*:m:1zsf7pgb][/list:u:1zsf7pgb]
. Ice, it makes you keep moving forward
^v<> will only left you through if you come from the open end. Otherwise, you stop on the space in front of it (and accepts input).
x = space you stop on , and it moves automatically based on the direction.

+ = Increase Memory under the pointer.
- = Decrease Memory under the pointer.

{ = Decrease Memory Pointer
} = Increase Memory Pointer

[ = Rotate left for direction
] = Rotate right for direction

& = ask input one character
@ = output current memory under the pointer
$ = end.
* = start.

The following program will ask user to input and repeat the output:
Code:
*.&.V
....@
...$.
 

Forum Jump


All times are GMT -8.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Victory Road ©2006 - 2024, Scott Cat333Pokémon Cheney
Theme by A'bom and Cat333Pokémon