RSSAmplifier

Blog

(proclaim λ)

//blog.macrolet.netRSS feed ↗10 posts

Latest posts

How to use Stylus to stay sane

Stylus (formerly known as Stylish) is a browser extension to apply custom CSS stylesheets to any website you might want to alter. This a fantastic capability, which allows you to remove unnecessary clutter and otherwise give control back to you, the user. Let's walk through this using the Twitter website as an example. As of 2021 you'll normally see a "Trends" and "Who to follow?" block on the…

Capturing JVM TLS traffic for SBT

Today I've had to dig deeper into some problem authenticating against an HTTPS API. This client was sending Basic Authentication information following a 3XX redirect, which then would make the second server (well, S3 really) return a 400 Bad Request, since it's refusing to deal with more than one authentication method at the same time. This is all and good, but debugging what was actually being…

Docker and Redis from scratch

Docker is ubiquitous in many projects and therefore it may be useful to dig into more detail about its inner workings. Arguably those aren't too complicated to build a smallish program that does the essentials in a few hours. The CodeCrafters challenges focus on exactly this kind of idea, taking an existing tool and rebuilding it from scratch. Since they're currently in Early Access, I've only had…

Testing with Scala

After working with Scala for a while now, I thought it would be good to write down a couple of notes on my current testing setup, in particular with regards to which libraries I've settled on and which style of testing I've ended up using. Tests end up in the same package as the code that's tested. A group of tests are always in a class with the Tests suffix, e.g. FooTests . If it's about a…

Scala Macros to the Rescue

Did you know Scala has macros? Coming from Common Lisp they serve pretty much the same purpose, doing things that the (plethora of) other language features don't support and to shortcut the resulting boilerplate code. And even the S-expressions can be had when macro debugging is turned on, though the pretty-printed Scala code is arguably much more useful here. Why would you realistically use them…

Act! Heuristics for determining intent.

I wrote down a little scenario for myself for the next iteration of act : mark "http://www.google.de" with mouse (selection -> goes to x11 buffer-cut) listen on those changes and show current context and choices press+release "act primary" key -> runs primary action immediately (or) press "act" key once -> opens buffer for single character input to select choice buffer captures keyboard, after…

DBus and PolicyKit from Common Lisp

Intro Regardless of your position on DBus, sometimes you might need to interact with it. Common Lisp currently has at least two libraries ready for you, one of them is in Quicklisp , https://github.com/death/dbus/ . Setup Have it loaded and create a package to use it, then change into it. ;; (asdf:load-system '#:dbus) ;; or ;; (ql:quickload "dbus) ( defpackage #:example ( :use #:cl #:dbus ) ) (…

Lisp shell semantics

Continuing from an earlier post , what might the semantics be that we'd like to have for a more useful shell integrated with a Lisp environment? Syntax Of course we can always keep the regular Common Lisp reader; however it's not best suited for interactive shell use. In fact I'd say interactive use period requires heavy use of editing commands to juggle parens. Which is why some people use one of…

Keyboard protocol #2

Now in fact there are still reasons we need key codes that are different to the eventual text representation, e.g. for cursor movement and other special characters like function keys. Looking at the Xorg source code now, there's a relatively fixed notion of what a keyboard can actually do. I suspect that conceptually a somewhat backwards-compatible extension would be to have a new dedicated kind…

Keyboard protocol

The keyboard protocol is still using the same approach as roughly since the start of computing: The keyboard is a dumb device, reporting each mechanical button that's pressed. The computer is the intelligent device, translating those into characters. There are some attempts that have made it into various places, e.g. there's a flag in the USB HID protocol to indicate the physical layout, be it US,…