code
498 stories and discussions about code, aggregated from every source we track.
Release notes for Claude Code, including new features, improvements, and bug fixes by version.
Claude Code 2.1.277 added AGENTS.md support, but the loader sits behind a remote feature flag. With telemetry or nonessential traffic turned off, a local AGENTS.md is skipped without a warning. This is what I measured…
open-source IDE for thoughtful software design. Contribute to devdotfast/whiteboard development by creating an account on GitHub.
If we think Is writing code dead, and AI is generating all codebases, I still think the bigger problem is people or full teams not knowing anything anymore about the system...
The technical musings of Iain Cambridge.
The Git source-code management system is at the core of development processes worldwide, so cha [...]
How to prompt Opus 5.5, steer a long run, and check your results in Claude apps and Claude Code.
C++ Insights - See your source code with the eyes of a compiler - andreasfertig/cppinsights
A math solver leads to encrypted code in npm packages. Follow the loader, the trigger matrix that unlocks it, the remote access payload, and the full indicators.
Front-end antics and typographic mischievousness
<p><strong>Hi <a href="https://lobste.rs/~susam" rel="ugc">@susam</a>, I primarily know you as a Lisper, what other things do you use?</strong></p> <p>Yes, I use Lisp extensively for my personal projects, and much of what I do in my leisure is built on it. I ran a <a href="https://github.com/susam/mathb" rel="ugc">mathematics pastebin</a> for close to thirteen years. It was quite popular on some IRC channels. The pastebin was written in Common Lisp. My <a href="https://susam.net/" rel="ugc">personal website</a> and blog are generated using a tiny static site generator written in Common Lisp. Over the years I have built several other personal tools in it as well.</p> <p>I am an active Emacs Lisp programmer too. Many of my software tools are in fact Emacs Lisp functions that I invoke with convenient key sequences. They help me automate repetitive tasks as well as improve my text editing and task management experience.</p> <p>I use plenty of other tools as well. In my early adulthood, I spent many years working with C, C++, Java, and PHP. My first substantial open source contribution was to the Apache Nutch project which was in Java, and one of my early original open source projects was Uncap, a C program to remap keys on Windows.</p> <p>These days I use a lot of Python, along with some Go and Rust, but Lisp remains important to my personal work. I also enjoy writing small standalone tools directly in HTML and JavaScript, often with all the code in a single file in a readable, unminified form.</p> <p><strong>How did you first discover computing, then end up with Lisp, Emacs and mathematics?</strong></p> <p>I got introduced to computers through the Logo programming language as a kid. Using simple arithmetic, geometry, logic, and code to manipulate a two-dimensional world had a lasting effect on me.</p> <p>I still vividly remember how I ended up with Lisp. It was at an airport during a long layover in 2007. I wanted to use the time to learn something, so I booted my laptop running Debian GNU/Linux 4.0 (Etch) and then started <a href="https://www.gnu.org/software/clisp/" rel="ugc">GNU CLISP</a> 2.41. In those days, Wi-Fi in airports was uncommon. Smartphones and mobile data were also uncommon. So it was fortunate that I had CLISP already installed on my system and my laptop was ready for learning Common Lisp. I had it installed because I had wanted to learn Common Lisp for some time. I was especially attracted by its simplicity, by the fact that the entire language can be built up from a very small set of special forms. I use <a href="https://www.sbcl.org/" rel="ugc">SBCL</a> these days, by the way.</p> <p>I discovered Emacs through Common Lisp. Several sources recommended using the <a href="https://slime.common-lisp.dev/" rel="ugc">Superior Lisp Interaction Mode for Emacs (SLIME)</a> for Common Lisp programming, so that's where I began. For many years I continued to use Vim as my primary editor, while relying on Emacs and SLIME for Lisp development. Over time, as I learnt more about Emacs itself, I grew fond of Emacs Lisp and eventually made Emacs my primary editor and computing environment.</p> <p>I have loved mathematics since my childhood days. What has always fascinated me is how we can prove deep and complex facts using first principles and clear logical steps. That feeling of certainty and rigour is unlike anything else.</p> <p>Over the years, my love for the subject has been rekindled many times. As a specific example, let me share how I got into number theory. One day I decided to learn the RSA cryptosystem. As I was working through the <a href="https://people.csail.mit.edu/rivest/Rsapaper.pdf" rel="ugc">RSA paper</a>, I stumbled upon the Euler totient function φ(n) which gives the number of positive integers not exceeding n that are relatively prime to n. The paper first states that φ(p) = p - 1 for prime numbers p. That was obvious since p has no factors other than 1 and itself, so every integer from 1 up to p - 1 must be relatively prime to it. But then it presents φ(pq) = φ(p) · φ(q) = (p - 1)(q - 1) for primes p and q. That was not immediately obvious to me back then. After a few minutes of thinking, I managed to prove it from scratch. By the inclusion-exclusion principle, we count how many integers from 1 up to pq are not divisible by p or q. There are pq integers in total. Among them, there are q integers divisible by p, and p integers divisible by q. So we need to subtract p + q from pq. But since one integer (pq itself) is counted in both groups, we add 1 back. Therefore φ(pq) = pq - (p + q) + 1 = (p - 1)(q - 1). Next I could also obtain the general formula for φ(n) for an arbitrary positive integer n using the same idea. There are several other proofs too, but that is how I derived the general formula for φ(n) when I first encountered it. And just like that, I had begun to learn number theory!</p> <p><strong>You've said you prefer computing for fun. What is fun to you? Do you have an idea of what makes something fun or not?</strong></p> <p>For me, fun in computing began when I first learnt IBM/LCSI PC Logo when I was nine years old. I had very limited access to computers back then, perhaps only about two hours per <em>month</em> in the computer laboratory at my primary school. Most of my Logo programming happened with pen and paper at home. I would "test" my programs by tracing the results on graph paper. Eventually I would get about thirty minutes of actual computer time in the lab to run them for real.</p> <p>So back then, most of my computing happened without an actual computer. But even with that limited access to computers, a whole new world opened up for me: one that showed me the joy of computing, and more importantly, the joy of sharing my little programs with my friends and teachers. One particular Logo program I still remember very well drew a house with animated dashed lines, where the dashes moved around the outline of the house. Everyone around me loved it, copied it, and tweaked it to change the colours, alter the details, and add their own little touches.</p> <p>For me, fun in computing comes from such exploration and sharing. I enjoy asking "what happens if" and then seeing where it leads me. My Emacs package <a href="https://elpa.nongnu.org/nongnu/devil.html" rel="ugc">devil-mode</a> comes from such exploration. It came from asking, "What happens if we avoid using the <code>Ctrl</code> and <code>Meta</code> modifier keys and use the comma key (<code>,</code>) or another suitable key as a leader key instead? And can we still have a non-modal editing experience?"</p> <p>Sometimes computing for fun may mean crafting a minimal esoteric drawing language, making a small game, or building a tool that solves an interesting problem elegantly. It is a bonus if the exploration results in something working well enough that I can share with others on the World Wide Web and others find it fun too.</p> <p><strong>How do you choose what to investigate? Which most interest you, with what commonalities?</strong></p> <p>For me, it has always been one exploration leading to another.</p> <p>For example, I originally built <a href="https://github.com/susam/mathb" rel="ugc">MathB</a> for my friends and myself who were going through a phase in our lives when we used to challenge each other with mathematical puzzles. This tool became a nice way to share solutions with each other. Its use spread from my friends to their friends and colleagues, then to schools and universities, and eventually to IRC channels.</p> <p>Similarly, I built <a href="https://github.com/susam/texme" rel="ugc">TeXMe</a> when I was learning neural networks and taking a lot of notes on the subject. I was not ready to share the notes online, but I did want to share them with my friends and colleagues who were also learning the same topic. Normally I would write my notes in LaTeX, compile them to PDF, and share the PDF, but in this case, I wondered, what if I took some of the code from MathB and created a tool that would let me write plain Markdown (<a href="https://github.github.com/gfm/" rel="ugc">GFM</a>) + LaTeX (<a href="https://www.mathjax.org/" rel="ugc">MathJax</a>) in a <code>.html</code> file and have the tool render the file as soon as it was opened in a web browser? That resulted in TeXMe, which has surprisingly become one of my most popular projects, receiving millions of hits in some months according to the CDN statistics.</p> <p>Another example is <a href="https://susam.github.io/muboard/" rel="ugc">Muboard</a>, which is a bit like an interactive mathematics chalkboard. I built this when I was hosting an <a href="https://susam.net/journey-to-prime-number-theorem.html" rel="ugc">analytic number theory book club</a> and I needed a way to type LaTeX snippets live on screen and see them immediately rendered. That made me wonder: what if I took TeXMe, made it interactive, and gave it a chalkboard look-and-feel? That led to Muboard.</p> <p>So we can see that sharing mathematical notes and snippets has been a recurring theme in several of my projects. But that is only a small fraction of my interests. I have a wide variety of interests in computing. I also engage in random explorations, like writing IRC clients (<a href="https://github.com/susam/nimb" rel="ugc">NIMB</a>, <a href="https://github.com/susam/tzero" rel="ugc">Tzero</a>), ray tracing (<a href="https://github.com/susam/pov25" rel="ugc">POV-Ray</a>, <a href="https://github.com/spxy/java-ray-tracing" rel="ugc">Java</a>), writing Emacs guides (<a href="https://github.com/susam/emacs4cl" rel="ugc">Emacs4CL</a>, <a href="https://github.com/susam/emfy" rel="ugc">Emfy</a>), developing small single-HTML-file games (<a href="https://susam.net/invaders.html" rel="ugc">Andromeda Invaders</a>, <a href="https://susam.net/myrgb.html" rel="ugc">Guess My RGB</a>), purely recreational programming (<a href="https://susam.net/fxyt.html" rel="ugc">FXYT</a>, <a href="https://github.com/susam/may4" rel="ugc">may4.fs</a>, <a href="https://susam.net/self-printing-machine-code.html" rel="ugc">self-printing machine code</a>, <a href="https://susam.net/primegrid.html" rel="ugc">prime number grid explorer</a>), and so on. The list goes on. When it comes to hobby computing, I don't think I can pick just one domain and say it interests me the most. I have a lot of interests.</p> <p><strong>What is computing, to you?</strong></p> <p>Computing, to me, covers a wide range of activities: programming a computer, using a computer, understanding how it works, even building one. For example, I once built a tiny 16-bit CPU along with a small main memory that could hold only eight 16-bit instructions, using VHDL and a Xilinx CPLD kit. The design was based on the Mano CPU introduced in the book Computer System Architecture (3rd ed.) by M. Morris Mano. It was incredibly fun to enter instructions into the main memory, one at a time, by pushing DIP switches up and down and then watch the CPU I had built myself execute an entire program. For someone like me, who usually works with software at higher levels of abstraction, that was a thrilling experience!</p> <p>Beyond such experiments, computing also includes more practical and concrete activities, such as installing and using my favourite Linux distribution (Debian), writing software tools in languages like Common Lisp, Emacs Lisp, Python, and the shell command language, or customising my Emacs environment to automate repetitive tasks.</p> <p>To me, computing also includes the abstract stuff like spending time with abstract algebra and number theory and getting a deeper understanding of the results pertaining to groups, rings, and fields, as well as numerous number-theoretic results. Browsing the On-Line Encyclopedia of Integer Sequences (OEIS), writing small programs to explore interesting sequences, or just thinking about them is computing too. I think many of the interesting results in computer science have deep mathematical foundations. I believe much of computer science is really discrete mathematics in action.</p> <p>And if we dive all the way down from the CPU to the level of transistors, we encounter continuous mathematics as well, with non-linear voltage-current relationships and analogue behaviour that make digital computing possible. It is fascinating how, as a relatively new species on this planet, we have managed to take sand and find a way to to use continuous voltages and currents in electronic circuits built with silicon, and convert them into the discrete operations of digital logic. We have machines that can simulate themselves!</p> <p>To me, all of this is fun. To study and learn about these things, to think about them, to understand them better, and to accomplish useful or amusing results with this knowledge is all part of the fun.</p> <p><strong>How do you view programming vs. domains?</strong></p> <p>I focus more on the domain than the tool. Most of the time it is a problem that catches my attention, and then I explore it to understand the domain and arrive at a solution. The problem itself usually points me to one of the tools I already know.</p> <p>For example, if it is about working with text files, I might write an Emacs Lisp function. If it involves checking large sets of numbers rapidly for patterns, I might choose C++ or Rust. But if I want to share interactive visualisations of those patterns with others, I might rewrite the solution in HTML and JavaScript, possibly with the use of the Canvas API, so that I can share the work as a self-contained file that others can execute easily within their web browsers. When I do that, I prefer to keep the HTML neat and readable, rather than bundled or minified, so that people who like to 'View Source' can copy, edit, and customise the code themselves, and immediately see their changes take effect.</p> <p>Let me share a specific example. While working on a game, I first used <code>CanvasRenderingContext2D.fillText()</code> to display text on the game. However, dissatisfied with the text rendering quality, I began looking for IBM PC OEM fonts and similar retro fonts online. After downloading a few font packs, I wrote a little Python script to convert them to bitmaps (arrays of integers), and then used the bitmaps to draw text on the canvas using JavaScript, one cell at a time, to get pixel-perfect results! These tiny Python and JavaScript tools were good enough that I felt comfortable sharing them together as a tiny toolkit called <a href="https://susam.github.io/pcface/src/demo.html" rel="ugc">PCFace</a>. This toolkit offers JavaScript bitmap arrays and tiny JavaScript rendering functions, so that someone else who wants to display text on their game canvas using PC fonts and nothing but plain HTML and JavaScript can do so without having to solve the problem from scratch!</p> <p><strong>Has the rate of your making new emacs functions has diminished over time (as if everything's covered) or do the widening domains lead to more? I'm curious how applicable old functionality is for new problems and how that impacts the APIs!</strong></p> <p>My rate of making new Emacs functions has definitely decreased. There are two reasons. One is that over the years my computing environment has converged into a comfortable, stable setup I am very happy with. The other is that at this stage of life I simply cannot afford the time to endlessly tinker with Emacs as I did in my younger days.</p> <p>More generally, when it comes to APIs, I find that well-designed functionality tends to remain useful even when new problems appear. In Emacs, for example, many of my older functions continue to serve me well because they were written in a composable way. New problems can often be solved with small wrappers or combinations of existing functions. I think APIs that consist of functions that are simple, orthogonal, and flexible age well. If each function in an API does one thing and does it well (the Unix philosophy), it will have long-lasting utility.</p> <p>Of course, new domains and problems do require new functions and extensions to an API, but I think it is very important to not give in to the temptation of enhancing the existing functions by making them more complicated with optional parameters, keyword arguments, nested branches, and so on. Personally, I have found that it is much better to implement new functions that are small, orthogonal, and flexible, each doing one thing and doing it well.</p> <p><strong>What design methods or tips do you have, to increase composability?</strong></p> <p>For me, good design starts with good vocabulary. Clear vocabulary makes abstract notions concrete and gives collaborators a shared language to work with. For example, while working on a network events database many years ago, we collected data minute by minute from network devices. We decided to call each minute of data from a single device a "nugget". So if we had 15 minutes of data from 10 devices, that meant 150 nuggets.</p> <p>Why "nugget"? Because it was shorter and more convenient than repeatedly saying "a minute of data from one device". Why not something less fancy like "chunk"? Because we reserved "chunk" for subdivisions within a nugget. Perhaps there were better choices, but "nugget" was the term we settled on, and it quickly became shared terminology between the collaborators. Good terminology naturally carries over into code. With this vocabulary in place, function names like <code>collect_nugget()</code>, <code>open_nugget()</code>, <code>parse_chunk()</code>, <code>index_chunk()</code>, <code>skip_chunk()</code>, etc. immediately become meaningful to everyone involved.</p> <p>Thinking about the vocabulary also ensures that we are thinking about the data, concepts, and notions we are working with in a deliberate manner, and that kind of thinking also helps when we design the architecture of software.</p> <p>Too often I see collaborators on software projects jump straight into writing functions that take some input and produce some desired effect, with variable names and function names decided on the fly. To me, this feels backwards. I prefer the opposite approach. Define the terms first, and let the code follow from them.</p> <p>I also prefer developing software in a layered manner, where complex functionality is built from simpler, well-named building blocks. It is especially important to avoid <em>layer violations</em>, where one complex function invokes another complex function. That creates tight coupling between two complex functions. If one function changes in the future, we have to reason carefully about how it affects the other. Since both are already complex, the cognitive burden is high. A better approach, I think, is to identify the common functionality they share and factor that out into smaller, simpler functions.</p> <p>To summarise, I like to develop software with a clear vocabulary, consistent use of that vocabulary, a layered design where complex functions are built from simpler ones, and by avoiding layer violations. I am sure none of this is new to the Lobsters community. Some of these ideas also occur in <a href="https://en.wikipedia.org/wiki/Domain-driven_design" rel="ugc">domain-driven design</a> (DDD). DDD defines the term <em>ubiquitous language</em> to mean, "A language structured around the domain model and used by all team members within a bounded context to connect all the activities of the team with the software." If I could call this approach of software development something, I would simply call it "vocabulary-driven development" (VDD), though of course DDD is the more comprehensive concept.</p> <p>Like I said, none of this is likely new to the Lobsters community. In particular, I suspect Forth programmers would find it too obvious. In Forth, it is very difficult to begin with a long, poorly thought-out monolithic word and then break it down into smaller ones later. The stack effects quickly become too hard to track mentally with that approach. The only viable way to develop software in Forth is to start with a small set of words that represent the important notions of the problem domain, test them immediately, and then compose higher-level words from the lower-level ones. Forth naturally encourages a layered style of development, where the programmer thinks carefully about the domain, invents vocabulary, and expresses complex ideas in terms of simpler ones, almost in a mathematical fashion. In my experience, this kind of deliberate design produces software that remains easy to understand and reason about even years after it was written.</p> <p><strong>Not enhancing existing functions but adding new small ones seems quite lovely, but how do you come back to such a codebase later with many tiny functions? At points, I've advocated for very large functions, particularly traumatized by Java-esque 1000 functions in 1000 files approaches. When you had time, would you often rearchitecture the conceptual space of all of those functions?</strong></p> <p>The famous quote from Alan J. Perlis comes to mind:</p> <blockquote> <p><em>It is better to have 100 functions operate on one data structure than 10 functions on 10 data structures.</em></p> </blockquote> <p>Personally, I enjoy working with a codebase that has thousands of functions, provided most of them are small, well-scoped, and do one thing well. That said, I am not dogmatically opposed to large functions. It is always a matter of taste and judgement. Sometimes one large, cohesive function is clearer than a pile of tiny ones.</p> <p>For example, when I worked on parser generators, I often found that lexers and finite state machines benefited from a single top-level function containing the full tokenisation logic or the full state transition logic in one place. That function could call smaller helpers for specific tasks, but we still need the overall <code>switch</code>-<code>case</code> or <code>if</code>-<code>else</code> or <code>cond</code> ladder somewhere. I think trying to split that ladder into smaller functions would only make the code harder to follow.</p> <p>So while I lean towards small, composable functions, the real goal is to strike a balance that keeps code maintainable in the long run. Each function should be as small as it can reasonably be, and no smaller.</p> <p><strong>Like you, I program as a tool to explore domains. Which do you know the most about?</strong></p> <p>For me too, the appeal of computer programming lies especially in how it lets me explore different domains. There are two kinds of domains in which I think I have gained good expertise. The first comes from years of developing software for businesses, which has included solving problems such as network events parsing, indexing and querying, packet decoding, developing parser generators, database session management, and TLS certificate lifecycle management. The second comes from areas I pursue purely out of curiosity or for hobby computing. This is the kind I am going to focus on in our conversation.</p> <p>Although computing and software are serious business today, for me, as for many others, computing is also a hobby.</p> <p>Personal hobby projects often lead me down various rabbit holes, and I end up learning new domains along the way. For example, although I am not a web developer, I learnt to build small, interactive single-page tools in plain HTML, CSS, and JavaScript simply because I needed them for my hobby projects over and over again. An early example is <a href="https://susam.net/quickqwerty.html" rel="ugc">QuickQWERTY</a>, which I built to teach myself and my friends touch-typing on QWERTY keyboards. Another example is <a href="https://susam.net/cfrs.html" rel="ugc">CFRS[]</a>, which I created because I wanted to make a total (non-Turing complete) drawing language that has turtle graphics like Logo but is absolutely minimal like P′′.</p> <p><strong>You use double spaces after periods which I'd only experienced from people who learned touch typing on typewriters, unexpected!</strong></p> <p>Yes, I do separate sentences by double spaces. It is interesting that you noticed this.</p> <p>I once briefly learnt touch typing on typewriters as a kid, but those lessons did not stick with me. It was much later, when I used a Java applet-based touch typing tutor that I found online about two decades ago, that the lessons really stayed with me. Surprisingly, that application taught me to type with a single space between sentences. By the way, I disliked installing Java plugins into the web browser, so I wrote <a href="https://susam.net/quickqwerty.html" rel="ugc">QuickQWERTY</a> as a similar touch typing tutor in plain HTML and JavaScript for myself and my friends.</p> <p>I learnt to use double spaces between sentences first with Vim and then later again with Emacs. For example, in Vim, the <code>joinspaces</code> option is on by default, so when we join sentences with the normal mode command <code>J</code>, or format paragraphs with <code>gqap</code>, Vim inserts two spaces after full stops. We need to disable that behaviour with <code>:set nojoinspaces</code> if we want single spacing.</p> <p>It is similar in Emacs. In Emacs, the <code>delete-indentation</code> command (<code>M-^</code>) and the <code>fill-paragraph</code> command (<code>M-q</code>) both insert two spaces between sentences by default. Single spacing can be enabled with <code>(setq sentence-end-double-space nil)</code>.</p> <p>Incidentally, I spent a good portion of the README for my Emacs quick-start DIY kit named <a href="https://github.com/susam/emfy" rel="ugc">Emfy</a> discussing sentence spacing conventions under the section <a href="https://github.com/susam/emfy#single-space-for-sentence-spacing" rel="ugc">Single Space for Sentence Spacing</a>. There I explain how to configure Emacs to use single spaces, although I use double spaces myself. That's because many new Emacs users prefer single spacing.</p> <p>The defaults in Vim and Emacs made me adopt double spacing. The double spacing convention is also widespread across open source software. If we look at the Vim help pages, Emacs built-in documentation, or the Unix and Linux man pages, double spacing is the norm. Even inline comments in traditional open source projects often use it. For example, see Vim's <a href="https://github.com/vim/vim/blob/v9.1.1752/runtime/doc/usr_01.txt" rel="ugc">:h usr_01.txt</a>, Emacs's <a href="https://cgit.git.savannah.gnu.org/cgit/emacs.git/tree/doc/emacs/emacs.texi?h=emacs-30.2#n1556" rel="ugc">(info "(emacs) Intro")</a>, or the comments in the <a href="https://gcc.gnu.org/git/?p=gcc.git;f=gcc/cfg.cc;hb=releases/gcc-15.2.0" rel="ugc">GCC source code</a>.</p> <p><strong>How do you approach learning a new domain?</strong></p> <p>When I take on a new domain, there is of course a lot of reading involved from articles, books, and documentation. But as I read, I constantly try to test what I learn. Whenever I see a claim, I ask myself, "If this were wrong, how could I demonstrate it?" Then I design a little experiment, perhaps write a snippet of code, or run a command, or work through a concrete example, with the goal of checking the claim in practice.</p> <p>Now I am not genuinely hoping to prove a claim wrong. It is just a way to engage with the material. To illustrate, let me share an extremely simple and generic example without going into any particular domain. Suppose I learn that Boolean operations in Python short-circuit. I might write out several experimental snippets like the following:</p> <pre lang="python"><code>def t(): print('t'); return True def f(): print('f'); return False f() or t() or f() </code></pre> <p>And then confirm that the results do indeed confirm short-circuit evaluation (<code>f</code> followed by <code>t</code> in this case).</p> <p>At this point, one could say, "Well, you just confirmed what the documentation already told you." And that's true. But for me, the value lies in trying to test it for myself. Even if the claim holds, the act of checking forces me to see the idea in action. That not only reinforces the concept but also helps me build a much deeper intuition for it.</p> <p>Sometimes these experiments also expose gaps in my own understanding. Suppose I didn't properly know what "short-circuit" means. Then the results might contradict my expectations. That contradiction would push me to correct my misconception, and that's where the real learning happens.</p> <p>Occasionally, this process even uncovers subtleties I didn't expect. For example, while learning socket programming, I discovered that a client can successfully receive data using <code>recv()</code> even after calling <code>shutdown()</code>, contrary to what I had first inferred from the specifications. See my Stack Overflow post "<a href="https://stackoverflow.com/q/39698037/303363" rel="ugc">Why can recv() in the client program receive messages sent to the client after the client has invoked shutdown(sockfd, SHUT_RD)?</a>" for more details if you are curious.</p> <p>Now this method cannot always be applied, especially if it is very expensive or unwieldy to do so. For example, if I am learning something in the finance domain, it is not always possible to perform an actual transaction. One can sometimes use simulation software, mock environments, or sandbox systems to explore ideas safely. Still, it is worth noting that this method has its limitations.</p> <p>In mathematics, though, I find this method highly effective. When I study a new branch of mathematics, I try to come up with examples and counterexamples to test what I am learning. Often, failing to find a counterexample helps me appreciate more deeply why a claim holds and why no counterexamples exist.</p> <p><strong>Do you have trouble not getting distracted with so much on your plate? I'm curious how you balance the time commitments of everything!</strong></p> <p>Indeed, it is very easy to get distracted. One thing that has helped over the years is the increase in responsibilities in other areas of my life. These days I also spend some of my free time studying mathematics textbooks. With growing responsibilities and the time I devote to mathematics, I now get at most a few hours each week for hobby computing. This automatically narrows down my options. I can explore perhaps one or at most two ideas in a month, and that constraint makes me very deliberate about choosing my pursuits.</p> <p>Many of the explorations do not evolve into something solid that I can share. They remain as little experimental code snippets or notes archived in a private repository. But once in a while, an exploration grows into something concrete and feels worth sharing on the Web. That becomes a short-term hobby project. I might work on it over a weekend if it is small, or for a few weeks if it is more complex. When that happens, the goal of sharing the project helps me focus.</p> <p>I try not to worry too much about making time. After all, this is just a hobby. Other areas of my life have higher priority. I also want to devote a good portion of my free time to learning more mathematics, which is another hobby I am passionate about. Whatever little spare time remains after attending to the higher-priority aspects of my life goes into my computing projects, usually a couple of hours a week, most of it on weekends.</p> <p><strong>How does blogging mix in? What's the development like of a single piece of curiosity through wrestling with the domain, learning and sharing it etc.?</strong></p> <p>Maintaining my personal website is another aspect of computing that I find very enjoyable. My website began as a loose collection of pages on a LAN site during my university days. Since then I have been adding pages to it to write about various topics that I find interesting. It acquired its blog shape and form much later when blogging became fashionable.</p> <p>I usually write a new blog post when I feel like there is some piece of knowledge or some exploration that I want to archive in a persistent format. Now what the development of a post looks like depends very much on the post. So let me share two opposite examples to describe what the development of a single piece looks like.</p> <p>One of my most frequently visited posts is <a href="https://susam.net/lisp-in-vim.html" rel="ugc">Lisp in Vim</a>. It started when I was hosting a Common Lisp programming club for beginners. Although I have always used Emacs and SLIME for Common Lisp programming myself, many in the club used Vim, so I decided to write a short guide on setting up something SLIME-like there. As a former long-time Vim user myself, I wanted to make the Lisp journey easier for Vim users too. I thought it would be a 30-minute exercise where I write up a README that explains how to install <a href="https://github.com/kovisoft/slimv" rel="ugc">Slimv</a> and how to set it up in Vim. But then I discovered a newer plugin called <a href="https://github.com/vlime/vlime" rel="ugc">Vlime</a> that also offered SLIME-like features in Vim! That detail sent me down a very deep rabbit hole. Now I needed to know how the two packages were different, what their strengths and weaknesses were, how routine operations were performed in both, and so on. What was meant to be a short note turned into a nearly 10,000-word article. As I was comparing the two SLIME-like packages for Vim, I also found a few bugs in Slimv and contributed fixes for them (<a href="https://github.com/kovisoft/slimv/pull/87" rel="ugc">#87</a>, <a href="https://github.com/kovisoft/slimv/pull/88" rel="ugc">#88</a>, <a href="https://github.com/kovisoft/slimv/pull/89" rel="ugc">#89</a>, <a href="https://github.com/kovisoft/slimv/pull/90" rel="ugc">#90</a>). Writing this blog post turned into a month-long project!</p> <p>At the opposite extreme is a post like <a href="https://susam.net/elliptical-python-programming.html" rel="ugc">Elliptical Python Programming</a>. I stumbled upon Python <a href="https://docs.python.org/3/library/constants.html#Ellipsis" rel="ugc">Ellipsis</a> while reviewing someone's code. It immediately caught my attention. I wondered if, combined with some standard obfuscation techniques, one could write arbitrary Python programs that looked almost like Morse code. A few minutes of experimentation showed that a genuinely Morse code-like appearance was not possible, but something close could be achieved. So I wrote what I hope is a humorous post demonstrating that arbitrary Python programs can be written using a very restricted set of symbols, one of which is the ellipsis. It took me less than an hour to write this post. The final result doesn't look quite like Morse code as I had imagined, but it is quite amusing nevertheless!</p> <p><strong>What draws you to post and read online forums? How do you balance or allot time for reading technical articles, blogs etc.?</strong></p> <p>The exchange of ideas! Just as I enjoy sharing my own computing-related thoughts, ideas, and projects, I also find joy in reading what others have to share.</p> <p>Other areas of my life take precedence over hobby projects. Similarly, I treat the hobby projects as higher priority than reading technical forums.</p> <p>After I've given time to the higher-priority parts of my life and to my own technical explorations, I use whatever spare time remains to read articles, follow technical discussions, and occasionally add comments.</p> <p><strong>When you decided to stop with MathB due to moderation burdens, I offered to take over/help and you mentioned others had too. Did anyone end up forking it, to your knowledge?</strong></p> <p>I first thought of shutting down the <a href="https://github.com/susam/mathb" rel="ugc">MathB</a>-based pastebin website in November 2019. The website had been running for seven years at that time. When I announced my thoughts to the IRC communities that would be affected, I received a lot of support and encouragement. A few members even volunteered to help me out with moderation. That support and encouragement kept me going for another six years. However, the volunteers eventually became busy with their own lives and moved on. After all, moderating user content for an open pastebin that anyone in the world can post to is a thankless and tiring activity. So most of the moderation activity fell back on me. Finally, in February 2025, I realised that I no longer want to spend time on this kind of work.</p> <p>I developed MathB with a lot of passion for myself and my friends. I had no idea at the time that this little project would keep a corner of my mind occupied even during weekends and holidays. There was always a nagging worry. What if someone posted content that triggered compliance concerns and my server was taken offline while I was away? I no longer wanted that kind of burden in my life. So I finally decided to shut it down. I've written more about this in <a href="https://susam.net/mathbin-is-shutting-down.html" rel="ugc">MathB.in Is Shutting Down</a>.</p> <p>To my knowledge, no one has forked it, but others have developed alternatives. Further, the <a href="https://wiki.archiveteam.org/" rel="ugc">Archive Team</a> has <a href="https://web.archive.org/web/*/https://mathb.in/" rel="ugc">archived</a> all posts from the now-defunct MathB-based website. A member of the Archive Team reached out to me over IRC and we worked together for about a week to get everything successfully archived.</p> <p><strong>What're your favorite math textbooks?</strong></p> <p>I have several favourite mathematics books, but let me share three I remember especially fondly.</p> <p>The first is <em>Advanced Engineering Mathematics</em> by Erwin Kreyszig. I don't often see this book recommended online, but for me it played a major role in broadening my horizons. I think I studied the 8th edition back in the early 2000s. It is a hefty book with over a thousand pages, and I remember reading it cover to cover, solving every exercise problem along the way. It gave me a solid foundation in routine areas like differential equations, linear algebra, vector calculus, and complex analysis. It also introduced me to Fourier transforms and Laplace transforms, which I found fascinating.</p> <p>Of course, the Fourier transform has a wide range of applications in signal processing, communications, spectroscopy, and more. But I want to focus on the fun and playful part. In the early 2000s, I was also learning to play the piano as a hobby. I used to record my amateur music compositions with <a href="https://github.com/audacity/audacity" rel="ugc">Audacity</a> by connecting my digital piano to my laptop with a line-in cable. It was great fun to plot the spectrum of my music on Audacity, apply high-pass and low-pass filters, and observe how the Fourier transform of the audio changed and then hear the effect on the music. That kind of hands-on tinkering made Fourier analysis intuitive for me, and I highly recommend it to anyone who enjoys both music and mathematics.</p> <p>The second book is <em>Introduction to Analytic Number Theory</em> by Tom M. Apostol. As a child I was intrigued by the prime number theorem but lacked the mathematical maturity to understand its proof. Years later, as an adult, I finally taught myself the proof from Apostol's book. It was a fantastic journey that began with simple concepts like the Möbius function and Dirichlet products and ended with quite clever contour integrals that proved the theorem. The complex analysis I had learnt from Kreyszig turned out to be crucial for understanding those integrals. Along the way I gained a deeper understanding of the Riemann zeta function ζ(s). The book discusses zero-free regions where ζ(s) does not vanish, which I found especially fascinating. Results like ζ(-1) = -1/12, which once seemed mysterious, became obvious after studying this book.</p> <p>The third is <em>Galois Theory</em> by Ian Stewart. It introduced me to field extensions, field homomorphisms, and solubility by radicals. I had long known that not all quintic equations are soluble by radicals, but I didn't know why. Stewart's book taught me exactly why. In particular, it demonstrated that the polynomial t⁵ - 6t + 3 over the field of rational numbers is not soluble by radicals. This particular result, although fascinating, is just a small part of a much larger body of work, which is even more remarkable. To arrive at this result, the book takes us through a wonderful journey that includes the theory of polynomial rings, algebraic and transcendental field extensions, impossibility proofs for ruler-and-compass constructions, the Galois correspondence, and much more.</p> <p>One of the most rewarding aspects of reading books like these is how they open doors to new knowledge, including things I didn't even know that I didn't know.</p> <p><strong>How does the newer math jell with or inform past or present computing, compared to much older stuff?</strong></p> <p>I don't always think explicitly about how mathematics informs computing, past or present. Often the textbooks I pick feel very challenging to me, so much so that all my energy goes into simply mastering the material. It is arduous but enjoyable. I do it purely for the fun of learning without worrying about applications.</p> <p>Of course, a good portion of pure mathematics probably has no real-world applications. As G. H. Hardy famously wrote in <em>A Mathematician's Apology</em>:</p> <blockquote> <p><em>I have never done anything 'useful'. No discovery of mine has made, or is likely to make, directly or indirectly, for good or ill, the least difference to the amenity of the world.</em></p> </blockquote> <p>But there is no denying that some of it does find applications. Were Hardy alive today, he might be disappointed that number theory, his favourite field of "useless" mathematics, is now a crucial part of modern cryptography. Electronic commerce wouldn't likely exist without it.</p> <p>Similarly, it is amusing how something as abstract as abstract algebra finds very concrete applications in coding theory. Concepts such as polynomial rings, finite fields, and cosets of subspaces in vector spaces over finite fields play a crucial role in error-correcting codes, without which modern data transmission and storage would not be possible.</p> <p>On a more personal note, some simpler areas of mathematics have been directly useful in my own work. While solving problems for businesses, information entropy, combinatorics, and probability theory were crucial when I worked on gesture-based authentication about one and a half decades ago.</p> <p>Similarly, when I was developing Bloom filter-based indexing and querying for a network events database, again, probability theory was crucial in determining the parameters of the Bloom filters (such as the number of hash functions, bits per filter, and elements per filter) to ensure that the false positive rate remained below a certain threshold. Subsequent testing with randomly sampled network events confirmed that the observed false positive rate matched the theoretical estimate quite well. It was very satisfying to see probability theory and the real world agreeing so closely.</p> <p>Beyond these specific examples, studying mathematics also influences the way I think about problems. Embarking on journeys like analytic number theory or Galois theory is humbling. There are times when I struggle to understand a small paragraph of the book, and it takes me several hours (or even days) to work out the arguments in detail with pen and paper (lots of it) before I really grok them. That experience of grappling with dense reasoning teaches humility and also makes me sceptical of complex, hand-wavy logic in day-to-day programming.</p> <p>Several times I have seen code that bundles too many decisions into one block of logic, where it is not obvious whether it would behave correctly in all circumstances. Explanations may sometimes be offered about why it works for reasonable inputs, but the reasoning is often not watertight. The experience of working through mathematical proofs, writing my own, making mistakes, and then correcting them has taught me that if the reasoning for correctness is not clear and rigorous, something could be wrong. In my experience, once such code sees real-world usage, a bug is nearly always found.</p> <p>That's why I usually insist either on simplifying the logic or on demonstrating correctness in a clear, rigorous way. Sometimes this means doing a case-by-case analysis for different types of inputs or conditions, and showing that the code behaves correctly in each case. There is also a bit of an art to reducing what seem like numerous or even infinitely many cases to a small, manageable set of cases by spotting structure, such as symmetries, invariants, or natural partitions of the input space. Alternatively, one can look for a simpler argument that covers all cases. These are techniques we employ routinely in mathematics, and I think that kind of thinking and reasoning is quite valuable in software development too.</p>
The Git source-code management system is at the core of development processes worldwide, so cha [...]
Claude Code skills for chess post-mortems: Stockfish-backed annotated PGN, HTML viewer, narrated video - brumar/chess-postmortem-skills
Code similarity detection using treesitter. Contribute to dsummersl/treepeat development by creating an account on GitHub.
How I'm using Claude in fall 2026: Blender, CGI, and music composition, without running code on my computer or opening a single Claude Code thread myself.
Front-end antics and typographic mischievousness
A small, fast code editor for Windows, Linux and macOS. Written in assembly.
Table of Contents A Line That Does Nothing... Except Keep Production Alive Some Code...
Automatic project memory for Claude Code. Also works with Cursor and Codex. - Avinash-jetwani/jevmem
<p>Our dear <a href="https://lobste.rs/~sjamaan" rel="ugc">@sjamaan</a> (<a href="https://www.more-magic.net" rel="ugc">website</a>) is a CHICKEN scheme maintainer and professional Clojure developer. We got to know each other on IRC over a few months and discussed:</p> <ul> <li> <a href="https://call-cc.org/" rel="ugc">CHICKEN</a> Scheme and its 6.0.0 release</li> <li>Scheme's community and standardization process</li> <li>Postgres, the horrors of MySQL and (default) SQLite</li> <li>Clojure</li> </ul> <blockquote> <p>My ongoing core contributions mainly focus on the numerical tower code, keeping the in-core copy of the irregex library up-to-date with the upstream version (of which I'm a co-maintainer), squashing bugs and the odd security fix. I enjoy deep diving into odd corners of a code base to get a better understanding and then improve any weirdnesses I find. - <a href="https://wiki.call-cc.org/users/peter-bex" rel="ugc">His CHICKEN About</a></p> </blockquote> <hr> <strong>Beginnings</strong> <p><strong>How'd you start computing?</strong></p> <p>I started computing when I got an old hand-me-down C64 which came with a "learn BASIC" book targeted at kids. Of course, I wanted to write my own computer games (which I never ended up doing). Later I got a real PC for my birthday and discovered my BASIC knowledge sort of transferred (with QBASIC in DOS).</p> <p>Later, I learned about C, which I used for many years until at uni there was a course which taught Lisp (Scheme, really). We started with The Little Lisper/Schemer, and then SICP. I had a "functional programming course" before that which I almost flunked because it just didn't make any sense (they used Concurrent Clean, because obviously teachers use their own language to teach regardless of its qualities - a common fault in academia). But the Little Schemer finally made it click. The teacher also showed how to implement objects using nothing but lambdas which I found awesome.</p> <p>I actually studied AI before all the LLM bullshit. I much preferred the cleverness of the classical AI algorithms like A* search and genetic algorithms, but I haven't really used them much in practice, only for my studies. I keep thinking I should use a GA for something, but no real use case so far. But even back then it was clear that neural networks were the future, though I found them boring because it's just a bit of math (which I initially barely understood) and it's basically a black box. I'm still grateful I studied AI because that's the reason I came into contact with Lisp.</p> <p>I might've looked into Lisp myself at some point (having been curious about it as one of the "foundational languages"), but I might not have had sufficient gumption to really dig in. After uni I got a job where they were using Rails in those somewhat early days (2006), so I learned Ruby as well. I liked learning Ruby and thought it was cool to see the power of Rails, but later got very frustrated with it because Rails really has strong opinions and my programming style didn't seem fully compatible with it.</p> <strong>CHICKEN & Scheme</strong> <p><strong>Why CHICKEN?</strong></p> <p>After that course, I tried using Lisp for every personal project. I first started with Scheme48 but it wasn't very practical (though very elegant). I remember running into problems with the image not being big enough, running out of memory. I never really liked PLT Scheme (now Racket), coming into first contact with it through DrRacket, which felt very sluggish to me, though I do think DrRacket's a cool alternative view of what an IDE could do. For example, when you hover over a variable and it shows you a line pointing to the origin of that variable.</p> <p>CHICKEN was a practical and fast system, with a good community and acceptable license (I had quite a distaste for GPL at the time). CHICKEN is also one of two (as far as we know) implementations that use the Cheney on the MTA technique <a href="https://wiki.call-cc.org/chicken-compilation-process" rel="ugc">explained here</a>. There were lots of rough edges, but I think wanting to address those is what enabled me to get so deep into the core. If everything is perfect, there's not much to do, really!</p> <p>So I started contributing to CHICKEN with some modest eggs (<a href="https://wiki.call-cc.org/eggs" rel="ugc">CHICKEN packages</a>) at first, and eventually the core system. I mostly learned about Lisp internals by doing, mucking around with the CHICKEN core and trying things. I read Queinnec's Lisp in Small Pieces, which deals with translation to C but leaves a <em>lot</em> undiscussed and distracts with OOP-heaviness. SICP has some good material. Then there's Appel's Compiling with Continuations, which is really short and to the point but still manages to be rather comprehensive; I love books like that.</p> <p>In general, I just enjoy hacking on the core, even if I don't have that much time to do so these days. I have to stress that I'm a slow learner. Building my understanding of CHICKEN was a process of many many years, and there are still parts of the system I'm not that familiar with (although I know my way around enough to get up to speed if needed).</p> <p><strong>What do those Lisp books lack?</strong></p> <p>Compiling with Continuations has only a brief section on the runtime system, so it doesn't go very deeply into e.g. garbage collection and data representation. Lisp in Small Pieces doesn't go into continuation passing style, IIRC. And its data representation isn't very optimized. I like to <a href="https://www.more-magic.net/archive.html" rel="ugc">blog</a> about cool techniques that are undiscussed nowadays. For example implementing <a href="https://www.more-magic.net/posts/weak-references.html" rel="ugc">weak references</a> and how to GC them efficiently. Other stuff I rarely see discussed is how to do FFI and cross-module optimizations, separate compilation and cross-compilation (which only a handful of Schemes even support) etc.</p> <p><strong>What's Scheme to you?</strong></p> <p>In general, Scheme, to me, is a very clean language with a minimal core which facilitates experimentation. This is the fundamental tension of the standardization process - production-quality Schemes tend to grow in size, and there is value in standardizing that. But that also takes away the minimalism which makes experimental implementations possible. For example, Felix Winkelmann (<a href="https://lobste.rs/~bunny351" rel="ugc">@Bunny351</a>, CHICKEN's original author's <a href="https://www.youtube.com/watch?v=VZp1wWivFYc" rel="ugc">talk about Scheme implementation</a>) once started a Common Lisp (subset) implementation where he experimented a lot with types and flow analysis, resulting in CHICKEN's type stuff.</p> <p><strong>What are your thoughts on the overall Scheme ecosystem, R7RS, SRFIs vs. implementation-specific libraries etc.? A few implementations don't seem to care anymore.</strong></p> <p>I think the split of R7RS into a small and large language was the right thing to do, as R6RS was reviled by minimalists and found lacking by maximalists. In general, I'm a bit sad for R7RS - if some of the bigger community Schemes are essentially completely ignoring it, they're doing something wrong IMO. Many, maybe even most Scheme implementations are essentially one-man shows. I suppose CHICKEN is also turning that way again, since we have lost quite a few contributors (mostly due to changing life situations) and it's hard to attract new ones.</p> <p>At the same time, the R7RS "large" project sort of went off the deep end, doing its thing without really caring about community buy-in. The churn of the R7RS large is also a bit too fast to keep up with. They've pumped out tons of SRFIs in a few years (actually, looking back at it right now it doesn't appear like it's <em>that</em> much, but it is certainly a lot faster than SRFIs used to be.) The SRFI process is open to submissions from literally anyone, for better or worse. I've noticed there have been a few new contributors to CHICKEN who submitted implementations for some of the newer SRFIs, so that's good and I'm happy at least some people are bothering to do this.</p> <p><a href="https://www.more-magic.net/posts/chicken-6.html" rel="ugc">CHICKEN 6</a> is base R7RS, but older CHICKEN code will keep working. We still support the old module syntax (which is the "native" one). The R7RS library declaration is essentially syntactic sugar for the core module syntax. R7RS-small is almost fully backwards compatible with R5RS, so there is no conflict there. Porting an egg to CHICKEN 6 usually requires only a few small adjustments because some (non R5RS) identifiers moved around between modules to better fit the R7RS style.</p> <p><strong>What's CHICKEN's development process like?</strong></p> <p>CHICKEN 4 was "hygienic CHICKEN", which introduced the module system (and required overhauling the expander). This was all Felix, requiring a lot of deep internal knowledge about how macros interact with modules etc.</p> <p>CHICKEN 5 was a community effort through and through. It was mostly a sanity and cleanup release where we did a massive reorganization of the modules (what lives where) to make it logical and matching R7RS a bit better. We discussed this during an IRL meetup and continued for the months after. (Community is a strong advantage of CHICKEN!) We also added a <a href="https://www.more-magic.net/posts/numeric-tower-part-1.html" rel="ugc">numeric tower</a>.</p> <p>CHICKEN 6 was basically cut off from Felix's branch to make UTF-8 handling sane and consistent (like Python 2 -> 3, but way less disruptive.) There's a strict separation between strings and bytevectors, with changes to ports and other I/O as well. We took the opportunity to integrate the R7RS egg into core so it's more "native". Strings in the FFI should be more efficient because there's no needless copying anymore.</p> <p><a href="https://code.call-cc.org/releases/6.0.0/NEWS" rel="ugc">CHICKEN 6.0.0</a> was held back by a <a href="https://lists.gnu.org/archive/html/chicken-hackers/2026-07/msg00008.html" rel="ugc">bug causing heap corruptions</a> (do view the patch's description!). We had been looking in the completely wrong spot. These heap corruptions appeared somewhat randomly, but only with the CHICKEN wiki server, not with the plain web server serving simple files or even the entire <a href="https://wiki.call-cc.org/eggref/5/awful" rel="ugc">Awful</a> framework. We strongly suspected the <a href="https://wiki.call-cc.org/eggref/6/svn-client" rel="ugc">Subversion client library</a> (which the wiki uses as a backing store for the content), and we'd found other issues in there as well (it's kind of hairy callback-heavy code due to the design of libsvn).</p> <p>The wiki is a rather small program and the rest of the web stack seemed to be fine, so we suspected the svn client lib. But I whittled down the code of the wiki to almost nothing and it was still failing. When I commented out the URI normalization code (you get redirected when opening a page that's behind a symlink, so as to get a canonical URL that points to the original file) it suddenly stopped crashing!</p> <p>That normalization code didn't appear to do all that much, so we quickly pinpointed it to be read-symbolic-link. A quick glance at the code in the core system confirmed it was totally borked because of a change made for CHICKEN 6's UTF-8 transition.</p> <p><strong>Now that 6 has come out, what's next?</strong></p> <p>Regarding the goals for CHICKEN, there are several things I'd like to work on. One idea I had is to teach the compiler about unsafe intrinsics using a "prelude". Because Scheme is a safe but dynamically typed language, there's some overhead in the intrinsics, say if you call "car" on a non-pair, it throws an exception. If the compiler can deduce that the object you pass in must be a pair (maybe because you checked it before with <code>pair?</code>, or called <code>car</code> or <code>cdr</code> on it before), it replaces the call to an unsafe, unchecked version. But this is all very ad-hoc, and not extensible by the user. My idea was to have a separate definition which splits the unsafe operation from the "typechecking prelude", which can be inlined at the call site. This way, if multiple checks need to be done, it's not all or nothing. We can elide the unnecessary checks and only do the necessary ones which might extend to user code, too.</p> <p>Another idea relates to the way we handle dates and times - we have some stuff in core to access the POSIX functions but it's messy and (IMO) mostly unusable. The alternative is SRFI-19, which is a beast because it has support for multiple calendar systems, localization etc. Might be nice to have something minimal (maybe English only) in core, so you have a common type that gets used everywhere (handy when sharing objects between libraries without building in a big dependency on SRFI-19). You can then use it for parsing timestamps in common protocols, say.</p> <strong>Postgres & SQLite</strong> <p><strong>What domains do you like or know the most about?</strong></p> <ul> <li>Web stuff: I maintain the HTTP and URI implementations for CHICKEN</li> <li>Some CHICKEN internals: GC, macro expander and Irregex implementation</li> <li>Performance optimizations: though not an expert, I've done quite a bit and always thoroughly enjoy it</li> <li>Postgres: Although I haven't gone deep into the internals, I'm typically the go-to guy for (Postgre)SQL questions in companies I've worked at. Funny, because I initially flunked the DB/SQL course at uni and didn't grok SQL at all</li> <li>Distributed systems: though I've worked on them for 6 years at work, you'll want to avoid them like the plague if at all possible. It can be hard to reason about the behaviour of the system at large, and you can't really abstract it away</li> </ul> <p>I'm trying really hard to think of something I'm truly excited about. The biggest positive I see right now is the push for digital sovereignty. I sincerely hope this will change how people deploy tech, maybe in a more mindful manner. More open source, less dependence on foreign (and hopefully big tech in general) products. But vested interests and inertia will be hard to overcome and really bum me out.</p> <p><strong>Why Postgres?</strong></p> <p>I properly learned about DBs at a calendar startup using Rails. We had instantiated repeated events in the DB and the event would sometimes need to be updated. At first, we were fetching models in a loop and updating them one by one, excruciatingly slow. We eventually discovered the bulk update (I <em>think</em> you even had to call into the DB directly because Rails didn't offer that at the time). That made everything click for me - the importance of performance and the usefulness of SQL. At the time, MySQL was still Rails' default and I got into MySQL character set hell a few times for a CMS we used. Later, another Rails project required such massive amounts of data to be stored (computational fluid dynamics simulation) that MySQL simply crashed every time I tried a bulk import.</p> <p>Looking into alternatives, I found Postgres handled it without any problems. When I learned that Postgres doesn't have any of those braindead misfeatures MySQL has. For instance, UTF-8 characters get verified on storage so you can't get into character set hell like in MySQL so easily, and it actually allows DDL statements in a transaction, so you get transactional migrations that apply atomically. That was a real eye opener at the time. I was sold!</p> <p>Postgres is a lot more regular and well-behaved on basically anything, and it has no strange limits (e.g. in MySQL, you can't even put an index on text columns with indeterminate lengths). MySQL allows you to store an empty string in any non-nullable enum column. Makes no goddamn sense to me! The DB is full of footguns like that. I should stop ranting - talking about MySQL really makes my blood boil. Also, I've come to rely on more "advanced" features like LISTEN/NOTIFY, array storage, window functions, CTEs etc. However, I've found that stored procedures don't really work that well - "real code" is more flexible as it doesn't require finicky migrations to keep in sync.</p> <p>I'm not a big fan of JSON in my relational DBs, but I have been known to use it when storing arbitrary data or actually putting JSON results (from APIs or other stuff) in the DB.</p> <p>We use <a href="https://github.com/tonsky/datascript" rel="ugc">DataScript</a> on the client via ClojureScript, but I don't really grok it and don't touch that part of the code often enough that it really sticks, so every time I have to deal with it it's an exercise in frustration.</p> <p>Even though I grok it nowadays, SQL is a really badly designed language. I've seen several projects that try to come up with a better query language, but I've given up hope that they will succeed as SQL is too entrenched to get rid of.</p> <p><strong>Why not SQLite?</strong></p> <p>I've used it a handful of times. The experience was always mostly one of frustration. It feels a lot like MySQL, with unsafe and stupid defaults.</p> <p>IIRC it's value-typed and (by default) doesn't check types, so the type of a column is basically completely ignored. And you can't alter a column, IIRC (or maybe only a few changes). I even remember a version (maybe WebSQL?) where you can't even DROP a column. Anyway, it's not worth any brain cycles for me to deal with that shit.</p> <strong>On REPLs</strong> <p><strong>What do you think of Clojure?</strong></p> <p>Clojure's influence is strong on things like <a href="https://github.com/carp-lang/Carp" rel="ugc">Carp</a> and <a href="https://janet-lang.org/" rel="ugc">Janet</a>. I wrote about <a href="https://www.more-magic.net/posts/thoughts-on-clojure.html" rel="ugc">my impression of Clojure</a> on my blog, but in a nutshell I don't like the "everything is a map" approach and nil punning really turns me off as it makes bugs harder to find. I do like the fact that it has mostly purely functional data structures. I'm not sure I like the syntactic "heaviness" of Clojure - things like <code>[]</code> for vectors and <code>{}</code> for maps. The lack of cons cells is also a bit weird but I see how it simplifies list handling code (even though Clojure does not typically deal with lists much!) Most importantly, it revitalised the interest in Lisps!</p> <p><strong>In your article on Clojure:</strong></p> <blockquote> <p>never fully bought into the REPL style of developing. Sure, I experiment all the time in the REPL to try out a new API design or to quickly iterate on some function I'm writing, but my general development style tends more towards the "save and then run the test suite from an xterm".</p> </blockquote> <p><strong>Normally, we hear such things from people who think using the REPL means typing into the little terminal box instead of sending code from files into the REPL with a hotkey, so it surprised me to read it from a veteran.</strong></p> <p>I do consider the REPL an essential tool for experimentation and debugging. But I struggle to keep track of what's running in the system versus what I see in my editor. With Clojure, you can't do without the REPL because it's so doggone slow to start up that it would be impossible to just run something on the CLI over and over. So at work, I spend 100% of my time with the CIDER REPL. I do find myself closing and reconnecting several times a day though, because I can no longer trust the REPL state matches my editor buffers. One thing that gets me every time is if I delete a test from my buffer and then re-run the entire suite, it's still there in the REPL (obviously), same thing with multimethod implementations. But overall, I really couldn't live without a REPL.</p> <p><strong>What do you think of <a href="https://ianthehenry.com/posts/my-kind-of-repl/" rel="ugc">snapshot testing</a>?</strong></p> <p>Snapshot testing's an interesting approach. I think we have a few testcases in CHICKEN where we do something like that - we run the compiler and capture the output of the compiler (which is mostly type warnings) and check that it hasn't changed with a simple diff on the output and expected output. I've also used something like this for great effect while refactoring and optimizing code - simply keep reference output in a file. For instance, in one case when working on a project which had no test suite, I used <code>pg_dump</code> to dump an "output table" as a reference and then went to town on the codebase, knowing I would immediately see if my optimized algorithm differed from the original. I also approach in another inherited project without test cases to refactor.</p> <strong>Real Life</strong> <p><strong>What makes you happy?</strong></p> <p>I've mentioned before that I really enjoy performance optimizing code, but I also really enjoy refactoring and investigating vulnerabilities. Systems that are understandable and hackable make me happy.</p> <p>Outside of programming (which more often frustrates me than makes me happy TBH), my family makes me happy. It's a great source of joy to just relax and be with my wife and children. I've been trying to get back some balance in life, spending more time AFK, and I pay attention to my health a bit more as well.</p> <p>I'm not super young anymore (43) and reading about age-related issues like sarcopenia made me realize we really tend to neglect our bodies with our sedentary lifestyle, especially us programmers. My mother has osteoporosis and I see how she struggles just doing basic things. I don't want that for myself, so I've picked up <a href="https://startingstrength.com/article/barbell_training_is_big_medicine" rel="ugc">weight lifting</a> as a way to combat those age-related issues, so I can become old in a healthy way. The prognosis is for most of us to live up to 90 or so by now, so I'm not even at the halfway point. But these issues start cropping up at around 50-60.</p> <p><strong>How do you approach raising kids?</strong></p> <p>I'm still getting my bearings TBH. My kids are only 3 (going on 4) and 15 months. Raising kids is probably the hardest thing I've ever done.</p> <p>I don't really know yet if I want to teach them programming. I definitely want to raise them tech-sceptical, when they're big enough, to teach them the dangers of social media and the importance of privacy. If they show an interest, obviously I'd teach them Scheme. It's the perfect language for teaching! But maybe something like Logo first.</p>
The technical musings of Iain Cambridge.
SHA-1 with collision detection doesn't have to be so slow. How a code generator that moves the checks to SIMD can narrow the gap to plain SHA-1 to ~20–30%.
<p>The commit that removed it: <a href="https://chromium-review.googlesource.com/c/chromium/src/+/3988999" rel="ugc">https://chromium-review.googlesource.com/c/chromium/src/+/3988999</a></p>
One common take on the coding agents that I see goes something like this: “Sure, AI helps you output more code, but won’t the quality suffer?”
A malicious Twitch chat message could be turned into native code execution on a streamer’s Windows PC through a OBS Studio flaw.
Review behavior, not just diffs. Jev prioritizes human attention; OpenAI explains the changes. Local CLI + agent skill + GitHub extension. - egma-ai/jev-code-reviewer
Hi, glad you found your way here. I'm Yash, a developer who contributes to open source, mostly p2p...
A searchable, syncable, content-addressable notetaking system - btrask/stronglink
write Python that’s faster than C by optimizing your code, adding standard type annotations, and using Mypyc.
Whenever I see code that asks what the native byte order is, it's almost certain the code is either wrong or misguided. And if the native b...
VSCode Version: 1.10.2 (8076a19) OS Version: macOS Sierra 10.12.3 VS Code uses 13% CPU when focused and idle, draining battery. This is likely due to the blinking cursor rendering. I think CPU usag...
"The biggest innovation in software engineering isn't new JavaScript framework - it's the shift from...
Source code for the X Recommendation Algorithm. Contribute to twitter/the-algorithm development by creating an account on GitHub.
AI can now write the feature. Then AI can write the tests. Then AI can open the pull request. Then...
AI is writing more code. That part is obvious now. Developers can ask an agent to: create a...
Catch code issues before they catch you. Contribute to Alurith/jeff development by creating an account on GitHub.
Following the rules for currency codes leads to a collision with popular macro.
Remember when using autocomplete meant you weren't "really" programming? A real Stack Overflow...
The scariest diff passed every test — and would've lost a customer money. The scariest diff AI ever...
Humans are bad at writing secure code, and GNOME developers are no exception. GNOME is primarily written using unsafe programming languages where simple mistakes in our code lead to devastating consequences for our…
This is a submission for the Sanity Challenge, Path Two: Vibe-Code Something Strange What I...
I use AI constantly when I code and when I write. I use it to research ideas, plan code, debug,...
We spent years trying to make coding easier. Better editors. Better frameworks. Better libraries....
Sourcegraph is a tool for searching and navigating around large code bases. The tool has variou [...]