May 31st, 2012

hermetic encoder



May 31st, 2012

So, I implemented the custom-action in PmWiki last night, and updated the WordPress plugin to match.

This is much, much better, as there is no longer a mostly-duplicated, hacked version of PmWiki floating around.

I still have to handle CSS issues, and interaction with other markup.

I’m looking at the WP-GeSHi-Highlight plugin which has some great notes on avoiding such issues:

– WP-GeSHi-Highlight filters&replaces code snippets as early as possible. The
highlighted code is inserted as late as possible. Hence, interference with
other plugins is minimized.
– If it does not find any code snippet, it does not waste performance by
senseless inclusion of highlighter libraries etc. And it does not send its
css code to the user if not necessary (others do).

This is how the plugin works for all page requests
I) “template_redirect hook”:

1) The user has sent his request. WordPress has set up its `$wp_query` object.
`$wp_query` has information about all the content potentially shown to the
2) This plugin iterates over this content, i.e. over each post, including each
(approved) comment belonging to this post.
3) While iterating over the post and comment texts, occurrences of the pattern
<pre args> CODE </pre>
are searched.
4) If one such occurrence is found, the information (args and CODE basically)
is stored safely in a global variable, together with a “match index”.
5) Furthermore, the occurrence of <pre args> CODE </pre> in the original
content (post/comment text) is deleted and replaced by a unique identifier
containing the corresponding “match index”. Therefore, the content cannot be
altered by any other wordpress plugin afterwords.
6) Now GeSHi iterates over all code snippets. For each, it generates HTML code
that highlights the snippet according to the given programming language
(with or without line numbers).
7) Additionally, GeSHi generates optimized CSS code for each snippet. All CSS
code generated by GeSHi ends up in one string.
8) For each code snippet, highlighted HTML code AND the corresponding match
index is stored safely in a global variable.


May 31st, 2012

I figured a (semi-manual) way to get emacs to sort some lines by rhymes:

Show Original

haters gonna hate
gaters gonna gate
laters gonna late
maters gonna mate
skaters gonna skate
baiters gonna bait
plaiters gonna plait
straiters gonna strait
waiters gonna wait
straighters gonna straight
eighters gonna eight
craters gonna crate
stators gonna state
graters gonna grate
raters gonna rate
freighters gonna freight
gaiters gonna gait
gators gonna gate
greaters gonna great
praters gonna prate
straighters gonna straight
traitors gonna trait
vapers gonna vape
bakers gonna bake
shakers gonna shake
drapers gonna drape
rakers gonna rake
scrapers gonna scrape
quakers gonna quake

Show Sorted

bakers gonna bake
shakers gonna shake
rakers gonna rake
quakers gonna quake
scrapers gonna scrape
drapers gonna drape
vapers gonna vape
gaters gonna gate
gators gonna gate
haters gonna hate
skaters gonna skate
laters gonna late
maters gonna mate
raters gonna rate
craters gonna crate
graters gonna grate
praters gonna prate
stators gonna state
greaters gonna great
straighters gonna straight
straighters gonna straight
eighters gonna eight
freighters gonna freight
baiters gonna bait
gaiters gonna gait
plaiters gonna plait
traitors gonna trait
straiters gonna strait
waiters gonna wait

(setq words "haters gonna hate....")
(apply 'string (reverse (string-to-list words)))
delete quotes
select region
M-x sort-lines
add quotes
setq words
(apply 'string (reverse (string-to-list words)))

I’m sure this could be completely automated.

Also, for personal reasons, I’m not satisfied with the order obtained — but it’s a great start, and a quick restructuring that helped clear my head on this text.


May 31st, 2012

24. Whenever “Smokey” aired on network TV, Gleason’s “sumbitch” would be re-dubbed with the novelty phrase “scum bum.” That became such a popular epithet among kids that, in 2007, Hot Wheels issued a Bandit-esque Pontiac with the phrase “Scum Bum” printed on the rear.



May 30th, 2012

I have a rough-draft version of pm-wiki markup working here in WordPress!

!! This is a heading
This is some text

!! This is another heading
[[http://www.google.com|search link]



This is a heading

This is some text


This is another heading

Wikipedia:PmWiki – Intermap example

search link


This is accomplished with a WordPress plugin modeled on FsWiki, and a hacked version of PmWiki that doesn’t perform a page-directive (view) by default, allowing the front-end script to pass text to the markup function.

It is far from perfect — the CSS is wonky*, and I’m sure the PmWiki integration is g-dawful; I need to look into page-directives, see if adding a custom directive is the direction I need to go. Plus, the WP plugin ignores the code-directive, so I had to fudge it to get the example above.

But as a proof-of-concept that was started at 11pm, it only took 1.5 hours.

See original notes.

* The CSS is wonky for this entire blog. I’m no CSS-guru, but I seem to understand it a lot better today than when I pieced this thing together. Just look at how the blockquotes are padded weirdly….

UPDATE: A custom action is the direction I need to take.


May 30th, 2012

I’ve been using Emacs as my editor since… I dunno, 5, 6 years now?

Steve Yegge’s js2-mode was an excellent answer for JavaScript coding, but there were a few issues that drove me nuts. Whatever — the benefits outweighed the disadvantages.

Scroll forward to 2012, and I’m refactoring a large codebase, and trying to indent it properly, and Emacs goes nuts. I have to task-kill it several times, until I eventually narrow down the issue to js2-mode trying to indent certain regexes. Aaargh! (And I eventually figured out that I could interrupt the task without killing Emacs, it was just slow to respond….).

Over to google, and I find others with the exact problem, and a solution: Mihai Bazon has a committed patch that isn’t in the release of js2-mode, and some helper functions, as well. Hooray!


May 29th, 2012

Some excerpts from Unlikely Persona: Jerry Hunt (1943-1993)

I’ll never forget the first time I saw Jerry perform. It was in 1984 at a music festival in Ohio. The curtain opened to reveal upstage a modest clump of homemade and off-the-shelf electronic instruments. Jerry appeared from behind the setup, pushed a few buttons and began the piece. The music coming from the loudspeakers was a tapestry of sampled instruments — mainly bowed strings — constantly churning out a dense micropolyphonic web based on clusters of slow and fast trills. This was accompanied by a host of high-frequency percussive sounds emphasizing rattles, sleigh bells, wind chimes and the like. Loud and unrelenting, it reminded me of a Texas insect chorus on a hot summer night.

While this was going on, Jerry paced the stage holding a variety of homemade hand props: staffs, rattles, different kinds of wands and bells. The rattles were shaken, the staffs stamped loudly on the stage. Some of the wands were quite phallic, and Jerry would make strange motions with them as though they had magical powers. Other wands looked like religious talismans created from junk: an umbrella handle that turned into a cross at the far end, or a stylized metal rod bent into the shape of an astrological symbol. Jerry took out some strange nightlights that he plugged into electrical outlets all over the stage. Later he brought out an old brown suitcase, sat on it like a child’s hobby horse, and slapped it like a bass drum using a thick wooden stick.

The performance was redolent of shamanism, as though demons were being exorcised from the auditorium. But it came from a most unlikely persona: the lanky, bald, bespectacled Jerry Hunt, wearing his trademark unironed white dress shirt, long narrow tie, off-white jacket with unbuttoned cuffs and loose fitting trousers. It was a look I call “central Texas meat inspector” — certainly not what you’d expect from a shaman. It was amusing to watch the spectacle of this mysterious ritual being performed by an utterly mundane-looking man.


read more…


May 29th, 2012

page 1

The first page of Naught and the Negative, a project which I won’t begin to try to describe or understand, but love how it looks.

found via Warren Ellis


May 29th, 2012

Although the progenitor of my having a website, this blog went on hiatus in January 2009, and only returned in April of 2012. That’s a good long break.

In the meantime, I was spending far less time on HTML and more time on dumping links onto pages, writing small amounts of text, and doing only small amounts (by comparison with re-installing WordPress and working on the poorly-designed-website) of bit-twiddling with PmWiki.

I much prefer the PmWiki markup to WordPress’ markup — especially since WordPress has a pseudo-HTML markup (that looks like HTML, but is re-processed invisibly on the backend and transformed in ways you’d least expect.

blah blah visual editor blah blah crap blah blah I miss WordPerfect 5.1 for DOS’s reveal codes blah blah blah

What I’d like is some way to tie the two together better.
One rendering engine for both, media-images use the same warehouse, etc.

The WP FreeStyle wiki plugin adds FreeStyle-wiki markup to WordPress. Nice!
But How?
It installs an entire working instance of FreeStyle Wiki inside of WordPress.

That’s a bit of overkill just for rendering posts.

Plus, I already have a working install of PmWiki — just not inside of WordPress.

So, I have to find some way to get allow WordPress to pass arbitrary text — hopefully with wiki-markup — to PmWiki and retrieve the HTML-ified text in return (and hope that WordPress doesn’t f**k it up).

The FsWiki plugin gives me a quick idea of how to pass off the text to a renderer — it’s getting it to and from PmWiki that concerns me.

Quite possibly not difficult — I just haven’t tried it yet.

MarkupToHTML($pagename, $str)

Converts the string $str with PmWiki markup into the corresponding HTML code, assuming the current page is $pagename.


Other avenues of research include the TextControl plugin.


May 28th, 2012

With some birthday amazon gift-certificates, I picked up a few books I’m working on:

Actually, I bought the Mez Breeze book a few weeks earlier.

I encountered Mezangelle around 2000 I think, but it was mostly via the online _][ad][Dressed in a Skin C.ode and I simultaneously didn’t get much into the visual presentation (I’m still ambivalent towards a lot of online experiments, which is rather ironic. Hence, the ambivalence — which, isn’t no attitude, it’s two simultaneous opposing attitudes — I like it and don’t like it) and saw a parallel[le] oogenesis with my work in XraysMonaLisa. As such, I somewhat avoided it, so I could continue my own independent evolution.

Sadly, locked in an imaginary closet of isolation — I wasn’t aware of anybody working in such an area other than Mez — my writing dwindled. It never stopped, but I suffered innumerable crises of faith, and my output is still a trickle compared to the 1990s. OTOH, I am now currently gainfully employed full-time and working on a career and a family. So other bourgeoise impediments have arisen.

And, finally — I never quit. Half the reason for starting the wiki was for XraysMonaLisa — to give it an online medium, an outlet, an editor, and the ability to see the history river of continual change. Sadly, I’ve never invested the time in PmWiki to get the visualization that is possible with, say, MediaWiki, but hopefully someday…..

That’s all been changing over the last few months, as I finally started on my long-delayed text manipulation project, and in the process discovered a vast flotilla of fellow travelers out there. I’ve started writing more, and researching furious green ideas too late into the night…

Oh, and one other book that I picked up at Ocean State Job Lots:


May 25th, 2012

untitled (put the blame on VCR)

VCR. Take



yonder construction

Modified template of single-syllable lines run through jGnoetry (with some manual editing). The syllable-counting engine is imperfect.

I used the default sources, with Shakespeare @ 0%, leaving us with 50% Tristan Tzara and 50% Lawrence Lessig.

I’ve been re-wiring jGnoetry as a side-project (it is OpenSource, after all). I haven’t yet got to changing any functionality — it’s more been about refactoring, separation of presentation and calculation, etc. A good exercise while I think about the program, and it’s implications for TextMunger.

Hitting a syllabic rhythmic structure doesn’t hold a lot of draw, for me [gasp!]. But what I definitely like is the ability to save chunks of the output, and regenerate the gaps — and having said regeneration be from the same markov-model. Or from a different model, but, hopefully, keyed from the ends of the gaps.

The Anderson Poems had some sections I would have liked to have modified — but charNG doesn’t offer a simple way to do that. jGnoetry theoretically allows the use of source-text-as-template, but with random-offset lines I found the experience less than perfect. Not to mention the need to regenerate the corpuses from one application to the other.

blog vs wiki

I’m still grappling with having both a blog and a wiki. I think that blog-posts are a little more ephemeral, or better suited to date-ordering, as they may be multiply classified, whereas the wiki is pre-sorted into sections. Yes, the blog has Categories, which may correspond to wiki Groups. But the blog’s default ordering is time-wise. So the front-end gives us a different viewpoint.

And putting a text in here, first, allows me to stare append notes that might be distracting from the way I think it should be viewed in the wiki.


May 23rd, 2012

(click for full-size animation)

found @ weird animated gifs.


May 23rd, 2012

For my birthday (a month ago today, hey!), I got a hand-crank/solar-powered radio, with NOAA and shortwave bells-n-whistles — it can even power/charge USB devices (and can run on batteries, if you want).

More pieces for getting off the grid! Or for when Connecticut Power & Light are surprised by the weather….

Little Michael thinks this is the best thing since sliced toast, and loves turning on the lights, changing the volume, and then finding something shiny and letting it on the floor to discharge the battery…. and he’s always frustrated when I try to crank it back to life.


May 23rd, 2012

love is [the unkindest cut|a virus]

love is
             like -
 that letter.
  Language is a virus!
           Language is
        a virus! Language
          a virus, Language is a virus.

    Language! It's
             a man,
         island, that I love, is gone, the
       it takes. Thanks.
          So...thanks. So
          Mom, in fact,
        to be.

   And Fred
 said: This is your
         Army knife.

read more…


May 23rd, 2012

Sometimes it’s hard to tell fact from fiction, particularly when we think we can’t think of any fiction:


May 21st, 2012

We read in the introduction to Mr. Addad’s jGnoetry:

[…Q]uotation marks, parenthesis, and brackets, […] are tricky to handle in bigram generation systems because you can’t be guaranteed that an open-bracket will have a matching close-bracket.

No argument here. Both the opening and closing tokens of any pair are unlikely to fall within the short range of any interesting n-gram model.

But, what if we modify the model, to make it want to close off the pair?
Translating “want” into some sort of algorithmic model, to increase the chance of closing off the pair.
read more…


May 21st, 2012



May 18th, 2012

Michael Swanwick alerts us to Richard Prince’s lastest “product”:

The Catcher in the Rye by Richard Prince

The Catcher in the Rye by Richard Prince

See Also: VisualAddiction.Appropriation and WordSalad:Appropations Committee


May 16th, 2012

Herschel Silverman is dead, alas!

In his poem “Television Was a Baby Crawling Toward That Death Chamber,” Ginsberg summoned the image of Silverman in this way: “candystore emperor Hersch Silverman, dreaming of telling the Truth, but his Karma is selling jellybeans & being kind.” Mentioning this to me, Silverman said that he agonized for a long time, trying to understand what exactly Ginsberg meant by this. Clearly it’s not exactly a compliment, but a comment on a certain degree of restraint—or even repression—practiced by Silverman. But perhaps not every poet is meant to bare one’s soul in public; if anything, Ginsberg’s confessional fetish often bordered on all-out exhibitionism, while Silverman’s approach was rooted in a different set of priorities.

And, no, I had never heard of Mr. Silverman before today.

Found via FollowMeHere


May 15th, 2012

Interesting bits from Michael Jr’s vocabulary:

Baby Ah! := Little Sister Anna
Bobti blmrwr := Bob the Builder
George! George! George! := why on earth did you make me watch Thomas the Tank Engine?
[handful of moist, chewed food passed on to parent] := This does not pass my stringent edibility requirements.
baby car := car
beena := banana
ba’al :=- bottle of milk
bunny := Arthur (cartoon character, who is actually an aardvark)
car := truck
chiz := cheese/primary form of nourishment
choo-choo := I would like to watch Thomas the Tank Engine for 30 seconds
dirty burp := vomit/spit-up
done := see all that food on the floor? Where were you 30 seconds ago?
foffee := coffee
hot := hat/cap
kooh-ker := “Foreman” grill (doubly-weird, becuase “cooker” is an uncommon word in our house)
money := give me some coins and bring down the musical piggy-bank from the top shelf
mote := Why did Curious George disappear from the TV when I mashed all these buttons?
ocker := rocking chair
oh honey := I am hurt and in need of consolation
pee-kull := pickle
pipa := pizza
pull := please open this gate/door/drawer/thing I’m not allowed to open
puppy := Wallace and Grommit
side := outside
tic-toc := clock/wrist-watch
up|down := down|up (he gets them right about 75% of the time, but when he’s excited, they’re interchangeable)

The best/worst thing he says is in the morning as I’m preparing to leave: “no daddy work, park!

  • syndicate

    • Add to MyMSN
    • Add to MyYahoo
    • Add to Google Reader
    • Add to Bloglines
    • Add to Newsgator
    • Add to NewsIsFree