Author Archives: bhyde

Dump Translation Unit

I was inspired by:

   Reflectance from C/C++ code (pdf)
   Duncan Temple Lang
   Statistics and Data Mining Research,
   Bell Labs, Lucent Technologies January 15, 2003

Fun things based on leveraging the GCC compiler’s willingness to dump what it’s compiling after it’s done the parsing etc. So I wasted a few hours writing this hack.

Common Lisp is fun; for example this code that takes things like this xpath mimic “//function-decl/name/strn” and converts it into this SEXP ((:class tu-classes::tu-function-decl) (:attribute tu-classes::tu-name) (:attribute tu-classes::tu-strn)).


(defun parse-path (path-string)
  (let ((path-from-string
	  (with-perl-style (path-string)
            (sg "//" ")(:class tu-")
	    (sg "/" ") (:attribute tu-")
	    (s "$" ")")
	    (s "^)" "")
	    (s "(.*)" "(1)"))))
    (let ((*package* (find-package "TU-CLASSES")))
      (read-from-string path-from-string))))

Then later i can write things like (do-path (x "//function-decl/name/strn") (print x)) to print the name of the functions declared in what ever GCC was asked to compile.

Some things about Lisp have gotten better since I was last playing with it. For example with-perl-style is a little macro I wrote that depends on CL-PPRE. So now we have a solid regular expression package that’s Lisp native. Installing things extentions is easier too. Installing CL-PPRE? Type: (asdf-install:install ‘CL-PPRE).

The smell of money

When we get the remains of a hurricane here in Boston the air sometimes smells of Sargasso Sea or some other tropical ocean. I wonder, after moving over the Caymen Islands will Ivan bring us the smell off-shore money? Maybe it will suck up some of that money and rain it down on Jamaica and Cuba!

Meanwhile in Florida the garden walls are falling and the rich find “They can see each other. That’s going to drive them crazy.” In a world of garden walls the landscape gardners are first responders.

Lord of the Rings at Boston Mueseum of Science

I’m not a fan of the Hobbit books, but the movies are grand spectacles and quite fun. Far better than the Harry Potter movies, for example. So I was quite abivalent about going to see the exhibit at the Boston Mueseum of Science (flash) about the making of the movies.

It was great! There lots and lots of different ways you can enjoy this exhibit. I liked it much the way I enjoy visiting factories, or artist studios, or the way I enjoy thinking about the mechinism of a business actually works.

Modern movies are like the hybrid monsters of science fiction. A kind of bizzare amalgam of organic reality and digital machines. The assembling a movie is something right out of the lab of Dr. Frankenstein. Each pixel on the screen has a long ancestry that sooner or later returns to bit of the real world. A real object exists somewhere. I was taken aback by how many generations it maybe away from that physically real.

It’s a kind of displacement story. Here instead of a culture being displaced by some technological innovation it’s all of physical reality.

Certainly, the exhibit has lots of real artifacts. Models, costumes, props. These make better mueseum exhibits than disk drives or inanimate program listings. But, all around the edges, you can sense where the real money gets spent on a film.

In one exhibt shows how they make extremely high resolution 3D digital scans of each of the actors. For example they build extremely detailed models of just the faces. These digital actors become movie subroutines just as much as the digital monsters. In any scene were the actor’s detailed acting skills are unnecessary this digital version can then stand in. Walking into a room, moving across a plain, etc. etc. As the technology improves the range of scenes needing the real actor declines. They are displaced. They have already displaced all the extras.

Similarly the actors, when they perform, are rarelyy embedded in anything close to the real scene that the movie presents. Only the smallest fragments of any scene are actually constructed; the rest is filled in digitally. Most of the acting takes place surrounded by blue screen, one actor, alone.

One side effect of this Frankenstein laboratory is that the real objects, the physcial world inputs become rare. They are like the eye of newt, the tail of frog, in some witch’s brew. Each of them becomes more rare and at the same time more precious. If your going to create a new species of digital monster then you might as well spend a really large sum of money on the archtypical physical model that will then be digitally scanned and sent into the subroutine libraries for later animation, dupication, etc. etc. So while they don’t need to hire a few thousand extras, they do need to hire a some very highly skilled model builders.

And all these models, costumes, etc. are amazing, delightful, and really cool.

If your in Boston, I recomend a visit. I don’t think this exhibit is going anyplace else in the US.

Darwin Port Packages

Of interest to Mac owning geeks; Open Darwin Ports has a set of Mac OS X install packages for most, but not all, their ports. They are just short of 15 hundred of these. Lots of fun esoteric stuff; elang, maxima, openmcl. All the misc. libraries for python, java, etc. etc.

Until yesterday I was mounting their webdav server via the finder when I wanted stuff; but that is often really slow.

Here’s an example of doing the same kind of thing from the command line.

   mkdir mpoint
   mount_webdav packages.opendarwin.org/ mpoint
   cd mpoint
   find . -mindepth 1 -maxdepth 2 -name '*.mpkg' > package_list.txt
   umount mpoint
   rmdir mpoint

That gives you a list all the available packages.

Here’s an example of that installs aquaterm. That’s found in the ports that are grouped under the name aqua; i.e. the
things that require Mac OS X’s aqua.

   mkdir mpoint
   mount_webdav packages.opendarwin.org/ mpoint
   /Applications/Utilities/Installer.app/Contents/MacOS/Installer mpoint/aqua/aquaterm-0.3.2.mpkg
   umount mpoint
   rmdir mpoint

That long overly clever way of firing up the Installer has the benefit that if that was a script the umount happen after the installer exits.

Crucial Decision Breakdown

A little more on Irving L. Janis’s work on why competent capable groups focused on some crucial decision end up having a fiasco.

His diagnosis of the what leads to a premature exit from the vigilant problem solving at the feet of arousal. Like the three bears the group fails because it is too hot or too cold. The problem of too cold is a form of organizational blindness. The group fails to appreciate the necessity of additional vigilant problem solving. The overheated organization pops out of it’s vigilant problem solving in a state of emotional panic of one form or another. His observations of real word cases suggest that there are three classes of over reacting: cognitive, affiliative, and self-serving. Digging further in he then enumerates the “personality deficiencies” that trigger these too hot/cold exits from vigilant problem solving.

I. Too Cold

1. Lack of Conscientiousness
2. Lack of openness
3. Cool, calm, detatched, coping style
4. Chronic optomism concerning stablity and low vulnerabity of the organization

II. Too Hot

IIa.Cognitive (i.e. resource limitations)
5. Chronic low self-confidence or sense of low self-efficacy
6. Chronic pessimism concerning the organization’s ability to supply essential resources for solving complicated problems

IIb. Affiliative (i.e. loyality issues)
7. Strong need for social approval
8. Strong neeed for power and status
9. Chronic apprehensiveness about ruthlessness of other powerholders in the organization with supporting beliefes about their readiness to inflict retaliation
10. High dependency on a cohesive group of fellow members (executives)

IIc. Self serving, emotive, egocentric
11. Lack of conscientiousness
12. negativeism or hostility toward the organization
13. Low stress tolerance
14. Lack of percieved control and other components of low personality hardiness
15. Ambivalence toward he organization: it deserves loyality but is weak and vunerable
16. Habitual externalized anger-coping style
17. Chronic hostility toward opponents

He’s observed, it seems entirely credible to me, that each of these four major and 17 minor failure triggers leads to breakdowns of a particular kind. For example if the group becomes all hot and bothered about it’s lack of resources to think thru a critical problem it will respond by selecting a solution that emphasises that aspect of the problem. It will “solve” the problem using simple “rules of thumb” or some other coping mechinism for that kind of scarcity.

Previous post on this: How to have a fiasco.

Guardians

When groups reach decisions in tough problem spaces it can be hard to get everybody in synch with the choice that’s been made. Sometimes this leads to folks wandering (even boiling) off. That almost always happens in an Open Source projects in the inter-version transitions. Sometimes it leads to the group splitting up. This is why we have so many churches in the US.

Mind guards (a community maintainance role) often act to help temper these forces. As the group reachs a decision the mind guards fan out to help hold everybody to the course chosen. This can like all other community maintainance roles go bad. A community who’s mind guards are too draconian will be unable to engage in any vigourous problem solving.

Ostracizing is another pattern. When groups undergo a bumby period and it become clear that folks are going to boil off surviving portions of the group will sometimes engage in a massive amount of shunning; presumably so they can get on with. Again this can go very badly.

Against this backgroup you get a complementary process involving the exit/voice/loyality dynamics of the individual group members. As the vigourous problem solving comes to closure the group collectively turns down the voice knob, turns up the loyality knob which leads to some degree of exiting by the indivuals. This is hard work for the individuals. On the loyality front they have to labor to strengthen loyalities in the face of personal doubts; or conversely they have to go thru the grief of tearing down existing loyalities. On the voice front they have to shift from a collective dialog about the problem at hand and shift to a personal dialog about enter/exit the choice that’s been made.

There is a tragic variation of the guardian pattern. The new member arrives at the door of the group and makes a few statements. The groups guardian immune system reacts. The pattern I’ve noted is how rare it is for the reaction to be played out privately. Why do the guardians choose to publicly scold or shun new commer rather than privately outline the nature of the local customs?

One, reasonably functional, answer is that they don’t want the public statements of the new commer to reopen old arguements or pattern bad behavior for others. If that’s the goal a short critique would do the job. But often the critique I’ve observed is strong, even vitrolic.

My guess is that the guardians in this case are revealing something about their own inner live. The level of conflict they have with the issue still. The new commer’s actions didn’t arouse them; they were already aroused. The new commer just provided a hook for them. It’s an oportunity for them to demonstrate their loyality, to prove that they don’t voice the ‘wrong’ answer. Tragically this tends to send newcommers running. It’s an unintended consequence that the guardian’s over aroused response on issue X leads to the group growing insuallar re. the entire rest of the alphabet.

Denial of service attacks directed at communtities

I used to hate shopping. Now I enjoy it as a form of sport, a game. It isn’t necessarily a good hobby. I spent a few hours on Friday saving 4 dollars! Your amazed, I can tell. I used a sniping tool to bid on 6 identical auctions. I got the object the fourth lowest price in recent history!

So, yesterday I’m shopping for our lodging in Vancouver. At one site where power shoppers hang out I found a reference to BiddingForTravel.com. This is where the folks that play the PriceLine game hang out. (PriceLine is a site that sells surplus travel goods – you name your price and if they can find a vendor willing to take that price a deal is made.)

Originally, I’m sure, the folks that set up Bidding For Travel where just a bunch of power shoppers having some fun hanging out with like minded people; and getting bargins and on vacations. I suspect they yearn for those good old days. Today this is a really amazing site full of discussion boards for each city, hotel, region, etc. etc.

But, to the point of this posting.

When a fun community like this succeeds it becomes valuable. That value draws to the community – trouble! For example people that like to play power games are attracted because they see the power the community has aggreageted. I wonder how often Price Line’s lawyers call the people that run this site; or if Price Line’s bought them yet.

Another kind of trouble is the huge swarm of clueless newbies show that show up at your door. In effect a denial of service attack.

Groups when faced with these threats begin to lay in some organizational muscle to deal with them. Well at least those that survive do. This kind of muscle demands craft knowledge that’s usually different than the craft knowledge that brought the group together in the first place. So it’s often a bit painful – growing th at muscle.

I particularly liked the way that Bidding For Travel addressed how to deal with the swarm. First they did the usual thing. They wrote a FAQ. But then they did something wonderfully clever. They introduced a magic ritual. If the newbie can’t navigate the magic ritual then they ignore them.

The magic ritual is in the FAQ; so you have to read the FAQ. It is a marvalously ornate ritual that in effect helps to teach the newbie the lessions in the FAQ. In effect it’s a quiz that proves that you red the FAQ.

Before asking for help in the forums you have to answer 14 questions about your situation. Many of these questions involve doing some searching on the web. A treasure hunt!

Oh, look! The mail just arrived … rebate check for $15!

Bee Hive

I’ve been looking for years. A beehive! Bee Hive An example in nature of a two sided network effect! It provides brokage, exchange, or agency between two classes (pistil and stamen). It draws off a tax (honey) for the maintainance of the hub (hive). Since these kinds of hubs become more valuable as more and more particpants rondevous around the standards set by the hub I think we can assume that the flowers of the client population evolve to fit the exchange standards made manifest in the hub. I.e. they evolve to interface well with bees of a certain size et. al. of the dominate bee population. Overtime that should drive other polinators out of buisness.

Frustrating the man

How to herd cats: tie a small bright object to a string; place it in the peripheral vision of the cat; and then pull it around a corner out of sight.

Ben Laurie has been trying to entice me to pounce on tor. … I pounced yesterday morning.

Tor helps to frustrate the man in the middle’s attempt to monitor your internet usage patterns. For example.

Pretend to be the man watching my internet usage. You see me send mail to Mary, and then visit a travel site, and finally send mail to Tom. What do you think I’m doing? Notice that all those connections are unencrypted so you can probably know a lot more than just that pattern of usage.

Tor frustrates that kind of model building by mixing your traffic up with that of other tor users, partially encrypting things, and some other tricks. Mixing your traffic with a crowd of other users makes observing your patterns much harder. That’s done by bouncing traffice around the internet thru tor router nodes run by volunteers.

For example here’s my email to Mary intermediated by the Tor system. I send it to proxy on my machine; it’s encrypted, bounced around the Tor network a bit and then unencrypted and passed to Mary.

On my Mac this was really easy to set up; well in the usual geek sense of easy: download; build; install; cleanup; run it.


curl -o f.tgz http://freehaven.net/tor/dist/tor-0.0.8pre3.tar.gz
tar zxt f.tgz
cd tor*
./configure && make && sudo make install
Password: ...
F=`pwd` ; cd .. ; rm -rf $F f.tgz
tor

But you should proably follow the directions.

Then you need to adjust your Network Preferences to use it. Each interface has settings for proxies; you need to set the ‘Socks Proxy’ to use 127.0.0.1 (i.e. your own machine) and port 9050. I setup a “locations” in the network preferences for that.

I had having trouble with reaching things on my local private network; until the nice folks in the tor community tapped me with the clue stick and pointed out that you can write domain names to not route thru the proxy – it’s right there on the same page where you turn on the proxy – duh. I’ve also had some problems with client software that seem to disregard the network preference settings for proxies.