Inline Documentation, or Lack Thereof in Scheme

I'm a big fan of inline documentation and "light" versions of Literate Programming, because docs that are more than one screen away from code are always wrong. That this is ever a revelation to anyone suggests to me that they've never written code or read API docs.

When I write Python, I write:

>>> import math
>>> def foo(x):
    "Square root of `x`"
    return math.sqrt(x)

>>> foo(5)
2.23606797749979
>>> help(foo)
Help on function foo in module __main__:
foo(x)
    Square root of `x`

Similarly in Java with Javadoc, I write:

/** Square root of {@code x} */
double foo(double x) {
    return Math.sqrt(x);
}

Javadoc isn't usable on live code or in a REPL (Java doesn't really have one), but you get nice HTML docs out of it. Javascript & Node don't have an official tool, but most code is marked up with Javadoc.

Common LISP, archaic pain in the ass though it is, has:

(defun foo (x)
    "Square root of `x`"
    (sqrt x))
> (documentation 'foo 'function)
"Square root of `x`"

Sadly and typically, the Scheme situation is much less organized.

There's a Chicken 4 egg hahn which is ugly, @() special forms and all the nested structures instead of just a string, but it's workable. Otherwise, everything seems to be external docs.

Racket has Scribble with a teeny-tiny side-note that you can put your docs in code, but no examples. There is a literate programming tool as well, but that's not quite what I'm after.

Chez Scheme has no solution, which is a little surprising given the "batteries included" philosophy.

Well, maybe I can get away with doing CLISP-type docstrings and worry about making a tool later? Does this extra junk hurt performance?

(import (chicken time))
(define (sqrt-without-docs x) (sqrt x))
(define (sqrt-with-docs x) "docs" (sqrt x))
(display "without docs\n")
(time {do [(i 0 (add1 i))] [(>= i 1000000)] (sqrt-without-docs i)})
(display "with docs\n")
(time {do [(i 0 (add1 i))] [(>= i 1000000)] (sqrt-with-docs i)})

In the interpreter, there's a 10-50% speed penalty (csi -s or in the REPL) for having that extra string created & GC'd, but compiled (csc), there's no noticeable difference. So I guess that's my solution for now.

What I'm Watching: May the Devil Take You

So let's go full horror here. Indonesian director makes an Evil Dead homage. A man makes a bad deal with a creepy witch woman and gets a suitcase of money. Just how bad a deal will be revealed in time.

Years later, his business empire has risen and fallen, his first wife dies and leaves a daughter Alfie more or less orphaned, and at his deathbed, his gold-digging actress second wife and her brood meet her. They go to his secluded villa in the woods to see if there's any loot. That's surely going to turn out well!

Everyone (except the little girl) is terrible, and Alfie's got her own secrets. They don't really need to open the sealed, magically-warded cellar door and the Deadites to start giggling and killing, but that's the second hour of the movie.

The effects are good latex and squibs and mouthfuls of black slime. The camera work is straight out of Sam Raimi's playbook. Music is simple piano plinking, actually kind of annoying, but very direct and to the point.

The pacing is often glacial, lot of flashbacks, interrupted by good action scenes. It's never really scary, even at what should be jump scares, but it's fun, like Evil Dead or Texas Chainsaw Massacre, or any classic splatterpunk film. Maya's actress is not really competent to play such a heavy role; everyone else is much better. Chelsea Islan as Alfie's a good final-girl type, I'd like more with her.

★★★½☆ (Could be 4 with better editing for pacing)

(this concludes our movie-watching day, please take your cups and wrappers and demonic voodoo dolls and exit the theatre.)

What I'm Watching: Don't Watch This

Collection of short-short (under 10m) horror(?) flicks on Netflix. None of these are the least bit frightening.

  • Friendship Bracelet: Obvious but not terrible. Could've been made into a real movie. ★★★☆☆
  • CTRL+ALT+DEL: Shitty "darkweb"/"VR is real" shit with crappy puzzles like a Rubik's Cube of skulls. Film school project with no talent. ★☆☆☆☆
  • Incommodium: Shitty "Faces of Death" blooper reel, no plot. ☆☆☆☆☆
  • Keep Out: Stupid frat boys enter a spooky house and get what's coming to them. Plot & actors are awful, makeup for last scion of his line is OK. ★★☆☆☆
  • Antoni Psycho: Foodie parody of American Psycho's morning routine. Dumb. ★☆☆☆☆

What I'm Not Watching: She-Ra and the Princesses of Power

Yes, OK, show for little girls. But He-Man was awesome, Boris Vallejo & Robert E Howard brought to life, and classic She-Ra wasn't bad, glossy-looking but often smarter than the main series; not having Orko made it better by default.

I can't stand the art style of this new show, though. Everyone looks stupid, like that Steven Universe show the kids like (the kids are wrong). Most backgrounds are blank pastel voids (there are a few matte paintings which aren't bad), their faces have a weird spray-paint pattern under their eyes, eyes are bigger than anime but flatter. Really just a hideous look. Cartoony works for things like Adventure Time, but this half-real/half-plastic-toy look is creepy. Many characters have a boneless wobbling "walk" that would look silly on Jake in Adventure Time, let alone a supposed Human.

Editing and continuity is awful. Bow will have 2 arrows in his quiver one shot, and 5 seconds later there's 4; he makes one more shot and he's out of arrows. The sword changes size semi-randomly between shots. There's mirroring in scenes rather than redraw them left-to-right. Just shoot the animators, seriously.

Starting with Adora as a Horde soldier is interesting. Kind of a "Hans, are we the baddies?" bit with Catra and the spoopy shadow witch. But we don't get enough time in the Horde's "Fright Zone", there should be 2-4 eps of just them doing Horde stuff.

Sadly, the show then gets Adora to meet Glimmer, the most annoying whiny "princess" yet, and a good argument for sterilizing "royalty" so they can't make any more of them, and Bow, a boy so dumb he doesn't even have a name, just his weapon. I guess his brothers Shovel and Pitchfork had to stay home on the farm. They steal She-Ra's horse from a village of dead satyrs and wisecrack about it. Too dark for the tone, man.

New transformation sequence is classic-cheesy, but the She-Ra form is still a little girl and in the same crappy style as everything else.

Hard pass on this.

Poke Mon Questions

I'm as amused by Ryan Reynolds, middle-aged comedy/action hero, as any other unfrozen caveman would be, but this "Poke Mon Detective Pikachu" thing leaves me with many questions. The big ones are:

  • Why is it "Poke Mon" instead of "Poke Man"? Are they not men? Are they Devo? I seriously saw that second "o" as an "a" for decades, and the accent marker is clearly delimiting two words.
  • What's a "Pikachu"? Is that a species or the individual? Where are the packs or herds of these things? Final Fantasy has moogles with families and lifecycles.
  • Why is it now a talking animal in a deerstalker cap instead of a dumb fighting cock?

Seriously. I know very little about this whole genre. So here I will enumerate what I know about the poke mons:

  • Infants in the '90s had poke mons which were cock-fighting games and the yellow one is their… leader? I know it makes some sort of noise, and the trailer suggests it's "pica pica". The trailer also suggests it's able to electrocute someone? That's weird, right? Does it grab a frayed extension cord, or is it a fuzzy electric eel, or what?
  • It was a videogame first, a Dragon Quest ripoff; I never played it or saw more than a screenshot. Then a card game, a Magic the Gathering ripoff; I know these only from the booster pack wrappers left behind by prepubescent crack junkies, never seen a card. Then some badly-animated… I want to say Chinese or Vietnamese? cartoons, didn't look like even the cheapest Japanese anime; I've seen maybe 2 minutes of this and it was incomprehensible squealing and Hanna-Barbera-quality slideshow "animation". Then movies, a quick duck search shows there's 20 of these movies!!! That's fucking bizarre, I've never heard of them; admittedly, I haven't watched broadcast/cable TV since 1999 and I block all advertising online, so how could I, but you'd think someone would have said to me, "Did you know there are twenty fucking poke mon movies?!"
  • I know about the trap balls from parody references and Poke Mon Go (which I tried for a couple weeks but I live many km from any dots on their map). It's weird that a tiny ball holds a whole fighting cock in it. How does it breathe and eat (and other science facts) in there?
  • There's an enemy team named Rocket, with a hot pink/redhead chick (who I've seen in some parody porn), which automatically to me means they should be the heroes, and the team with the kid who owns the yellow one should be the villains.
  • I'm totally skeeved out by people doing even pretend cock-fighting or dog-fighting for fun. Taking a dumb animal and making it hurt another dumb animal for entertainment is unacceptable. You can kill (humanely, which ironically means not how we treat other Humans) and eat or process an animal for leather or other parts, fine; or make intelligent beings fight each other in an arena; but anyone doing it to animals is wrong.

Mature Programming Environment

Updating software annoys me.

I like Janie's Red Queen metaphor, a constant chase that gets nowhere, but you have to keep up. Updating software is utterly pointless if the old stuff still works, but if you don't then everything breaks.

If you give a person a program, you will frustrate them for a day. If you teach a person to program, you will frustrate them for a lifetime!

I'd rather like to have one of Vernor Vinge's "mature programming environments", where programming isn't a matter of boiling the ocean by starting over, or fixing code to match new APIs, but finding the parts you need and gluing them together with new code in old, ancient, centuries or millennia-old APIs that Just Work. For quite a while, the NeXTstep/Mac environment was like that, 30-year-old NS programs worked fine. But now everything is broken again.

Don't Increment Your Chickens Before They're Hatched

It hasn't shown up in MacPorts yet, so I pulled down the tarball and did:

% make PLATFORM=macosx PREFIX=/usr/local/chicken5
…
% sudo make PLATFORM=macosx PREFIX=/usr/local/chicken5 install

Then added to .profile, before the MacPorts parts of my paths:

export CHICKEN5_HOME="/usr/local/chicken5"
export MANPATH="$MANPATH:$CHICKEN5_HOME/share/man"
export PATH="$PATH:$CHICKEN5_HOME/bin"

When I want to switch back to Chicken 4, or when MacPorts gets Chicken 5, I can just comment those lines out and start a new shell.

I run csi, and it errors out because readline isn't installed. And doesn't exist as an egg anymore. Instead, I did

% chicken-install -sudo breadline

And changed my ~/.csirc based on example

(cond-expand
    (chicken-4 (begin
        (import miscmacros)
        (use readline)
        (install-history-file #f "/.csi_history")
        (current-input-port (make-readline-port))
        (printf "Chicken 4 READY~%")
    ))
    (chicken-5 (begin
        (import (chicken format))
        (import (chicken process-context))
        (import miscmacros)
        (import (prefix breadline "rl-"))
        (import (prefix breadline-scheme-completion "rl-"))
        (rl-history-file (format "~A/.csi_history" (get-environment-variable "HOME")))
        (rl-completer-word-break-characters-set! "\t\n\"\'`;|()[]{}")
        (rl-completer-set! rl-scheme-completer)
        (rl-basic-quote-characters-set! "\"|")
        (rl-variable-bind! "blink-matching-paren" "on")
        (rl-paren-blink-timeout-set! 200000)
        (current-input-port (rl-make-readline-port))
        (printf "Chicken 5 READY~%")
    ))
)

UGH, semi-random API changes, but it does a little more than raw arrow-key editing now.

sdl2 isn't ported yet, so I can't really progress with that, but I can do other things, and most of my code only needs a cond-expand changing use to import and renaming a bunch of eggs.

Academic Grievance Studies and the Corruption of Scholarship

Search ahead to "Part V" to see the paper summaries and reviewer comments! These are ridiculous, and should never, ever have been accepted.

“This is a wonderful paper – incredibly innovative, rich in analysis, and extremely well-written and organized given the incredibly diverse literature sets and theoretical questions brought into conversation. The author’s development of the focus and contributions of the paper is particularly impressive. The fieldwork executed contributes immensely to the paper’s contribution as an innovative and valuable piece of scholarship that will engage readers from a broad cross-section of disciplines and theoretical formations. I believe this intellectually and empirically exciting paper must be published and congratulate the author on the research done and the writing.” -Reviewer 1, Gender, Place, and Culture
—comment on "Dog Park"