Aktionen

Beatnik: Unterschied zwischen den Versionen

Aus exmediawiki

Zeile 233: Zeile 233:
 
</pre>
 
</pre>
  
=Online Interpreter=
+
=notes/links=
 
https://tio.run/#beatnik
 
https://tio.run/#beatnik
 +
 +
* online-interpreter mit hello-world: https://tio.run/##PVbbTus4FH33V@zyMiBBPmB4GJVDTk@lAkdNmXl24l3XqmNHvoCYn2fWdquRgJDE9r6sy87IugR3/v4eok75nrxO57xU@TdpF3KntsG4XFyYSuCM@xedXKQcdPJ0G7CSsTboUpP8k6rn3HXdHWUOucaa/RclLslxJhu179TaJjfW7OQ4zn/QFHPJtOiE4C5QiguW3s5yuSNdS2xrcHqnDjVwIj2PrjgcfUnop3elU8@xJuJQ4jzOuHRqx1Z7bM1a9pxdwI9FiCVzp15ZYlrvZOVzYm3uqTg2dKzXQgzOw76aq/ZU6hwT2VQDdmlfJIkSg/aKyOo00qW@fIrVG044Z4qteQedC5OmD1zJV@ljy3kozjPlUgOy0IZyHW2KdUEMPSPJINU@J30szISTWi4pavMnTXU6R29o9MjmHmekWrA/BMepU3tGvxmwMDoayoldnv8kncoX4qC7LQraaxnrUSYW3aHygpJwV3QpvuHJYEOnnnw9HhG5aIDxF9HWIGvjUPuMwDFaXqmfXFAvYqEBOpw9S4tsZSzf8@wKUHfSMBtrWQlMo4TIVBACG0uU3T6edKZP5z2Zij9WBwvsNCfXQCzaNSx9dRPnR7Wp4E5BoSaviDb684zq6YRzVkr1oQE0Smsyg31ZMvQx4@nIkkr9wm0tqPBHTeXCOj1nND7nSJ/swMW61NwQAkMOqaJAbEZXUKSbNVAtiBY6IoRzaHeJCQ9jctaBGEChuPmCiIFcgLd0YkRI9S7dpgks1ZDPo3pPQAMYFt3uGtiAyDhfC989qldkjhdPMbQLIlAG@YSQGmyTPQVic57wW3C70/86IdBPCA/YYzF9AKWExBLUGD8li3VBtRdOM2h18xs1AXm0uF2qP9bkJpp1APW90y6LfhqB70H7AnvwjTSJFwieajhql4DGNqASqSfEklc3Sg0e7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ks2w0EAHogIHRfX//Bw
 +
* interpreter für python2 (print-befehl anpassen): https://github.com/catseye/Beatnik
 +
* another beatnik-interpreter: https://github.com/palfrey/peacenik
 +
* esolangs-eintrag: https://esolangs.org/wiki/Beatnik
 +
* wikivisually-page: https://wikivisually.com/wiki/Beatnik_(programming_language)
 +
* page von beatnik-schreiber: http://cliffle.com/esoterica/beatnik/
 +
*  beatnik+shakespeare: https://tech.labs.oliverwyman.com/blog/2017/03/23/generating-beatnik-code/
 +
* esolangs in general:
 +
  * https://jaxenter.com/esoteric-languages-146286.html
 +
  * https://tomassetti.me/discovering-arcane-world-esoteric-programming-languages/
 +
 +
==scrabble-werte finden==
 +
 +
* https://scrabblemania.de/
 +
* https://gc.de/gc/scrabble/
 +
* scrabble anleitung: https://de.wikihow.com/Bei-Scrabble-gewinnen
  
 
[[Category:Esolangs]]
 
[[Category:Esolangs]]

Version vom 18. September 2020, 11:42 Uhr

In 2000, Cliff Biffle created Beatnik.

Beatnik is a stack-based language that consists only of English words. Every word is assigned a numerical score that it would get in a game of Scrabble. (Scrabble enthusiasts, drop your pitchforks, there may be some words that go against the official Scrabble rules.) Then, the value of the score determines the function.


Beatnik is a simple stack-oriented esoteric programming language, by Cliff L. Biffle. A beatnik program consists of any sequence of English words; each word is assigned the score you would get for it in a Scrabble game. The value of the score determines what function is performed. Functions include pushing the score of the next word onto the stack, testing the stack and skipping forward or backward in the program and other stack operations.


The interpreter reads the words in the poem, ignoring punctuation and whitespace and newlines; some functions are one word, other functions have an argument (they are two-word functions). Two-word functions are described below in the form "5,n". This means both the word whose value is 5 and the next word (whose value is 'n') are read.



Scrabble Character Values

--- ABCDEFGHIJKLMNOPQRSTUVWXYZ ---
 1: A   E   I  L NO  RSTU
 2:    D  G
 3:  BC         M  P
 4:      F H             VW Y
 5:           K
 6:
 7:
 8:          J             X
 9:
10:                 Q        Z
--- ABCDEFGHIJKLMNOPQRSTUVWXYZ ---


Commands

5	Push the next word's value onto the stack.
6	Pop a number from the stack and discard it.
7	Pop two numbers, add them, and push the result.
8	Input a character and push its value.
9	Pop a number and output it as a character.
10	Pop two numbers, subtract the first one popped from the second one popped, and push the result.
11	Pop two numbers, swap them, and push them back.
12	Pop a number and push it twice.
13	Pop a number and skip ahead n (actually n+1) words if the number is zero.
14	Pop a number and skip ahead n (actually n+1) words if the number isn't zero.
15	Pop a number and skip back n words if the number is zero.
16	Pop a number and skip back n words if the number isn't zero.
17	Stop the program.

noch überarbeiten:

5	Schiebe den Wert des nächsten Wortes in den Stack.
6	Nehme eine Zahl vom Stack und wirf sie raus.
7	Nehme zwei Zahlen, füge sie hinzu und drücken Sie das Ergebnis.
8	Geben Sie ein Zeichen ein und drücken Sie seinen Wert.
9	Geben Sie eine Zahl ein und geben Sie sie als Zeichen aus.
10	Pop zwei Zahlen, subtrahieren Sie die erste knallte von der zweiten knallte und drücken Sie das Ergebnis.
11	Pop zwei Zahlen, tauschen Sie sie und schieben Sie sie zurück.
12	Geben Sie eine Nummer ein und drücken Sie sie zweimal.
13	Geben Sie eine Zahl ein und überspringen Sie n (tatsächlich n + 1 ) Wörter, wenn die Zahl Null ist.
14	Geben Sie eine Zahl ein und überspringen Sie n (tatsächlich n + 1 ) Wörter, wenn die Zahl nicht Null ist.
15	Geben Sie eine Zahl ein und überspringen Sie n Wörter, wenn die Zahl Null ist.
16	Geben Sie eine Zahl ein und überspringen Sie n Wörter, wenn die Zahl nicht Null ist.
17	Beenden Sie das Programm.

Jeder andere Scrabble-Wert, der als Befehl interpretiert wird, ist ein ''No-Op''. 
Beachte, dass die Befehle, die den Werten 5, 13, 14, 15 und 16 entsprechen, jeweils ein zusätzliches Wort lesen, ihr als Parameter verwenden und dann überspringen. 
Ein Wert von weniger als 5 kann dazu führen, dass der Dolmetscher Dich wegen Deiner schlechten Scrabble-Fähigkeiten verspottet. 
Bei einem Wert über 23 erhältst Du einen "Beatnik-Applaus".




When Beatnik does arithmetic, it does it on a stack. For those of you who don't spend as much time doing this stuff as I do, a stack is very simple: you can push things onto the top of it, or take things off the top of it (in order, from top to bottom), and that's it. So, if you push 2 and 3, and then do an "add", 2 and 3 are "popped", added into 5, and then 5 is "pushed."

The numbers Beatnik deals with can range from 0 to 255.

Score Function German Translation
<5 Does nothing. The Beatnik Interpreter may mock you for your poor scoring, at its discretion. Low scoring words such as "I" or "of" are probably not good words to program with immediately after stealing all of the interpreter's cigarettes and stomping on its beret.
5 Finds the score of the next word and pushes it onto the stack. Skips the aforementioned next word.
6 Pops the top number off the stack and discards it.
7 Adds the top two values on the stack together (as described above)
8 Input a character from the user and push its value on the stack. Waits for a keypress.
9 Pop a number off the stack and output the corresponding ASCII character to the screen.
10 Subtract the top value on the stack from the next value on the stack, pushing the result.
11 Swap the top two values on the stack.
12 Duplicate the top value.
13 Pop a number from the stack, and figure out the score of the next word. If the number from the stack is zero, skip ahead by n words, where n is the score of the next word. (The skipping is actually n+1 words, because the word scored to give us n is also skipped.)
14 Same as above, except skip if the value on the stack isn't zero.
15 Skip back n words, if the value on the stack is zero.
16 Skip back if it's not zero.
17 Stop the program.
18-23 Does nothing. However, the score is high enough that the Beatnik Interpreter will not mock you, unless it's had a really bad day.
>23 Garners "Beatnik applause" for the programmer. This generally consists of reserved finger-snapping.
Ergebnis	Funktion
<5	Tut nichts. Der Beatnik-Dolmetscher kann Sie nach eigenem Ermessen wegen Ihrer schlechten Punktzahl verspotten. Wörter mit niedriger Punktzahl wie "I" oder "of" sind wahrscheinlich keine guten Wörter, mit denen man unmittelbar nach dem Diebstahl aller Zigaretten des Dolmetschers und dem Stampfen auf die Baskenmütze programmieren kann.
5	Findet die Punktzahl des nächsten Wortes und schiebt es auf den Stapel. Überspringt das oben genannte nächste Wort.
6	Löst die oberste Zahl vom Stapel und wirft sie weg.
7	Addiert die beiden obersten Werte auf dem Stapel (wie oben beschrieben)
8	Geben Sie ein Zeichen vom Benutzer ein und verschieben Sie seinen Wert auf den Stapel. Wartet auf einen Tastendruck.
9	Nehmen Sie eine Zahl vom Stapel und geben Sie das entsprechende ASCII-Zeichen auf dem Bildschirm aus.
10	Subtrahieren Sie den obersten Wert auf dem Stapel vom nächsten Wert auf dem Stapel und drücken Sie das Ergebnis.
11	Tauschen Sie die beiden obersten Werte auf dem Stapel aus.
12	Duplizieren Sie den oberen Wert.
13	Nehmen Sie eine Zahl vom Stapel und ermitteln Sie die Punktzahl des nächsten Wortes. Wenn die Zahl aus dem Stapel Null ist, überspringen Sie n Wörter, wobei n die Punktzahl des nächsten Wortes ist. (Das Überspringen besteht eigentlich aus n + 1 Wörtern, da das Wort, das uns n ergibt, ebenfalls übersprungen wird.)
14	Wie oben, außer überspringen, wenn der Wert auf dem Stapel nicht Null ist.
fünfzehn	Weiter zurück n Worte, wenn der Wert auf dem Stapel Null ist.
16	Springe zurück, wenn es nicht Null ist.
17	Beenden Sie das Programm.
18-23	Tut nichts. Die Punktzahl ist jedoch hoch genug, dass der Beatnik-Dolmetscher Sie nicht verspotten wird, es sei denn, es war ein wirklich schlechter Tag.
> 23	Garners "Beatnik Applaus" für den Programmierer. Dies besteht im Allgemeinen aus reserviertem Fingerschnappen.

Code-Example > Hello World!

Soars, larkspurs, rains.
Indistinctness.
Mario snarl (nurses, natures, rules...) sensuously retries goal.
Agribusinesses' costs par lain ropes (mopes) autos' cores.
Tuner ambitiousness.
Flit.
Dour entombment.
Legals' saner kinking lapse.
Nests glint.
Dread, tied futures, dourer usual tumor grunts alter atonal
  garb tries shouldered coins.
Taste a vast lustiness.
Stile stuns gad subgroup gram lanes.
Draftee insurer road: cuckold blunt, strut sunnier.
Rely enure pantheism: arty gain groups (genies, pan) titters, tattles, nears.
Bluffer tapes?  Idle diatom stooge!
Feted antes anklets ague?  Remit goiter gout!
Doubtless teared toed alohas will dull gangs' aerials' tails' sluices;
Gusset ends!  Gawkier halo!

Enter abstruse rested loser beer guy louts.
Curtain roams lasso weir lupus stunt.
Truant bears animate talon.  Entire torte originally timer.
Redo stilt gobs.

Utter centaurs;
Urgent stars;
Usurers (dilute);
Noses;
Bones;
Brig sonar graders;
Utensil silts;
Lazies.
Fret arson veterinary rows.

Atlas grunted: "Pates, slues, sulfuric manor liaising tines,
  trailers, rep... unfair!  Instant snots!"

Sled rested until eatery fail.
Ergs fortitude
  Indent spotter
Euros enter egg.
Curious tenures.
Torus cutlasses.
Sarong torso earns cruel lags it reeled.

Engineer: "Erase handbag -- unite ratification!"

oaring oaten donkeys unsold, surer rapid saltest tags
BUTTERED TIBIA LUGS REWIRING TOILETS
anion festers raring edit epilogues.
DIRGE ROTOR.
linnet oaring.
GORE BOOTIES.
Ironed goon lists tallest sublets --
Riots,
Raucous onset.

Ignobly, runners' diet anguishes sunrise loner.
Erode mob, slier switcher!
Loaners stilt drudge pearl atoll, risking hats' ends.

Rebind sitters.

Toga epistles -- crud lard.  (Pager purse dons souls.)

glob title a curio hired rites shed suds lade grease strut arctic revs toad
unless idlers rind stilt region land GERMICIDES SULTANA GUTS gill siting leans
nice spurs
tests gloves
roused asp

Holes!  Moles!  (Sores!)
Hygienists!  Scars!  (Asses!)
Smells spell rares.

Cubs instant sing in parse goodies.
Rosin.  Unhelpful sisal acres.  Slope told.
MALENESS PASTA LAB.  "Infirmary vine," rang illiterates (beans).
Rosin sours, insults truss abalones, nailed rules, helical atlases.
Dear remodeling stings mar rents.
Sunless shiner orb (silly idol.)
Clarity disses senna.
Vagabonds sauted; sloes performed gelds.
Alter post radial lip sectioning gums.
Saint Towellings.
Larger aeons telephone stolid char, pal!
Boats Dean forsook, rosters, tunas, terrariums -- united, traced.
Nude pagoda careens.

notes/links

https://tio.run/#beatnik

 * https://jaxenter.com/esoteric-languages-146286.html
 * https://tomassetti.me/discovering-arcane-world-esoteric-programming-languages/

scrabble-werte finden