the corioblog read, and be entertained Thu, 05 Dec 2013 20:00:57 +0000 en-US hourly 1 Let the Dust Settle Thu, 05 Dec 2013 20:00:57 +0000 coriolinus Alright folks, I haven’t written here in over a year and find myself wanting to close this thing down. I’m not going to take it off the net entirely, but it’s no longer a useful frontispiece to my presence online. It’s been a good time, but it’s time to go now.

I’m still online, of course; I haven’t vanished entirely. I’m on twitter: @coriolinus. I’m on Google+, if you have somehow pierced my pseudonymity and discovered my identity. Unless I am deeply asleep or actually flying, I generally read incoming email less than a minute after it arrives, and my reply record isn’t terrible.

Blogging, however, appears to be something of the past for me. I might someday start something topic-specific, but for now, I’m done.


]]> 0
Against Undue Optimization Wed, 05 Dec 2012 22:36:22 +0000 coriolinus We chart our lives as paths through multidimensional state spaces. It’s trivial of course to consider only the familiar four dimensions, but these diagrams only become meaningful when you disregard the relative simplicity of space-time and plot, instead, your position in decision-space.

You stand motionless at the vector sum of every decision you have ever made. Decision-space has a very high dimensionality, so considered freely there is a dizzying array of movements available from this position. You never choose freely, though, because too much freedom of movement invites paralysis. Instead, you filter your options through constraints.

The constraints in decision-space are as varied as the dimensions there. Suffice it to say only that they can be categorized by nature. Some are boundaries, limits; the things you will do, or will not; the thresholds you could only cross by becoming someone else. Others are somewhat softer: the things you should do, or should not, the violations of which are sub-optimal yet not redefining. The space remaining within these constraints is what we typically think of as possibility; it is what you may do.

Depending on your goals and your skill at navigating decision-space, an optimal path forward might be apparent. If we were angelic in nature, the optimal path would be always clear, and deviation would be impossible. This would be terrible.

Chess is not yet a solved game, but a solution has not been proved impossible. If it ever is solved, at every stage, there will be a single move known to be optimal, and only a fool would choose otherwise. You could look up every chess game from that point forward in a sufficiently large table. There would be no joy in it.

Life is interesting only because people keep going around making suboptimal choices. Somewhere in that angle between the constraints, people make their choices according to their nature and situation, and almost never choose optimally. The deviation between your optimal path and your own life is exactly what makes your life worth living.

]]> 0
Hitman: Sniper Challenge Silent Assassin Walkthrough Mon, 12 Nov 2012 10:09:09 +0000 coriolinus orHow I got one of the top 10,000 scores worldwide at this game.

TIMER: 15:00:00

1. Rooftop guard far
2. Shoot elevator control panel
3. Guard walks over, amazed. Shoot him down the elevator.
4. Rooftop guard near, facing away
5. Rooftop guard near, facing toward
6. Lower walk guard right-side

TIMER: 14:20:00

7. Wait until he walks around the corner: Lower walk guard left
8. Lower walk guard middle

TIMER: 13:45:00

9. Wait until the guard walks behind the tree: Deck guard left

TIMER: 13:15:00

10. As he peers over the edge: helipad guard

TIMER: 13:00:00
TIMER: 12:15:00

11. Shoot the edge of the pool to make the guard walk over to it
12. Pool guard
13. Fountain guard

TIMER: 12:00:00
TIMER: 11:00:00

14. Shoot the edge of the pool to get the guard’s attention (same as 11)
15. Shoot the edge of the pool again to get him to walk from behind the pole (same as 11)
16. Pool Guard 2 (same as 12)
17. Richard Strong

TIMER: 10:40:00

18: Corner guard
19: Smoker guard (use instinct; behind tree)

]]> 0
Today’s Numbers Sun, 22 May 2011 16:16:19 +0000 coriolinus 1: Days of week the PX closes early
2: Days of week the base back gate does not open
3: Weeks between buying a brand new HP laptop and its bricking itself
5: Items in this list which fit the Fibonacci sequence
8: Minutes to cycle between my apartment and the base back gate
10: Minutes to cycle around the base perimeter between the back and side gates
16: Minutes to cycle between my apartment and the base main gate

]]> 0
Trypanophobia Mon, 07 Mar 2011 15:28:00 +0000 coriolinus One of the annoying parts of adulthood is that when things are necessary that I really don’t want to do, such as for example getting my biennial mandatory blood workup, I don’t have the option to tantrum or otherwise express that fact to the people around me. There was a great freedom as a child to make it obvious when I was unhappy, to spread that unhappiness around and make sure everyone in my vicinity shared it. Such conduct can’t be considered anymore, for obvious reasons. Still, it was at least a release. These days, there’s nothing to do but bite the bullet with as much dignity and humor as I can muster, and that is not nearly so satisfying.

The fact is that I just don’t like needles. In itself, that isn’t so bad; it’s no great feat to go to the clinic, joke with the medics, stare at anything else until they’re done. It’s not like there’s any real pain involved. The real problem is afterward: pretty much as soon as they tell me I can go now, I’m in no shape to do so.

The symptoms are predictable: they happen reliably every time I have blood drawn. Nausea. Cold sweats. Paleness. Greying of vision coupled with graininess, as though my eyes have just cranked up into their Boost ISO ratings while slamming closed the pupils. When I was young, I passed out more than once after blood withdrawals, but I’m not allowed to anymore: military pilots aren’t allowed to faint. That would be an entry in my medical history that I really don’t want; it might threaten my ability to fly. So I don’t pass out anymore.

Instead, I sit for a minute until it seems prudent to stand, then retch into a toilet for a little while. Then I go sit down for another ten or fifteen minutes, waiting quietly to regain my equipoise. Only then can I go about my day.

This whole process is inconvenient and irrational and annoying, even more so for the fact that it’s automatic and unavoidable. I’d really like to be able to face blood drawings with the unconcern of a machine having an oil sample taken: through a convenient access port, with none of these autonomic responses incapacitating me regardless of my desires in the matter. Unfortunately, that skill continues to elude me.

At least it will be two years at least before I have to go through any of this again. And even despite this, today was a good day.

]]> 0
Peaceful Resolution Sun, 23 Jan 2011 05:49:06 +0000 coriolinus The alarm clock never actually registered as a sound, at first. Through some somnolent semi-synaesthesia, it was a persistent pulsing of pressure, unignorable and inexorable in dragging him to awareness, but not sound. It only ever registered as noise after he was most of the way awake, clearing his eyes, sitting up. Only then did its sawtooth waves truly begin to grate and prompt him to slap it into silence.

Aaron Brown was not a morning person.

This wasn’t atypical, though. Very little about him was. In sleepy sequence he did all the normal things: showered, shaved, suited up, downed a bit of coffee, went to work. Traffic was light this morning, which was a relief.

Another of Aaron’s traits was that he was a quiet sort of person. From the moment the alarm died until greeting the receptionist at the firm, the only noises he heard were the incidental noises of moving about his condo in the well-established routine. It’s not that he was particularly trying for stealth; he just saw no reason to make any unnecessary noise. If he moved without any particular grace, it was with at least the smoothness of a well-rehearsed morning routine; very little noise indeed turned out to be necessary. Even his Prius was far too polite to bother anyone with the excitement of burning fossil fuels, most of the time.

The receptionist was quite otherwise: a cheerful young woman named Sally. Cheerful wasn’t quite the right word; the right one would have most of the denotations of ‘perky’ without the connotations of ‘annoying.’ She was bright in personality, if not in intelligence, and her friendly greeting typically spiked through his sensitized hearing in a way quite comparable to the alarm.

Today proved to be an exception: her desk was empty. This was an anomaly, but not one which particularly troubled Aaron. His only interaction with her was through the brief trivialities of greeting and parting as he walked past her twice each day. There was surely some perfectly reasonable reason why nobody was there today. As he summoned the elevator, his mind wandered to other things.

Upstairs, in the office, Milo Hammerschmidt was frantic. Milo Hammerschmidt was Aaron’s boss. Milo Hammerschmidt used to play football. Milo Hammerschmidt was now 60 pounds overweight. As he heard the rumble of the approaching elevator, Milo Hammerschmidt slammed down the telephone on yet another endless ringtone and prayed. When the doors dinged and began to open, he leapt from his desk with joy and paced directly over.

“Aaron! Thank god you’re here; I’ve had a devil of a time getting anybody in this morning! Nobody’s answering their phones; it’s as though they’ve all vanished off the face of the earth. Listen, I need you to hold down the fort here for a while; I’m going to go start knocking on peoples’ doors. We just can’t function if nobody shows up!”

Aaron was an actuary. His job wasn’t to sell insurance, or to investigate claims, or to answer calls: all of those jobs required assertive people, loud people. People people. They wouldn’t have been a good fit.

Aaron’s job was to investigate data, and determine probabilities. Conditional probabilities, chained probabilities, and expected values were his bread and butter. Black swans and white noise were his seasonings. Aaron could tell you about the difference between correlation and causation, the statistical tools to determine which was which, and the perfectly good reason why it didn’t matter to the company which one it was as far as setting rates went. When he ran out of data, Aaron was a man who could commission a study to collect more data.

Aaron was not a powerful man, but he had enough power to suit his desires.

He was happy enough in his job. Shortly after noon, he looked up from his work and realized that while he was engrossed some people had come into the office. They were a small fraction of the normal office population, and were mostly standing around the coffee machine, chatting quietly. This almost never happened. Milo didn’t tolerate it. The coffee maker was set up directly across from his office door for precisely this reason. Milo, Aaron presumed, was probably still out trying to round up the rest of the staff.

Aaron liked to eat at a particular cafe near the office. It wasn’t heavily patronized in the best of times, but the food was good and cheap and surprisingly healthy; if it weren’t for that last fact it could have been called a greasy spoon. As he walked in, and the bells hanging from the door handle jingled their greetings, he saw that the place was empty. It could be that the staff were all busy in the back. That wasn’t entirely implausible. A bit of his subconscious was ticking away, though, working out what the probabilities actually were, given the available information. The numbers it was coming up with were startling. They couldn’t be right. In the meantime, while waiting for the waitress to take his order, he sat and watched the television.

It was showing the news, or at least it seemed to be. A young-looking reporter was interviewing a wild-eyed man in clerical clothes.
“The Rapture has come and gone. We are the remainders! We are, all of us, the damned.”
“Surely there’s some other explanation for the disappearances. After all, the Rapture was only supposed to take 144000 people; the most current estimates are that over five billion have already vanished. How do you explain the fact that so many more people were saved?”
“Can you question God’s grace to that extent? He promised to save that many, but through His divine munificence He’s saved the majority of the people of the world!”
“Why would he have left us behind, though? What made us different?”
“I cannot say. I’ve been searching my soul to discover why I am among the wicked to endure the Tribulation, but I cannot answer for the ineffable will of the Lord.”

The text ticker at the bottom of the screen was showing similarly apocalyptic messages:

After some twenty minutes of fascinated horror at the messages, Aaron ducked behind the counter and made himself a sandwich. He left a $20 bill on the counter without making change. It was hard to feel like it mattered.

Walking back to the office was somewhat surreal. There were people on the streets, but nearly no traffic. Occasionally a window smashed in the distance, but more people were simply walking into stores and taking what they wanted quietly. When he arrived back, he discovered he was the only person at work. He puttered for a little while, proving that using standard models the probability of current events was on the order of 1*10^(-340). Then, in the single most rebellious act of his life, he walked out of the office.

The streets were jammed with idling, empty vehicles. He walked, randomly at first, then decided to go to the park. By the time he got there, the sun was glaring blindingly golden off the glass facades of the surrounding skyscrapers. He leaned on the railing of a pedestrian bridge and looked out at it all. The trees shone verdant in the setting sunlight; the sky was a rich azure; the buildings rose haughty in the distance. The only noise was the wind through the leaves and the chittering of the small animals who lived nearby. He leaned on the railing, and became aware of a pressure in his head: the same periodic pounding which in a normal context meant that there was a signal there which his brain was refusing to interpret correctly just yet because it wasn’t yet aware enough to handle its reality. As its intensity increased, he lay back, perfectly relaxed, on a nearby park bench. He fell quietly into a painless sleep.

The scene was still but for the rise and fall of his chest. Shortly thereafter, that motion gently ceased as well. His constituent mass dissolved silently into dust, drifting lightly into the air. Only minutes after he sat down, all trace of him was gone.

Orbiting high above, in a craft no human ever detected, in a language no human would ever hear or translate, a being spoke. “It’s just hit 100%, Captain. There is no intelligent life on the planet.”
“Good job. What are the final violence statistics we’re going to have to report to the Ethics Committee?”
“Fourteen nuclear detonations in the eastern half of the major continent, though we’ve got solid evidence showing that those were aboriginal weapons. A few thousand deaths from depiloted aircraft and vehicles hitting bystanders. All told, we achieved a better than 99% peaceful resolution rate.”
“That’s excellent work, men. Stand down. Nonessential personnel are not required to report for the next three shifts.”

The captain paused, the eyes of its crew on it. “You’ve all performed above the standard for this, the most technically tricky part of this mission. Still, the hardest work is yet to come:”


]]> 0
FW: Wikileaks data on Gov’t Computers & Personal Owned Thu, 09 Dec 2010 10:09:09 +0000 coriolinus Received the following email regarding the official Army policy on Wikileaks, at least for my unit:

From: [redacted]
Sent: Wednesday, December 08, 2010 4:03 PM
To: 2-2 AVN Staff; 2-2 ASLT COs; 2-2 ASLT 1SGs
Subject: FW: Wikileaks data on Gov’t Computers & Personal Owned
Importance: High


Below is the guidance for viewing material on Wikileaks’ website.  To
summarize the below, the Wikileaks website is not to be viewed on a
Government computer, the information is still considered to be
classified and any computer found containing classified information
(i.e. information from Wikileaks) will confiscated and subsequently

If there are any questions please contact the S2 office.



—–Original Message—–
From: [redacted]
Sent: Wednesday, December 08, 2010 11:05 AM
To: [redacted]
Subject: Wikileaks data on Gov’t Computers & Personal Owned Computers
Importance: High

BLUF: Do not view released or published classified data found on the
internet (Open Source) on unclassified Government systems OR on personal
owed systems. (See caveats)

Department of the Army policies regarding the issue can be found in AR
380-5 Information Security and AR 25-2 Information Assurance. All of the
information is still considered classified. Although now that it can be
found via open source, DOD still considers it as classified until
further notice and should not be viewed or process on a designated
unclassified government computer. Should a unclassified computer be
found containing classified information, it will need to be isolated and
wiped to remove the information.

As for viewing the information via personal computer, I have not seen
any official message traffic preventing military personnel from viewing
the information; however should a personal laptop be found with
classified information on it, it will be confiscated with the potential
for a 15-6 investigation based on the information on an unapproved
system and improper storage.

AR 380-5, Chapter 10-2 a.


AR 25-2

4-31. Employee-owned information systems a. Prohibit the use of
employee-owned information systems (EOISs) for classified or sensitive

AR 25-2 Chapter 3-3

c. General users. Use of Government IS and access to Government networks
is a revocable privilege, not a right.

Users are the foundation of the DiD strategy and their actions affect
the most vulnerable portion of the AEI. Users must have a favorable
background investigation or hold a security clearance and access
approvals commensurate with the level of information processed or
available on the system. Users will-

(1) Comply with the command’s AUP for Government owned ISs and sign an
AUP prior to or upon account activation.

(2) Complete initial and/or annual IA training as defined in the IA
training BBP (
<> ).

(3) Mark and safeguard files, output products, and storage media per the
classification level and disseminate them only to individuals authorized
to receive them with a valid need to know.

(4) Protect ISs and IS peripherals located in their respective areas in
accordance with physical security and data protection requirements.

(5) Practice safe network and Internet operating principles and take no
actions that threaten the integrity of the system or network.

(6) Obtain prior approval for the use of any media (for example, USB,
CD-ROM, floppy disk) from the SA/ IAM.

(7) Scan all files, attachments, and media with an approved and
installed AV product before opening a file or attachment or introducing
media into the IS.

(8) Report all known or suspected spam, chain letters, and violations of
acceptable use to the SA, IAM, or IASO.

(9) Immediately stop using an infected IS; and report suspicious,
erratic, or anomalous IS operations, and missing or added files,
services, or programs to the SA/IASO in accordance with local policy.

(10) Not disclose their individual account password or pass-phrase

(11) Invoke password-protected screen locks on your workstation after
not more than 15 minutes of non-use or inactivity.

(12) Logoff ISs at the end of each workday.

(13) Access only that data, control information, software, hardware, and
firmware for which the user is authorized access.

(14) Access only that data that they are authorized or have a need to

Should someone have additional information regarding this issue please
send to me so I can review and disseminate.


CPT [redacted]
BDE S2, 2 CAB, 2 ID

I’ve redacted the names in the emails; what matters is that they came from the BDE and BN S2. For those of you not in the Army, the S2 is the information security office; the bit of each unit in charge of classification, and the officer who signs as S2 is the person in charge of information security for that unit.

The policy they lay out here actually seems pretty sane to me: even though they’re threatening confiscation and erasure of personal computers discovered to have classified data on them, it’s not like they’re proposing to audit everyone’s individual PC; they’re just reiterating already extant policy. As it stands, on your own time and internet you’re perfectly free to look at this; just turn on porn mode and prevent your browser from caching anything!

]]> 0
Heuristics Korean Drivers Should Learn Fri, 26 Nov 2010 11:42:59 +0000 coriolinus
  • Pass, don’t pace
  • Don’t use more than one lane at a time
  • Don’t pass someone in the same lane as you
  • Tend to the right lane when moving slowly
  • Tend to the left lane when moving quickly
  • It’s rude to swoop in front of a line of cars waiting for an exit
  • If not waiting for an exit and your lane is slow and other lanes are fast, merge out to equalize the speeds
  • If there’s space ahead of you and you’re going less than the speed limit, accelerate
  • Use the turn signals when merging
  • Of course, it’s only the fact that none of these rules are followed that makes driving like an aggressive maniac an efficient way to beat traffic: most places in the world, it just slows down everyone else without speeding you up appreciably. Still, I suspect that driving would be much less frustrating if a tad less fun if there were a situation other than anarchy on the roads here.

    ]]> 0 One-upping ConfigParser Sat, 13 Nov 2010 14:39:13 +0000 coriolinus There comes a time in every programmer’s life when they decide that some silly, common library that they use all the time just isn’t good enough. It takes too many actions, or it feels opaque, or there are obvious features conspicuous in their absence.

    For me, that time is now, that library is ConfigParser, and the replacement is included below the fold. It’s called conf, and it means that the only interaction you as a programmer are required to have with your config file is to assign and/or read values to/from it. Assigning and reading look exactly like normal attribute assignment/reading.

    Subversion/TRAC string:
    distutils packaged version: conf-0.2.0

    As always, I’m too cheap to pay a thousand dollars for a site certificate, so please ignore any certificate mismatch errors you encounter when viewing the https side of the site. If you don’t trust me enough to click through, you’ll still find the current version under the fold.

    import os
    import codecs
    import json
    from ConfigParser import SafeConfigParser
    def internal(func):
    	def tf(self, *args, **kwargs):
    		self.__dict__['__conf__'].__dict__['__internal__'] += 1
    			return func(self, *args, **kwargs)
    			self.__dict__['__conf__'].__dict__['__internal__'] -= 1
    	return tf
    class Section(object):
    	def __init__(self, conf, name, fullname=None):
    		if fullname is None:
    			fullname = name
    		self.__dict__['__conf__'] = conf
    		self.__name__ = name
    		self.__fullname__ = fullname
    		self.__dict__['subsections'] = set()
    		self.__dict__['attributes'] = set()
    		#this lines MUST be the last in __init__
    		self.__restrictedvars__ = set((i for i in dir(self) if '__' not in i))
    	def __setattr__(self, name, value):
    		if self.restricted(name):
    			if (not self.__conf__.__restrict__) or self.__conf__.__internal__ > 0:
    				self.__dict__[name] = value
    				raise AttributeError("Namespace conflict: %s restricted for Conf use." % name)
    			self.__conf__.__new_data__ = True
    			self.__conf__.__cp__.set(self.__fullname__, name, json.dumps(value))
    	def __getattr__(self, name):
    		if self.restricted(name):
    			return self.__dict__[name]
    			return json.loads(self.__conf__.__cp__.get(self.__fullname__, name))
    	def __delattr__(self, name):
    		if self.restricted(name):
    			if (not self.__conf__.__restrict__) or self.__conf__.__internal__ > 0:
    				del self.__dict__[name]
    				raise AttributeError("Namespace conflict: %s restricted for Conf use." % name)
    			self.__conf__.__new_data__ = True
    			self.__conf__.__cp__.remove_option(self.__name__, name)
    	def restricted(self, name):
    		This function returns true for all attributes which should be stored locally, not in the 
    		configuration file proper.
    		if name.startswith('__') or name.endswith('__'):
    			return True
    		if name in self.__restrictedvars__:
    			return True
    		return False
    	def add_section(self, name):
    		fullname = ''.join((self.__fullname__, '.', name))
    		if hasattr(self, name):
    			raise ValueError("Namespace conflict: %s already in use" % fullname)
    		if not self.__conf__.__cp__.has_section(fullname):
    		self.__dict__[name] = Section(self.__conf__, name, fullname)
    		self.__new_data__ = True
    	def remove_section(self, name):
    		fullname = ''.join((self.__fullname__, '.', name))
    		if not hasattr(self, name):
    			raise ValueError("Can't remove section %s, as it doesn't exist" % fullname)
    		sub = getattr(self, name)
    		for subsub in list(sub.subsections):
    		del self.__dict__[name]
    		self.__new_data__ = True
    class Conf(Section):
    	Automatic storage and retrieval of arbitrary values into a config file. 
    	Uses type information and automatic reconversions to store a variety of primitive types in a
    	perfectly human-readable format. Primitive types are those encodable by the json module.
    	>>> from conf import Conf
    	>>> conf = Conf() #or Conf(filename, defaultsectionname)
    	>>> = 'hello world'
    	>>> = 723
    	>>> conf.baz = False
    	>>> conf.flush()
    	[exit, start a new session here]
    	>>> conf = Conf()
    	'hello world'
    	>>> conf.baz
    	If you want implicit file creation, you need to use a with statement:
    	>>> with Conf() as conf:
    	... = 2783.1
    	>>> del conf
    	>>> with Conf() as otherConf:
    	def __init__(self, filename ='.conf', sectionName=None):
    		Initialize a new Conf object. 
    		self.__dict__['__internal__'] = 0
    		self.__dict__['__restrict__'] = False
    		#the above is magic; it must come first
    		#sanity check
    		if sectionName is not None and '.' in sectionName:
    			raise ValueError("Namespace: '.' cannot be part of a section name")
    		#initialize the superclass
    		Section.__init__(self, self, sectionName if sectionName is not None else 'config')
    		self.__filename__ = filename
    		self.__cp__ = SafeConfigParser()
    		#load and initialize the configparser
    		if os.path.exists(filename):
    			with, 'rb', 'utf8') as cf:
    				self.__cp__.readfp(cf, filename)
    		if sectionName is None:
    			topLevelSections = [s for s in self.__cp__.sections() if s.count('.') == 0]
    			if len(topLevelSections) == 1:
    				sectionName = topLevelSections[0]
    				self.__name__ = sectionName
    				self.__fullname__ = sectionName
    				sectionName = 'config'
    		#create the default section
    		if not self.__cp__.has_section(sectionName):
    		#load default section attributes
    		self.attributes = set(self.__cp__.options(sectionName))
    		#load the various sections
    		#first, sort them by the number of dots they contain
    		secs = [(s.count('.'), s) for s in self.__cp__.sections() if s != sectionName]
    		for name in [sec for count, sec in secs]:
    			if '.' not in name:
    				self.__dict__[name] = Section(self, name)
    				self.__dict__[name].attributes = set(self.__cp__.options(name))
    				fullname = name
    				rest, name = name.rsplit('.', 1)
    				sec = self
    				for part in rest.split('.'):
    					sec = getattr(sec, part)
    				sec.__dict__[name] = Section(self, name, fullname)
    				sec.__dict__[name].attributes = set(self.__cp__.options(fullname))
    		self.__new_data__ = False
    		#this must come last:
    		self.__internal__ = 0
    		self.__restrict__ = True
    		#This is used in combination with the @internal decorator. Each method so decorated
    		# increments this variable on entry, and decrements it on exit. They can then check: is
    		# __internal__ > 0? If yes, they were called from within this Conf object, and can adjust 
    		# their behavior accordingly.
    		#Note that we initialize it here to 0. When this __init__ exits, it decrements to -1. This
    		# is intentional. Since each internal function starts by incrementing it, this means that
    		# only if the variable is > 0 was its caller also internal.
    	def __enter__(self):
    		return self
    	def __exit__(self, exc_type, exc_value, traceback):
    		if self.__new_data__:
    	def flush(self):
    		with, 'wb', 'utf8') as cf:
    		self.__new_data__ = False
    	def add_section(self, name):
    		Create a new section in the conf file. This will become a dotted extension of the conf object.
    		For example:
    		>>> c = Conf()
    		>>> = 'hello world'
    		>>> c.add_section('bar')
    		>>> = 'world says hello'
    		The above turns into a config file which looks like this:
    		foo = hello world
    		baz = world says hello
    		if hasattr(self, name):
    			raise ValueError("Namespace conflict: %s already in use" % name)
    		if '.' in name:
    			raise ValueError("Namespace: '.' cannot be part of a section name")
    		if not self.__conf__.__cp__.has_section(name):
    		self.__dict__[name] = Section(self, name)
    		self.__new_data__ = True
    	def remove_section(self, name):
    		Remove a section and all included data.
    		if not hasattr(self, name):
    			raise ValueError("Can't remove section %s, as it doesn't exist" % name)
    		sub = getattr(self, name)
    		for subsub in sub.subsections:
    		del self.__dict__[name]
    		self.__new_data__ = True

    Creative Commons License by coriolinus is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.
    Permissions beyond the scope of this license may be available at

    ]]> 0
    The Sound of Cannon Wed, 10 Nov 2010 08:54:46 +0000 coriolinus Those of you who follow me on twitter know that I recently described tank fire as making a crumping sound. Recently I had the opportunity to learn otherwise.

    Tank fire sounds like a bass drum the size of a stadium. It is louder than thunder. A kilometer away from the firing, it rattled the walls of a building strongly enough that I felt the pressure wave passing while inside. It is the boom of the hammer of the gods pounding out a new mountain range.

    Tank fire is loud enough that I could hear it inside a Black Hawk in flight, at least 3k away, over the noise of the engines and through the two layers of ear protection that are mandatory for flight crew.

    None of this is exaggeration. I was deeply impressed by the sound of cannon.

    ]]> 0