Hacker Newsnew | past | comments | ask | show | jobs | submit | eliben's commentslogin

Very interesting! I encountered the problems these tools are trying to tackle just recently while trying to guide an agent into creating an in-browser tool for me. Closing the loop on a web interface isn't as simple as CLI-only tools. I should give this a try.

It's also interesting that you've shifted to Go for your agent-coded CLI tools, Simon.


I'm dabbling with Go at the moment for small tools, mainly as an excuse to learn a new language but also because having a single standalone binary is convenient for shuttling these tiny little tools around.

... but then I'm mostly running them with "uvx name-of-tool" because it turns out Python's packaging infrastructure for binary tools is so good!


Right, standalone binaries for CLI tools is great. And if one has Go installed, they can just `go run ...` any tool from its GitHub path, all installation/build/caching happens automagically (meaning the execution is immediate after the first run).

But I can definitely see how someone with `uv` muscle memory wants everything in the same command.

`uv` is the best thing that happened to the Python ecosystem since... I don't know... maybe Numpy.


If you're coming from the Python world, definitely. I find `go install github.com/simonw/rodney@latest` equally easy. :D Although you need the Go tooling installed, of course. But so much agree, Go is great for CLIs!


The underlying issue here is that the Nobel Peace Prize is a useless, politicized joke. It appears to be almost designed to give newspapers something to write about.

It's a shame it gets tied with scientific prizes which represent actual merit.


You mean like the 1949 Nobel Prize for Medicine being awarded to the person who developed lobotomy surgery?


An imperfect record doesn't mean the whole process is a sham.

But with the Peace Prize, the failures are numerous, and it becomes harder to claim they are outliers.


Now you need to look into the "Sveriges Riksbank Prize in Economic Sciences in Memory of Alfred Nobel" - Economics wasn't part of Nobel's original endowment so the Swedish Central bank funded it in the 60s.


No "Nobel Prize" thread is complete without this pedantic observation, however otherwise off-topic.


It's been politicised forever. Even was during the Cold War. There have been some laughable official choices.


E.g., Henry Kissinger


Kissinger is a horrific one considering some of the things he was behind, and things he said. But he was well in with the right people internationally.


Great work, Simon -- thanks for sharing!

One tool I'd really like to see in this format is a simple "turn the background of this PNG to transparent". Models still refuse to follow the instruction to create transparent backgrounds for logos they create, and I often have to look for other tools doing this as post-processing.

It's possible that this is too complicated for the "few hundred lines of js" code envelope, though.


Running this now...

  Build transparent-png.html - a tool that lets you open any image and then click on colors within that image to make them transparent - showing a preview of the resulting PNG against a checkerboard pattern and optional against other selected background colors below, plus a download PNG option
  
  It should also accept pasted images
Here's what I got (from Opus 4.5 in Claude Code for web via the Claude iPhone app): https://tools.simonwillison.net/transparent-png


Nice, I'm proud I managed to nerd-snipe you :-) Thanks for taking the time.

Seriously, though, I think this solves a nicely framed simpler problem. I was thinking about a more general tool, but that's genuinely hard (you'll need heavy CV algorithms or a special ML model to detect what is background what what isn't).

To be honest, what you built here is probably sufficient anyway, because the models are better at obeying "create a white background" or "create a 0xffffff background" than "transparent", so this tool can post-process to what's needed.

When asked for "transparent", I've had a model generate a fake checkerboard pattern of gray colors to imitate how viewers render transparent areas :-) For this kind of nonsense, the transparent-png tool wouldn't do!


The best thing to say to an image model IME is "use a colour/chroma key background" and then it gives you green or blue or whatever depending on colours used in the image.


Dude, you are amazing. Maybe you should make a suggestion box. Then while you are sleeping, the AI could evaluate the suggestions, and if they are good, it could prototype the tool, and then you could review the prototypes in your waking hours before clicking the tool to production. :)

(I’m not actually kidding)


I also enjoyed working with BF for toy compiler projects; here's a series of JIT compilers for BF in increasing level of sophistication: https://eli.thegreenplace.net/2017/adventures-in-jit-compila...


Thanks for spotting this, what a silly typo :)

... Fixed


Thanks for the kind words!

Regarding ring size, yes I'd say 2^64 is good. Since the representation is sparse, it seems safe but I'd be interested in hearing other views.


Thanks for posting this!

Just a quick note that this post is the first in a series: see https://eli.thegreenplace.net/tag/multiple-dispatch for the full series


The Y combinator in Python: https://eli.thegreenplace.net/2016/some-notes-on-the-y-combi...

(scroll down, after the concept is explained using Clojure)

A bit crazier, in Go with generics: https://eli.thegreenplace.net/2022/the-y-combinator-in-go-wi...


This isn't the Y-combinator.


A quick plug for https://www.goatcounter.com/ - a super lightweight visitor counter. Very much privacy oriented (https://www.goatcounter.com/help/gdpr).

I've set it up on my blog a while ago (https://eli.thegreenplace.net/2023/using-goatcounter-for-blo...) and it's been working really well.


+1 for GoatCounter. I’ve been using it as well for a few years now, and I find it to be a good middle-ground between useful level of insight and respect for privacy. It’s very straightforward to self-host too.


Thanks for the feedback! What do you feel is not finished?


I think (unless I missed it) it could be mentioned that typically you are supposed to have as small words as possible, with least amount of stack shuffling, and comment code as much as possible (stack effects). That said, I have not had to maintain large Forth projects so I have no clue how well I would fare ^^.

BTW, have you heard of https://factorcode.org? You might like it!


Yes, Factor is mentioned in the first paragraph of the post!


Oh I completely forgot by the time we left the comments. Embarrassing. In my defense, I always mention Factor. :D


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: