HNHacker News
TopNewBestAskShowJobs

mickeyp

2,069 karma · joined December 9, 2011

Python and Emacs afficionado.

I built dreamcoder.ai, it's a coding harness for people tired of squinting at terminal windows and want a real UI without any compromises. It runs in your browser on your hardware. It has a tiling window manager, proper keyboard support, and oodles of quality of life features for those of us who runs dozens or hundreds of agents!

I am also the author of "Mastering Emacs" book and blog - see masteringemacs.org

I write a lot of (mostly emacs lisp) open source here:

http://github.com/mickeynp/

You can email me on mickey at semantical.co.uk.

submissionscomments
mickeyp··on Crimes with Python's Pattern Matching (2022)
I wrote the link and yes it does. Module evaluations reify {}, [], etc. once. That is why people keep making subtle bugs when they do `def foo(a=[]):` unaware that this will in fact not give you a brand new list on every function call.

Factory functions like list/tuple/set are function calls and are executed and avoid this problem. Hence why professional python devs default to `None` and check for that and _then_ initialise the list internally in the function body.

Adding {/} as empty set is great, sure; but that again is just another reified instance and the opposite of set() the function.

mickeyp··on Nitro: A tiny but flexible init system and process supervisor
All this lather about doing it the UNIX way, whilst neglecting to point out that the old tooling was far worse. "Do one thing well" implies it was done well to begin with.

DNS: Can you from memory recite how name lookups work on Linux? Ever had t otrack down problems with non-standard setups? `resolvectl` is not perfect, but it does let you control all of this stuff in one place, and with a nice, orderly view of what does what.

Init system: ever written the old sysV ones from scratch? Sure they're just shell script, but did you remember to make yours re-entrant? What about forking or master-slave processes? Hope you got your pid checking code just right...

Containers: Docker is quite robust nowadays but it's not like it follows the 'UNIX philosophy' either. And systemd/nspawn at least lets you do namespacing and cgroups reasonably well and in a straightforward way...

Mounts, etc.: let's not get into fstab and its idiosyncrasies.

Logging: let's hope you set up logrotate properly or you're in for a surprise.

And on it goes.

Systemd is not perfect. But what it replaces was god-awful and far worse.

mickeyp··on Crimes with Python's Pattern Matching (2022)
I am not replying to the article but to the poster.
mickeyp··on Crimes with Python's Pattern Matching (2022)
Yes but they are not equivalent. dict and list are factories; {} and [] are reified when the code is touched and then never reinitialised again. This catches out beginners and LLMs alike:

https://www.inspiredpython.com/article/watch-out-for-mutable...

mickeyp··on How to Draw a Space Invader
Love the UI and random colour palette. Excellent work.
mickeyp··on Prime Number Grid
I really love susam's blog posts and curiosity. I highly recommend that people check out his site for more of his insights.
mickeyp··on AI is predominantly replacing outsourced, offshore workers
That has long been my personal theory as well, though I never had a way of firmly backing it up with evidence, though this article hardly does that either.

But it does make sense on a superficial level at least: why pay a six-pack of nobodies half-way 'round the world to.. use AI tools on your behalf? Just hire a mid/senior developer locally and have them do it.

mickeyp··on AOL closes its dial up internet service
130ms ping with dialup was actually quite low. I suffered far higher with my dialup and it was a local isp.
mickeyp··on Replacing tmux in my dev workflow
Better still, use Emacs as your terminal multiplexer:

https://www.masteringemacs.org/article/replacing-tmux-gnu-sc...

mickeyp··on Microsoft Office is using an artificially complex XML schema as a lock-in tool
Sorry but XML is a good fit for this. Most people who've never used XML cannot ever fathom that it does actually do a number of things well.

Being able to layer markup with text before, inside elements, and after is especially important --- as anyone with HTML knowledge should know. Being able to namespace things so, you know, that OLE widget you pulled into your documents continue to work? Even more important. And that third-party compiled plugin your company uses for some obscure thing? Guess what. Its metadata gets correctly embedded and saved also, and in a way that is forward and backwards compatible with tooling that does not have said plugin installed.

So no, it wasn't 'hype'.

mickeyp··on From LLM to AI Agent: What's the Real Journey Behind AI System Development?
> A workflow has hardcoded branching paths; explicit if conditions and instructions on how to behave if true.

That is very much true of the systems most of us have built.

But you do not have to do this with an LLM; in fact, the LLM may decide it will not follow your explicit conditions and instructions regardless of how hard you you try.

That is why LLMs are used to review the output of LLMs to ensure they follow the core goals you originally gave them.

For example, you might ask an LLM to lay out how to cook a dish. Then use a second LLM to review if the first LLM followed the goals.

This is one of the things tools like DSPy try to do: you remove the prompt and instead predicate things with high-level concepts like "input" and "output" and then reward/scoring functions (which might be a mix of LLM and human-coded functions) that assess if the output is correct given that input.

mickeyp··on Wrong ways to use the databases, when the pendulum swung too far
Amending data obviously. Building a dashboard using payroll data and having the power to change it are two wildly different things, and no sane large corporation would allow a dashboard's user account to change that data .

You're coming at this from the idea that one user has full access to everything when that is likely the biggest security lapse you'll find in modern apps that use databases: a Web app that has full ddl and even dml access when it shouldn't have.

mickeyp··on Agentic Coding Recommendations
Sorry, to clarify: OpenAI has an specification for their API endpoints that most vendors are compatible with or have adopted wholesale.

So, if your model inference server understands the REST API spec that OpenAI created way back, you can use a huge range of libraries that in theory only "work" with OpenAI.

mickeyp··on Agentic Coding Recommendations
Shameful plug: my upcoming app perhaps?

Single-file download, fuss-free and install-less that runs on mac, windows and linux (+ docker of course.) It can run any model that talks to openai (which is nearly all of them), so it'll work with the big guys' models and of course other ones like ones you run privately or on localhost.

Unlike Claude Code, which is very good, this one runs in your browser with a local app server to do the heavy lifting. A console app could be written to use this self-same server, too, of course (but that's not priority #1) but you do get a lot of nice benefits that you get for free from a browser.

One other advantage, vis-a-vis Armin's blog post, is that this one can "peek" into terminals that you _explicitly_ start through the service.

It's presently in closed alpha, but I want to open it up to more people to use. If you're interested, you and anyone else who is interested can ping me by email -- see my profile.

mickeyp··on Microsoft Office migration from Source Depot to Git
Git submodules are awful. Using subversion's own submodule system should be mandatory for anyone claiming Git's implementation is somehow worthwhile or good.
mickeyp··on Microsoft Office migration from Source Depot to Git
Agreed. It had a funny habit of corrupting its own data store also. That's absolutely what you want in a source control system.

It sucked; but honestly, not using anything is even worse than SourceSafe.

mickeyp··on Replacing tmux and GNU screen with Emacs
Hey Ivan - missed this; long time no speak :) Hope you're doing well.
mickeyp··on Claude Code SDK
I'm building a browser based tool that runs on your computer, with full tool access of course, that works with all the major models and is far better and more ergonomic to use than code, codex, etc.

If you (or anyone else reading this) wants to try out the upcoming beta give me a ping. (see profile.)

mickeyp··on Gemini 2.5 Pro Preview
The CLI definitely has its advantages!

But with my app: you can install the host anywhere and connect to it securely (via SSH forwarding or private VPN or what have you) so that workflow definitely still works!

mickeyp··on Gemini 2.5 Pro Preview: even better coding performance
I'm literally working on this particular problem. Locally-run server; browser-based interface instead of TUI/CLI; connects to all the major model APIs; many, many quality of life and feature improvements over other tools that hook into your browser.

Drop me a line (see profile) if you're interested in beta testing it when it's out.

mickeyp··on Xee: A Modern XPath and XSLT Engine in Rust
Oh, and just to pile on to my own post:

If you like React's JSX; enjoy its strictures and clean, readable "HTML"; then good news, you're writing XML (but without namespacing).

mickeyp··on Xee: A Modern XPath and XSLT Engine in Rust
XPath is a superb query language for XML (or anything that you can structure as a DOM) --- it is also, with some obscure exceptions, the only query language with serious adoption, so it's an easy choice and readily available in XML tools. The only caveat is there are various spec versions and most never added support for newer versions.

Let's look at JSON by comparison. Hmm, let's see: JSONPath, JMESPath, jq, jsonql, ...

mickeyp··on Xee: A Modern XPath and XSLT Engine in Rust
It's interesting to see the slow rehabilitation of XML and its tooling now that there's a new generation of developers who have not grown up in the shadow of XML's prime in the late 90s / early 2000s, and who have not heard (or did not buy into) the anti-XML crowd's ranting --- even though some of their criticisms were legitimate.

I've always liked XML, and especially XPath, and even though there were a large number of missteps in the heyday of XML, I feel it has always been unfairly maligned. Look at all the people who reinvent XML tooling but for JSON, but not nearly as well. Luckily, people who value XML can still use it, provided the fit is right. But it's nice to see the tides turning.

Most fashions really are cyclical.

mickeyp··on Nginx: try_files Is Evil Too (2024)
Why not just use the `secure_link' feature? It's designed for this.
mickeyp··on Please help me find better blogs to read
Thanks for your kind words!
mickeyp··on Please help me find better blogs to read
My blog on emacs [1] is perhaps a bit too niche if you dislike emacs? I do write a lot about tree sitter, structured editing and movement in programming languages on it also.

[1] www.masteringemacs.org

mickeyp··on Uv, a fast Python package and project manager
They are one-offs, much like your init command. You do not have to activate it: you can explicitly invoke the binary in the venv if you do not want this.
mickeyp··on Uv, a fast Python package and project manager
So now you're using not one (conda); not two (conda and uv), but three (conda, uv and pip) different package managers to manage your Python environment?
mickeyp··on Uv, a fast Python package and project manager
You don't have to 'activate' anything if you don't want to. The bin/ directory inside your venv contain the binaries and scripted entrypoints for the packages installed in your virtualenv.
mickeyp··on Uv, a fast Python package and project manager
As opposed to:

`python3 -m pip install <package>' to install it?

And `python3 -m <package>' to run it?

← PreviousPage 5 of 17Next →