The personal website and blog of Daniel Long Sockwell, a lawyer-turned-programmer with an interest in web development, open source, and making things as simple as possible.
In addition to working on my Free Software projects and serving in leadership roles for the Raku programming language , I am also available for paid contract or consulting work on a freelance basis. I give preference to Open Source/Free Software projects but will consider non-Open-Source projects as well. My primary programming languages are Raku, Rust, and JavaScript; I will consider…
Brains sure are funny things. Or at least mine is; maybe I shouldn't speak for the rest of you. Last night, I posted a few thoughts on pattern matching in Raku . A bit later, I saw a reply to that post suggesting that it'd be nice to add better pattern matching syntax with a Slang . I responded by saying that it probably wouldn't require a Slang, but that I'm not typically a…
Raku has extremely strong support for pattern matching in function/method signatures – you can match on literals, types, names, or pretty much anything at all and can conveniently destructure the value you're matching on into a set of variables that fit your needs. But Raku also has a second type of pattern matching (or at least something very much like pattern matching): the ~~…
Lisp 1 is famous for having pretty much no syntax. Structure and Interpretation of Computer Programs – arguably the most well known intro to programming in Lisp – presents pretty much the entirety of the syntax in its first hour . And that's by no means the only thing SICP does in that hour. Raku, on the other hand, has a bit more syntax. Ok, that's an understatement. Raku is…
When organizing a program of any size, you'll obviously need to break your code up into smaller chunks. Often, it makes sense for these chunks to be factored out into their own functions – especially if they're good candidates for reuse. But it's possible to take this urge to factor out too far and it's often a better call to leave the code inline. Doing so makes it clear that…
As I write this, I've now had my Keyboardio Atreus for a full six weeks and have been using it pretty much exclusively that whole time. After a month and a half, I've given it a fair shake and can give you my full impressions. And my full impression is that it is amazing . This review is not a detailed comparison written by someone who knows a lot about mechanical keyboards. I've…
In part 1 and part 2 I discussed my personal take on a Raku manifesto: Expressive code over uniform code Rewarding mastery over ease of learnability Powerful code over unsurprising code Individual productivity over large-group productivity In those posts, I explained how Raku prioritizes each of the values on the left over each of the values on the right. I also explained that, in my view, the…
If you recall from part 1 in this series , we're talking about my personal take on a Raku manifesto (modeled loosely after the Agile Manifesto ): Expressive code over uniform code Rewarding mastery over ease of learnability Powerful code over unsurprising code Individual productivity over large-group productivity In part 1, I discussed how and why I believe that Raku values expressive code…
Expressive code over uniform code Rewarding mastery over ease of learnability Powerful code over unsurprising code Individual productivity over large-group productivity I'm not so sure that I'm a fan of agile software development (at least as it's commonly practiced). But I am sure that the Agile Manifesto got one thing really right: It not only stated what values were important but…
Yesterday, I got curious about a simple question that sent me down a bit of a rabbit hole. But now I've emerged from the hole, and want to share what I've learned. (Should that be "share the rabbits I caught"? I think I'll just drop this analogy before we end up with any dead rabbits.) This journey will take us deep into the internals of Raku, Rakudo, Not Quite Perl, and even Moar.…
Maybe you already know this, but it took me way too long to realize it so I'm going to talk about it anyway: Pod is not Pod6 . This post is entirely about the Pod6 documentation language. If you're not familiar with Pod6, it's a lightweight markup language that can be rendered to Markdown, HTML, plaintext, or a variety of other output formats; you can think of it a bit like a more…
The other day (er, ok, month) Brian Wisti wrote an excellent blog post about tangling code using Raku . In case you're not familiar with it, the term "tangling" comes from the literate programming movement. In literate programming, you write a single file containing both source code and extensive, narrative documentation and then process that file in two ways: you weave the file into…
I've been really falling in love with the Raku programming language – it's powerful, expressive, has great support for introspection, strong pattern matching, and extremely good support for metaprogramming. I'm pretty much sold on using it for any project where I don't need raw performance. (When I do need raw performance, I still reach for Rust). That said, there are a few…
I recently read Andrei Cioara's take on the best way to organize GitHub repos . The short version is that GitHub's flat name-spacing leaves all your repos in a single, jumbled list—which is both annoying for you to deal with and makes it harder for anyone else to find your most useful projects. In particular, if you're an active participant in the open-source world, you could easily…
I recently made a number of pretty significant change to the look and feel of my Linux desktop environment, and I'm pretty happy with how my setup looks now. It's not for everyone, but I thought at least some of y'all might be interested in seeing how it looks. What I changed I was previously using dwm as my display manager—and, if you haven't tried it, I highly recommend it.…
I frequently find myself needing to take time-stamped notes. Specifically, I'll be in a call, meeting, or interview and need to take notes that show how long it's been since the meeting started. Basically, I want something that looks like this: My first thought was that there's be a plugin to add time stamps, but a quick search didn't turn anything up. However, I little digging…
I'm very strongly considering moving this site away from Netlify. In fact, I'd go so far as saying that I'm planning to unless writing this post—or hearing from y'all—changes my mind. Before I launch into why, though, I want to clarify: I've been very happy with Netlify. They've delivered exactly what they promised: fast, free, static hosting backed by a global CDN.…
My day-to-day work involves writing a fair bit of JavaScript but, lately, I've gotten really interested in Rust. I'm into the idea of building lightweight programs that can run with lower resource consumption than is typically required for a JS runtime, and Rust's speed, memory safety, and status as the most loved programming language was enough to get my attention. Add in…
Just recently, I found myself in need of several hundred pictures. I'm working on a fairly large-scale app, and I want to be able to test its server infrastructure under load. In my case, that means uploading a decent number of images to Amazon's S3 servers and testing how the app's performs holds up. So, where to get several hundred reasonably decent pictures, preferably with as…
<p>This post is a focused on issues of community governance within <a href="https://www.joinmastodon.org">Mastodon</a> and the fediverse more broadly. If you're not involved in the fediverse, this might not be as relevant to you.</p> The fediverse recently had an incident after a minor celebrity created an account. I very much do not want to talk about the…
Just published a gtypist lesson . The README is below. GNU's gtypist program is a great way for Linux users to improve their typing speed from the comfort of their terminal, and it's widely available for every distribution. I personally used it extensively when I switched from practicing law to programming and discovered that the keyboard was full of keys I'd basically never needed…
I cannot spell. Like, was-sent-to-special-classes-as-a-child-and-they-gave-up-on-me cannot spell. Luckily, this isn't an issue 99% of the time as an adult, because I'm never asked to operate in an environment without a spellcheck. Except … I just started using keybase.io's chat program, and it doesn't check spelling. Clearly, this needed to be fixed. I found a way to fix it: I…
Mastodon is a newcomer social media platform that is a lot like Twitter—short messages, followers, hashtags, all that. But Mastodon is much better than Twitter, and not just because being totally ad-free and keeping chronological timelines make it far more enjoyable to use (though that certainly helps!). All that is nice, but the real advantage Mastodon has over Twitter is that Mastodon is not an…
When we left of, we'd just created a "Hello, World" website—nothing that fancy, but enough to get a feel for the basic structure of Gutenberg's templating system. [](https://v05--gutenberg-simple-demo.netlify.com/) ( source code , as always, in the GitHub repo.) Today, we're going to dive in a bit…
The Problem I've been really happy with my Netlify hosting. It's fast, free, and deploys my site on a global CDN. Even better, Netlify has all sorts of advanced deploy previews and other features that I'm only starting to play with. All that said, today I realized that one consequence of how Netlify does things is that sites could end up penalized by Google and other search engines.…
Gutenberg is a fantastic static site generator. It is likely the fastest generator in existence, it's got an easy-to-use yet powerful templating syntax, and it supports advanced features like syntax highlighting and Sass compilation out of the box. This quick start guide will give you everything you need to know to build a custom static site, with your own templates, and taking advantage of…
As I've written about a couple of times already, I think static site generators are pretty great. But that still leaves picking the right static site generator. As I've mentioned before, this site is built with Hugo , and I'm currently very happy with the setup. However, I didn't start with Hugo. My first experience with a static site generator was actually with Hexo —a static…
The other day, I posted on Mastodon that pass-gen (my new passphrase generator written in pure bash and designed to follow the Unix philosophy) has achieved 100 bits of entropy with default settings and is now 128 times as secure as when it first launched. But how secure is 100 bits of entropy, really? And how do you even go about measuring the security of a passphrase generator, really? Attack…
A few months ago, I got very into maximizing the speed of my website. I feel pretty good about what I accomplished: (I actually prefer the results from webpagetest.org , and not just because it show my site as loading even faster. It's open-source and seems to have a better methodology. But it doesn't generate as pretty a picture, so I went with the Pingdom screenshot above.) My home…
Until recently, I had a very simple git workflow: I worked in a local repository, and then pushed my changes to a single remote, which lived at GitHub. In the case of the code for this site , pushing to GitHub would automatically trigger a rebuild of the website and publish the changes live to the Internet. (Thanks, Netlify !) This setup had the virtue of simplicity, but it had three important…
As I mentioned last time , I think many password managers have a serious flaw: they don't have a way for you to generate a secure, memorable passphrase. That means that, if you ever have to type your password in, you're stuck typing in something like {!]&Sk)r"ss|$K40:]PP''3k- —and nobody wants to type {!]&Sk)r"ss|$K40:]PP''3k- . I also said that I've been using…
The website you're reading right now! I tried to do things a bit differently with this website. In building this website, I had three main goals. I wanted the site to: have understandable source code, be self-sufficient, and be the fastest site in the world . Here is my analysis of how well I managed to meet these goals. Understandable Source Code Why do I want to write a page with…
I recently tweaked the way I use my password manager, and it's already saved me considerable frustration. Not only that, it's also brought my usage more in line with the Unix philosophy of using tools that do only one thing, and do it well—and illustrated, once again, why that philosophy is so great. This post explains my tweak, and how you can apply it. But first, some background.…
In the last post , we talked about the history of website hosting and the rise of dynamic websites powered by PHP. Now, we’re going to turn to more recent history and see how content delivery networks have changed the nature of the modern web. Content Delivery Networks and the Global, Mobile Web One of the biggest advantages of the Internet is how global it is—if your site is hosted in Atlanta, it…
What makes static site generators so great? And what is a static site generator, anyway? To answer that, let’s take a step back and think about how a website works. Skipping over some (interesting and important!) details not relevant here, to display a website all you need to do is to send visitors of the website an HTML document. As an example, take this stripped-down version of the current…
There’s an interestingly recursive nature to learning programming. As part of my ongoing project to build my programming skills to a higher level, I would like to learn Node and modern JavaScript frameworks/libraries like React and Redux. So, that’s my starting point: What do I need to do to learn these new technologies? Except that conventional wisdom holds (and I agree) that it makes more…
Welcome! Don’t you just love that new-blog smell? This blog is my new home for technical topics, book reviews, whatever else catches my attention. I firmly believe that web developers should have their own digital space, one that they build, control, and fully understand. For me, this site is that space. Colophon As of this writing, this site is built using Hugo ( EDIT : The site is now built with…
Please feel free to reach out to me using any of the methods below. Please note that, while I maintain placeholder profiles on Facebook and Twitter, I do not use either of those services—instead, I use Mastodon as my primary social network. Contact Method Link Email daniel@codesections.com Public Key codesections.com/pubkey.txt Mastodon fosstodon.org/@codesections GitHub…
All non-code content on this site is licensed under the Creative Commons Attribution 4.0 International License . This license generally allows for full duplication of all content, including for commercial use, provided that you attribute this site as the source of the content. The code contained on this site is licensed under the MIT License unless another license is specified in an accompanying…
This site does not use cookies or JavaScript analytics (Google or otherwise). If you would like me to know that you read something here, send me an email or let me know on Mastodon, because I won't know in any other way. (I do check the server logs to see the total number of requests each page receives and other basic information. None of that information is personally identifying.)