RSSAmplifier

Blog

Robey

robey.lag.netRSS feed ↗34 posts

Latest posts

Running the Gauntlet

TLDR: I made a small typescript-compiling front-end for the nodejs test runner: https://www.npmjs.com/package/@robey/gauntlet I’ve been on a quest to reduce dependencies in my nodejs projects, partly because of things like the left-pad incident and the debug/chalk incident , and partly because my ideal codebase is simple and organized. Deeply nested dependency trees of unknown provenance…

My Watchy OS

In the summer of 2021, I bought a Watchy : a hobbyist watch with a tiny (200x200 pixel, 4cm) e-ink screen, an ESP32 processor (plus separate real-time clock chip), 4 buttons, a step-counting accelerometer, and 200mAh battery. I was doing a lot of ESP32 coding at work, so the idea of writing my own watch software sounded like fun, and the ESP32 is pretty powerful: tons of memory, bluetooth/wifi…

Setting up a CI server for Forgejo

I recently got CI working with my personal forgejo instance, and thought I would share how I did it. It’s not that hard, but has a few confusing quirks, and all the tutorials I found online were wrong, outdated, or both. They also tend to include a few pages of steps you don’t really need for a small instance. Background : Forgejo is a “software forge” – a way to host…

Bizcat - an 8x16 bitmap font

Bizcat is a retro 8x16 bitmap font, intended for hobby computers or terminals that use a 640x480 graphics mode, like the Linux VGA console. It supports most of Latin-9 and box-drawing glyphs. It’s available to use under the Creative Commons “share and adapt” license, so feel free to tweak it or use it in your own projects. An image file in BMP format and a Linux console PSF file…

The Year of the Linux Laptop - Darter Pro Review

Background I started using Linux in the early 1990s, first as a toy, and gradually as my primary/only OS. Aside from the cute Solitaire game, Windows 3 didn’t really appeal to me, while Linux had native support for the internet and a development environment that would let you write networked programs that could do several things at once through multitasking – a world of possibilities,…

Interaction

I’ve been reading more and more blog posts of the “please don’t interrupt me” variety, from yesterday’s post by Zach of Github about communicating over text back to Paul Graham’s essay on meetings to the under-appreciatied Peopleware (from 1987!). Just so you don’t get the wrong idea, I agree with all of these sentiments. In fact, usually I think…

How to add numbers (part 2)

Last time , I explained how adders work in CPUs, and one nice trick for speeding them up. Be sure to read part 1 before diving into this! Generation and propagation In 1958, some sharp fellows named Weinberger & Smith hit the carry ripple problem from a different angle. Even if you don’t know what a column’s carry-in will be yet, you can make some assumptions about what will happen: A…

How to add numbers (part 1)

A few weeks ago, probably due to my recent Arduino and D-CPU obsessions, I started thinking about with this topic: How do modern computer CPUs add numbers? I took classes on this in school, so I had a basic understanding, but the more I thought about it, the more I realized that my ideas about how this would scale up to 64-bit computers would be too slow to actually work. I started digging around,…

C++ quirks, remembered

Remember how annoying it was to try to get anything done in C++? Typing reams of boilerplate and fighting mysterious compiler errors that need to be fed through c++filt to make any sense of them? Or maybe those days have faded into the rose-tinged past, when we were “real” programmers, who ran through the gauntlet just to prove we could. It’s been over five years since I did any…

Mensch 2.0

I recently picked up one of the new “retina” Macbooks, and it looks incredible. There’s nothing magic about the hardware – they simply doubled the number of pixels in each dimension, as you can read about in this arstechnica review of Mountain Lion. But the scaling effect on text is beautiful. Here’s what it looks like blown up 8 times: That’s a lot of pixels.…

Why Config?

When I first started playing with scala in 2008, I was dismayed by the state of server configuration in the java world. A lot of java servers were still using property files, or worse, XML. XML is meant to be easily parsed by computers, but is really hard for humans to read and edit, and tends to hide useful information in baroque syntax and line noise. The python world was still clinging to…

Dissolving patterns

I forget where I first read about this meme, but I’ve been appreciating it more and more over time: Once a programming pattern achieves widespread use, languages start to absorb it into their structure. Object-orientation is a pattern in C, because you have to use a library like gobject to implement virtual method calls, and you have to write code to that library’s conventions. In…

Why AT&T Deserves To Fail

AT&T is a very large, very old company. It’s so old, it has the stock ticker symbol “T”. That’s right, just “T”. It’s so large, the US government tried to break it up into a half dozen smaller companies 25 years ago, and ultimately failed. But history is filled with very large, very old institutions that eventually failed: the Roman empire, the Dutch East…

Mensch -- A coding font

The latest MacOS release (10.6, or “Snow Leopard”) comes with a new monospace font. It’s called “Menlo” and it’s a slightly modified form of the standard Linux font (with appropriately weightly Linux name) “DejaVu Sans Serif Mono”, which is itself an updated form of Bitstream Vera Sans Mono. Apple’s modifications are a definite improvement to…

A very tiny, monospace, bitmap font

Long ago, when making an SSH client for a phone, we needed the tiniest possible monospace font we could find that was still basically legible. Brian Swetland – who was also the instigator of this side project – had made a 4x6 font (3x5 usable pixels) for a Palm Pilot VT100 emulator . Here’s what it looks like, blown up four times: When I first tried it out doing things like…

More real-world git

Git is really confusing for new users who have come over from subversion or perforce. On one hand, I can admire, in a sort of detached objective way, Linus’s commitment to making the tool bare-bones and focusing on trying to make the command-line tools as fast as possible. On the other hand, many of the defaults are maddeningly obscure, and there are large gaps where the the starship’s…

Fanout queues in kestrel 1.2

I bumped kestrel to version 1.2 this week and there are a few new features: Queue files are loaded at startup time now, before opening the listening port. You can explicitly abort an outstanding transcational GET by passing the /abort option (in the same way as /open or /close ). You can also peek at the current head item on a queue with /peek . New options max_item_size and sync_journal . Queues…

Follow-up on Scala on Android

Dan Bornstein had a correction about my guesswork on how dx works, and I got permission to post it here. I said: The end result is a little wasteful: even a tiny “hello world” app is 800K, probably because of that big ol' scala library. I suspect dex is proactively throwing away classes that I didn’t use, or it would be even bigger. Dan replies: Actually, dx doesn’t do any…

Actors talk for SDForum

Last night I got to give a short talk at SDForum on “solving real problems with actors”, or more specifically, why I got interested in using scala actors, how they’re used in naggati and kestrel, and what I learned about where they’re useful and not. It was fun, even though I was a little nervous – they had me speaking after Carl Hewitt, one of the instigators of the…

Performance bug in kestrel 1.1

If you’re using (or have tried to use) kestrel 1.1, you should upgrade to 1.1.1 ( in github ) for a performance fix. Kestrel uses naggati , an actor-adapter for mina , to handle I/O and session management. Mina is a java library for handling thousands of open connections across NIO, and naggati converts mina events from java-style “listener method calls” to actor messages. I…

Sidekick LX party

When Nick, Evan and I stumbled out of “Star Trek” at the Metreon last night, it was 1am. Nick announced that there was some kind of party at the Mezzanine, and Jack was there, but it seemed pretty late, and my iPhone said there was a final bart train in 10 minutes, so I decided to clock out and go home. Nick and Evan went on to the club. All 4 bart entrances on Market around Powell…

Does anyone actually use JMX?

In java 5 update 6, or 1.5.0_06, or whatever goofy release naming scheme they’re using now, there’s a cool replacement for jconsole called “visualvm”. (On my mac, it didn’t come with the installed java, but it can easily be downloaded .) It cleans up jconsole a little bit, and merges in some of the other tools. You can monitor, take heap snapshots, and even do an…

Actors, Mina, and Naggati

A few weeks ago, Jorge Ortiz gave a good talk at BASE about actors. I want to summarize a bit of that and explain why I wrote naggati, and why I think mina-plus-actors is a big deal. The history In the 90s, we server coders wrote daemons using the fork/exec process model. Apache still does it this way, though you can switch to threaded models in the current version. Having a bunch of processes…

Paramiko is on github now

A story A few years ago, at Danger, I wrote an SSH client for the Hiptop (or Sidekick) phone, which we gave away to developers for free as a demonstration of our API and the cool things you could do with it. Later, the developer program would be effectively shut down, and the app would be renamed “Terminal Client” and sold to hapless users for $10. But I didn’t know that yet. The…

Scala on Android

Chris DiBona gave me a free G-phone after an open-source talk last week (thanks!) with the admonishment that I write an app for it. I’m going to give it an effort, at least! My first task was to figure out the scala-android build process, because that will make coding much easier. Turns out to be easier than the instructions I found online, so I thought I’d share. You don’t have…

Java SE6 on Leopard

I could not find this anywhere on google in one place, but I pieced it together from clues Steve found by poring over a half dozen other blogs. To get Java 6 to run on Leopard, you must go into /System/Library/Frameworks/JavaVM.framework/Versions and blow away the Current and CurrentJDK symlinks. Make them point to A : $ sudo rm Current CurrentJDK $ sudo ln -s A Current $ sudo ln -s A CurrentJDK…

Scarling » Kestrel

Ever since we deployed scarling in production, its name has progressed from being a stale joke to an annoyance. It started out as a test of porting starling to scala, but as features have been added and it’s been hardened by the real world, it has needed its own identity. I wanted to stay with the bird theme, because I think it’s cute, so after spending several days mulling over…

Coder Dvorak

Some kind of bug was spreading around at work a few weeks ago and got me interested in alternate keyboard layouts again. Several of my co-workers use Dvorak, which never really interested me. But Evan pointed me to a page on “programmer dvorak” and suddenly my interest was piqued. Dvorak rearranges the letter keys so that letters used more frequently in english are closer to the home…

OS X Leopard JNI Link Error

I just spent a long time tracking this down, and nobody else on google had ever reported a solution. So I’m posting this so the next person wit h this problem can find this post. If you see this error when linking something in JNI: $ gcc -dynamiclib -o libDirectorySyncer.jnilib target/c/dsync.o -framework JavaVM ld: framework not found JavaVM it’s because leopard has messed up your JDK…

CJC Prime Number Sieve

Apologies in advance. This is probably the geekiest post I’ve ever done. To get an SSH client working – with a reasonable response time – on a 200mhz ARM chip a few years ago, I had to optimize some crazy things. One of those things was the generation of prime numbers, which are needed to create new public keys. You may have heard that it’s very difficult to factor large numbers.…

Git for the real world

Now that we’ve been using git at Twitter for a couple of months, we’ve overcome several crippling problems and misunderstandings about how to use it properly. There are dozens of “intros” and “tutorials” to git online, but at some point you need to know more than just the basics of DVCS and the map to svn commands – you need to know practical…

Git gripes

I have to get this rant off my chest. Why does git insist on making up new terminology for features that are in all DVCS, and already have commonly accepted names? Last week during a presentation, I almost choked when someone showed off a git feature where you can temporarily shelve uncommitted changes. It’s called “git stash”. Stash?! Mercurial and bazaar at least agree that…

Scarling

I recently spent bits of my free time porting Starling to scala, and thought I’d post the story here in case anyone else finds it enlightening or interesting. Starling is a simple, reliable message-queue server written in ruby. It uses MemCache protocol, so almost any language can already speak to it. You can set up multiple starling servers, and just like a memcache pool, the servers…

Scala infatuation

Why my recent infatuation with scala? (Actually, since it’s reaching a half year, I guess it can no longer be called an infatuation.) Here’s my answer in the form of a quick example. I want to determine the average of a list of timings for something. In python: timings = [1.2, 1.5, 1.3, 1.5] reduce(lambda a, b: a + b, timings, 0.0) / len(timings) In ruby: timings = [1.2, 1.5, 1.3, 1.5]…