Karel (programming language) and Haverly's United Mastodon Minstrels: Difference between pages

(Difference between pages)
Content deleted Content added
m diacritics for Karel Capek
 
Amcaja (talk | contribs)
m removing from parent category of blackface minstrelsy category
 
Line 1:
[[Image:Haverly's United Mastodon Minstrels.jpg|thumb|right|275px|Poster featuring Haverly and his United Mastodon Minstrels]]
'''Karel''' is an [[educational programming language|educational]] [[programming language]] for absolute beginners, created by [[Richard E. Pattis]] in his book ''Karel The Robot: A Gentle Introduction to the Art of Programming''. Pattis used the language in his courses at [[Stanford University]]. The language is named after [[Karel Capek|Karel Čapek]], a [[Czech]] writer who introduced the word ''[[robot]]''.
 
'''Haverly's United Mastodon Minstrels''' was a [[blackface]] [[minstrel show|minstrel]] troupe created in 1877 when [[J. H. Haverly]] merged four of the companies he owned and managed. Borrowing techniques from showmen like [[P. T. Barnum]], Haverly [[advertising|advertised]] the Mastodons in broadsides, newspapers, and playbills: "FORTY—COUNT 'EM—40—FORTY—HAVERLY'S UNITED MASTODON MINSTRELS".{{ref|Toll-advertisement}} Another ad read, "Forty is a magical and historical number. In the time of Noah it rained forty days and forty nights. The Children of Israel wandered forty years in the wilderness. Haverly's famous forty are just as important."{{ref|Toll-40}}
== Principles ==
A program in Karel is used to control a simple robot (named Karel, of course) that lives in a city consisting of a rectangular grid of streets (left-right) and avenues (up-down). Karel understands five basic instructions: <code>move</code> (Karel moves by one square in the direction he is facing), <code>turnleft</code> (Karel turns 90&nbsp;° left), <code>putbeeper</code> (Karel puts a beeper on the square he is standing at), <code>pickbeeper</code> (Karel lifts a beeper off the square he is standing at), and <code>turnoff</code> (Karel switches himself off, the program ends). A programmer can create additional instructions by definining them in terms of those five basic, and using [[control flow]] statements <code>if</code>, <code>while</code>, <code>iterate</code>.
 
The Mastodons entered every new town in two columns, spread out as far as possible and led by a [[brass band]]. Beginning in 1878, a [[drum corps]] joined their ranks so that they could tour one part of a city while the band played in another. After sufficient marching, the two units joined up and led intrigued spectators into the theater. The company's manager, [[Charles Frohman]], showed off a three-foot-tall iron safe when the troupe arranged for accommodations, with a golden "Haverly's Mastodon Minstrels" blazoned on its side; only the troupe knew that the safe rarely held anything of value.
=== Example ===
As an example of Karel syntax, look at the following simple example:
BEGINNING-OF-PROGRAM
&nbsp;
DEFINE turnright AS
BEGIN
turnleft
turnleft
turnleft
END
&nbsp;
BEGINNING-OF-EXECUTION
ITERATE 3 TIMES
turnright
&nbsp;
turnoff
END-OF-EXECUTION
&nbsp;
END-OF-PROGRAM
 
The United Mastodon Minstrels and the aura that surrounded them were all about size. In one 1879 production in [[Chicago]], the curtain raised to reveal 19 minstrels. Behind them was another curtain, this one featuring a female figure representing "Dance". This went up and added another group of men, these standing in front of the figure of "Music". As this curtain lifted, the audience saw yet more men backed by the figure of "Art". This in turn rose, to complete the ensemble. The final backdrop was an image of two of Haverly's theaters.{{ref|Toll-curtains}}
== Variants and descendants ==
The language has inspired the development of various clones and similar educational languages. As the language is intended for beginners and children, localized variants exist in some languages, notably [[Czech language|Czech]] (the programming language was quite popular in [[Czechoslovakia]]). The [[Slovak language|Slovak]] version, called [[Robot Karol|Robot Karol++]], contains further enhancements and it has been itself translated to English and Czech.
 
In addition to size, the Mastodons' shows emphasized lavish scenery and extravagant expense. The program for an 1880 show addressed the audience: "The attention of the public is respectfully called to the magnificent scene representing a Turkish Barbaric Palace in Silver and Gold." The sketch began with minstrels portraying Turkish soldiers on a mountain. The scenery then changed to a royal palace, the scene of a dancing contest. For the finale, a number of unrelated scenes appeared, representing "Base-Ball", "The Dying Athlete", The Strong Defending the Weak", and "United We Stand". The third act consisted of a [[circus]] [[burlesque]], called "PEA-TEA-BAR-NONE'S KOLLOSAL CIRKUSS, MUSEUM, MENAGERIE AND KAYNE'S KICKADROME KAVALKADE".{{ref|Toll-grandeur}} The segment featured acrobats, bareback riders, clowns, tightrope walkers, and minstrels in elephant costumes.
The principles of Karel were updated to the [[object-oriented programming]] paradigm in a new programming language called Karel++. Karel++ is conceptually based on Karel, but uses a completely new syntax, similar to [[Java programming language|Java]].
 
Haverly's United Mastodon Minstrels saw great success, and the impact on minstrelsy was profound. Other troupe owners rushed to compete, mimicking the Mastodons' elaborate sets and large number of players. Ultimately, many smaller companies folded or were forced to travel further from the established minstrel circuits in order to survive.
== Reference ==
* Richard E. Pattis. ''Karel The Robot: A Gentle Introduction to the Art of Programming''. John Wiley & Sons, [[1981]]. ISBN 0471597252.
* Joseph Bergin, Mark Stehlik, Jim Roberts, Richard E. Pattis. ''Karel++: A Gentle Introduction to the Art of Object-Oriented Programming''. John Wiley & Sons, [[1996]]. ISBN 0471138096.
 
==Notes==
== External links ==
* [http://mormegil.wz.cz/prog/karel/prog_doc.htm Karel syntax]
* [http://csis.pace.edu/~bergin/karel.html Karel++]
* [http://xkarel.sourceforge.net/ xKarel]
* [http://www.robotkarol.sk/ Robot Karol++]
 
#{{note|Toll-advertisement}} Advertisement quoted in Toll 146.
[[Category:Programming languages]]
#{{note|Toll-40}} Advertisement Quoted in Toll 146.
[[Category:Educational programming languages]]
#{{note|Toll-curtains}} Toll 147.
[[Category:Imperative programming languages]]
#{{note|Toll-grandeur}} 3 January 1880 program, Jersey City, New Jersey. Quoted in Toll 147.
[[Category:Procedural programming languages]]
[[Category:Object-oriented programming languages]]
 
==References==
[[cs:Programovací jazyk Karel]]
 
[[sk:Karel (programovací jazyk)]]
*Toll, Robert C. (1974). ''Blacking Up: The Minstrel Show in Nineteenth-century America''. New York: Oxford University Press.
 
[[Category:Blackface minstrelsy]]
[[Category:American folk musical groups]]
[[Category:ProgrammingTheatre languagescompanies]]