Saturday 29 November 2014, 1:13 pm   //////  

Megawatt coverThe fruits of my National Novel Generation Month (NaNoGenMo) labors are now online; the Megawatt generator is available as a single 350-line Python file, while the novel it deterministically generates can be obtained as a PDF, megawatt.pdf or in epub format, megawatt.epub. From the program’s docstring and from the preface to the book:

Megawatt is the title of both a computer program, the source code to which you may be reading, and the output of this program, which in many ways is like a standard novel and which you may instead be reading. This note appears at the beginning of both.

The program Megawatt is based on passages from Samuel Beckett’s novel Watt, first published in 1953 but written much earlier, when Beckett was aiding the French Resistance during World War II.

The novel Megawatt leaves aside all of the more intelligible language of Beckett’s novel and is based, instead, on that which is most systematic and inscrutable. It does not just recreate these passages, although with minor changes the Megawatt code can be used to do so. In the new novel, rather, they are intensified by generating, using the same methods that Beckett used, significantly more text than is found in the already excessive Watt.

(Please note: The following information is handy if you want to, for instance, modify the program and generate a PDF or epub yourself. You don’t need to do this to read the novel. You can download it in PDF: megawatt.pdf or in epub format: megawatt.epub.)

To produce the novel in markdown format, run (a Python 2 program) with TextBlob (a text processing library) installed.

% python > megawatt.text

To produce PDF and epub documents, use pandoc:

% pandoc -V geometry:paperwidth=5.5in \ 
    -V geometry:paperheight=8.25in \ 
    -V geometry:margin=.7in -o megawatt.pdf \ 
% echo '% Megawatt' > info.txt
% echo '% Nick Montfort' >> info.txt
% pandoc -o megawatt.epub info.txt megawatt.text

Megawatt was written/generated for the second NaNoGenMo (National Novel Generation Month) in November 2014, and is free software.


  1. […] as Pinocchio became a real boy, so Megawatt (my generated novel for NaNoGenMo 2014) has become a real […]

    Pingback by Post Position » Megawatt Incarnate — 2014-12-01 @ 7:47 pm
  2. Nick, the pdf link doesn’t work. epub link is good tho.

    Comment by Mark Klink — 2014-12-05 @ 11:22 pm
  3. Oops, I must have moved that file recently, by mistake. I’ve replaced it now.

    Comment by Nick Montfort — 2014-12-06 @ 11:59 am
  4. […] Read (.pdf) / Learn More […]

  5. […] the video Montfort talks about his books #! and Megawatt, and also shows several examples of his work. […]

    Pingback by Computer Generated Poetry | 7luas — 2014-12-13 @ 7:36 am
  6. […] schon als praktischer Code-Historiker unter anderem Brion Gysins gewürdigt), der den Roman Megawatt generieren ließ. Rekonstruktion und Steigerung von Samuel Becketts hochartifiziellem Roman […]

  7. […] here as a practical-minded code historian of, among others, Brion Gysin). He generated the novel Megawatt. Both reconstruction and intensification of Samuel Beckett’s highly artificial novel Watt, […]

  8. good, you have a novel generator. Now you only need a reader audience generator to read pages upon pages of gibberish.

    Comment by Umav — 2015-01-12 @ 4:34 pm
  9. Shh, don’t let everyone know about our secret research project!

    Comment by Nick Montfort — 2015-01-12 @ 7:50 pm
  10. […] palestra Montfort fala sobre seus livros #! e Megawatt, e mostra diversas amostras do seu trabalho. […]

    Pingback by Poesia Gerada Por Computador | 7luas — 2015-01-13 @ 3:07 pm
  11. I should really leave a comment on this post indicating that Megawatt is available in traditional material book form from the Harvard Book Store.

    Comment by Nick Montfort — 2015-10-18 @ 11:28 pm

RSS feed for comments on this post. TrackBack URI

Leave a comment

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License.
(c) 2018 Post Position | Barecity theme