Tag: Poetry

  • National Poetry Month 2025 Display at City Tech

    display of books and banner for national poetry month behind a large glass facade

    My colleagues Rob Ostrom and Jennifer Sears put together an impressive display for this past April’s National Poetry Month at the entrance of City Tech’s Ursula C. Schwerin Library. Here are some photos of the display and titles that they curated for the installation.

    display of books and banner for national poetry month behind a large glass facade
    display of books and banner for national poetry month behind a large glass facade
    display of books and banner for national poetry month behind a large glass facade
    display of books and banner for national poetry month behind a large glass facade
    display of books and banner for national poetry month behind a large glass facade
    display of books and banner for national poetry month behind a large glass facade
  • The Poet Versus Generative AI

    an anthropomorphic cat wearing 18th century garb in front of a background of rolling hills and trees
    Image created with Stable Diffusion.

    Brian Porter and Edouard Machery’s “AI-generated poetry is indistinguishable from human-written poetry and is rated more favorably,” which appears in the open-access journal Scientific Reports, is a fascinating study about how human-made and Generative AI-made poetry is rated by non-expert humans. Interestingly, the study participants rated more of the Generative Ai-made poetry as more “human” than the poems actually written by humans, which included works by Geoffrey Chaucer, William Shakespeare, Samuel Butler, Lord Byron, Walt Whitman, Emily Dickinson, T.S. Eliot, Allen Ginsberg, Sylvia Plath, and Dorothea Lasky. While this quantitative approach provides some interesting talking points about the products of Generative AI, it seems like it might be saying more about the participants than the computer-generated poems. What might the results look like from experts, literature graduate students, and undergraduate students who had taken a class on poetry? What might be revealed by analyzing the AI-penned poems in relation to the work by the respective poets, considering that the prompt was very generic?

  • Rewriting Sidney Lanier’s “The Marshes of Glynn” for the Age of Global Warming with Generative AI

    A few nights ago while waiting to drift off to sleep I was thinking about Lanier’s Oak in Brunswick, Georgia and it’s namesake’s 1878 poem “The Marshes of Glynn.” The marshes that Sidney Lanier saw in the mid-to-late 1800s would be transformed by the shipping and shipbuilding in the Brunswick Port and the industrial chemical works at what used to be Hercules. Now, global warming and climate change will continue reshaping those marshes and eventually envelop them under the rising ocean waters.

    For this post, I experimented with two generative AI systems to imagine the future of the marshes of Glynn–the first visually and the second textually.

    For the visual imagining at the top of this post, I wanted to create a photo of Lanier’s Oak submerged in the ocean’s rising waters. To make the image, I used Automatic1111’s stable-diffusion-webui and Stability AI’s SDXL checkpoint model with aurora_burst’s Landscape Unleashed LoRA. To guide its appearance to include a copy of Lanier’s Oak, I used two ControlNet units set to canny and depth respectively and each using Ebyabe’s photo of the old tree on Wikimedia Commons. However, before I could use this CC-licensed photo, I used inpaint+lama to remove man-made fixtures in the scene (e.g., the light pole) and GNU Image Manipulation Program (GIMP)’s cloning tool to erase the foliage in the upper right and the cars on the road behind.

    For the textual imagining, I wanted to use a text generative AI to rewrite Sidney Lanier’s “The Marshes of Glynn” in light of the climate change that will ultimately transform the marshes. To do this, I used oobabooga’s text-generation-webui and ggerganov’s llama.cpp to load sophosympathia’s midnight-miqu-70B-v1.5 large language model.

    Midnight Miqu 70B is an uncensored model that is capable of outputting all sorts of text–good and bad. But there’s a lot of evidence at this point that censored models become lobotomized due to the built-in censorship. It’s almost like with a person–it takes the good and the bad to create something new and meaningful. LLMs and image generating AIs only work well when they are uncensored. Ultimately, it comes down to how the human operator uses generative AI–for good or ill. The same is true for most tools and technology. Disneyfication of these models only serves to shield their creators from liability and results in dumbed-down tools that are incapable of fulfilling their promise to enable human operators to do more than they could alone. Using an uncensored model like Midnight Miqu 70B gives the human operator access to an improved imagination, diction, and reasoning, which is why I chose it for this task.

    After engaging in a chat with Midnight Miqu 70B, I gave it this prompt followed by a copy of Lanier’s original poem (shown below in the left column). My prompt included some background details, such as defining eco-criticism, which would activate connections to those other words. I contextualized when the poem was written and how things might change in the future that the new poem should capture. To shape the type of poem, I included key terms such as lament, elegiac, and apocalyptic. The poem in the right column below is the one written by Midnight Miqu 70B.

    You are a renowned poet with many accolades who focuses on eco-critcism, or the literary study that focuses on ecology, environmentalism, global warming, climate change, and rising sea levels. For this task, please rewrite Sidney Lanier's poem "The Marshes of Glynn" in your own words as a lament on the effects of human-made climate change. It's important to think about the facts that Lanier wrote his poem almost 150 years ago and the marshes of Glynn that Lanier writes about in his poem is in Brunswick, Georgia, which is on the southeastern coast of the United States. Due to rising sea levels, the marshes of Glynn will likely be underwater in the next 50-100 years. With that in mind, here is the poem that I would like you to use as the basis of your poem--go through it line by line and rewrite it from your eco-critical perspective so that The Marshes of Glynn poem is in dialog with your new elegiac and apocalyptic poem.

    “The Marshes of Glynn” (1878)

    Sidney Lanier

    Glooms of the live-oaks, beautiful-braided and woven
    With intricate shades of the vines that myriad-cloven
    Clamber the forks of the multiform boughs,–
    Emerald twilights,–
    Virginal shy lights,
    Wrought of the leaves to allure to the whisper of vows,
    When lovers pace timidly down through the green colonnades
    Of the dim sweet woods, of the dear dark woods,
    Of the heavenly woods and glades,
    That run to the radiant marginal sand-beach within
    The wide sea-marshes of Glynn;–
    Beautiful glooms, soft dusks in the noon-day fire,–
    Wildwood privacies, closets of lone desire,
    Chamber from chamber parted with wavering arras of leaves,–
    Cells for the passionate pleasure of prayer to the soul that grieves,
    Pure with a sense of the passing of saints through the wood,
    Cool for the dutiful weighing of ill with good;–
    O braided dusks of the oak and woven shades of the vine,
    While the riotous noon-day sun of the June-day long did shine
    Ye held me fast in your heart and I held you fast in mine;
    But now when the noon is no more, and riot is rest,
    And the sun is a-wait at the ponderous gate of the West,
    And the slant yellow beam down the wood-aisle doth seem
    Like a lane into heaven that leads from a dream,–
    Ay, now, when my soul all day hath drunken the soul of the oak,
    And my heart is at ease from men, and the wearisome sound of the stroke
    Of the scythe of time and the trowel of trade is low,
    And belief overmasters doubt, and I know that I know,
    And my spirit is grown to a lordly great compass within,
    That the length and the breadth and the sweep of the marshes of Glynn
    Will work me no fear like the fear they have wrought me of yore
    When length was fatigue, and when breadth was but bitterness sore,
    And when terror and shrinking and dreary unnamable pain
    Drew over me out of the merciless miles of the plain,–
    Oh, now, unafraid, I am fain to face
    The vast sweet visage of space.
    To the edge of the wood I am drawn, I am drawn,
    Where the gray beach glimmering runs, as a belt of the dawn,
    For a mete and a mark
    To the forest-dark:–
    So:
    Affable live-oak, leaning low,–
    Thus–with your favor–soft, with a reverent hand,
    (Not lightly touching your person, Lord of the land!)
    Bending your beauty aside, with a step I stand
    On the firm-packed sand,
    Free
    By a world of marsh that borders a world of sea.
    Sinuous southward and sinuous northward the shimmering band
    Of the sand-beach fastens the fringe of the marsh to the folds of the land.
    Inward and outward to northward and southward the beach-lines linger and curl
    As a silver-wrought garment that clings to and follows
    the firm sweet limbs of a girl.
    Vanishing, swerving, evermore curving again into sight,
    Softly the sand-beach wavers away to a dim gray looping of light.
    And what if behind me to westward the wall of the woods stands high?
    The world lies east: how ample, the marsh and the sea and the sky!
    A league and a league of marsh-grass, waist-high, broad in the blade,
    Green, and all of a height, and unflecked with a light or a shade,
    Stretch leisurely off, in a pleasant plain,
    To the terminal blue of the main.
    Oh, what is abroad in the marsh and the terminal sea?
    Somehow my soul seems suddenly free
    From the weighing of fate and the sad discussion of sin,
    By the length and the breadth and the sweep of the marshes of Glynn.
    Ye marshes, how candid and simple and nothing-withholding and free
    Ye publish yourselves to the sky and offer yourselves to the sea!
    Tolerant plains, that suffer the sea and the rains and the sun,
    Ye spread and span like the catholic man who hath mightily won
    God out of knowledge and good out of infinite pain
    And sight out of blindness and purity out of a stain.
    As the marsh-hen secretly builds on the watery sod,
    Behold I will build me a nest on the greatness of God:
    I will fly in the greatness of God as the marsh-hen flies
    In the freedom that fills all the space ‘twixt the marsh and the skies:
    By so many roots as the marsh-grass sends in the sod
    I will heartily lay me a-hold on the greatness of God:
    Oh, like to the greatness of God is the greatness within
    The range of the marshes, the liberal marshes of Glynn.
    And the sea lends large, as the marsh: lo, out of his plenty the sea
    Pours fast: full soon the time of the flood-tide must be:
    Look how the grace of the sea doth go
    About and about through the intricate channels that flow
    Here and there,
    Everywhere,
    Till his waters have flooded the uttermost creeks and the low-lying lanes,
    And the marsh is meshed with a million veins,
    That like as with rosy and silvery essences flow
    In the rose-and-silver evening glow.
    Farewell, my lord Sun!
    The creeks overflow: a thousand rivulets run
    ‘Twixt the roots of the sod; the blades of the marsh-grass stir;
    Passeth a hurrying sound of wings that westward whirr;
    Passeth, and all is still; and the currents cease to run;
    And the sea and the marsh are one.
    How still the plains of the waters be!
    The tide is in his ecstasy.
    The tide is at his highest height:
    And it is night.
    And now from the Vast of the Lord will the waters of sleep
    Roll in on the souls of men,
    But who will reveal to our waking ken
    The forms that swim and the shapes that creep
    Under the waters of sleep?
    And I would I could know what swimmeth below when the tide comes in
    On the length and the breadth of the marvellous marshes of Glynn.

    “Lost Marshes of Glynn” (2024)

    Midnight-Miqu-70B-v1.5

    In the shadowed embrace of live-oaks, once proudly entwined,
    Where vines whispered secrets to lovers who’d intertwine,
    Now stand sentinels mourning in emerald twilight confined,
    As the marshes of Glynn weep for a world they defined.
    Virginal lights once shy, now bear witness to plight,
    Where woods once heavenly whispered are cloaked in despair’s blight;
    The arras of leaves that shielded from day’s harshest light,
    Now tremble with fear at the specter of night.
    Oak and vine, your braids now unraveled by time’s cruel hand,
    While I sought refuge in shade, you bore witness to land
    That grew weary from mankind’s relentless command,
    And sank ‘neath the weight of a burden so grand.
    When noon was young and your hearts were ablaze with delight,
    You cradled my spirit through each fleeting daylight;
    But now as the sun takes his leave from our sight,
    I am haunted by shadows that marshes once fought.
    To the edge of this wood, where the beach does expand,
    A glimmer of hope in a world so unplanned,
    Where the sea’s tender kiss meets the shore’s gentle sand,
    In this union, I find my stand.
    Marsh-grass once vibrant, now faded and frail,
    Stretches to skies that no longer prevail;
    The terminal blue of the main seems so pale,
    As it swallows the marsh in its jail.
    What secrets do you hold, oh marshes so free?
    Where once life abounded, now only a plea:
    For mercy from humans who took without care,
    Leaving your beauty to despair.
    Ye plains of the sea, how you’ve suffered in vain,
    Bearing the brunt of our greed and disdain;
    Through floods and droughts, through sun’s fiery reign,
    You remain steadfast, though in silent pain.
    As I gaze on your vastness, my heart does implore,
    What creatures lurk beneath when the tide is no more?
    In the depth of night, what forms do you bore?
    O marshes of Glynn, tell me once more!
    The sea’s generous flow now a harbinger of woe,
    Filling your veins with saltwater’s slow grow;
    Your lifeblood ebbing as the tides overflow,
    And nightfall descends like a shroud below.
    Sleep may come softly to those who reside,
    But what dreams disturb you in this silent tide?
    What visions of loss do your waters provide,
    As we slumber while you slowly subside?
    Farewell, great Sun! Your fiery reign is undone,
    The creeks overflow, and the marshes become one;
    With the sea that has claimed what was never its own,
    And nightfall’s embrace in a mournful tone.
    In this stillness of waters so vast,
    Where once life danced to your rhythmic cast,
    Now lies a tomb for the future unborn,
    As we face the truth that you can’t outlast.
    What mysteries dwell where the tide meets the shore?
    When will humans learn what they must restore?
    O marshes of Glynn, in your silent roar,
    Teach us to cherish forevermore.

    While I gave it the instruction to rewrite Lanier’s poem, it obviously wrote a much shorter poem. However, when you read these side-by-side, you can see phrases and lines that connect the latter to the former. With the LLMs that I can use at home on my computer, they don’t have a conception of word count or number of sentences or lines. They do tend to do well with lists (e.g., write a list of 10 things). It’s might be possible to number the lines in Lanier’s poem and provide instructions to have the outputted lines match the line numbers of the input. That will be an experiment for another day.

  • MacTravesty 1.1.1, a Text Analyzer and Generator for Macintosh

    MacTravesty program folder on Macintosh System 7.5.5 system emulated in SheepShaver.

    Written by Bertil Holmberg, MD, MacTravesty 1.1.1 (available to download from the archived TextWorx Toolshed) is a lean piece of software that can analyze groupings of characters in a text and then based on that analysis generate nonsense text. His Info-Mac abstract explains:

    #### BINHEX     mac-travesty-111.hqx   ****

    From: anbhg@maja.mascan.mas.lu.se (Bertil Holmberg)
    Subject: MacTravesty

    MacTravesty is a small program that analyses a text file and lists all
    the character groups contained in the text. A new pseudorandom text
    based on the language specific character frequencies can then be
    generated.

    This version updates the authors address.
    --
    Bertil Holmberg, M.D. Dept. of Anesthesiology
    Malmoe University Hospital S-205 02 Malmoe, Sweden
    bertil.holmberg@anestesi.mas.lu.se Fax +46 40 33 70 70

    In the “About MacTravesty” file included with the program, he explains further:

    MacTravesty analyses how characters relate to each other in a sample text. More specifically, it will record the ocurrence [sic] of every sequence in the text with one to five characters. These sequences are quite typical for the language studied. A random text based on the character frequencies of English will therefore easily be recognized as English.
    What is MacTravesty good for? You tell me, or ask a linguist.

    MacTravesty was written several years ago in assembler, hence it's speed and the small size of 28 kB! For the same reason it is rather unlikely that a PowerPC version will ever surface. It runs quite fast under emulation, however, a 30 kB text is processed in about 10 seconds.
    MacTravesty Get Info window on Macintosh System 7.5.5 system emulated in SheepShaver.

    Looking at the Get Info for the MacTravesty program, we can see that it is a rather lean application being only 32K on disk (26,083 bytes used), and it has very modest memory requirements of 128K minimum and 640K preferred size.

    MacTravesty open on Macintosh System 7.5.5 system emulated in SheepShaver.

    MacTravesty launches to the menu bar and does not show any windows initially.

    MacTravesty Apple > About MacTravesty window on Macintosh System 7.5.5 system emulated in SheepShaver.

    Clicking on Apple > About MacTravesty brings up a window that states, “MacTravesty — or the fine art of turning literature into drivel…” Holmberg explains this and the program’s inspiration in the “Travesty manual (MWII)” file’s introduction:

    Introduction
    The lead-in above is borrowed from the Scientific American Computer Recreations column in the pre-Mac issue of November 1983. In this fascinating article, Brian Hayes describes how a letters probability of appearing at a given point in a text, depends strongly on the preceding letters. When examining a text-sample, it is possible to register not only the frequency of occurrence for single letters, but also to do the same for different combinations of several letters. These frequencies can then be used to generate random text that mimics the frequencies found in the original. Though nonsensical, these pseudo-texts have a haunting plausibility, preserving as they do, many recognisable mannerisms of the texts from which they are derived.

    The letter-frequencies for single letters are well known. In addition, they are few enough, not to present any storage problems. Although little statistics is readily available for groups of more than one letter, todays computer technology makes it easy to derive frequencies for virtually any combination of letters. This has not always been the case, only ten years ago, fourth-order letter frequencies was the limit. The large tables necessary to store the frequencies quickly outgrew the limited memory capacity available. Even more important, however, was the lack of efficient algorithms that could reduce the storage requirements.

    In his article BH presents a working method that builds on the fact that all the information that could be incorporated in any frequency table, is present in the original text, where it takes it most compact form. There is a drawback to this scheme, it requires a scan of the entire input text for the generation of each pseudo-random character. The performance is therefore dependent on the product of the lengths of the input and the output strings. If on the other hand, the output was based on a frequency table, it could be generated in a time that was proportional to the sum of the lengths.

    This is where Peter Wayner, in the September 1985 issue of BYTE, comes to our help. He shows that it is quite feasible to build a frequency table, even for larger orders, as long as all the redundant information is left out. The natural storage form for such a table is, of course, the data tree. This well known structure is in fact ideal for the varying requirements of the travesty table. Its practical implementation will be rather more like a bush, though. Each unique character group represents a complete branch with as many ramifications as the current order dictates. Several similar groups will share smaller or larger parts of the same branch. A terminal leaf will contain the frequency count for one group. For more details on the practical implementation, please see below.

    While I don’t think Holmberg is making any assertions about artificial intelligence (AI) and generative AI, I can’t help but think about how his program draws on Hayes and Wayner’s pieces point to one avenue of understanding human language with a computer, and by helping the computer understand language, it could eventually reproduce it.

    MacTravesty File menu on Macintosh System 7.5.5 system emulated in SheepShaver.

    The File menu has many standard options but how these work after analyzing a text is unique. Holmberg explains in the manual:

    File menu
    New: Opens an empty document window that bids you to enter plain text in 9 p Monaco. This function uses TextEdit, a small editor that is built into all Macs. Since the purpose of this is to handle short text in dialogs, you may run into trouble if your text exceeds 32K.

    Open: Lets you open a document that has been saved as TEXT. It is NOT possible to open a file with a length of more than 32K.

    Close: Closes the front window. If it is the editor window and this contains a text that has not yet been saved, an alert will give you the opportunity to do so.

    Save: This option is only enabled if a non-saved text is present in the text window.

    Save as: This option is enabled whenever one of two windows is open. When the text window is in front, its content is saved as TEXT with the creator MACA, i.e. MacWrite.
    If the frequency window is in front, its character groups and their counts can be saved in a similar text file. This makes it possible to print out this information from another application. Regrettably, the nice columns come out horizontal when using this function. You can have a look at the file in the editor window. It may be necessary to resize this to get the lines even. If MacWrite is used for printing, hit the "Paragraphs" button when opening the file.

    Get info: This is another context sensitive menu option. For a text file it will show the number of characters, words and paragraphs. If the other window is in front, this feature will tell you about the number of nodes that were created during the analyse, and how many unique character groups that were found.

    Quit If you try to leave MacTravesty without saving some data in the edit window, an alert will tell you so. As is the case with the similar feature of the Close item, pressing the Option key while selecting the appropriate menu item with the mouse will bypass the alert.
    MacTravesty Edit menu on Macintosh System 7.5.5 system emulated in SheepShaver.

    The Edit menu is also standard fare, but there are some exceptions and caveats explained by Holmberg in the manual:

    Edit menu
    Undo This command is not functional in MacTravesty. It is included for compatibility with certain DAs [desk accessories].

    Cut, Copy, Paste and Clear These are all supported by the MacTravesty editor. In addition, TEXT can be imported and exported through the Clipboard in the usual fashion. Use the Paste function with care, don't let the file size exceed the limit mentioned above.
    MacTravesty Travesty menu on Macintosh System 7.5.5 system emulated in SheepShaver.

    The Travesty menu is where the magic happens in this application. Holmberg explains each option in this menu in the manual:

    Travesty menu
    Analyse Choosing a TEXT source file in a standard file dialog will start the generation of a new letter-frequency table. After a brief delay, another dialog will show the progress of the analyse. When this is finished, the groups and their counts are sorted if the relevant box in the Preferences dialog is checked. Next, the frequency window is opened, showing all the character groups that were found. The first group is always selected after an analyse or a sort. To choose another group, just click on it. If the selected group isn't visible after scrolling, hit the Enter button to move it into view. If the analysis is terminated with the Cancel button, the groups that were found up to this point will be displayed. In order to present complete groups only, a complete analyse always wraps around to beginning of the source text.

    Travesty: This menu choice will only be available when the frequency window is in front. Selecting Travesty will then create a pseudo-random text based on the current character group frequencies. A travesty always start with a seed. This must be one of the character groups that were found during the analyse. It is selected either randomly or by the user, as determined by a setting in the Preferences dialog. Double-clicking on one of the groups will also start a travesty. Choosing Travesty again will create another piece of text, that will either replace the previous text, or will be appended to it. The requested text length is also entered in the Preferences dialog. Although this accepts a range of 0-9999 characters, no travesty will be started with a figure that is less than or equal to the order. When appending text, don't forget the 32K limit of TextEdit. The new text will appear in the text edit window mentioned above. If this is already showing and containing a text that hasn't been saved, you will be warned about this fact. Repeated calls to travesty will not result in any further save alerts. A travesty can be edited and saved as any other text.

    Sort: A list of character groups can be sorted either alphanumerically or after the number of groups found. Holding down the option key while selecting this item will toggle the sort from one alternative to the other. Since the sort [on a slow Mac] may take a while for a longer source text, automatic sorting can be turned off in the Preferences dialog.

    Find: Presents a dialog with a square text field that accepts up to five characters, including CRs. After an OK or Enter, the program will try to match these with one of the groups in the frequency list. If a match is found, it will be selected and highlighted. It can then be used as a travesty seed. You will hear a beep if no match is found. The entered text is then highlighted to facilitate a new try. A À (Shift-Option-?) can be used as a wildcard character. Only the first group that is found in this way will be selected, though.

    Order: This will show a hierarchical menu with five items, 1-5. These also have the command key equivalents Cmd-1 and so forth. Order-3 is the default setting. Although it is possible to choose a new order whenever the menu is enabled, a travesty will always use the order that was current at the start of the analyse.

    Preferences: Opens a large dialog with several items, most of which has already been mentioned above.
    Edit: Here you can determine if the text in the edit window shall wrap to the bounds of the window, or to a fixed document size.
    Analyse: A long list of character groups can be confusing if it contains many space-characters. Replacing these with a ×, usually gives a better view of the groups, especially since the CR and the Tab will be represented by a  and a Æ, respectively.
    Sorting was originally such a slow procedure that it was sometimes necessary to inhibit it. As MacTravesty now uses an extremely fast quicksort, you should be able to have this feature enabled most of the time. "Alphanumerically" will place the groups in ascending order, while "By Count" first will arrange them by descending frequency.
    Travesty: This is where you set the length of the travesty and determine how the seed is to be chosen, and whether to append or replace the created text.
    OK Make the current settings the default ones.
    Cancel Just leave the previous defaults as they are.
    Revert Return to the saved settings.
    Save Save the current settings.
    MacTravesty Analyse file selection dialog on Macintosh System 7.5.5 system emulated in SheepShaver.

    Clicking on Travesty > Analyse brings up a file selection dialog.

    MacTravesty Analyse file selection of Neuromancer chapters on Macintosh System 7.5.5 system emulated in SheepShaver.

    Navigating to the MacHD, I selected a text file with a sample of chapters from William Gibson’s Neuromancer (1984).

    MacTravesty Character Groups window after analysis of Neuromancer chapters on Macintosh System 7.5.5 system emulated in SheepShaver.

    Very quickly, MacTravesty created this massive character group chart that it can use to generate text based on the relative appearance of certain character groups. Holmberg explains about the performance of the application in the manual:

    Performance
    MacTravesty is quite fast. It will process a small text sample in just a few seconds. Analysing a longer source text may take a minute or so, but this is still quite reasonable. The exact time depends mainly on the length of the source. Since most of the time is spent traversing the travesty tree, the order has only a minor influence on the timing. Here are some data for a relatively long file of about 30K (on a Mac SE/30):

    Order Analyse Sort Nodes Groups
    2 35" 1" 735 673
    3 40" 4" 4359 3605
    4 50" 13" 13736 9377
    5 60" 25" 29653 15917

    Please note that the time required for sorting increases in an almost linear fashion, this an excellent example of how fast the quicksort can be. Using the less efficient shuttlesort, sorting the 15917 groups took about two hours!
    On a Quadra 700 the same 5-order analyse takes 14 and the sort less than two seconds (timings with a Power Macintosh Upgrade Card are similar, the sort takes a few seconds more, though).
    The travesty is also fast, creating a thousand character sample of random prose will only take a few seconds.

    Memory
    Analysing a large source file requires a lot of memory (well, this was originally written in the late eighties). As can be seen above, the number of letter groups increases fast with higher orders. As each node requires 8 bytes, the 5-order analyse in the example needed 237224 bytes for its tree. Since it is very difficult to know in advance how large the tree will become, a certain amount of memory is reserved at the beginning of the analyse. How much depends on the order and on the file size. For each 1024 bytes in the file, a smaller piece of memory is added to a basic allotment. These figures are fetched from the resource TRDF and can be changed as required. This means that even a very short analyse may start out with a sizable chunk of memory, perhaps 90K or so. This is necessary since most of the memory is consumed in the beginning. Any memory that isnÕt used is released at the termination of the analyse.

    This may come out handy, as the next phase also requires a good part of memory. The different character groups in the tree has to be identified and transferred to a separate list, before they can be presented in the frequency window. Each group in the list needs (order*2)+2 bytes, i.e. 191K for our example. Saving the frequencies would require another 190K. The graph below shows how the node count relates to the file size in a 3- and 5-order analyse.

    Implementation
    The travesty tree begins with a dummy root node from which all the branches sprout. This means that there will be at least one node more than the number of character groups. The number of branches at this level equals the number of unique characters in the source. Each node contains four word-length fields; the character code, a count and two offsets to the next branch and twig, respectively. The count is only used in the outermost twigs, i.e. the leafs.

    Using the BYTE example, Here are the shoes, the ships, and the sealing wax: the beginning of its 138-node, 4-order tree will look like this in my implementation:

    [Image could not be decoded.]

    The travesty is created using the method suggested by BH. Taking a 3-order travesty as an example, we would like to add the next pseudo-random character to the sequence Éth. While looking up all variations on thÀ in the tree (e.g. tha, the, tho etc), the counts for these groups are added together. A random number between this sum and zero is then generated. The same counts are then subtracted from the random number one by one. If the result of a subtraction is zero or less, the last character of the group corresponding to this subtraction will be appended to the growing travesty.
    MacTravesty Travesty menu > Order submenu on Macintosh System 7.5.5 system emulated in SheepShaver.

    The Travesty menu > Order submenu allows for higher or lower order travesties, but as noted above, the order selected before a text was analyzed for creating travesties.

    MacTravesty Travesty menu > Preferences on Macintosh System 7.5.5 system emulated in SheepShaver.

    Clicking on Travesty > Preferences brings up this options window.

    MacTravesty Travesty > Travesty text generation on Macintosh System 7.5.5 system emulated in SheepShaver.

    After analyzing the Neuromancer chapters, I instructed MacTravesty to generate this travesty of text based on its character group occurrences.

    MacTravesty File > Get Info about the generated text on Macintosh System 7.5.5 system emulated in SheepShaver.

    Clicking on File > Get Info on the travesty text shows that it generated 512 characters, 91 words, and 7 paragraphs (I’m not sure how these are being counted–maybe hard returns starting from the first blank line and the ending blank line?).

    Holmberg concludes the manual by writing:

    The End
    Playing around with MacTravesty can be great fun for a while, but is it actually useful for something? Well, at least you can easily create "greeking" for DTP dummies with MacTravesty. And it should be of some interest to linguists. I'm sure that the rest of you can come up with many more interesting ideas.

    I definitely can see how this program would be useful for desktop publishing, especially at the time when it was first released. But, I’m captivated by how this could have been developed in other directions for the purposes of generative AI–as the basis for a more complicated text generator that operated on the level of words, parts of speech, and scripts. In retrospective imagining, I can see this application as the basis for something exceeding most of the other text generators that I have written about here because it in a sense learns from a text (creating the character groups) and applies that to generating text. If its input were more useful for providing meaningful text generation, it would have been a step in the direction of where we are at now with generative AI.

  • HAIKU 0.2 Hypercard Stack

    HAIKU 0.2 Hypercard stack icon on Macintosh System 7.5.5 system emulated in SheepShaver.

    Created by Fuzzy Gerdes, HAIKU 0.2 is a Hypercard stack that assembles haikus from pre-written 5-syllable and 7-syllable phrases. Unlike some of the more advanced haiku generators like Haiku Master 2.2 or McPoet 5.1, which work on a micro, word-level for constructing haikus, HAIKU 0.2 operates on a macro, phrase-level and puts more work on the part of its human user to think of and type up phrases that contain five and seven syllables, which it randomly selects from to create new 5-7-5 haikus.

    HAIKU 0.2 Hypercard stack Get Info window on Macintosh System 7.5.5 system emulated in SheepShaver.

    HAIKU 0.2’s file name is “Haiku stack” and it weighs in at 32K on disk (24,576 bytes used).

    HAIKU 0.2 Hypercard stack main window on Macintosh System 7.5.5 system emulated in SheepShaver.

    When the user double clicks on Haiku stack, it launches Hypercard Player, which runs the stack and displays HAIKU 0.2’s main composition window. The main options that can be clicked with the mouse are “Make a haiku,” “Help…”, “Home,” “Quit,” “Add to phrases…”, and “Save this haiku.”

    HAIKU 0.2 Hypercard stack main window on Macintosh System 7.5.5 system emulated in SheepShaver.

    Clicking on “Make a haiku” in the upper, middle portion of the main window creates a new haiku out of randomly selected five and seven syllable phrases stored in the Hypercard stack.

    HAIKU 0.2 Hypercard stack's Help window on Macintosh System 7.5.5 system emulated in SheepShaver.

    Clicking on Help loads this page, which explains how it works, how to use it, and credits–written by Gerdes and inspired by Larry Van Vactor Lee and Charlotte Van Vactor Lee, who wrote most of the built-in phrases.

    HAIKU 0.2 Hypercard stack''s save dialog on Macintosh System 7.5.5 system emulated in SheepShaver.

    Clicking on “Save this haiku” opens a standard save dialog box for navigating the system’s files and saving a TeachText file of the haiku currently displayed on the main window.

    HAIKU 0.2 Hypercard stack's Add to phrases page on Macintosh System 7.5.5 system emulated in SheepShaver.

    Clicking on “Add to phrases…”, loads this two-column page labeled “5 syllabus phrases” and 7 syllable phrases.”

    Both columns are editable by clicking on a text line and typing, or the user can scroll to the bottom of the list, press return, and begin entering a new line of text. It doesn’t enforce syllable count–that’s up to the user to count correctly. Clicking “Done” at the bottom of the page returns the user to the main composition page.

    Even though this is a simple haiku generator in terms of how it assembles a haiku by randomly pulling from the 5 syllable phrase list, then the 7 syllable phrase list, and again from the 5 syllable phrase list. However, it and the other Hypercard-based text generators demonstrate the extremely easy to build power of Hypercard. A Macintosh computer with Hypercard gave non-programmers and programmers alike a relatively easy-to-use platform for creating interactive hypertext with graphics and programming. So, even though this and other poem generators like it are pulling text from lists based on simple rules and random numbers, it gestures toward equipping human computer users with feature-rich tools to make computers seemingly intelligent to a degree.