2025-10-13
:: Jimmy Hartzell
#programming
#computers
#rust
#traits
I stumbled across a … bug(?) … a limitation(?) … an
issue(!) with the Rust
compiler. Fortunately, I was able to find out what was going on in the
Rust programming language forum.
I thought this issue was interesting enough and subtle enough to try
to explain to my blog audience.
To be clear, this is an issue. This is a limitation in the Rust trait solver.
The maintainers of the Rust compiler didn’t make Rust work this way for a
principled reason. There’s no particularly strong theoretical reason Rust has to
have this limitation.
2025-08-10
:: Jimmy Hartzell
#programming
#computers
#nontechnical
#AI
Recently, at work, we’ve been encouraged to try out a bunch of new “AI”
tools. So, I’ve been using the Claude “AI” app, an “AI assistant” developed
by Anthropic, to help with some
Rust programming tasks. I’ve been trying (as requested) to learn its
strengths and weaknesses, and how I might be able to use it to make my work
more efficient. But mostly I’ve just been building an intuition of what it
is.
2025-07-21
:: Jimmy Hartzell
#programming
#computers
#Rust Features
In my previous post, I talked about programming
language design, and try to discern some heuristics for what features
should be added to a programming language, on my way to explaining
why Rust should not include inheritance as a feature.
I’d like to expand more on that blog post now (so I guess it’s become a
series?). Do I think Rust is perfect how it is?
(No.) Are there features that I want in Rust that Rust currently does not
have? (Absolutely yes.) In this post, I’d like to talk about some proposed
additions to Rust, some recent, some very stale, and discuss my perspective
on them.
2025-07-19
:: Jimmy Hartzell
#programming
#computers
#Rust
#OOP
#Beyond OOP
#Rust Features
Programming language design, like API design, and computer UX design
(especially for technical tools like build systems and admin systems) is a
difficult form of engineering, bridging computer science and cognitive
science. Sometimes, it’s more art than science, because building systems
that other technical workers will use comes with nearly infinite trade-offs
and judgment calls.
The effort and quality matter too. Different programming languages have
different strengths and weaknesses. Some programming languages are hard to
use correctly, like C++. Some are easy to write, but hard to then read and
maintain, like Perl. Some programming languages are great for one-off
scripts where you’re the only user, like Python, and others enforce that you
follow reliable engineering principles, like Rust.
2024-09-04
:: Jimmy Hartzell
#programming
#computers
I was recently working on a (company-internal) GitHub pull
request I’d written. A colleague left a few comments in a review
and “requested changes” from me, effectively giving me a TODO
list of items that needed to be done before the PR could be merged.
Because he’d specified that he was “requesting changes,” GitHub
knew to prevent someone from merging the PR before those requests
had specifically been addressed.
Once I’d finished addressing these TODO items, I had a conversation
with this same colleague about something else. He indicated he’d
like that to be changed as well, and I put in the comment on my
own PR. But then, I found I could not request changes on my own
PR.
2024-07-29
:: Jimmy Hartzell
#computers
#politics
#nontechnical
#AI
I just read an
article
in The
Atlantic
that AI is failing to justify itself economically. This is pretty
dire for AI, especially given that this is such an overly expensive
technology even with tons of brazen stealing
from content creators. I feel like it should go without saying that if
your business isn’t profitable even with a ton of stealing, maybe it’s
not that great a business.
But of course, who doesn’t want a confident confabulator incapable
of critical thinking? A bullshit artist designed to do what many of us
learned to do in high school and college, and write pages of content that
sounded “educated” without actually paying attention to the actual ideas,
or even understanding them at all?
2024-06-30
:: Jimmy Hartzell
#politics
#nontechnical
#computers
#AI
AI, particularly this new round of large language models, scares me
on behalf of society and the future.
I don’t just say that because it’s transformative. I don’t say that as a
generic warning that we haven’t considered the consequences (as in this
XKCD comic). No, I have specific consequences
in mind, consequences that I have considered, and I am rather worried
about them! They are not so much problems about the technology itself,
but about how we use it, and specifically how we use it on a societal,
economy-wide scale.
2024-06-25
:: Jimmy Hartzell
#programming
#computers
#C++
#Rust vs C++
C++, like all things, has numerous
problems. Pointing out how Rust addresses many of them is a major
topic of my blog, but some of the problems are bigger
than others. The biggest, most famous, loudest problem, the problem that
got the federal government’s attention and resulted in a surreal flame
war between Dr. Bjarne Stroustrup and the NSA (which I also commented
on/contributed to), is C++’s lack of
memory safety.
This is C++’s biggest problem, its memory safety problem. That’s the
one everyone’s talking about. Can it be fixed?
2024-06-22
:: Jimmy Hartzell
#politics
#nontechnical
#essay
I was Googling for sources about nuclear power for my
new political views garden,
and I came across the following statement in reference
to nuclear waste:
I know that burning fossil fuels is bad, but we can’t just start
another problem just because we can’t fix the first one.
I’m not trying to single out the person who wrote this (and therefore
no link, and the quote has been edited for spelling and grammar which I
hope has rendered it un-Googleable), but I do want to respond, generally,
to the sentiment, which I think is unfortunately common.
2024-05-18
:: Jimmy Hartzell
#computers
#reviews
#asahi linux
Since my previous post,
I haven’t posted about Asahi Linux. This is for a simple reason:
I wasn’t using it. I never took the time to set up a tiling window
manager, get dropbox working, and all the things I felt I needed,
and I slipped back to using my trusty Dell Ubuntu laptop for Linux,
and using my MacBook M1 just for macOS.
But then I tried again! And wow, has Asahi Linux changed! It’s Fedora,
not Arch now, and installation was much easier! So I wanted to share
how my experience has gone. I’m not particularly stoked to spend too
much time on sysadmin tasks for my personal computing, so this is
more a narrative about what actually has happened in my adjustment to
it, rather than a reflection of Asahi at its best, but I thought I’d
share where I was at.
2024-04-23
:: Jimmy Hartzell
#programming
#computers
#what bits mean
#programming basics
This is part of my new series on what the 0’s
and 1’s in computers mean, how computers use them to store various
kinds of information, and why all of this works the way it does.
When I was a boy, my schoolmates, knowing that I was interested in
computers, would sometimes ask me if I could read binary. They
imagined I would see some binary, and be able to read it out
loud like they could read letters, perhaps some binary that
looked like this:
2024-04-16
:: Jimmy Hartzell
#essay
#nontechnical
#psychology
#ADHD
How do we ask the other people in our lives for the things we need
and want? This can be difficult for everybody. Many of us have trauma
from a society that continually tells us that we don’t deserve to have
help meeting our needs, or from past situations where our needs have
been neglected. We are also often aware that asking for things can
sometimes be upsetting to the people we ask. We are painfully aware of
their ability to say no, and we know how much that can hurt.
2024-04-15
:: Jimmy Hartzell
#programming
#computers
#technical
#what bits mean
#programming basics
I was explaining two’s complement recently to a friend, and I thought
my explanation was decent, so I decided to write it up and share it
with you, my general blog audience, as well! If you already know about
two’s complement, this will pretty much just be a review. If not, you
may learn something, and you may not understand all of it. Try to get
what you can without getting too anxious, there will not be a test!
2024-02-05
:: Jimmy Hartzell
#programming
#computers
#Rust
#C++
#Java
#Haskell
Polymorphism is a powerful programming language feature. In polymorphism,
we have generic functions that don’t know exactly what type of data
they will be operating on. Often, the data types won’t even all have been
designed yet when the generic function is written. The generic function
provides the general outline of the work, but the details of some parts of
the work, some specific operations, must be tailored to the specific
types being used. The generic code needs some way of accessing these
specific operations, and the users of the generic code need some way
of specifying them.
2024-01-28
:: Jimmy Hartzell
#reviews
#nontechincal
#ADHD
I enjoyed reading Atomic Habits, which was recommended to me by my
therapist. I found this blog post basically finished in my attic folder
while sorting through things, and I found it up to posting, even though
my records show I read Atomic Habits way back in … October 2022.
Self-Help in General
Atomic Habits is pretty fundamentally a “self help book.” This is a
pretty controversial genre in my experience. Some people roll their eyes
at self-help books in general – I once even read an “anti-self help”
book that basically did so for the entire length of a book. Others
swear by them – literally, I had a friend once who said The Subtle
Art of Not Giving a Fuck was her Bible and who used it as such for an
(informal but serious) oath. I’m generally somewhere in the middle of
these two extremes. I read them with solidly middling expectations.
2024-01-21
:: Jimmy Hartzell
#programming
#computers
So, there are now two additional repos of my code on GitHub that recently
got published, both under the MIT license. Neither is any show-stopping
major project, but I figured I’d let everyone know nevertheless, and
write up a few notes about it. Both have been added to my
programming portfolio garden.
Repo #1: Crate Version of Prefix Ranges
Arvid Norlander (blog,
GitHub) reached out to me to ask if
I wanted to publish my little Rust module from my post on
prefix ranges as a crate, or, failing that,
if I could license it as open source so he could publish it. I had
thought of most of my code on this blog up until this point as example
code not worth licensing, but his prompting changed my mind. If it’s
just trivial example code, it’s not worth not open sourcing, so
I might as well release the website’s example code under an MIT
license.
2024-01-08
:: Jimmy Hartzell
#reviews
#nontechnical
This was a great read about how the United States should reframe
many of its basic political assumptions.
It is tempting to think of life as a zero-sum game. Having more for me,
even enough for me, means less or even not enough for others. Usually,
we have the open-mindedness to feel like we can cooperate with some few
– our family, our community, or perhaps our nation or religion or even
(problematically) our ethnic group. But at a certain scale, there is
a sense that there’s not enough to go around to all the people who
might want it.
2023-12-26
:: Jimmy Hartzell
#essay
#nontechnical
#politics
US politics continue to be interesting.
As many of you know, the Colorado Supreme Court has recently
ruled
that Donald Trump should be struck from the ballot in Colorado. Under
Section 3 of the 14th Amendment to the
US Constitution, if you’ve sworn to support the Constitution, and then
engaged in (or “given aid or comfort to”) an insurrection, you are no
longer eligible to serve in office. The Colorado Supreme Court applied
this law to Trump, citing the Capitol attack of January 6,
2021.
2023-12-23
:: Jimmy Hartzell
#essays
#nontechnical
Another year has gone by
And in response, I simply sigh
Another year has taken place
I guess I’ll handle it with grace?
Another year, the same old grind…
And yet I feel I’ve fallen behind
As you might know if you’ve read my equivalent post
from last year, I am now 35 years old
(and 3 days). If we consider “working years” to range from 20 to
65 – which seems a decent definition – then I am 1/3 of the way
through them, 1/3 of the way through my career. So, theoretically,
we should see my résumé at least triple in impressiveness
by the time I retire!
2023-12-07
:: Jimmy Hartzell
#programming
#computers
#Rust
#OOP
#Beyond OOP
In this next post of my series explaining how Rust is better
off without Object-Oriented Programming, I discuss
the last and (in my opinion) the weirdest of OOP’s 3 traditional pillars.
It’s not encapsulation, a great idea which
exists in some form in every modern programming language, just OOP does
it oddly. It’s not polymorphism, also a
great idea that OOP puts too many restrictions on, and that Rust
borrows a better design for from Haskell (with syntax from C++).
2023-10-24
:: Jimmy Hartzell
#fiction
#nontechnical
This is a revision of a flash fiction piece first
posted in 2018.
After a year of talking, and another year of planning, the project was
complete. Mothers Against Drunk Driving, the local clergy, and the town
council had finally done it: Right in the town square, they installed a
giant loudspeaker. From thenceforth, every two minutes, a booming voice
would spread all over town, announcing:
ARE YOU SURE?
Foolhardy decisions, they had decreed, would soon be a thing of the past.
2023-10-19
:: Jimmy Hartzell
#programming
#computers
#endianness
#C
#C++
#Rust
Endianness is a long-standing headache for many a computer science
student, and a thorn in the side of practitioners. I have already
written some about it in a different
context. Today, I’d like to talk more about how to deal with endianness
in programming languages and APIs, especially how to deal with it
in a principled, type-safe way.
Before we get to that, I want to make some preliminary clarifications
about endianness, which will help inform our API design.
2023-10-08
:: Jimmy Hartzell
#computers
#user interfaces
#operating systems
#nontechnical
This is my newest post in my series about operating
systems. Yes, it was last updated in 2019 –
I’m a hobbyist blogger. This is a post about the command line, a computer
topic, but it is for educating a non-technical (but tech-curious)
audience. Most of the programmers in my audience will already know
everything I have to say, and may be bored by some explanation of things
they already know, though I intend to discuss some technical details of
how computers work.
2023-09-30
:: Jimmy Hartzell
#essay
#nontechnical
#philosophy
#computers
This blog post isn’t about ChatGPT. It
isn’t about machine learning, neural nets, or any
mysterious or border-line
spiritual form of
computing. That’s a whole ’nother set of philosophical and metaphysical
conundrums (conundra?).
This is about a way people sometimes speak, informally, about bog-standard
boring non-AI computers and computer programs. You’ve probably
heard people speak this way. You’ve probably spoken this way sometimes
yourself:
- “The server thinks your password is wrong.”
- “The computer thinks you’ve lost the connection.”
- “The phone thinks you want to use your headphones. It’s wrong though.”
We normally interpret this as a metaphor, but I’m not sure it is.
Is the phone “thinking” you want to use your headphones rather than
your car speaker substantially different from us “thinking”
our friend would rather get a phone call than a text message?
2023-08-31
:: Jimmy Hartzell
#essay
#nontechnical
I remember hearing an idea once – I’d like to cite it, but proper
citation seems difficult, as I heard it from an acquaintance, and
Mr. Google isn’t being his usual helpful self. The idea was, different
politicians have these verbal tics, these filler catch-phrases,
that indicate their deepest conversational anxieties.
For President Obama, it’s “let me be clear.” According to this
thesis, he is really concerned about being unclear, and this
tic is so prominent in his speech that it shows that his
biggest anxiety is being insufficiently clear about something,
as waffling, or evading the deep issue underlying all the petty
concerns. And as an American paying some amount of attention,
this made sense to me.
2023-08-30
:: Jimmy Hartzell
#programming
#computers
#C++
UPDATE: I have updated this post to address C++ features that
address these issues or have been purported to.
I have long day-dreamed about useful improvements to C++. Some of these
are inspired by Rust, but some of these are ideas I already had before
I learned Rust. Each of these would make programming C++ a better experience,
usually in a minor way.
Explicit self
reference instead of implicit this
pointer
UPDATE: This is coming out in C++23, and they did it right!
I’m excited! Good job C++!
2023-08-28
:: Jimmy Hartzell
#programming
#computers
#C
#C/C++
#C++
One of the minor points I discussed in my
response to Dr. Bjarne Stroustrup’s memory safety
comments
was the controversial, apparently deeply upsetting term C/C++. It is
controversial and interesting enough that I decided to say a little more
about it here.
A little background: Many people, especially outside the C and C++
communities (which, to be clear, don’t always like each other that
much) use the term C/C++ to talk about the two programming languages
together, as an informal short-hand for “C and C++” or “C or C++.”
Within the C/C++ C and C++ communities, it is widely hated.
2023-08-26
:: Jimmy Hartzell
#programming
#computers
#C++
UPDATE: Wow, this post has gotten popular! I’ve written
a new post that adds new papercuts combined
with concrete suggestions for how C++ could improve, if you are
interested. Also, if you want to read more about C++’s
deeper-than-papercut issues, I recommend specifically
my post on its move semantics. Thank you for reading!
My current day job is now again a C++ role. And so, I find myself again
focusing in this blog post on the downsides of C++.
2023-08-06
:: Jimmy Hartzell
#meta
#computers
#nontechnical
TLDR: I am adding a new link for RSS subscribers who just want
to subscribe to technical posts. The RSS feed has always been available,
but it is now explicitly one of the links across the top, for those
who want their RSS feed to only give them my new technical posts.
I am writing this post primarily to let people know about this new
link, but I also want to muse on it a little.
2023-07-08
:: Jimmy Hartzell
#fiction
#nontechnical
TRIBUNAL PROCEEDING TRANSCRIPT
SUB LEGIBUS ORDINIS SACROSANCTI IMMORTALIUM
PROVISIONAL PROOF TEXT
IN THE CASE OF:
ŌRDŌ SACROSANCTUS VERSUS THE NAMELESS DAUGHTER OF MUŠMAḪḪU
THE SEVEN-HEADED SERPENT,
SHE WHO IS KNOWN TO THE MORTALS AS EUNICE
LORD JUSTICE MEPHISTO, PRESIDING
LORD JUSTICE DRACHENMILCH, LORD JUSTICE BA’AL-HA-KHUMUS, AND
LORD LADY JUSTICE XYXXYZ
MR. AZAXAZALIA, ESQ., PROSECUTOR
MS. “EUNICE”, DEFENDANT
A RECORD OF EUNICE‘S TESTIMONY
TRANSCRIBED BY GEORGE SMITH, HUMAN, JUNIOR APPRENTICE CLERK
COURTROOM 31B, NO OTHERS IN ATTENDANCE
2023-07-03
:: Jimmy Hartzell
#ADHD
#nontechnical
#essays
Here’s a story; stop me if you’ve heard it before.
There’s a child, an energetic, enthusiastic child, perhaps hard to deal
with in some ways, but all around just beautiful. And then they go to
a parochial school – or perhaps they just have a rather strict public
school teacher. In either case, the authority figure makes it their
wicked mission to suppress all the beautiful children’s personalities into
identical, well-behaved zombies in the interest of the idol of order. Only
our heroic child remains with their own personality, constantly getting
in trouble for it but remaining themselves.
2023-06-24
:: Jimmy Hartzell
#programming
#computers
#Rust
#walkthrough
Update: Arvid Norlander has
gone through the trouble of refactoring this code into a
crate and publishing it. Thank
you, Arvid!
Rust’s BTreeMap
and corresponding BTreeSet
are excellent,
B-tree-based sorted map and key types. The map implements
the ergonomic entry API, more flexible
than other map APIs, made possible by the borrow checker.
They are implemented with the more performant but more gnarly
B-Tree data structure, rather than
the more common AVL trees or
red-black trees.
All in all, they are an excellent piece of engineering, and an excellent
standard library feature.
2023-06-16
:: Jimmy Hartzell
#reviews
#nontechnical
#Sci Fi
I already enjoyed the Monk and Robot series by Becky Chambers (A Psalm
for the Wild-Built and A Prayer for the Crown-Shy). It’s now one of
my favorite books. so I was excited to also read her earlier work, the
Wayfarer series, starting with The Long Way to a Small, Angry Planet,
and it did not disappoint me.
Both these series are science fiction. While Monk and Robot is solarpunk,
a relatively new sub-genre focused on imagining a world with major
environmental (and economic) problems solved, the Wayfarer series
much more reminds me of the kind of science fiction I used to read as
a kid. While it’s described as space opera, it reminds me more of
Heinlein or Arthur C. Clarke or even Niven, who are considered
hard sci fi. I’m not sure whether this is because it focuses
less on accuracy and logic than those other authors, or if it is because
it does not do so at the expense of character development, or perhaps
because it is written by a woman.
2023-05-26
:: Jimmy Hartzell
#essay
#nontechnical
#politics
#economics
So you might or might not be aware about the debt ceiling argument
currently taking place in the US.
I’ve already written about this,
but President Biden for some reason didn’t listen to me (perhaps
because he doesn’t read my blog – which is disappointing). Other, more
famous
people have written about it
too,,
but the President insists on pretending he has to make a deal with
the Republicans.
So, to catch everyone up, here’s how this all works.
2023-05-24
:: Jimmy Hartzell
#programming
#computers
#Rust vs C++
#Rust
I am no stranger to programming language controversy. I have a whole
category on my blog dedicated to explaining why Rust
is better than C++, and I’ve taken the extra step of organizing it into
an MDBook for everyone’s convenience. Most of them have
been argued about on Reddit, and a few even on Hacker News. Every single
one of them have been subject to critique, and in the process, I’ve been
exposed to every corner, every trope and tone and approach of programming
language debate religious war, from the polite and well-considered
to the tiresome and repetitive all the way to the rude and non-sensical.
2023-05-23
:: Jimmy Hartzell
#computers
#hardware
Intel has just released a new white
paper,
where they discuss removing a lot of the legacy cruft of the Intel/AMD
architecture they call Intel64. Only 64-bit operating systems – and
a narrow set of 32-bit legacy apps that don’t use segmentation (a
small subset in theory but basically all of them in practice) – will
be supported. I am surprised at how excited I am, although after all
this time perhaps the better word is “relieved.”
2023-05-22
:: Jimmy Hartzell
#essay
#nontechnical
#ADHD
I was reading my ADHD blog post today,
considering whether to send it to a friend, and it was surprisingly hard
for me to bring myself to. I realized I was embarrassed at the voice,
the phrasing, the lack of beauty in the individual words, all of which
is something I paid relatively little attention to before – and which
my friend, who also writes, will definitely notice.
It’s something I’ve paid less attention to than I should. “Writing is
thinking” is my philosophy, and I have tons of thoughts that I know
other people are interested in. Shouldn’t the structure of the thoughts,
both the logical structure and the order in which they’re presented,
be more important than voice? And I still believe they are – and yet
voice does still matter.
2023-04-24
:: Jimmy Hartzell
#programming
#computers
#Rust
#Rust vs C++
Here it is, the Rust vs C++ mdbook.
I’ve wanted for a while to re-organize some of the
content on my blog into gardens. I got
the idea from the blog post “The Garden and the Stream: A
Technopastoral”.
Basically, some content is ill-suited to date-based, time-organized
systems like blogs. In fact, most of my content remains valid over a
long period of time, rather than participating in conversation (with
some exceptions), but
rapidly becomes less discoverable after I’ve written it, as it is
buried by newer posts.
2023-04-06
:: Jimmy Hartzell
#programming
#computers
#Rust vs C++
#Rust
#C++
I know I set the goal for myself of doing less
polemics and more education, but here I return for another Rust vs
C++ post. I did say I doubted I would be able to
get fully away from polemics, however, and I genuinely think this post
will help contextualize the general Rust vs. C++ debate and contribute
to the conversation. Besides, most of the outlining and thinking for
this post – which is the majority of the work of writing – was already
done when I set that goal. It also serves as a bit of conceptual glue,
structuring and contextualizing many of my existing posts. So please
bear with me as I say more on the topic of Rust and C++.
2023-03-28
:: John Ericson & Jimmy Hartzell
#programming
#Rust
#computers
#Beyond OOP
Does the choice of programming language matter?
For years, many programmers would answer “no”. There was an “OOP
consensus” across languages as different as C++ and Python. Choice
of programming language was just a matter of which syntax to use to
express the same OOP patterns, or what libraries were needed for the
application. Language features like type checking or closures were seen
as incidental, mere curiosities or distractions.
To the extent there was a spectrum of opinions, it was between OOP
denizens and those that didn’t really think software architecture mattered
at all — an feeble attempt of corporatization against true programmers
and their free-spirited ways. The office park versus the squatters. That’s
how we got the wave of so-called “scripting languages”.
2023-03-24
:: Jimmy Hartzell
#programming
#computers
#Rust
#Rust Tidbits
This is a collection of little Rust thoughts that weren’t complicated
enough for a full post. I saved them up until I had a few, and now I’m
posting the collection. I plan on continuing to do this again for
such little thoughts, thus the #1 in the title.
serde
flattening
What if you want to read a JSON file, process some of the fields, and
write it back out, without changing the other fields? Can you still use
serde
? Won’t it only keep fields that you know about in your data
structure?
2023-03-23
:: Jimmy Hartzell
#essays
#literature
#Tolkien
#nontechnical
Tolkien was trying to make a new mythology, a new set of deeply resonant
stories, for modern (especially English) culture, and he succeeded.
He transformed fantasy, and founded the concept of high fantasy. His
detailed legendarium (as his mythology is called) is a masterpiece of
world-building, with deep symbolism and emotional complexity, a mythology
with arguably more depth and room to explore than many ancient ones.
Tolkien scholars work full-time to study it, and many more people draw
from it explicitly and implicitly for their own art, in D&D and other
more modern fantasy settings. Especially with his near-human species,
his concepts of hobbits (off-brand as halflings) and elves (distinct
from previous iterations) have deeply resonated with many people.
2023-03-21
:: Jimmy Hartzell
#programming
#logging
#Rust
#computers
Intro programming classes will nag you to do all sorts of
programming chores: make sure your code actually compiles,
write unit tests, write comments, split the code into functions
(though sometimes the commenting and factoring advice is
bad). Today, however,
I want to talk about one little chore, one particular little habit, that
is just as essential as all of those things, but rarely covered in the
CS100 lectures or grading rubrics: logging.
2023-02-28
:: Jimmy Hartzell
#essay
#nontechnical
#linux
#computers
#organization
#ADHD
#write-everything-down
I’d like to share with you how I use my computer, in a way that is
(for me) ADHD friendly and well-suited for implementing
my organization system. Tools are
important to any organizational and productivity system, and optimizing
your tools for your brain and your workflow are important. My computer
is my most important productivity tool, where my work happens, and where
my life/chore/errand/calendar organization happens, so it should be an
interesting example of an optimized key tool.
2023-02-07
:: Jimmy Hartzell
#programming
#Rust
#OOP
#Beyond OOP
#computers
In this post, I continue my series on how Rust
differs from the traditional object-oriented programming paradigm by
discussing the second of the three traditional pillars of OOP:
polymorphism.
Polymorphism is an especially big topic in object-oriented programming,
perhaps the most important of its three pillars. Several books could be
(and have been) written on what polymorphism is, how various programming
languages have implemented it (both within the OOP world and outside of it
– yes, polymorphism exists outside of OOP), how to use it effectively,
and when not to use it. Books could be written on how to use the Rust
version of it alone.
2023-02-02
:: Jimmy Hartzell
#essay
#nontechnical
#economics
#politics
The validity of the public debt of the United States, authorized by law,
including debts incurred for payment of pensions and bounties for services
in suppressing insurrection or rebellion, shall not be questioned.
- US Constitution, 14th Amendment, Section 4
The debt ceiling is unconstitutional. We’ve let the Republicans play their
games for long enough, in the interest of “stability of the economy” and a
general fear of rocking the boat, but that time is over now. President
Biden should simply announce that his administration will not follow
this brazenly unconstituional law, because unconstitutional is literally
what it is, and every Congressperson who wants to use it as leverage is
in flagrant violation of their oath of office.
2023-01-30
:: Jimmy Hartzell
#programming
#C++
#Rust
#Rust vs C++
#essays
#computers
The NSA recently published a Cybersecurity Information
Sheet
about the importance of memory safety, where they recommended
moving from memory-unsafe programming languages (like C and
C++) to memory-safe ones (like Rust). Dr. Bjarne Stroustrup, the
original creator of C++, has made some
waves
with his
response.
To be honest, I was disappointed. As a current die-hard Rustacean
and former die-hard C++ programmer, I have thought (and
blogged) quite a bit about the topic of Rust vs
C++. Unfortunately, I feel that in spite of the exhortation in his title
to “think seriously about safety,” Dr. Stroustrup was not in fact thinking
seriously himself. Instead of engaging conceptually with the article,
he seems to have reflexively thrown together some talking points –
some of them very stale – not realizing that they mostly are not even
relevant to the NSA’s Cybersecurity Information Sheet, let alone a
thoughtful rebuttal of it.
2023-01-18
:: Jimmy Hartzell
#essays
#ADHD
#neurodiversity
#autism
#nontechnical
ADHD is a controversial topic, and it’s never been more
relevant. Diagnoses are soaring right now, driven up by a variety of
interacting forces. Open discussion about ADHD – and the related general
concept of “neurodiversity” – has been exploding on the Internet. And
recently, there’s been a very unfortunate Adderall shortage.
So I wanted to take an opportunity to share some thoughts about it.
I would say that I was taking this opportunity to clear things up,
but unfortunately, that might not be possible. The reality is a really
muddy situation, and many people’s mental models – including many
professionals’ – are oversimplifications.
2023-01-11
:: Jimmy Hartzell
#programming
#Rust
#OOP
#Beyond OOP
#computers
Rust doesn’t support default parameters in function signatures.
And unlike in many languages, there’s no way to simulate them
with function overloading. This is frustrating for many new Rustaceans
coming from other programming languages, so I want to explain
why this is actually a good thing, and how to use the Default
trait
and struct update
syntax
to achieve similar results.
Default parameters (and function overloading) are not part of
object-oriented programming, but they are a common feature of a lot
of the programming languages new Rustaceans are coming from. This
post therefore fits in some ways with my on-going series on how Rust
is not object-oriented, and so it is tagged with
that series. It was also inspired by Reddit responses to my first OOP
post.
2023-01-03
:: Jimmy Hartzell
#essay
#religion
#Christmas
#nontechnical
Today, in liturgical Western Christianity, it is the 10th day of
Christmas. Merry Christmas to those who celebrate the extended edition
of the holiday!
Unfortunately, this essay is not a celebration of Christmas, but rather
an explanation of why I have often found it disappointing recently in life,
because of a disconnect between the promise and the reality.
Every time Christmas comes around, I think of a classical sacred choral
piece that I’ve performed in multiple different choirs in youth and
adulthood, from Mendelssohn’s Christus, namely “Es Wird ein Stern aus
Jakob Aufgeh’n” (“There shall come a star out of Jacob”).
2022-12-21
:: Jimmy Hartzell
#essays
#nontechnical
Happy December! Happy Winter Holidays! We’re almost done with 2022!
I just had my birthday yesterday, on December 20. I am now
34 years old, which is more than a third of a century! I
generally take the opportunity on my birthday to do some
reflection on the previous year, and to set a theme for the next
year.
I wanted to share both with you, my audience.
The past year has been intense for me personally. It’s just been a
laundry list of life changes and achievements:
2022-12-12
:: Jimmy Hartzell
#programming
#Rust
#OOP
#Beyond OOP
#computers
Rust is not an object oriented programming language.
Rust may look like an object-oriented programming language: Types can be
associated with “methods,” either “intrinsic” or through “traits.” Methods
can often be invoked with C++ or Java-style OOP syntax: map.insert(key, value)
or foo.clone()
. Just like in an OOP language, this syntax
involves a “receiver” argument placed before a .
in the caller,
called self
in the callee.
But make no mistake: Though it may borrow some of the trappings, some of
the terminology and syntax, Rust is not an object-oriented programming
language. There are three pillars of object-oriented programming:
encapsulation, polymorphism, and inheritance. Of these, Rust nixes
inheritance entirely, so it can never be a “true” object-oriented
programming language. But even for encapsulation and polymorphism,
Rust implements them differently than OOP languages do – which we
will go into in more detail later.
2022-10-31
:: Jimmy Hartzell
#programming
#ADHD
#organization
#computers
2022-10-24
:: Jimmy Hartzell
#computers
#reviews
#asahi linux
I bought my M1 Mac over a year ago with the intention of installing Asahi
Linux on it, but I never got around to it until now. I am still thrilled
to be using an ARM workstation made by a major computer manufacturer,
and it’s good to be able to run the operating system of my choice on it
(though macOS is acceptable for entertainment and video calls, Linux
is what I work and do my organization in). And I
don’t particularly do GPU-intensive things in my day to day computing –
I run XMonad, of all things! – so I don’t really feel like I’m missing
out by not having a “proper” graphics driver.
2022-10-11
:: Jimmy Hartzell
#programming
#Rust
#Rust vs C++
#C++
#computers
I don’t want you to think of me as a hater of C++. In spite of the fact
that I’ve been writing a Rust vs C++ blog series
in Rust’s favor (in which this post is the latest installment), I am very
aware that Rust as it exists would never have been possible without C++.
Like all new technology and science, Rust stands on the shoulders of
giants, and many of those giants contributed to C++.
2022-10-06
:: Jimmy Hartzell
#essays
#ADHD
#organization
#write-everything-down
#nontechnical
As promised in my previous
posts about organization,
I will now go into some detail about my own organizational system.
But before I start talking about it, and how I came to develop it, I’d
like to emphasize a few points, or more specifically, three caveats,
lest Zeus strike me down with a thunderbolt for my hubris:
- Caveat the First: My system is a work in progress. Even though
it is overall very helpful, it’s always falling apart a little bit.
Some parts of it work better than others, and it’s constantly evolving
as I try to shore up the parts that fall apart more easily. Sometimes,
it’s in a better state than others.
- Caveat the Second: What works for me might well not work for you,
dear reader. I reckon you and I have very different brains. Even if
a psychiatrist would categorize me and you with all the same formally
recognized traits, we still have literally different brains, and
literally different histories, cultural backgrounds, and personal
struggles.
- Caveat the Third: Nothing in this system is particularly novel.
It is however very tweaked to my own personality. I present this not
to claim that I’ve developed anything new, but as a worked example of applying
existing practices to my own life, in hopes that it will be useful
to you.
And it is indeed a very personal system and a continuously evolving
system. I am sensitive to minor issues. If a TODO list system
is insufficiently ergonomic for me, I’ll get overwhelmed by it,
or intimidated by it, disheartened, blocked out by my personal “Wall of
Awful”,
and I will default to not using any organizational system at all, and
simply relying on my natural faculties – my naturally poor prospective
memory – to make sure I do the things I need to do.
2022-10-05
:: Jimmy Hartzell
#essays
#ADHD
#organization
#write-everything-down
#nontechnical
In my previous post on
organization, I concluded with this statement:
As everyone’s brain works differently (whether ADHD or not), people differ
tremendously in what their ideal organizational systems are. For me,
I am much less productive if I have a less than ideal system – the
stakes are very high. But even for people who can be productive on any
system, I think that tailoring their system to their brain, their lifestyle,
their job and schedule and hobbies, can have amazing results.
2022-09-15
:: Jimmy Hartzell
#rust
#programming
#computers
I’m a Rust programmer and in general a fan of strong typing over dynamic
or duck typing. But a lot of advocacy for strong typing doesn’t actually
give examples of the bugs it can prevent, or it gives overly simplistic
examples that don’t really ring true to actual experience.
Today, I have a longer-form example of where static typing can help
prevent bugs before they happen.
The Problem
Imagine you have a process that receives messages and must respond
to them. In fact, imagine you have potentially many such processes,
and want to write a framework to handle it.
2022-08-13
:: Jimmy Hartzell
#programming
#Rust
I came across a programming problem recently where I wanted to use
dynamic polymorphism with serde
. This turned out to be much easier
than I expected, and I thought it was an interesting enough case
study to share, especially for people who are learning Rust.
A Brief Discussion of Polymorphism in Rust
As most of you will know, Rust’s system for polymorphism – trait
s
– supports both static and dynamic polymorphism, with a bias towards
static polymorphism.
2022-08-10
:: Jimmy Hartzell
#essays
#ADHD
#organization
#write-everything-down
#nontechnical
Memory Leak
I have an excellent memory. I have a terrible memory.
Well, which one is it?
This is a confusing state to be in. It can be frustrating to people
around me. How is it – my father used to ask me when I was in high
school – that I could remember all the lessons and readings for my tests
in school, and get all the good grades, but couldn’t ever remember to do
the simplest task or household chore, or to bring with me the simplest
item? And of course the fact that I remember these conversations from
so long ago is a bit of a case in point.
2022-08-08
:: Jimmy Hartzell
#programming
#rust
#async
#computers
Using async
in Rust can lead to bad surprises. I recently came across
a particularly gnarly one, and I thought it was interesting enough to
share a little discussion. I think that we are too used to the burden
of separating async
from blocking being on the programmer, and
Rust can and should do better, and so can operating system APIs,
especially in subtle situations like the one I describe here.
2022-07-14
:: Jimmy Hartzell
#programming
#Rust
#computers
UPDATE 2: I have made the title longer because people seem to be
insisting on misunderstanding me, giving examples where the only
reasonable thing to do is to escalate an Err
into a panic. Indeed,
such situations exist. I am not advocating for panic-free code.
I am advocating that expect
should be used for those functions,
and if a function is particularly prone to being called like that
(e.g. Mutex::lock
or regex compilation), there should be a panicking
version.
2022-07-06
:: Jimmy Hartzell
#reviews
#nontechnical
I enjoyed Plain Truth
by Jodi Picoult. I finished it a couple of months ago, when I was
feeling very restless and impatient about
everything going on in my life. At the time, I desperately needed
fun books to read, but I was simultaneously having a lot of trouble
finishing books.
This book pulled me the whole way through when other books were
failing to: It was in a setting, the Amish communities, that had always
interested me. It was competent enough dealing with that community to
not drive me away. It made nuanced and smart enough points to keep me
engaged, without being so subtle or so sophisticated as to be too heavy
or dry or otherwise difficult to get through. All in all, the perfect
balance for where I was just then.
2022-06-17
:: Jimmy Hartzell
#programming
#Haskell
#computers
The Error Message
I’ve written before about just how befuddling
Haskell error messages can be, especially for beginners. And now, even
though I have some professional Haskell development under my belt, I
ran across a Haskell error message that confused me for a bit, where I
had to get help. It’s clear to me now when I look at the error message
what it’s trying to say, but I legitimately was stumped by it, and so,
even though it’s embarrassing for me now, I feel the need to write about
how this error message could have been easier to understand:
2022-06-16
:: Jimmy Hartzell
#programming
#computers
#Rust
It took me a long time to admit to myself that the venerable Unix
command line interface is stuck in the past and in need of a refresh,
but it was a formative moment in my development as a programmer when I
finally did. Coming from that perspective, I am very glad that there is a new
wave of enthusiasm (coming especially from the Rust community) to build
new tools that are fixing some of the problems with this very old and
established user-interface.
2022-06-14
:: Jimmy Hartzell
#essays
#linguistics
#nontechnical
I am an Ivy League-educated professional who regularly has to write
for my job, who was always in the top English classes in school. And
sometimes, I mix up “your” and “you’re.”
I know how grammar works. I always, if I stop to think about it, can
figure out which one to use. I know all the tricks. Most of the time, I
don’t have to think about it, and the right one comes out. But sometimes,
I’m just thinking in terms of what sounds I would make if I were speaking,
and I’m in a rush or just distracted or just glitching, and the wrong
one comes out.
2022-06-06
:: Jon Gjengset
#Rust
#programming
#computers
Preface (by Jimmy Hartzell)
I am a huge fan of Jon Gjengset’s Rust for
Rustaceans,
an excellent book to bridge the gap between beginner
Rust programming skills and becoming a fully-functional
member of the Rust community. He’s famous for his YouTube
channel
as well; I’ve heard good things about it (watching video
instruction isn’t really my thing personally). I have also
greatly enjoyed his Twitter feed,
and especially have enjoyed the thread surrounding this
tweet:
2022-06-04
:: Jimmy Hartzell
#Rust
#programming
#computers
I just made a pull request
to reqwest. I thought this
particular one was interesting enough to be worth blogging about, so I am.
We know that many C++ family languages have a feature known as function
overloading, where two functions or methods can exist with the same name
but different argument types. It looks something like this:
void use_connector(ConnectorA conn) {
// IMPL
}
void use_connector(ConnectorB conn) {
// IMPL
}
The compiler then chooses which method to call, at compile-time, based
on the static type of the argument. In C++, this is part of compile-time
polymorphism, an easy “if
statement” in the template meta-language. In
Java and many other languages, it’s merely a convenience, for when an
ad-hoc group of types are possible for what an outsider sees as the
same operation, but which from the perspective of the library requires
different implementations.
2022-06-01
:: Jimmy Hartzell & Doug
#reviews
#hugo
#Sci Fi
#nontechnical
We decided to write up our thoughts on each of the short stories nominated
for the 2022 Hugo awards. Of course, here be spoilers, spoilers galore. If
you don’t want these stories spoiled, go read them, and then come back
here.
This is the same concept as Jimmy’s review of the 2021
nominees, and so we shall adapt the explanation from
that post:
As an exercise, we read each of these stories and told each
other what we thought the themes were, and I reference that throughout
these reflections. Themes, as we define them, are thematic statements:
the point the story is trying to make. Themes are distinct from thematic
concepts, in that they are complete sentences rather than just nouns.
They are distinct from premises, in that they are the take-away for
the real-world, not a statement about the world of the story. And, to be
clear, there can be more than one completely valid answer. Both of us would posit what we thought the theme was, answering independently
without consulting each other, and then we would discuss the story in
greater detail.
2022-05-27
:: Jimmy Hartzell
#essays
#nontechnical
Netflix should become a tech company.
I hear the obvious response already: Jimmy, Netflix is already
a tech company!
Counterpoint: Is it though?
Somehow, after two dot-com booms, the markets still have an
aesthetic-based definition of what constitutes a “tech company”: If a
company – any company – has an expensive enough app, and if its founders
talk enough about “disrupting” industries, then it is a “tech company” and
is therefore entitled to a valuation completely disconnected from
its actual industry. Think WeWork – and think what happened to it as people
gradually realized it wasn’t an exciting tech start-up but rather a quite
boring real estate company. Turns out, you don’t need an expensive app
to run a coworking space.
2022-05-11
:: Jimmy Hartzell
#rust
#programming
#computers
#C++
#Rust vs C++
There’s more than one way to do it.
There should be one– and preferably only one –obvious way to do it.
When it comes to statically-typed systems programming languages, C++ is
the Perl, and Rust is the Python. In this post, the next installment of
my Rust vs C++ series, I will attempt to explain
why C++’s feature-set is problematic, and explain how Rust does better.
2022-05-09
:: Jimmy Hartzell
#programming
#computers
I have worked on a lot of programming projects in my time, and while I
was a programming consultant I have worked in a lot of different corporate
environments. At some of them, it was easy to be concretely productive:
I was able to contribute immediately, and at a rapid rate. At others,
actual useful contributions would be impossible until I had a month or
more of experience with a codebase, and even then every change would be
a long slog. The difference can be overwhelming and palpable.
2022-04-20
:: Jimmy Hartzell
#essay
#organization
#nontechnical
I’ve been feeling recently like I’ve been spinning my wheels in my
personal life. I’m pressing on the metaphorical accelerator as hard
as I can, probably too hard for safety, and instead of moving forward,
the wheels are just spinning, spinning, spinning. I think a large part
of it is my perspective of time. “Time is canceled,” my friends and I
would say continuously during the lockdown. And it isn’t back, not yet,
not how it used to be, not for me.
2022-04-19
:: Jimmy Hartzell
#essay
#finance
#nontechnical
Mortgage interest rates have recently risen, and are currently very
volatile. At the time of this writing, PSECU, my credit union, is
offering mortgages at 5.125%, much higher than the 3.125% I locked in
at, but lower than the peak above 6% I had recently read about in the
news. But what does this mean in practice? Well, let’s run some numbers.
Understanding how expensive a house is can be confusing. The total
price of a house is a huge number, more money than we normally ever
deal with, for most first-time buyers more money than they’ve
ever actually had or seen. It can be intimidating.
2022-04-10
:: Jimmy Hartzell
#reviews
#hugo
#Sci Fi
#nontechnical
NB: These are for the 2021 Hugo awards, not the recently-announced
2022 Hugo awards. That one is coming soon.
I decided to write up my thoughts on each of the short stories nominated
for the 2021 Hugo awards. Of course, here be spoilers, spoilers galore. If
you don’t want these stories spoiled, go read them, and then come back
here.
As an exercise, a friend and I read each of these stories and told each
other what we thought the themes were, and I reference that throughout
these reflections. Themes, as we define them, are thematic statements:
the point the story is trying to make. Themes are distinct from thematic
concepts, in that they are complete sentences rather than just nouns.
They are distinct from premises, in that they are the take-away for
the real-world, not a statement about the world of the story. And, to be
clear, there can be more than one completely valid answer. Both my friend
and I would posit what we thought the theme was, answering independently
without consulting each other, and then we would discuss the story in
greater detail.
2022-04-08
:: Jimmy Hartzell
#reviews
#nontechnical
I like beer, and I like comic books, so I
was excited to read The Comic Book Story of
Beer.
And it was overall quite a fun read! It contextualized how important
beer was in antiquity – including theories that beer catalyzed the
agricultural revolution – and how important it’s been in society
ever since, taking a social approach to the entire history, while
also explaining a lot of the science alongside the primarily social
narrative. It was a really fun read, and I recommend it to anyone who
enjoys beer or who cares about history, which I think is most people.
2022-03-22
:: Jimmy Hartzell
#essay
#computers
#programming
#nontechnical
NOTE: This post has the #programming tag, but is intended to be comprehensible
by everyone, programmer or not. In fact, I hope some non-programmers
read it, as my goal with this post is to explain some of what it means
to be a programmer to non-programmers. Therefore, it is also
tagged with “nontechnical”.
What is the most important skill for a software engineer? It’s
definitely not any particular programming language; they come and
go,
and a good programmer can pick them up as they work. It’s not estimating
how long a project will take, as important and elusive as that skill
is – because fundamentally, no one can, and many, many programmers are
successful without having fully built up that skill.
2022-03-12
:: Jimmy Hartzell
#programming
#Rust
#computers
#C++
#Rust vs C++
For my next entry in my series comparing Rust
to C++, I will be discussing a specific data structure API: the Rust
map API. Maps are often one of the more awkward parts of a collections
library, and the Rust map API is top-notch, especially its
entry API – I literally squealed
when I first learned about entries.
And as we shall discuss, this isn’t just because Rust made better choices
than other standard libraries when designing the maps API. Even more so,
it’s because the Rust programming language provides features that better
expresses the concepts involved in querying and mutating maps. Therefore,
this serves as a window into some deep differences between C++ and Rust
that show why Rust is better.
2022-03-07
:: Jimmy Hartzell
#essay
#travel
#nontechnical
I am out of biking shape. I know I am out of biking shape. The pandemic
has not been good to my physical fitness. (For the record, this isn’t
a proper edited and outlined and triaged essay,
just some notes on my past weekend.)
But as out of shape as I am, I also know it’s only
25 miles from here to Philly on the Schuylkill River
Trail, and so I
figured maybe I could do it without any additional prep. When I found
out that it was less hilly than the longer bike rides I used to do,
I was sold, and I did it.
2022-03-04
:: Jimmy Hartzell
#essay
#ADHD
#organization
#nontechnical
For a time, I tried to cultivate an interest
in Go. Not this Go, but this
Go. The interest didn’t
last long – like chess, I had a hard time getting up to even a fairly
basic level of competence. And I quickly developed another enthusiastic
interest to replace it – sometimes, an interest just doesn’t work out,
and it’s nobody’s fault, and you have to just move on and not get too
sad, because there’s plenty of fish in the sea.
2022-02-28
:: Jimmy Hartzell
#programming
#historical
#computers

Let’s talk about an ancient programming language! I think we
can all learn things from history, and it gives us grounding
to realize that our time is just one time among many, to see
what people in the past did differently, what they got wrong
that we would never do now, and also to see what they got right.
Do you remember MS-DOS? Do you remember that it came with
an interpreted programming language? From MS-DOS 5 onwards,
it came with not Python, not Javascript or R or Matlab,
but a dialect
of BASIC. But
I think most people, especially most people my age who
were children at the height of the MS-DOS era, remember
it for the games, the two sample programs that came with it, namely
Gorillas
and Nibbles (their name for Snake).
2022-02-25
:: Jimmy Hartzell
#Rust
#programming
#computers
What is “bad” Rust?
When we say that a snippet of code is “bad” Rust, it’s ambiguous.
We might on the one hand mean that it is “invalid” Rust, like the
following function (standing on its own in a module):
fn foo(bar: u32) -> u32 {
bar + baz // but baz is never declared...
}
In this situation, a rule of the programming language has been violated.
The compiler stops compiling and does not output a binary. In fact, it
has to stop compiling, because this is not a Rust program. It might resemble
one, but it in fact does not make any sense, because it is violating
one of the extra-syntactic constraints that text has to have to be a Rust
program.
2022-02-16
:: Jimmy Hartzell
#programming
#Haskell
#computers
I am a big fan of strongly typed languages, and my favorite GC’d language
is Haskell. And I want you, the reader, to keep that in mind today.
What I am writing is some commentary about a language I deeply love,
some loving criticism.
So here’s what happened: A few days ago, I was showing off some Haskell
for a friend who primarily programs in Python. The stakes were high
– could I demonstrate that this strange language was worth some
investigation?
2022-02-08
:: Jimmy Hartzell
#essay
#finance
#nontechnical

I just bought a house, and it came with a mortgage. I bought the
house and committed to the mortgage all in one ceremony, in a cute
little office where I signed enough papers that the sellers were
able to solemnly hand me the keys to my new castle. In the lead-up to
this, I was told how early payments, mortgage insurance, and refinancing
works, and it’s – I think very reasonably – been on my mind since.
2022-02-02
:: Jimmy Hartzell
#essay
#writing
#programming

Imagine you don’t know who Napoleon was. You know he’s a figure from
history, but you don’t even know he has to do with France. And imagine,
when you read the Wikipedia article, for some reason you skip the opening
paragraphs above the fold, and you’re reading about his upbringing
in Corsica as a petty Italian noble under French rule. And you just
want to know, why’s this guy important, what’s his deal, why do people
keep talking about him (something military, it seems?) but you have
to read two-thirds of the way through the article to find out, oh, he
became Emperor of the French. Finally, you have context to understand
everything else, and you now know the first thing about Napoleon.
2022-01-20
:: Jimmy Hartzell
#programming
#Rust
#Rust vs C++
#C++
#computers
For this next iteration in my series comparing
Rust to C++, I want to talk about something I’ve been avoiding so far:
memory safety. I’ve been avoiding this topic so far because I think it
is the most discussed difference between C++ and Rust, and therefore I
felt I’d have relatively little to add to the conversation. I’ve also
been avoiding it because I wanted to draw attention to all the other
little ways in which Rust is a better-designed programming language,
to say that even if you concede to the C++ people that Rust isn’t “truly
memory safe” or “memory safe enough,” Rust still wins.
2022-01-03
:: Jimmy Hartzell
#programming
#Rust
#computers
#async
Finally in 2019, Rust stabilized the async
feature, which supports
asynchronous operations in a way that doesn’t require multiple operating
system threads. This feature was so anticipated and hyped and in
demand that there was a website whose sole
purpose was to announce its stabilization.
async
was controversial from its inception; it’s still controversial
today; and in this post I am throwing my own 2 cents into this
controversy, in defense of the feature. I am only going to try to
counter one particular line of criticism here, and I don’t anticipate
I’ll cover all the nuance of it – this is a multifaceted issue, and
I have a day job. I am also going to assume for this
post that you have some understanding of how async
works, but if
you don’t, or just want a refresher I heartily recommend the Tokio
tutorial.
2021-11-21
:: Jimmy Hartzell
#programming
#Rust
#computers
I have been working on a serialization project recently that involves
endianness (also known as byte order), and it caused me to explore parts
of the Rust standard library that deals with endianness, and share my
thoughts about how endianness should be represented in a programming
language and its standard library, as I think this is also something
that Rust does better than C++, and also makes for a good case study to
talk about API design and polymorphism in Rust.
2021-11-03
:: Jimmy Hartzell
#programming
#Rust
#Rust vs C++
#C++
#computers
This post is part of my series
comparing C++ to Rust, which I introduced
with a discussion of C++ and Rust syntax. In
this post, I discuss move semantics. This post is framed around the
way moves are implemented in C++, and the fundamental problem with
that implementation, With that context, I shall then explain how Rust
implements the same feature. I know that move semantics in Rust are often
confusing to new Rustaceans – though not as confusing as move semantics
in C++ – and I think an exploration of how move semantics work in C++
can be helpful in understanding why Rust is designed the way it is,
and why Rust is a better alternative to C++.
2021-10-26
:: Jimmy Hartzell
#programming
#Rust
#Rust vs C++
#C++
#computers
This past May, I started a new job working in Rust. I was somewhat
skeptical of Rust for a while, but it turns out, it really is all it’s
cracked up to be. As a long-time C++ programmer, and C++ instructor,
I am convinced that Rust is better than C++ in all of C++’s application
space, that for any new programming project where C++ would make sense
as the programming language, Rust would make more sense.
2020-11-17
:: Jimmy Hartzell
#fiction
#nontechnical
Humpty Dumpty sat on a wall
Humpty Dumpty had a great fall
All the king’s horses and all the king’s men
Were too busy deciding who would be king…
To even TRY to put Humpty Dumpty together again.
And he’s just sitting there, all yolk and shell, waiting…
2020-11-16
:: Jimmy Hartzell
#computers
This year, Apple released, to much fanfare, a somewhat obscure
technical change to how its computers work: Macs will transition
away from Intel’s CPUs to in-house processors known as “Apple
Silicon,” more similar to the technology Apple already
uses in its phones and tablets. It is a tremendous amount of
hype for something rather technical, and to people used to more
user-visible feature announcements, this can be
somewhat disappointing,
or at least confusing.
2020-10-28
:: Jimmy Hartzell
#fiction
#nontechnical
Five Members sat in council.
There are some activities, some patterns of human group behavior,
that transcend era and culture, and meeting in council is
one of them. In spite of the youth of the participants –
they were in their late teens and early 20’s – and the
informality of the setting – leather couches covered in scratch
marks, unfinished walls – they still clearly were sitting in
council. The seriousness with which they were watching the video,
their intentional and controlled posturing and nuanced glances,
would have been instantly recognizable to any Parliament or
Diet throughout history. They had met to do business, to make
a decision, to come to a consensus.
2020-05-14
:: Jimmy Hartzell
#fiction
#nontechnical
In front of Penny in line was a 7 foot tall humanoid with glowing
blue skin. She suppressed the urge to ask what species they were,
and let the alien order their vegan breakfast burrito. The barista at
United Planets’ first-floor Starbucks looked human except for the
extra hands. Polycherian, Penny remembered. When the barista handed
Penny her order – an egg and cheese sandwich on a bagel – Penny bowed
respectfully and said pflintsu – Polycherian for “thank you” –
before getting on the elevator.
2020-03-23
:: Jimmy Hartzell
#essay
#politics
#nontechnical
Even early last week, before restaurants were closed, before we were
banned from unnecessary gatherings, when many people still had to go
into their office jobs, the bars were empty on my street. I walked
into one, ordered a cocktail, asked the bartender why it was so slow.
It was usually slow on Tuesdays, of course, but normally there was
at least one other customer. But the pandemic had already scared
everyone else away, and if it continued, the bar would surely have
to close.
2019-12-23
:: Jimmy Hartzell
#computers
The Internet promised — and still promises — a revolution in
democratic, decentralized, and open communications. And yet,
we see today a tech world controlled by a few central players,
as Elizabeth Warren promises to break them up and Congress summons
Mark Zuckerberg to explain his company’s role in privacy-violating
election-manipulating foreign conspiracies. But Presidential use of
anti-trust laws and new Congressional regulations of social media
won’t address the more fundamental issues: The Internet is now
structured, on a technical and social level, so as to naturally
encourage centralized monopolies.
2019-10-10
:: Jimmy Hartzell
#fiction
#nontechnical
Kayleigh needed a break from work.
When you need a break from work, sometimes you go to the bathroom. Sometimes you stop by the
coffee machine, chat with a colleague while it brews. And sometimes, you straight-up leave
the office and walk to a nearby bar. Today, Kayleigh found herself taking that last option.
She didn’t normally do this — she felt that, as the boss, she had to hold herself
to a higher standard than anyone else, and drinking before the end of the workday was
against policy. But today — well, she figured she just really could use a drink.
2019-08-11
:: Jimmy Hartzell
#programming
#Haskell
#computers
When I was first learning to program, a long time ago, it was in
BASIC, and you had to annotate your variable names to indicate what
type something is. foo
would be a number, whereas foo$
would be a
string. This meant that there could only be as many types of information
as there were symbols to put after your variable, but that was okay for
the sort of programming BASIC was used for. These were called sigils,
and they helped you keep straight in your head what was going on +++
and made it easier for the computer too. Any aggregates had to be
explicitly declared.
2019-07-22
:: Jimmy Hartzell
#fiction
#nontechnical
ENVELOPE HEADER:
Date: January 5, 2027
To: Rachel Friedman, President of the United States and Leader of the Free World
From: The Roots of the Great Trees of Galaxy-Wide Civilization
Subject: An Offer, an Apology, and an Explanation
The Offer
In the name of the One Almighty God: in the name of the Many Stars
through which God is made manifest, in the name of the manifestation
of God you call the Sun, and in the name of Original Star from Before Time,
we offer you peace, not of a lack of conflict, but of a mutual growth.
As branches must look to the vine for sustenance, so must you look
towards us, as your own scriptures say, being a reflection of the truth.
2019-07-11
:: Jimmy Hartzell
#computers
#operating systems
#technical
In previous posts,
we discussed historic operating systems and where various OS features come
from, but we only gave a brief overview of how they worked.
Now that we have a modern operating system’s full complement of features,
we can look at what components need to exist in a modern operating system
to get those features. As discussed with MS-DOS, an operating system,
even today, is partially code, and partially conventions, like file
formats or rules of good behavior – the difference being, that modern
operating systems have more ability to enforce some of these
conventions.
2019-06-20
:: Jimmy Hartzell
#essay
#religion
#nontechnical
Father, forgive them, for they do not know what they are doing.
- Jesus, on the cross (Luke 23:34)
My grandfather always used to love telling a certain anecdote about
Calvin Coolidge. He was a man of such few words that one time, President
Coolidge went to hear a world-famous preacher preach. Upon returning from
the sermon, his wife asked what it was about. He replied “sin.” Not
satisfied with the answer, the wife asked, “Well, what did the preacher
have to say about sin?” The response: “He’s against it.”
2019-06-19
:: Jimmy Hartzell
#essay
#travel
#nontechnical
Just wanted to write up a summary of random notes from my Switzerland
trip, not including the conference which
was also a lot of fun but I think less interesting for my non-programmer
friends, slash it might make for a better separate post.
SIM set up
It was relatively easy to buy a Swisscom SIM card in the airport, although they
did not offer to set it up in my phone for me. This would’ve been useful, as it
turns out my phone was locked (which is more an idiosyncracy of the US as opposed
to Switzerland). I instead ended up purchasing a mobile hotspot (the German word
for which, I was told, was “Mobile Hotspot”), which was easy to set up and worked
perfectly with my phone.
2019-06-10
:: Jimmy Hartzell
#fiction
#nontechnical
Julia liked Eric. She wasn’t in love with Eric, she didn’t fantasize
about marrying him or idly think about what their children would be
like, but she liked him, an appropriate amount for having met him only
two times. Internet dating was strange to her, and she knew that dating
took work. And besides, it was a good sign she was mature enough to not
feel those goofier feelings yet. She would instead be, appropriately,
cautiously yet earnestly excited.
2019-05-26
:: Jimmy Hartzell
#computers
#operating systems
#technical
We use operating systems all the time in our life, whether designed for
a computer, a phone, or for a server we’re more indirectly interacting
with, but a lot of people don’t know very much about what connects
the different systems we use, and what makes them distinct. We
discussed fundamental concepts of operating systems in the last
post, so in this post we will discuss
how some of the same concepts apply to modern operating systems, going
over them one at a time.
2019-05-12
:: Jimmy Hartzell
#essay
#music
#religion
#nontechnical

I just finished singing Beethoven’s Missa Solemnis
in a concert as a member of the Grace Church Choral
Society, and it was
the most technically difficult piece I have ever sung in
a choir. It was a single piece of concert length, a mass
setting,
as is custom for our spring concerts. It was all in one language: in this case,
in Latin. This is different from our holiday concerts
in the winter, where we sing a variety of Christmas-y and otherwise
celebratory works in a variety of (European, Christian) languages, including
English.
2019-04-28
:: Jimmy Hartzell
#computers
#operating systems
#technical
A user of modern technology hears the term “operating system” thrown
around a lot. Most people can name a few examples: Windows and macOS on
workstations and laptops, iOS and Android on phones. Some people might
even throw in Linux or Unix or ChromeOS. Most people also understand
that a program or a game or even a sufficiently advanced website might
work on some operating systems but not others, and might require different
versions for different operating systems. But it’s a bit less clear what
an operating system actually is, how it fits into the general model of
a computer, and how it works.
2019-04-27
:: Jimmy Hartzell
#fiction
#nontechnical
When Rajnish had agreed to mentor an intern, he was not expecting such
a young girl. He was a little bit reassured when he was told how well
Erica had done in college, that she was a “genius” — a dubious word,
he would’ve preferred a “hard worker” or a “promising candidate” —
but how could anyone deserve to be a junior in college at 17? She must
be tricking everyone. When he was that age, he certainly had no business
being in an internship — he had perhaps only seen a computer a handful
of times.
2019-03-22
:: Jimmy Hartzell
#essay
#politics
#nontechnical
A common trope within left-leaning American circles is to claim that the
US is the only “developed” or “industrial” or “major” or “first world”
country to not have X, where X is usually something like “publicly funded
health care” or “government-guaranteed paid family leave” or similar.
Recently this came up with Bernie Sanders and his common refrain that
the US was the only “major” country to not guarantee health care as a
human right. Much to my relief, the often myopic fact-checkers at Politifact
marked this one as half-true. I think it bothered me so
much because it implied that India was not “major” — a country that I
lived in for two months, made good friends in, and would have lived in for
at least another two months if not for an entire year if it hadn’t been
for the vagueries of careers, and also a country that economically is
having a lot of impact, and contains around 15% of the entire world’s
population.
2019-02-28
:: Jimmy Hartzell
#essay
#religion
#nontechnical
[Jesus said:] You have heard that it was said, “You shall not commit
adultery.” But I say to you that everyone who looks at a woman with
lustful intent has already committed adultery with her in his heart. If
your right eye causes you to sin, tear it out and throw it away. For it
is better that you lose one of your members than that your whole body be
thrown into hell. And if your right hand causes you to sin, cut it off and
throw it away. For it is better that you lose one of your members than
that your whole body go into hell.
2019-02-26
:: Jimmy Hartzell
#programming
#C++
#computers
Programmers of functional programming languages will often point out that,
in functional programming languages, the order of the arguments is often
significant, because of currying.
If you have a function that takes two
arguments (e.g. map which takes a function to apply and a list to apply
it to) it actually takes the first argument, and returns a function that
takes the second argument and returns the final result. This makes it more
convenient to write a lambda where the second argument is the unknown
parameter: \x -> map someFunc x
can be written as map f
, whereas \f -> map f someValue
has no such convenient shorthand (flip map someValue
is actually clunkier).
2019-01-18
:: Jimmy Hartzell
#fiction
#nontechnical
The intern was nervous as she approached her boss, manila folder in
hand. “Congresswoman Fischer,” she said, “I’m not sure I was actually
supposed to see this document — I think it might be classified
— but you did say you wanted me to look for examples of wasteful
spending that might make for good PR…”
Congresswoman Fischer waved the explanation away and then reached her
hand out for the document. After a few seconds of befuddled blinking,
she pulled her reading glasses off her head and onto her eyes, and looked
at the papers with renewed focus.
2018-12-28
:: Jimmy Hartzell
#fiction
#nontechnical
Mothers Against Drunk Driving, the local clergy, and the town council
had been planning this concept for over a year. Finally they did it: Right
in the town square, they installed a giant loudspeaker. From thenceforth,
every two minutes, a booming voice would spread all over town, announcing
“Are you sure?”
Foolhardy decisions, they had decreed, would soon be a thing of
the past.
The locals seemed to adapt pretty readily. Sales of noise-cancelling
headphones boomed for a bit, and people’s sleeping habits were
surprisingly unaffected – who notices slightly inferior sleep? And
drunk driving statistics were immediately better, which the local paper
celebrated triumphantly.
2017-08-26
:: Jimmy Hartzell
#essay
#travel
#nontechnical
Second collected thoughts on India.
More Communitarian, Less Individualistic, Through Food and Beverage
- There is much less emphasis on individual choice. If you order tea (chay in Hindi) it will come with milk in it. If you order coffee, it will come with milk in it. They will not ask you how you want your coffee.
- Similarly, when I was in a cab ride between cities, I was not asked what food I wanted at the rest stop. The driver’s brother (who I suppose had tagged along for company) simply bought some snack and insisted I eat some.
- Everyone is very considerate that you might be vegetarian. If pork is involved in food, everyone is very considerate that you might not eat pork. No other preferences or restrictions are particularly accommodated, however: if I ask what meat something is, I might just be told that it’s not pork.
- The exception to that is everyone also falls over themselves telling me which foods are not spicy, until I eat a spicy food and then they believe me. American food is going to taste very bland after this.
- Beef is straight-up illegal.
- Everyone at the lunch table gets up at the same time at work. The conversation about when to finish lunch does not last longer than one conversational turn, and often is expressed purely in body language. I once got up to get more food, and everyone else at the table immediately also got up — I guess I’d made the signal.
- On a related note, I’ve never seen anyone else go up for seconds, but I have seen people somehow squeeze twice as much food on their plates as I do without having it run together.
- When you go out to eat, everyone always agrees on what to order and then shares with the table. Decisions over what to order can be complicated.
Office Culture
This might be Tower-specific:
2017-07-30
:: Jimmy Hartzell
#essay
#travel
#nontechnical
The Way of NYC
When I first moved to New York City, someone older and wiser than I gave
me the following “rules” of New York City:
- Nothing is cheap.
- Nothing is easy.
- There are no exceptions to the first two rules.
I found this to be extremely true in New York City. It was stressful
and exhausting, and I was broke and living off an advance I’d gotten
from my then-employer, living in AirBnB’s I could put on credit card,
where I could maybe stay in each for a month, tops. I was continuously
getting lost, having to take trains home, learning some trains don’t run
as reliably as you’d like, or go to the stations claimed on the map. This
was in the pre-Uber days where the way to get a car service was to go
to the local bodega and ask them for the phone number of a car service.
2017-07-25
:: Jimmy Hartzell
#essay
#travel
#nontechnical
Everyone’s been asking me how India is and has been wondering if I’ve
gone exploring. I haven’t really. Sunday I was just recovering from
jetlag and yesterday I had work and then I immediately had to go home
and crash I was so tired: so I guess again recovering from jet lag? This
would normally not prevent me from exploring, but I’m honestly a little
outside my comfort zone.
I am not in a walkable neighborhood of a city
like I expected, but next to a huge highway. There doesn’t seem to be
a “downtown” to visit at all, so taking taxis everywhere seems to be
the modus operandi. I’m sure this will change very soon, but so far,
in my two days (and long morning) I’ve been here so far, I’ve been to
the airport, my building, and the office — and of course all the taxi
trips in beteween.