HN user

eliben

3,213 karma

http://eli.thegreenplace.net

Posts12
Comments1,039
View on HN

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.

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.

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)

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.

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.

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.

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!

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.

Consistent Hashing 10 months ago

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 the note. Much of the blog post is dealing with this - how the approach I took for the Go implementation is not sufficient for the hacker level - because the code isn't stored anywhere but remains as text. This isn't a Go issue, it's a result of the specific design decision of how to implement it.

The second implementation - in C - does it the "right way", with both code and data living in the same memory, and thus allows all the usual Forth shenanigans. Again, this has all to do with the design approach and not the implementation language. Nothing precludes one from writing such an implementation in Go :-)

Bloom Filters 1 year ago

Updated the result to 80ns - thanks for flagging this. This grows with the size of the data (because more cache misses), and running the benchmark on the full billion takes a while.

[That said, on a hot production bloom filter, much can be loaded into caches anyway so it's not an entirely un-realistic scenario that some of these are cache hits]

This is very impressive, amazing work!

One question: how do you manage large code bases in scratch? Is it easy to find a piece of code? Something like grepping for specific things seems difficult.

I've recently been really warming up to Scratch since one of my kids picked it up and really enjoys it. I love the built-in concurrency model - it's a bit like CSP. Gets kids to think concurrently from day 1.

Sorry, the intention was just to show a cool use of complex numbers, not claim this is the simplest method to generate 12 which is pretty simple, as you demonstrate.

JIT is something different people sometimes define in different ways.

In this sample, when the function itself is called (not when it's decorated), analysis runs followed by LLVM codegen and execution. The examples in the blog post are minimal, but can be trivially extended to cache the JIT step when needed, specialize on runtime argument types or values, etc.

If this isn't JIT, I'm curious to hear what you consider to be JIT?