14
votes
What programming/technical projects have you been working on?
This is a recurring post to discuss programming or other technical projects that we've been working on. Tell us about one of your recent projects, either at work or personal projects. What's interesting about it? Are you having trouble with anything?
I'm working on (another) static site generator, this one in common lisp and ingesting mime messages
I'm intrigued. Why Lisp and why and how MIME?
lisp is fun! mime messages are a neat way to do meta data and content. that's all the thinking I've had!
On repeatTest, I’ve been working on internal cleanups with the goal of making shrinking faster for large generated values. The idea is that it should work like a build system; if a dependency hasn’t changed, a cached value can be reused instead of rebuilding it each time.
There is now a Gen<T> class that holds a value and the information needed to regenerate it, with a mutate() method that returns a copy after applying an edit. I also rewrote the shrinkers to be cleaner and cleaned up a hack in repeatTest that depended on the internals of generated values.
JavaScript doesn’t really have immutable values, but it has Object.freeze() and Object.isFrozen() for a shallow freeze of an object’s properties. I decided to use that to decide whether an object can be cached or needs to be regenerated each time. You can defeat this pretty easily by having a frozen property that points to a mutable value, but I’m going to consider that an escape hatch.
No release this week.
I'm working on a Magic the Gathering tracker app.
My friends and I play every week, and we currently use Lifetap, and it's just all around the best, but I find myself wanting some extra bits thrown in there. I'm using React Native, which is relatively new to me, so I'm also learning a good bit at the same time.
After sitting down for a few hours and going over the microcontroller manual, then confirming with another developer, I realized that the ATSAME70 (Duet 6HC) runs slowly in Klipper because every instruction is fetched from flash memory, over a bus that is running at half the frequency of the processor. That is, the chip runs at 300MHz, but is really running at a maximum of 150MHz due to the bus (even RAM access happens over this bus), and probably much slower because we have to wait a certain number of cycles to read from flash. I started tinkering with enabling caches, but realized that Klipper is small enough to fit entirely in the Instruction Tightly Coupled Memory (ITCM) on this chip with room to spare. My current plan is to try loading Klipper into flash with virtual memory addresses that point to the ITCM, then using the Direct Memory Access (DMA) controller on the chip to copy the entirety of Klipper into the ITCM before enabling the ITCM. I have to use the DMA hardware because there is a seamless remapping that happens from the ITCM addresses to the beginning of flash memory when the ITCM is disabled, but DMA can write to those addresses without getting remapped. I’m trying to minimize modifications to the linker script as much as possible, to make it easier to merge upstream. After this I will try to enable the Data Cache in the processor, because all of the data should simply fit directly into it, and then everything will be able to run at 300MHz.
This reminds me of how it works when coding on the Raspberry Pi Pico. There's a macro you can use to annotate hot functions that you want to be in RAM, and the build system somehow arranges for it to be loaded automatically on boot.
Klipper seems to be 3D printing firmware. What do you want to do with it?
Well, Klipper currently runs my printer, and I (with a decent amount of debugging help from another developer) added the Duet 1LC support to it already - I wanted to try Klipper out rather than RepRapFirmware due to some issues I was having with RRF. I just got annoyed that I can’t run higher microsteps on the 6HC and started looking into it.
And you are not far off - there is a GCC annotation that is also used for hot path functions in Klipper (I think, since the linker mentions RAM functions) that I believe you are talking about. This is a little heavier, since it is not so hardware agnostic as that.
Working on a 2D Raycaster similar to Wolfenstien or TES Arena. I have used this tutorial to get started with a rudimentary engine which renders textures within a tile-like fashion. The goal is to make a roguelike game which is a mix between an older dungeon-crawler and something like nethack, you can freely move around and collect items but also face difficult enemies.
So far I've gotten down random generation and some basic features like a minimap, a 'fog' system which works similar to lighting, and am currently refactoring the code to be more usable. I also have a system where you can break blocks which are near to you - alot of stuff is easily doable if you just understand the engine enough.
Of course, I am writing this in a mix of C/C++ and it's on Linux Mint so it's mostly targeted towards that sort of stuff. I would share the github repo but I don't quite feel comfortable sharing it on an online platform. This has been a new experience for me as I haven't written C++ in a while, but it's nice to get to it.
Preface: since this is your portfolio, these comments are meant to be constructive criticism to help you put your best foot forward. Also, many of these are design/ux elements, rather than the purely technical elements, but I think people will have trouble separating the two and/or would expect you to have some awareness of them.
Desktop comments
Mobile comments
Even though you noted you had not addressed this yet, here are some thoughts. I don't think anyone is putting anything serious online without considering the mobile experience, so this is probably important when you get to it.
ctrl-shift-m
or a button in the developer tools to create a mobile view to check your responsive layouts. I try to use Chrome as little as possible, but their developer tools are little better. For example, you won't see the mouseover highlight in the sections when scrolling on mobile (no mouse). That is the experience the chrome sim shows you because it simulates taps, but Firefox does highlight the sections under the mouse, so it is less faithful.lg:mt-24 mt-12
or something like that (assuming that is Tailwinds).I appreciate the feedback I'll review these in detail later, thanks!
I’ve wanted to play around with building a desktop app as it’s different from what I usually do. So I built a GTK4 app with Zig to convert ULIDs to UUIDs. At work our app uses ULIDs throughout the system but they’re converted to UUIDs at the database layer. So this app helps me translate IDs when debugging issues.
Source: github.com/gf3/tackle
I did not know about ULIDs. That is interesting. I read the whole spec. I have lots of questions (not necessarily directed at you) about making submillisecond ULIDs. The carry strategy is interesting, but you'll only get that if all your ULIDs come from a single sources right? Also, if you get unlucky with a high random value, you might not get very many before it errors out. I have a safety background, so Intend to think in terms of worst case, but probably there are advantages for the common case.
Also, thanks for posting the source link. It's always interesting to poke around in other peoples code setups. How do you like the devcontainers? I briefly messed with this a few years back, but found it unreliable for the application I was using. Doubtless it has gotten better since then.
I typically just have a docker file with a task file that launches a dev environment with the source tree minutes in it. Example in this post.. Do you think there are more advantages to the dev container? Maybe integration with vscode?
I think if the timing and randomness requirements of ULID are too narrow you may want to reach for UUIDv7 which uses a 50-nanosecond resolution. You could always encode your UUID to "look like" a ULID (i.e. base32 encode) as they're both just 128 bit integers.
We chose ULID because of it's time-sortability and compact representation. We actually implemented what I called prefixed-ULIDs which is just a ULID with a 5 character resource prefix (e.g.
prod_01J8P0PYEP7843TSEY5ABTN6C4
orvndr_01J8P0QSSCD3Z04TS4KGBAGV9C
). This allows us to easily associate an ID with a table/collection when we get bug reports or support requests. The prefix is stripped and the ULID is converted to a UUID at the database layer, so the translation is seamless.As for devcontainers, once you're familiar with them I've found I can't work without them! I've always had issues with dev environments over multiple projects—especially developing new products while maintaining legacy systems. Additionally running a team, there have always been issues and inconsistencies between developer machines for whatever reasons that cause weird bugs or outages for individual team members. Devcontainers fix these issues allowing team members or contributors to work in the same precisely-specified and reproducable environment.
Reading through your previous comment, your
Dockerfile
setup is very similar to the devcontainer process. The devcontainer spec just formalizes this process and provides common lifecycle and event hooks (which allow deep integration into tools like VSCode as you mentioned). You might be interested in the devcontainer cli which would allow you to maintain most of your current workflow but also take advantage of any additional features.Similar to devcontainers, I also use toolbox for non-project based environments that require additional packages or tooling. I think this is similar to your process just without the Dockerfile. The host integration of toolbox would allow you to install your editor (e.g. VSCode or Sublime Text) inside the toolbox that also includes all of your project dependencies.
Out of curiosity, what type of things do you mostly find yourself developing?
I'll have to give the devcontainers another try. In particular, it might make it easier for other people to come along behind and use the environment.
Oh, I have a wide variety of things, thanks for asking:
The startup was fun, especially the early days, because there was so much variety. I've been trying to break into contract work since leaving the startup, but with only moderate success. I have a few gigs (as noted) but they are pretty small. I'm more of a jack-of-all-trades, so useful if you need to do a lot of different things, but a lot of places seem to be looking for someone who's spent ten years using their particular framework/toolset.
That’s very cool, thank you for sharing. An eclectic mix of technology!
My small Rust project a couple weeks ago gave me more confidence to start contributing to Rust projects.
One of the things that has been annoying me recently is that
Alt+,
, which I use to duplicate command-line arguments, does not behave the same behavior asAlt+.
:So I turned my frustration into a PR: https://github.com/fish-shell/fish-shell/pull/10738