Category Archives: Books

Slouching Towards Bethelehem by Joan Didion

Read some time ago Joan Didion’s extraordinary set of essays Slouching Towards Bethlemem1, a book filled with the sense of dislocation and anomie that seems so essential to the experience, at least in literature, of America itself.

The most penetrating of the set was that which lends its title to the book2 and I marked one particular section out of that essay, and out of the book as a whole:

[in discussion of Haight-Ashbury in summer 1967] But the peculiar beauty of this political potential, as far as the activists were concerned, was that it remained not clear at all to most of the inhabitants of the District, perhaps because of the few seventeen-year-olds who are political realists tend not to adopt romantic idealism as a life style. Nor was it clear to the press, which at varying levels of the competence continued to report “the hippie phenomemon” as an extended panty raid; an artistic avant-garde led by such comfortable YMHA regulars as Allen Ginsberg; or a thoughtful protest, not unlike joining the Peace Corps, against the culture which had produced Saran-Wrap and the Vietnam War. This last, or they’re-trying-to-tell-us-something approach, reached its apogee in a Time cover story which revealed that hippies “scorn money — they call it ‘bread’” and remains the most remarkable, if unwitting, extant evidence that the signals between the generations are irrevocably jammed.

Because the signals the press were getting were immaculate of political possibilities, the tensions of the District went unremarked upon, even during the period when there were so many observers on Haight Street from Life and Look and CBS that they were largely observing one another. …

Of course the activists — not those whose thinking had become rigid, but those whose approach to revolution was imaginatively anarchic — had long ago grasped the reality which still eluded the press: we were seeing something important. We were seeing the desperate attempt of a handful of pathetically unequipped children to create a community in a social vacuum. Once we had seen these children, we could no longer overlook the vacuum, no longer pretend that the society’s atomization could be reversed. This was not a traditional generational rebellion. At some point between 1945 and 1967 we had somehow neglected to tell these children that the rules of the game we happened to be playing. Maybe we had stopped believing in the rules ourselves, maybe we were having a failure of nerve about the game. Maybe there was were just too few people around to do the telling. These were children who grew up cut loose from the web of cousins and great-aunts and family doctors and lifelong neighbors who had traditionally suggested and enforced the society’s values. They are children who have moved around a lot, San Jose, Cula Vista, here. They are less in rebellion against the society than ignorant of it, able only to feed back certain of its most publicized self-doubts, Vietnam, Saran-Wrap, diet pills, the Bomb. [bold emphasis added]

They feed back exactly what is given them. … [pp. 121-123]

Colophon

From the closing paragraph of the preface:

My only advantage as a reporter is that I am so physically small, so temperamentally unobtrusive, and so neurotically inarticulate that people tend to forget that my presence runs counter to their best interests. And it always does. That is one last thing to remember: writes are always selling somebody out.


  1. Flamingo 1993, first published Farrar, Strauss and Giroux 1968. 

  2. An entirely intentional choice. As Didion states in the preface:

    “[Slouching Towards Bethlemem] is also the title of one piece of the book, and that piece, which derived from some time spent in the Haight-Ashbury district of San Francisco, was the for me both the most imperative of all these pieces to write and the only one that made me despondent after it was printed. It was the first time I had dealt directly and flatly with evidence of atomization, the proof that things fall apart: I went to San Francisco because I had not been able to work in some months, had been paralyzed by the conviction that writing was an irrelevant act, that the world as I had understood it no longer existed. If I was to work again at all, it would be necessary for me to come to terms with disorder. That was why the piece was important to me. And after it was printed I was that, however directly and flatly I thought I had said it, I had failed to get through to many of the people who read and even liked the piece, failed to suggest that I was talking about something more general that a handful of children wearing mandalas on their foreheads. Disc jockeys telephoned my house and wanted to discuss (on the air) the incidence of the “filth” in the Haight-Ashbury, and acquaintances congratulated me on having finished the piece “Just in time”, because “the whole fad’s dad now, fini, kaput.” I suppose almost everyone who writes is afflicted some of the time by the suspicion that nobody out there is listening, but it seemed to me then (perhaps because the piece was important to me) that I had never gotten a feedback so universally beside the point. 

Howto Install 4store

My experiences (with the assistance of Will Waites) of installing 4store On Ubuntu Jaunty.

No packaged versions of code (there is one in fact from Yves Raimond from mid 2009 but now out of date …), so need to get from github.

Recommend using will waites fork which adds useful features like:

  • multiple connections
  • triple deletion

Note I had to make various fixes to get this to compile on my ubuntu machine. See diff below.

Install standard ubuntu/debian dependencies:

  • See 4store wiki
  • rasqal needs to be latest version
    • Get it
    • ./configure –prefix=/usr –sysconfdir=/etc –localstatedir=/var
    • make, make install
  • Now install

Now to start a DB:

  • 4s-backend-setup {db-name}
  • 4s-backend {db-name}

Now for the python bindings also created by will waites and which can be found here

  • On my Jaunty needed to convert size_t to int everywhere
  • Needed to run with latest cython (v0.12) installed via pip/easy_install
  • To run tests need backend db called py4s_test (harcoded)

To run multiple backends at once you will probably need to have avahi dev libraries (not sure which!).

Diff for wwaites 4store fork (updated diff as of 2010-04-28)


diff --git a/src/backend/Makefile b/src/backend/Makefile
index 51a957c..e64eb13 100644
--- a/src/backend/Makefile
+++ b/src/backend/Makefile
@@ -2,7 +2,7 @@ include ../discovery.mk
 include ../rev.mk
 include ../darwin.mk

-CFLAGS = -Wall -Wstrict-prototypes -Werror -g -std=gnu99 -O2 -I.. -DGIT_REV=\"$(gitrev)\" pkg-config --cflags raptor glib-2.0 +CFLAGS = -Wall -Wstrict-prototypes -g -std=gnu99 -O2 -I.. -DGIT_REV=\"$(gitrev)\" pkg-config --cflags raptor glib-2.0 LDFLAGS = $(ldfdarwin) $(ldflinux) -lz pkg-config --libs raptor glib-2.0 $(avahi)

LIB_OBJS = chain.o bucket.o list.o tlist.o rhash.o mhash.o sort.o \ diff --git a/src/common/Makefile b/src/common/Makefile index 9b33e94..60cd04f 100644 --- a/src/common/Makefile +++ b/src/common/Makefile @@ -21,7 +21,7 @@ ifdef dnssd mdns_flags = -DUSE_DNS_SD endif

-CFLAGS = -std=gnu99 -fno-strict-aliasing -Wall -Werror -Wstrict-prototypes -g -O2 -I../ -DGIT_REV=\"$(gitrev)\" $(mdns_flags) pkg-config --cflags $(pkgs) +CFLAGS = -std=gnu99 -fno-strict-aliasing -Wall -Wstrict-prototypes -g -O2 -I../ -DGIT_REV=\"$(gitrev)\" $(mdns_flags) pkg-config --cflags $(pkgs) LDFLAGS = $(ldfdarwin) $(lfdlinux) LIBS = pkg-config --libs $(pkgs)

diff --git a/src/frontend/results.c b/src/frontend/results.c index 485ac31..162aa3d 100644 --- a/src/frontend/results.c +++ b/src/frontend/results.c @@ -381,12 +381,12 @@ fs_value fs_expression_eval(fs_query *q, int row, int block, rasqal_expression * return v; }

  • case RASQAL_EXPR_SUM:
  • case RASQAL_EXPR_AVG:
  • case RASQAL_EXPR_MIN:
  • case RASQAL_EXPR_MAX:
  • case RASQAL_EXPR_LAST:
  • return fs_value_error(FS_ERROR_INVALID_TYPE, "unsupported aggregate operation");
  • //case RASQAL_EXPR_SUM:
  • //case RASQAL_EXPR_AVG:
  • //case RASQAL_EXPR_MIN:
  • //case RASQAL_EXPR_MAX:
  • //case RASQAL_EXPR_LAST:
  •  //    return fs_value_error(FS_ERROR_INVALID_TYPE, "unsupported aggregate operation");
    

    endif

Diff to wwaites py4s (updated diff as of 2010-04-28)


diff --git a/_py4s.pxd b/_py4s.pxd
index 5251289..0e26250 100644
--- a/_py4s.pxd
+++ b/_py4s.pxd
@@ -110,7 +110,7 @@ cdef extern from "frontend/results.h":

cdef extern from "frontend/import.h": int fs_import_stream_start(fsp_link *link, char *model_uri, char *mimety - int fs_import_stream_data(fsp_link *link, unsigned char *data, size_t co + int fs_import_stream_data(fsp_link *link, unsigned char *data, int count int fs_import_stream_finish(fsp_link *link, int *count, int *errors)

cdef extern from "frontend/update.h":

Flexible Dates in Python (including BC)

I’ve had occasion recently to frequently work with “dates” that come in a lot of shapes and sizes including:

  • Dates in distant past and future including BC/BCE dates
  • Dates in a wild variety of formats: Jan 1890, January 1890, 1st Dec 1890, Spring 1890 etc
  • Dates of varying precision: e.g. 1890, 1890-01 (i.e. Jan 1890), 1890-01-02
  • Imprecise dates: c1890, 1890?, fl 1890 etc

Unfortunately existing support for these in python is fairly weak. I therefore authored a python FlexiDate module (now part of datautil part of a new swiss (army knife) package) which is focused on supporting:

  1. Dates outside of Python (or DB) supported period (esp. dates < 0 AD)
  2. Imprecise dates (c.1860, 18??, fl. 1534, etc)
  3. Normalization of these dates to machine processable versions especially:
    • ISO 8601
    • Dates sortable in the database (in correct date order)

Background

Things we would like:

  1. Dates outside of Python (or DB) supported period (esp. dates < 0 AD)
  2. Imprecise dates (c.1860, 18??, fl. 1534, etc)
  3. Normalization of dates to machine processable versions
  4. Sortable in the database (in correct date order)
  5. Human readability as dates will be re-edited/viewed by people

Not all of these requirements are satisfiable at once in a simple way.

Be clear about what we want:

  1. Storage (and preservation) of “user” dates (both normal and non-normal)
  2. Normalization of dates (e.g. to ~ ISO 8601)
  3. Integration with database (sortability and serializability)

Solution for 1: Represent dates as strings.

Solution for 2: Have a parser (via an intermediate FlexiDate object).

Solution for 3: convert to a float.

Remark: no string based date format will sort dates correctly based on std string ordering (PF: let x,y be +ve dates and X,Y their string representations then if X < Y => -X < -Y (wrong!))

Thus we need to add some other field if we wish dates to be correctly sorted (or not worry about sorting of -ve dates …)

  1. For any given date attribute have 2 actual fields:
  • user version — the version edited by users
  • normalized/parsed version — a version that is usable by machines
  1. Store both versions in a single field but with some form of serialization.

  2. Convert dates to long ints (unlimited in precision) and put this in a separate field and use that for sorting.

Comments

Initially thought that we should parse before saving into a FlexiDate format but: a) why bother b) when parsing always hard not to be lossy (in particular when converting to iso8601 using e.g. dateutil very difficult to not add info e.g. parsing 1860 can easily give us 1860-01-01 …).

References and Existing Libraries

Accordion Crimes by Annie Proulx

7/10. Extensive in its imagination but losing some of its power by this very fact as the stories start to blur and something of its early intensity is lost as we head into the closing sections. Overall a very dark (and probably correct) vision of the immigrant experience in the US: all prejudice, death and broken families — at least as I can remember, there was not one happy relationship or family recorded in these 380 odd pages.

John Maynard Keynes: Fighting for Britain, 1937-1946 by Robert Skidelsky

7/10. Having now finished the final volume of Skidelsky’s trilogy it is clear that the first volume was the best. This is not necessarily a reflection on Skidelsky’s efforts but on the nature of the subject matter — the first section of Keynes’ life, with its natural intertwining of life, friends and work, is the most suited to the biographical form. Here instead, by the nature of Keynes own activities he is forced to confine attention almost entirely to the work, and to work that was almost entirely of a bureaucratic or diplomatic nature.

It can be difficult in such to circumstances to sustain interest over long narrations of a particular policy debate within the British Government or the progress of a particular negotiation with the United States (which formed the main part of Keynes activities). The form of the book (a biography) in these circumstances exacerbates the problem. As biography one needs to keep things ‘personal’ focusing on Keynes’ personal experience together with the sketches of the personalities he encountered. This often may result in the underlying issues getting lost. If on the other hand one takes a more analytical, historical, approach in which the issues under discussion are made central with appropriate background supplied and analysis provided then one is rapidly leaving the realm of biography for that of (economic) history. Not only is this departing from the book’s ‘core mission’ but also may make things rather dry for the non-specialist. To my mind this tension is not adequately resolved, and, just as with Vol. 2, in my view, a more detailed historical/analytical treatment would have been better — along the lines of the masterly section in the book’s concluding chapter where Skidelsky summarizes Keynes (Economic) legacy and its impact on post-war posterity (conclusion: ‘Keynesianism’ was of little importance).

Comments on previous volumes: