RSS Amplifier

Blog

tautology.town

See you 'round; tautology.town 🐸

tautology.townRSS feed ↗10 posts

Latest posts

A few reasons to like Ruby

Ruby is my favorite programming language. I have worked in Python, Javascript (Typescript also), and Go. I have written C, C++, Java, and Racket. Consistently, Ruby is the language I enjoy the most. I like Ruby because it feels “good in the hand”. It is hard to explain, as are all matters of taste, or beauty. I believe Ruby ought to be appreciated like anything else well crafted, the way people…

What do Visa and Mastercard do? An intro to card networks

Most people can recognize the Visa and Mastercard brands. Chances are, you use one of their cards to transact every day. You may have some notion that most places (in the US) take both, but some places only take Visa (e.g. Costco), and vice versa. So what do they do? Here’s Visa’s attempt to answer that question. A few things they don’t do 1 : They aren’t the company that issues the card. Those…

Money: a constructivist approach

When I was younger, I thought that money was cash. In this view, if you went to a bank and deposited a dollar, at the end of the day, the dollar would be placed neatly next to a stack of gold bricks, in a vault deep beneath the bank. If you sent a wire, the dollar (or another like it) would be aboard an armored car the next day to the receiving bank. An armored plane if you paid for same day. Of…

How do React hooks associate functions with state?

How do React hooks know which component instance is being called, without being passed a stable identifier? There are many high quality answers online. For me, they either focus too much on React internals ( Fibers , render cycle , ReactFiberHooks ), or are too high level ( “it’s just arrays” , closures, call order). Here is an answer, written for and by me: React stores state for a component…

Doing things ten times

I observed lately that there aren’t many things that I’ve done ten or more times. Ten is low enough to be reasonable, but is high enough that it takes some intention to get to. For example: I estimate that over my life I’ve baked 6 pies: 2 blueberry, 2 apple, and 2 pumpkin (arguably a tart). This was surprising to me, since I consider myself a casual yet decent baker of pies. Decent enough for…

Learning how to charcoal grill

I got a charcoal grill. A portable, no-frills, Weber Jumbo Joe . It is a cute, round, and pleasingly-shaped little thing. You can get one used very cheaply. Contrary to its name, “Jumbo” Joe is one of the smaller grills you can get. (Smaller yet is “Smokey” Joe. Who is Joe?) There was a Reddit comment I saw that just made me get up and go do it, which I had been hemming and hawing about before. I…

Notes on watering houseplants

Overwatering and underwatering have similar symptoms, but an overwatered plant is much harder to save. Overwatering causes root rot which dries out plants. A good cadence to water is often every two weeks, or even less. Water when poking a finger into the soil feels dry or the leaves are curling up. Instead of watering a little bit all the time, fully water your plant when it’s dry. This means…

DOM clobbering 1Password to fix syntax highlighting

TLDR; Add this to your site if 1Password’s browser extension is breaking syntax highlighting : <a hidden id= "Prism" ></a><a hidden id= "Prism" name= "manual" ></a> Skip to the breakdown , or read on. Backstory About two weeks ago, I noticed that this blog’s code syntax highlighting stopped working. This blog ( tautology.town ) uses Jekyll , which comes with Rouge syntax highlighting out of the…

Learning about IP address routing

One question I had for a long time: What makes a destination IP address authoritative? I know you can spoof sending a message as a different IP address , but even if your ISP didn’t prevent you, you wouldn’t receive a response because it would be routed to the actual location of the address you spoofed. This had me wondering: What prevents a destination IP address from being spoofed? How do we…

Ruby's object model: eigenclasses, metaclasses, and more

Or, a Class class masterclass. One way or another, a famous question will cross every Rubyist’s mind, probably many times: what’s an eigenclass? In the Ruby docs, there’s a tremendous diagram under the page for class Class that made me think of this again: Classes, modules, and objects are interrelated. In the diagram that follows, the vertical arrows represent inheritance, and the parentheses…