A Few More Shavian Notes

A few other things occurred to me.

A major benefit: Tragedeigh naming is basically impossible. Is it Cate or Kate? Itโ€™s ๐‘’๐‘ฑ๐‘‘. I also kind of like that you can see visually the irritating rhyming of my daughterโ€™s friends names: ยท๐‘ง๐‘ค๐‘ฐ-ยท๐‘จ๐‘ค๐‘ฐ-ยท๐‘จ๐‘›๐‘ฐ, ยท๐‘ง๐‘ค๐‘ฐ๐‘จ๐‘ฏ๐‘ฉ-ยท๐‘ญ๐‘ฎ๐‘ฐ๐‘จ๐‘ฏ๐‘ฉ-ยท๐‘ญ๐‘›๐‘ฐ๐‘จ๐‘ฏ๐‘ฉ.

If you want to practice, there is a very nice addon for Firefox to convert a page to Shavian, in total or by replacing N (25, 50, 100, 200,โ€ฆ 500) common words. I donโ€™t recommend trying to read a Wikipedia page about phonetics with โ€œauto translateโ€ enabled but otherwise it seems to be super useful.

In fact, a significant problem of learning another orthography like this is going to be that I have spent my entire life reading English text without sounding it out. My brain has a lot of experience. A more logical orthography might be a huge improvement, but beating decades of familiarity with another one is going to take time. This approach seems like a brilliant one, because you build up experience in a similar manner; as you get used to seeing common words mixed in with English text, hopefully you just get familiar quickly. Or maybe it backfires because your brain can fill in lazily from context. I guess time will tell.

The IPA/Shavian correspondences สŒ-๐‘ณ, สŠ-๐‘ซ and u-๐‘ต seem like a bit of a missed opportunity. I think IPA already had สŒ (Shavian ๐‘ณ) before Read came up with the scheme, but I donโ€™t know whether he was aware of it or cared. Not a huge deal either way.

There is actually a distinction which used to be phonemic that is not preserved in Shavian, which is the w/wh distinction, (in IPA, w/ส). Sometimes people exaggerate this (โ€œa hwale is in trouble!โ€), but the distinction evidently still exists in some places, but probably not where Read was working on Shavian. So you canโ€™t distinguish witch and which in Shavian writing.

July 24, 2025






The Shavian Alphabet

Iโ€™ve been spending some time the last few days learning the Shavian alphabet. Thereโ€™s a great learning application at shavian.app.

Whatโ€™s the point of this? I mean, fun mainly. One point of this alphabet is to have an actually phonetic (or phonemic to be precise) representation. English has a lot of phonemes, but not a lot of agreement on what they are or how theyโ€™re realized; Wikipedia doesnโ€™t give an exact number but lets you add 24 consonants to as few as 14-16 vowels for the General American dialect or as many as 20-25 vowels in the Received Pronunciation, yielding as few as 38 or as many as 49 distinct phonemes, meaning we are missing symbols for between 12 and 23 phonemes, depending on how you count. Are there benefits to writing what we actually say?

Before seeing this particular attempt, I sort of assumed it couldnโ€™t possibly work because the sounds of Indian English differ substantially from American or British English. I am singling out these three because you can make a strong argument that any of these should form the basis of a new English spelling standard: Indian, because it has the most speakers; British, because it is the original recipe; American, because of cultural imperialism. None of these would be very satisfying.

Shavian addresses the problem by being overtly phonemic and basing pronunciation on words. This idea is not that far from the idea of lexical sets. The original definition from 1982 yields 27 phonemes, and this table shows the agreement between these and Shavian:

Keyword RP Phone GA Phone Shavian character Character name Examples
KIT ษช ษช ๐‘ฆ if ship, sick, bridge, milk, myth, busy
DRESS e ษ› ๐‘ง egg step, neck, edge, shelf, friend, ready
TRAP รฆ รฆ ๐‘จ ash tap, back, badge, scalp, hand, cancel
LOT ษ’ ษ‘ ๐‘ช on stop, sock, dodge, romp, possible, quality
STRUT สŒ สŒ ๐‘ณ up cup, suck, budge, pulse, trunk, blood
FOOT สŠ สŠ ๐‘ซ wool put, bush, full, good, look, wolf
BATH ษ‘ห รฆ ๐‘จ ash staff, brass, ask, dance, sample, calf
CLOTH ษ’ ษ” ๐‘ช on cough, broth, cross, long, Boston
NURSE ษœห ษœr ๐‘ป err hurt, lurk, urge, burst, jerk, term
FLEECE iห i ๐‘ฐ eat creep, speak, leave, feel, key, people
FACE eษช eษช ๐‘ฑ age tape, cake, raid, veil, steak, day
PALM ษ‘ห ษ‘ ๐‘ญ ah psalm, father, bra, spa, lager
THOUGHT ษ”ห ษ” ๐‘ท awe taught, sauce, hawk, jaw, broad
GOAT ษ™สŠ oสŠ ๐‘ด oak soap, joke, home, know, so, roll
GOOSE uห u ๐‘ต, ๐‘ฟ ooze, yew loop, shoot, tomb, mute, huge, view
PRICE aษช aษช ๐‘ฒ ice ripe, write, arrive, high, try, buy
CHOICE ษ”ษช ษ”ษช ๐‘ถ oil adroit, noise, join, toy, royal
MOUTH aสŠ aสŠ ๐‘ฌ out out, house, loud, count, crowd, cow
NEAR ษชษ™ ษชr ๐‘ฝ ear beer, sincere, fear, beard, serum
SQUARE ษ›ษ™ ษ›r ๐‘บ air care, fair, pear, where, scarce, vary
START ษ‘ห ษ‘r ๐‘ธ are far, sharp, bark, carve, farm, heart
NORTH ษ”ห ษ”r ๐‘น or for, war, short, scorch, born, warm
FORCE ษ”ห or ๐‘น or four, wore, sport, porch, borne, story
CURE สŠษ™ สŠr ๐‘ซ๐‘ผ wool, array poor, tourist, pure, plural, jury
happY ษช ษช ๐‘ฆ if copy, scampi, taxi, sortie, committee, hockey, Chelsea
lettER ษ™ ษ™r ๐‘ผ array paper, metre, calendar, stupor, succo(u)r, martyr
commA ษ™ ษ™ ๐‘ฉ ado about, gallop, oblige, quota, vodka

You can see from the chart there are only a few examples that are not distinguished by Shavian, but having separate characters for rhotacized vowels seems clever to me, since they should occur in relatively predictable ways but can be pronounced with or without the R sound. I think itโ€™s worth appreciating the cleverness of this approach, which prefigured lexical sets by a few decades, and yields an alphabet uniquely suited to English despite the plethora of local realizations of its large and fairly unique phonetic set.

Using Shavian, I am made pretty aware my accent and how it differs from the Received Pronunciation. For instance, when I say the word โ€œbeenโ€ it rhymes with โ€œbinโ€ and not โ€œbean.โ€ The words โ€œcaughtโ€ and โ€œcot,โ€ I pronounce the same, but if I imagine a British accent I can sort of imagine how the sounds differ. There are some standardized โ€œspellingsโ€ for words that requires one to think in RP, or at least an accent with more vowels than my American accent affords, although using or not using standard spellings seems not to be a contentious issue within the tiny Shavian user community.

I think the majority of L1 English speakers are probably unaware of some of the phonemes. The obvious ones that come to mind are ฮธ/รฐ. Itโ€™s not easy for me to guess which one I am using in a given word, and as far as distinct phonemes, there are not that many minimal pairs for this set (ether/either seems to be one of the few). I think most L1 English speakers think of this as โ€œthe TH soundโ€ and wouldnโ€™t do much better than me at guessing without a finger to their throat which they are using in a given word. Another example might be the word โ€œthink,โ€ which phonetically contains what we English speakers would call โ€œthe -ing sound,โ€ in Shavian you have to encode that but if you were thinking in terms of the normal Latin spelling you wouldnโ€™t realize it.

I have frequently said that English suffers from an overabundance of shwa sounds. I think now that isnโ€™t technically correct. Shavian helps show that what Engish does have is an abundance of vowels, and consequently many are not that different, and/or located near the middle. Itโ€™s fun to click around the vowel chart on Wikipedia and try and find one that doesnโ€™t have an entry for some form of English; I didnโ€™t find one but didnโ€™t do an exhaustive search.

Aesthetically speaking, itโ€™s pretty good looking, especially at first blush. Itโ€™s distinctive, itโ€™s cool that there are 48 characters we can distinguish without picking up the pen. It doesnโ€™t really look like anything else. Another plus is that the name would make one think it was designed by an Armenian, which it certainly wasnโ€™t. Itโ€™s quite wise, in my opinion, to use certain letters as single-glyph words (for โ€œthe,โ€-๐‘ž โ€œto,โ€-๐‘‘ โ€œare,โ€-๐‘ธ โ€œfor,โ€-๐‘“ โ€œand,โ€-๐‘ฏ and โ€œofโ€-๐‘). The sound-shape correspondences are interesting but not necessarily super helpful for remembering sounds. Most alphabets (Inuktitut is an exception) donโ€™t have every possible permutation of each shape. In my five-day-old opinion, some of the shapes are not easy to write. I have noticed, as others have, the funny fact that the glyphs for โ€œhโ€ and โ€œngโ€ are in the voiced and unvoiced categories respectively, which seems wrong, although the decision was apparently intentional. I donโ€™t think itโ€™s worth litigating these things, although they are curious. For instance, youโ€™re better off learning Esperanto than Ido even though Ido is probably โ€œbetterโ€ in various ways, because itโ€™s better to just pick something and get the community going around it rather than constantly nit-picking, creating minor refinements, and fracturing the community along the way.

An interesting benefit is that overall, text typically takes about 1/3rd less space to write in Shavian. Hereโ€™s an example:

  1. ๐‘ด ๐‘•๐‘ณ๐‘ฏ ๐‘ ๐‘•๐‘๐‘ฆ๐‘ฎ๐‘ฆ๐‘‘!
  1. O Son of Spirit!
๐‘ž ๐‘š๐‘ง๐‘•๐‘‘ ๐‘š๐‘ฆ๐‘ค๐‘ณ๐‘๐‘ฉ๐‘› ๐‘ ๐‘ท๐‘ค ๐‘”๐‘ฆ๐‘™๐‘Ÿ ๐‘ฆ๐‘ฏ ๐‘ฅ๐‘ฒ ๐‘•๐‘ฒ๐‘‘ ๐‘ฆ๐‘Ÿ ๐‘ก๐‘ณ๐‘•๐‘‘๐‘ฆ๐‘•; The best beloved of all things in My sight is Justice;
๐‘‘๐‘ป๐‘ฏ ๐‘ฏ๐‘ช๐‘‘ ๐‘ฉ๐‘ข๐‘ฑ ๐‘ž๐‘บ๐‘“๐‘ฎ๐‘ช๐‘ฅ ๐‘ฆ๐‘“ ๐‘ž๐‘ฌ ๐‘›๐‘ฆ๐‘Ÿ๐‘ฒ๐‘ผ๐‘ง๐‘•๐‘‘ ๐‘ฅ๐‘ฐ, turn not away therefrom if thou desirest Me,
๐‘ฏ ๐‘ฏ๐‘ฆ๐‘œ๐‘ค๐‘ง๐‘’๐‘‘ ๐‘ฆ๐‘‘ ๐‘ฏ๐‘ช๐‘‘ ๐‘ž๐‘จ๐‘‘ ๐‘ฒ ๐‘ฅ๐‘ฑ ๐‘’๐‘ฉ๐‘ฏ๐‘“๐‘ฒ๐‘› ๐‘ฆ๐‘ฏ ๐‘ž๐‘ฐ. and neglect it not that I may confide in thee.
๐‘š๐‘ฒ ๐‘ฆ๐‘‘๐‘• ๐‘ฑ๐‘› ๐‘ž๐‘ฌ ๐‘–๐‘จ๐‘ค๐‘‘ ๐‘•๐‘ฐ ๐‘ข๐‘ฆ๐‘ž ๐‘ž๐‘ฒ๐‘ฏ ๐‘ด๐‘ฏ ๐‘ฒ๐‘Ÿ By its aid thou shalt see with thine own eyes
๐‘ฏ ๐‘ฏ๐‘ช๐‘‘ ๐‘”๐‘ฎ๐‘ต ๐‘ž ๐‘ฒ๐‘Ÿ ๐‘ ๐‘ณ๐‘ž๐‘ผ๐‘Ÿ, and not through the eyes of others,
๐‘ฏ ๐‘–๐‘จ๐‘ค๐‘‘ ๐‘ฏ๐‘ด ๐‘ ๐‘ž๐‘ฒ๐‘ฏ ๐‘ด๐‘ฏ ๐‘ฏ๐‘ช๐‘ค๐‘ฆ๐‘ก and shalt know of thine own knowledge
๐‘ฏ ๐‘ฏ๐‘ช๐‘‘ ๐‘”๐‘ฎ๐‘ต ๐‘ž ๐‘ฏ๐‘ช๐‘ค๐‘ฆ๐‘ก ๐‘ ๐‘ž๐‘ฒ ๐‘ฏ๐‘ฑ๐‘š๐‘ผ. and not through the knowledge of thy neighbor.
๐‘๐‘ช๐‘ฏ๐‘›๐‘ผ ๐‘ž๐‘ฆ๐‘• ๐‘ฆ๐‘ฏ ๐‘ž๐‘ฒ ๐‘ฃ๐‘ธ๐‘‘; ๐‘ฃ๐‘ฌ ๐‘ฆ๐‘‘ ๐‘š๐‘ฆ๐‘ฃ๐‘ต๐‘๐‘ง๐‘” ๐‘ž๐‘ฐ ๐‘‘ ๐‘š๐‘ฐ. Ponder this in thy heart; how it behooveth thee to be.
๐‘๐‘ง๐‘ฎ๐‘ฆ๐‘ค๐‘ฆ ๐‘ก๐‘ณ๐‘•๐‘‘๐‘ฆ๐‘• ๐‘ฆ๐‘Ÿ ๐‘ฅ๐‘ฒ ๐‘œ๐‘ฆ๐‘“๐‘‘ ๐‘‘ ๐‘ž๐‘ฐ Verily justice is My gift to thee
๐‘ฏ ๐‘ž ๐‘•๐‘ฒ๐‘ฏ ๐‘ ๐‘ฅ๐‘ฒ ๐‘ค๐‘ณ๐‘๐‘ฆ๐‘™-๐‘’๐‘ฒ๐‘ฏ๐‘›๐‘ฏ๐‘ฉ๐‘•. and the sign of My loving-kindness.
๐‘•๐‘ง๐‘‘ ๐‘ฆ๐‘‘ ๐‘ž๐‘ง๐‘ฏ ๐‘š๐‘ฆ๐‘“๐‘น ๐‘ž๐‘ฒ๐‘ฏ ๐‘ฒ๐‘Ÿ. Set it then before thine eyes.
โ€” ยท๐‘š๐‘ญ๐‘ฃ๐‘ญ๐‘ต๐‘ค๐‘ญ โ€” Bahaโ€™uโ€™llah
via The Hidden Words.

Where does this reduction come from? Iโ€™m not a statistics person but Iโ€™ll guess. Small words becoming one character or two is certainly a big help. Another significant help is that many small words have a lot of silent letters, โ€œthroughโ€ being the best example (it becomes ๐‘”๐‘ฎ๐‘ต, beating the slang โ€œthruโ€ by a character). On the other hand, there is no โ€œxโ€ character, so words like โ€œexistโ€ can actually become longer (โ€œ๐‘ฆ๐‘œ๐‘Ÿ๐‘ฆ๐‘•๐‘‘โ€). Probably in many cases, itโ€™s simply digraphs like โ€œshโ€ and โ€œchโ€ or dipthongs like โ€œouโ€ and โ€œerโ€ creating a small benefit across many words.

Thinking about Shavian reminded me of when my daughter was very young and very desperate to write. She would spell things โ€œphoneticallyโ€ wich yuzuly rezultid n smthin hahrd tu red. Would this have been easier? Itโ€™s twice as big, so maybe the alphabet would take twice as long to learn. But it is uniformโ€”apart from the distinctions mentioned earlierโ€”so after learning the alphabet, reading would be entirely a matter of practice, getting faster, and learning vocabulary. Thatโ€™s got to be worth a year or two of education.

A downside which only a great speller like myself would point out is that there is tremendous historical information in the way we spell things. The first part of the words โ€œfunction,โ€ โ€œfunnyโ€ and โ€œphoneticโ€ sound the same, but you can tell by looking that one comes from Greek and the others do not, and that the latter shares some meaning with words like โ€œphonographโ€ and โ€œtelephone.โ€ This information is purely written. But it also tortures students and led us here, where fixing spelling is a significant benefit of using a computer.

Shavian is unlikely to unseat Englishโ€™s Latin-based orthography, but it is fun, fairly easy to learn, unique looking, and has various advantages. Wide usage is not one of those advantages but perhaps it will increase! Itโ€™s probably a better spelling reform than just reintroducing รฐ and รพ.

July 23, 2025






I18n Puzzles, Day 2

This is the kind of problem where you could load the whole thing into Postgres and get the answer in about five seconds. In fact, letโ€™s try it:

postgres# create table i18n_day2 (input timestamp with time zone);
CREATE TABLE
postgres=# \copy i18n_day2 from /i18np/input.txt
COPY 1758
postgres=# select input at time zone 'UTC', count(*) from i18n_day2 group by input at time zone 'UTC' having count(*) >= 4;
      timezone       | count
---------------------+-------
 20XX-YY-ZZ HH:MM:SS |     4
(1 row)

I decided to censor the output a little bit and I didnโ€™t handle the formatting properly there because thatโ€™s not really the point.

Suffice to say, this is kind of a non-problem in languages with time zone support. Unfortunately, neither J nor APL have time zone support in the standard library, so weโ€™ll have to figure it out on our own.

The first problem is that we have to parse these dates: 2019-06-05T08:15:00-04:00. These happen to be fixed-width. There are snappier ways of parsing but I decided to narrow in on this element of it.

My plan here is to handle the date+time part first, since there is a library built-in for this (todayno and todate, which seem like they should be inverses of each other but are not some reason). We can parse the time into a similar structure and expand it using expand. Then we add them, or actually subtract them (I realized this a little late).

I felt like I wanted to see a fork of the form f + g since the idea is to parse most of the timestamp and then the offset. The amount of work to handle a fixed-width format was not insubstantial, but I came up with these functions:

   dp =. (_ 2 1 $ 0 4 5 2 8 2 11 2 14 2 17 2) 0&".;.0 ]
   tp =. 0 0 0 1 1 0 #inv (_ 2 1 $ 19 3 23 2) 0&".;.0 ]

These two functions parse the date part and time part. Probably bad names. The key idea about using ;.0 is to take a substring of a given length at a given offset. So starting from 0 with length 4 gets us the year, this is the 0 4; then we get the month from offset 5 length 2, which is 5 2 which comes next. All six of the chunks of data we need are thus specified by the 12 items in the list; we convert these into an array of 6 2x1 vectors with $. This feeds the subarray ;.0 verb. Weโ€™re adding in 0&". to parse numbers; regular ". runs J code, but we just want the values.

The ever-friendly and wise elcaro on the J channel of the APL Farm Discord suggested using these predicates instead:

Nats =: '1234567890'&(i. ".@:{ ' ',~ [)
Nums =: '1234567890._ '  ".@:{~ '1234567890.-' i. ]

Which was really tempting since you can then do all the parsing with this kind of expression:

   t =. '2024-08-01T08:15:03-03:15'
   19 (Nats@{. , Nums@}.) t
2024 8 1 8 15 3 _3 15

Which is really hot, but I insisted on doing it the hard way for some reason.

Now my plan is to โ€œnormalizeโ€ the timestamp, by converting this from a 6 item array to an internal date and back, and then throwing it into a printing function. First the printing function:

   require 'format/printf'
   
   dt =. '%04d-%02d-%02dT%02d:%02d:%02d+00:00' vsprintf

Nothing interesting here. Now my goal is to avoid boxing and pass lines through a function which does the work here. That function will do the โ€œnormalizationโ€ I mentioned above:

   norm =. [: dt 2 todate 2 todayno dp - tp

Thereโ€™s the fork I was thinking about. I read another article (about ray tracing in J) which explained that the cap [: is about converting a dyadic function to a monadic one for forks.

The use of [: is a little weird to understand, but it is basically a no-operation left argument to ensure that the verb is evaluated as a function of one argument instead of two.

This seems like a decent explanation. So the idea here is to handle the time zone data with the date part, convert that to a day number, then convert that back to a date, then format it. The conversion handles the possibilities of negative times and whatnot.

Another approach would have been to instead convert the first number to a โ€œday numberโ€ and then convert the hour and minute values to fractions of a day. In trying that, I saw odd behavior so I decided this might work alright.

OK, so now we have the verb that will parse, but we still need to actually do the puzzle. The first piece is to use norm;._2 fread <filename>. Using norm with ;._2 is how weโ€™re going to avoid boxing; weโ€™ll get an array of normalized timestamps instead of boxed strings or whatever. But the puzzle question is to find the times that appear most frequently. This is not all that different from the word frequencies problem. So I wound up using key /. with length # on the normalized timestamps, sorting by that, and applying that sort order to the nub ~. of the timestamps. Taking the first item of that list yields the timestamp we are interested it:

   {. (~. nm) \: #/.~ nm =. norm;._2 fread 'test-input.txt'

And this is our solution. The entire thing is:

   require 'format/printf'
   
   dt =. '%04d-%02d-%02dT%02d:%02d:%02d+00:00' vsprintf
   dp =. (_ 2 1 $ 0 4 5 2 8 2 11 2 14 2 17 2) 0&".;.0 ]
   tp =. 0 0 0 1 1 0 #inv (_ 2 1 $ 19 3 23 2) 0&".;.0 ]
   norm =. [: dt 2 todate 2 todayno dp - tp
   {. (~. nm) \: #/.~ nm =. norm;._2 fread 'input.txt'

June 2, 2025 j






Relational Thinking in J

According to Aaron Hsu, the starting point for APL programming is the relational model.

Iโ€™m mixed on this, because I donโ€™t think J has a natural concept of table, actually. Moreover, it seems like your code gets littered with head {. and constant-powered { lookups if you do represent data in a tabular format, with heterogeneous rows. I could be wrong, but it seems to work better in general when you have homogeneous arrays. Creating weird packets of data like we do in other languages just doesnโ€™t seem to be the ticket here.

Suppose you design a table like this:

developer name email
alice
bob
calvin
delilah
ellen

You will probably wind up using 0 { or 1 { to take it apart to do different things with the different columns. So I would probably build this table in J like so:

   developers =. 'alice'; 'bob'; 'calvin'; 'delilah'; 'ellen'
   devemails =. 'a@example.com'; 'b@example.com'; 'c@example.com'; 'd@example.com'; 'e@example.com'

This is maybe a column-oriented view of the world. You can recover the table pretty easily though:

   developers ,. devemails
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚alice  โ”‚a@example.comโ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚bob    โ”‚b@example.comโ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚calvin โ”‚c@example.comโ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚delilahโ”‚d@example.comโ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ellen  โ”‚e@example.comโ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Projection is sort of obvious now, you have to choose the columns you want because you donโ€™t have the table, as it were. Selection isnโ€™t so bad; you are going to filter on a certain column and apply that filter on the other column. Letโ€™s find the developers with an โ€œaโ€ in their name:

   developers #~ 'a' e."1> developers
โ”Œโ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚aliceโ”‚calvinโ”‚delilahโ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

The same selection works on the other column, and you can still stitch together columns to make a table:

   devemails #~ 'a' e."1> developers
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚a@example.comโ”‚c@example.comโ”‚d@example.comโ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

   (#&developers ,. #&devemails) 'a' e."1> developers
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚alice  โ”‚a@example.comโ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚calvin โ”‚c@example.comโ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚delilahโ”‚d@example.comโ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Joins work by doing lookups by index. Letโ€™s introduce another table:

project name lead developer
alphago calvin
bitbucket ellen
cafeteria delilah
diffie alice
entryway bob
finality alice
grace delilah
homelab calvin

Following the earlier example we get this:

   projects =. 'alphago'; 'bitbucket'; 'cafeteria'; 'diffie'; 'entryway'; 'finality'; 'grace'; 'homelab'
   projdevs =. 'calvin'; 'ellen'; 'delilah'; 'alice'; 'bob'; 'alice'; 'delilah'; 'calvin'

   projects ,. projdevs
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚alphago  โ”‚calvin โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚bitbucketโ”‚ellen  โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚cafeteriaโ”‚delilahโ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚diffie   โ”‚alice  โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚entryway โ”‚bob    โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚finality โ”‚alice  โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚grace    โ”‚delilahโ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚homelab  โ”‚calvin โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

We can find the email of the developer for each project like so:

   (developers i. projdevs) { devemails

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚c@example.comโ”‚e@example.comโ”‚d@example.comโ”‚a@example.comโ”‚b@example.comโ”‚a@example.comโ”‚d@example.comโ”‚c@example.comโ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

This might be easier to read as a table, so letโ€™s do that:

   projects ,. projdevs ,. devemails {~ developers i. projdevs
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚alphago  โ”‚calvin โ”‚c@example.comโ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚bitbucketโ”‚ellen  โ”‚e@example.comโ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚cafeteriaโ”‚delilahโ”‚d@example.comโ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚diffie   โ”‚alice  โ”‚a@example.comโ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚entryway โ”‚bob    โ”‚b@example.comโ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚finality โ”‚alice  โ”‚a@example.comโ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚grace    โ”‚delilahโ”‚d@example.comโ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚homelab  โ”‚calvin โ”‚c@example.comโ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

So thereโ€™s some basic relational-type stuff in J. Is this the right approach? I donโ€™t know.

Edit: Notes from the chatroom from elcaro:

You want to be a little bit careful when dealing with boxes, because unboxing a boxed array will create fills. When you do 'a' e."1> developers, your right arg is a 5ร—7 character vector

   quote"1 > developers 
'alice  '
'bob    '
'calvin '
'delilah'
'ellen  '    

If you looked for developers with a Space in them, youโ€™d match all except โ€˜delilahโ€™. You can unbox each, and so compare each unbox string by itself ('a' e. ])@> developers 1 0 1 1 0

Which is fine, but might be hard to put into a larger tacit expression, as you need to explicitly refer to left arg in that inner expression. Something else you can do is use Spread (S:) or Level-At (L:) where appropriate. I donโ€™t use these much, but S:0 often pairs nicely with e. or E., where you want to match some unboxed string to a list of boxed strings

'a' e.S:0 developers 1 0 1 1 0

This new operator is often easier to put into a larger tacit expression (if desiered) Spread and Level are a little like the Depth modifier in BQN โš‡ (and proposed in APL โฅ) in that it modifies operators to perform on nested data. The Nuvoc pages are a little lacking, but play with them and youโ€™ll get a hang of what they do Spread - NuVoc Leval-At - NuVoc Depth (operator) - APL Wiki Depth - BQN docs

Oh one more thingโ€ฆ you can do

(#&developers ,. #&devemails) 1 0 1 1 0

as

(developers ,. devemails) #~ 1 0 1 1 0

May 28, 2025 j






My thoughts on the CES Letter.

My friend Bill recommended I read CES Letter. I found it pretty hard to put down, and read the whole thing over the last couple days. I thought it was worth reflecting on the ideas in it from the point of view of a Bahaโ€™i.

I havenโ€™t mentioned it on my blog yet for various reasons, but I declared myself a Bahaโ€™i in October 2023. So I now belong to a Faith about the size of Mormonism (although much smaller in the US). I have been met with quite a bit of understanding and maybe a little puzzlement. But this seems like a good context to talk about it, because any faith should be able to withstand the kinds of questions Jeremy Runnells asks of his former faith. Why not start with the controversial stuff? At least you wonโ€™t think Iโ€™m being fatuous.

Before going too far down this road, I want to make it clear Iโ€™m not going to bag on LDS believers. Bahaโ€™uโ€™llah says โ€œConsort with the followers of all religions in a spirit of friendliness and fellowship.โ€ Reading the CES Letter, I felt a lot of sympathy for Jeremy and others like him: good and decent people trying to adhere to Godโ€™s wishes, whom I have no doubt are worthy of and will receive an ample share of Godโ€™s blessings. And furthermore, Iโ€™m just a random Bahaโ€™i and a guy who has read some books; I donโ€™t speak from authority about anything, let alone the Bahaโ€™i Faith.

The CES Letter is concerned with a number of topics: the verity of the foundational texts, the legitimacy of Joseph Smith Jr and the line of authority starting with him, the legitimacy of his witnesses, certain difficult or troubling teachings, and the Churchโ€™s attitudes towards historicity, fact, belief, emotion and the general reconciliation of reason with, letโ€™s say, shortcomings in those categories.

There are analogs in some of these areas to the questions that are asked of the Bahaโ€™i Faith. In Mormonism, the question about the texts has to do with their historicity and legitimacy. In the Bahaโ€™i Faith, we have a large number of writings that are untranslated. Both religions have gone through succession crises and wound up with basically one real movement and a few tiny groups of sectarians. Neither is especially progressive about LGBTQ issues, and both have a kind of membership status that can be imperiled by transgressing certain behavioral standards including this. Both have a concept of infallibility, a word that makes my skin crawl a bit and probably yours too.

Probably the most basic difference is that the Bahaโ€™i Faith requires you to figure things out on your own. While you may be born into a Bahaโ€™i family and may get a Bahaโ€™i education, in the end, itโ€™s completely your personal decision. When you declare, at least in the US, you fill out an online form; if you withdraw, you click a button on the same site. Youโ€™re not going to get harassed about it. You can attend Bahaโ€™i gatherings as a Bahaโ€™i or just a friend; declaring and undeclaring does not imperil this. Nothing is really at stake if you reject the Faith. The benefits of being a declared Bahaโ€™i are simply that you can donate money, participate in the electoral process and take part in the internal discussion part of the 19-day meeting (โ€œfeastโ€). Nobody believes that you are going to hell or otherwise going to suffer some kind of penalty in the afterlife. Similarly, the Bahaโ€™i behavior standards are for Bahaโ€™is. If you have not declared, they obviously do not apply to you, and nobody will think less of you for drinking or whatever. Anyone can use the Bahaโ€™i prayers, read the Bahaโ€™i books, believe in any part of it or none of it; it is for everyone equally.

Based on the CES Letter, it sounds like for Mormonism, the important thing is that you feel it is true, and this is called a testimony. Based on this, youโ€™re supposed to accept everything. The outcome for Jeremy was extremely difficult. Itโ€™s not a good look for the LDS church, in my opinion.

Now, infallibility gives me and most Americans hives because we find it impossible to imagine that someone could never have made a mistake about anything. The combination of infallibility with two known-invalid translations and a third whose source is not available kind of beggars belief. For Bahaโ€™is, the combination of infallibility with a large corpus of untranslated text at first sounds like a minefield. I have only read a small portion of what is available, because despite it being a fraction of what exists, itโ€™s still enormous. In doing this reading, what I came to realize is that generally when something is said and I have trouble with it, when I ponder it, I come to see how it fits with everything else. Though there is a vast amount of writing, the majority of it closes in on the same themes repeatedly: the unity of mankind, the unity of religion, the unity of the world. It is tremendously optimistic. Having read as much as I have, my fears about what remains untranslated have reduced a lot. Bahaโ€™uโ€™llah didnโ€™t sit around holding forth on every possible topic. He talked about the same things repeatedly with many different people, using different kinds of language.

In the light of unity, I see infallibility as primarily serving the role of bringing about unity by proscribing intense, schism-causing debate. In this perspective, Bahaโ€™uโ€™llah gave leadership to Abduโ€™l-Bahaโ€™ and declared his infallibility so that there would not be schism from different people trying to usurp the religion. (Many tried anyway.) The same story repeats with Shoghi Effendi. In neither case were they empowered to add new things to the religion, only to explain. Each of these were small succession crises in comparison to Shoghi Effendiโ€™s death and the formation of the UHJ. But even there, enough groundwork had been laid that the vast majority of people came along to the Bahaโ€™i Faith we have today, and only a small splinter group was created (mostly living in Roswell, NM, of all places). There are only a few examples people have found where Abduโ€™l-Bahaโ€™ appears to say something contrary to science; the most prominent one is probably this one:

Question: What will be the food of the united people? Answer: As humanity progresses, meat will be used less and less, for the teeth of man are not carnivorous. For example, the lion is endowed with carnivorous teeth, which are intended for meat, and if meat be not found, the lion starves. The lion cannot graze; its teeth are of different shape. The digestive system of the lion is such that it cannot receive nourishment save through meat. The eagle has a crooked beak, the lower part shorter than the upper. It cannot pick up grain; it cannot graze; therefore, it is compelled to partake of meat. The domestic animals have herbivorous teeth formed to cut grass, which is their fodder. The human teeth, the molars, are formed to grind grain. The front teeth, the incisors, are for fruits, etc. It is, therefore, quite apparent according to the implements for eating that manโ€™s food is intended to be grain and not meat. When mankind is more fully developed, the eating of meat will gradually cease.

On the one hand, we have an evolutionary explanation for why we have incisors: tearing meat, probably. But the question isnโ€™t about where we have come from, itโ€™s about where we are going, and virtually everyone can agree that eating more meat is probably worse for us. Evolution tells us where you came from, it doesnโ€™t necessarily tell you where youโ€™re going; giant pandas have incisors too, but only eat bamboo.

In the Bahaโ€™i Faith, science and religion are complimentary because one tells you where you have been and the other where you are going; one tells you how things are and the other tells you why. As Bahaโ€™uโ€™llah says: โ€œKnowledge is as wings to manโ€™s life, and a ladder for his ascent. Its acquisition is incumbent upon everyone.โ€ While there is an emotional, experiential dimension to the Bahaโ€™i Faith, it is not to override reason. This does not appear to be the case in the LDS church.

On the question of LGBTQ issues, we have about the same in the Bahaโ€™i Faith as in the other major Abrahamic religions: a definition of marriage as being between a man and a woman and that sexual relations are to be limited to this union. Bahaโ€™uโ€™llah made a very oblique mention of pedophilia in the book of laws; Shoghi Effendi expanded this to homosexual relations. I canโ€™t reconcile myself to Shoghi Effendiโ€™s interpretation, but he certainly did not have the power to add something new to the writings or abrogate something completely in order to arrive at another solution. In the interest of unity, I can only acquiesce to it. There are LGBTQ Bahaโ€™is, as well as Muslims, Catholics and Jews; I think Bahaโ€™uโ€™llah certainly did not want us to construct our identities on the basis of our preferences, and this is simply one of those tests for us, especially Americans who are accustomed to equating the satisfaction of our desires with the good. The matter is, in my opinion, somewhat overstated, because the Faith does not really permit us to categorize people into โ€œgoodโ€ and โ€œbadโ€ categories (or โ€œin-groupโ€/โ€œout-groupโ€ or any other dichotomy) on any basis. If you are discriminated against by a Bahaโ€™i, they have failed to fulfill their obligations to Bahaโ€™uโ€™llah to create unity.

Unlike Mormonism, we simply donโ€™t have questions about the accuracy or authenticity of our religious texts. Also unlike Mormonism, we get to have the benefit of most other religionโ€™s texts. The validity of our translations are sometimes questioned. The Arabic of The Bรกb and Bahaโ€™uโ€™llah were not exactly normative; Modern Standard Arabic wasnโ€™t yet really formalized and their styles are idiosyncratic and have a lot of Persian influence. The Bรกbโ€™s writings were only intended to last a short period of time and are written in a very dense style for people highly acquainted with the Qurโ€™an; translating the bulk of them into English has not been a high priority. Those interested in knowing more about His writings should probably read Gate of the Heart. I donโ€™t know the precise reason why much of Bahaโ€™uโ€™llahโ€™s writings havenโ€™t yet been translated. I suspect that the reasons are simply because A) there is so much to translate, B) Shoghi Effendi translated what he considered important for us, and there is a general trust in his decisions, C) not much trust in our ability to do an equally good job, D) the funds are better spent in other ways, and E) a lot of Bahaโ€™uโ€™llahโ€™s writings are direct correspondence with believers and others, so may be repetitive in toto or not particularly general. These are just my speculations.

The historicity claims of the LDS church are pretty integral to the entire enterprise. If Joseph Smith didnโ€™t really find hidden tablets, if the tablets arenโ€™t true, then the rest of his revelation is probably false, which is what provides the impetus for their being an LDS church at all. Would the Book of Mormon be worth reading if it were an out-and-out forgery? The context surrounding it makes it difficult for non-Mormons to take seriously, and the Book of Abraham and Kinderhook Plates are obviously forged. Is there still value in reading and studying these books? Iโ€™m not in a position to say. Much of the Hebrew Bible is either unverifiable or false from a historical perspective; the majority of Jews donโ€™t see a problem with this and find that the ideas are still useful and worth studying. Most of Jesusโ€™s words are in the form of parables, which means we know that their โ€œtruth valueโ€ in the sense of logic is false, but their โ€œtruth valueโ€ in the sense of spiritual teachings is quite large. On the other hand, it is the truth value of the LDSโ€™s teachings that gave the LDS church racist teachings, promoted polygamy and conversion therapy, several of which were abrogated only recently.

The Bahaโ€™i Faith has some historicity problems of another sort. The obvious one is that if all religions are one, why are they so different from one another? The Bahaโ€™i perspective is that there are core teachings that are the same for all religions, which have been promoted by the Manifestations of God in all eras and all regions; the details differ because the locality and era might demand different emphasis, or perhaps just due to the passage of time and meddling by religious authorities (a favorite target of Bahaโ€™uโ€™llahโ€™s). This seems pretty workable for the Abrahamic faiths that preceded it but raises problems about Eastern religions that do not have obvious solutions. Consider this question about Confucius and Buddha:

Buddha also established a new religion and Confucius renewed the ancient conduct and morals, but the original precepts have been entirely changed and their followers no longer adhere to the original pattern of belief and worship. The founder of Buddhism was a precious Being Who established the oneness of God, but later His original precepts were gradually forgotten and displaced by primitive customs and rituals, until in the end it led to the worship of statues and images.

Itโ€™s quite difficult to look at the Buddhism we have today and see how Buddha could possibly have been talking about the oneness of God when there are no Buddhisms today that talk about God. Moojan Momen wrote a lengthy article about the interface between the Bahaโ€™i Faith and Buddhism centered around the 8-fold path. But itโ€™s unlikely that a Buddhist would be interested in hearing from us that they were originally monotheists. But Buddhism is so old and the original writings long gone, so what we have here from Abduโ€™l-Bahaโ€™ is basically untestable. His interpretation of Buddhism as worshipping images would be offensive to Western Buddhists. But Iโ€™m not in a position to judge whether it is true elsewhere; my sense is that Buddhism in the West is rather different from Buddhism in the East, where people actually visit Buddhist shrines and have them in their homes. But back to the point.

Faced with a particular instance of an infallible person saying something at least untestable but perhaps false, I could respond by just giving up on it. I could respond to the unacceptance of gay marriage by giving up on the Faith. I didnโ€™t though.

  1. There is not some slightly-tweaked form of the Faith out there that would resolve all these problems; thereโ€™s one Bahaโ€™i Faith.
  2. If there were, how would siding with some splinter group help working towards unity?
  3. There is not a place in the Faith where it says it is my job to judge people on the basis of their religion or sexuality or anything else. On the contrary, I am to accept everyone, show kindness to everyone, show violence to no one, speak ill of no one, etc.
  4. What we are trying to build is bigger; quibbling about this or that element creates more disunity rather than more unity.
  5. I can accept and show love to anyone, even if I canโ€™t change doctrine.

Whether Abduโ€™l-Bahaโ€™ is right about the historical Buddha, we will probably never know, but I donโ€™t think it undermines my religion. We have what we have today. Building bridges between Buddhism and the Bahaโ€™i Faith, that is something that matters today, moreover between Buddhists and Bahaโ€™is. Whatever their beliefs are based on, I still think we can learn something from them today. And itโ€™s the same with the LDS church. We can learn things about God, humanity, how to be a better person and so forth from Mormons, from Buddhists, from LGBTQ people, from atheists. And we should, and we have to.

So this my interpretation of infallibility: that it is more about unity than about being right about everything. Much like in a marriage, sometimes you have to set aside the question of who is right in order to be happy and have peace. Hopefully not all the time. The marriage is more important. It can be, anyway, ideally. But also like a marriage, itโ€™s hard to rebuild trust after a lot of lying. After having gone through the CES Letter, it feels like there is a little too much fabrication.

Overall, the CES letter is a great read. I recommend it to you whether you are an LDS member or not. I only disagree with one idea: โ€œEach religion has believers who believe that their spiritual experiences are more authentic and powerful than those of the adherents of other religions. They cannot all be right together, if at all.โ€

May 25, 2025 religion






Internationalization Puzzles in J, Day One

I just found out about these i18n puzzles and figured Iโ€™d take a crack at one in J. The first one is pretty easy. Iโ€™m also trying to apply my learning about linear algebra to the domain.

The crux of this puzzle is the following observation about a string:

  • For SMS, the byte count matters, and must be under 160 bytes
  • For Twitter, the character count matters, and must be under 140 characters

The input format is just a list of strings, and your mission is to calculate the cost. I glanced over this at first and made a mistake in my zeal to apply some really rudimentary linear algebra. Basically, I thought, letโ€™s convert the input into a big matrix, weโ€™ll have a byte count b1b_1 and a unicode length u1u_1 for each, and this will become our input matrix:

[b1<160u1<140b2<160u2<140b3<160u3<140]

This will become a matrix of 0s and 1s, which we can then just take the dot product by the costs matrix:

[$0.07$0.11]

The entire problem should reduce to something like this:

[00110110]โ‹…[$0.11$0.07]=[$0.00$0.18$0.07$0.11]

If I had done this step on paper or something, I would probably have figured out the mistake, but I didnโ€™t until later.

Letโ€™s translate that to J. First we need to read the file, which will be using input =. cutLF fread filename. This gives us boxed strings, which is fine. Now we need to use # to get the length and ucpcount to count Unicode characters. We can throw these together as a train with , to get both at once:

   (# , ucpcount) each input
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚162 143โ”‚138 136โ”‚253 140โ”‚147 141โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

These are the very values in the problem page, so this appears to be on the right track.

Then I hit a little snag with trains, because I wanted to write it like (160>:# , 140>:ucpcount) but this does not do what it feels like it should, on account of the strict left-to-right order. So I wrote it like so instead:

   >((160>:#) , 140>:ucpcount) each input
โ”Œโ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”
โ”‚0 0โ”‚1 1โ”‚0 1โ”‚1 0โ”‚
โ””โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”˜

   >((160>:#) , 140>:ucpcount) each input
0 0
1 1
0 1
1 0

Now we have exactly the matrix I expected to have, so letโ€™s try the dot product:

   (11 7) +/ .* |: >((160>:#) , 140>:ucpcount) each input
0 18 7 11

This is supposed to be 0 13 7 11? Oh right, in my excitement I forgot that I need to discount when theyโ€™re using both SMS and Twitter. I thought about this for a second and thought, I would really like to be able to index an array by another array. Iโ€™m not sure how that would work. But I also remember reading about a trick where you convert the two-dimensional index into a scalar by using encode #.. So instead of having a 2x2 table, we just have an array of length 4. In other words, 0 0 = 0, 0 1 = 1, 1 0 = 2, 1 1 = 3. Then I can encode the prices as 0 7 11 13, the price for nothing, a Tweet, an SMS, and both.

   (0 7 11 13) {~ 2 #. > ((160>:#) , 140>:ucpcount) each input
0 13 7 11

Now we can just make the entire solution:

   +/ (0 7 11 13) {~ 2 #. > ((160>:#) , 140>:ucpcount) each (cutLF fread'~/Downloads/test-input.txt')
31

And this solves the puzzle.

Edit: the helpful people on The APL Farm provided some advice. For starters, Time Melon points out that #. has a default left argument of 2, so we can simply remove the 2 there, and the parentheses around the prices can be removed, yielding this improvement:

   +/ 0 7 11 13 {~ #. > ((160>:#) , 140>:ucpcount) each input
31

Elcaro points out that each is creating boxes I am then removing, so we can simplify to this:

   +/ 0 7 11 13 {~ #. ((160>:#) , 140>:ucpcount) every input
31

or this; Iโ€™m undecided but leaning towards the shorter one because I didnโ€™t realize every was a thing:

    +/ 0 7 11 13 {~ #. ((160>:#) , 140>:ucpcount) &> input
31

Elcaro also noticed that Iโ€™m missing out on the obvious fact that >: is repeated inside the major transformation, so we can simplify it further to this:

   +/ 0 7 11 13 {~ #. (160 140 >: #,ucpcount) &> input
31

   NB. Or directly
   +/ 0 7 11 13 {~ #. (160 140 >: #,ucpcount) &> cutLF fread '~/Downloads/test-input.txt'
31 

And this appears to me to be the final form!

Edit: Elcaro makes another suggestion, pointing out that cutLF is not that different from <;._2, and so we can actually remove the boxing altogether and simplify the solution slightly further to this:

   +/ 0 7 11 13 {~ #. (160 140 >: #,ucpcount);._2 input
31

May 20, 2025 j