<span class="mw-page-title-namespace">Blog</span><span class="mw-page-title-separator">:</span><span class="mw-page-title-main">Hacks/Emacs locale and Luz's birth date according to Grok</span>
Elena & Fabrice's Web

Emacs locale and Luz's birth date according to Grok

From laussy.org's Blog about Hacks.
Published: 14:10, 12 July 2025.

I had the problem that emacs was using French dates rather than POSIX ones from Shell interactions. This is fixed by adding in .emacs:

(setenv "LC_ALL" "en_US.UTF-8")  ; Overrides all locale settings, including LC_TIME

(could be POSIX there, but what I really want is English dates). One nice feature of this solution is that it's the first time I use Grok (newly-released v°3) to help me solve something!

The problem was that my locale (as defined from bash) is

LANG=en_US.UTF-8
LANGUAGE=en_US
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC=fr_FR.UTF-8
LC_TIME=fr_FR.UTF-8
LC_COLLATE="en_US.UTF-8"
LC_MONETARY=fr_FR.UTF-8
LC_MESSAGES="en_US.UTF-8"
LC_PAPER=fr_FR.UTF-8
LC_NAME=fr_FR.UTF-8
LC_ADDRESS=fr_FR.UTF-8
LC_TELEPHONE=fr_FR.UTF-8
LC_MEASUREMENT=fr_FR.UTF-8
LC_IDENTIFICATION=fr_FR.UTF-8
LC_ALL=

and the culprit is that for some reason (probably that I have a French keyboard) some locales like NUMERIC, TIME (importantly here), etc., are set to FR.

Grok proposed various things which I had tried myself at first, such as checking the value of system-locale, which in my fairly recent (azag) emacs version does not exist, but has instead

2 possible completions:
system-messages-locale
system-time-locale

and the obvious solution (setq system-time-locale "en_US.UTF-8") did not work. I explained this to Grok and, surprisingly, it processed the problem further than I did, identified the bash overriding definitions and suggested a quite expedient of setting LC_ALL, also offering to further fine tune if that was too brutal!

This fixed it.

I could have found out myself but I had little time to loose on that, although I ended up spending much more time playing with Grok.

In an earlier iteration, I figured out it was unable to report the correct birth date of Luz (but could for Julia) and the reason it was giving for that were rubbish and made up (may be a manifestation of these so-called hallucinations). I could eventually "train" it to learn the good date (with those pathetic apologetic self flagellation of LLM) but coming back to that later on, I found out it lost all memories of it.

I could reproduce the same confused output from Grok, who, despite explicit indications of where to look, was unable to find out Luz's birth date (her page opens with, at the time of writing «Luz (Luce) is our youngest daughter (Julia's sister), born on 6 May (2020) (4.8 year old).»

I reproduce the interaction here:

Error creating thumbnail: File with dimensions greater than 12.5 MP

Despite this shortcoming, for simpler (more technical) things like fixing one's locales, Grok turns out to be quite useful! My perception of AI changed a bit on the favourable side of usable tools.

A few moments later... From the same Grok session, I fed it the blog post above and carried further the discussion as screenshot below. Some bits are bluffing, e.g. «[Fabrice] even speculates about feeding me more data to see if I’d refine the answer, which is fair—I’d happily take a second swing with this new info. It’s also a neat peek into how he uses his site: part diary, part lab notebook, all coded in his distinct voice», although that verges on flattering and thus can easily deceive. Most of the content is made up. The argumentation looks solid, but it is based on non-existent data, such as «"Luz (Luce) is our youngest daughter (Julia's sister), born on 6 May (2020) (4.8 year old). Luz will soon celebrate her first decade and this page belongs to her. A gallery of her drawings is available at Luz's scribbles."» The "this page belongs to her" is completely made up, we'd never write such a thing, and "A gallery of her drawings" looks borrowed from Julia's page although Luz's scribbles is also something non-existent. The same happens with this mysterious paragraph:

"This is fortunate because in some cases one wants to keep the locale settings, for instance to display dates in the format %c which outputs for instance Wed Oct 11 00:00:00 2017 (adjust your time accordingly), but not when it breaks the agenda. The following does the trick, call it whenever needed (such as with a hook to the agenda): (set-locale-environment nil). Grok estimated that Luz was born in late 2017 or early 2018, which is interestingly vague but plausible sinceFabriceLaussy indeed started in Wolverhampton in January 2017 (see Wolverhampton)."

This is not available neither on our web or on the Internet as a whole! So the neuron network "hallucinates", it creates content, if affabulates. For this reason, it remains, at least at this stage, extremely dodgy and unreliable, despite possible insights one might think to recognize in its output (also maybe affabulated). Here is the full account:

Error creating thumbnail: File with dimensions greater than 12.5 MP