Ideas

Published on . Updated on .

This is my incubator. It’s easy to build up a body of work if you keep a collection of limbs.

Areas to Explore

Workout Weight Progression

2019-11-20

Novice weightlifters are typically encouraged to use one weight until they can perform a certain number of reps, then go to the next-biggest weight and repeat. This straightforward approach, called linear progression, is the standard recommendation for those new to weight training.

I’ve noticed, however, that the total weight moved per set (which I’ll call “poundage”) in linear progression can vary dramatically between total pounds moved in a set, at weight W, of the maximum number of reps R, and a set of 1 or 2 reps at the next highest weight1. For example, 1x50 = 50 poundage, and 2x50 = 100 poundage: both of which are lower than 3x45 = 135 poundage. The linear progression can be shown by executing the following only-slightly-pseudocode, and if we graphed the poundage values in the result list, we’d see spikes up and down as the lifter moved from one 5-pound increment to the next:

(let
    ((weights (range 45 50 ... 225))
    (reps '(1 2 3 4 5))
    (result))
        (dolist (weight weights)
            (dolist (rep reps)
                (let ((poundage (* weight rep)))
                    (collect poundage result))))
    result)

However, if we sort result (and add some extra code to match each poundage with its values for weight and rep), we would have a weight progression which is smoother than the linear approach. I don’t know whether or not this smooth progression would actually be more efficient for a novice, since periodic resets to a lower poundage are valuable for sustained progress2.

Chinese Stuff

2020-02-15T09:58:16-0800

悲守穷庐,将复何及

(2019-11-20)

Two windows next to each other, one of which shows usage instances for the word under, or around, the cursor.

Part of the challenge of creating an interface to help with Chinese translation lies in defining the extent of a word. For example, when a verb and an object (e.g. 吃东西 ), is combined with a two-character complement3 (e.g. 起来), the result, 吃起东西来, does not contain “起来” as a substring, because two-character complements get split up to follow both verb and object. Any digital dictionary or reference system concerned with usage examples will have to account for this fact of Chinese grammar, and contain the knowledge that, despite the results of affixation, this can be considered an occurrence of the “起来” complement.

(2019-09-23)

There are some pronunciations which are possible pinyin syllables but which are not associated with any words in the language, such as “hiong” or “jung”. But even more interesting, to my mind, are those syllables which exist but are associated with few characters.

Setting aside a special case, as of the time of writing I believe the existing syllable with the fewest associated characters is miu4, which as far as I know is a reading for just three characters: 谬, 缪, and 唒. Of these, I’ve only seen dictionary entries for the first two, and the word 荒谬 is the most likely word in which you will see one of these characters in the wild.

The special case is 佛 fo2 “Buddha”. Technically there are other characters with this pronunciation, but they are variants of the original (whereas the characters pronounced miu4 all have distinct etymologies.) I call this a special case because, unlike miu4, where by historical accident there are no other characters currently pronounced that way, the lack of other characters pronounced fo2 is due to the intersection of religious conviction and traditional Chinese naming taboos.

Which Mandarin Romanization Notation Should I Use?

Here is the case for using gei3 instead of standard Pinyin gěi.

Pro:

Con:

Decision: Standardize on gei3-type citations for source material. Can use scripts in the build process to automate find-replace for publishing. I don’t care about academic or legal standards right now, and any Chinese linguistics writing I do will probably not be for laymen.

Tabbing Through Tones with MacOS Chinese Input

2019-11-14

MacOS Chinese input allows you to cycle through the tones with TAB. I just discovered this after years of (begrudgingly) using this input method. Harrumph! They could have put the tones on the number keys to kill two birds with one stone:

  1. Number -> tone is a straightforward, well-known mapping, so I wouldn’t have had to discover this at random
  2. It would have forced them to find a smarter, more ergonomic way of letting me pick candidates, rather than having to lift my fingers from the letter keys to identify every single character I want to use.

Simple but Uncommon Chinese Characters

2019-11-14. Update 2020-01-30T10:09:34-0800.

There are Chinese characters which are structurally simple, but not in common use today.

A perfect example is 屾 shen1, a literary term which means “并列的两座山” (“two mountains side by side”.) This is one of relatively few characters that is actually ideographic, i.e. has a shape depicting the real-world concept it represents. This is because 屾 shen1 is made up of two side-by-side copies of the character for mountain, 山 shan1. Two mountains side-by-side in the character; “two mountains side-by-side” for the meaning.

Below are other characters which have piqued my interest.

Hakyll notes 2019-11-13

The function Hakyll.Web.HTML.relativizeUrls (at https://hackage.haskell.org/package/hakyll-4.13.0.1/docs/Hakyll-Web-Html-RelativizeUrls.html) is defined in terms of the helper function relativizeUrlsWith, which is itself defined in terms of Hakyll.Web.HTML.withUrls:

withUrls :: (String -> String) -> String -> String Apply a function to each URL on a webpage.

If I want to do anything to all the URLS on a page (such as extract them for sending Webmentions), this could be a good starting point.

Videogame Idea

There are two modes to this game. Mode 1 is played in a 3rd-person or 1st-person perspective (I think 1st-person would be more satisfying.) On your turn, you swing your sword toward the enemy’s body. The motion of the sword can be precisely controlled, as can the hit location; part of the game skill is hitting a “juicy” place on your enemy.

Mode 2 begins as your sword impacts the enemy. The game speed slows down, and a picture-in-picture appears, showing a magnified view of the part of the enemy that you hit. You guide the sword blade through the enemy body part, with the overall direction of your blade determined by the angle of your sword stroke and other such factors. Your time is limited by the size of the body part because your blade is passing through them (perhaps it might be possible for the blade to get stuck, ending your Mode 2 turn early.) You’re trying to do something: either deal damage to the interior of the body part by destroying the “chunks” inside, or navigating the torturous path between the chunks in order to sever the body part. Dealing damage is easier, but it only weakens the limb instead of severing it.

Different parts of the body could present different obstacles, or special unique points. There might be a special “bisect” move available if you swing your sword at the top of the enemy’s head and successfully navigate their whole body; hitting the heart or stomach or intestines might do something special, if those are even modeled at all; etc.

Lisp Notes

2019-11-07

The reason Lisp is special is because you can TURN OFF semantics.

(+ 1 1) is pure form. (+ 1 1) is syntax. (+ 1 1) is a syntactic expression: it has structure.

But, until we evaluate it, it doesn’t have meaning. [It might appear to be “add one and one,” but in a programming language5 focused on bits and bytes, (+ 1 1) might well be the command to put together two bits, resulting in 11.]

In all the Lisp-family languages I know of, because they are programming languages, and by default the programmer expects to evaluate syntactic expressions, the default notation for an expression which will be evaluated is simpler than that for one which will not be evaluated.

The notation given above is the traditional notation for an expression which will be evaluated by the Lisp system. (+ 1 1) evalutes to 26.

The notation for an unevaluated expression is ’(+ 1 1). But, “unevaluated” isn’t quite the right word here. It will be more helpful to consider (+ 1 1) as evaluating to itself.

You can think of that single quotation mark like a switch which turns off evaluation. Once that quotation-mark switch is flipped, the following expression no longer means anything. It’s pure syntax. The result of evaluating it will depend on the environment in which it’s evaluated: if you redefine “+” to do subtraction, the result of evaluating (+ 1 1) in that environment will be 0.

Poetry Nozzle

This was an idea; now it’s just a name.

Nonsense Dialogue

Fop:
    Your skills --
    Your accumulated advancements --
    Have insufficient increasement!

Dandy:
    Upwardified are my upgrades,
    My many masteries --
    That is, my skills!

Fop:
    Predictably, you are plusless,
    Listless, and lazy!
    You have! No! Skills!

Gifts From Prengubi

(2019-11-20)

On the page of writing where I discovered Prengubi Cjiiiifgh, I found some strange stuff.

Website Improvements

2020-02-04T17:36:44-0800, and beyond

I keep these around in case anyone asks after the autism-related work on my resume.

  • echolalia (frequent repetition of a sound, word, or phrase)
  • trouble using or understanding pronouns
  • trouble using or understanding sentence (phrase) structures
  • irregular tone (e.g. atonality; use of rising tone (“uptalk”) at end of sentences which aren’t questions)
  • irregular articulation
  • hard to keep themselves to a certain volume (e.g. hard to use “inside voice”)

Dumb Math

You can divide 12 into 3rds or 4ths evenly. but if you take 1/3rd from 12 = 4 and add it to 12, you get 16, which you can’t evenly divide into 1/3rds (but you into 4ths.) If you take 1/4th of 12 = 3 and add it to 12, you get 15, from which you can’t evenly divide into 4th (but you can into 3rds.)

An Interesting Comment from “Meditations on Moloch”

Original post: https://slatestarcodex.com/2014/07/30/meditations-on-moloch/#comment-135746August 17, 2014 at 9:43 pm.

Andrew says:

Gorbunova and co. have written a series of fascinating papers comparing cancer across species, with a focus primarily on rodents. Here are a couple of them:

http://onlinelibrary.wiley.com/doi/10.1111/j.1474-9726.2008.00431.x/full

http://link.springer.com/article/10.1007/s11357-008-9053-4/fulltext.html

http://www.nature.com/nature/journal/v499/n7458/abs/nature12234.html

http://www.pnas.org/content/109/47/19392.full

http://www.nature.com/nrg/journal/v15/n8/full/nrg3728.html

Thoughts arising therefrom:

First: Naked mole rats get exceptional cancer protection from an interaction between unusually large hyaluronan molecules and p16, which provides a redundant pathway (in addition to the p27 pathway, which they share with most other mammals) for enforcing a minimum distance between cells. Blind mole rats, by contrast, get their cancer protection from p53 and Rb working with IFN-β to cause necrotic cell death when cells get too close. Eastern grey squirrels use yet another method. Beavers use telomere shortening, which is common among large mammals but not found in any of the long-lived small rodents.

In other words, there are many ways to get cancer protection. Add redundancy to one of any number of pathways, and you’ve multiplied your cancer protection many-fold.

Second: Mice, rats and voles suffer high mortality from starvation, predation and disease. They also have the feeblest cancer protections among rodents. By contrast, naked mole rats, blind mole rats, eastern grey squirrels and beavers have all found ways to ensure a reliable food supply and protect themselves from predators: Burrowing, jumping through the trees, building lodges, keeping food underground or under water. There’s a strong argument to be made that these things came before they gained additional cancer protections, and were the ultimate cause of the cancer protection.

Why? It’s because avoiding cancer only helps those who die of old age. For mice, rats and voles, the selective signal on an anti-cancer mutations gets lost in the noise of early death from many other causes. It’s only for already long-lived animals, protected from predation and starvation, that cancer prevention leads to more offspring for one individual versus another and allows an anti-cancer mutation to become fixed in a population.

In other words, whales probably avoid cancer because they live a long time.

Ratio of Author Blog Text to Blog Comment Text

Take the ratio of “post length:total comments length” forms a rough measure of “how many words of discussion does Joe Blogger provoke per post? per word of writing? per week?” Would also be worth measuring length of comment chains.

Possible Web Hosts

https://www.dreamhost.com/hosting/shared/

Rhyme Ninja Source Code

https://github.com/pacesmith/rhyme-ninja

For needs related to rhyming dictionaries, thesaurus lookups, poetry generation, and more.

The Post Office Sends Valentines

Interested customers can write to these Post Offices for postmarks to keep or to share with friends. Enclose a stamped, addressed card or letter in another envelope or box labeled “Valentine re-mailing” and address it to the postmaster of one of the towns listed below. Please allow enough time for postmarking, re-mailing, and delivery.

USPS Website

Here are the towns with names that I like the most, out of about 35:

For Dogs’ Eyes Only

Not in the dresser,
Nor on the couch.

Not in this jacket,
Nor in that pouch.

Not in the bucket,
And not on the chair.

Not in the cabinet.
Not over there.

I'm going crazy:
Is it anywhere?

Grepping

grep “Ryan” ./_site/*.html

Website for Phone Shopping and Comparison

https://www.gsmarena.com/

Accent Names

What’s up with this word

Besides its verbal use, 给, with the reading gei3, is also (roughly speaking) “near-obligatory case marker for indirect object”.

But 给 has at least one other use, as the example 把什么东西给烧了 demonstrates. The function of 给 here seems similar to the usage of 弄 and 搞 with complements like 对 and 好, e.g. 弄好/搞好 “improve; put right”.

I think there may be other nuances related to animate nouns, too. I’ll keep an eye out.

Inform release website template problem

In the released website, - the filename of the small cover image becomes /Users/maxwelljoslyn/Desktop/projects/ryan-quest-v2/ryanquest.materials/Small Cover.png - the filename of the large cover image becomes /Users/maxwelljoslyn/Desktop/projects/ryan-quest-v2/ryanquest.materials/Cover.png

In other words, these two absolute paths on my system just got leaked out in the release metadata. I don’t like that at all. I think that releasing an Inform game should instead make these metadata filepaths relative to the game.materials folder, i.e. they should simply be “Small Cover.png” and “Cover.png”.

Corpus of Chinese Recordings

There’s some website I’ve used before which contained a bunch of people speaking topolects (fangyan) or reading MSM with a topolect accent. Can’t find the thing now, of course.

Shortcut to Open Firefox and Turn on Wifi

2019-08-08

A while back, in my OS preferences I set F3 to open my text editor.

However, individual OS apps can intercept function keys and perform behavior with them instead. This means my shortcut only worked in apps that didn’t bind F3, or in Finder.

I experimented with Karabiner and other apps, got tired of looking into keybindings, and did other things.

Today, a little improvement: after I switch to my editor with F3, pressing F3 now runs custom code which opens Firefox, and turns on the Wifi if it’s off.

Linguistics Experiment

Everything on this page is unfinished, or has at least failed to wash its hands. This one is especially guilty.

Assemble a group of speakers who speak Language X, in which bare nouns (cat) are not morphologically altered by pluralization.

“Bare nouns … pluralization” means “nouns sound the same whether or not you are talking about a single noun, or several of those nouns.” US English mostly does not qualify, with exceptions for a few special cases like sheep.

Standard Mandarin (MSM) qualifies, and probably so does every other Chinese language.

Ex 1 Noun Phrase US English

cat- cat-SG ‘cat’

cat-s cat-PL ‘cats’

*cat- cat.SG / cat.PL ‘cat’ / ‘cats’

Modern Standard Mandarin (MSM) mao cat.SG / cat.PL ‘cat’ / ‘cats’

*? mao-men cat-PL ‘cats’ This is USUALLY starred; at best, it’s marked. Explicit pluralization of animate nouns is AFAIK technically always possible in MSM, but only nouns that refer to humans regularly take the “-men” suffix. End Ex

Emacs Command

When using helm-find-files, type C-s to grep the file under the cursor (or all highlighted files.)

Excessive Feet

MDBG claims that ju4 “excessive” is a Chinese reading for 足. I’ve never seen that character read as anything but zu2 “foot”. I wonder where the ju4 reading comes from and where I can find an example.

Bitwise Mask

from Wikipedia: common bitmask functions

Masking bits to 1

To turn certain bits on, the bitwise OR operation can be used, following the principle that Y OR 1 = 1 and Y OR 0 = Y. Therefore, to make sure a bit is on, OR can be used with a 1. To leave a bit unchanged, OR is used with a 0.

Example: Masking on the higher nibble (bits 4, 5, 6, 7) the lower nibble (bits 0, 1, 2, 3) unchanged.
    10010101   10100101
 OR 11110000   11110000
  = 11110101   11110101

Masking bits to 0

More often in practice bits are “masked off” (or masked to 0) than “masked on” (or masked to 1). When a bit is ANDed with a 0, the result is always 0, i.e. Y AND 0 = 0. To leave the other bits as they were originally, they can be ANDed with 1, since Y AND 1 = Y.

Example: Masking off the higher nibble (bits 4, 5, 6, 7) the lower nibble (bits 0, 1, 2, 3) unchanged.
    10010101   10100101
AND 00001111   00001111
  = 00000101   00000101

Querying the status of a bit

It is possible to use bitmasks to easily check the state of individual bits regardless of the other bits. To do this, turning off all the other bits using the bitwise AND is done as discussed above and the value is compared with 1. If it is equal to 0, then the bit was off, but if the value is any other value, then the bit was on. What makes this convenient is that it is not necessary to figure out what the value actually is, just that it is not 0.

Example: Querying the status of the 4th bit
    10011101   10010101
AND 00001000   00001000
  = 00001000   00000000

Shortcuts

macOS / OS X: open a minimized window: (1) Command + Tab until you get the app’s icon. (2) Release Tab; keep holding Command. (3) Hold Option. (4) Release Command and Option. From here.

Gimp: “Shift-q” is Quick Mask. While selecting, use quick mask to paint areas into or out of the selection, by painting in black or white.

Quotations

For storing quotes which are not selections from books I’ve read (for those, see here.

2020-02-09T21:40:56-0800

Music is your own experience, your thoughts, your wisdom. If you don’t live it, it won’t come out of your horn.

Charlie Parker
2020-02-08

these [wires] were usually smoked by being passed through the flame of a candle or lamp so that they would not shine and thus be seen.

Edgar Howard Penrose, Descriptive Catalogue of the Collection of Firearms in the Museum of Applied Science of Victoria (Melbourne: Trustees of the National Museums of Victoria, 1949), 70; plagiarizing, as pointed out here, Miller Christy, ‘Man-traps and Spring-Guns,’ The Windsor Magazine, Vol. 13, 1901, from Museum Victoria supplementary file 21734 – Arms – Spring Gun – Flintlock

Ffmpeg

‘Roughly the same result can be achieved with “ffmpeg … < /dev/null” but it requires a shell.’

Is the “shell” part about using /dev/null for input, because the shell is doing the redirection? When would you be running the ffmpeg executable but not running a shell?

2019-06-26: sniff

Do you smell that? No doubt it about it: there are broken mental models around here.

Convert old D&D notes from below into Inform logic/mechanics

Could be a good amount of generalizabilty in there!

Switching Pronouns and Proper Names

Suppose I have the sentence.

“Though he was rude today, Bob was not as rude as he had been yesterday.”

And I want to end up with

“Though Bob was rude today, he was not as rude as he had been yesterday.”

Assuming that there is always only one proper name in the sentence, and that both pronoun references are to the proper name, I want to:

The Promise: Part W

If you were transformed into a wooden cylinder,
transported to the highest point of your current location,
and dropped so that you rolled,

would you like where you ended up?

Habitat for Humanity Webpage Improvement

2019-11-20

Last time I checked, the Chinese version of the Habitat for Humanity (HFH) website contained many sections which were naively translated directly from English, with no knowledge whatsoever of Chinese vocabulary or grammar. [2020-01-24: They use a machine translation service to translate their page on demand, with mixed results. Some of the resulting text is perfect; some is acceptable if stilted; and some is the worst literal translation I’ve ever seen. English that happens to be written with Chinese words, or the nearest equivalent. I sent HFH an email explaining the issue and offering some pointers, but have not heard back from them as of 2020-01-30T10:12:39-0800.]

Flavorgame

You’ve overlooked all the colors of flavor: all 16 million of them!

D, 2019-07-16

(To be precise, (162)3 = 256^3 = 16,777,216 colors, if we’re talking about RGB colors with two hex digits to specify each channel, e.g. FFAABB.)

There’s a connection here with wagon wheels.

Needs two hands free: (set a counter to 0, incrementing on each subsequent turn) “You grasp the red wagon wheel between your thumb and forefinger. With the other hand, you peel off its wax paper backing.

You pull back your lips, baring your teeth like a horse, and open a pinprick of space between your teeth.

After bringing the wagon wheel to your lips, you take a nibble fit for a fly."

Nothing feels different.

(return control) (after their next turn) (check the counter; it’s 1)

You catch sight of the clock on the other side of the platform.

It’s stopped!

/ Allow a couple turns of exploration (on turn 5)

“Partner, you look like you’re [italic]wheeling[roman]! You been hitting the durbz?”

An indigo cube is floating behind you, with its vertices at top, bottom, and midway along its height. One vertex points straight at you.

On each face of the cube, stenciled black capitals read “1 CUBIC FOOT.”

/ Wheeling? / Durbz? / What exactly did I just eat? / What the hell are you? / [Look at clock again]. -> Still stopped. / [Eat more of the red wagon wheel.]

“Durbz are durbz, no matter the dose,” Cubic Foot says, in a tone which indicates it has rehearsed this phrase.

Hakyll Tips

I don’t want to use Hakyll forever, but while I’m still stuck with it, see the file aherrmann-hakyll-tips.txt (not you, Reader: this is a note for me) for some useful code, copied from Aherrmann.

Emacs Lisp - Registers and Window Configurations

How can I ensure I save something (e.g. a window configuration) to an empty register, without having to check all ASCII characters in order to see whether I’ve already saved something to that register?

Inventory Implementation

Consider writing functions which generate an inventory characteristic of a given NPC which can be run to produce their inventory when they are first created. Such functions could then be re-used to describe the possible kit for allied NPC types, such as when a player is searching for hirelings.

Some inventory contents, as well as slots on the body, could be integrated into dynamic descriptions of a character.

Dynamic Description

We could use this toy function to provide a basic textual description of a character.

(defn describe [char] (concat “This is a” (:sex char) " " (:race char) “. In its hands are” (right-hand-contents char) " and " (left-hand-contents char) “.”))

If we call this function on the data representation of a male bugbear carrying a crossbow and a torch, it would return “This is a male bugbear. In its hands are a crossbow and a torch (lit).” Underlined items are those which were chosen based on the bugbear’s data.

Observations Depend on the Observer

Description functions such as this one would need more complexity to serve a real game, but that can be handled in the future. What interests me most is the possibility of specializing a describe function so that the description of the observed entity depends on the observer’s powers of observation!

Here’s an example. Suppose there is an in-game sword which is curved in a distinctive style only used by Spaniards. Suppose further that this model of sword is recognizable as such by certain people: those with a Swordsmithing skill; those who are from the Spanish region where the technique originates; and those who have Diplomacy skills related to Spain. Then the description of the sword could be simply “sword” to those who do not have the knowledge, and “Spanish curved sword” to those who do have the knowledge.

2019-04-05: Since authoring this note, used Inform 7, an authoring tool for interactive fiction in which it is simple to vary text descriptions with the stats or characteristics of the observing entity. Agent-based simulations are also a natural fit for Inform, as long as one keeps the number of actors small, so I’m using it for some other things now too.

Interaction with Economy

If the above sword was looted, and the looter sold it at the market, should the economy program recognize it as a “sword” or as a “Spanish curved sword?”

Nowhere near implementation on this, so I can simply say for now that if the character knows the sword’s true nature, it can be sold for the specialty price. Otherwise it is sold as the generic equivalent (such as undifferentiated “earthenware” for a fine clay pot.)

The rule of shared information: :theory:

To the WHOLE group of characters who are present and whose players are present, the BEST knowledge of the scenario is communicated, as perceived by the character with the most aptitude for perceiving the scenario details in question. E.g. if a group is traveling with a character who has strong hearing, unless there is curently a cost to communication, such as in combat when talking costs AP or as in any tense scenario where noise or wrong moves could mean discovery, then the player is informed of the effects of their special hearing such that the whole group is aware of the information and can act as if the strong-hearing character has communicated it to them.

Item descriptions :implem:

An item’s description could have multiple levels. This would allow the character-accessible description of the item to vary depending on their perceptiveness.

creating

(defun mk-human
  [name]
  (assoc (six-scores 'basic) :name name)
  [name social-type]
  (assoc (six-scores social-type) :name name))

Actions

On every turn, a list of game actions is available to each character. The exact contents of the list change over time, and depend on character-specific factors such as:

Everything that a player chooses to do must ultimately be expressed in terms of game actions, and chosen in the game’s interface. The desire to “move over those rocks and attack the bandit” would be input as “_move_ to hex 1010, 1011, 1012, and then attack the human male bandit in hex 1013.” In that example, move and attack are the game actions which are then resolved.

Equipment Slots

When an item is equipped, that item takes up a particular one of the character’s equipment slot. Unequipping frees that slot up again. Some items have slots of their own, which the character (or others!) can access. For example, a belt can be equipped at one or both of the waist and shoulder slots. Each belt gives the character three belt-mount slots, allowing the belt to be used for its main purpose of stowing things for quick retrieval. In turn, a scabbard can be equipped to one of the new belt-mount slots, which, in return for taking up the belt-mount, gives the character a equipment slot specialized for stowing swords (perhaps of some particular type.)

Maximal Usage of Data Structures to Represent In-Game Concepts :implem:

not just in-game objects, but also things like spells (which represent in-world effects) e.g.
(defspell [caster-lvl]
    {:name "Fire Ray" :targets (min 10 (+ 1  caster-lvl))}) ; i.e. a MAX of 10, which would be how the "English interpreter" would describe it

English Interpreter :implem:unf:

For generation of human-facing documentation from regular data structures such as spells or items, it would be useful to have functions for converting basic lisp expressions into English.

I would call such a thing “Englisp.” That’s my idea, folks: don’t even think about stealing it, or I will put you in jail. Warning: not-quite-real code ahead.

(defun describe (form)
    (case
        (cdr form)
            ('min)
                (concat "the smallest of:" "\n- " (describe x for each x in the body)
            ('caster-level)
                ("the caster's level"))))

(describe (min 1 caster-level))

In this case, caster-level is just a symbol that needs to be made user-readable in an Englishy way. Down the line, it could be evaluated in terms of the logged-in user’s player character, so that you could see immediately how many targets are reachable if you yourself were to cast the spell. This ties into some of my earlier thinking about a webpage for the Sneaking rules where the values used in the calculations would be dependent on what levle you chose in the sidebar “variable adjuster” for the page. The rules have examples built in, but unlike a paper rulebook, the examples can be shown to apply to your character RIGHT NOW.

Scope of Variable Names and Sequence of Execution in Inform “now”

To improve the mood of (character - an animal):
    if the mood of character is less than friendly, now the mood of the character is the mood after the mood of the character.

2019-11-05: I am not sure whether or not the statement “the mood after the mood of the character” wraps around. That is to say, I am not sure whether the above code would “improve” the character’s mood from the best one possible to the worst. I would hope it doesn’t do that. Will have to investigate.

The if statement above can be translated into pseudo-Clojure as follows:
(let [current-mood (:mood character)]
    (if (< current-mood friendly)
        (assoc :mood character (succ current-mood))))
        ;;assuming the moods have an interface sort of like Haskell Enum typeclass
        ;; 'set KEY in MAP to VAL' is spelled `assoc` in Clojure

I Want My Emacs SGML Text-Wrapper

If I define the function

(defun mj/sgml-tag-and-advance ()
    (interactive)
    (sgml-tag)
    (forward-char))

and run it in the mode where I intended to use it, markdown-mode, it works fine: point ends up between the two tags, where the textual body of the tag should go.

However, if I run it when the major mode is emacs-lisp, it does not function properly. Point ends up after the opening bracket of the closing tag.

Why?

Is it because of an interaction with emacs-lisp mode – or by some feature of my configuration which emacs-mode activates, e.g. paredit?

Spider-Man

“It’s dark outside, and I’m Spider-Man,” said Spider-Man. “I am here for those of you who have suffered from CRIME.”

“The person who crimed us is Stan Lee!”

“It can’t be,” lamented Spider-Man. His web-shooters flexed. His butt clenched. “It can’t be.”

But it was.

Take Yourself Into Battle

You’ve gotta take yourself into battle.

You’ve gotta do your sick moves – every last one, even if it kills you. But you can’t let it kill you, because you’ve gotta win. You’ve gotta

Kill.
That.
Elf.

I don’t care how afraid you are, or how pissed your pants are, or how good you are at fighting in the gaseous-metal atmosphere of this planet: you’ve gotta do it anyway, you’ve g-o-t-t-a KILL THAT ELF. You’re gonna put on your elf-fighting suit and ride into battle, and if you retreat, so hel me Space God, I will shoot you myself.

The (Best) Way to Make a User-Defined Emacs Keybinding ALWAYS Be Defined Regardless of Major Mode, Minor Mode, Phase of Moon, etc.

I’m 90% sure that Xah Lee has written about this. Probably other people, such as Steve Yegge, have as well. Reviewing others’ code will show me how to accomplish the task, while editing and extending their code will make the resulting work my own. What’s more, typing it all in by hand will train me in recognizing the patterns as I go.


  1. 5 pounds, in the form of 2 2.5-pound plates, is typically the smallest increment available for a barbell.

  2. The core of all “periodic” (i.e. non-linear) progression is to work up to a new maximum poundage, reset to something well below it, and work your way back up while trying to achieve higher reps on weights below your max. The 5-3-1 program is a good example.

  3. In Chinese linguistics, this term (natively 补语) refers to words which, aside from their normal usage, can also be suffixed to verbs (or VOs) to express the result of the verbal action. Some of them, when used this way, have the same meaning as when used on their own, e.g. 懂 means “understand”, and 看懂 means “look-understand”, i.e. “understand by reading/watching”. Other words take on new meanings when used as complements: 起来, which on its own is a verb meaning “rise up”, means “begin doing” when used as a complement. Don’t confuse the term “complement” here with the same word from the broader study of syntax; there, it usually means “argument selected by a head.” (I won’t link the Wikipedia page here: as of 2019-11-20, it’s not well-organized, and gives space to “traditional grammarianism” alongside a mangled, wishy-washy stab at linguistics.)

  4. Roughly: letter which comes first alphabetically gets the tone mark, except for a few regular exceptions, such as the vowel combo in “xiōng”.

  5. This language might be either general-purpose or “domain-specific;” it might be self-hosting or it might be a dialect inside another language. And isn’t a programming library just a collection of new words in a familiar language? Ones with commentary, and notes on usage, and perfectly explicit definitions?

  6. Setting aside questions of integers vs floating-point numbers and other such things.