Welcome Guest [Log In] [Register]
FORTRAIN: Programming with Dragons
Topic Started: 29 Jun 2014, 21:45 (1538 Views)
Denumerable
User avatar
Dragon Egg

Meatfist the Angry (Linus Torvald's distant ancestor) PHD
 
The greatest problem currently facing computer science is the crippling shortage of dragons and also computers.
In an effort to revolutionize dragon-based project management methodology and bring software development forwards into the 10th century, I have designed and implemented a programming language based entirely on dragons and also computers. Even though the ANSI (American National Standards Institute) is currently deadlocked in a bureaucratic pow-wow involving european immigration controls, Chief Big Moon has assured me that a final RFC will be published before the next red wind. In anticipation of that event, I have decided to release an early draft to the Viking/Angles economic zone.

A web-based interpreter can be found HERE.

Example Code
Code:
 
>=>>>=>>>> >=>=>>>=>>=> >=>=>>=>=>>> >=>=>>=>=>>> >=>=>>=>=>=>=> >>=>>>>>> >=>>=>>=>=>=> >=>=>>=>=>=>=> >=>=>=>>>=>> >=>=>>=>=>>> >=>=>>>=>>> >>=>>>>>=>%
Enter the code into the SIIA and Execute it. The World will be greeted by the UIOIOC.
Code:
 
\>>>>>>>'> >>>>>>>'> <<<<<<<< <<<<<<<< ^ }#=_ : v >>>>>>>=> \=>=>=>=>=>=>=>=>%
Performs the NOR operation on two binary digits that you have entered into the UIOIOC. Eg, 00 -> 1.
Code:
 
\ :^,v>:^,v>:^,v>:^,v>:^,v>:^,v>:^,v>:^,v> \^'v <<<< <<<<
}%_

>>\'}#,_<<
\ :^,v>:^,v>:^,v>:^,v>:^,v>:^,v>:^,v>:^,v> \^'v <<<< <<<<
^,v >>\'}#,_<< ^'v
}>>>> >>>>_

>>\=>> >>>>
Converts the letters of the string you enter in to the UIOIOC to uppercase. Halts when the string ends and skips spaces.

Syntax Reference

By order of the king, upon your command, thine program is to be Imprisoned and Executed forevermore, repeating indefinitely until it reaches a state of Halting.
Note: The Extended Dragon Accumulator Register eXtended is abbreviated EDARX.

< JOURNEY_LEFTWARDS :
Move thyself left along the extent of the Infinite Tape of Dragons by the width of one Finite Unary Dragon Box.

> JOURNEY_RIGHTWARDS :
Move thyself right along the extent of the Infinite Tape of Dragons by the width of one Finite Unary Dragon Box.

^ ASCEND_TAPEWARDS :
Ascend to a higher plane of linear Infinite Tapes.

v DESCEND_ANTITAPEWARDS :
Descend to a lower circle of Infinite Tapes.

_ COMFY_ROCK :
It is known to the wise and the all that Dragons aloft on the Great Firmament will see that the rock is Good, and Rest upon it verily.

{ LEFTWARDS_FLYING_DRAGON :
Look upon the Edarx, and see if it is Filled. If a Dragon is present in the Edarx, Mount it and begin a journey Leftwards.

} RIGHTWARDS_FLYING_DRAGON :
Look upon the Edarx, and see if it is Filled. If a Dragon is present in the Edarx, Mount it and begin a journey Rightwards.

' ACQUIRE_DRAGON :
Look upon the Infinite Tape of Dragons, and judge the presence of a Dragon. If thou lookest upon the Cell and lo, a Dragon is present in the Cell, Transpose the Dragon to the Edarx.

, DEPOSIT_DRAGON :
Look upon the Edarx, and judge the presence of a Dragon. If thou lookest upon the Cell and lo, a Dragon is present in the Cell, Transpose the Dragon to the Infinite Tape of Dragons.

= MINGULATE :
The State of Dragon or Undragon in the Nearest Cell of the Infinite Tape of Dragons will become as is the State of the Edarx.

: MALBOLGE :
The State of Dragon or Undragon in the Edarx will become as is the State of the Nearest Cell of the Infinite Tape of Dragons.

# TRAP_DRAGON :
Trap a dragon and place it in the Extended Dragon Accumulator Register eXtended.

\ SLAY_DRAGON :
Eliminate the dragon present in the Extended Dragon Accumulator Register eXtended, commiting an act of heroism and receiving of the king's chest a reward many times great.

% BEFRIEND_DRAGON :
A violation of Holy Syntax. Seven times over do not use this command, as you will be labeled a Scoundrel and a Heretic and cast out of the Program, in a state of Halting.

Puzzles

Hail to the Chief('s son): [easy] (first solved by: alpha_dragon)
First rule of advertising? Go for the kids. In preparation for your sales trip to Berk, modify the Hello World program to greet Hiccup instead of the world.

Green Computing: [medium]
Your rolodex was out of date. Apparently, Hiccup is the chief now. He saw potential in the device, but refuses to sign off on the requisition order until the system is demonstrated to be compatible with his newly enacted animal rights laws. Modify the To Uppercase program to not use the TRAP_DRAGON or SLAY_DRAGONS operators.

Sieve of Eratosthenes: [medium]
The world's great philosophers and logicians have recently become concerned that their profession is slowly becomming accessible to commoners. To demonstrate that you can help them retain their chic-ness, write a program that implements the Exclusive Or operator.

Think Smart: [hard]
A new American company called IBM, (Iroquois Bison Machines) has announced a system that will soon compete with yours. You feel like your potential environmental friendliness is a selling point, but it is too inconvenient for most customers. To make it simpler for them, develop a transpiler in the language of your choice that can clean a program of all TRAP and SLAY operators without changing its behavior.

FAQ

why? why would anyone do this? WHY???
It wasn't so much "built" as "happened."

Your syntax reference is terrible.
sos ur mum

No, seriously. This makes no sense to me.
It's not cheating to read the interpreter's source.

Is a klein jug isomorphic to a 3-sphere?
No, but it is bijective to the directed graph of planck's unreals.

Isn't this just the language-that-shall-not-be-named-in-polite-company with dragon paint?
Ha! You wish. FORTRAIN doesn't even have integers.

Why is your coding style so bad?
Think of it like method acting, except for byzantine programming languages with terrible implementations.

So, this is like our version of FIM++?
Just as dragons are inherently superior to ponies, esolangs based on automa theory are inherently superior to those based on literate programming. So is the truth.

Does this actually have anything to do with dragons?
Yes, look at the thread title.
  PM (offline)     Profile     Quote  
 
NightoftheFury
User avatar
Shhh...Toothless is watching

*Starts reading post* :O

*Gets to the end* :blink:
  PM (offline)     Profile     Quote  
 
puxlit
Member Avatar
Better in Silhouette Form

I'm trying to imagine an immense Turing machine (complete with infinite tape) that would shuffle around dragons, and I'm... at a loss of words to describe how hilarious yet horrifying such a contraption would have been.
  PM (offline)     Profile     Quote  
 
alpha_dragon
Member Avatar
Dragon Egg

Spoiler: click to toggle
  PM (offline)     Profile     Quote  
 
Lastandir
User avatar
Gronckle

That's hilarious, great idea :D
All my experience is maybe 5 or 6 hours with fortran 90... Many years ago... But let's try :D

Green Computing done in half.
Edit: Almost done.
Spoiler: click to toggle
  PM (offline)     Profile     Quote  
 
Denumerable
User avatar
Dragon Egg

alpha_dragon
30 Jun 2014, 06:59
Spoiler: click to toggle
That is correct. I have updated the OP to reflect your accomplishment.
Lastandir
30 Jun 2014, 14:21
Green Computing done in half.
Edit: Almost done.
Spoiler: click to toggle
You might want to check your handling of spaces - in your current code, they are converted to nulls that end the string. This is because in ASCII the space character has the same delta from null as the lowercase letters have from capitals. Namely, that the 3rd bit is flipped.
  PM (offline)     Profile     Quote  
 
Users browsing this forum:
Users browsing this forum: No registered users and 3 guests
Print view
« Previous Topic · Other Fan Work · Next Topic »