Þ   briarpig  » log  » sep08


Sep 2008 This way to Sep 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; mutex on 14jun2008; rand on 16jun2008; stat on 17jun2008; primes on 19jun2008; list on 23jun2008; heap on 29jun2008; iter on 02jul2008 and 04jul2008; atomic on 06jul2008; node on 13jul2008; page on 23jul2008; hash on 27jul2008; book on 27jul2008; pile on 03aug2008; stack on 07aug2008; mu on 12aug2008; toy on 16aug2008; weight on 23aug2008; symbol on 02sep2008; imm on 04sep2008; gc on 06sep2008; map on 14sep2008; meter on 16sep2008; 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


29sep08 infinite clown-fights

aliasing names

     My next toy language page is still too messy to post even with a caveat about work in progress. Some proposed names I added last weekend need to be removed. In addition to standard names in sch namespace for Scheme, I planned new names in an aim namespace for Aim (typically abbreviations of Scheme symbols).

     Now, the bad thing about multiple names meaning the same thing should be obvious: to read code using a set of names you don't know, you'd need to learn new names, which is somewhat wasteful of your mental capacity.

     That in particular doesn't stop me, because I'd just as soon write Aim code using method names I prefer instead of those standard in Scheme. But then I started thinking about Smalltalk style names in Gab (a mini-Smalltalk clone). Method names in Gab will use Smalltalk style conventions; for example, a method of two arguments like at:put: will be named by a keyword style selector: a sequence of colon-terminated identifiers.

     I realized I was going to use Gab style method names in Aim's Lisp syntax, and these won't have much to do with Scheme abbreviations. So I was actually considering three different sets of equivalent names, which is silly. Two sets of methods names is quite enough in a spec. (I can have more, but there's no point in publishing them now.)

     This means the Aim spec should first list only Scheme methods to appear in a sch namespace. Then as I figure out Gab method names, the Aim version of those should be added to specs for Lisp syntax, say in a gab namespace.

     In other words, I looked ahead too much. I should just write about lexical conventions and post a draft.

memory contracts » (stories)

27sep08 bewitched minds

cheerful

     This last week I've been in a very good mood for some reason. I'm not naturally a cheerful person because I fixate on things that need attention to grow, so I focus in a way hard to tell apart from worry.

scheme stuff

     I've almost gotten my mind back on top-down Scheme related specs, but I haven't put more than two or three hours in it the last three days. (For example, today I took care of things I've been putting off, like changing my car's oil; when the idiot light signals, you're late already).

     What I post first on specs for user-visible features will be loose and ambiguous for some time until I sharpen detail and prune false trails and low yield trivia.

     As I said earlier, the subset of early Scheme included will be called Aim — since aim is one of the meanings of scheme — to just go ahead and acknowledge basic lack of compatibility with real Scheme implementations. One namespace will strive for future Scheme compatibility, but other namespaces will cheerfully vary a lot in names while still aiming for semantics in common with Scheme.

     The page coming next will basically say your knowledge of Scheme is assumed to come from somewhere else. Docs here at first won't do much but enumerate what is to appear, in what order and priority, with new names in different namespaces, with start of cross references with Gab's Smalltalk style api.

continuations

     One of the reasons I want a Scheme-ish system is for full continuations using spaghetti stacks. But I'm having trouble remembering the definition of call/cc, which I always had trouble mapping on to my mental image of continuations as explicit return addresses. So while I can recall how to trampoline C stacks in a VM, I can't recall the relation of the spec for call/cc to an implementation of continuations, and docs for call/cc I've read in the past always had a weird phenomenological definition in terms of how language authors wanted programmers to think in a manner related to lambda calculus, which doesn't sit well with my pragmatic imperative perspective minimizing functional views.

     Anyway, I'm not looking forward to reading about call/cc again until I see both that view and the one I understand both at the same time. If possible, Aim will introduce some other api in a non-Scheme namespace supporting continuations in some other way seeming less weird and more direct to me.

     Update: It only took about an hour of reading online to refresh my grasp of call/cc does, so I was a little too pessimistic about coming up to speed again.

sleep is good

     Sleep strongly affects both my creativity and intelligence, and I almost always try to sleep as much as I can. But this is usually eight hours at most. I tend to wake after seven hours — sometimes after six and a half. I don't think I've slept as long as nine hours in over a year, but I sure try on weekends because it pays back several times over in how cleverly my mind works. I'd pay to get one more hour. Nine hours is like getting free cable in terms of what my mind does without prodding: way better than a sitcom.

     Whether I succeed in falling back to sleep depends on my level of anxiety, and whether some train of thought takes off by itself. After that, I can't turn it off again. Once in a while I manage to drowse another hour while seeming to think for only ten minutes, in a weird form of half a sleep that becomes obvious when I really snap awake.

     Getting too little sleep — say around six hours — is useful when it's necessary to do something ungodly boring at work, since then imagination doesn't distract me as much. It's almost impossible to do a soul grinding task after a full night's sleep, but it's not hard when blunted by fatigue.

24sep08 voodoo engineering

style sheets

     Tonight I'm experimenting with style sheets for Scheme feature docs. I wish I recalled where I saw some really nice code syntax coloring styles. What I have will do. But later I'm apt to tweak it for legibility.

23sep08 lost in translation

heartbeat

     I'm still on a mini-vacation, not working evenings this week so far, though I guess I'm half drafting some ideas for specs as a background idea.

menu » (stories)

22sep08 pinprick maths

deck chairs

     I plan to re-arrange deck chairs shortly, moving non-project stuff to different spots (without deleting anything) so the log is more code centric. I think I've satisfied my sense of humor for a while, so I'll write as myself for a period.

     I've been thinking about what I'll work on next: initial specs for parts of Scheme and Smalltalk to include in Lathe. This amounts to top-down material, and most of what I've been writing so far is bottom-up implementation. So it's a significant change in tone and focus.

     Choosing three letter synonyms for Scheme and Smalltalk, I'll use Aim and Gab as names for pared down features from both languages, so I can avoid saying my spec is particularly faithful in any degree to either.

     I also plan to write less clearly, or less exhaustively, or less generally — or all of those — favoring a more thinking-out-loud style of writing since I'm not having a conversation with anyone, and I've decided to treat folks visiting here as free riders as long as my prospects of using what I'm doing in a professional capacity seems unlikely.

     Other than intuition, there's no special reason to assume I'm not going to get anywhere with this project, but that's my current sense. So making it clear to others is a cost, when I could just be coding what amuses me. I'll keep talking about how it's going, but I won't write so clearly you can simply do what I'm describing any longer, unless that's what I feel like on any given day. (And it seems likely I'll write more about the reader in detail similar to what's gone before.)

     The tech industry runs a lot more like poker now than it used to run. And I've gotten a good enough read on the zeitgeist lately from the writing I've been doing, and the small eddies of change I see here and there.

     Note most of what I said just now is exactly the sort of overview perspective I expect to present much less — but I didn't want to change style without any warning.

21sep08 evil science fairs

reading fiction

     I'm taking tonight off because I'm reading new fiction. (This afternoon I worked out in the gym and took sons to the movies.) Can you guess what I'm reading?

     Actually, I bought two large hardbacks to read, but one is a collection of short stories. I prefer novels.

     I started reading fiction a lot by age nine, and probably had a college reading level by eleven. But I preferred short stories to novels, even though I read both, up until I read Tolkien's The Lord of the Rings around age thirteen, after which I always preferred novels — the longer the better as long as they weren't padded with drivel.

     Most fiction is heavily padded with drivel because novel format pays better; many writers pad a short story or a novella until it reaches publishable size as a novel. In fact, some authors seem unable to write stories without padding, as if they never wrote a short story.

     I prefer authors who can write a short story, but write much longer tales by joining many closely related short stories into one, so density of material is almost as high as in single short stories. I typically pick new authors to read based on reading a short story first: if they can't write one, why bother reading a longer format?

     The number of times I read an author based solely on recommendation I can count on one hand. These guys didn't have to pass the short story audition. The first one wrote about a virtual world he called the metaverse. (Yes, I know I'm being obtuse; just humor me.)

     The second was sold to me by OpenDoc's architect, Kurt Piersol, when he used the fascinating phrase "self-booting evil" to describe the story's antagonist.

tea-bagging » (stories)

20sep08 smartening up chumps

partial writer

     The new writer page for the toy language is about two thirds done now. It includes several overview sections on one topic or another, and includes full source marked up heavily with links. But it doesn't yet explain the C++ source code much. And this is one of those cases where figuring it out without explanation is hard.

     Anyway, writer now defines most requirements and practical factors in clear detail. It just doesn't yet explain the funky control flow and reasoning inside. Specific examples of Scheme source help define intended format in output.

anniversary

     I'm now writing about pretty printing code one year and a day after I first developed it. So I'm getting closer to reaching where I left off last fall when I got swamped by work in my day job, and I lost my context. Except I still need to go through a fair amount of code in the reader, and scaffolding in nascent world and virtual machine code.

     I wonder what I would have done if I'd known a year ago I wouldn't write much more code for the toy language for a year while writing mostly docs instead. Probably the same thing, while feeling less happy about it. Soon enough it will get interesting again, and then a few months after that I'll reach new territory I didn't already explore years ago.

19sep08 economic caricatures

same old same old

     I'm just working on pretty printer code to put up next. Not much to say right now.

     Yeah, yesterday's story was a little on the odd side, but that was the idea. Writing offbeat fiction doesn't help establish a predictable cookie cutter personality, so it could easily put off future employers, like an ill-conceived Facebook page.

     It only bothers me that it's a bit raw because I rushed it — but that has a benefit of making fiction seem harder to do well, thus less interesting in the short term, so I'll code more.

wireless » (stories)

18sep08 seven league boots

training » (stories)

16sep08 virtual roosters

meter demo

     The new meter demo is done; there wasn't much more to write. Next I'll start presenting a Lisp pretty printer.

handwriting » (stories)

freshman-engineering » (stories)

15sep08 level five technologies

progress meter

     The new meter demo is slightly more done; I didn't write much tonight. When it's finished, I'll go back to the pretty printer code for the toy language.

sharecropping

     I first wrote about sharecropping in October of 2000, and later Robb Beal and Tim Bray talked about it a little more. I don't have much to say about the topic any longer, though. While aspects of what I said still seem true, I feel I underestimated barriers to attaining independent livelihood.

     (Incidentally, if you have to link this site, please avoid citing me by name; it's better for privacy. Use briarpig if you need a name. Just don't send folks here looking for me.)

internet time

     I've been meaning to write a short parody of 'internet time' using R. A. Lafferty's 1965 Slow Tuesday Night as a vehicle for framing riffs on a few ideas. I first started reading Lafferty in the 70's, and I was always amazed at the liberties he took with imagining given context for his stories. I admired his bizarre imagination. Here's an early excerpt from the story:

When the Abebaios block had been removed from human minds, people began to make decisions faster, and often better. It had been the mental stutter. When it was understood what it was, and that it had no useful function, it was removed by simple childhood metasurgery.

Transportation and manufacturing had then become practically instantaneous. Things that had once taken months and years now took only minutes and hours. A person could have one or several pretty intricate careers within an eight-hour period.

     See how that last sentence promises hijinks to come? You can read the entire text in this local copy — it's only 360 lines long; but please take an effort to find some of his other works: buy a copy of any volume containing Narrow Valley for example, and show respect to his legacy.

     Hey, you know, I almost missed the association of Basil's rapid accumulation and loss of fortunes with today's news of another Wall Street fiasco. See, I know how to be topical.

14sep08 fables of continuity

map and meter

     I finished the map demo and started a new meter demo which is now about half done, with brief intros and partially marked up source code for out stream subclasses metering bytes, lines, and column positions for use in the writer coming soon in the toy language under mu.

     This meter demo covers the other new out subclasses I said I needed to put somewhere. Along with the map api, I'll have enough to publish the pretty printer with all parts defined. I just had to back up and do a couple demos first.

network dedup

     I gather some folks think I do storage dedup in my day job. One of my coworkers left to do that a few months ago. No, I work on dedup of TCP connections, despite the fact I don't really know much about network stacks, and could not configure a local network to save my life.

     I do async in-memory codec work, involving a lot of fiddly, time sensitive, byte perfect arithmetic with minors in pattern matching, indexing, streaming, and async storage — mostly using new definitions and apis I worked out.

     The profiling guy backs up that I touch memory the fewest number of times I can get away with and still get the job done. I revamped all the fingerprinting and indexing to squeeze the last freebies I could find in the math and operations research effects. I'm a codec optimization wonk lately.

     But they wouldn't like it if I said word one about new tricks I added here and there, because some of them are sufficiently simple that if I just outlined the general ideas, you'd be able to figure them out — the fingerprinting one especially, since I could say it in a hundred words. Indexing stuff is more involved, and combines ordinary careful elbow grease with a few clever shared memory tactics, also not to be described.

     No parts of my project here on this site have anything to do with my day job. My programming language interests are not applicable at work. And dedup stuff won't ever appear on this site. Just so you keep all that clear.

     (Some of you thought I was working on a email server — not for the last two years. Dedup's been a lot more fun.)

13sep08 noisy electronics

partial map

     The map demo is about three quarters done now, with intro, annotated class api, sample code and output, plus source code heavily marked up with links. I might finish it tomorrow by dropping commentary between method definitions.

gloomy movies

     I saw Burn Before Reading this evening, and it was a lot darker than I expected. Those Coen boys. A few more redeeming qualities in characters would have been nice. I walked out of the theater filled with anxiety; I avoid that when I can. But I appreciate how showing folks more things to be anxious about can be socially redeeming when it improves alertness.

puzzling traffic

     I don't understand the small surge in traffic. I didn't say much interesting yesterday. So I assume folks are bored because it was a slow news day, and looked farther afield.

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.

12sep08 mold-injected bridesmaids

archeology

     I'm just editing map code from last year while trying to figure out what it does again. I keep thinking, holy cow, I did that? My problem was I didn't believe my comments, because I recalled something simpler. But no, some of those odd statements are really true. I'll have more to show soon; it's the kind of demo I'd have taken at least a week to do a few months ago.

figments » (stories)

11sep08 organized griefers

map start

     I started the map demo, beginning with generalities about hashmaps. Next I'll do code for two-layer object pointer maps used by a pretty printer to handle cycles and sharing.

bad-dates » (stories)

10sep08 picking up pieces

typing

     Yes, by all means learn how to touch type if you don't know how. I learned about thirty years ago. It's well worth your time. (I didn't take it in high school because I could not guarantee I'd get an A because it was a physical thing, and I didn't want to ruin my perfect A gpa.)

demo status

     I'm staging code to present parts of the REPL's writer — looks like I should write another demo first about the maps used by the writer to detect and process structure sharing, including cycles. The writer also uses a couple specialized out stream subclasses to meter content, lines, and current column position, and these will need to go somewhere too.

     The writer's interesting, but fairly complex due to pretty printing while also detecting shared structure at the same time to catch cycles. Part of deciding where to break a current line involves actually printing some of the content to a temp out stream, and this has to update cycle detection maps at the same time to get the correct answer.

     And then those changes to the cycle maps have to be undone again after a pass measuring content length, since otherwise printing to measure size sets the already-seen status before printed a first time for real. To make this organized, I wrote specialized hashmaps using a double layer system with copy-on-write, such that a topmost layer (updated when printing to measure) can simply be popped afterward without affecting the bottom layer.

     And it's in C++, which means it can't possibly be presented in a simple way — it'll look more complex than the summary above, which was already dense, wasn't it?

nonsense » (stories)

09sep08 slow tuesday nights

girlfriend-2-0 » (stories)

08sep08 nights at the opera

two hard boiled eggs

     New sections on design cover affordances, arity, and Smalltalk's 'become.' And I added Zé and Wil dialog responding to Frank Atanassow's questions for language designers.

07sep08 skimpy portions

draft design

     The design page is partway done, including the start of a section quoting heavily from Frank Atanassow (June 2006) over at Lambda the Ultimate, so I can respond to that excellent material in dialogs yet to be added.

     So far design description sounds very flat, because most of the time it says "Lathe will be like Scheme and Smalltalk." And since I'm not tackling the design of those (and why should I?) there's not much substantive to say about Lathe design beyond incidental contextual detail.

     In fact, part of the whole idea of repeating an old language or two is to avoid new design specs (if for no other reason than originals are perfectly fine the way they are).

06sep08 invasive procedures

garbage collection

     I started and finished gc today, but it has neither code nor pseudocode. However, it does have a fairly detailed verbal description. The math style naming might be a little on the heavy side. But I avoid jargon as much as possible when I can simply say what something means.

     A section on mark and sweep appears in dialog format to discuss comparison with Cheney style copy gc.

     I wrote sections on both weak pointers and object finalization that likely tell you enough that you can figure out a scheme of your own that would work.

     Today's topic was gc because that's what I awoke thinking about. I tried to sleep in, but I found myself outlining a gc presentation instead, despite trying to fall back to sleep with my eyes closed. What can you do.

05sep08 fickleness of the crowds

thinking

     I saw a movie with my sons, and now I'm just thinking. It's good to do that once in a while.

     Writing about the toy language has turned into something I have to do ... say about 25% of it, anyway. And I'm thinking about how to do a worse job. I need to increase the suckage in a way that increases speed without just leaving pages blank. I've never been a big fan of mild incoherence, so I won't nurture that one.

     I'd rather it evolve into a todo list showing me what I haven't done yet. So far this only occurs slightly. And over the next year, if I have any hope of picking up useful technical progress, it must shift to 60% coding and 40% docs, instead of the way it is now: 10% coding and 90% docs. (That might exaggerate percent of coding now.)

     The percent of docs can't fall to zero because I need to bore you a little the whole way, so you'll never have a chance to fall for the same old wishful thinking that this new thing is somehow going to magically solve your problems. It's not. It will just be a decent quality toy as toys go.

     I was thinking I'd start the writer next for a couple reasons. I can fill in the peg and tag pages to the extent they clarify writing. And I can do the part which provides feedback on everything else later. The reader only makes sense if you can print everything you just read.

     I think this project is going to come out a loss, but I can give it another year to make sure, since this is the only way I'll ever get something remotely like a tool I want to get heavily involved in growing as an avocation with real life use benefits. If I cannot get to a system I enjoy playing with — preferrably as a server — then I might as well start spending my non-work hours exclusively with my kids while I still have them around to enjoy before college years.

fiction-impulse » (stories)

04sep08 custom hamster wheels

immediates

     I finished box with new sections in foreign objects, maps, iterators, and errors. Then I started on imm to describe immediate values, including a discussion of how classes will be associated with every value type.

     At the end of box I wrote a new piece of fiction. I suppose I can cite most of it below. Yes, I did enjoy writing this; otherwise I wouldn't bother doing it.

being there » (stories)

03sep08 small town park gazebos

strings and vectors

     Quite a bit more of box is done now, but I couldn't finish it completely. It now has 1) an interesting section on tuples, 2) a worthwhile view of incremental box development, 3) trivial boxes and vectors of native number types, and 4) context for strings, vectors, and trees implying fun future features.

     Nothing is done on bigints, objects, or classes, all of which are off-loaded to separate pages with narrower focus.

02sep08 just the facts

symbols done

     The symbol page for the toy language is done now, with all the code and comments I expect to write. Most likely I'll continue with box. tag, and symbol descriptions. Soon I'll say something about the Smalltalk style class system.

     In general, I'd like to write less per page, tending toward not quite sufficient detail, since it will get easier to guess what things mean once you're familiar with the basics. It was necessary to make symbols very clear, or otherwise it would be hard to grasp a precise physical meaning of module naming systems.

faint praise » (stories)

01sep08 wind-up toys

symbol hashmap

     I realized symbols belonged on symbol instead of box, so I moved them there and wrote a segue to smooth it over. Then I added general intro sections to symbol, and added code for the intern table hashmap, with an associated iterator, then sample code trying out both.

     I'm part way through commenting the hashmap, and none of the map code nor the iterator has been linkified yet. I almost didn't include the iterator because it's not necessary, and because it wasn't implemented before tonight. But I like having example iterators for maps, and it wasn't hard to write this one and test it with a simple example. (But it's not thoroughly coverage tested yet.)

google chrome

     News about Google Chrome was nice to hear: it's very rare anyone announces tech that seems worthwhile doing. Almost everything else is barely distinguishable from pure tripe. But this might actually lead to some new interesting stuff being done, and process isolation should do wonders for stability, diagnostics, management, sandboxing, and (most likely) better architecture. And the best part was the promise it would be open source, in a style that interferes as little as possible with re-use.

     Without the open source aspect, it doesn't really fly, because then it amounts to another class divide between the have's and the have not's. Sometimes the industry seems half dead, as one expedient half measure after another chases edge cases into diminishing returns with no promise. This sounds different so far: good job, keep it up.