Nov 13

The big break in computer languages

My last post (The long goodbye to C) elicited a comment from a C++ expert I was friends with long ago, recommending C++ as the language to replace C. Which ain’t gonna happen; if that were a viable future, Go and Rust would never have been conceived.

But my readers deserve more than a bald assertion. So here, for the record, is the story of why I don’t touch C++ any more. This is a launch point for a disquisition on the economics of computer-language design, why some truly unfortunate choices got made and baked into our infrastructure, and how we’re probably going to fix them.

Along the way I will draw aside the veil from a rather basic mistake that people trying to see into the future of programming languages (including me) have been making since the 1980s. Only very recently do we have the field evidence to notice where we went wrong.

Continue reading

Nov 07

The long goodbye to C

I was thinking a couple of days ago about the new wave of systems languages now challenging C for its place at the top of the systems-programming heap – Go and Rust, in particular. I reached a startling realization – I have 35 years of experience in C. I write C code pretty much every week, but I can no longer remember when I last started a new project in C!

If this seems completely un-startling to you, you’re not a systems programmer. Yes, I know there are a lot of you out there beavering away at much higher-level languages. But I spend most of my time down in the guts of things like NTPsec and GPSD and giflib. Mastery of C has been one of the defining skills of my specialty for decades. And now, not only do I not use C for new code, I can’t clearly remember when I stopped doing so. And…looking back, I don’t think it was in this century.

That’s a helluva thing to have sneak up on me when “C expert” is one of the things you’d be most likely to hear if you asked me for my five most central software technical skills. It prompts some thought, it does. What future does C have? Could we already be living in a COBOL-like aftermath of C’s greatest days?

Continue reading

Nov 02

Against modesty, and for the Fischer set

Over at Slate Star Codex, I learned that Eliezer Yudkowsky is writing a book on, as Scott puts it, “low-hanging fruit vs. the argument from humility”. He’s examining the question of when we are, or can be, justified in believing we have spotted something important that the experts have missed.

I read Eliezer’s first chapter, and I read two responses to it, and I was gobsmacked. Not so much by Eliezer’s take; I think his microeconomic analysis looks pretty promising, though incomplete. But the first response, by one Thrasymachus, felt to me like dangerous nonsense: “This piece defends a strong form of epistemic modesty: that, in most cases, one should pay scarcely any attention to what you find the most persuasive view on an issue, hewing instead to an idealized consensus of experts.”

Motherfucker. If that’s what we think is right conduct, how in hell are we (in the most general sense, our civilization and species) going to unlearn our most sophisticated and dangerous mistakes, the ones that damage us more by the weight of expert consensus?

Somebody has to be “immodest”, and to believe they’re justified in immodesty. It’s necessary. But Eliezer only provides very weak guidance towards that justification; he says, in effect, that you’d better be modest when there are large rewards for someone else to have spotted the obvious before you. He implies that immodesty might be a better stance when incentives are weak.

I believe I have something more positive to contribute. I’m going to tell some stories about when I have spotted the obvious that the experts have missed. Then I’m going to point out a commonality in these occurrences that suggests an exploitable pattern – in effect, a method for successful immodesty.

Continue reading

Oct 21

The heaviness of fame and fans

A lot of people, especially younger people who haven’t quite figured out what they’re good at yet, want to be famous and have lots of admiring fans. Me, I’ve been famous, and I still have a lot of admiring fans. I’m here today to talk about why a thoughtful person might want to avoid this, and outline some risk-mitigation strategies if you want or need to play the fame game.

Why now? Let’s just say I’ve had some interactions recently that reminded me of my responsibilities. “With great power comes great responsibility”, and oh, yeah, fame is a kind of power.

Continue reading

Oct 10

Is the casting couch a fair trade?

As I write, the cascading revelations about Hollywood mogul Harvey Weinstein’s creeptastic behavior over the last thirty years are dominating the news cycle. Platoons of women are coming forward with credible accusations of sexual exploitation, assault, and even outright rape.

Weinstein himself is not actually denying any of these accusations, so I’m going to assume that enough of them are true to define him as a criminal, a pervert, and a supremely nasty mass of noxious slime.

And yet, and yet…the libertarian and contrarian in me is balking at the quality of some of the outrage being flung around. One question, in particular, gives me pause.

Continue reading

Oct 07

NRA loses the plot

Dear NRA leadership: are you out of your fucking minds?

Supporting a ban on bump stocks in the wake of the Las Vegas massacre is a terrible idea, for all the usual reasons that there has never been any case in the history of the known universe in which supporting a ban on firearms or their gear was a good idea. You used to know this.

Continue reading

Sep 25

The Torchship Trilogy

New SF author Karl Gallagher dropped me a note last week that offered me copies of his first work, a novel sequence: Torchship, Torchship Pilot, and Torchship Captain. He explained that the ideas I expressed in The Deep Norms of SF helped form his ideas about writing.

Since that is part of the effect I was hoping for when I wrote the essay, I told him so and remarked on my first reaction when I stumbled over these books while browsing Amazon. My thought was “Hmmm…looks like someone tried to write a high-quality Heinlein pastiche. And maybe succeeded…”

Karl replied “I certainly aimed at a ‘Heinlein tribute.’ Whether it’s ‘high quality’ I’ll leave to others.” The following review is a considerably expanded version of my reply to him.

Continue reading

Sep 22

Unlearning history

In some circles there’s lately a vogue for vandalizing or pulling down Confederate statues. The people doing it think (or say they think) that they’re striking a blow against racism. I think they’re, at best, engaged in a dangerous reopening of old wounds. At worst they’re threatening to inflict serious new ones.

I’m a Yankee from Boston by birth and inclination. I’ve never bought into Lost Cause romanticism; I’ve studied the history and don’t buy the revisionism about tariffs or troop callups. The South revolted to defend the indefensible of chattel slavery, and deserved its defeat.

But once the war was won, the victors (both Northern and Southern Unionists) had to win the peace as well. It was not a given that the South would be reconciled to the Union; there was lots of precedent for the statesmen and the people of the era to look back on that suggested otherwise.

The South could have become a running sore, a cauldron of low-level insurrection and guerilla warfare that blighted the next century of U.S. history. Instead, it is now the most patriotic region of the U.S. – as measured, for example, by regional origins of U.S. military personnel. How did this happen?

Continue reading

Sep 11

The brain is a Peirce engine

There comes from Scott Alexander’s blog news of a new unified theory of neural cognition called the “predictive processing model”. Read his review of the book “Surfing Uncertainty” before proceeding further.

This model seems to solve a whole raft of longstanding problems about how the brain does what it does, offer insight into how various neurotransmitters work in cognition, and even into how disorders such as autism can be understood as consequences of very specific processing failures with testable consequences.

Now excuse me while I spike a ball in the end zone and yell “YEEHAA!”. Because, although its framers seem still unaware, the predictive-processing model tends strongly to confirm a set of philosophical positions I’ve been taking (and taking flak for) for many years.

Continue reading

Aug 09

Please give generously to James Damore’s fundraiser

I just gave $100 to James Damore’s official fundraiser.

Damore, for any of you who have been hiding under a rock, is the guy who wrote a completely sane and reasonable memorandum, objecting on principled and scientific grounds to the assumptions behind “diversity”.

He’s been fired and is, of course, the target of a full-blown SJW rage-mob.

The full version of the memo is here. Note that much of the negative public discussion seems to have been based on redacted versions from which references and charts were omitted.

Please give generously. Because the thought police must be stopped.

Aug 07

Hey, Democrats! We still need you to get your act together!

Six months ago, I wrote Hey, Democrats! We need you to get your act together!, a plea to the opposition to get its act together.

A month ago, a Democratic activist attempting a mass political assassination shot Steve Scalise through the hip. Today, Gallup’s job creation index at +37 in July—a record high.

In my previous post I stayed away from values arguments about policy and considered only the practical politics of the Democrats’ positioning. I will continue that here.

In brief: Democrats, when you’re in a hole, stop digging!

Continue reading

Aug 01

Three easy pieces

I’m back from vacation – World Boardgaming Championships, where this year I earned laurels in Ticket To Ride and Terra Mystica..

Catching up on some releases I needed to do:

* Open Adventure 1.3: Only minor bugfixes in this one, it’s pretty stable now. We gave 100% coverage in the test suite now, an achievement I’ll probably write about in a future post.

* ascii 1.18: By popular demand, this can now generate a 4×16 as well as 16×4 table, This is especially useful in conjuction with the new -b option to display binary code points.

* Things Every Hacker Once Knew: With new sections on the slow birth of distributed development and the forgotten history of early bitmap displays.

Jul 17

A teaching story

The craft of programming is not a thing easily taught. It’s not so much that the low level details like language syntaxes are difficult to convey, it’s more that (as I’ve written before) “the way of the hacker is a posture of mind”.

The posture of mind is more essential than the details. I only know one way to teach that, and it looks like this…

Continue reading

Jul 12

Fuzzbombing: abort() calls for great justice!

The Colossal Cave Adventure restoration is pretty much done now. One thing we’re still working on is getting test coverage of the last few corners in the code. Because when you’re up to 99.7% the temptation to push for that last 0.3% is really strong even if the attempt is objectively fairly pointless.

What’s more interesting is the technique one of our guys came up with for getting us above about 85% coverage. After that point it started to get quite difficult to hand-craft test logs to go to the places in the code that still hadn’t been exercised.

But NHorus, aka Petr Vorpaev, is expert at fuzz testing; we’ve been using American Fuzzy Lop, a well-designed, well-documented, and tasteful tool that I highly recommend. And he had an idea.

Want to get a test log that hits a particular line? Insert an abort() call right after it and rebuild. Then unleash the fuzzer. If you’ve fed it a good test corpus that gets somewhere near your target, it will probably not take long for the fuzzer to random-walk into your abort() call and record that log.

Then watch your termination times. For a while we’d generally get a result within hours, but we eventually hit a break after which the fuzzer would run for days without result. That knee in the curve is your clue that the fuzzer has done everything it can.

I dub this technique “fuzzbombing”. I think it will generalize well.

Jul 10

Managing modafinil

For the last year or so I have been deliberately experimenting with a psychoactive, nootropic drug.

You have to know me personally (much better than most of my blog audience does) to realize what a surprising admission this is. I’ve been a non-smoking teetotaller since I was old enough to form the decision. I went through college in the 1970s, the heyday of the drug culture, without so much as toking a joint. I have been open with my friends about having near enough relatives with substance-abuse problems that I suspect I have a genetic predisposition to those that I am very wary of triggering. And I have made my disgust at the idea of being controlled by a substance extremely plain.

Nevertheless, I have good reasons for the experiment. The drug, modafinil (perhaps better known by the trade name Provigil) has a number of curious and interesting properties. I’m writing about it because while factual material on effects, toxicology, studies and so forth is easy to find, I have yet to see useful written advice about why and how to use the drug covering any but the narrowest medical applications.

Before I continue, a caveat that may save both your butt and mine. In the U.S., modafinil is a Schedule IV restricted drug, illegal to use without a prescription. I use it legally. I do not – repeat, do not – advise anyone to use modafinil illegally. I judge the legal restriction is absurd – there are lots of over-the counter drugs that are far more dangerous (ibuprofen will do as an example) – but the law is the law and the drug cops can flatten you without a thought.

Another caveat: Your mileage may vary. This is a field report from one user that is consistent with the clinical studies and other large-scale evidence, but reactions to drugs can be highly idiosyncratic. Proceed with caution and skepticism and self-monitor carefully. You only have one neurochemistry and you won’t like what happens if you break it.

Continue reading

Jul 05

Gift vs. reputation in hacker culture

A G+ follower pointed me at Note on Homesteading the Noosphere by Martin Sústrik. He concludes saying this:

In short: Labeling open source communities as gift cultures is not helpful. It just muddles the understanding of what’s actually going on. However, given that they are not exchange economies either, they probably deserve a name of their own, say, “reputation culture”.

I’m going to start by saying that I wish I’d seen a lot more criticism this intelligent. It bothers me that in 20 years nobody seems to have refuted or seriously improved on my theories – I see this as a problem, both for the study of hacker culture and in the field of anthropology.

That said, I think Sústrik gets a couple things wrong here. And don’t want them to obscure the large thing he’s gotten right.

First (possible) mistake: I have not observed that, as a matter of language, the term “gift culture” is as hard-edged and specific as he thinks it is. There’s a way we could both be right, though – it might be that terminology has shifted since I wrote HtN. Possibly this came about as part as the revival of interest in the concept that I seem to have stimulated.

But: one piece of evidence that anthropologists are still using “gift culture” in the inclusive sense Sústrik criticizes me for enmploying is that Sústrik himself feels, at the end of the article, that he needs to propose a contrasting term rather than citing one that is already established.

This so far is all about map rather than territory. As a General Semanticist I know better than to get over-invested in it.

Here’s the territory issue: Sústrik is not quite right about expectations of direct reciprocal exchange not being a shaping force. True enough that they aren’t salient at the macrolevel the way they were among the Kwakaka’wakwe. But if I download a piece of open source, and it’s useful to me, and I find a bug in it, I do indeed feel a reciprocal obligation to the project owner (not just an attenuated feeling about the culture in general) to gin up a fix patch if it is at all within my capability to do so – an obligation that rises in proportion to the value of his/her gift.

I should also point out that the cultures Sústrik think are paradigmatic for his strict sense of “gift culture” are mixed in the other direction. There is certainly an element of generalized reputation-seeking in the way individual Kwakaka’wakwe discharged their debts. There, and in the New Guinea Highlands, the “big man” is seen to have high status by virtue of his generosity – he overpays, on the material level, to buy reputation.

In the terms Sústrik wants to use, open-source culture is reputation-driven at both macro-level and microlevel, and also sometimes driven by gift reciprocation in his strict sense at microlevel. The macro-level reputation-seeking and micro-level gift reciprocity feed and reinforce each other.

This brings me to the large thing that Sústrik gets right. I think his distinction between “gift” and “reputation” cultures is fruitful – both testable and predictively useful. While I’m still skeptical about it being in general use among anthropologists, I rather hope I’m mistaken about that – better if it were.

Yes, real-world cultures are probably never pure examples of one or the other. But differentiating the mechanisms – and observing that the Kwakaka’wakwe and hacker culture are near opposing ends of the spectrum in how they combine – that is certainly worthwhile.

As a minor point, Sústrik is also quite right about reciprocal licenses being a red herring in this discussion. But I think he has the reason for their irrelevance mostly wrong. The important fact is they’re not mainly intended to regulate in-group behavior; they’re mainly a lever on the behavior of outsiders coming into contact with the hacker culture.

(It was actually my wife Cathy – a pretty sharp-eyed observer herself, and not coincidentally a lawyer – who brought this to my attention.)

Bottom line, however, is that this was high-quality criticism that got its most central point right. In fact, if I were writing HtN today I would use – and argue for – Sústrik’s distinction myself.

Jun 30

Open Adventure 1.1, and some thoughts on software preservation

Open Adventure 1.1 has shipped. There are a lot more changes under the hood than are readily apparent. In fact there have been no changes in gameplay at all, and only minor changes to the UI (reversible with the -o oldstyle switch).

We (Jason Ninneman, Per Vorpaev, Aaron Traas, Peje Nilsson and I) could have taken the approach of changing the original rather ugly C code (mechanically translated from FORTRAN) as little as possible, simply packaging it for compilation and release in a modern environment.

I elected not to do that, one reason being that I think we honor hacker tradition better by bring the code forward as a dynamic, living artifact that invites being hacked on than museumizing it as a static one. There’s also the fact that the extreme obscurity of the code made it difficult to appreciate what a work of genius Adventure actually was. (The code we inherited had over 350 gotos in it – rather hard to see past those.)

So we’ve taken a different path. We’ve translated the code into (almost) fully idiomatic C (but not trying to introduce pointer idioms; that should make translation to future languages easier). We’ve replaced the rather cryptic custom text database file that used to define the dungeon with a YAML document that is orders of magnitude easier to read and modify. We haven’t hesitated to use technology that wasn’t even a gleam in anyone’s eye when Adventure originated – the YAML is compiled to C structures at build time by a Python script.

The effect (we hope) is Adventure as it would have been written if Crowther & Woods had had today’s tools to do it – the same vision and design logic, expressed in modern coding idioms. Worth doing, because there are still some things to be learned from this design.

Probably the single cleverest thing in it – which pretty much has to go back to Crowther, Woods couldn’t have bolted it on afterwards – is the way movement in the dungeon is handled. The dungeon’s topology is expressed by a kind of pseudocode broadly resembling the microcode found underneath a lot of processor architectures; movement consists of dispatching to the sequence of opcodes corresponding to the current room and figuring out which one to fire depending not only on the motion verb the user entered but also on conditionals in the pseudocode that can test for the presence or absence of objects and their state.

It was hard to fully understand and appreciate this before, because the code was a spaghetti tangle in what looks today like a shockingly primitive style. The abstraction of the dungeon topology into a declarative specification that – in effect – loads microcode into the game engine was a thing you could half-see, but the impact was blunted by the unreadability of both the code and the specification format. Lifting the specification to YAML was like polishing a rough diamond, revealing beauty and brilliance.

And that’s before we even get to Adventure considered as a work of communicative art. It’s had so many successful descendants – like, every dungeon-crawling game ever, and every text adventure ever – that it’s difficult to see with fresh eyes. But if you make the effort, it is astonishing how mature the wry, quirkily humorous, slightly surrealistic style of this very first game seems. The authors weren’t fumbling for an idiom that would be greatly improved by later artists more sure of themselves; instead, they achieved a consistent and (at the time, unique) style that would be closely emulated by pretty much everyone who followed them in text adventures, and not much improved on as style, even though the technology of the game engines improved by leaps and bounds.

I don’t know how they did it, and the authors would probably not be able to explain if we asked. But I think it is damned impressive how well this game has aged – the code may have needed a refresh, but the design still shines. I’m proud to have helped restore it, and hope I have brought it to a state where it can be forward-ported to future languages for as long as programming is a living art.

Jun 05

Open Adventure ships

Colossal Cave Adventure, that venerable classic, is back and better than ever! The page for downloads is here.

The game is fully playable. It would be astonishing if it were otherwise, since it has been stable since 1995. One minor cosmetic change a lot of people used to the non-mainline variants will appreciate is that there’s a command prompt.

The most substantial thing Jason Ninneman and I have done to the code itself is that the binary is now completely self-contained, with no need for it to refer to an external adventure.text file. That file is now compiled to C structures that are linked to the rest of the game at build time.

The other major thing we’ve done is that the distribution now includes a pretty comprehensive regression-test suite. We do coverage analysis to verify that it visits most of the code. This clears the way to do serious code cleanup (gotos and stale FORTRAN idioms must die!) while being sure we’re not breaking things,

We gratefully acknowledge the support of the game’s original authors, Don Woods and Will Crowther.

Jun 05

Request for WordPress help

I need a bit of hands-on time with someone who knows how to troubleshoot WordPress installations.

I recently had to upgrade my WordPress installation due to an exploit that inserted a malicious URL in one of my widgets. Since then, my spam filter has not been operating correctly. I am not sure whether Akismet is working very slowly or not working at all, but the net result is that I am having to approve every post by hand.

There is a suspicious thing visible from my admin account. It looks as though Akismet is installed twice.

I suspect the fix for this is something simple, but I don’t know what it is. Can anybody help?