Þ   briarpig  » log  » may08


May 2008 This way to May 2008 entries.

demos

     Lately I write demos under thorn with a todo list using C++ under a BriarPig mu-babel license. The run and hex demos were done on 13apr2008; crc on 14apr2008; buf on 20apr2008; in on 27apr2008; ctype on 04may2008; out on 18may2008; slice on 25may2008; quote on 31may2008; escape on 31may2008; this menu links all demos:


     mu: toy, peg, imm, tag, box, symbol, token, number, bigint, class, method, reader, writer, eval, env, vm, gc, world, pcode, compiler, asm, lathe, lisp, smalltalk, design, weight, jar, card, harp, debug, profile

     thorn: todo, names, iovec, assert, log, run, hex, crc, buf, in, out, quote, escape, compare, file, deck, cow, arc, blob, tree, slice, rand, time, stat, heap, node, primes, page, book, pile, stack, atomic, lock, mutex, thread, map, list, iter, ctype


31may08 string spinning

quote and escape

     I just put up two new demos for quote and escape. I've been offline most of today because my Comcast "high speed internet" service has lately become very undependable. Sure, I appreciate the irony of missing fruits of my professional work in my personal life. In fact, it's rather irritating I can't see the effect of my day job efforts at home.

30may08 dystopian gothic images

irritations

     My job hasn't been fun for a while, mainly because I can't run the software I write, because so many things have been rewritten the final runtime context doesn't yet exist. Every time I verge on finishing a unit test to run code in isolation, something more urgent comes up, like fleshing out something needed by another developer.

     I greatly prefer incremental development in my day jobs. The whole big bang model, besides feeling very creepy, permits other folks to reason without resistance, pulling belief out of thin air in the absence of concrete evidence. For a group the result is politics of varying intensity. For a person, acting in a vacuum of evidence can instill general malaise.

     The conversations are sometimes fun; but opportunities to actually solve problems are rare, which is a pity since solving problems is one of the most fun things to do in day jobs of limited scope and project ambition. My part of the pie got smaller a good number of weeks ago after we split my responsibilities three ways to parallelize efforts. Predictably, I got stuck with the app specific overview context defining why the algorithms even work in terms of what is known by my newer data structures. Others got the fun lower level i/o and async pieces, because they were narrower.

     I like doing the i/o and async parts. But my role was more specifying the requirements intersecting the dedup semantics, so i/o and async behavior would exactly suit the needs of parts I did code. I don't enjoy the role of knowing the right answer. I'd rather write all the code, too. But there wasn't enough face time to go around if one person did everything. Now with three guys on core mechanisms, we've enough bandwidth to talk with more people at once. Except we're spending time talking to each other as designs slowly evolve. So coordination overhead has gone up. We almost get stuck in three way finger pointing at times.

     The team is the best part of my current day job. The other two guys are as good as me at getting things done, and they both have extensive data experience. So we get along really well. I'm the only one who doesn't have 95% white hair, so I look like the youngster for a change.

     But if compensation wasn't the highest I've ever had, I'd look for something else to do, because I don't see the technology going anywhere very useful to me in the future. It's nice knowing all about dedup, and how I solve problems is a skill that translates, but it would be nice if using this system also involved skills translating to other technology contexts. That was more true when it was all Linux all the time. But we're slowly integrating more fully with a platform I'll never see again elsewhere, so it's patently a deadend. My two year anniversary's almost here, and I'll need to focus and resist temptation to see a third.

29may08 uncut dailies

amphigorey

     I'm more than a little bored, and I see no easy way to get relief in a hurry. So I may write a little goofy stuff for a while. Please do me the favor of not assuming any particular message in stories. It's hard to resist a little random nonsense when I suspect too much linear structure dominates assorted notions I suppose you construct.

boredom

     "Why didn't you go to a better school?" Ulf asked Wil out of the blue.

     "Why do you ask?" Wil volleyed, turning away from his keyboard with a resigned look on his face, folding hands in his lap after seeing Ulf's puckered look of concentration.

     "Well you're smart," Ulf granted with an easy gesture. "Usually smart guys go to good schools. So I'm confused. What am I missing?"

     Wil wagged a knowing finger of recognition. "You're one of those guys who thinks the world makes sense," Wil accused. "Aren't you?"

     "Sure," Ulf agreed. "Good things happen to good people. Something bad happens to you, maybe you deserved it."

     "Guess I deserved it then," Wil shrugged. "I made my dad uneasy. We didn't get along well because we were too different."

     "How's that?" Ulf wondered with a gleeful look. "What made you the black sheep? Something unsavory?"

     "My IQ was more than two standard deviations above his," Wil said. "More than a standard deviation above all my siblings too."

     "Did they hate you too?" Ulf probed with relish. "You poor thing. I take it your dad didn't find it useful to have a smart son."

     "As a young man," Wil sighed wistfully, "I often forgot to hide my own impression of how well I understood things. Of course, since I didn't know anything, I got myself into lots of trouble without good advice."

     "What did you expect?" Ulf offered. "Maybe you'd have had more more support if your folks were just like you. They'd at least have experience and insight relevant to your situation."

     Wil just sat twiddling his thumbs, glancing at his monitor as if thinking about going back to work. But Ulf wasn't having any of that.

     "What about scholarships?" Ulf asked. "What were your grades and SATs? Why didn't you work the system?"

     "Perfect A's and 1440," replied Wil, "I guess I should have studied for the SAT's or taken them later, or something. I might have gotten verbal above 670 if I prepared. I had no idea how to work the college game anyway; neither did any adults I knew."

     "I'm having trouble believing your story," Ulf squinted with a crafty expression. "Sure you didn't burn down a chem lab or something? Build some self-replicating nanobots?"

     "We didn't have gray goo back then," Wil smiled. "Okay look, I'm busy. If you're done flattering me to make some request, get it over with. What do you want?"

     "Zé defers to you," Ulf complained. "And I want to know why. I get treated like leftovers, and I wasn't expecting this. Why shouldn't I try to take your place? How smart are you really? What's your IQ? If I challenge you to a duel, what happens to me?"

     "You're pretty strange, you know that?" Wil asked Ulf with a stronger edge than usual. "Even for an aggressive marketing droid, you're getting worse all the time. The competition thing is really tedious, and I think you should knock it off."

     Ulf just stared, eyes getting slightly wider, clenching his jaws and stiffening up like maybe a fit was coming on.

     "Drink less coffee," Wil urged. "You'll have a stroke. Look, general intelligence is mostly a myth. A single number for IQ doesn't mean very much. There's many ways to be intelligent. Even if you only picked up a used copy of Howard Gardner you'd know that much."

     Ulf twirled an index finger to say hurry-it-up.

     "I haven't tested my IQ since I was 20," Wil warned. "I don't know what it is. At the college test center it came out plus four standard deviations. You can figure out the number yourself. But since it went up by more than two standard deviations after junior high school, I don't set much store by the number."

     "I didn't think IQ changed," Ulf said surprised. "Why so much? Did something happen in puberty to alter intelligence?"

     "Maybe testosterone," Wil mused. "Over the course of a few months it was like waking up and everything became achingly clear."

     "Was it a different IQ test?" Ulf asked. "With a variant scale?"

     "That's a good question," Wil nodded. "I had a psychologist girlfriend for a couple years, and she said the usual IQ test they give kids in school tops out around 135 at the high end because the aim is to measure low end carefully to see if special support is needed."

     "Ah," Ulf got the point. "School tests are meant to identify challenged students? Does that mean you took a different test in college showing how high your IQ might be, using a different scale?"

     "Something like that," Wil agreed. "My girlfriend said my IQ was actually the highest one I'd gotten on the college test. I don't know, and it hardly seems like it matters any more. It's not like I'm ever going to hang out with Mensa weenies and other self-proclaimed wits."

     "In your high school," Ulf tried to establish context. "How many like you? What's that translate to? One in 500?"

     "No one like me," Wil said. "About one in ten thousand. I don't think the teachers ever knew of a student like me, partly because my memory was also about plus four standard deviations. I ran circles around peers like they stood still. But my memory's weaker now."

     "Well whoop-tee-doo," Ulf sneered. "Aren't you special?"

     "I was a bit retarded socially," Wil mused. "It's always been hard to figure out what other people are thinking."

     "Thinking of sticking a knife in your back, most likely," Ulf offered graciously. "Are you still that naive? That'd be useful."

     "Lots of folks are smarter than me," Wil insisted. "Folks one league up from me can do things I can't. And some of it goes away when you get older anyway. Or it gets so old it no longer matters. And it's been a long time since I cared. I even treat folks like you as my equal."

     "You are so on my shit list now," Ulf seethed.

     "I was kidding," Wil mimed ribbing Ulf with an elbow. "Where's that sense of humor Eli says you have buried deep inside?"

     "I'm going to chant my wolf mantra now," Ulf warned, "and dream about tearing your flesh with my fangs. You'll rue the day you took a wolf on board and then dared to flaunt your superior attitude."

     "Weirdo," Wil blurted. "I'm gonna have Zé run you through the survival training movies and get some of that out of your system."

     "Ha," sneered Ulf. "That tale about Zé and his training construct wouldn't fool a child. He just watched Matrix too many times."

     "Out," Wil pointed at the door. "Don't come back without talking to Finch. Tell her I want your badge and your weapon; I don't want to see you anywhere near this investigation."

25may08 mock paper scissors

slice demo

     I finished the new slice demo, which includes the in-slice-stream class I wrote last week. A quote from a dialog in the demo:

parso ergo finito

     "Maybe I'm missing something," Stu interposed. "I haven't seen slice classes used much in interfaces I see so far. Does that mean you have more slice usage coming later?"

     "Yes," confirmed Wil. "When I added support for slices, this made it possible to get very fine-grained control over reading and writing subsequences of collections in very type-specific ways."

     "But you didn't code it yet?" Stu asked.

     "No, not yet," agreed Wil. "It looked like it would take forever to code every possible combination of effects I thought would be useful."

     "Well, forever is a long time," Stu noted.

     "I exaggerated," Wil granted. "When you're coding, forever is an amount of time stalling you from making progress long enough to derail your plans so you don't finish them."

     "Ah," nodded Stu. "Now I see the relation to forever. Dead projects are often dead forever. You meant to say: you avoided stalling."

     "I can write lots of slices," Wil agreed, "but I don't need to write them all right now. Just-in-time coding is often hard to plan."

     "I'm waiting for string slices, of course," warned Stu. "I bet ysz is actually the string slice class, right?"

     "Yes," Wil acknowledged. "Or rather, it's the octet string slice. The Unicode string slice is named ySz."

     "Dex will be thrilled," joked Stu. "Why don't you just punch him in the nose the next time he nags you about Unicode?"

     "Yeah, sure," Wil laughed. "I'm going to turn into Indiana Jones in my old age and punch people when they piss me off."

     "Are you going to use utf8 or utf16 for your Unicode?" Stu asked gently. "Don't punch me, I'm just curious."

     "All of them," Wil gestured expansively. "A Unicode string representation can easily indicate codepoint size."

     "If there's an out-of-band place to put it," qualified Stu. "I guess that means Unicode strings won't just be a naked yv run of octets?"

     "You're pumping me for information I haven't written about yet?" whined Wil, glowering a little for theatric effect.

     "Heh," Stu started and then considered temporizing. "Yeah, actually. Why don't you write about things you know folks care more about? Is it to tweak their noses because they're idiots?"

     Wil gnawed his lip. "That's not true ... as far as you know."

     "What?" objected Stu. "Are you Chevy Chase in Caddyshack now? That's the weakest denial I ever heard."

     "I thought it was funny," Wil murmurred. "I don't write about topics other folks demand stupidly without thinking about consequences. The idea of catering to a bread-and-circuses crowd makes me sick. No one deserves to get what they want just because they demand it. I've heard folks in each workplace say stupid things about Unicode for fifteen years, and I'm tired of it. I associate Unicode with a bankrupt one-true-context worldview supposing software naturally heads toward the best of all possible worlds, without any problems or gotchas."

     "Instead of a speech," Stu groaned in a slumped heap, "why don't you just punch me next time instead?"

     "Sit up straight," Wil ordered, "and I'll answer your question. I gather you want to know more about Unicode strings?"

     "Yeah," Stu nodded and watched Wil uneasily.

     Wil drummed his fingers. "Okay, I was thinking this time I'd have both ys octet sequences and yS character sequences both work something like C++ std::string instances, in the sense of being by-value wrappers around references to actual string storage."

     "With reference counting?" guessed Stu.

     "Yes," nodded Wil. "And the physical representation would vary depending on how much content was involved, and how it was created in a sequence of editing operations."

     "Why?" prompted Stu.

     "So I can use copy-on-write as described in the cow demo," explained Wil. "One format will resemble one shown in the deck demo."

     "But you haven't written those demos yet," objected Stu.

     "See?" Wil raised his eyebrows. "I wasn't ready to talk about this yet. I'd rather just wait until it falls out of a demo some day."

     "Can't you go faster?" teased Stu.

     "How many demos have you written?" needled Wil.

     "I know, I know," Stu held up his hands. "I'm sorry."

     "Okay," continued Wil, preparing to count on his fingers. "Here's the run down on strings. One: multiple formats. Two: ref counting. Three: scatter gather. Four: copy on write. Five: some manual control, some automatic. Six: some damned Unicode library or another — I really don't care which one, and it shouldn't matter."

     "What about ICU?" suggested Stu.

     "Whatever," Wil brushed it away in a gesture. "I'm not interested in how text is interpreted as characters. I write parts of libraries managing space in binary without caring what content means."

     "Agnostic to the end?" charged Stu.

     "Yep," Wil nodded. "I support parsing strings as char subsequences, but other than that, I'm not in the loop. To me it's all just binary, and at the bottom layer it's just octet sequences I handle with yv runs."

     Stu snickered at an idea. "What's Latin for that? Parso ergo finito?"

     "I parse, therefore I'm done?" Wil laughed. "I don't know. Sounds good to me. That's probably funnier than correct Latin."

Entries appear in reverse chronological order. Content here is permanent: Each entry has a permalink () to the long-lived persistent copy here. Clearly, to link anything, you'd best link the permanent copy.

18may08 truman show

out demo

     I finished the new out demo, which is very long. I found and fixed a couple subtle bugs in the file out-stream, and wrote a couple new streams from scratch to read and write from slices. The out-slice-stream appears in this new demo; the in-slice-stream appears in the next demo for slices.

     The last class I wrote today was the in-slice-stream which treats a subset of another in-stream as if it was an entire stream, hitting eof when the slice is exhausted even when more content appears after the slice. I first wrote a class similar to this in a server around seven years ago, in a content delivery network server (mostly of my own design) using a virtual machine assembling pages out of bits and pieces of slices of other streams. In that context, it's easiest to treat stream slices as entire streams in their own right for uniform treatment.

     The same effect in an out-stream is less interesting, so I didn't push to write sample code for the out-slice-stream today.

truman

     My sons and I watched a little of Truman today, which I find hilariously funny. My sons also get it completely, but don't find it quite as funny as I do, perhaps because they haven't written a blog before.

     Zé is trying to create a world where Truman type problems are commonplace, with many folks having a larger online presence, especially when they use the new fly cams. For example, folks will talk to you just as a form of advertising, since they expect to see themselves exposed on your feed. Anyway, some stories around Zé have some throw-away humor in a Truman vein since it stays funny all the time; unintended social consequences of technology are always amusing.

11may08 elwood p. dowd

demos

     I meant to finish and post the next demo, but it's a long one and I don't plan to stay up to 3am tonight. So I guess it will go up some week night soon. I can't let myself write less than one demo a week (actually one a week seems a little slow) so it won't be as long as next weekend. I plan to write a fair amount of new code for this next demo, since I haven't done a couple of the interesting but obvious out-stream subclasses yet. And I'd just as soon include them.

harvey

     Just fifteen minutes ago I once again reached the part in John Varley's fine science fiction novel The Golden Globe where Valentine Sr. mocks his son's imaginary friend who looks like Jimmy Stewart in the role of Elwood P. Dowd in Harvey. (Wikipedia: Harvey.) The title refers to a six foot tall imaginary rabbit friend seen by no one but Dowd, who seems like a very nice man despite apparently being touched in the head. I mention this only because of coincidence:

     A couple hours earlier this evening I watched Costner's 1989 Field of Dreams with my sixteen year old son on the free movie channel. (Wikipedia: Field of Dreams.) Kevin Costner's character Ray Kinsella hears a disembodied voice tell him, "Build it and he will come." And for a while he doubts his own mind is sound, with folks shying away when he mentions hearing a voice. A short scene features his daughter watching Jimmy Stewart in Harvey on the television, and Costner turns off the set to stop his daughter from watching a show about a man who sees things no one else sees; it made Costner nervous.

     (I first became interested in Harvey in high school thirty years ago when my younger brother — quite the flamboyant actor — played Elwood P. Dowd on the stage in the play version.)

     I was going to write the piece below inspired by the movie anyway, but the coincidence when reading Golden Globe prompted this section. I like coincidences, partly because they provide interesting background context. They make great red herrings in stories because you must decide whether they're relevant to a plot. At this point you should review your past thoughts on what it means for an author to write stories with dialog. Do writers "hear voices" or is writing dialog something else? In my case when writing stories, I don't hear voices; I see film footage of my character speaking. :-) Is that worse? I'm partly kidding of course. When I write stories, my experience is more like a collage of movie footage and memory of story text I might have written, plus marked up mental drafts. I see stories I write as video, but annotated with a scripted text rendering.

     I get slightly bored when watching movies even when I like them a lot, and even when discussing them with a son watching along, like this time; so I usually critique a movie's technique as I watch, and imagine alternative dialog I think is better, and think about writing pieces like this one, all interleaved to keep my mind busy.

     Tonight while watching Field of Dreams I was writing a satire in dialogs beween Zé and Wil, since Wil is from Iowa like myself. (Wil is basically an alternate version of myself, assuming a different life history after about age 20 or so, with better fortune; but Wil's younger by about ten years.) I might redo those dialogs here later if they stay funny enough to draw my attention again as days go by.

     After the movie I returned to writing material for the next demo, instead of writing the dialog comedy. There just isn't time to do everything — only enough time to give you the illusion you know something about me. But you don't, you know. Your perspective is skewed quite alarmingly by sample bias: what I have time to write is a small sample of what I think, and any extrapolation you make is near meaningless.

     Sample bias affects all my conversations because people imagine what I have time to say is representative of what I know, which is rather silly for busy, thoughtful folks of good memory. Just remember you don't know what you don't test.

heroes

     Okay, here's the section I planned to write by movie's end — a first person section about myself and elder son. (The fictional dialog channel material must keep for another day.)

     My older son got tired of staying at his mom's on Mother's Day and came over to do homework and watch a movie. Field of Dreams is something of a latent father-son story since Costner's character tells a story of remorse about how he interacted with his own father. He said at 17 he told a terrible thing to his father: that his father's greatest hero was a criminal — unkind specifically because Shoeless Joe Jackson was not a criminal; Shoeless was just punished unfairly.

     My son looked at me and carefully reassured, "Don't worry, I won't be like that." Letting me know now he won't go antagonistic on me later is awfully kind. :-) We enjoyed the father/son themes until the end, when finally my son blurted a funny remark when Costner and his father are playing catch at sunset in the field of dreams. "This is starting to burn," he complained. "Is this going to last much longer?"

     I liked his starting to burn reaction to banal sentiment.

     "Just remember," I told him, "Once you turn seventeen you have to mock my greatest hero by saying he was a criminal."

     At this he turned and smiled — then hesitated the longest time searching for words, finally giving up by asking, "You know, do you even have a hero?" Having no hero would pose a problem.

     "You're right," I replied, "I really don't have a hero." It was perceptive for him to notice I never mentioned a hero.

     For example, in my own industry I have no heroes — I tend to think of most celebrity figures in computing as lucky idiots, or reasonably bright folks with unusual good fortune. Really remarkable people like Steve Jobs tend to have personality traits (insufferable prick) that impede unalloyed admiration. Bright folks in my industry are about the same as me, so I don't think of them as geniuses.

     Admiring someone a lot, like the way I admire Richard Feynman after reading his books, isn't the same as having a hero. I don't think I've ever given anyone hero status — even historical figures high in my esteem by their reputations. These were all mathematicians by the way: I admire math geeks. And chess players after a fashion, but this is almost certainly partly nostalgia; I don't admire modern chess players — just the imagined ambiance of bumming around Europe in the 1920's and 30's playing a game for trivial stakes in glamorous places.

     Pencils down, it's bedtime. See you later.

04may08 iron man

presence

     Obviously I'm not blogging much. However, if you read my early posts carefully, you'll find I never said I was going to blog all the time. :-) I just said I'd post updates every few days. The last two weeks I posted updates only in the form of links to new demos under thorn. For example, I just finished another: the ctype demo. Go read it; there's no reason to add more comment here. It already has its own funny dialog.

utility

     Code demos I'm writing look useful to me, and blogging isn't very useful, or at least hasn't been very useful the last year. I'd just as soon keep writing descriptions of a library (or the easy parts of it anyway) I've been growing the last fifteen years. Soon I'll write about toy language stuff, and it won't require many docs since everything uses APIs you see in demos under thorn.

     Unlike other folks who blog, I don't have an impression I'm changing anything. (Most would agree with me, and suppose it's because I've no audience; but I'd say they have very little effect on things either. Having an audience changes nothing.)

     I've been resisting the urge to write fiction here. Among other things, that would give me more of an audience, which I'm not very interested in just now. So I only write for a handful of folks curious about code today and in the near future.

options

     Having options to write anything I want here has an interesting effect even when I don't exercise them. Thinking about things I might write — then choosing not to write — makes me feel I get it off my chest anyway. The net result is very calming because in no way do I feel repressed or voiceless. I think about writing here all the time — or rather, I'm always composing fiction as if I planned to post it here. It frames the structure.

letters

     In college the first time (late 70's), I wrote a lot of letters home to friends, describing my ideas and thoughts. I discovered I was always composing letters or preparing to compose letters — that particular venue of communication framed one of the channels of thought I had running like an hourly chron job. In some ways it felt like a substitute for conversation I'd have rathered. But in the absence of good intelligent conversation with folks physically present, it's better to run virtual conversations than not think about important things at all.

     This style of thinking evolved over time, until by the end of the 90's I was instead thinking in terms of fiction instead of letters home. When I can't have discussions with people about topics I want to explore, I can just as easily dream up fiction from multiple perspectives, in which I explore ideas I'm tuning in a manner very similar to how I used letters thirty years ago. The rules are much looser in fiction, since it's unnecessary to constrain oneself to only what a letter recipient can understand.

funny fiction

     For many weeks now I've been dreaming fiction with a new cast of characters who are quite enjoyable. Some of them have been introduced already under story, including Zé, Wil, Eli, and Ulf from vtables, as well as Koi and another character I haven't mentioned much yet because I think she's hilarious, and I'd have to follow through for a while with more material. Finch (aka Fi) provides an excuse for conversation about relationships and other aspects of human nature with social consequence. Among other things, these conversations are much funnier than tech babble.

     One Saturday morning I slept in late, then finally half woke up and started lucid dreaming (with my eyes closed, awake but not totally) a bull session between all these characters. This way of making up material works better than anything else. You very nearly got some pages of new fiction here from that occasion, because it was really fun. However, it's not helping me with my programming language plans, in contrast to my demos of code, so I'm trying not to dream fun conversations very often.

     However, lately when I think about writing for this site — and it's every day — it's only in terms of fiction involving these characters. So that's what I'm most likely to write when I do decide to post here more: fiction about the gang of folks Zé assembled to write online fiction for a website, backed by angel invester Koi Flywheel of eccentric reputation.

     Koi and Finch sometimes crash parties dressed in FBI black, introducing themselves as agents Flywheel and Finch. In this context, Koi goes to pains to look like Groucho Marx. No one knows either very well because neither is forthcoming about history. (For example, Finch claims her father was a famous lawyer named Atticus Finch, and describes her childhood in the south in terms sounding weirdly anachronistic. As near as Zé can tell, she cribs her family and upbringing from To Kill a Mockingbird.)