a deep rabbit hole with twisty passages all alike, or, a confluence of weird operating system flukes, or, sigh

2014-10-08 23:20:47

Because of reasons I am running Debian on an older smartphone by way of a chroot from Cyanogenmod. This guide is great and I based my installation off of it (thanks!). At first, everything seemed peachy. It all quickly went as rotten as that peach you left out on the counter with the best of intentions but forgot about for a week as I tried to install some Python (3.4) packages using pip and a virtualenv.

This resulted in vague "permission denied" errors even though I was root. The errors were on simple, innocuous looking files. They prevented me from installing any Python code via pip.

I blamed bad Python packages for my weird armel architecture. I reinstalled Debian Wheezy and switched to armhf; no dice. I dist-upgraded in place to Jessie; no luck. I asked a system administrating friend about it. Their immediate suggestion was "something to do with SELinux."

"No," I insisted, "SELinux is totally not installed or enabled in my chrooted Debian. It just cannot be. Look, I checked, it's just not there." In fact, I was wrong: more wrong than the existence of people like weev (okay, not that wrong, but still really wrong).

The stack trace from pip was about os.setxattr. My system administrating friend told me that was likely related ext3 extended attributes. I listened, this time, and researched those on the Internet.

Enter lsattr, which helpfully told me that the various files os.setxattr was failing on had no extended attributes. Clearly, lsattr is a liar, or I was using it wrong. I prefer to think it was the former. I rage-started a python3 REPL in the chroot and began to manually execute the code that shutil.py was running.

Sure enough, the files did have an extended attribute, and shutil.py was trying to preserve the attribute across a file copy (seems like that should be handled by the filesystem with a low level command. It could be called copy or something. [I should not be allowed to design filesystems]). Naturally, the attribute had to do with SELinux. I still, in spite of this kind of obvious evidence, insisted it couldn't be SELinux, but just to be sure I startpaged "android SELinux."

Turns out Android has always run SELinux. Moreover, the Internet quickly confirmed that it could affect a chrooted OS. However, SELinux on Android has always been set to Passive mode. Awesomely, in Android 4.4 the default switched to Enforce mode. What version of Android was my Cyanogenmod running? 4.4. Lesson learned: always listen to friends who adminster systems. Especially listen to these friends if you are a maverick hotshot "code slinger" or "sloc crusher" or "programming prodigy" or "gainfully employed computer programmer" who can't slow down enough to give a damn about important operating system features.

At this point my drinking scotch straight from the bottle went from act of desperation to beautiful swigs of golden, burning victory as I soared through start page results about "android disable selinux" like a majestic, drunken pegasus. Or like Angela Lansbury flying through cyberspace.


(aside: is there fan fiction wherein Angela Merkel wakes up as Jessica Fletcher and is compelled to solve crimes? Think about it).

Finally, after a total of four hours' worth of swearing and drinking, I ran /sbin/setenforce 0 from Android's root shell and all of my problems (actually just this one problem, I still ate too much sriracha and it made my lips go numb) went away.

I was installing Python packages in style, at last. I have no illusion that denizens of the Internet will be knocking down the door to my blog (this door is metaphorical but if my blog was a MUD it could be virtually literal) searching for the answer to this problem, but I am compelled to document it so that it will be useful for the socialist cyberpunk rebels of the year 2043 as they reconstruct the Internet from old, charred router caches after the Corporate Implosion Apocalypse of 2039 and try to run their elite Hacker OS (probably called Sonic at this point) on Hello Kitty Android phones they dug out of the 8th continent which is just a literal landfill that extends from sea level to the ocean floor.

An oceanfill, if you will.

somewhat naive english language detection with hy + nltk

2014-10-03 22:21:28
    (import [functools [lru-cache]])
    (import [nltk.corpus [stopwords]])
    (import [nltk [wordpunct-tokenize]])

    ;; computes possible language by checking how many stopwords from each
    ;; language occur in source text and ranking them.

    ;; a possible optimization is to chunk the input text into substrings
    ;; of length N and then doing a frequency distribution of the
    ;; "winner" for each substring. this way, common substrings
    ;; can get cached across multiple inputs.

    (def english-key "english")

    (defn tokenize->set [text]
      (->> text
           (map (fn [w] (.lower w)))

    (with-decorator (lru-cache 100)
      (defn set-for-stopwords [lang]
        (-> (.words stopwords lang)

    (defn stopword-score [lang words-set]
      (-> (.intersection words-set (set-for-stopwords lang))

    (defn compute-stopword-scores [text]
      (let [[words-set (tokenize->set text)]]
        (->> (.fileids stopwords)
             (map (fn [lang]
                    (, lang (stopword-score lang words-set))))

    (defn english? [text]
      (let [[scores (compute-stopword-scores text)]
            [winner (apply max [scores] {"key" (. scores get)})]]
        (print (+ "language winner is " winner))
        (= english-key winner)))

dream: brain bugs

2014-09-07 14:04:09

I strap myself into a virtual reality rig and start a game. It is supposedly a period game involving conspiratorial victorians but the game is soon hijacked by a vindictive AI. The AI identifies as female but I cannot determine why she is out to get me.

The game morphs and I find myself in a futuristic hospital (perhaps late 21st century). I am in the ICU. My friend, J_____, is in a cryogenic stabilization unit. It is early in the morning: perhaps 3 or 4 AM.

There is a harried nurse. She greets me and wonders if I am one of J_____'s friends. I say that I am and ask what's wrong. The nurse explains that J_____ became infected with "brain bugs," fat, earwig-like insects that feed on gray matter. He was quickly put into cryogenic storage to halt the bugs' progress and now the only recourse is to periodically lobotomize him with a laser cutter, cleanse that section of brain, and then re-integrate the brain piece free of insects.

The nurse is exhausted and has been working full time on his case. I offer to take over her shift. She brightens and teaches me what to do, explaining that each time I kill a bug I have to fill out a "warranty" form that says the hospital killed the bug in the best, most professional way possible and guarantees this bug's absence moving forward.

It seems straightforward enough. The nurse brings me a glass container full of brain matter floating in some kind of green preservative. I can see the disgusting bugs waking up and wriggling around.

"Work fast, now. And don't damage the brain piece. It has to go back in. I'm going to go get some sleep."

The nurse leaves and I stand there with heavy tweezers, picking out the bugs and crushing them. I decide to just keep track of how many I kill and then fill out all the warranty forms in one go at the end.

J_____'s wife A____ comes in, delighted to see that I'm there. She offers me food and drink and thanks me profusely while I crush bugs. I'm getting increasingly disgusted and horrified by the process and soon cannot take it anymore.

I recall that this is all just VR anyway and try to quit. I bring up the game's menu but the AI taunts me, fuzzing out the UI and making it impossible to choose "Save & Quit." I am terrified to quit without saving my progress because even in the virtual world I do not want my friend's condition to regress.

I turn the bug squashing over to A____ and begin to explore the hospital, seeking out the AI so that I may defeat her and save my progress. I instead run into a crowd of corpulent, monopoly-looking businessmen all trying to shove themselves through an archway into a garden so that they may drink champagne together.

I am just as disgusted by the businessmen as I was the bugs and wake up annoyed.

touch my back

2014-08-22 14:07:32

touch my back.
write your name
in looping cursive

with your finger tips
with a blue ball point
with a splintered stick

carve it with a paring knife
trace it with a velvet glove
clean it with ten grit

burn it in with a soldering iron.

burrow into the small of my back
and curl around my spine,
to hug it when it tenses.

i am playing counterstrike with you

2014-08-20 09:46:54

i am shooting you over
and over because it is an intimacy
obtained by my perspective
and yours.

i am looking at your ak
and you see my mac 10
and i know that you are
a seeing thing, looking at me
over miles of trash talk and
internet juvenilia.

here there is no yolo
and only holding my fire
makes me feel
left out.

dream: grid music

2014-08-12 13:48:48

I am not myself. I am a boy, perhaps 8 or 9, and my mother is a combination of Patricia Arquette and Tilda Swinton and is a vampire. She wears a long black dress and large black sunglasses.

She is worried that I am growing up maladjusted by her vampirism. She teaches me to compose music by drawing rigid square shapes on graph paper with a thick black pen and dotting empty spaces with coloured ink.

A machine reads the grid and plays back music. It is abstract and harsh and each new piece I draw is harsher and darker. My mother is afraid.

She keeps me after school to meet with a very old Iroquois woman. Her hair is gray, long and bushy and a her face very round and wrinkled. She carries graph paper compositions of her own.

"Your compositions are too rigid, too square. Why do you draw locked rooms with no exit?"

I shrug and tell her that that was how my mother taught me.

"I will teach you to flow. You must flow."

She shows me some of her graph paper: it consists of smooth, elegant spirals and many coloured dots. I prefer my rigid rooms and get quiet and cranky. I wake up after looking up at my mom and her fangs and how pale and sad she is.

movements in an office building

2014-07-03 11:43:18

a gnome at desk area
the janitor at second floor lobby
a computer at cubicles
a gnome at ground floor elevator
the janitor at cubicles
a computer at cubicles
a gnome at desk area
the janitor at second floor lobby
a computer at cubicles
a gnome at ground floor elevator
the janitor at kitchen
a computer at cubicles
a gnome at second floor elevator
the janitor at second floor lobby
a computer at cubicles
a gnome at second floor lobby
the janitor at second floor elevator
a computer at cubicles
a gnome at second floor elevator
the janitor at ground floor elevator
a computer at cubicles
a gnome at second floor lobby
the janitor at desk area
a computer at cubicles
a gnome at kitchen
the janitor at ground floor elevator
a computer at cubicles
a gnome at second floor lobby
the janitor at second floor elevator
a computer at cubicles

movie roundup 2

2014-05-31 14:48:24

Only Lovers Left Alive

Do see this movie. Again and again. It's perfect. I loved every single dim, morbid second of it.

The Black Cauldron

This movie could have been so amazing. It definitely has some amazing visual sequences but the characters are largely irritating and the story very shallow.

Grand Budapest Hotel

I didn't like this too much the first time through. I found the violence off-putting and got kind of tired of M. Gustav. The second time, however, I loved it (especially M. Gustav). It helped to know when the violent parts were coming.

Chronicles of Narnia part 1

I found this movie unwatchable. I turned it off halfway through. I expected to have the most trouble with the source material's intense Christian allegories but the movie itself was just hollow. The CG animals were cute and Tilda Swinton was, of course, great. But it's nowhere near enough to save the rest of the movie.

Lilo & Stitch

I enjoyed this movie, thus proving that I don't hate fun. The plot makes little sense but that's okay. Also Stitch was cuter when he was evil (or more accurately, Chaotic Neutral).

Hunger Games parts 1 & 2

I expected to hate these. Instead, I adored them and immediately read all the books.

dream: penetrating the city-hotel of UK town

2014-04-19 18:49:36

I am a some kind of cyberpunk agent-for-hire in Pan Asia. The waves have long since covered up the United Kingdom and I have been hired to infiltrate "UK town," a sprawling, walled, hotel-like city founded decades ago by refugees.

There is a wing of the complex dedicated for use as a nursing home. Old british women dress in neo-victorian garb and sit in holographic sun rooms and spend their days writing letters to the "prime minister." They are actually corresponding with an AI who writes back to them of romance, politics, intrigue, and passion.

My employer has determined that one woman in particular is conversing with the actual prime minster of the UK, a shadowy and secretive figure. He is, for some reason, enamored of this old blind woman and she and she alone receives actual honest letters from the politician.

It is my job to get into this woman's room and steal any letters I can find so my employers can use them to pin point who and where the prime minister is (I elect to not find out why).

I wear a long tweed coat and dodge many dressed-up butlers carrying tea trays made of a plasticine silver. I enter the first elevator I see for the nursing home complex and begin pressing the buttons according to some arbitrary protocol. Such arcane annoyances are the law of this place and, as far as I know, I hit all the elevator buttons in the right order and uttered the correct pleasantries to the AI monitoring the car.

Unfortunately an alarm sounds. A cyborg (who looks just like M___ M_K____) with surgically attached sunglasses marches in and informs me that this car is set up for a certain Madame's funeral procession and that I have failed to follow proper funerary protocol. He tells me that I will be "instructed."

He pulls from a thick keyring what looks like a transparent stick of RAM. He shoves it into the slit in my forehead and I am subject to a searing pain throughout my head. A vision starts in my brain of some poorly adapted biblical story about "the funeral of Job" and I am unsure how long it goes on.

When it fades, I come to and see him rip the RAM stick out of my forehead and walk off. I quickly get into a different elevator.

I make it onto the proper floor and find a nurse who is going to visit my target. I convince her that I am a nephew who has come to check on the woman's cat. The nurse lets me into the woman's room.

I quickly find the cat "carriers," giant chocolate-shell easter eggs wrapped in garish green tin foil. I crack the nearest one open and there is an unseeing, switched-off cat robot inside. To placate the nurse I busy myself with plucking an intricate pattern of hairlessness into the cat robot (who looks a lot like my cat U___). Luckily the old woman is blind and lost in a fantasy "outside" in the holographic sun room.

The nurse leaves and I quietly rifle through faux-wooden bureaus and drawers all while listening to the old woman have a conversation with herself about flowers and tea. I find reams of correspondence with the true prime minister and stuff it all into my coat.

I manage to escape the city and go to stash the letters in my locker in a filthy subway only to find that my locker has been wrenched open and looted. I wake up feeling pissed off and cheated.

when you were in my machine and I was in yours

2014-03-24 15:35:28

I'm halfway through Indra Sinha's The Cybergypsies.

Among other things it details a "pre-internet" group of computer enthusiasts/addicts/users. The most striking thing about them is their disdain for the Internet, which at first I could not understand at all.

After reading more (and playing some Uplink), it started to dawn on me. They mourned for the loss of the direct connection between two machines. The "physical" connection between one modem and another over a copper wire. There was an intimacy there shared by all those who dialed into the same BBS or MUD.

With the internet, I can still SSH or telnet somewhere--and, indeed, have basically the same experience--but now our data is mediated by the Internet, a labyrinth so immense and entangled as to put any Creten maze to shame. It delivers our data for us through some dizzying number of hops. It plays with us an ironic game of "telephone" that, by the graces of TCP, tends to give us what we wanted.

That computer-to-computer intimacy is replaced by a swarming, unfathomably large horde of troll-faced minotaurs.

Interestingly, the type of interaction afforded by BBS-dialing has gone nowhere: I can open up a terminal right now and telnet or ssh to any number of interesting places. Such means of networking have simply fallen out of vogue among mainstream computer users.

As the web becomes more and more commercialized, censored, gated and banal, look for me not on a blog, not on Twitter, not on Facebook, but on some machine out "there." I'll be hiding from the information apocalypse behind a telnet connection, sitting in a well-described garden, reading plain-text poetry, waiting for you to utter a "say" command.

I might even brew you an imaginary pot of Earl Grey tea with a few Lapsang leaves tossed in.

older posts

this blog is about: air, aliens, android, androids, ant, atlanta, book, bots, brains, bugs, camera, cg poetry, comments, counterstrike, cutup, cybergypsies, cyberpunk, cyberpunkprophecies, cyberspace, damon, death, depression, documentary, downlove, dream, essay, facebook, family, fiction, film, friends, game, ghosts, godthing, gothic, grandfather, haiku, holiday, hy, internet, invasion, iroquois, linux, lovecraft, mars, marta, mind, mobile novel unit, movies, nlp, nltk, nonfiction, northkorea, oauth, original, poem, poetry, pollution, porm, portland, preweb, prosai, prosaic, python, queen, raw, robot, short story, sonnet, space, spanish, surgery, swartz, telnet, touch, train, twitter, vampire, virus, vr, war, wow