I just made a quick plt-dir-enema script, which I expect to need more than once:
This simple shell script for Unix/Linux empties out your
~/.plt-schemedirectory of everything except yourplt-prefs.ssfile. This is a good way to fix corrupted PLaneT caches or remove sets of PLaneT packages that keep reinstalling each other on uninstall.
As with most things, 'figured I might as well toss it up on the Web.
There will be no graphic art for this blog entry.
Lulls in consulting work are a good time to spiff up the ol' home
office.
The new desk from 2009-05-23 is installed. The home networking gear is moved out of the
bedroom closet. No longer have to drape CAT-5 from bedroom, through kitchen,
to office, every time I need to print. alyssa the LaserJet from 2004-05-27 is still going strong after five years.
Needs a plant, a better chair, and maybe a wall color that better complements the IKEA Birch Effect.
I released a new version of SICP support in PLT Scheme with fixed streams support. Thanks to Vinay Sachdev for reminding me.
I've released Quack 0.36 with one useful small change: PLT-like #:
keywords are colored in a subdued gray, to keep them from visually dominating
your code.
Someone just mentioned the cost of high-quality food.
The farmers' markets are now in season. You can typically get fresh, organically-grown produce from local growers, as well as things like bread, pastries, and cheese.
There are five in Cambridge (MA, USA) alone. In Massachusetts, check out the list of locations and times at the Mass. Dept. of Agricultural Resources site.
"The Maggie Sort Algorithm," posted to YouTube by johnzwarich.
Specialized to a class of sequences, and employs sorted subsequences and random selection.
In three easy steps, with the exclusive information in my exciting
new winners kit. Put yourself on the road to financial success for just $9.99
plus shipping and handling, if you order now.
My latest exploit came after I sold my old, broken ThinkPad X20 laptop. I still had an extra keyboard for it with a broken keycap and a near-dead left TrackPoint button. I thought I'd sell it for parts, but the lint, hair, and stuff trapped beneath the keys could not be blown out. So I ended up selling it as replacement keycaps. When one is underemployed, an hour spent carefully disassembling a keyboard, for a few dollars, is a few dollars of pure profit.
One of my other recent scores in the "liquidate household junk" venture was selling the coffee table with perpetually tacky glaze to someone who was willing to refinish it. I only got $5 for the table, but selling the matching end tables with it covered the materials from my screw-up with the epoxy.
I've also been selling books I don't need. Not all books sell online, but one can make at least a dollar per book on ones that do.
I'm implementing yet another PostgreSQL interface for PLT Scheme. I
did about half of the initial coding of the libpq low-level
interface bindings yesterday. I'm developing it with PostgreSQL 8.3.
Late May is my favorite time of the year for acquiring cheap and
free furniture. The students are dumping their IKEA, and the weather is mild.
Today, I finally got a desk. (I'd sold my guest futon, to make space and
funds.) IKEA MIKAEL Desk in Birch Effect.
Like almost all my IKEA acquired for a fraction of its original cost, this one had to be hauled across town with the hand truck.
Other IKEA acquisitions immortalized on the Web include: MALM Storage Unit, KLIPPAN Sofa, MALM Chest, and KLIPPAN Footstool.
I glanced at the Reddit self.programming forum over
dinner, and noticed the provocative title, "Anything like this out there in
the programming world? (See comments)". Curiosity piqued, I clicked. Sadly,
some very new programmer was wanting repeat-n-times special syntax.
I'm not a big fan of gratuitous special syntax, and repeat-n-times with no other control or functional data actually occurs only rarely. But the commenters seemed to think this was a difficult problem, and were posting solutions such as unhygienic CPP macros.
Anyway, to promote Scheme, I banged out a trivial and hygienic
repeat syntax, per request. This repeat is one of the
easiest things to do in Scheme syntax extension. A Scheme programmer who is a
beginner to syntax-rules would have little trouble whipping it
up.
(define-syntax repeat
(syntax-rules ()
((_ TIMES BODY0 BODY1 ...)
(let loop ((i TIMES))
(if (>= i 1)
(begin BODY0 BODY1 ... (loop (- i 1)))
(values))))))
You can see it work in the DrScheme Macro Stepper.
My first aid kit is almost complete. Just waiting for the leg
tourniquet I ordered off eBay to arrive. The M3 medic bag was a good choice.
The tools, including rescue flashlight, fit in the unzippered compartment, and they lay flat except when
posing for photo. The tall compartment is the perfect height for a
16oz. bottle of rubbing alcohol.
If you have a larger budget than I do, consider adding the glorious Victorinox RescueTool (video) to your kit.
I considered adding an EpiPen, and decided that the liability involved in handing over or using an EpiPen would be worthwhile in itself, compared to the alternative of not having one if it were needed. But the legal implications of getting one from Canada, where they're OTC, are unclear to me.
Now to wait for my first aid, CPR, and AED classes. I think that the last CPR class I took must have predated HIV. "What's a CPR mask?"
Update: Someone asked why the interest. Besides the common sense of having a first aid kit in the home, several times in recent years I've been the first one at an accident. (Calling 911 was actually the main reason I got a mobile phone, after two such incidents, and the main reason I usually carry a phone.) A couple of times, I felt helpless while I waited for first responders to arrive. Fortunately, none of those times was there anything that needed to be done except for staying with the victim. Probably someday, however, someone will need CPR, bleeding stopped, or something else that can't wait. I really should know what I'm doing, and hopefully have the necessary materials.
Update #2: A friend whose wife was an EMT says that multiple of his EMT friends have remarked in the past that using an EpiPen is a big liability for them here. If it's on the person to whom the EpiPen is prescribed, or the EpiPen is merely handed over, it's probably OK, was his understanding. I'll wait til I have a solid understanding.
The SICP support in PLT Scheme is up to version 1.10 already, and finally has an icon for the
DrScheme splash screen.
DrScheme chose to line up SICP right after HtDP; that was not my doing.
Tofurky slices were on sale at Harvest Co-op (Cambridge, MA, USA).
I had to get one of each variety.
Back when I was omnivorous, I went through a turkey sandwich phase lasting for a year or three. I'd get turkey from the deli counter, and sometimes eat turkey sandwiches three or four times a day. This was after a couple years of surviving mostly on ramen noodles, so turkey sandwiches were quite satisfying and nutritious by comparison. Perhaps it was the tryptophan. Perhaps I shouldn't call that "omnivorous."
Anyway, one day, in the space of a few minutes, for no good reason, I decided to go vegetarian. My diet had already diversified beyond just turkey sandwiches, but turkey sandwiches still held a special place in my heart. Having sampled various veggie-safe imitation turkey products, I can tell you that they're a different beast (pardon the expression) than the real thing. However, the Tofurky roast is a good holiday substitute for one of those processed turkey loafs, and the Tofurky slices are superior to the packaged (not deli) sliced 'meat' products that I recall.
A girlfriend from omnivore period, met for lunch years later, upon hearing I'd gone veg, blurted out in mock alarm: "But what about turkey sandwiches?!" Now you know.
(Photography note: with real gear, I'd set up fill flash or a reflector, or at least expose for the boxes. But I just can't be bothered with the pocket point&shoot, and I don't know a satisfactory way to diffuse the tiny little on-camera. Oh, I'd probably also disable the fridge light, so that I didn't have to gel the strobes to match color temp.)
I started working through SICP to assemble a regression test suite for SICP support in PLT Scheme. Only through section 1.2, I've already found a few missing
procedures, and have added them. I also made the random procedure
special-case an error that briefly had me assuming I did something wrong. The
new error message:
You called "(random 0)". If you're doing SICP section 1.2.6, don't use 1 for the first argument of "fast-prime?".
Please feel encouraged so send me more tests, and to tell me what additional error messages would be helpful to people working through SICP.
Brazil nuts are an effective means of spoiling an otherwise perfectly good selection of mixed nuts.
Not only are they too big and they don't taste all that good, but:
The saturated fat content of Brazil nuts is among the highest of all nuts, surpassing even macadamia nuts[citation needed] ...
I have nothing against Brazil or Brazilians; I just don't like their nuts.
I decided I should have a proper first-aid kit, and one in a case
with a shoulder strap, so it could be portable but leave my hands free. After
some on-and-off shopping online over the course of a few weeks, I decided I
couldn't afford a pre-made kit with everything I wanted, so I ordered a small,
discreet black M-3 medic bag, with the intention of filling it with exactly
what I wanted.
Discreet, because a few times I've had to run out the door to an auto accident on my street, and I do not want to look like a poseur with a big orange bag or any "star of life" anywhere when the EMTs show up. It's unlikely I'd actually need to administer first aid at an accident on my street, but the fastest thing to do is to slip the bag over an arm rather than stop and reason about whether it might be needed.
Going to Walgreens this evening to get a few missing pieces, I found they didn't have quite what I wanted, and what they did have was overpriced or sold in too large of quantities. They did, however, have a Johnson & Johnson "170 Items" first aid kit on sale for $10, down from $17. Two or three of the 170 items, which I did need, would come to $10 if bought separately, so I bought the kit.
Now, this J&J kit is missing lots of essential things, and is mostly a box of more Band-Aids than I'll ever use. And for well over 100 Band-Aids in a kit targeted at familes with kids, the inclusion of only two single-use samples of Neosporin is ridiculous. However, it is a good start. The hard plastic case isn't big enough to add, for example, a small bottle of rubbing alcohol (great for pouring over things), utility sheers, CPR mask, or a rescue tool, but the case should be good for storing health supplies that don't belong in a first aid kit, like excess Band-Aids.
When I did photography, I had a fleet of NiMH AA batteries and three chargers. One of the things I was careful to do was to keep the batteries together in sets of four, so that they'd wear and charge evenly.
Nowadays, I need AA batteries only for household devices. I sold all but one of my chargers and all batteries except for the Sanyo Eneloops. I added some AAA Eneloops.
The Eneloop charger that I kept recharges only in multiples of two at a time. Unfortunately, I have at least three devices that take three or one AA or AAAs.
I have not thought of a good way to keep my battery sets wearing and charging evenly with the Eneloop charger when they use odd numbers of batteries. It's not just the recharger: non-rechargeable alkaline AA and AAA are almost always sold in multiples of two.
If you are designing an AA or AAA-powered device, I discourage using odd numbers of AA or AAA. If you are buying a device, I suggest penalizing ones that use odd numbers of AA or AAA. If you find an affordable NiMH charger that is guaranteed to do the right thing with odd numbers of Sanyo Eneloops, please let me know.
Update: Title is a gratuitous Animal Farm reference.
In the continuing saga of the dark side of Cambridge (see 2009-05-07), at approx 4:20am this morning, I hear the screech and thud of an auto accident. I run out my door with fire extinguisher while dialing 911. (I'm pretty slow-witted at this hour, so it takes me longer than it should, and then I'm blanking on the name of one of the cross streets.)
This being Cambridge at 4am, nobody is hurt, the drivers and passengers are all standing around having amiable conversation, 911 says they've already been alerted, and a guy coming up the sidewalk hurriedly while talking on his phone checks with me that everyone is OK.
Batman would be bored to tears here.
I don't like to carry coins. The ones that don't go to tip jars or
panhandlers get emptied immediately from my pocket when I get home. Quarters
go in the laundromat jar, and smaller coins go in the other jar.
The other day, I cashed out my small coinage stockpile. $40.98 from the CoinStar machine (after their $4 cut) buys a week's work of groceries, which is nothing to sneeze at.
Up early this morning, I think I might've seen a middle-aged woman trying to pass (what looked like, in the briefest glance I got) a comically fake $100 bill at a convenience store at 4:30am.
My first thought: "Photo-- no camera in pocket, sigh." Then the guy seemed to have it under control, politely examining the paper while giving backchannel cues in a thick accent to her tortured pitch. So, I just left.
No phone, neither, I realized, so the question of whether or not calling the local police would be appropriate was irrelevant.
Always have a camera.
My work-in-progress on polished SICP support in PLT Scheme is now available.
If you'd like to work through SICP using DrScheme, please give this a try and let me know anything that can be made more smooth for students.
Alert any kids you know in Cambridge (Mass., USA) that May is Hunt for Golden Shoes month.
Golden Shoes is an outreach project of the City of Cambridge to encourage people to get out, walk around, and be active. It's somewhat like a month-long Easter egg hunt, in which shoes painted gold are hidden throughout Cambridge in places where people might find them when out walking. Anyone who finds a shoe can redeem it for a prize. Additional shoes are hidden throughout the month, so there is incentive to go for a walk around every day.
Note: Photo is of shoe before being hidden elsewhere, in an undisclosed location.
Disclosure: I helped recruit sponsors and hide shoes this year.
We're trying to make DrScheme a polished platform for students
working through SICP.
If you want to help polish this by working through SICP using it,
please see today's post to the plt-scheme list.
If you're in Boston, and do not yet have tickets for this visit of
Alvin Ailey American Dance Theatre, tickets are still available.
(Photo: Alvin Ailey American Dance Theatre)
© Copyright Neil Van Dyke Contact