Hore

(Ne)užitočné programovacie jazyky

Na svete existuje 5 000 až 25 000 programovacích jazykov. Ale niektoré boli vyvinuté len pre srandu.

Facebook, YouTube ani Wikipedia by neexistovali bez programovacích jazykov ako Java, C++, JavaScript, Python, PHP či C#. Podľa hrubých odhadov existuje od 5000 do 25000 programovacích jazykov a ich odnoží. Z tých sa aktívne využíva približne 500 až 2000.

Záleží od veľa vecí, či sa programovací jazyk ujme a začne používať: rýchlosť, stabilita či zrozumiteľnosť. Existujú však aj jazyky, ktorých cieľom nie je, aby sa vo veľkom používali, ale aby pobavili.

Mnohé z nich posúvajú hranice toho, ako môže vyzerať plnohodnotný programovací jazyk a veľa z nich vzniklo len ako vtip. Aj keď sú funkčné, reálne sú nepoužiteľné.

Trochu infantilným príkladom je Pikalang, ktorý pozostáva len z príkazov pi, ka, chu. Milovníkov vláčikov zas poteší Rail, kde sa kód reprezentuje pomocou železnice tvorenej pomlčkami, lomítkami a ďalšími symbolmi.

Nás pobavil aj Shakespeare, kde je kód vlastne text napísaný v štýle veľkého anglického dramatika. Pre porovnanie si pozri program, ktorý vypíše „Hello, World!” v jazyku Shakespeare a v Pythone. Tak čo, ktorý sa ti páči viac? 🙂

Hello, World! v Pythone

print(„Hello, World!“)

Hello, World! v jazyku Shakespeare

Romeo, a young man with a remarkable patience.
Juliet, a likewise young woman of remarkable grace.
Ophelia, a remarkable woman much in dispute with Hamlet.
Hamlet, the flatterer of Andersen Insulting A/S.


                   Act I: Hamlet’s insults and flattery.

                   Scene I: The insulting of Romeo.

[Enter Hamlet and Romeo]

Hamlet:
You lying stupid fatherless big smelly half-witted coward!
You are as stupid as the difference between a handsome rich brave
hero and thyself! Speak your mind!

You are as brave as the sum of your fat little stuffed misused dusty
old rotten codpiece and a beautiful fair warm peaceful sunny summer’s
day. You are as healthy as the difference between the sum of the
sweetest reddest rose and my father and yourself! Speak your mind!

You are as cowardly as the sum of yourself and the difference
between a big mighty proud kingdom and a horse. Speak your mind.

Speak your mind!

[Exit Romeo]

                   Scene II: The praising of Juliet.

[Enter Juliet]

Hamlet:
Thou art as sweet as the sum of the sum of Romeo and his horse and his
black cat! Speak thy mind!

[Exit Juliet]

                   Scene III: The praising of Ophelia.

[Enter Ophelia]

Hamlet:
Thou art as lovely as the product of a large rural town and my amazing
bottomless embroidered purse. Speak thy mind!

Thou art as loving as the product of the bluest clearest sweetest sky
and the sum of a squirrel and a white horse. Thou art as beautiful as
the difference between Juliet and thyself. Speak thy mind!

[Exeunt Ophelia and Hamlet]


                   Act II: Behind Hamlet’s back.

                   Scene I: Romeo and Juliet’s conversation.

[Enter Romeo and Juliet]

Romeo:
Speak your mind. You are as worried as the sum of yourself and the
difference between my small smooth hamster and my nose. Speak your
mind!

Juliet:
Speak YOUR mind! You are as bad as Hamlet! You are as small as the
difference between the square of the difference between my little pony
and your big hairy hound and the cube of your sorry little
codpiece. Speak your mind!

[Exit Romeo]

                   Scene II: Juliet and Ophelia’s conversation.

[Enter Ophelia]

Juliet:
Thou art as good as the quotient between Romeo and the sum of a small
furry animal and a leech. Speak your mind!

Ophelia:
Thou art as disgusting as the quotient between Romeo and twice the
difference between a mistletoe and an oozing infected blister! Speak
your mind!

[Exeunt]

 

Príspevok pripravil RNDr. Miroslav Opiela.

Kontakt: miroslav.opiela@upjs.sk