For the best experience on desktop, install the Chrome extension to track your reading on news.ycombinator.com
Hacker Newsnew | past | comments | ask | show | jobs | submit | history | eliben's commentsregister

You're welcome :)

The harnesses are documented here: https://github.com/eliben/watgo/tree/main/tests

Note that I had to switch the harness from wazero to Node (unfortunately!) when it turned out wazero doesn't support gc and other new proposals (e.g. your comment here https://github.com/wazero/wazero/issues/2483)

Thank you very much for maintaining wazero - I love that project, and am looking forward to being able to use it for this in the future.


You're welcome :)

evacchi does most of the maintaining these days, but I'll keep helping as best as I can.

Your harness looks interesting to replace wast2json with watgo in wasm2go. Though my current problem is that I should be using the JSON to decide which tests to run (manual process so far), and to generate the more complicated test files (e.g. the ones that link modules together).


I'm working on EH right now! Slowly walking towards GC!!

watgo (https://github.com/eliben/watgo) -- a WebAssembly toolkit for Go. Think something like wasm-tools or wabt, just in pure (0 dependency) Go.

California is a great example; highest electricity prices in the US (not counting Hawaii, which makes sense) despite significant hydro and fantastic solar capacity. In the last few years California runs 100% renewable on many days (and growing) every year.

Economics 101: prices are not set by what goods cost to create + markup. Prices are set by how much people are willing to pay.


Why is it "people are willing to pay" and not "corporations are brazen enough to charge"? These utilities are necessities and relatively few people have access to cheaper alternatives to them.

The regulations mandate that the market operates that way. It's the government that should be held to account.

Because, under usual circumstances, self-interested corporations compete against each other to get as close to what people are willing to pay for energy as possible.

> compete against each other

Citation needed.



There’s a reason most universities don’t hand you a bachelors degree in economics as soon as you complete EC101. You should look into EC102 and the rest of the curriculum.

Because PG&E is a for-profit company. They are supposed to charge what the market will bear.

Unfortunately since PG&E is a regulated utility it's not that simple.

When you compare PG&E's electricity rates to the rest of the nation (and neighbors like SMUD), you can see that the CPUC isn't doing much.

I know nothing about California so please correct me if I'm wrong.

You mention significant hydro and solar capacity in California. So minimal carbon externality: lung disease and climate change. If you consider that externalised cost into the cost of electricity elsewhere, does not California and other renewable-rich electric grids fare more competitive on price?

E.g. the problem is not the expensive renewables in California, rather, the problem is that the cost of declining human and animal health and climate change is externalised for the fossil fuel.


PG&E's prices are not a function of what people will pay though, it's a function of what people expect.

CA wants green energy now (aggressive targets), needs to have fire hardened infrastructure (expensive upgrades), and wants full service to sprawling remote areas using modern infrastructure.

The combination of these is incredibly expensive.

If you don't believe me, buy PGE stock and get your dividend from their "greed". But honestly, the stock is an awful performer, because the actual problems facing them are real.


> In the last few years California runs 100% renewable on many days (and growing) every year.

How many is "many days"? Gas is still used for at least one fifth of electricity. https://app.electricitymaps.com/map/zone/US-CAL-CISO/5y/mont...


According to the official tracker (https://www.energy.ca.gov/data-reports/clean-energy-serving-... and elsewhere) there were 279 days in 2025 where California was on 100% renewable for _some_ time during the day (could be hours, could be minutes at mid-day).

In total hours equivalent of 77.3 full days over 2025.


California has high volumetric rates, but mostly that is because it has much more distributed generation than any other state, uses far less grid power, so the grid rates are dominated by fixed grid costs. Actual monthly electric bills in California are not remarkable at all. According to the EIA the typical residential electric bill in California is almost exactly the same as Texas: $174.59 vs. $173.94.

Meaning it's supply. Overall dupply low because fossil fuels discouraged and penalized, demand high, price high.

You could solve that with a stroke of a pen, by re-nationalizing.

Thank you for the feedback. The idea was to first define what we want the basis functions to be (a pretty abstract definition) and then develop how to actually get that from _normal_, continuous functions.


Fixed, thank you! (it's actually r(x)=p(x)-q(x))

(proof-reading through HN is a mildly embarrassing process, sorry about that! I do go over these posts and proof-read them several times myself before publishing)


Thanks for noticing, I'll fix it shortly


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...


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

Search:

HN For You