HNHacker News
TopNewBestAskShowJobs

eliben

3,222 karma · joined July 5, 2010

http://eli.thegreenplace.net
submissionscomments
eliben··on City simulator I made in Scratch
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.

eliben··on Partnering with the Shawnee Tribe for Civilization VII
It is authoritatively debunked in Sid Meier's (excellent) memoir - there was no such integer underflow bug in Civ I, it was all a rumor that went viral. The franchise did embrace the meme, though.
eliben··on Making any integer with four 2s
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.
eliben··on Making any integer with four 2s
Really? But why? All of 2+2, 2*2 2^2 are trivially 4, and sqrt(4)=2 so why is the + more odd than others?
eliben··on Decorator JITs: Python as a DSL
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?

eliben··on ML in Go with a Python Sidecar
Indeed, I have a plan to publish a follow-up using GoMLX - I already have the code working and just need to clean it all up and write a post
eliben··on AI and globalisation are shaking up software developers' world
I posit that computer programming is one of the least vulnerable among the creative professions, because how "meta" it is, and how we're all just abstracting on top of other abstractions. AI is yet another abstraction to build on top of.

https://eli.thegreenplace.net/2022/asimov-programming-and-th...

Well, until AGI, of course. But then we're probably all toast anyway

eliben··on Some Go web dev notes
Yes, all the time! The built-in net/http has great TLS support

https://eli.thegreenplace.net/2021/go-https-servers-with-tls...

eliben··on AI and globalisation are shaking up software developers' world
Whenever one reads articles like this, it's a bit of a consolation to remember that the same factors are shaking up the journalists' world much more and much sooner. This article, like many of its kind, could've easily been written by AI or by a contractor in a cheap country; in fact, this time it just may have been.

My friend dubbed this effect "AIrony"

eliben··on Notes on the Euler formula – Eli Bendersky's website
It's a series of unfortunate copy paste errors, thanks for noticing. I'll get it fixed
eliben··on Building static binaries with Go on Linux
I wonder if it's Zig or musl that's to blame; did you end up statically linking with musl using musl-gcc, or did you forego static linking entirely?
eliben··on Reading Google Sheets from a Go Program
Interesting, so this approach still works through an explicitly created service account? Do you think it's possible to make it work without a GCP Service Account at all?
eliben··on Reading Google Sheets from a Go Program
Thanks, in your instructions it's not clear where the `$ACCOUNT.json` file is coming from?

I will mention the service enable.

eliben··on Try Clojure
I loved my stint with Clojure, highly recommend it (https://eli.thegreenplace.net/2017/clojure-the-perfect-langu...)
eliben··on Golang PGO builds using GitHub Actions
In a way, that's what the PGO mode of the compiler is
eliben··on Novo Nordisk facing pressure as study finds $1k drug can be made for $5
Adobe facing pressure as study finds $99 program can be made for $0
eliben··on Thirty Seven
Reminds me of the proof that every number is interesting; it's a fun one to discuss with the kids.
eliben··on Profession by Isaac Asimov (1957)
Fantastic story, one of my favorites by Asimov!

What's fun for HN is that his target profession is actually Computer Programmer. Interesting correlation to his eventual fate.

I wrote a short post about this story w.r.t. job displacement of SWEs a couple of years ago: https://eli.thegreenplace.net/2022/asimov-programming-and-th...

eliben··on Understanding every byte in a WASM module
WAT is a fun format! I'm curating some readable samples here -- https://github.com/eliben/wasm-wat-samples/
eliben··on Show HN: I spent 6 months building a C debugger as a 17-year-old
Really nice work!

I'm happy you found my articles useful :)

eliben··on Retrieval Augmented Generation in Go
Yes, `llm` is a great tool. I believe it uses OpenAI by default but supports installing local models as plugins -- https://simonwillison.net/2023/Jul/12/llm/
eliben··on Retrieval Augmented Generation in Go
Neither of this really requires OpenAI. You can do it with locally-running models via something like https://github.com/mudler/LocalAI
eliben··on As I retire, my goal now is to release 40+ years of source code
This code is enjoyable to look at - it's clean, well-documented, and clearly a work of love. I like all the small utilities that help the author accomplish a bunch of goals.

I wonder if the code manages be so clean because it's only aimed at a single compiler and a single platform. Multi-platform C code tends to be messy with preprocessor goo.

eliben··on Lindenmayer Systems
Ooh, I did this too a while ago: https://eliben.github.io/lsystem/

This has some pre-sets you can examine that draw well-known fractals

eliben··on Better HTTP server routing in Go 1.22
Changes are sometimes added to the release notes doc (in the master branch) during the dev cycle, but your best bet is watching the commit stream. The release notes are much more shaped up by the time RC rolls around (see https://github.com/golang/go/wiki/Go-Release-Cycle)
eliben··on Better HTTP server routing in Go 1.22
> conrete paths MUST TAKE PRECEDENCE over patterns.

And indeed they do.

eliben··on static-server: an HTTP server in Go for static content
This is done now, thanks for the suggestion
eliben··on static-server: an HTTP server in Go for static content
Done now; thanks for the note!
eliben··on static-server: an HTTP server in Go for static content
Indeed, the actual heavy lifting is done by the Go standard library; this line (https://github.com/eliben/static-server/blob/main/internal/s...) is where the real magic happens (ignoring the logging middleware):

    fileHandler := serveLogger(serveLog, http.FileServer(http.Dir(rootDir)))
eliben··on static-server: an HTTP server in Go for static content
Thanks for the comment, Matt! I love Caddy. For some reason I thought it needs a configuration file.

The simplest cmdline I found to run it as a local server on a non-priveledged port with listings is:

    $ caddy file-server --listen localhost:8099 --browse
Is there a simpler way I'm missing?
← PreviousPage 2 of 34Next →