Larry Hosken: New

(For folks who are trying to gauge vaccine side effect trends: My arm was a little hurty yesterday near the infection site. Today I feel fine.)

Permalink
& Comments

2021-05-05T19:14:12.590566

Current post shot #2 status: Bracing myself for side effects and/or superpowers.
Circlified selfie

Permalink
& Comments

2021-05-03T19:42:51.845161

I saw this sign at the Lawn Bowling Club in Golden Gate Park:

photo of sign in front of a smooth lawn-bowling lawn. Sign reads: Don't Worry / This bird is fake. / [picture of a corvid] / Decoy bird at work. / Decoy birds are deployed as pest control devices to deter foraging birds from damaging the lawns. Please do not disturb.

Why did they call it a "decoy bird" instead of a "scarecrow"?

I never saw the fake bird. I looked around and thought I spotted a couple of fake crows up on a nearby rooftop, but those "fake" crows cawed and flew off.

Now I wonder if the sign was fake.

Permalink
& Comments

2021-04-30T17:46:53.338426

Many people have made the joke "Those pants are on their last legs," but few point out that the statement is both figuratively and literally true. Or at least I didn't notice any in the top few Google results.

Permalink
& Comments

2021-04-28T19:30:42.790281

With another wildfire season approaching, I finally got off my butt and bought an air purifier. At last, I am ready for wildfires! (Not really; I wouldn't mind if we skipped the wildfires this year/forever. Please?)

I wasn't ready for the strong plastic smell that the purifier emitted when I unwrapped it. Here's a device marketed to folks with sensitive schnozzes, and it introduces itself by stinking up the place. I didn't keel over; I doubt this thing outgassed dangerous levels of volatile whatchamacallits.

But as a member of Generation X, I am of course very sensitive to all levels of irony and this situation has plenty.

Permalink
& Comments

2021-04-27T17:02:59.593079

My local Nextdoor is full, as ever, of whiners. Lately, car drivers have been squawking about streets that got closed to through traffic to ease pandemic exercise—give folks space to bike and run without having to make their way to a park. The Nextdoor whiners have been strikingly un-self-aware, so angry that the exercisers have been alloted so much space, not considering how much space has been given over to drivers.

It reminds me of some news articles from 1894 about arguments between Golden Gate Park bicyclists and horse-and-carriage drivers. As Morgan Fletcher noted when he transcribed the articles "Some of the same agitations between classes and castes, between four wheels and two are evident in these two 1894 articles as are evident now, in 2021." Back then, horse drivers were mad that bicycles could spook the horses, causing stampedes—but when a reporter asks if maybe, just maybe, we shouldn't have so many big skittish animals in the park, the answers were just kinda "inconceivable!"

Anyhow, you might give RIGHTS OF THE HORSE AND THE BICYCLE ON PARK ROADS a read if you want to marvel at this pre-earthquake time of bicycles dodging traffic and going for repairs on Stanyan Street. I'm pretty sure I'm not allowed to copy stuff out of NextDoor, but you can get the spirit of it from this old-timey text.

Permalink
& Comments

2021-04-24T16:26:29.243302

Circly

I made a picture filter. I call it "circly" because it's kinda like pixelize, but with circles. And then I made a web page of circle-drawing animations so you can lose yourself in watching lots of circles appearing or anyhow that's what I spent way too much time doing.
circly-filtered selfie

At first I thought I should use k-means clustering to choose which circles to draw. But then I tried just choosing random circles and that looked about the same and was much faster. And then I tried choosing regularly-spaced circles and that was fast and looked better. I often start with the over-complex method and then am surprised when the simple method works better. But maybe that's better than starting with the simple method and then feeling disappointed when the further work on the over-complex method doesn't pay off. Anyhow, you can look at circles.

Permalink
& Comments

2021-04-20T16:31:01.232579

The Walk

Lately, I've been playing The Walk to make my walks more interesting.

During the pandemic, my usual way of keeping walks interesting doesn't work. I'd hop on a bus/train so I could walk someplace I hadn't visited recently. But nowadays, public transit is for essential trips only. I haven't left the city in more than a year and don't stray far from my neighborhood; I re-walk the same routes. It would be dull, but I fortunately found activities to distract me. (You might be thinking, wasn't RandoWalk supposed to make the walks interesting? RandoWalk gives me a destination; but it doesn't give me something to do as I walk towards that destination. I've probably visited that destination once a week lately. RandoWalk is helpful, but it doesn't occupy my mind.)

It's a phone app. It's kinda like an audiobook, but you "earn" the ability to listen to the next clip by walking. Walk a few minutes; listen to a minute of audio; walk another few minutes; listen to another couple of minutes of audio. The "book" is a suspense thriller radio play—an audio drama. You experience it from the point of view of Walker, a courier who's walking from town to town via forest trails and cowpaths because bad guys are watching the roads. Along the way Walker meets folks who talk; but mostly you listen to Charlie, Walker's controller who communicates through an earpiece, directing towards goals, warning of hazards, etc in the manner of Theora Jones. This earpiece communication feels natural, assuming that you're wearing earphones. (I shelled out for fancy-pants USB earphones so I could use this app. My phone doesn't have an audio jack. Probably the toughest challenge in playing this game was overcoming my reluctance to shell out more than $20 for a pair of earphones.)

As I said, Charlie's earpiece communication feels natural, assuming that you're wearing earphones. This can be disorienting. In the drama, Charlie orders Walker: "Go quick, hurry up!" I hear this, start forward—bringing myself quickly to a halt, since I'm waiting for a crossing light to change green. Charlie orders Walker "Quick, back the way you came!" and it's all I can do to force myself to keep walking in the same direction. It felt weird in much the same way that Janet Cardiff's Telephone Call felt weird.

Is The Walk a drama? Is it a game? Is it a fitness app? Is it an immersive art experience? It's all of these; it's any of these. Call it whatever you think will most impress whoever you're describing it to.

I enjoyed it. Sometimes I wished that there wasn't quite so much walking required to unlock the next clip. There were some long minutes of silence, just walking along with audio to listen to, walking along some street I'd grown bored with. There wasn't much to think about except the plot. This was a suspense thriller. Normally, you don't pause in a thriller, you keep going. But this app forced some pauses. This gave me time to think about holes in the plot. I'm walking along and thinking Wait, if Charlie's supposed to be such a frickin' genius, why doesn't she think to just call up those people to ask if they're OK?. If I were just listening to plain ol' audiobook, it wouldn't pause for that kind of contemplation. But but I don't have the patience for audiobooks—I just keep thinking It would be so much faster to read this than to listen. But that means I can't use a book to distract me while I'm walking. So thanks to The Walk for keeping me occupied: there's no book of it, so I forced myself to listen to the audio instead, for a while experiencing the bliss of an audiobook fan.

Permalink
& Comments

2021-04-18T22:52:14.233876

wordnet, is-a

ColinTheMathmo asked folks to think of animals that were also verbs, like "bug". I thought of some and then it occurred to me: wordnet ("wn") is a computer tool that knows the meaning of many many words. It knows that "bug" is a verb. It knows that a "bug" is an (arthropod is an invertebrate is an) animal. I already knew how to use wn "by hand" to look up word definitions. I knew that it could also be used in a computer program, but I didn't know how. This seemed like a good opportunity to learn.

So I googled around, found out I should install NLTK (sudo aptitude install python3-nltk) and install its data; and then I started tinkering.

From my previous playing with wn I knew that "hypernyms" was its jargon for relations like "a bug is an arthropod". But there were still things to learn to use it programmatically. I had to learn about Synsets, the objects wn uses to keep track of senses of a word. You don't directly ask wn if "bug" is an arthropod. wn doesn't know whether you mean the creepy-crawly "bug" or the computer-problem "bug" or what-have-you. So you start by asking for a word's Synsets, and then you can query wn about the relations between those Synsets and others (e.g., Synset(animal.n.01)).

Once I knew about the important data types, I slapped together a program:

#!/usr/bin/env python3

from nltk.corpus import wordnet as wn

def load_words():
    words = []
    for line in open("words_500K.txt"):
        score_s, word = line.strip().split("\t")
        if len(score_s) < 4: break
        words.append(word)
    return words

def is_animal(word_s):
    animal = wn.synset('animal.n.01')
    senses = wn.synsets(word_s)
    to_do = []
    for sense in senses: # get creepy-crawly bug, computer-problem bug, etc...
        to_do += sense.hypernyms()
    while len(to_do) > 0: # walk up is-a trees: bug -> arthropod -> invertebrate...
        h = to_do.pop()
        if h == animal: return True
        to_do += h.hypernyms()
    return False

def is_verb(word_s):
    return len(wn.synsets(word_s, wn.VERB)) > 0
        
def main():
    words = load_words()
    for word in words:
        if not is_verb(word): continue
        if not is_animal(word): continue
        print(word)

main()

Pretty soon, a list emerges: man head does blue bear horse game mans horses dog heads queen birds fish soldiers fly bird baby stock gray dogs bay soldier jack cat grey pen bears permit mount games sole bull fox kids rays prey flies cow mate kid seal copper wolf ray eagle cats pet rail lamb grade queens pig beef swallow snake steamer cows cock mouse drum bees knot chat duck babies monkey goose rabbit worm rat pigs toy stray crow dove buffalo rats dun hawk fishes hare worms drums toys ducks layer homer hounds fowl snakes mates drill knots buck steer dam bulls butterfly bat rabbits orphan bitch stocks grades frog rails sire swan hound sow welsh whale eagles lambs turtle seals monkeys layers cricket fowls ram crows frogs permits steamers beaver lark butterflies perch pens raven kit quarry bucks sponge jacks bug hog kitten oyster parrot crane swallows crab ape bays calves blues oysters pets grub orphans bugs smelt plug foxes hack monitor stag poll hogs cocks hawks bats mounts babys soles shark cod flicker beetle spat grunt swans kite sharks fawn hares tick apes whales quail gulls falcon cuckoo kittens grays beetles crabs imagines torpedo ravens cub jade nestling larks snail stud grouse cubs parrots gull turtles nag leech badger mares stint rams cranes snails skate whiff polls quarries alligator buffaloes drone crickets drills stunt pup skates dams steers tinker skunk greys bunting clam rooks beavers shrimp ferret wolfs snipe kites homers coppers stags ruff sires carp foxs studs char bitches bulldog lug slug sows grunts clams alligators monitors pout assess reeves sponges suckling stunts torpedoes slugs grubs leeches pollard whiting falcons plugs drones kits quails strays ticks rook chats winkle perches roach mew flounder pinches cockle reeve whelp shrimps pups cuckoos skylark hacks foal fawns duns nags tinkers mews badgers whiffs skunks preys flickers whelps fishs cockles scallop basset ferrets yak nestlings remount scallops prawns crawfish snipes ruffs lugs gelding flys bream flounders spats butterflys bulldogs cocker sucklings foals jades buffalos mouses prawn gooses roaches

They ain't all good, but there are some great ones in there I wouldn't have thought of on my own.

Permalink
& Comments

2021-03-29T15:50:54.381632

Book Report: The Doomsday Calculation (How an Equation that Predicts the Future Is Transforming Everything We Know About Life and the Universe)

Back when I was a humble computer science university student learning how to write operating systems, we learned a simple trick.

A computer might run several programs at the same time: a web browser in one window, a text file editor in another window, several programs that don't even have windows… There are so many programs running that they can't actually run at the same time; there aren't enough CPU chips to go around. Instead, the special operating system program sets up a schedule: a fraction of a second for the web browser, a fraction of a second for the text editor, etc. To make an efficient schedule, it helps if you can predict how much longer a program needs to run. For example, that text editor program probably doesn't have much to do, assuming the user hasn't typed anything in the past ⅛ second. That program probably just needs to wake up, re-draw the blinking text cursor, and go back to sleep. On the other hand, a program that reads and sorts all the text of Wikipedia needs much more time. A naive operating system that scheduled equal CPU time to each of these programs would leave that CPU twiddling its metaphorical thumbs much of the time.

We learned a trick to predict how long a program will want to run. Consider how long the program has already been running. On average, it's about halfway done. If the program has run about a quarter second so far, it probably needs another quarter second. This trick isn't always right—if you just start running that Wikipedia-sorting program a quarter second ago, this trick gives you the wrong answer. But on average, it gives you about the right answer.

Other folks, not just computer science students, use this trick for guesstimating mysterious durations. For example, if you want a guess about how long a musical production will continue its run on Broadway (when we get Broadway back), consider how long it's already been running. There's a name for this trick: the Copernican Principle. Well, the Copernican Principle isn't exactly about estimating durations; it's the idea that the observer of a phenomenon shouldn't think they (the observer) are too special. Copernicus was famous for not-assuming that the earth was the center of the universe. It's similar to think "We're probably not at the very start of this thing; we're probably not at the very end; on average, we're probably about in the middle." This trick isn't great. If you have any information about how long something should last, you should use that information, not this trick. E.g., if the sun rose an hour ago, this trick guesstimates that the sun will set in about an hour; but your knowledge of how days work yields the much better estimate of 11 hours.

Some folks used this trick to guesstimate how long the human race will stick around: several thousand years of civilization followed by a couple of hundred thousand years of species survival. This was a terrible mistake. I don't say it was a terrible mistake because I disagree with its estimate. I say it was a terrible mistake because many philosophers and pundits have opinions about the immanent or not-so-immanent end of [civilization|human life|whatever], and all of these people and their opinions crawled out of the woodwork to yell at each other. This book, The Doomsday Calculation, tells the story of their arguments.

For example, the human population has surged in the past few centuries. It's all very well for someone to have said "When you're trying to guesstimate how long human civilization will last, on average you can guess you're about in the middle," but the chances that they said this in the 1600s or later, because most humans were in the 1600s or later. If someone says "Maybe we'll be around much longer than 'the trick' suggests—like someone an hour after sunrise estimating when sunset is coming," you should raise an eyebrow: odds are, you're a modern Indian not an early Sumerian. (Some folks, including this book's author, think this implies that doomsday is coming soon—perhaps in 700 years or so. I think the trick suggests that in 800 years we won't be doomed—but we can expect, on average, to have declined to an existence like that humanity had 800 years ago: not great.)

The book gets into some interesting territory. Given that humans are intelligent but haven't been contacted by intelligent aliens, what does "the trick" suggest? If the rules of Physics were just a little different, the universe couldn't support life—and "the trick" uses that fact to suggest that ours might be a universe within a multiverse just like the comic book movies told us (but maybe with fewer Spider-Men).

Though the book is interesting, it does point out that it's silly to use "the trick" to predict how long homo sapiens will be around. Remember: if you know how long a day lasts, you shouldn't use "the trick" to predict sunset time; instead, use your knowledge, knowledge is more accurate. Fossil-studying scientists know some things about how long species last before extinction. We should use that knowledge instead of just shrugging and guessing "We'll be around about as long as we've been around, on average." (Fossil knowledge doesn't make the doomsday-timeline-arguments go away; we're in a mass extinction event so you need to follow up that "species tend to last 3 million years" with "…uhm, unless there's some mass extinction event going on, that could pull in the timeline, uh-oh.") But the book doesn't look too closely at this—there are other books for that. This book is about high-falutin' applications of the Copernican Principle.

Permalink
& Comments

2021-03-19T22:34:33.242638

Tags

Archives:
1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021

Feed