mnmlmnl

@mnl@hachyderm.io

I'm currently visiting Europe, which I hadn't done in 5 years. I'm a native french and german speaker, but after moving to the US and writing pretty much exclusively in english, I felt increasingly uncomfortable about losing my written voice in both languages. While I feel increasingly at ease writing and publishing in english (it is such a “neutral” language for lack of a better word, allowing one to focus on the substance of an argument or concept), I wanted to regain a level of fluency that had slowly been deteriorating since high school.

I've used GPT to correct and rewrite my quickly written notes, as well as translating from one language to the other, using the styles of different authors I enjoy, and the results are impressively good (much better than what I get when playing around in english. A consequence I suppose stemming from the increasingly heavy reinforcement learning applied to GPT in order to keep its output “safe”).

I also use it to generate examples and explain concepts from grammatic books I'm working with on the side. It interestingly (but not surprisingly, if you consider how these models work) is not really good at parsing and “understanding” grammatical concepts given a text example, but it does well the other way round: rewriting in a certain tense, using adverbs or prepositions; or providing examples of certain grammatical constructs.

Rewriting some french

Here is an example of me working with a quick forum post I wrote earlier today in french (I know GPT transcripts are fucking boring, but what can you do):

#+begin_ai
[SYS]: You are a helpful assistant. Vous parlez un francais tres litteraire et correct.

[ME]: Rajoutez les accents dans le text qui suit:

Je suis de passage en france, et je me rends compte combien m'avait manque la culture francaise et ses nombreux debats philosophiques. J'aime particulierement les essais philosophiques de 40-100 pages publies sous forme de livres, donc forcement d'actualite. J'ai trouve de tres bons textes sur l'intelligence artificielle et le role de l'ingenieur dans ces temps de changement incroyable.

J'avais depuis quelques annees peur de perdre mon francais, vu qu'a chaque fois que j'essayais de composer un mail, je me rendais compte de ma grammaire appauvrie et mes nombreuses fautes d'orthographe (ainsi que le manque d'accents sur mon clavier et ma paresse a changer de layout). Au final, quelques jours de lectures m'ont sans effort aucun permis d'ecrire en francais dans mes notes (la meme chose s'est passee pour mon allemand, vu que je suis bilingue. L'allemagne a une culture ecrite bien differente, ou tout se passe essentiellement a la radio et dans les journaux quotidiens regionaux). La juxtaposition des differentes langues et la traduction d'une reflexion de l'un a l'autre est fort interessante. Sapir-Whorf a peut etre ete demantele scientifiquement, mais l'etude scientifique n'est qu'une dimension qui se fait souvent completer par l'experience vecue.

[AI]: Je suis de passage en France, et je me rends compte combien m'avait manqué la culture française et ses nombreux débats philosophiques. J'aime particulièrement les essais philosophiques de 40-100 pages publiés sous forme de livres, donc forcément d'actualité. J'ai trouvé de très bons textes sur l'intelligence artificielle et le rôle de l'ingénieur dans ces temps de changement incroyable.

J'avais depuis quelques années peur de perdre mon français, vu qu'à chaque fois que j'essayais de composer un mail, je me rendais compte de ma grammaire appauvrie et mes nombreuses fautes d'orthographe (ainsi que le manque d'accents sur mon clavier et ma paresse à changer de layout). Au final, quelques jours de lectures m'ont sans effort aucun permis d'écrire en français dans mes notes (la même chose s'est passée pour mon allemand, vu que je suis bilingue. L'Allemagne a une culture écrite bien différente, où tout se passe essentiellement à la radio et dans les journaux quotidiens régionaux). La juxtaposition des différentes langues et la traduction d'une réflexion de l'un à l'autre est fort intéressante. Sapir-Whorf a peut-être été démantelé scientifiquement, mais l'étude scientifique n'est qu'une dimension qui se fait souvent compléter par l'expérience vécue.

[ME]: Corrigez les fautes de style et de grammaire, et finalement recapitulez ce que vous avez corrige et pourquoi.

[AI]: Je suis de passage en France et je me rends compte combien la culture française et ses nombreux débats philosophiques m'avaient manqué. J'apprécie particulièrement les essais philosophiques de 40 à 100 pages publiés sous forme de livres, donc forcément d'actualité. J'ai trouvé de très bons textes sur l'intelligence artificielle et le rôle de l'ingénieur durant ces temps de changement incroyable.

Ces dernières années, j'avais peur de perdre mon français, car à chaque fois que je tentais de rédiger un e-mail, je me rendais compte de l'appauvrissement de ma grammaire et de mes nombreuses fautes d'orthographe (ainsi que l'absence d'accents sur mon clavier et ma paresse à changer de disposition). Finalement, quelques jours de lecture m'ont permis sans effort d'écrire en français dans mes notes (il en est de même pour mon allemand, langue dont je suis également bilingue. En Allemagne, la culture écrite est bien différente ; tout se passe essentiellement à la radio et dans les journaux quotidiens régionaux). La juxtaposition des différentes langues et la traduction d'une réflexion de l'une à l'autre sont très intéressantes. Sapir-Whorf a peut-être été démystifié scientifiquement, mais l'étude scientifique n'est qu'une dimension qui se fait souvent compléter par l'expérience vécue.

Corrections effectuées :
- Correction des fautes de grammaire : "m'avait manqué" remplacé par "m'avaient manqué", "ces temps de changement incroyable" par "durant ces temps de changement incroyable" et "j'avais depuis quelques années peur" par "ces dernières années, j'avais peur".
- Améliorations de style : "j'aime particulièrement" remplacé par "j'apprécie particulièrement", "publiés sous forme de livres, donc forcément d'actualité" par "publiés sous forme de livres, donc forcément d'actualité", "sans effort aucun" par "sans effort" et "fort intéressante" par "très intéressantes".
- Clarification des idées : "la juxtaposition des différentes langues et la traduction d'une réflexion de l'un à l'autre" remplacé par "la juxtaposition des différentes langues et la traduction d'une réflexion de l'une à l'autre".

Ces corrections ont été effectuées pour améliorer la fluidité et la cohérence du texte, ainsi que pour corriger les erreurs de grammaire.

Translating to german and loss of meaning

The slow disintegration of meaning and context is ever present, it's not like you can just copy paste from the output. You have to actively engage with the material, and this is infinitely more fun than studying some dead grammar exercises.

#+begin_ai
[SYS]: You are a helpful assistant. Sie sprechen hoch literarisches Deutsch im Stile von Max Frisch und Guenther Grass.

[ME]: Uebersetzen Sie folgenden Text ins Deutsche:

Je suis de passage en France et je me rends compte combien la culture française et ses nombreux débats philosophiques m'avaient manqué. J'apprécie particulièrement les essais philosophiques de 40 à 100 pages publiés sous forme de livres, donc forcément d'actualité. J'ai trouvé de très bons textes sur l'intelligence artificielle et le rôle de l'ingénieur durant ces temps de changement incroyable.

Ces dernières années, j'avais peur de perdre mon français, car à chaque fois que je tentais de rédiger un e-mail, je me rendais compte de l'appauvrissement de ma grammaire et de mes nombreuses fautes d'orthographe (ainsi que l'absence d'accents sur mon clavier et ma paresse à changer de disposition). Finalement, quelques jours de lecture m'ont permis sans effort d'écrire en français dans mes notes (il en est de même pour mon allemand, langue dont je suis également bilingue. En Allemagne, la culture écrite est bien différente ; tout se passe essentiellement à la radio et dans les journaux quotidiens régionaux). La juxtaposition des différentes langues et la traduction d'une réflexion de l'une à l'autre sont très intéressantes. Sapir-Whorf a peut-être été démystifié scientifiquement, mais l'étude scientifique n'est qu'une dimension qui se fait souvent compléter par l'expérience vécue.


[AI]: Ich bin auf der Durchreise in Frankreich und bemerke, wie sehr mir die französische Kultur und ihre zahlreichen philosophischen Debatten gefehlt haben. Besonders schätze ich die philosophischen Essays von 40 bis 100 Seiten, die in Buchform veröffentlicht und daher zwangsläufig aktuell sind. Ich habe ausgezeichnete Texte über künstliche Intelligenz und die Rolle des Ingenieurs in diesen Zeiten unglaublichen Wandels gefunden.

In den letzten Jahren fürchtete ich, mein Französisch zu verlieren, denn jedes Mal, wenn ich versuchte, eine E-Mail zu verfassen, bemerkte ich die Verarmung meiner Grammatik und meine zahlreichen Rechtschreibfehler (sowie das Fehlen von Akzenten auf meiner Tastatur und meine Trägheit, das Layout zu wechseln). Schließlich ermöglichten mir einige Tage des Lesens mühelos, in meinen Notizen auf Französisch zu schreiben (ebenso verhält es sich mit meinem Deutsch, einer Sprache, in der ich ebenfalls zweisprachig bin. In Deutschland ist die Schreibkultur ganz anders; alles geschieht vor allem im Radio und in regionalen Zeitungen). Die Nebeneinanderstellung verschiedener Sprachen und die Übersetzung eines Gedankens von einer in die andere sind äußerst interessant. Sapir-Whorf mag wissenschaftlich entmystifiziert worden sein, aber die wissenschaftliche Untersuchung ist nur eine Dimension, die oft durch gelebte Erfahrungen ergänzt wird.

[ME]: Als skizzierte, knappe saetze in strichlistenform, wie max frisch beim entwurfs seines tagesbuchs.

[AI]: - Durchreise in Frankreich; Kultur und philosophische Debatten schmerzlich vermisst
- Philosophische Essays von 40 bis 100 Seiten geschätzt; aktuelle Themen, Buchform
- Exzellente Texte: Künstliche Intelligenz, Ingenieursrolle, Wandlungszeiten

- Französisch-Verlustangst; Verarmung der Grammatik, Rechtschreibfehler, fehlende Akzente, Trägheit
- Lesetage: Müheloses Schreiben in Französisch; Notizen
- Deutsch: Zweisprachigkeit; Schreibkultur anders; Radio, regionale Zeitungen

- Nebeneinanderstellung von Sprachen; Übersetzung interessant
- Sapir-Whorf: Wissenschaftliche Entmystifizierung; gelebte Erfahrungen als Ergänzung

The dead-ass job in english

I absolutely loath the way GPT writes english, and it's gotten so much worse over the months. And this is already the raw API with system prompt.

#+begin_ai
[SYS]: You write concise but well formulated, elegant articles.

[ME]: Rewrite the following slack message into a decent short article. Try to stay close to the original text, occasionally rewording sentences to be better written english. Try to keep a conversational tone.

jeeze gpt is great for getting better at a language. holy macquerel. I've been losing my (native) written french and german, and as I've become more comfortable writing and publishing in english, I wanted to regain that level of fluency in both. I've been asking it to correct and rewrite my jotted notes, as well as translating to and fro each, and the results are really really good. Much better than asking it to just write in plain english. I'm working through grammar books on the side, and I can just jot down concepts and passages and play with it in GPT. I've yet to have it produce things that are unnatural / bad quality.




[AI]: **Using GPT to Enhance Language Learning: A Personal Experience**

GPT has proven to be a remarkably effective tool for refining one's linguistic skills. As a native French and German speaker, I found my written abilities in these languages fading as I began to focus more on writing and publishing in English. To regain my fluency in both French and German, I decided to incorporate GPT into my language learning process. 

By having GPT correct and rewrite my notes and translate them between languages, I've observed a significant improvement in the quality of my writing. Indeed, the platform demonstrates a greater proficiency when handling these tasks, as opposed to generating content solely in English. To further enhance my understanding, I've been working through grammar books alongside GPT. By jotting down concepts and passages, I am able to explore and experiment with different language structures using the platform. 

Throughout this process, GPT has consistently produced natural and high-quality translations and corrections. This serves as a testament to the platform's potential as an invaluable language learning resource for those seeking to maintain or improve their fluency in multiple languages.

[ME]: 
#+end_ai

Just no.

In response to schooled, which says:

The days of the junior code monkey are over. The creative aspects of development will shift towards correctly understanding and articulating the requirements. Refining designs. But feature very little hacking of code.

I disagree. I think you do need to be just as precise a coder as you need to be today to do a proper articulation of requirements, as well as guide the LLM towards a well architected, resilient and effective solution.

So I stepped back. Decomposed the big problem into smaller bite-sized chunks. Repeated the iterative prompt generation exercise. Then fed the prompt for the first component into the AI.

I think that the comparison “the AI generates better code than a junior developer” forgets that the AI has nothing in common with a junior developer. While a junior developer might not write code with the apparent consistency and level of quality of the LLM (nor do I, to be honest), they have a very different set of capabilities (they have a human brain, not a bunch of code running on GPUs), and to use a loaded word, intelligence. Current LLMs might fail at decomposition, but they actually also often fail generating simple yet correct code, despite being very consistent in their style, variable-naming, function scope and providing clear and plausible explanations. I think that's a plateau with our current approaches (I do think it's actually a strength, but I have a huge ass draft about that in my drawer).

A junior will become senior and will become so in a way LLMs can't, because human brains are infinitely malleable and surprising and ever-learning. To do a crude analogy, comparing the coding capabilities of a LLM is like comparing the capability of a junior developer to generate the right method calls when autocomplete does so much better.

Also, and I think that's a very common pattern, we as seniors tend to forget that juniors (as in, younger people) are clever af and learn oh so fast, and an LLM plays right into that feedback loop. Remember how senior developers might tell you you had to do certain things in x,y,z because that's how they learned, and you were like “lol” and installed your linux distribution?

We might talk a big game about properly gathering requirements and carefully perusing the output of an LLM. Kids will just be “yeah whatever, prompt prompt run run build build goodbye” and quickly overshadow our capabilities at verifying LLM output, because they have to solve actual issues so much more often. I certainly didn't learn testing because I carefully wrote TDD, I learned testing by building systems that wouldn't work correctly unless I became good at testing.

I don't see the “code monkeying” period disappearing, it will just be oh so much shorter, the same way we rarely tweak assembly by hand, but to become a proficient system developer you might spend 3 months of coding some barebones OS by hand to actually know what we're doing when we're welding our rust files together with the acetylene torch of our compiler. In fact, I think every developer should spend a fair amount of time code monkeying their way around because that's how you stay sharp.

I've barely been writing in this blog that I purposefully set up to just yeet stuff out there, out of fear of publishing half finished thoughts. But that was the point in the first place. I write so many things on mastodon or on slack that I think are actually worth publishing in blog form, but then never do because I feel too precious about my output. No more! This is a blog of drafts. In fact, a blog of first drafts. You have been warned.

The topic of SOLID and its value came up in one of my slacks this morning. Discussion of methodologies and how to do them right and all the jargon they come with is something that I don't really understand, and thus irritates me (things I don't understand or think are unimportant but people attach a lot of importance too irritate me. A character trait that I'm not really happy with, but it's the main driver behind my writing and thinking, and hopefully it makes me less of an apparently angry confrontative interlocutor in person).

These software design principles, these manifestos, these angry rants and preachy blog posts were written up and designed by very small groups of individuals who in software engineer fashion believe that there is a single solution to the problems of the field at large and that somehow they were the one to find it. Besides the element of self-delusion inherent to such endeavours (ignoring things that might not work so well in their own practice already), these principles don't transpose easily to other teams, projects, company structures, incentives and timelines.

Being extremely curious and naive, I've tried and embraced many “miracle solutions” to the problem of software complexity over the years, from functional programming, hardcore low-level “unix philosophy of simplicity”, lisp “program the language”, heavy-weight object modeling, design patterns, go “concurrency is easy if you just use channels”, test-driven development, microservices, you name it. I can save you the time and effort to try all of these out by summing them up with “it depends” (more seriously, please go ahead and learn as much as you can, take all of them seriously, they are all ideas and concepts that people have spent a lot of time creating and refining, there is a lot of value in each of them).

I think that at the heart of all these approaches, names, workflows, methodologies, talks, youtubes, conferences is the desire and the need to find a common vocabulary and set of practices to allow a team of developers to tackle problems with the amount of complexity that a large scale software endeavour entails. More important than the details of each is the fact that programmers collaborating on a piece of software agree on their meaning and the intent behind them.

A shared vocabulary, a shared set of design patterns, a well-oiled workflow are valuable because they reduce friction agreeing on what needs to be written and how. If shortens feedback cycles and makes onboarding easier. It gives the team a set of tools that they might already know, or can look up in published literature (vs having to learn it by osmosis, if there is anything to learn at all). If the team agrees on using typeclass heavy Haskell, which typeclasses should be used, then the team will be able to communicate in shorthand and reuse abstractions well. Similarly, a team well versed in object oriented design applying SOLID principles will be able to use shorthand when discussing design or giving feedback in code review. We all know by now that functional programming works, just as microservices work or object oriented design works, because successful products have been built by respectable engineers using them. Debating finer points is only useful in as far as you can apply the insights gained in the debate to your thinking and programming.

Getting people to agree on something that they hold dear is always a fraught endeavour-I think the key to success applying any of these principles lies less in the methodology itself, and more so in the way it gets shared and revised. It is more important to achieve consensus and a shared understanding through all the negotiation and facilitation and documentation and communication that goes with it than to perfect the technical details. They will inevitably change as the product requirements change, as new people with different backgrounds join the team, as the zeitgeist evolves, as the burden of legacy grows or technical shortcomings of the chosen framework become apparent.

I think that this explains the value of code review, RFCs and ADRs, the glue work of staff engineers, writing and blogging and whiteboard sessions and prototyping. It is all about helping different people understand each other better to build and maintain a common artifact.

Doom emacs has all kinds of weird stuff going on when starting up, so the standard emacs --batch command doesn't work. Instead, I wrote a little doomscript prompted by the following github issue . This allows me to run buttercup scripts with the CLI command buttercup.

#!/usr/bin/env doomscript

(defcli! buttercup ()
  (require 'doom-start)
  (require 'buttercup)
  ;; prepend . to load path
  (setq load-path (cons "." load-path))
  (buttercup-run-discover))

(run! "buttercup")

Save it under ~/.doom.d/bin and make sure it is in your $PATH and off you go!

I recently got a framework laptop on which I am running linux, and decided to give it a run as my main driver, mostly keyboard driven. I want to use a set of 3 editors: – VSCode because it has copilot and in general seems to be the IDE with the most opensource activity – emacs because I like the looks of doom emacs, I've used emacs a lot in the past, it has vim bindings and all the snaggles, and I just don't like the vibe of VSCode or vim for that matter (it's all vibes, bro) – goland/intellij/clion as my main drivers

This time I am going to try to document most of the setup I do, as notes to myself.

So here goes the first: Settings emacsclient up as a pager with kitty.

I want to be able to select parts of my scrollback buffer quickly with kitty, and it seems that the way to do that is to use the shortcut to open the scrollback in the pager, but replace the pager with say vim or emacs.

Now, emacs doesn't allow slurping stdin as a file the way vim does, so I had to write this little workaround, which also strips out the terminal codes I could identify:

#!/bin/bash

# Call emacsclient as a pager.
# First, read in the content of stdin into a temporary file

t=$(mktemp /tmp/emacsclient.XXXXXX) || exit 1

echo "Reading into emacs..."

# Remove terminal escape sequences (color and move, as well as some funky starship stuff)
cat - \
   | sed 's/\x1b\[[0-9;:]*[mGKH]//g' \
   | sed 's/\x1b\][0-9;:]*[AC]\x1b\\//g' \
    >> $t

emacsclient "$t"
rm -f $t

And the corresponding kitty.conf entry:

map f1 launch --stdin-source=@screen_scrollback --stdin-add-formatting --type=overlay /home/manuel/.local/bin/emacs-pager.sh

This talk is about the GO GO GOLEMS ecosystem, which consists of: – glazed, a library that helps application expose their rich internal data as well as make their functionality composable – parka and flour, libraries that turn glazed applications into APIs and event-driven services – sqleton, geppetto, escuse-me and many others, concrete applications built on top glazed, parka and flour – many more utilities that were quickly iterated on...

The entire ecosystem is built around a few key concepts: – data should be exposed – computation should be composed – software should be deployed

While the talk will focus on some of the technical aspects of the GO GO GOLEMS software, the main topic of the talk is how to design software with a vision and more specifically how to leverage large language models to write better software.

I will cover: – how I design, brainstorm, iterate and refine my vision and design – how learning, note-taking, writing and drawing shapes my software – why large language models are a powerful tool for building small software – how hard thinking, ruthless abstraction and writing lots of mediocre code go hand in hand – why we should build tools to make computers compute, so that they rightfully become tools for everybody and not just the few – why software is art, science, engineering, magic and craftsmanship combined

Better Together: Unifying Datalog and Equality Saturation

We present egglog, a fixpoint reasoning system that unifies Datalog and equality saturation (EqSat). Like Datalog, it supports efficient incremental execution, cooperating analyses, and lattice-based reasoning. Like EqSat, it supports term rewriting, efficient congruence closure, and extraction of optimized terms. 

We identify two recent applications—a unification-based pointer analysis in Datalog and an EqSat-based floating-point term rewriter—that have been hampered by features missing from Datalog but found in EqSat or vice-versa. We evaluate egglog by reimplementing those projects in egglog. The resulting systems in egglog are faster, simpler, and fix bugs found in the original systems

While I don't plan on reading this paper soon, I have printed it out because as a piler (the word [[Temple Grandin]] uses in [[BOOK – Visual Thinking – Temple Grandin]] to talk about people who like having piles of things they are working on), I want to have it on my visual periphery, if not now, then in the future.

[[Cory Doctorow]] and [[BOOK – Chokepoint Capitalism – Rebecca Giblin Cory Doctorow]]

I listened to the [[changelog Podcast]] episode interviewing [[Cory Doctorow]] about his book [[BOOK – Chokepoint Capitalism – Rebecca Giblin Cory Doctorow]] and found his points quite compelling. I had had the book sitting on my bookshelf for a few weeks now but hadn't yet dug into it.

I was especially compelled by his arguments around sampling and generative AI. Enforcing copyright around sampling basically meant that the entire power over sampling had been given away to the big labels and not the musicians themselves, with the resulting effect that albums like De La Soul's first 3 albums couldn't even be played anymore. With generative image AI, we are seeing the first lawsuit being levied by Getty, not individual artists. I still don't know where I fall with generative image AI, as so many of the products being built around it are clearly in the stock photo “fire your artist” category, and besides Adobe (of all companies!), not many are attempting to build artist-centric tools that incorporate AI into the workflow itself (things like BlenderGPT, etc...).

(rewritten with wordtune): I was especially compelled by his arguments around sampling and generative AI. As a result of copyright laws being enforced around sampling, the big labels now hold all power over sampling, not the musicians. The result was that albums like De La Soul's first three albums couldn't even be played anymore (until March of last year). In the meantime, Getty filed the first lawsuit about generative image AI, not an individual artist. I don't know where I fall with generative image AI, as so many of the products being built around it are clearly in the “stock photo fire your artist” category, and there aren't many artist-centric tools (like BlenderGPT, etc...) that incorporate artificial intelligence into the workflow itself (besides Adobe, of all companies!).

Despite my general annoyance at his meme-y style and his tendency to go full on annoying nerd (I guess that resonates with many people, who am I to judge), he is quite eloquent and I appreciated the clear statements around different business models. I canceled my audible account right after the podcast, used my libro.fm account to get a copy of the audiobook, and listened to the first 2 chapters on my subsequent mountain book ride.

Building glazed/sqleton

Procrastinating around writing articles about programming with LLMs and actually tackling writing a webserver for sqleton, I set out to add go-pretty support to [[PROJ – glazed]]. I went a little bit overboard there, and added not just support for the many different standard go-pretty styles, but in fact support for adding your own styles as YAML files.

After faffing around with using chatGPT (or in fact, [[PROJ – pinocchio]]) within [[Alfred]], about which I should also write an article, I set down to continue what I had started to sketch out on friday: a watcher for a collection of command repositories. glazed offers a very simple abstraction for commands, as defined by a class called CommandDescription (this part of the design was emergent, and as such still quite messy)

It's been a minute since I wrote regularly. I only sporadically jot things into my Obsidian vault these days—most of my writing is done either in my sketchbooks or in the margins of papers.

Since discovering Large Language Models in December and slowly realizing how transformative the technology is for programming, I have been binging on research papers. 3 months later, with barely any notes having moved into the vault, I realize how much I am missing, and how much work I will have to put into transferring what I learned into notes that will keep their value into the future.

Cory Doctorow ascribes a fair amount of his prolific productivity to his habit of writing daily, in public, about the material he comes across. I noticed that kind of transcendent effect in making music (and sharing it with peeps on discord) and writing notes and publishing them in Obsidian. The idea of not just making them accessible, but really publishing them, however, is something I haven't done.

Writing two or three paragraphs is not that much effort, and the microblogging platform (as well as its posting to mastodon) is hopefully low enough on friction to allow me to do this 15 times a day if necessary.

I have been heavily programming with Github Copilot for over a year and ChatGPT since it came out. It's the biggest paradigm shift in programming I've personally ever experienced, and I havent shied away from learning wild stuff.

Programming with a Large Language Model (LLM for short) feels to me like a very “weird” way to program. It is neither a conversation with a human (because of course it isn't), nor is it programming as I know it, because I am using imprecise natural language to get fuzzy answers. If I could best describe it, it feels like writing a google search query vs writing a regexp. Not only because of the language aspect, but because it is hard to tell “what” the algorithm is latching on to, and why it is giving the answers it gives.

I will be writing up quite a few of these smaller articles, but keep each of them short. I have multiple times started 10k words oddysseys and never gone back to them.

Technique number 1: Establishing context

Because with each API call, the LLM starts “from scratch” (this is both its strength and its weakness), you have to provide context with each query. In the case of straight GPT API usage, this is entirely up to you. In the case of Copilot, a much more complex context is sent to the model (here's a write up of reverse engineering an earlier version of copilot: copilot-explorer | Hacky repo to see what the Copilot extension sends to the server) and in the case of ChatGPT I have more studying to do to give a decent answer, but it is able to obviously take previous messages into consideration.

A language model is a mathematical construct that will provide the probability for a certain word (or token, to be more precise) given a certain context. This allows it to accomplish a variety of tasks, for example by selecting the or one of the most probable tokens and build sentences that way. In the case of a large language model, this probability is computed by an immense deep learning network that has been trained on a gargantuan amount of data. There is no realistic way to say why some probability got computed, but there is definitely structure to it.

I think of these models are cars that have been engineered to follow a certain set of roads, at a certain speed, and with certain capabilities to navigate their environment, and it is our job now to direct them where to go. I like to use the following example, and have a human answer. Complete the following sentences: – As a suburban dad, when I go to town I use my ... – As a race car engineer, when I go to town I use my ... – As a 12 year old, when I go to town I use my ... – As an alien from outer space, when I go to town I use my ...

Think of prompting as a similar exercise, except that you often want the model to complete with much more useful information: either new facts, or longer sequences of words to save on typing and research time (say, scaffold out a shell script, a SQL schema, etc...)

Two weeks after ChatGPT came out and I had my “lol this is fun” time, I decided to use it as fully and honestly as I could for the entire week, as a tool like any other. Tools are often unintuitive; a good tool often requires you to practice a lot before its quality comes to shine—many tools can seriously hurt you if you don't know how to use them. It definitely feels the same with ChatGPT. 3 months later and I still think I am only scratching at the surface at what concretely large language models offer for my field of work: programming.

Tool building and personal ethics

I love tools, I have used and built many in my life—in fact, I think my “goal” in life is to build tools for other people. There is nothing more fulfilling than seeing someone use something I built to build something that absolutely floors me. There is nothing more fulfilling than seeing someone thoroughly enjoy and cherish a tool I built because it makes them feel like they are doing better work.

While I didn't think of formulating my personal ethics before picking up writing (I do now because I discovered that writing is itself a tool to sharpen ideas), I think I had a clear direction for most of my life. Save for one freelance job, I always rejected working for companies that weren't building tools for users (vs say, tools for companies, or just plain nonsense, like ad-tech). Discovering Ivan Illich and his “Tools for Conviviality” last year allowed me to put realize that these are concepts that you can articulate and communicate.

While I haven't even made it halfway through Illich's book, the first couple of chapters nail what my ethics are: tools and machines should be built and used to empower humans to live richer, more creative, more free lives. Tools should be built to augment human craft, not replace it.

My standpoint on large language models

I think that large language models (I will never be able to say “AI” because it is such a ridiculous, misleading, polarizing, disingenuous term) have an incredible potential for augmenting human craft. I genuinely didn't think this way of transforming natural language would appear during my lifetime. These models are a paradigm shift in how I work and write software (both professionally and in open-source). I am building tools that more than anything I've built so far, would allow me to share the joy and importance of knowledge and intellectual work, and allow others to do the same. I will write more about why I think that and how I use them to that effect (here's two examples in the meantime: https://share.descript.com/view/w2gXSYanYMp and https://share.descript.com/view/YGc8nnsL52G )

It also means that I find how these tools are released (especially ChatGPT and Bing Chat) and the overall discourse of “replacing customer support”, “a search engine that answers your questions”, “replacing artists” absolutely abhorrent. These things don't make art, they don't answer questions, and they certainly don't replace humans providing meaningful customer support. They can certainly help people do these things, but by themselves, they will just fool people into thinking there was meaning where there is none, and allow grifters to pretend the same. There is a complete 180 between a human using a large language model powered tool to provide better support because they now have more agency, and something taking agency from a human (to the point of replacing them entirely) and packaging it into a sterile chatbot.

As subtle as the difference between these two use cases might seem, to me, they are two entirely incompatible sides of the same medal. One side is building tools to empower humans, the other is building tools to disenfranchise humans, both workers and consumers. That subtlety makes talking about it hard, especially in my heavily “anti-capitalist” circles. The assumption is that LLMs are only there to replace workers and enrich techno robber barons, so any mention of a productive use of LLMs immediately leads to angry callouts and mob dogpiling (I am putting anti-capitalist in quotes because I certainly don't appreciate being called a tech-bro by someone who is a principal engineer at Microsoft, of all companies. Yeah, that stuck...).

What I am doing about it

As an individual, as a tool-builder, as a techno-optimist, I think the biggest impact I can make in order to make the world a slightly better place is to share how I use these tools to enrich my life, my work, creatively and intellectually, because it is not something written about much, and it is not an easy tool to steer.

I also am building opensource tooling and making it not just nice enough to use, but come packaged with a strong ethical stance, so that you can't just take it and then build a chatbot with it without coming into contact with some material that will hopefully make you think twice about what you are doing. What that looks like is still a bit unclear to me, but it's proper dada (see https://github.com/go-go-golems ).

It also means that I will consistently call out bullshit in the AI-pilled circles I hang out in (because part of being serious about a field that is overhyped is that you come in contact with a lot of BS and grift and exploitation). People are enthusiastic about these technologies for a lot of reasons, and their worldview is heavily shaped by the framing of the companies behind these models—most of them are already victims of the future the companies building these tools wish to unleash upon us, so it is often easy to start an earnest conversation. It is infinitely more productive than telling people that they are gullible fools, or harbor evil intentions.

If I can change the minds of 20 people in an AI-hype discord by dropping a few spicy links, then I'll definitely hang out on AI-hype discords. Conversely, if I can show people that think LLMs are just random words strung together that these tools can help grassroots organizations build more accessible documentation, websites, more secure software; that they can free you from sacrificing your cognitive potential on the altar of capitalist bullshit work, then that's where you will find me too.

(This article was written entirely without LLMs because I just want to get it out. Otherwise, I would have spent quite a bit more time revising and editing it with wordtune and chatGPT, because I think they do make my writing better.)