hermetic.art

May 31st, 2012

hermetic encoder

(source)

markup.art

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
user.
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.

rhymers-gonna-rhyme.art

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.

summa.art

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.

(source)

  • syndicate

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