<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
    <title></title>
    <link rel="self" type="application/atom+xml" href="https://ansipunk.me/atom.xml"/>
    <link rel="alternate" type="text/html" href="https://ansipunk.me"/>
    <generator uri="https://www.getzola.org/">Zola</generator>
    <updated>2026-10-29T00:00:00+00:00</updated>
    <id>https://ansipunk.me/atom.xml</id>
    <entry xml:lang="en">
        <title>The vast self</title>
        <published>2026-10-29T00:00:00+00:00</published>
        <updated>2026-10-29T00:00:00+00:00</updated>
        
        <author>
          <name>
            ansipunk
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://ansipunk.me/blog/vast-self/"/>
        <id>https://ansipunk.me/blog/vast-self/</id>
        
        <content type="html" xml:base="https://ansipunk.me/blog/vast-self/">&lt;h1 id=&quot;the-vast-self&quot;&gt;The vast self&lt;/h1&gt;
&lt;p&gt;How accurate can you get, when describing a person? You can keep adding more and
more details, describe them in different contexts, point out contradictions, but
I think that no matter how many details you add, you will still be reducing the
person to attributes you found appropriate.&lt;/p&gt;
&lt;p&gt;I believe that the most accurate way to describe a person is to say their name.
It doesn&#39;t describe much, but it&#39;s safe from inaccuracies and reduction.&lt;/p&gt;
&lt;p&gt;A person&#39;s self is infinitely vast. Capturing the entirety of it would be
futile, and capturing select parts of it would be unfair to parts omitted. A
single person has so many wildly different faces that emerge in different
contexts. Many of them are contradictory, some of them don&#39;t make sense, but all
of them &lt;em&gt;together&lt;/em&gt; make the person &lt;em&gt;unmistakably them&lt;/em&gt;. And not all of those
traits remain calcified forever either. We change so much throughout our lives.
We live, we grow, we learn new things, we forget old things, we form new habits
and abandon old ones. We are the ship of Theseus and that&#39;s what makes us human,
except the ship is ridiculously spacious in its interior and seemingly has
infinite rooms.&lt;/p&gt;
&lt;p&gt;One room is dedicated to technology, another to sports, some rooms are there to
hold your Sylvanian Families collection or to play techno 24/7. There&#39;s a room
for jazz too. Oh, and let&#39;s not forget the knitting room. It doesn&#39;t make sense
for a ship to have all of those rooms together, but it&#39;s still just wonderful.
And the best part is that no matter how deep you got in that ship, there will
always be a room you have never seen before.&lt;/p&gt;
&lt;p&gt;When you get to know someone so intimately, when you are continuously exploring
their ship, every day you discover something new about them that doesn&#39;t really
align with what you knew of them before, but you still love them. You know it&#39;s
still them. You love how it doesn&#39;t make sense. Could we extend that acceptance
to ourselves?&lt;/p&gt;
&lt;p&gt;I remember how in old teenage media there was this one phrase that would get
repeated over and over - &quot;just be yourself&quot;. I don&#39;t like it. I don&#39;t like it,
because it implies that there has to be some &quot;your self&quot; that you are supposed
to be. Whereas you are only supposed to &quot;just be&quot;. Once you begin to search for
&quot;your true self&quot;, you inevitably start boxing yourself into categories, be it a
jock, a nerd, a shy guy, a genius, etc. But you can be all of those and it won&#39;t
be a lie.&lt;/p&gt;
&lt;p&gt;Some young people lose their sleep over it! Poor bastards simply confused by the
question &quot;who they are supposed to be&quot;, whereas my point is that nobody is
supposed to be anyone specific in the first place. Finding yourself an identity
could imply discomfort with parts we discover about ourselves that contradict
with that identity. Or, conversely, it could imply engaging in activities that
are often associated with such identity that the person in question doesn&#39;t
particularly enjoy &lt;em&gt;in this exact time&lt;/em&gt;. Tell me this isn&#39;t a betrayal.&lt;/p&gt;
&lt;p&gt;Everyone has many more faces than ones they are willing to show. Moreover,
everyone has many more faces than they think they have. Maybe some people might
benefit from thinking less about what or who they are. And maybe we all would
benefit if it didn&#39;t always take intimacy to accept that about others.&lt;/p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>My salmon steak</title>
        <published>2026-10-28T00:00:00+00:00</published>
        <updated>2026-10-28T00:00:00+00:00</updated>
        
        <author>
          <name>
            ansipunk
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://ansipunk.me/fiction/steak/"/>
        <id>https://ansipunk.me/fiction/steak/</id>
        
        <content type="html" xml:base="https://ansipunk.me/fiction/steak/">&lt;h1 id=&quot;my-salmon-steak&quot;&gt;My salmon steak&lt;/h1&gt;
&lt;p&gt;I had a long day at work. Nothing bad happened, I just wanted to get home
sooner. Minutes dragged for hours as I wasn’t doing anything particularly
productive or meaningful. Hours before the end of my shift, I was thinking of
various activities I could do at home. And I couldn’t think of much — I was too
tired. But one thought I kept returning to was that I would really like some
salmon steak. Pink red with dark lines from my grill frying pan. The smell, the
taste. Tad salty, with some eastern seasoning. Maybe with soy sauce too. A bit
of perfectly cooked rice that isn’t too bloated and isn’t too hard. Broccoli
would work here really well too. Maybe it would put me in the mood for love. Or
for a nice movie. Or both. Either way, I knew that a beautiful salmon steak
would fix my evening. On my way home, I went to the nearest supermarket and
grabbed everything I needed. I even picked the more expensive steak and more
expensive soy sauce despite my paycheck being a week away. I even got a bottle
of wine! The anticipation was killing me. Thinking about the steak I was going
to eat tonight made me so happy. So as I reached home, I went to the kitchen
right away. I didn’t even change my clothes. Immediately I proceeded to wash
rice and prepare veggies. We have a great rice cooker, you know. Our friend
gifted it to us as a housewarming present. And I absolutely loved it — somehow,
it always made perfect rice. After loading the machine, I started working on the
steak. You have no idea how amazing the smell was. All the little particles of
the spice mix I had, grounded but not too much so the texture and shape remain.
I was so looking forward to take a bite and feel that little piece of pepper pop
between my teeth. It was coming together beautifully. A little while longer,
everything was ready. I took out the nicest plates we had, the nicest wine
glasses we had and the nicest napkins we had. I gave my spouse a slightly bigger
piece, I know they would appreciate it. But before finally sitting down to eat,
I just wanted to take a quick shower. Not only it would put me in a better mood
for food, we could also be in the mood for love. I wouldn’t mind! And it was a
great decision. A hot shower after a long day at work was just perfect. It just
felt right. As I was drying myself with a towel, I suddenly realized that I
completely forgot how tired I was. Suddenly, I was thinking of all the movies
and TV series we could watch tonight. Severance, Pluribus, whatever. Hell, even
his stupid fucking South Park. It’s going to be such a cozy night! Maybe I
should have gotten popcorn as well. Eh, whatever, we can just order delivery. As
I was done with shower, I went straight to kitchen to discover rice and veggies
untouched, but both steaks gone. This was the first time in two years I thought
that I might have married the wrong person.&lt;/p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>It took me five years to write 200 lines of Python</title>
        <published>2026-10-22T00:00:00+00:00</published>
        <updated>2026-10-22T00:00:00+00:00</updated>
        
        <author>
          <name>
            ansipunk
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://ansipunk.me/blog/databasic/"/>
        <id>https://ansipunk.me/blog/databasic/</id>
        
        <content type="html" xml:base="https://ansipunk.me/blog/databasic/">&lt;h1 id=&quot;it-took-me-five-years-to-write-200-lines-of-python&quot;&gt;It took me five years to write 200 lines of Python&lt;/h1&gt;
&lt;p&gt;Five years ago, I thought a database library needed thousands of lines of code.
Today, mine needs about 200.&lt;/p&gt;
&lt;p&gt;Have you ever heard of &lt;a rel=&quot;external&quot; href=&quot;https://github.com/encode/databases&quot;&gt;encode/databases&lt;/a&gt;?
It&#39;s one of my favorite Python libraries. It gives you an asynchronous interface
for database connections. A much nicer wrapper over database drivers such as
&lt;code&gt;asyncmy&lt;/code&gt;, &lt;code&gt;aiosqlite&lt;/code&gt; or &lt;code&gt;asyncpg&lt;/code&gt;. It gave you a single interface that managed
connections, a connection pool, transactions and common database operations. And
it&#39;s great! It used SQLAlchemy Core to compile queries, so you didn&#39;t have to
write raw SQL. It gave you a &lt;code&gt;force_rollback&lt;/code&gt; mode that would roll back database
changes instead of committing them, which is really handy for tests. And it gave
you a very small API with great naming, that just made sense.&lt;/p&gt;
&lt;p&gt;Later, SQLAlchemy gained native asyncio support in version 1.4, which was
further developed in version 2.0. Suddenly, there was much less reason for
&lt;code&gt;databases&lt;/code&gt; to exist. The library predates that. If you read the source code,
you will see that it interacted with drivers directly, had multiple layers of
abstraction for connection pools, for connection backends, for sessions, for
transaction semantics and for driver quirks. The code was complex, but it had to
be that way because of history. I contributed to it. I was fairly familiar with
its internals. I helped bring SQLAlchemy 2 support to it, as the next major
version broke query compilation machinery used by the library. I also worked on
&lt;code&gt;psycopg3&lt;/code&gt; support in the library, although I don&#39;t remember if I ever pushed my
work on that. The abstractions were horrendous, but I loved the library
nevertheless.&lt;/p&gt;
&lt;p&gt;And then it was archived.&lt;/p&gt;
&lt;h2 id=&quot;i-don-t-like-sqlalchemy&quot;&gt;I don&#39;t like SQLAlchemy...&lt;/h2&gt;
&lt;p&gt;As I mentioned earlier, the latest improvements and additions to SQLAlchemy
made much of &lt;code&gt;databases&lt;/code&gt;&#39; implementation redundant. You get async everything -
pools, connections, transactions, operations, etc. But my main gripes with
SQLAlchemy remained. You still have to deal with SQLAlchemy&#39;s historically silly
naming. You still get a mysterious SQLAlchemy object when you fetch rows. And
you still get tons of various parameters and knobs with each method that aren&#39;t
necessarily discoverable.&lt;/p&gt;
&lt;p&gt;Naming is just plain bad. &lt;code&gt;begin()&lt;/code&gt;, if called on an engine, gets a connection
from the pool and starts an outer transaction. &lt;code&gt;begin()&lt;/code&gt;, if called on a
connection, only starts an outer transaction. &lt;code&gt;begin_nested()&lt;/code&gt;, if called on a
connection, starts a nested transaction, a &lt;code&gt;SAVEPOINT&lt;/code&gt;, if you will. You use
&lt;code&gt;create_async_engine()&lt;/code&gt; when you are creating a connection pool and setting a
dialect.&lt;/p&gt;
&lt;p&gt;Notice how each method uses underscores when there&#39;s more than one word in the
name? Well, enter &lt;code&gt;fetchone()&lt;/code&gt;, &lt;code&gt;fetchall()&lt;/code&gt; and &lt;code&gt;fetchmany()&lt;/code&gt;. I know that it
comes from Python&#39;s DB-API conventions, but I don&#39;t see much value in that for
my use cases. I feel like addressing these issues wouldn&#39;t be too bad with the
introduction of version 2 of the library, but it&#39;s not what happened.&lt;/p&gt;
&lt;p&gt;I don&#39;t like &lt;code&gt;Row&lt;/code&gt; objects. Don&#39;t get me wrong. They do make perfect sense. You
wouldn&#39;t want to allocate a dictionary that keeps column names per row if there
are hundreds of rows. But most of the time I just want a dictionary. I want a
simple object that will be understood by code that has nothing to do with
SQLAlchemy. Sure, you can use &lt;code&gt;result.mappings()&lt;/code&gt; and convert each row to a
dictionary. But you have to do that every single damn time.&lt;/p&gt;
&lt;p&gt;And I don&#39;t like knobs! I hate knobs! The more configuration options are
exposed, the more decisions a developer has to make. And even if I intend to use
the defaults, that should be sensible, I still can&#39;t fight the urge to read
about each of them, study them and decide, if those defaults are sensible to me
personally in this specific project I am working on. And I get frustrated when I
can&#39;t decide.&lt;/p&gt;
&lt;h2 id=&quot;databases-deserved-to-live&quot;&gt;&lt;code&gt;databases&lt;/code&gt; deserved to live&lt;/h2&gt;
&lt;p&gt;So I revived it. I didn&#39;t fork it though. Have you read the monstrosity of a
source code it is? As I mentioned earlier, it absolutely &lt;em&gt;had&lt;/em&gt; to be like this,
because mature asyncio support in SQLAlchemy came much later than &lt;code&gt;databases&lt;/code&gt;.
But the explanation doesn&#39;t make the code easy to work with.&lt;/p&gt;
&lt;p&gt;And I revived it twice. My first attempt, called &lt;code&gt;based&lt;/code&gt; (now deleted from
everywhere during my yet another psychosis), supported &lt;code&gt;asyncmy&lt;/code&gt;, &lt;code&gt;psycopg3&lt;/code&gt; and
&lt;code&gt;aiosqlite&lt;/code&gt;. It too had the abstraction hell &lt;code&gt;databases&lt;/code&gt; had, but I felt like I
managed to do it much better with all the hindsight I had and previous work on
&lt;code&gt;databases&lt;/code&gt;. I wrote an extensive test suite. It was simply a great library.
I really don&#39;t remember why I decided to nuke it, but when I started a new
Python project, I was really saddened that I did. So I built it again.&lt;/p&gt;
&lt;h2 id=&quot;but-i-do-respect-sqlalchemy&quot;&gt;...but I do respect SQLAlchemy&lt;/h2&gt;
&lt;p&gt;I called the next iteration &lt;a rel=&quot;external&quot; href=&quot;https://github.com/ansipunk/databasic&quot;&gt;databasic&lt;/a&gt;.
Initially, it only supported &lt;code&gt;psycopg3&lt;/code&gt; and wasn&#39;t ready to support any other
database drivers, so it was just 250 lines of code long. I still used SQLAlchemy
to compile queries though. It&#39;s just too good. It&#39;s much safer and much more
ergonomic than writing queries by hand and implementing my own query builder is
too massive an undertaking.&lt;/p&gt;
&lt;p&gt;I wrote tests, it worked fine, I used it and I liked it. But then I read its
source code for the hundredth time and I thought &quot;does it really have to be like
this?&quot; and opened SQLAlchemy docs. As it turns out - no, it absolutely does
&lt;em&gt;not&lt;/em&gt; need to be like this. Asyncio support in SQLAlchemy was mature enough. It
already supported all the async database drivers I cared about. It already
handled query compilation differences between drivers. And, most importantly, I
wouldn&#39;t need to invoke SQLAlchemy&#39;s query compilation machinery myself, which
partly depended on private methods and fields that could break any moment.&lt;/p&gt;
&lt;p&gt;So I just replaced all of my driver and pool interactions with SQLAlchemy&#39;s
&lt;code&gt;AsyncEngine&lt;/code&gt;. And further reduced line count down to about 200 lines. And it
made me so much happier - after all, the best code is always the code that was
never written.&lt;/p&gt;
&lt;h2 id=&quot;so-why-is-it-so-small&quot;&gt;So why is it so small?&lt;/h2&gt;
&lt;p&gt;Because the API is small. To be blunt, all it does is rename methods and remove
knobs. It took me multiple years of experience to know what exactly I need from
a database connection manager and to not be afraid to remove &lt;em&gt;everything&lt;/em&gt; that
does not go to that list. I decided that the thing that will differentiate my
library from SQLAlchemy will be that it will have just a handful of methods and
nearly no opportunities to make decisions.&lt;/p&gt;
&lt;p&gt;My idea was that nobody should have to learn a library to make a query. And it
shows. If you go see the &lt;a rel=&quot;external&quot; href=&quot;https://github.com/ansipunk/databasic&quot;&gt;README&lt;/a&gt;, you
will notice that there&#39;s nearly nothing to learn. It&#39;s as straightforward as it
gets. Methods don&#39;t have any docstrings, because their signatures explain
so much that there&#39;s little left to document. And it makes me really proud.&lt;/p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #576DAF; background-color: #07090F;&quot; &gt;&lt;code data-lang=&quot;python&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;async with&lt;/span&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt; Databasic&lt;/span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt;url&lt;/span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;) as&lt;/span&gt;&lt;span&gt; db&lt;/span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;    async with&lt;/span&gt;&lt;span&gt; db&lt;/span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt;session&lt;/span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;() as&lt;/span&gt;&lt;span&gt; session&lt;/span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;        async for&lt;/span&gt;&lt;span&gt; row&lt;/span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; in&lt;/span&gt;&lt;span&gt; session&lt;/span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt;stream&lt;/span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt;query&lt;/span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;):&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt;            print&lt;/span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt;row&lt;/span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&quot;okay-so-what&quot;&gt;Okay, so what?&lt;/h2&gt;
&lt;p&gt;So go build your own tiny wrapper! I don&#39;t think anyone in the world uses my
library, as this is the first time I&#39;m telling anyone about it, but building it
taught me two things I want to communicate.&lt;/p&gt;
&lt;p&gt;First, your library doesn&#39;t have to be novel, explore new ideas or enable users
to do new things that were too difficult before. It just has to scratch your
itch, no matter how silly, uncreative or basic it appears to you.&lt;/p&gt;
&lt;p&gt;Second, sometimes knowing which capabilities to remove, reduce or refuse is a
sign of experience and a deep understanding of the domain. Fewer decisions can
mean more time spent solving the actual problem.&lt;/p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Why I pretend I&#39;m from Denmark</title>
        <published>2026-10-20T00:00:00+00:00</published>
        <updated>2026-10-20T00:00:00+00:00</updated>
        
        <author>
          <name>
            ansipunk
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://ansipunk.me/blog/denmark/"/>
        <id>https://ansipunk.me/blog/denmark/</id>
        
        <content type="html" xml:base="https://ansipunk.me/blog/denmark/">&lt;h1 id=&quot;why-i-pretend-i-m-from-denmark&quot;&gt;Why I pretend I&#39;m from Denmark&lt;/h1&gt;
&lt;p&gt;I don&#39;t live in Denmark. I don&#39;t speak Danish. I have no particular connection
to Denmark. Moreover, I have never been to Denmark. And yet, according to my
computer, I&#39;m Danish. Why? Because I want my calendar to start on Monday.&lt;/p&gt;
&lt;p&gt;Locales suck. I can&#39;t be the only English speaker who doesn&#39;t live in the US or
the UK. I want my interfaces in English, I want my weekdays in English, I want
my months in English, but I don&#39;t want miles, I don&#39;t want Fahrenheit, and I
most certainly don&#39;t want my calendar starting on Sunday. What do I do?&lt;/p&gt;
&lt;p&gt;Surprisingly, it&#39;s an actual problem. But software is better now. You can choose
your locale independently from your language. You can do so in GNOME, you can do
so in Windows and I would be really surprised if you couldn&#39;t do that in macOS
or KDE. If I recall correctly, it wasn&#39;t always the case.&lt;/p&gt;
&lt;p&gt;And the solution is to pick a country whose conventions don&#39;t differ too much
from what I am used to. Which happens to be Denmark. Obviously, I can&#39;t have
everything I want. I&#39;m more accustomed to Russian-style &lt;code&gt;20.10.2026&lt;/code&gt; date
format, but Denmark&#39;s ISO format, which is &lt;code&gt;2026-10-20&lt;/code&gt;, works for me. But why
does it have to be like that? Why do I have to pretend that I&#39;m from a country I
have no connection to? Aside from that, some programs might assume that I want
content in Danish. Hasn&#39;t happened to me so far, but it wouldn&#39;t be too weird if
it did.&lt;/p&gt;
&lt;h2 id=&quot;why-denmark-specifically&quot;&gt;Why Denmark specifically?&lt;/h2&gt;
&lt;p&gt;GNOME lists 12 English locale options. Here they are with my reasoning:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Canada. Uses US Letter and AM/PM.&lt;/li&gt;
&lt;li&gt;Denmark. This is what I picked.&lt;/li&gt;
&lt;li&gt;Hong Kong. Uses AM/PM.&lt;/li&gt;
&lt;li&gt;India. AM/PM and weird number formatting starting from &lt;em&gt;lakhs&lt;/em&gt;.&lt;/li&gt;
&lt;li&gt;Ireland. Actually a great option, although slashes in dates confuse me.&lt;/li&gt;
&lt;li&gt;Israel. Weeks start on Sundays and workweek runs Sunday through Thursday.&lt;/li&gt;
&lt;li&gt;New Zealand. Slashes in dates.&lt;/li&gt;
&lt;li&gt;Nigeria. Slashes in dates.&lt;/li&gt;
&lt;li&gt;Philippines. AM/PM, US Letter.&lt;/li&gt;
&lt;li&gt;South Africa. Slashes in dates, week starts on Sunday.&lt;/li&gt;
&lt;li&gt;United Kingdom. Half metric, half imperial, slashes in dates.&lt;/li&gt;
&lt;li&gt;United States. Everything that can be wrong is wrong.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;the-real-solution&quot;&gt;The real solution&lt;/h2&gt;
&lt;p&gt;A good solution would be to use a locale that is as international as it could
possibly be. Which already exists! And it is called &quot;English (World)&quot; and uses
code &lt;code&gt;en_001&lt;/code&gt;. But I don&#39;t see that option in GNOME regional settings. &quot;English
(International)&quot; is not among offered options either. Moreover, if I recall
correctly, some platforms that do offer this option, still default to American
units. Which completely defeats the point. Another problem is that &lt;code&gt;en_001&lt;/code&gt; can
and will break locale parsers. Moreover, &lt;code&gt;en_001&lt;/code&gt; is supported by Unicode CLDR,
but not even &lt;code&gt;glibc&lt;/code&gt; ships it as a standard locale. And even if it did, I don&#39;t
find it likely that lots of software would support it. Unrelated fun fact: CLDR,
for some reason, prefers 12 hour clock despite trying to steer away from
American conventions.&lt;/p&gt;
&lt;p&gt;Okay. Let&#39;s create a new locale and let&#39;s name it &lt;code&gt;en_ISO&lt;/code&gt;. Amazing, right?
English text, international units without attachment to any particular country.
But it &lt;em&gt;will&lt;/em&gt; break parsers. We could settle for &lt;code&gt;en_SI&lt;/code&gt; instead. SI as in
International System of Units. But SI is Slovenia&#39;s country code. And we can&#39;t
really just pick whatever two-letter combination to assign it as a locale code.
There&#39;s only 676 possible combinations and 249 are officially assigned to
countries and territories. Should a new country gain its independence, it might
not get the two-letter code you&#39;d expect from its name. For example, the country
code of Caribbean Netherlands is &lt;code&gt;BQ&lt;/code&gt;. How does it make sense? No clue. The
actual ISO entry for the region is &quot;Bonaire, Sint Eustatius and Saba&quot;. Ok, I can
see where the B is coming from, but what about Q? There are so many such
examples. Bosnia and Herzegovina uses &lt;code&gt;BA&lt;/code&gt;, because &lt;code&gt;BH&lt;/code&gt; is reserved by Bahrain.
And Bahrain uses &lt;code&gt;BH&lt;/code&gt;, because &lt;code&gt;BA&lt;/code&gt; is reserved by Bosnia. Try to guess what&#39;s
the country code of Åland Islands.&lt;/p&gt;
&lt;h2 id=&quot;the-workaround&quot;&gt;The workaround&lt;/h2&gt;
&lt;p&gt;What do you do if your desktop environment doesn&#39;t support separate entries for
language and locale? Or if you don&#39;t use a desktop environment at all? You use
&lt;code&gt;localectl&lt;/code&gt;. What I do is:&lt;/p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #576DAF; background-color: #07090F;&quot; &gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt;sudo&lt;/span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt; localectl set-locale&lt;/span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;  LANG=en_US.UTF-8&lt;/span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;  LC_TIME=en_DK.UTF-8&lt;/span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;  LC_MEASUREMENT=en_DK.UTF-8&lt;/span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;  LC_MONETARY=kk_KZ.UTF-8&lt;/span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;  LC_PAPER=en_DK.UTF-8&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;These are the only parameters I care about, but there&#39;s much more. You can set
currency formats, address and phone number formats, paper formats and many
others. Linux allows different aspects of your locale to be configured
independently. &lt;code&gt;LANG&lt;/code&gt; provides the default, while individual &lt;code&gt;LC_*&lt;/code&gt; variables
override specific categories. &lt;code&gt;LC_ALL&lt;/code&gt; overrides all of them. Look at all these
options:&lt;/p&gt;
&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Field&lt;/th&gt;&lt;th&gt;Description&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;&lt;code&gt;LC_TIME&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Dates, time, weekday/month names, week conventions&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;code&gt;LC_NUMERIC&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Decimal and thousands separators&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;code&gt;LC_MONETARY&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Currency symbol and monetary formatting&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;code&gt;LC_MEASUREMENT&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Metric vs US customary preferences&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;code&gt;LC_PAPER&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Default paper dimensions&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;code&gt;LC_MESSAGES&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Translated program messages&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;code&gt;LC_COLLATE&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Alphabetical sorting and collation&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;code&gt;LC_CTYPE&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Character classification and encoding behavior&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;code&gt;LC_NAME&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Personal-name formatting and titles&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;code&gt;LC_ADDRESS&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Postal-address formats&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;code&gt;LC_TELEPHONE&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Telephone-number conventions&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;code&gt;LC_IDENTIFICATION&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Locale metadata&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;p&gt;Also, this changes the system-wide locale defaults. Your desktop environment may
override them, so check the effective locale settings using &lt;code&gt;locale&lt;/code&gt;.&lt;/p&gt;
&lt;h2 id=&quot;what-i-wish-happened&quot;&gt;What I wish happened&lt;/h2&gt;
&lt;p&gt;Dunno, to be honest. We could introduce a new locale, but it will take a while
before it gets adopted and it will simply break old software. We could fix and
adapt software for &lt;code&gt;en_001&lt;/code&gt; and actually standardize it, but I don&#39;t see that
happening either. For now, we, the people who want international language &lt;em&gt;and&lt;/em&gt;
international standards and units, will have to pretend we are from somewhere
else.&lt;/p&gt;
&lt;h3 id=&quot;p-s&quot;&gt;P.S.&lt;/h3&gt;
&lt;p&gt;Huh. According to &lt;code&gt;glibc&lt;/code&gt; sources, I wasn&#39;t the first one to come up with
adopting Denmark as my region. Check out line 112 on
&lt;a rel=&quot;external&quot; href=&quot;https://sources.debian.org/src/glibc/2.41-11/localedata/locales/en_DK&quot;&gt;this page&lt;/a&gt;.&lt;/p&gt;
</content>
        
    </entry>
</feed>
