Some comments on Toki Pona script

There is one official Toki Pona orthography, which is the one based on the lowercase Latin alphabet. There are two others: sitelen pona, the script, and sitelen sitelen, which looks like Mayan hieroglyphs. For instance, ale li jo e tenpo (everything has a time) renders in sitelen sitelen as the rather large: And this is rendered in sitelen pona as ale li jo e tenpo. Radicals in sitelen pona are an interesting idea. »

Daniel K Lyons

Various J expressions

Decreasing sequences It occurred to me that I could think of two ways to generate a decreasing sequence. The built-in i. will do this: i. _7 6 5 4 3 2 1 0 But I could see a way to do it with self-reference $: or with iterate ^:: (<:^:*^:a:) 7 7 6 5 4 3 2 1 0 This essentially says “iterate gathering results” ^:a: “while non-zero” ^:* “decrement” <:. »

Daniel K Lyons

Collatz in J

We can improve slightly on the Collatz examples of Chapter 10 of Learning J by noting that, while taking a function power of infinity produces the fixed-point, taking a function power of boxed infinity (or simply the empty box) also gives us back the intermediate values. Let’s start by bringing back the function itself: collatz =. -:`(1 + 3 * ])@.(2&|) To review briefly, we can treat f`g@.t as »

Daniel K Lyons

Newton's Method

Let’s talk about ΩeΩ = 1. Here’s a great blackpenredpen video about calculating this value: This got me thinking about J, because it has some interesting “adverbs” for doing these sorts of calculations. For starters, there is a built-in numerical derivative operator D., and the power adverb, which has a note that giving an infinite power computes the limit. I think of it as a fixed-point operator: it repeatedly feeds the output back in as an input until the input and output are equal, which is a fixed point. »

Daniel K Lyons

Some Books about Religion

The following books have made an impression on me and my beliefs. Biblical Literacy by Rabbi Joseph Telushkin. This book gives you a synopsis of the bible, and Telushkin draws your attention to the moments and ideas that are important in Judaism. In a similar vein, How to Read the Jewish Bible by Marc Brettler, also surveys the content of the Bible and helps to put it into a modern Jewish perspective. »

Daniel K Lyons

Radio Networking

I’ve been investigating radio networking a bit lately for a side project I’m thinking about. This summarizes what I’ve learned. Different radio networking technologies in the hobbyist space have a fundamental tradeoff between range, bandwidth and power usage. Increasing range or bandwidth tends to increase power usage. So one has to ask questions like, how much data do you want to exchange on your network, at what rate, how far apart are they, and will your devices be powered. »

Daniel K Lyons

Bisecting a List

How would you chop a linked list in half? A trivial approach would be to just get the length of the list and then walk the list building a first-half copy by tracking the indexes until you get to half that length. Thinking about it, I realized you could use the tortoise-and-hare approach from Floyd’s cycle detector to find the middle of the list: walk the list item-by-item and every-other-item at the same time; when the every-other-item list is exhausted, you’ve found the middle: »

Daniel K Lyons

Stack Overflow is Not Welcoming by Design

Stack Overflow is going through some kind of asshole midlife crisis and this blog post is the corresponding spiritual Mustang GT. Don’t be fatuous, Stack Overflow. Your culture is the way it is because of your rules. It’s not an accident that oh-my-stars we just peeked under the rock and discovered last week. Your rules created this monster. What is the overriding principle of Stack Overflow? It’s that questions (and answers) have differing value. »

Daniel K Lyons

How it Went Badly

Addendum The architect at my work recently handed a prototype he build to me and I was instructed to maintain it. In so doing, I have found a nice little parable here about how things can go wrong and how it can spiral out of control. Also, let’s spit on Hibernate. »

Daniel K Lyons

SQL Is Not The Problem

This is adapted from a comment I left on Hacker News. Why don’t we replace SQL with some other, better query language, perhaps something “equally powerful” like get name, age -> (foos.id X bars.foo_id) |> get first(name) |> head? Part of the point of SQL is that the database may choose to satisfy your query in a very different manner than you might expect given the procedural reading. The example query is a nice illustration; a modern relational database may move project/select steps earlier in the processing as long as it doesn’t change the declarative meaning. »

Daniel K Lyons