::::: : the wood : davidrobins.net

My name is David Robins: Christian, lead developer (resume), writer, photographer, runner, libertarian (voluntaryist), and student.

This is also my son David Geoffrey Robins' site.

Programming languages and OCaml

News, Technical, School, Trading ·Tuesday December 30, 2008 @ 20:38 EST (link)

"Never get out!" he yelled. "That's it. Of course. We shall never get out. What a fool I was to have thought they would let me go as easily as that. No, no, we shall never get out."
—C. S. Lewis, Voyage of the Dawn Treader.

20081228: The plow came today, while we were sleeping (we're nocturnal over holidays). Fortunately, our neighbo(u)r, AH, rang the doorbell and woke me up. When I say fortunately, I'm being sarcastic, since there's nothing we could do (can't move the car, it's already at the top of the driveway and there's too much snow and ice around it to move it back any further, even if I were inclined to put it back in the driveway, which I'm not, given the work of getting it out). We should be able to get out tomorrow, God willing. It's been a long time.

My course next quarter is CSE P 505: Programming Languages (Dan Grossman). It looks interesting. I worked on "homework 0" (no points, just "get to know you" questions), and read the syllabus (about as expected for a programming languages course; I was happy to read words like "elegance" and "minimalist", though).

I installed OCaml on my home machine, since it appears to be the primary language for the course, and tried to install the UWa. research "SEMINAL" patch (it's supposed to improve error messages, although unfortunately it only works against 3.08.4, not newer versions, latest being 3.11.0 at time of writing). I was able to use Gentoo's ebuild utility to fetch and unpack the base, then I applied the patch, then used ebuild again to compile (meaning build), install (to a temporary location as usual with Gentoo), and qmerge (merge the install tree with the live system). However, the install stage got stuck in an infinite loop (keeps spawning make, had to kill a huge nested stack of processes); that didn't happen without the SEMINAL patch, so the patch is probably causing the problem. I went back and installed the latest version, without the borked patch.

Sample OCaml code (this is a function from the second homework for the class, but it's not required to turn in; it's something I wrote for fun to converts a sequence of turtle graphics coordinates—generated by other parts of the assignment that interpret a subset of Logo (note time travel)—into an image using ImageMagick; it's not especially graceful, but it gives the general idea of the language; in the .NET world, F# is based on OCaml, except it has useful libraries):
(* for fun, build a canvas and draw the moves on it using ImageMagick *)
(* in standard logo we'd have pu/pd to tell when we're drawing; here we have
   to just draw everything *)
(* tested with interpLarge/interpSmall/runTrans *)
let draw_cmd file size movelist = let pl = interpLarge movelist in
  let o = (float size)/.2. (* origin *)
  in let line x y =        (* generate ImageMagick MVG path line command *)
    "L " ^ string_of_float (o +. x) ^ "," ^ string_of_float (o +. y)
  in (String.concat " " (["convert"; "-size";
    (string_of_int size) ^ "x" ^ (string_of_int size); "xc:white";
    "-draw"; "\"stroke black fill none";
    "path 'M"; (string_of_float o); (string_of_float o)] @
    (List.map (fun (x,y) -> line x y) pl) @ ["'\""; file]))

(* test function for ease of use: draw on an 800x800 canvas to a web-accessible file generated from the given name *) let draw name movelist = Sys.command (draw_cmd ("/home/static/htdocs/dbrobins/tmp/" ^ name ^ ".gif") 800 movelist)
Burned some DVDs of some episodes sitting on the MythTV HD that we've already watched: mainly Stargate Atlantis. Wrote filldvd.pl to chunk a set of files into DVD-sized blocks, using Filesys::DiskUsage, Number::Human::Bytes, and File::Copy.

20081229: Found this new economy/finance blog, Pomp and Surkanstance (by two brothers Surkan), via the Investment Club internal mailing list. Looks interesting, especially his recent predictions for the technology industry in 2009. If he's right, I need to short GOOG, RIMM, AAPL, VZ and other tech firms (including MSFT), oil (OIL/USO/futures?), local (S&P, NASDAQ, DOW) and foreign indexes, and EUR/USD, and go long pay-as-you-go IT support and mobile phone companies. He predicts volatility, which is usually good for traders.

We finally got out (!): went to Safeway (groceries), Target (Wii game for Honey with birthday money, but they were sold out so she got a game at Circuit City), Half Price Books (extra 20% off), Circuit City (looked at monitors, bought another battery backup to replace one that died), Hard Drives Northwest (looked at computers and monitors, towards building a new trading system), Estate Arms (gun store nearby; closed), and Costco (bulk groceries). ViewSonic monitors look a bit fuzzy; HP and Dell looked good, but Acer looked the best; maybe it's just taste, but Acer looked sharper and clearer at Circuit City and HDNW. We got the following books at Half Price Books: Called my mother in the morning, since she was gone (she and Emily were taking Grandma Martin to other relatives Toronto) when I called Christmas Day.

20081230: Got out to the library today (it's closed Monday). Logged into work just before midnight to enter vacation time and avoid forfeiting time over the max allowed to keep.

Books finished: Safe Strategies For Financial Freedom, Beyond Candlesticks.

DVDs finished: Daylight, The Transporter.

Auto-importing DHCP hosts into local DNS

News, Technical, Photography ·Saturday December 27, 2008 @ 23:33 EST (link)

20081224: Went to sleep around 0700, got up 1330; two hour power outage, 1345 to 1545; played Carcassonne, power came back towards the end. Power bounced again at 1605.


20081225: I debated titling this entry Merry Christmas to some, bah humbug to PSE, but time truly does diminish wounds. The snow was far heavier than normal for this area, and I'm sure the people that fixed the various outages weren't involved in the design decisions that caused them (I'm sure they had mixed emotions about the overtime vs. being called out on Christmas Day). We had a short outage at 0306-0307, and a few more sub-minute outages in the early am. NTP was having trouble on the MythTV box (and our ancient desktop), possibly because it was so far off from the hardware clock (hwclock). Updated system time to be approximate, and then /etc/init.d/ntp-client worked, and I ran hwclock --systohc --local to update the hardware clock (and made sure it was being set on shutdown, via /etc/conf.d/clock). Then the big one came: the power went out from 0740 to 1205. Really? Yep. Christmas morning without power. Laptop didn’t resume from hibernation, had to do a full boot, and I even let the disk check run.

I set the various local machines to pass in a DHCP hostname (via either /etc/conf.d/net for the old baselayout-1 machine, /etc/dhcp/dhcpcd.conf for baselayout-2 machines), then setup tinydns (part of the djbdns toolset) on the server, using this Gentoo guide; tinydns is listening on 127.0.0.1, and dnscache redirects to it for .internal addresses. We're now powered by djbdns (the author asks people to write that so it shows up on searches). I wrote dhcp_tinydns, a (perl) program inspired by this one to update the DNS data for DHCP, using Linux::Inotify2 to watch dhcpd.leases, Text::DHCPLeases to parse the leases file, and a few DateTime modules to parse the lease end date and output it in TAI64 format for the tinydns data file. Now I can SSH to or ping machines by name rather than IP address, which is handy.

Snow's melting; we should be able to get out tomorrow. Called my family, talked to my Dad for a while; Mom and Emily were out taking Grandma to other relatives; talked to 3 of 4 sisters and a brother-in-law.


20081226: Tweaked dhcp_tinydns to log using Sys::Syslog (with tweaks to syslog-ng.conf to log to a new location), and daemonize using App::Daemon, and wrote a Gentoo init script for it.

Still couldn't get the car out today: snow, ice (slick from kids sledding on it), a front-wheel drive car, and a steep uphill street all worked against me.

20081227: Still can't get out, although the white crap is beginning to melt. Added internal reverse DNS support: needed to create /var/dnscachex/root/servers/0.0.10.in-addr.arpa containing 127.0.0.1, the internal address of the tinydns server, same as for the internal file in the same directory. For tinydns, I needed to add a nameserver line for the 10.0.0. prefix: .0.0.10.in-addr.arpa:127.0.0.1:a:259200. Now dig -x works as expected.

Books finished: Technical Analysis, Bioinformatics, Japanese Candlestick Charting Techniques, The Candlestick Course.

DVDs finished: A Christmas Story.

The Immigration Solution: A Better Plan

Political ·Wednesday December 24, 2008 @ 01:37 EST (link)

The Immigration Solution: A Better Plan has the transcript of a panel discussion on the book The Immigration Solution: A Better Plan Than Today's (which I have on hold at the library, but haven't been able to pick up due to snow), held by the Center for Immigration Studies at the National Press Club in Washington, D.C., on Tuesday, October 30, 2007. Some quotes (summaries in italics, some elision for brevity, and highlighting is mine):

If conservatives have demonstrated anything over the last decade-and-a-half, it is that enforcing the law works. Liberals long claimed that crime could not be lowered until poverty disappeared. Mayor Rudolph Giuliani and Police Commissioner William Bratton begged to differ, and began the most rigorous, accountable, and humane campaign of policing that [New York city] had ever seen. Crime dropped 70% and stayed down.

After 9/11, the Department of Homeland Security deported 1,500 illegal Pakistanis living in New York City. 15,000 Pakistanis then left voluntarily.

If someone proposed a program to boost the number of Americans who lack a high school diploma, have children out of wedlock, sell drugs, or use welfare, he would be deemed mad. Yet, our current immigration chaos is doing just that. Hispanics now have the highest teen pregnancy rate in the country. The Hispanic-out-of-wedlock birthrate is 50 percent, two times that of whites, and three times that of Asians. The Hispanic dropout rate is the highest in the country. And Hispanic children are joining gangs at younger and younger ages.

Somewhere around 2000, it was considered impolite to use the word illegal alien, even though it’s an entirely descriptive term… the imprecise word, undocumented worker, doesn’t tell us very much at all about the people who are here. Not all are working. Some figures have suggested that 25 percent of those on California entitlement are here illegally from Mexico. And undocumented suggests that there was documents at one point, and they had been forgotten or lost. In most of the cases, nobody had a document.

There were two tactics, I think, of [people] who wanted what I would call de facto open borders. One was to demonize people as racist who were concerned about enforcing the law… the second thing that proponents of open borders try to do is they try to confuse the issue of legal and illegal immigration.

We have sort of a lifecycle, where the employer uses, if I could say, the muscular capital of hardworking people from Mexico, and then after they are 40, to pick an arbitrary date, he throws them back on the entitlement industry. … So it is in the interest of the employer to keep the present system.

But the point is what is cynical about it—and I want to get back to that debate I had not long ago with the Mexican consul—is that, as I pointed out to him, the Mexican government expects somebody in Firebaugh or Mendota or Five Points who is struggling on $10 to $11 to send half of that wage back to Mexico. And that would, de facto, mean that he would have to work and live in conditions that are somewhat deplorable, and he would have to be subsidized by another government. His educational, his medical needs, whether in the emergency room or in the school district would have to be subsidized by the United States simply because he didn’t have the capital not necessarily because the wages were low but because half of his wages were being sent to prop up the Mexican government.

And when you couple that with the notion of La Raza, despite linguistic contortions … in Latin it means the race. No other group, whether it’s so-called white, Asian or black, would have a national organization of the race; it just would be beyond the pale.


Here’s what [the National Academy of Sciences] said about the first great immigration [1800-1925]: in general those immigrants were on par or slightly more skilled than the American workforce that was currently here. As a result of that, these immigrants succeeded fairly rapidly. … The majority of them didn’t stay here, and very few people understand this. America did not have a social safety net; we did not have welfare, we did not have Medicare, Medicaid, we did not have school lunch programs. If you couldn’t make it here, you went back. And in fact, it’s estimated that more than half of all immigrants during the first great immigration went back.

Now, not surprisingly, their children also succeeded… some of them did wonderful, great things. Most of them just became sort of solid members of the middle class. Economic studies have shown is that the children of the first great wave of immigrants essentially did 10% better than their parents economically. But it’s not like they made these great leaps.

There’s a third reason why these immigrants were able to succeed, a reason that we never talk about in this current debate, and that is that there were so many immigrants coming that there was a political reaction against them. That political reaction were the series of immigration restriction laws starting in the 1920s that eventually helped to cut off virtually all immigration to the United States; that combined with the Depression, which turned America into actually a net exporter of people during the 1930s, one of the few decades in American history when we were a net exporter.

Why is that important? Because economic research shows who immigrants compete most with; they compete firstly with other immigrants, and then they compete with native-born workers. When we had what you could call an immigration moratorium… we gave all those immigrants who were here and staying here an enormous advantage. They no longer had to compete with other… that immigration timeout is another reason why that generation succeeded.

(In summary: the three reasons previous immigrants succeeded:
  1. Their skills were equal to or greater than the American work force
  2. They self-selected as able to prosper (without entitlements)
  3. A reduction in immigration levels helped them establish themselves.)
In essence, the educational levels and the skill levels of today’s immigrants are not much different than immigrants of the first great generation, but America is a hundred years advanced.

A study done by economists published in 2006, economists at Harvard and the University of Chicago, estimated that immigration has been responsible for 40 percent of the decline in male black employment in the United States over the last 20 years.

So when you look at these sorts of issues you begin to ask yourself, what can we do to make immigration a plus for the American economy&hellip. Australia I found to be a very interesting case, and here’s why. Australia, as late as the mid-1980s, had an immigration system that was similar to our old immigration system in that it was sort of based on national origin. They favored people from Europe, and then of course when people from Europe stopped coming because, you know, they’ve got their own opportunities in Europe. Then they favored people from Asia, and then finally they said, why don’t we stop this national origin stuff; why don’t we figure out what our economy needs and try to attract people with the right skills who want to come here, regardless of where they’re from? And so they shifted from a policy that was national-origins based and that favored people who had family relations to one that was based on skills.

To paraphrase JFK: we should not ask what America (and the American taxpayer) can do for immigrants, but what immigrants can do for America, and for individual Americans: and if that answer is that the immigrant will hurt individual Americans, then the door should stay closed.

Thus begins the snow isolation

News ·Wednesday December 24, 2008 @ 01:09 EST (link)

20081217: Worked from home due to snow forecast and ice on roads; working from home for rest of week then off next week, probably week after too. (Started snowing heavily in the afternoon.)

20081218: Still snowing (10"-12" accumulation at 10pm) in "The Island Nation of Duvall" (as someone on the work Duvall mailing list put it), possible high winds this weekend.

Watched Saw (second viewing, or perhaps third): they try to present Jigsaw as a rational actor, "punishing" people, and giving them a way out of his trap. But I don't find him consistent, nor does he have standing to punish (he's not God, he has no injury if people aren't sufficiently appreciating life, despite the fact that he himself is dying). Lawrence saying that "Jigsaw Killer" is a misnomer because he never directly kills anyone is sheer sophistry.

20081220: Grades are in (supposed to be available on MyUW on the 17th, but they weren't available until today; until now the grade was "X" meaning not yet submitted); I got a 4.0 in Accessibility (I have no idea of the distribution; perhaps everyone did), and my 1.0 colloquium credit (colloquia are pass/fail). It's good news, but tough to maintain especially with more mathematical and programming-intensive courses, like I expect next term's Programming Languages to be. At least now I can put in for my tuition benefit at work.

Power went out for a half minute or so at 2345. minas-tirith decided to help out by turning off ip_forward (what the blazes?). Fixed it up in /etc/sysctl.conf; might have been due to the baselayout-2 change?

Having read the Wikipedia definition of paleoconservatism, I cheerfully identify as one, despising the managerial state; I suppose "paleoconservative libertarian" most accurately describes me (which is why I favor the Constitution Party, although I think the Libertarian Party has more of a chance of getting a candidate elected, so I support them too).

20081221: The promised windstorm never materialized (Honey wasted a lot of worrying). Sent Christmas gifts (money, since we didn't get out to pick gifts and postage is expensive for packages anyway) to (parents and younger siblings in) our families. Honey's relatives in Pullman finally got back to us on coming here for Christmas, begging off because of the weather.

11 o'clock news says Duvall got 19" of snow (up to 23" including overnight), more than anywhere else in the Seattle area (Seattle itself only got 9½).

20081223: Happy Festivus: shoveled the driveway out, took about three hours (1300-1450), went faster when a neighbor loaned me a snow shovel; but even after getting the car out, no dice; the local kids had been sledding on the road all day and it was too slick to get up and the library, one of our destinations, was closing at 1500 anyway. Argh.

Started watching Babylon 5; it's rather comical; bad acting ("Why, why… is the acting so bad?"), bad technology and special effects (you'd never guess it was made in 1993, contemporary with the end of Star Trek: The Next Generation (which ended in 1994).

Books finished: Technical Analysis of the Financial Markets, Into the Labyrinth, Day Trading the Currency Market, The Seventh Gate.

DVDs finished: Friends: The Complete Second Season, Paycheck.

Ammunition stamping: dumbasses and doubletalk

Political, Guns ·Saturday December 20, 2008 @ 22:41 EST (link)

I'd heard about this before but my father-in-law brought it to our attention. Here's the story. Once upon a time, an anti-gun businessman spent about $200k to create an ammunition-stamping system that would stamp serial numbers on batches of ammunition. He went around to ammunition manufacturers and tried to peddle it to them. They put their heads in their hands and thought: hmmm, should we pay money for this system that will increase our costs and decrease our profits? Since they're going concerns and not charities run by idiots (i.e. they're not US automakers), they laughed the guy out of their offices. But he vowed to get even, and bought up a lobbying firm or two who took some politicians out to expensive lunches and persuaded them that they should make this system law—for the good of the children, to bring dead victims back from the grave, and because criminals that will use a gun to commit crimes will certainly adhere to this law. After all, buying politicians was cheaper than employing a sales team or reading books, becoming informed, and building something the market actually wanted.

Passing a dumbass law like this would:
  1. criminalize handloaders
  2. criminalize private ammunition sales
  3. criminalize importing ammunition (unless foreign companies also employ this useless coding, which is unlikely
  4. criminalize storing non-coded ammunition after 2011
  5. further increase size and cost of government
  6. do nothing to reduce crime
  7. inordinately increase the cost of ammunition for legal users (probably as designed)
  8. criminalize hitting a bullet with a hammer and removing the mark
  9. further reduce privacy and increase government surveillance of what are becoming not free citizens, but subjects.
You can get more propaganda from ammunitionaccountability.org (intentionally not linked). They don't tell you about states where it's already failed, of course, such as Arizona. In Washington it seems to have died in committee (we can hope). Let your legislators know that you oppose this attempt at deprivation of liberties in the strongest terms, and that their support for it means the loss of your vote.

Books finished: Investing For Dummies, Fifth Edition, Short Term Trading In the New Stock Market, Stock Market Strategies That Work, How To Make Money In Stocks, The Hand of Chaos.

DVDs finished: M*A*S*H : Season #2, Back to the Future: The Complete Trilogy, Saw, Fracture, Saw II, Saw III, Saw IV.

Refactoring with the Template Toolkit

News, Technical, Guns, Trading ·Tuesday December 16, 2008 @ 15:37 EST (link)

… Government policies supporting homeownership (Fannie, Freddie, Community [Reinvestment] Act, pro-mortgage tax policies, …) caused a massive over-investment in housing. So massive that it could end up being the largest capital misallocation of our lifetimes.
—MK on the Investment Club list (MS)

20081210: All About Investing (Faerber): not very deep, nothing about analysis, but I learned a little more about futures and a lot more about bonds, since I'd hardly read anything on them yet. I'll still focus on equities, but it's good to have broad knowledge.

I'd put a few books on (artificial) neural networks on hold at the library, and Honey picked some up for me today. Baby Teacher: Nurturing Neural Networks From Birth to Age Five (Rebecca Shore, ISBN 0-8108-4284-X) sounded like a colorfully-titled book on training neural networks, but it was actually about real babies and real neurons; go figure.

20081210: McDowell's The ART of Trading is just an advertisement for his software, filled with useless bromides, lies, and cheap tricks to convince you that his program doesn't suck. Title sounds good (no wonder it has a lot of holds on it) but "ART" is actually an acronym for his system. So much for that.

20081211: Bad driver: WA 438 PBB, Blue Honda Civic (?) (late model, with silver-backed Honda logo), at around 1850: queue-jumping on Novelty Hill, and again at the WA-203 roundabout. Almost collided with the guy in front of me on the Novelty Hill attempt, so I had to let the twit in.

20081212: Gave Honey her Wii—a few days before her birthday, so she could learn it before her friends are here Saturday (turns out none of them could make it). She played until about 0300, but I hacked on my book tracking system until about 0400. Started with a plan to add topics (in a similar way as I did to my log), but ended up playing around with Template Toolkit, and using it for the book list view (existing, alphabetical by author last name) and a books read view (new, ordered chronologically by date read, internal only). All checked into Subversion and running smoothly.

20081213: Went to the gun show (Puyallup), picked up some Glock magazines (so-called "high capacity", which has as much meaning as "assault weapon"): two extended 33rd (made for the automatic G18, but fit semi-automatic standard 9mms, although they stick out, hence "extended") two standard 17rd, and 1000 rds. MagTech 115 gr. FMJ ammunition. Worked on this log (I'm still back on Alaska, August 26, which puts me almost four months behind). Imported photos on my camera (Luke Williams' goodbye party, Thanksgiving, and Honey opening her Wii from Thursday); realized I hadn't installed ImageMagick on the new machine, so went and did that, then had to fix the Gentoo USE flags (/etc/portage/package.use) so it could read JPEGs, since i'd set fairly minimal global flags. Installed ExifTool to look at image creation dates (exiftool -CreateDate <file>).

20081216: Had roast beef and champagne for Honey's birthday. Changed flat (left rear) tire on Solara. Don't know how it happened; either some reprobate slashed it in the Microsoft garage or I picked something up either in the garage or later.

What warrants local news excitement

News ·Tuesday December 16, 2008 @ 12:48 EST (link)

So, after 15 years of living up here my take on what warrants local news excitement is as follows:
  1. Lightning. Seriously, they will lead a newscast for lightning and severe thunderstorms. Back in North Carolina we used to call this "a summer afternoon."
  2. Snow.
  3. Bright sunlight.
JT, Canucks at Microsoft list

Books finished: Mexifornia, The Little Book of Common Sense Investing, A Mathematician Plays the Stock Market.

DVDs finished: Shanghai Noon, Dreamcatcher.

Welcoming atheists to the mountain state

Theology ·Friday December 12, 2008 @ 22:19 EST (link)

Someone has posted a sign to welcome atheists to West Virginia. It makes a nice reply to recent events (Christmas display follies) in Washington state.

The sign says:

Attention: Lunatic Atheists & their Lawyers
Anti-God is Anti-American
Anti-American is Treason
Traitors lead to Civil War
Rev. E. F. Briggs, PO Box 9066, Monongah, WV 26554

Books finished: All About Investing, The Art of Trading, The 7 Deadly Sins of Investing, Serpent Mage.

A modern parable

Political ·Tuesday December 9, 2008 @ 13:16 EST (link)

A Japanese company (Toyota) and an American company (General Motors Corporation) decided to have a canoe race on the Missouri River. Both teams practiced long and hard to reach their peak performance before the race.

On the big day, the Japanese won by a mile.

The Americans, very discouraged and depressed, decided to investigate the reason for the crushing defeat. A management team made up of senior management was formed to investigate and recommend appropriate action.

Their conclusion was the Japanese had 8 people rowing and 1 person steering, while the American team had 7 people steering and 2 people rowing. Feeling a deeper study was in order; American management hired a consulting company and paid them a large amount of money for a second opinion.

They advised, of course, that too many people were steering the boat, while not enough people were rowing.

Not sure of how to utilize that information, but wanting to prevent another loss to the Japanese, the rowing team's management structure was totally reorganized to 4 steering supervisors, 2 area steering superintendents and 1 assistant superintendent steering manager.

They also implemented a new performance system that would give the 2 people rowing the boat greater incentive to work harder. It was called the 'Rowing Team Quality First Program,' with meetings, dinners and free pens for the rowers. There was discussion of getting new paddles, canoes and other equipment, extra vacation days for practices and bonuses. The pension program was trimmed to 'equal the competition' and some of the resultant savings were channeled into morale boosting programs and teamwork posters.

The next year the Japanese won by two miles.

Humiliated, the American management laid-off one rower, halted development of a new canoe, sold all the paddles, and canceled all capital investments for new equipment. The money saved was distributed to the Senior Executives as bonuses.

The next year, try as he might, the lone designated rower was unable to even finish the race (having no paddles), so he was laid off for unacceptable performance, all canoe equipment was sold and the next year's racing team was outsourced to India.

Sadly, the End.

* * *

Here's something else to think about: GM has spent the last thirty years moving all its factories out of the US, claiming they can't make money paying American wages.

Toyota has spent the last thirty years building more than a dozen plants inside the US.

The last quarter's results: Toyota makes $4 billion in profits while GM racked up $39 billion in losses.

GM folks are still scratching their heads, and collecting bonuses… and now wants the Government to bail them out.

Books finished: Trade Your Way To Financial Freedom, Trade Your Way To Financial Freedom (2nd Edition).

DVDs finished: Legends Of The Fall, Thomas Crown Affair.

Tumultuous MythTV upgrades

News, Technical, Work ·Saturday December 6, 2008 @ 23:38 EST (link)

20081128: Fixed DVD scanning system to use Michael's Movie Mayhem instead of the defunct DVDSpot.com. Works fine; I wish MMM had the runtime on the page, since the lack means an extra request to IMDb to fetch it. But I'm happy I can get all the fields I was using previously, and the cover images. I did some refactoring of the code; it's all very tidy.

20081129: Upgraded PostgreSQL to 8.3 and ported database over. Went to Woodinville library with Honey. Finished my last two peer research paper comments for Accessibility. Fixed IMAP server: /etc/ssl/certs had some dangling links to which courier-authlib objected (and I removed the authpipe library since it couldn't find its program; it wasn't necessary anyway).

20081202: Still have turkey left; had it every day except yesterday, so far. (It ended up lasting us about six days.)

20081203: Finished colloquia reviews for school (4, plus 4 watched and rated but not reviewed). Bit of a rush at the end, oh well, no harm.

20081205: Holiday party. Parked at 6th and Oliver. Left work 1830, arrived about 2000, about 30 minutes to walk to the Space Needle (turns out we could probably have parked closer, but I didn't know how busy it would be); left around 2200 (much faster going home). Honey wasn't wearing very comfortable shoes, so she actually took them off on the way back, although I offered to pick her up at the Needle.

20081206: (Early hours.) Upgraded kernel on cirith-ungol (MythTV box) to 2.6.26-gentoo-r3. A lot of things broke, cascadingly: LVM now wanted baselayout-2, which put a lot of things in the wrong runlevels: networking wasn't included in default, so it didn't get started; checkfs was put in default (instead of boot), so it kept failing to check the root filesystem since it was already mounted and couldn't be remounted read-only. I tried to set the hostname in /etc/conf.d/hostname to localhost to appease Apache, but apparently MythTV stores its configuration by hostname, so to appease both I set the hostname back to cirith-ungol and ensured cirith-ungol was in /etc/hosts (as an alias 127.0.0.1, localhost). I still plan to do an emerge -Duav world… optimistic or foolhardy, I don't know. Time to kick back and watch survivor, I've been at this for five hours.

20081207: More updates to cirith-ungol: some conflicts (had to apply a patch from the Gentoo bug database to xine-lib so it would work with current ImageMagick, due to an API change; other programs depended on the new version, so there was a slot conflict); the LIRC update clobbered the numeric keys for my remote (since it used "One", "Two" etc. rather than "1", "2") but I'd backed it up and just restored my aliases. E2fsprogs and E2fsprogs-lib replaced ss and com_err, so I removed those, and broke wget (so I couldn't install packages any more; it also broke ssh and links). Fortunately Samba was still running and I could download the E2fsprogs packages on another machine and copy them over (to /usr/portage/distfiles).

I also had to apply a linux-headers patch to ivtv-utils (download patch, cd to /usr/portage/media-tv/ivtv-utils/files, apply patch to create a .patch file and patch the .ebuild to use it, and run ebuild <path to .ebuild> manifest to update the manifest file).

Oi… now MythTV comes up with a blank screen. The theme background is there, but no text or selector. Probably freezing rather than a font issue, since the background graphic is there. Eventually turns out that it could have been a number of things, one of which is that WindowMaker was reparenting itself to mythfrontend (!) and then mythfrontend was waiting for it (strace showed it in a wait4 syscall). Stopped that by removing WindowMaker from .xinitrc, but it'll need to come back if I want to use various emulators that need window widgets.

(By the way: this is certainly all a pain in the rear. But it's all diagnosable and fixable. If I was running Windows or another closed system, I'd be completely and utterly screwed.)

… Now mythfrontend can't talk to mythbackend (readStringList/writeStringList errors in the log). That seemed to magically go away. Had some log directory access permission issues; fixed. Also some database permission issues: apparently MythTV can't use an empty password, and if you set one, it acts as if you asked it to kindly make up a completely random password and pass it in.

On books: I'm reading Weis and Hickman's Death Gate Cycle, a heptad of books about a universe sundered into four elemental realms; great series; we got all the books at Duvall Books (used bookstore) or Half Price Books.

Technical Analysis by Kirkpatrick and Dahlquist is an excellent book; very rigorous treatment of the various technical indicators, although it doesn't go much into candlesticks (but there are plenty of other good books for that).

Books finished: Technical Analysis, Fundamentals of the Stock Market, A Bold Fresh Piece of Humanity, Elven Star, Fire Sea.

DVDs finished: The Untouchables, Girl, Interrupted, Star Wars Prequel Trilogy, Friends: The Complete First Season, M*A*S*H Season One Collectors Edition.

<Previous 10 entries>