Brontosaurus

That time Pete Seeger called FDR a JP Morgan-loving fascist warmonger

So, before the fold, the song:

Note that Seeger is playing bluegrass-style rather than clawhammer.

I ran across this song on Youtube. I had always intellectually known that the Old Left was disillusioned with Roosevelt, and that Seeger was in the Old Left at the time, but it still surprised me. So, I fired up my new JSTOR subscription and tried to see what I could come up with to give some context here.

Pete Seeger, Lee Hays, and Millard Lampell first played together at the Jade Restaurant in Greenwich Village in December 1940. By the summer of 1941, Woody Guthrie and Pete Hawes had joined. They called their collective "The Almanac Singers" for reasons that remain ambiguous (Guthrie, at least, has since been quoted as alternately saying the almanac was a positive or negative symbol: it is the book that tells you what is going on right now, but it is also a counterrevolutionary tool). The Singers rarely performed all together (often to the crowds' disappointment; Seeger was already a big draw at that point) but formed splinter groups that performed largely at union halls and included "guest stars" like Bess Lomax and Arthur Stern. However, Seeger has reported that for the most part they got little traction among the union workers they were hoping to organize, and were criticized as Ivy Leaguers slumming it in fake work clothes [1]. Seeger and Guthrie in particular did a lot of singing for CIO meetings (allegedly to keep the workers from leaving during the breaks), and in Seattle they first heard the now-famous word "hootenanny"; neither could say what its origin was. They brought the name back to Greenwich Village and applied it to the rent parties they were throwing for the brownstone they had rented ("the Almanac House") for 35 cents a head [2].

The folk scene of the 1940s was starkly different from the Folk revival scene of the late 1950s and 1960s. To begin with, it was much less popular: the Almanac Singers were never booked for large commercial venues (except for a brief period with OWI in 1942, which they were Red-baited out of quickly). They mostly played CIO halls, or hootenannies. The Singers were, at that time, strongly ideologically motivated as well, writing frankly Marxist lyrics and statements (imagine Bob Dylan, Bruce Springsteen, or Tracy Chapman using the word "bourgeoisie" in a song). Mass singing was not, contrary to romantic myths, a large feature of the American Labor movement even during the Red Decade, being mostly confined to CPUSA and Wobbly meetings (as a side note, the alleged membership of any of the Alamanc Singers in CPUSA remains controversial and unconfirmed). During the Popular Front era, CPUSA attempted to brand folk song as "The People's Music", but ran into American workers' consistent skepticism of explicit communism, as well as the structural contradiction of pushing "stars" in a movement that was supposed to be opposed to individualism. At any rate, folk music's effectiveness as a propaganda tool in the 1930s and 1940s was quite limited [3]. In fact, although the Almanac Singers had disbanded by 1944, their most popular time was during the McCarthy era, when the condemnation served to give them some "forbidden fruit" cachet. (Discursion: apparently musical albums are called "albums", which is a kind of book, because back in the 1930s labels would release a book of 78s as a collection.) But after the McCarthy era, and after Krushchev's condemnation of Stalin, the Left of the 1960s was more wary of ideological conformity than the Old Left had been. The skeletal Almanac Singers had in the interim formed "People's Songs, Incorporated", envisioned as a repository of people's music; by 1962 they disbanded that as well and focused on publishing "Sing Out!" [4].

So that, at any rate, is the context of this song: a very young Pete Seeger was toeing the Stalinist line and hoping to keep the US out of Europe as long as the Molotov-Ribbentrop pact held. However, Seeger seems to have thought better of this song, as he apologizes to FDR in the title song of the 1942 Album "Dear Mr. President":

Now, Mr. President,
We haven't always agreed in the past, I know,
But that ain't at all important now.
What is important is what we got to do,
We got to lick Mr. Hitler, and until we do,
Other things can wait.

So, Mr. President,
We got this one big job to do
That's lick Mr. Hitler and when we're through,
Let no one else ever take his place
To trample down the human race.
So what I want is you to give me a gun
So we can hurry up and get the job done.
[1] Denisoff, R. S. (1970). “Take It Easy, but Take It”: The Almanac Singers. The Journal of American Folklore, 83(327), 21.
[2] Cohen, R. D., & Capaldi, J. (2013). The Pete Seeger Reader. Oxford University Press.
[3] Reuss, R. A. (1975). American Folksongs and Left-Wing Politics: 1935-56. Journal of the Folklore Institute, 12(2/3), 89.
[4] Denisoff, R. S. (1969). Folk Music and the American Left: A Generational-Ideological Comparison. The British Journal of Sociology, 20(4), 427.


Making guile-util-linux: the beginning

So I got it in my head to make a guile module to use the libraries from util-linux. This is my first guile module, so anybody looking to learn how to do this can follow along with me on the repo.

Util-linux contains 5 libraries: libblkid, libfdisk, libmount, libsmartcols, and libuuid. I'm on Slackware, which has all of the libraries and the headers installed, but those of you on lesser distributions will need to install the appropriate development packages, e.g. libblkid-dev, libfdisk-dev, etc. (You'll also need guile-2.0 and guile-2.0-dev, or just install Slackware like a sane person -- you'll thank me later.)

My first real commit contains a single function, which I picked because it's very simple and works as a proof-of-concept. The function is blkid_known_fstype(). The prototype can be found in /usr/include/blkid/blkid.h (line 248 in my version):

extern int blkid_known_fstype(const char *fstype);

There are several ways to make a C function available in Guile, but the easiest is the one described in the Guile manual. It involves making a small C library linked to the library you are pulling from and writing a wrapper function. The C file I wrote contains this:

#include <libguile.h>
#include <blkid.h>

SCM
blkid_known_fstype_wrapper (SCM fstype)
{
  return scm_from_int (blkid_known_fstype (scm_to_locale_string (fstype)));
}

void init_blkid_known_fstype_wrapper ()
{
  scm_c_define_gsubr("blkid_known_fstype", 1, 0, 0, blkid_known_fstype_wrapper);
  scm_c_export("blkid_known_fstype", NULL);
}

Obviously in production we're going to want to move the includes off to a project include file (particularly since we've got 5 libraries and several dozen functions here), but this is simple enough for now.

The first function I defined is blkid_known_fstype_wrapper(SCM fstype), which is of course a wrapper for the C function declared in blkid.h. If you've never used libguile before, SCM is a datatype that opaquely represents scheme data to the C runtime; pretty much any function you're going to call from guile uses SCM as its return type and for the arguments passed to it.

Doing this takes a little juggling on libguile's part, which is why it provides a host of scm_to and scm_from functions (which can all be found in the documentation). In this case, we're using scm_from_int, which takes a C integer (as returned by blkid_known_fstype()) and converts it to a scheme object. Remember that in scheme we don't have direct access to any native data types, so even an int or a char will not be directly passable to or from C. For the argument to blkid_known_fstype(), we need to hand it a C string from scheme. The easiest way to do that is scm_to_locale_string(), which takes a scheme object and converts it to a NULL-terminated string in the current locale (fellow Forth users will also appreciate that there's a parallel set of procedures for counted strings).

The second function when called binds the scheme symbol blkid_known_fstype with 1 mandatory, 0 optional, and 0 rest arguments to the C function blkid_known_fstype_wrapper. It then exports it into the global namespace (we'll improve this later when we set up the module).

There's going to be a whole lot of this (one for every function we want to export), so it's good to get used to it on a simple example. (In case you're wondering, yes: this is automatable, which is pretty much the basis of SWIG, but it's 2016 and we love artisinal stuff so I'm doing this by hand, mostly to learn more about it).

To test this, compile it into a shared library, e.g.:

gcc -shared -fPIC -lguile-2.0 -lblkid -o libguile-util-linux.so guile-util-linux.c

Fire up guile, and load the library:

(define util-linux-lib (dynamic-link "./libguile-util-linux.so"))
(dynamic-call "init_blkid_known_fstype" util-linux-lib)
(blkid_known_fstype "vfat")
=> 1
(blkid_known_fstype "asdf")
=> 0

And it works! Util-linux recognizes "vfat" as a filesystem type but not "asdf".

There's a lot we need to clean up here, but this is a good stopping point for one post. Next time we'll look at some cleanup we need to do, both in terms of not polluting the global namespace with each function, and dealing with differences in header and library locations.


  • Shares: