Saturday, July 27, 2013

How Do We Deal with What We All Produce?

"Every man knows what he has to do and it costs two sous to do it!"—providers of bucket toilet services  in France in the 1800s (Rose George, The Big Necessity, 2008, p. 132)

At the present time, there are approximately 2.5 billion people that do not have access to a toilet of any kind—meaning, not even a latrine.  If you don't have a toilet, where do you go?  In the bush, in a field, on the road, in a plastic bag, in the nearest stream.  The nice part of the stream option is you have running water right there to wash up with.  You can fill in the bad part; some from history, some today:  the Thames, the Ganges.  Systematically putting human waste into the water isn't a good thing.

Even in Canada, we haven't completely cleaned up our act, though we're moving forward.  (Here is a publication from 2004 on the topic The National Sewage Report Card.  Basically it grades the sewage treatment of 22 Canadian cities, giving a few low marks.  Overall, the state of things improved from 1999 to 2004.  I hope the trend has continued at least as well to the present.)

One favorite suggestion for dealing with our waste problem is composting.  But, as often happens to lofty ideals of perfect solutions, the search for a practical implementation in the present—and actual, rather than imagined—deflates the idea somewhat.  (To clarify, I am actually in favor of composting toilets.  Or, at least, I would like to be.)

One of the hindrances to using a composting toilet, is the installation.  If you are going to use a "big bin in the basement" version, you need the requisite building layout.  There must be a location to store the "stuff" as it is deposited.  Most builders are not concerned with making that kind of layout.  What sells is a bathroom upstairs and downstairs.  And what gets built easily is one bathroom over top of another, to simplify the plumbing.

Also, it would require some kind of creativity to make the basement toilet a composting toilet in this scenario. For one, you need to get out of the way of the chute from the upstairs toilet.  So it needs to be an angled chute.  This means some water is required—non-stick coatings still need some cleaning (if you're not laughing already, think about gravity for a bit).  You also need to place the seat above the top of the big bin, which means you must ascend "the throne" to do business.

The general marketplace isn't ready for composting toilets that are integrated into the house.  That leaves it to the DIYers.  The modification is not widely considered as adding value to the home, so there goes the house flippers and young families that have any concern about being able to move with career changes or development.  Even if you live on a farm and won't be selling the farm house to anyone for the indefinite future, you have to be pretty committed to the idea before you dive in.  (Er, poor choice of words...)  If you're interested in how effective they are or whether they smell, see here.

What I have learned over the years about composting is that you need heat to make the process work efficiently and produce safe compost.  We are familiar with pasteurization, where pathogens are killed off with heat.  The same should be done with any compost where there is a chance there are pathogens.  In compost based on household waste (kitchen scraps, weeds, leaves, etc.), there are two villains: weed seeds and plant diseases.  They can both be "killed" with heat.  Heat also hastens the decomposition.  However, unless you have a good sized pile (think, "farm") and are prepared to moisten and aerate it, as well as make sure of an appropriate mix of nitrogen and carbon sources ("greens" and "browns"), you aren't going to get the heat that is needed.  At least for standard composting, a temperature between 55°C and 65°C is recommended to kill as many pathogens as possible but still maintain a thermophilic ("heat loving") bacteria population to keep the process going (http://compost.css.cornell.edu/microorg.html, 2013).  A small batch of compost can also be finished by cooking it.  Some have used solar cooking as a means of killing off pathogens and weed seeds that may have survived the composting process.

If you don't have the volume of material to develop that kind of heat, some supplementary heat is required. In the context of a composting toilet, the heat also has the effect of evaporating the urine which I'm sure reduces odor significantly.  The Excel composting toilet has a heater which has an average power usage of 150 W (SUN-MAR, 2013). That's (150/1000) (24) (365) = 1314 kWh, annually.  At the Manitoba residential electricity rates of $0.0694/kWh, that's about $91.  Eek.  $91 for soil.  And without any social indirection as to where it comes from.  Compost is supposed to be dirt cheap—I thought.  I should mention though, that if I had a cabin somewhere that didn't have appropriate plumbing, a composting toilet like this one would be worthwhile to me.

The change is not impossible.  But at the national level, it's a tough sell.

Saturday, July 6, 2013

Introspecting the Lisp Representation of a Maxima Variable

I recently wanted to know how Maxima (a computer algebra system) implemented something.  I searched and searched and couldn't solve my problem.  Specifically, I wanted to access a Maxima structure from within Lisp code.  However, I didn't know how the structure was implemented in Lisp and therefore didn't know how to access it.

All you need is a single line of inline Lisp:



structures is a global variable which stores the structures that have been defined in the session by using defstruct().  I wasted a few hours looking for this information to come up with 25 characters that would answer my question.  Applying the same general idea to an instance of PanelStruct() tells me how it is implemented.  By the way, the answer to my questions looks like this:

((MLIST)
  ((|$PanelStruct|) $SIZE $TOP $CENTER $BOTTOM $ZENITH $AZIMUTH |$rdv|)
  ((|$RayStruct|) $START $DIRECTION) 

  ((|$PlaneStruct|) $NORMAL $CONSTANT)      
  ((|$PanelStruct|) $SIZE $TOP $CENTER $BOTTOM $ZENITH $AZIMUTH |$rdv|)   
  ((|$RayStruct|) $START $DIRECTION) 
  ((|$PlaneStruct|) $NORMAL $CONSTANT)) 
((MLIST) 
  (($PanelStruct) $SIZE $TOP $CENTER $BOTTOM $ZENITH $AZIMUTH $rdv) 
  (($RayStruct) $START $DIRECTION) 
  (($PlaneStruct) $NORMAL $CONSTANT)
  (($PanelStruct) $SIZE $TOP $CENTER $BOTTOM $ZENITH $AZIMUTH $rdv) 
  (($RayStruct) $START $DIRECTION) 
  (($PlaneStruct) $NORMAL $CONSTANT))

The near repeat is caused by the print function returning what it has printed and Maxima outputting it.  The $ indicates a references to a Maxima variable and the | | symbols indicate a case sensitive reference.  Oddly, the case is reversed for RDV (which is documented) but not for PanelStruct which surprises me.  (These structures are not built-in but were user-defined in my Maxima session.)

I will still need to figure out how I'm going to use the information, but I have a working concept.