Apr 30, 2008
The 6:15 Cascades zips past the crossing at SE 10th and Division.
—orc Wed Apr 30 20:15:48 2008
Apr 29, 2008
Looking west from 9th Street halfway between Division & Powell.
—orc Tue Apr 29 22:48:14 2008
Apr 28, 2008
Discount has been pushed up to version 1.2.4 with a simple bugfix that corrects a bug (reported by Mark Raddatz) where the code wouldn’t even compile if it was built without --enable-dl-tag
. The code in markdown.c
intertwined code sections that were protected with #ifdef WITH_DL_TAG
and code sections that were protected by traditional “canthappen” conditionals; as the code evolved over time, it was inevitable that I would finally forget what I was doing and leave a #ifdef WITH_DL_TAG
off, with the expected hilarious consequences.
Ooops.
This New Code! replaces many scattered #ifdef WITH_DL_TAG
s with one of them, thus vastly reducing the places where people (and by people, I mean *me*) might get confused.
—orc Mon Apr 28 18:13:21 2008
Silas explains the rules of his Mastermind variant.
—orc Mon Apr 28 17:56:41 2008
Apr 27, 2008
The southbound Coast Starlight passes the clubhouse at the Eastmoreland golf course after an on-time departure from Portland Union Station this afternoon.
The “fatal” part has nothing to do with Amtrak, of course; I was at home this afternoon, and wanted to walk down and take pictures of this train, but I forgot about it until 2:25; I threw on my shoes, grabbed the pentax, and bolted down to Bybee bridge just in time to see it clear the south throat of Brooklyn Yard. After taking a few pictures from the north side of the bridge, I scuttled across to the south side to get a picture of it going further south and in the long arduous 35 feet from railing to railing I managed to pull a muscle in my left calf, which made the walk back up the hill to home just a little bit more of an expedition than I was expecting.
—orc Sun Apr 27 17:04:27 2008
One of the flowers in what we laughingly call our front garden, photographed with my el-cheapo 100-500mm zoom through our not-yet-spring-cleaned front window.
—orc Sun Apr 27 14:08:14 2008
Apr 26, 2008
Do not believe the photograph; Mavis is not actually “30 feet away from ground zero” colo(u)red.
—orc Sat Apr 26 22:16:55 2008
<-
->
Russell and Silas pose for the camera in their own unique way.
—orc Sat Apr 26 20:16:23 2008
Apr 25, 2008
A F40 sled skates southwards on the rear end of the 6:15 Cascades.
—orc Fri Apr 25 20:15:55 2008
Apr 24, 2008
A week or so ago, I got mail from some spammer offering a “link exchange” (which, in the grand tradition of link exchanges, was that I should provide a link on gehenna or tsfr in exchange for some link buried many layers deep in a “this is our link exchange page.”) I was feeling charitable, so I actually replied to this bozo, saying “it’s not a good deal for me, so no, but if you’d like to be informed when I set up a for-pay advertising system I’ll give you a good rate for advertising.”
No answer, of course.
This morning I got, as if I hadn’t have sent this bozo a reply, a “friendly reminder” from the spammer saying that they’d not heard from me yet (apparently spamming is such hard work that it’s impossible to reply to mail.) This time I bounced it to the domain that it came from, adding my traditional “please deal with it” note and expecting no reply.
Less than a hour later, I got an unexpected early birthday present in my mailbox:
In-Reply-To: <24.04.2008.08.22.24.a28173@pell.portland.or.us>
Precedence: bulk
X-RT-Loop-Prevention: spry.com
RT-Ticket: spry.com #417120
Managed-by: RT 3.4.6 (http://www.bestpractical.com/rt/)
RT-Originator: lylev@spry.com
To: orc@pell.portland.or.us
X-RT-Original-Encoding: utf-8
Hello David,
Thank you for reporting this spam and spamvertised site hosted on our
network. We are suspending the account now.
--
Spry Abuse Department
And lo and behold, it was true. The spammer’s website was all gone, and apparently the nice people at Spry have friends in the bofh department at
the domain where this spammer had their mailbox, because when I got (in
duplicate) an anguished “you’re being MEAAAAAN TOOOO MEEE!!!!!” note from the
poor put-upon spammer (followed, at 3am, by a phone call from this jerk,) it was not coming from that domain, but
from a (brand new?) msn address.
I love the smell of splatted spammers in the evening. It smells like victory.
And if I ever need a different colo for pell and/or gehenna, rest assured that Spry will be the preferred candidate for that job.
Update: I hadn’t actually listened to the stupid phone call, but I caught the first couple of seconds of it today when skipping through my phone messages. It’s a real honest to g-d cartooney – the first one I’ve gotten since I’ve started sending “disconnect this spammer, thnxpls!” messages to spam hosts. W00t, that’s another mark on the Orc-vs-spammer scoresheet!
—orc Thu Apr 24 22:51:06 2008
I ended up leaving work at 6pm today (my corporate masters, in their goal to convince me that recovery was indeed the right idea, decided that tomorrow would be a good day to replace the cooler in the machine room, just in time to run into a monday deadline for a feature enhancement and a patch, both of which need the machines in the machine room to be functional. *snort*) and I didn’t make it across the river and to my customary “I wonder if anything will be coming down the line today” bus stop until around 6:20, which was just in time for the 6:15 Cascades to come hustling through.
Today I was carrying around my 50mm f1.2 prime coupled to an equally ancient Takumar 2x teleconverter, which gives me a really fast but odd telephoto lens; the focus functions as usual, but there’s a sort of otherworldly shimmer around the edges of things which is nice, but more of a painting-effect than a photographic effect. Plus the 100mm focal length and the 1.5x crop on the camera meant I had to hustle to get myself far enough away from the tracks so that I could actually take a picture with enough non-eng! in it to be recognisable as a railroad picture.
—orc Thu Apr 24 22:10:31 2008
Apr 23, 2008
Leo weighs down a pillow so it won’t float away if gravity is turned off.
—orc Wed Apr 23 22:01:32 2008
Apr 22, 2008
Silas put a hello sign up over the cat food bowls. Nobody knows why.
—orc Tue Apr 22 22:43:26 2008
Apr 21, 2008
A closeup of the Ross Island Sand & Gravel ready-mix plant at Taggart St.
—orc Mon Apr 21 19:25:12 2008
Apr 20, 2008
The #901 sits at the throat of the Milwaukie shops yard, ready for picture taking.
—orc Sun Apr 20 20:20:48 2008
Apr 19, 2008
I had to go by the Mill End store to get some buttons and thread (the latest quilt ended up eating all of the thread I had) and walked by the Portland Traction shops on the way back. The new new working Eng! and the ex-CRANDIC eng were out (the working eng is, I presume, still down by the Ross Island Bridge, and the NW-5 is still AWOL) so I brought out the soul-eater and took a couple of pictures before I continued north.
#1202 was coupled to an interestingly decorated reefer; pity about the unfortunate positioning of the power pole.
—orc Sat Apr 19 18:20:07 2008
At some distant time in the past, a wall was taken out of our house, and sometime in the 1950s one of the subsequent owners boarded it up to re-separate the two rooms. When the wall was rebuilt, it wasn’t actually fastened to the floor, so it appears that small children had hours of fun wedging things under it, to be discovered half a century later when the whisking brush of our vacuum robot dislodged them and pulled them out into the open.
Eventually we’re going to have to pull the wall apart just to see what surprises might come out.
—orc Sat Apr 19 13:04:43 2008
Apr 18, 2008
Chomp Chomp Yum Yum!
—orc Fri Apr 18 22:27:41 2008
After work today (only 8 weeks to go!) I wandered down the hill and over to the OHSU luxury medicine annex to take some fishy trolley pictures. When I reached the foot of the hill, a trolley was approaching from the north, and when I reached Gibbs St the trolley had reached the end of the line, turned around, and looped back again.
—orc Fri Apr 18 20:30:41 2008
Get out the flamethrowers, weed killer, and planetbuster nukes, because
annotations has been pushed up to version 1.0.4.2 with many
changes, each more horrible than the last.
1.0.4.2 inflicts the following changes onto an unsuspecting world:
- In
configure.sh
,
- FAIL if discount can’t be found
- FAIL if discount < 1.2.0
- In
format.c
- Remove the comment that describes the old (and now
invalid) formatting.
byline()
now supplies the <p class="byline">
…</p>
block wrapper
byline()
uses a rudimentary printf-style format for placing author
name (%A), post date (%D – w/ url link, %d – without), and %%
escape, plus \n
-> newline and \\
-> \
- In
article()
, call mkd_basename()
to set the root for all
unqualified relative paths in urls.
- In
formatting.h
, add a base
field to struct fmt
(to
pass to mkd_basename
) and change struct markup byline
to char *byline
- In
indexer.c
- Always use a
<FORM>
block for the comment button even
if there are already comments.
- everywhere where I call
markdown()
, call mkd_basename()
first so that I can resolve url fragments.
- In
readconfig.c
,
byline
is now a single-field configuration
instead of a pair.
- Generate
fmt.base
from the provided url.
- In
rss.c
, use fmt.base
for mkd_basename()
and
atom-format headers.
If you thought that the latest discount release was kind of dull, *this* is the New Code! that you’ve been looking for. I can’t guarantee birth defects, but if you gaze too long at this code you might find your eyeballs boiling and your ears bleeding from the sheer horror of it all.
—orc Fri Apr 18 15:35:17 2008
Discount has been pushed up to version 1.2.3 with the addition of a couple of new features, a few small bugfixes, and a documentation fix
The new features are
- Allows multiple =tag=s in a row, so you can do a whole
bunch of
<dt>
’s before you reach a <dd>
.
- The
markdown
program now supports the -t text
argument, which
tells it to process text
with the mkd_text()
function instead
of simply calling markdown()
The bugfixes are
- In the
markdown
program, the parsing of -fno<flag>
was
incorrect and thus wouldn’t let you turn off flags with
-f
.
- When I did the code restructuring for better emphasis handling,
I dropped
MKD_CDATA
support from mkd_text()
(thus breaking
the rss feeds from this site. Ooops) and put it back in for
this release.
- The documentation for the
-f cdata
flag to the markdown
program was calling it -f quot
, which was not exactly what
it should have been.
As New Code! goes, this is pretty dull. I can’t promise core
dumps, head crashes, or exploding processors if you install this code;
all it does is make my markdown implementation a little less surprising
than the previous release. But it’s Friday, so you probably don’t
need any additional excitement and this calm sedate New Code!
should fill that role admirably.
—orc Fri Apr 18 00:23:16 2008
Apr 17, 2008
Dorrie wonders what I’m doing with the camera, and, for once, does not bolt in terror.
—orc Thu Apr 17 21:57:47 2008
Apr 16, 2008
A southbound Yellow Menace freight helps me test the fisheye lens just southwest of SE 9th Ave and Division St.
—orc Wed Apr 16 23:10:06 2008
Apr 15, 2008
Portland Traction’s #100 (the working eng!, as opposed to the new working eng or the new new working eng or the CRANDIC eng) dozes at the south end of Portland Traction’s private ROW through Oaks Bottom.
—orc Tue Apr 15 19:01:05 2008
I just quit my job, and look, the sun just came out. I do not think this was a coincidence.
—orc Tue Apr 15 14:05:20 2008
For the last couple of years, I’ve been betting that I can continue to tolerate my stupid job for long enough to get the bears grown up and out of the house, and it’s starting to strike me that this may be a fools bet. Sure, it’s nice to have health insurance in this, the land of the worst possible first-world healthcare system, but these days all health insurance appears to do is reduce healthcare prices down to about twice (adjusted for inflation) what they were when I was growing up, and if I end up going insane and/or developing a menagerie of interesting stress diseases just for the sake of keeping the insurance going, it’s not likely to be a particularly useful deal here.
Of course I’m not particularly employable in the computer field anymore (at least outside of the extremely small and ridiculously competitive Linux kernel world,) so backing out of the HEALTH INSURANCE + DEATH vs. SANITY + POVERTY bet is likely to result in an immediate plunge into poverty, but at least in the poverty case I’d still be alive and, possibly, sane.
Perhaps I’ll become a carpenter. That’s a job that’s got some respect, not like being a computer programmer.
—orc Tue Apr 15 12:13:19 2008
Apr 14, 2008
Leo peers through the screen in the back window.
—orc Mon Apr 14 22:16:24 2008
- RADDATZ
- Since you brought that up, ABC News reported this week that your senior national security officials all got together and approved – including Vice President Cheney – all got together and approved enhanced interrogation methods, including waterboarding, for detainees.
- B*SH
- You mean back in 2003?
- RADDATZ
- Are you aware of that? Are you aware of that?
- B*SH
- Was I aware that we were going to use enhanced…
- RADDATZ
- That they all met together?
- B*SH
- Of course. They meet together all the time on…
- RADDATZ
- And approved that?
- B*SH
- … a variety of issues.
- RADDATZ
- And approved that?
- B*SH
- Yes.
–ABC news transcript of torture confession
—orc Mon Apr 14 11:09:29 2008
When I fixed up discount to properly block emphasis, I also did some cleanup to prevent memory leaks. Unfortunately, when I fixed up the memory leaks I dropped proper footnote handling on the floor, so code like =[look][]=
was not resolving properly. Discount 1.2.2 is a quick cleanup release to fix this defect, with a bugfix and a new testcase, but with (hopefully) nothing else to break anew.
—orc Mon Apr 14 01:59:54 2008
Apr 13, 2008
It’s springtime, so the bears are starting to learn now to dribble basketballs. Unfortunately, they’re perfectly happy to do it indoors instead of outdoors where they can’t break as many things.
—orc Sun Apr 13 22:55:30 2008
Apr 12, 2008
More playing around with the el-cheapo 500mm zoom I bought a couple of months ago.
—orc Sat Apr 12 22:17:48 2008
Silas examines something in the driveway. I’m not sure what it was, because I was sitting on the porch using my new used 500mm el cheapo zoom lens to get this closeup picture.
—orc Sat Apr 12 22:08:30 2008
The last time I added a new feature to levee, it had just been ported to the Atari ST and I was taking advantage of a functional exec()
system call to implement the “!” command in exec mode.
That was two decades ago.
Sometime last year I started corresponding with Felipe Augusto van de Wiel from the Debian project about doing a new release of the software to make the somewhat fussier than me modern Linux world happier with it. That correspondence resulted in levee 3.4p, but more importantly it resulted in my starting to use levee as my primary system editor on MacOS and various work Linux boxes that had inexplicably shipped with the vi clone vim
instead of the One True Editor.
As a result of this, I found that there are some real vi features I miss, ranging from the :g
and :v
commands through line-wrapping and the “!” command in visual mode. I didn’t really need :g
or :v
, nor did I need linewrapping, but not having “!!” turned out to be a real pain. I looked over the code, decided that it wouldn’t be too difficult to implement, and put it aside until this evening, when, in a 45 minute hacking session, I went in, restructured the code, and implemented the “!” command.
If you use levee, you want this New Code! because it makes the editor more useful. Regrettably, it also makes it about 400 bytes longer with the code restructuring and new function, but that’s a pretty small price to pay for being able to do “!}fmt” in the traditional way.
If you don’t use levee, you still want this New Code! because it’s a nice tiny bit of software from when the earth was young and you were lucky to find 64kbytes to program in (the Terak that I wrote levee on had 56k, and I only had 28k left after fitting it and my stripped-down version USCD Pascal onto the box. Machines are a bit larger now, but levee is still a pretty tiny piece of code.)
—orc Sat Apr 12 00:00:08 2008
Apr 11, 2008
Finally, a camera that’s just the right size for a Dust Mite!
—orc Fri Apr 11 20:27:53 2008
Apr 10, 2008
When we opened up a container of ice cream the other day this face peered out at us. Is it a martian artifact, the face of Jesus, or simply a random arrangement of ice cream? The world may never know.
—orc Thu Apr 10 20:07:03 2008
After an intermission of a few weeks, Discount has been updated to version 1.2.1 with the addition of a completely reworked emphasis parser. Previously,
it did a naive “turn all *
’s and _
’s into <em>
; turn all **
and __
into <strong>
” which led to incorrect XML when I interleaved *
and **
, but it now attempts to pair matching tokens before it starts spitting out emphasis.
The way I did this was to split the existing second pass (discount has a first pass that breaks the input into blocks, and a second pass that does text substitutions on the contents of those blocks) into two passes; The second pass now converts runs of *
into emphasis tokens, interleaved with fully-processed other stuff, and the third pass concatenates them together, matching open and close emphasis together as it goes.
for example, the four variants of **A*B***
produce correct XML now:
***A*B**
–> <p><strong><em>A</em>B</strong></p>
***A**B*
–> <p><em><strong>A</strong>B</em></p>
**A*B***
–> <p><strong>A<em>B</em></strong></p>
*A**B***
–> <p><em>A<strong>B</strong></em></p>
which is much better than the status quo ante.
So it doesn’t dump core (as the presence of this weblog post shows,) it fixes a few memory leaks, and it produces better XML on pathological emphasis cases. And that’s good enough to be New Code! to amaze and educate your friends and family.
—orc Thu Apr 10 19:55:44 2008
Apr 09, 2008
Silas in a reflective moment during his sixth birthday party.
—orc Wed Apr 9 21:29:16 2008
A Yellow Menace locomotive is framed between a telephone pole and the crossing gate at the SE 11th Ave. crossing today.
—orc Wed Apr 9 21:26:17 2008
Apr 08, 2008
A transfer freight creeps across the Powell Street bridge early this afternoon as I stand inconveniently far away at the Milwaukie and Powell bus stop.
—orc Tue Apr 8 22:46:25 2008
Apr 07, 2008
A Yellow Menace locomotive attempts to hide behind the trees near the Bybee Blvd overpass.
—orc Mon Apr 7 23:27:30 2008
Apr 06, 2008
It’s Silas’s birthday today, so the best and I made him a Pikachu piñata.
—orc Sun Apr 6 15:15:19 2008
Apr 04, 2008
I’ve been following the Plan 9 mailing list for a few years now, not so much because I use the OS (I’ve tried, but Plan 9 is much too gui-centric for me to tolerate for any period of time) but because they are so minimalist in other ways that it makes me look like someone who writes code for the FSF.
A couple of days ago, a new contributor to the list posted – as part of a thread where the mailing list had been bashing happily away at the Unix version of echo
– a manpage describing a ridiculous imaginary version of echo
.
The ultimate echo, actually useful, but no one wants it.
NAME
echo: echo arguments
SYNOPSIS
echo [-1abCDEeilmNnOqrtuVvwXx] [-B base] [-c cmd] [-d char] [-f file] [-L len] [-o file] [-S voice] [-s char] [args…]
DESCRIPTION
echo outputs its arguments. It takes the following switches:
- -1
- One argument per line.
- -a
- Output in ASCII. The default.
- -B base
- Output in given base, 2..32. Unless -u also given, base > 10 shows lowercase.
- -b
- Output in binary.
- -C
- Don’t echo anything, just print the number of fields.
- -c cmd
- Run cmd on each argument, replacing
$?
with the argument itself.
- -D
- Output in decimal.
- -d char
- Field delimiter. Default is end of argument.
- -E
- Print to standard error instead of to standard output.
- -e
- Allow escape sequences
- -f file
- Read from file, then from command line (if any).
- -i
- Read arguments from standard input.
- -L len
- Line width set to len. Default is to ignore line lengths.
- -l
- Turn uppercase to lowercase.
- -m
- Multi-column output.
- -N
- One field per line, numbering each field.
- -n
- Suppress newline.
- -O
- Output in octal.
- -o file
- Write to file instead of standard output.
- -q
- “Quiet mode:” redirect output to
/dev/null
if not to a file.
- -r RE
- Print every string that matches each regular
expression. Regular expressions cannot contain
“
+
” or “*
” modifiers.
- -S voice
- Send to speaker, having the given voice say it.
If voice is a null string, use the default voice.
- -s char
- Separate fields with char, default space.
- -t
- Separate fields with tabs.
- -u
- Convert lowercase to uppercase. With
-B
, output in upper case letters for base > 10.
- -V
- Strip non-printing characters.
- -v
- Make non-printing characters visible.
- -w
- If
-l
is given, word wrap instead of character wrap. Otherwise, ignored.
- -X
- Output in uppercase hexadecimal.
- -x
- Output in lowercase hexadecimal.
Test for everyone: write this echo in as little code as possible. C
or rc is permitted. The rules:
- for C: either Standard C (no other libraries) or only libc (no other Plan 9 libraries)
- for rc: only use programs in the core Plan 9 distribution - no programs that I have to get myself
- match the behavior EXACTLY as above
- shortest code and fastest run time wins
Winner gets something cool.
This is obviously not a serious offer, because nobody would be silly enough to actually write such a thing.
“Oh ho,” said I, “it’s a challenge.”
Secho (silly echo) implements most of the options listed in the quoted message. It doesn’t implement -L
, -m
, and -w
because that would involve some actual mental effort, it doesn’t implement -S
because in the land of Unix there are many ways of doing speech, all of which involve mental effort; the regular expressions supported here (maximum of 10) are just plain old REG_BASIC
expressions from Henry Spencer’s BSD regex library, so *
works despite the pleading of the message. I’ve also added two more options – -0
, which means that the input delimiter is a null, so you can do a
find / -print0 | secho -0 -c "file $?"
instead of using xargs
, and -9
tells it to do Plan 9 compatability and not print anything when no arguments are there.
So, yes, it’s New Code! in the finest tradition of Open Source ®™© taking a usable idea and cramming so many rococco features onto it so that it rivals the Vasa for seaworthiness. I’ll probably put it into Mastodon, in the o god my eyes! add-on package, too.
UPDATE: Oh, what the hell, let’s go in and add some features to this turkey.
—orc Fri Apr 4 23:57:17 2008
The elusive Dust Mite in its natural habitat.
—orc Fri Apr 4 21:01:51 2008
A southbound Cascades scoots past the Eastmoreland golf course clubhouse as it approaches the Bybee bridge.
—orc Fri Apr 4 19:36:46 2008
Apr 03, 2008
Traffic on 17th Ave.
—orc Thu Apr 3 19:16:57 2008
Apr 02, 2008
Amtrak Twinkie #187 pulls a southbound Cascades over Powell and into Brooklyn Yard earlier this evening (the intense colo(u)rs and extreme fringing at the rear of the engine are courtesy of stacking a #812 colo(u)r enhancer and a circular polariser. I experiment, you endure.)
—orc Wed Apr 2 19:01:04 2008
Apr 01, 2008
There is a small stack of defects and output quirks in discount that I’ve been churning my way through, and I’ve decided to release the code in two steps so that if I’ve horribly broken anything in the simple changes they will be reported before I mangle the code for the larger changes (better handling of *
, **
, _
, and __
, as well as a CONFIGURE.BAT
file for Windows) that remain to be done.
So, discount has been pushed up to version 1.2.0 with the removal of one memory leak defect (code blocks leaked the blank lines at the end of the block) and two subtle output changes. The defect was nothing exciting – I was merely setting t->next = 0
without bothering to delete the unwanted lines that were attached to t
, but the output changes have the potential of biting the unwary:
- The contents of a
<html tag>
are now parsed as code, not as
text. This keeps <a
href="linky">
from being written as
<a
href=“linky”>
, and may thus confuse source
that was written with \"
’s to get around the smartypants
extensions.
- When printing
<email@address>
automatic links, ensure that
the human-readable part of the link doesn’t include a mailto:
,
just the mail address.
This code has been run through the standard test suite and failed to fail, plus the memory leak does not cause exciting core dumps, so it’s tanned, rested, and New Code! for your coding pleasure.
—orc Tue Apr 1 23:15:43 2008
EPT #100 and #901 (the ex-CRANDIC engine) sit on the enginehouse leads last Sunday afternoon. The combination of the fresh paint, the rain, and the warming filter I was using makes the #901 shine in an almost radioactive fashion.
—orc Tue Apr 1 21:40:50 2008
—30—