Blog

Debugging Pascal

Having a spare day to actually work on what I want, I get back into my Pascal adventure, and I'm blocked by inobvious bugs.

Thanks to Sierra breaking gdb (unless you disable SIP entirely, which I'm not going to do), Lazarus can't run ggdb, so forget about GUI debugging. I've tried all the code-signing, rebooting suggestions, none of that works.

I'm not a giant fan of the debugger, but even caveman Mark needs a backtrace sometimes. Happily, lldb works from the command line:

lldb -o "breakpoint set -n fpc_raiseexception" -o run foo.app

Then at the lldb prompt after a crash, type 'bt' for backtrace, 'cont' to carry on with the usual exception handling. Most of the lldb tutorial works the same.

Halloween

"I love Halloween, the one time of year when everyone wears a mask, not just me. People think it's fun to pretend you're a monster; Me, I spend my life pretending I'm not. Brother, friend, boyfriend, all part of my costume collection. Some people might call me a fraud, I prefer to think of myself as a master of disguise."

—Dexter, S1E4 "Let's Give the Boy a Hand"

Haunted by the Past Tuesday Music

Movie Policy

My movie policy is "with rare exceptions, don't watch adaptations or sequels".

Movie adaptations of books are mostly horrible. What I read a book for is complex new ideas, setting, plot, very slightly writing style and characterization. Those are almost impossible for movies to capture; they can have attractive sets, cinematography, and soundtrack, and adequate hitting-marks-and-saying-lines by the walking meatsticks we call "actors", but there simply isn't time for a complex plot or any exploration of an idea in a film, and few of them even try.

Competent SF/F/H adaptations are almost nonexistent:

  • 20,000 Leagues Under the Sea (1954)
  • "It's a Good Life" (1961)
  • The Man Who Fell to Earth (1976)
  • Altered States (1980)
  • A Clockwork Orange (1981)
  • "Who Goes There?"/The Thing (1982)

These are not competent, despite what some fanlings will scream in all caps:

  • Solaris (1972) and Solaris (2002), both are slow, tedious, and almost unwatchable. Stanislaw Lem's hard to film, but these are terrible.
  • 2001 (1968) was a collaboration, but the book has an actual ending.
  • The Shining (1980) is beautifully-shot, perfectly-acted nonsense which loses everything interesting from King's book.
  • Every Philip K Dick adaptation. I didn't hate Screamers (1995) or Radio Free Albemuth (2010), but neither are great films.
  • Watchmen (2009) and Batman: The Killing Joke (2016) tried, and about half of each succeeds perfectly, wrecked by the other half being trash.
  • Pirates of the Carribean 2+, which had sometimes spectacularly good ideas and amazing visuals, wrecked by Disneyfication, incoherent plots, bit part actors who aren't competent for limelight, and Depp's Mick Jagger impersonation wearing thin fast.
  • Harry Potter. Films 1-5 are fun trash, then 6-8 are grim, dull, melodramatic trash. I quite like the books, even the grindingly slow later ones, but these aren't quality adaptations.

Competent genre adaptations (I don't read romance or no-genre "literature", so I can't comment on those), I can think of:

  • The Godfather (1972), and the movie is far better than the book.
  • The Wages of Fear/Sorcerer (1977) perhaps, but I haven't read the French novel, only seen the French movie; Sorcerer has deeper characters and literally explosive tension.
  • Lonesome Dove (1989)
  • "Rita Hayworth and the Shawshank Redemption"/The Shawshank Redemption (1994)
  • Fight Club (1999)
  • American Psycho (2000) and The Rules of Attraction (2002), but the Less Than Zero (1987) "adaptation of a title" almost cancels out both positive adaptations.
  • Man on Fire (2004) is better than the book, dumping the trick ending of the book helped.
  • A History of Violence (2005)
  • Jesse Stone: Stone Cold (2005) and all the sequels have done justice to Robert B. Parker's novels, though Tom Selleck is about 30 years older than the Jesse Stone of the books.
  • The Girl with the Dragon Tattoo (2009), the Swedish films are pretty close to the books' brooding tone, technophilia, and fucked-up psychologies, and the actors are great for it. NEVER watch American remakes.

Competent sequels are just as rare. After quite a while thinking on it, I have:

  • Samurai II: Duel at Ichijoji Temple (1955)
  • Sanjuro (1962)
  • The Good, the Bad, and the Ugly (1967)
  • The Godfather: Part II (1974)
  • Dawn of the Dead (1978)
  • Invasion of the Body Snatchers (1978), also an adaptation, but the book is terrible.
  • The Empire Strikes Back (1982)
  • Star Trek II: The Wrath of Khan (1982)
  • Day of the Dead (1985)
  • Aliens (1986), but only barely: It's written by a pack of syphilitic monkeys compared to Dan O'Bannon's perfect Alien, it's not even a horror movie, it's just another of James Cameron's trashy Vietnam-in-space flicks. Still, you take what you can get.
  • The Killer (1989), not technically a sequel to A Better Tommorrow (1986), but close enough.
  • Terminator 2: Judgement Day (1991)
  • New Dragon Inn (1992), I found the original 1967 film grim, dull, and unloveable despite great swordfights, the remake/sequel is fun while still menacing and having even better swordfights.
  • Léon: The Professional (1994), not technically a sequel to La Femme Nikita (1990), but close enough.
  • Hellboy II: The Golden Army (2008), considerably better than the first, and more like the comics.
  • The Dark Knight (2008)
  • While I enjoyed Guardians of the Galaxy Vol. 2 (2017) as fun trash, it's not as good fun trash as the first.

I bring this up because of jwz's unhappy review of Blade Runner 2049. It's like they did everything I hate in films. And jwz likes Blade Runner, I barely tolerate it as moving wallpaper.

Philip K Dick's "Do Androids Dream of Electric Sheep" is vastly more interesting than the very pretty but vapid Blade Runner, and the new one is a sequel to an adaptation, so it's a hall of mirrors reflecting horrors. All the philosophy and setting of DADOES is thrown away for visual flair & a nice Vangelis album, which you can listen to without a movie talking over it.

Why in Blade Runner are there artificial animals & people? Why is the city so empty except for little gaggles of people? Why is empathy their test for humanity? None of this is even hinted at. So the movie is just a psychopath murdering and raping what appear to be human slaves who try to run or can't quite pass his test.

So they doubled down on pretty nonsense instead of background or plot, and introduced stupid new ideas. The only good thing Jared Leto has ever done was American Psycho, especially the Huey Lewis scene. Every use of him in any other film should just be a remake of that scene.

The Future of Programming is Text

You can't grep or diff binary trees. You can't get a Smalltalk IDE on your iPad. You can't write an operating system or a big application in Scratch or the Mindstorms IDE. And even a small program in these won't work in the next version.

But you can edit plain text with any text editor, whether that's ed, nano, Vim, emacs, BBEdit, Atom, Textastic, Editorial, Eclipse, AppCode, whatever. You can save it safely and easily in any source control system. You can run an awk or sed script over your entire codebase and it just works.

See also:

If your language (or non-linguistic programming environment in some cases) is only usable from a single IDE, you've cut yourself off from every other analysis and editing tool in the world, you're dependent on that one tool to do everything you want.

I have old Mac and iPhone NIB files which can't be read with any current version of Xcode/Interface Builder, the file format was only supported by one dev tool and it's changed, and the old tools don't run on modern OS X. These NIB files "work", in that they deserialize into objects, but there's no way to edit them. Where possible, I now do most UI work in code; this isn't great fun, I end up with a ton of builder functions to avoid repetitive code blocks, but it'll still compile and work in 10 years.

This is also why I don't use a WYSIWYG word processor, I use MultiMarkdown. I've lost documents to proprietary WPs, and of course there's no way to run tools over them (except, sort of, MS Word with BASIC).

None of this has stopped people from making new non-text environments, or weird experiments. Experiments can be useful even when they fail, telling us what doesn't work. But they don't catch on because the tools aren't as good as text, and won't work in the future when the experimenter gets bored and quits.