Ben Crowder

Blog: #coding

82 posts :: tag feed :: about the blog :: archive

At work I recently had a use case for Go 1.16’s new embedding feature. Incredibly easy to implement (literally one or two minutes). Worked like a charm.

Tangential note that doesn’t completely relate but whatever, I’ll throw it in: every time I think back on embedding (which is not that often, thankfully), my brain gets all excited about compile-time execution in Jai and in Zig. (Both are languages I’ve only read about, to be clear. Might be time, though, to start building something in Zig.)


Reply via email

I used to use Fabric to deploy my personal apps, but I often ran into issues with it, so several months ago I switched over to simple shell scripts that use ssh. Much more resilient, and far easier to maintain (at least for me).

Here’s a sample of what one of these deploy scripts looks like for a Django app:

#!/bin/sh

git push

ssh myusername@myhost /bin/zsh << EOF
  cd /path/to/app/code/

  echo "- Pulling the code"
  git checkout main && git pull

  echo "- Restarting the app"
  supervisorctl restart myappname

  echo "- Running migrations"
  /path/to/venv/bin/python manage.py migrate

  echo "- Collecting static"
  /path/to/venv/bin/python manage.py collectstatic --noinput
EOF

I’ve thought about using a CD pipeline instead, but I’m not convinced that introducing an extra dependency — no matter how slick — is actually worth it for something small and personal like this. (CI/CD sure is nice at work, however.)


Reply via email

Links #42

Katherine Rundell on giraffes. Unexpectedly fascinating.

Sokyokuban, a Sokoban game set on a hyperbolic plane. Mind-bending in a great way.

Shawn Wang on preemptive pluralization when developing software. This seems like a wise practice. (Not following it has bitten me more than once.)

Michael Mulet on how he made a video game in a font. Fascinating and horrifying.

Alan Jacobs on blog gardens. I’m particularly intrigued by the idea of writing about the same topic in depth over longer periods of time as a way of organically writing what effectively amounts to a book.


Reply via email

Links #41

Rob Weychert’s Plus Equals, a new zine about algorithmic art. The first issue was good, looking forward to future installments.

Riccardo Scalco’s Textures.js, SVG patterns for d3.js. Yum. I don’t even use d3 (at least not right now), but I’m tempted to do something with it just so I can use these.

Jason Kottke on the invention of a new pasta shape. Max sauceability as a concept will stick with me for a long time, I think.

Rytis Bieliunas on some of the darker corners of Go (the programming language). I’m writing a lot of Go at work now and this was helpful.

Austin Kleon on blogging as a forgiving medium. The idea of continually editing and refining posts after publishing them intrigues me. I fix typos if I find them, but that’s about it at the moment.


Reply via email

Links #39

Iain Bean on system fonts. I didn’t realize Charter is now a system font. (In macOS, it was apparently added in High Sierra.) That’s great.

Thomas Dimson’s This Word Does Not Exist. Words generated and defined by machine learning. It’ll be interesting to see how machine-generated content affects culture going forward.

Samuel Arbesman on Newtonian anagrams. Fascinating historical tidbit, and I’m interested in reading that Newton bio, too.

Hannah Ritchie on the drop in land use if the world switched to a plant-based diet. I’m not a vegetarian (though I was for a time when I was younger), but if plant-based meat substitutes get tasting good enough, I’d have no problem dropping meat from my diet. (I am shallow.)

Hynek Schlawack on the limitations of semver. Good points with some good advice.


Reply via email

Links #38

Ziglings. Learn Zig by fixing small bugs in small programs. (Inspired by rustlings, though those exercises seem to be broader than just fixing errors.) A good way to learn a programming language, I think.

Maggie Appleton on bi-directional links. Doing this locally is one of the (many) changes I want to make down the road when I rebuild this site’s backend.

Vasilis van Gemert on where web page navigation should be. I’m convinced: nav at the bottom of the source file, and on mobile at the bottom visually as well. Planning to make the change here soon.

Blender 2.92 dropped recently. Geometry nodes look promising, and it’s crazy to see how all the grease pencil work has turned Blender into a viable 2D animation studio as well.

PEP 636. Pattern matching! In Python! Very much looking forward to this — I’ve loved using it in Rust.


Reply via email

Links #37

Trying out a new format with these link bundles, in the hope that dropping the bulleted list format is a) more flexible and b) more conducive to writing a bit more about the links, rather than limiting myself to a single line with an awkward semicolon shoved in if I need more room.

Andy Bell on recent/upcoming CSS changes. Good stuff here. I’m probably most looking forward to using :is and clamp() and ch (all of which I’d read about before but had mostly forgotten). Oh, and scroll-margin-top.

Design Engineering Handbook by Natalya Shelburne et al., a free ebook which looks interesting. (I’ve read part of the first chapter so far.) Design Better (which appears to be an InVision thing) has other free books available as well, on various design-related topics.

Max Koehler on continuous typography. Also see his post about the tool and the tool itself. This is great, and I hope these ideas get broader traction. (Also, I’m excited to start using Source Serif 4 and its optical sizing axis.)

Aleksey Kladov on including an ARCHITECTURE.md file. Great idea. Having a high-level overview is so helpful.

Graydon Hoare on always betting on text. I’ve probably linked to this before, but it’s good and worth rereading occasionally.


Reply via email

Links #36


Reply via email

Links #28


Reply via email

Introducing Cirque

As schoolwork starts to wind down, I’m finally starting to make progress on the creativity tools and HCI explorations I talked about back in September. This week I’ve also realized that graphical tools for art and design are what I want to focus most on. (I do still intend to explore textual interfaces, but they’re on the backburner for now.)

In the spirit of working in public, then, Cirque is a small WIP web app I’m building for making patterns via circle packing:

cirque-01.png
cirque-02.png
cirque-03.png
cirque-04.png

This is very much a rough initial MVP. You can tweak some settings, generate new patterns using a simple circle-packing algorithm, and export SVG (with the turbulence/displacement filters enabled by default), but that’s it. Some of the features I’m planning to build next:

  • Replace the settings text box with, you know, good UI (I’m also excited to explore color picker design here)
  • Add the ability to manually place both circles and anticircles (so artists are able to create intentional negative space)
  • Add a way to programmatically set the circle colors (probably via something like shaders, so you could say all circles smaller than a certain size get one color and the rest get another, or circle color is dependent on position or something else)

I’ve also thought about moving the circle packing code from JavaScript to Rust, to be able to play around with WebAssembly, but it seems overkill, at least at this point. (Instead I think I’ll plan to Rust and WebAssembly on the graphical type design tool I want to build.)


Reply via email