This is cool! I've been up and down the map stack, but never dug into the query layer like that. It's so fast on the search and generally works well.
I love the features mappings you do, then you wrapped a nice UX around it. I did try to find dispensaries in Stamford, which here means cannabis retailers. It mapped that to "pharmacies" instead, so I got a CVS drug store. It got my Stamford (CT) correct and suggested a few other Stamfords (like VT).
Since it is Golang, so you might be interested in our ntmaps library. It is MIT-licensed, so should be compatible. It would let you make terminal apps with this (or browser, but you handled that already).
I continuously compare the rise of LLMs with the rise of electronic trading. Regulatory capture was upper right on my bingo card card, while bottom left was involving SROs to limit competition and control narrative. Upper left is venture-funded startups pushing politicians and laws to cement their newfound positions. Center free space is the exciting, yet unintended consequences of interactions between complex systems in a highly competitive environment.
Why the haters? Somebody explored a topic deeply and shared the knowledge. They had LLMs help them, probably on both fronts. Would some AI tag have helped? The prose doesn't seem sloppy or too dense.
For me, I'm so used to reading AI tone/density now, it's fine. If I was looking for some deep heartfelt sentiment on Three.js and the community, then maybe then pure human authorship would be heralded.
Anyways, I'm building a Golang game engine. I've built these several times before over 30 years and the state-of-the-art changes and I only kept up with things that were relevant to my domain, such a data visualization and representations like Gaussian Splatting
So I loved seeing this. Yes, I read it with my eyes to learn. Then I told an LLM to read it and explore what would fold well into my engine. It helped fill holes in my knowledge (GI, SSR), as I'm not in the industry and not making scenes. So, Ben, despite the downvotes, keep building and sharing as there are people who will appreciate your manifestations.
We're doing something like this behind Cloudflare R2, same concept of owning the map infra (for privacy and access-control) and reducing load on public infrastructure.
If you are into this stuff, you can view PMTiles from the CLI with "gloss", or try to drag-and-drop on its web interface [1]. It seems large tiles (>128M) and some raster formats are failing; plus it would be nice to load from URL there. Will fix that...
(AI warning). ntmaps [2] is a Golang library that lets you use different tile providers, deployable in terminal or browser. ntplaygrounds [3] uses that and nt3d and ntactor to make a city simulation. Data is pulled from OpenStreetMap in those.
It can last forever because they own the hardware, pay very little for network transit because they peer with everyone, and storage is cheap. At Cloudflare scale even super low margins translate to big money that's enough to pay for all fixed costs. The only thing that could end it is a push to extract more profit.
1. The app is a remix app, workers do server-side rendering, so that a vanilla `curl` shows the actual payload, not just a script tag that loads the app.
2. I'm a great big nerd, so I recently added the ability to post reviews/photos/GPX traces to your AT protocol PDS. The app has a Worker cron job that subscribes to Bluesky's Jetstream for events in its namespace, and indexes these into D1 in order to answer certain API calls like "get traces in this area" or "get reviews for this hike". So the app itself isn't the primary source of truth, a person's PDS (which they control) is. The app just maintains a cache/index that can be rebuilt.
Once you get outside Cloudflare's free tier, the Bunny setup in the original post beats it pretty quickly. Cloudflare costs $0.30 (Workers invocations) + $0.36 (R2 class B operations) per million requests. Bunny charges for bandwidth but not per request (!!), so assuming an average of 1kB/request (map vector tiles should be a bit less than this in my experience) that's $0.005-$0.06 per million depending on which region and tier you're serving from.
The real "too good to be true" might be GitHub Actions building a 100GB+ PMTiles file for free
I think PM tiles are quite a bit larger. Just loading at a low zoom level a view of the world triggers requests of ca. 500kB on my site, though that might also overscan a bit or include the file header. From my calculations, for Bunny to be cheaper the avg request should be at most 660kB at $0.01/GB which should probably hold true (I think just the worker invocations alone are already equivalent to 300kB of traffic on Bunny)
Huh yeah you're right, I was off by about 100 orders of magnitude. pmtiles.io shows tile sizes with "Show tile bounds" checked and they're mostly in the 30-100 kB range.
Bunny's volume tier costs $5/TB served, i.e. $1 gets you 2~6.7 million tiles served, probably closer to 3.
But Cloudflare also allows public R2 buckets so we could potentially ignore the Workers cost, i.e. $1 gets you 2.8 million tiles served. I think caching just works in front of R2? So you get significant gains if your visitors are mostly looking at the same areas and not zooming in all the way to their house every time.
So they come out pretty evenly or with Cloudflare a bit on top depending on the scenario. Bunny does has the advantage of easy data replication across regions (I don't know of a good way to achieve this with R2, although D1 has some kind of replication feature in beta).
Both are still far, far cheaper than almost any vector tile subscription I've come across. And, of course, more expensive than self-hosting (at least at the hobbyist level).
When you have a CDN in front of object storage it's not so easy to compare as the origin requests go out in chunks. For caching in front of R2, you need the worker, as Cloudflare only permits file sizes of up to 512MB regardless of the range requested. And then there's the latency difference of working directly with R2 (Protomaps calls out latency up to 500ms and on a previous blog post I measured 300-600ms on HEAD requests against R2[0])
It is quite dated (1994), but just this week I was feeling very thankful to the authors of Taligent's Guide to Designing Programs [1], a book I read and lived. It comes from an era when software architect and programmer were different jobs (things seemed to change soon after?), which parallels modern LLM use. The C++ version there is quite old, but the concepts are timeless.
For those unfamiliar, Taligent was (among other things) a very well funded C++ app platform that never shipped, and its failures have been much analysed.
Yeah, it was weird that I was reading so much about designing software in a system I could never touch. It might be part of why OSS and access to computing is important to me; we had to buy our C++ compilers then.
It was my first years of being a "software engineer", versus the solo hacker kid who liked making art of over phone lines. So I devoured books which would teach me how to make software with other people and for other people.
Books like the "BeOS Filesystem book" (Practice File System Design) was another classic from the era [1]. It was like today's LLM white papers, learning how a company did something unique, except companies seldom published them because it was a time of IP hoarding.
Unfortunately the books that eventually became the most practical were those by Sutters and Meyers; compendiums on the warts and jewels of C++ that you needed to know to be good at programming in it. Such nitty gritty, much of which was eventually fixed by language design. I really don't miss having to know all that, freeing my mind to consider architecture, design, and delivery.
This funny to read! I drive Codex TUI daily. In the past, I paired it with VSCode for better code navigation and file reading; seems similar to what you are saying or do you also mean Source Level Debuggers, etc.? But, I eventually worked on Kitty terminal typesetting instead and now reading the files with my gloss tool [1]; combined with Rex blocks it's really nice, easier on my eyes.
Thanks for Ratatui, which certainly has a top tier name, and also has had tons of great software written with it! I've been inspired by much of that ecosystem, especially the charting libs. The weird GUI stuff I'm doing with Kitty+Bubbletea, can certainly be done on Ratatui, in the spirit of Makepad. IMO, Golang needs this more than Rust.
I stopped using the TUI as the Codex app surpassed it for all my use cases including writing TUI stuff. I let it spin up betamax and give me PNGs / GIFs of output to validate in the transcript.
When I was using the Codex CLI, usually had the TUI open in a VSCode terminal window and would run 4-10 windows. The app cut that effort down a bunch.
I've since moved to using T3 Code, though I do use the ChatGPT app to access dots and ChatGPT Pro, but that's about it.
> Thanks for Ratatui, which certainly has a top tier name
The name predates my involvement in the project by about 1 week :D
Oh I didn't know you were the author of that too! I tried your original version for my Kitty-heavy needs and it didn't work for that, just like vhs didn't. I subsequently built one on libghostty-vt some months back, not thinking to circle back to your project. Now I see yours is based on it as well, so I'm sure it works much better than the previous one for that use case!
Not sure if you do this with betamax, but it has been absolutely sick using ntrecord in agent loops. The LLMs make themselves tapes to get to a state and then can look at it to validate or improve. I don't even ask them anymore, they just do the whole thing themselves. I've fixed charting bugs and improved TUI browser conformance this way.
Will check out T3 Code as my workflow is close to what you describe; Rex helps but I still lose focus. Never got into the Codex app.
> Oh I didn't know you were the author of that too! I tried your original version for my Kitty-heavy needs and it didn't work for that, just like vhs didn't.
Betamax now supports kitty image protocol pretty well. Should be even better when libghostty-vt for rust drops the 1.0 version. Happy to take issues on it if there's missing bits.
> Not sure if you do this with betamax, but it has been absolutely sick using ntrecord in agent loops. The LLMs make themselves tapes to get to a state and then can look at it to validate or improve. I don't even ask them anymore, they just do the whole thing themselves. I've fixed charting bugs and improved TUI browser conformance this way.
Wow, we have very similar outlooks in this space! Much of what you are doing for Rustaceans, I am doing for Gophers. Given that, I have a pitch for you:
I found ghostty-web to be important for showing the warez. Coder wasn't updating or improving it, but we needed it so I carried it much further. For example, the Kitty shared memory feature allows much higher graphics performance. Also a lot of work rendering, a WebGPU backend along with support for RTL and non-Western languages.
Recently, post-ghostty 1.0, I formally forked it to a new namespace: ntwebterm. I still expect Ghostty or Singularity to make such. component, but will keep maintaining until then.
I've then made "Booba" to write-once, run-native/browser for Golang programs. The "go tool" feature helped there. You or somebody could probably fashion the same thing, that Rust meta-magic is wild.
That is amazing! Great discovery and write up and motivation. Earlier in the week I got an FB impression of a LIDAR for Fort Stamford (CT), superimposed with the satelite footage and pondered what other hidden constructs might be lurking around here. And all you got to set up the loop asking for it...
I’m about to work on doing this. Quick-sharing media files for personal use between devices, friends, LLMs (like a shelf rather than a Dropbox), So an intermediate upload host is needed.
My biggest worry was preventing CSAM and the possibly huge cost and emotional scarring thereof. What surface(s) are your primary concern? I don’t know what I don’t know. Thanks!
When he first announced Ghostty, I was thrilled. Not about a new terminal emulator, there were plenty of those. I was excited about the vision of libghostty-vt, a portable high-performance terminal emulation component.
But I wasn't entirely sure, but Mitchell kept evangelizing it and his podcast interviews sealed it for me. I was going to use libghostty, along with Kitty Graphics Protocol to realize my vision.
It's been a pretty amazing 9 months. I've been as deep as assembly language trampolines and garbage collector debugging and as high as fixing cursive connections in Arabic script, with a lot of BubbleTea and hardening in between.
Here's some of the libghostty warez:
ntwebterm [1] , originally Coder's ghostty-web, is an xterm.js compatible browser embedder. I've added WebGPU rendering and soooo many UX enhancements; I finally forked it to keep it cohesive with our platform.
booba [2] uses ntwebterm to remote Golang programs over WebTransport or embed them in browser. All the demos on NimbleTerminal.com use it.
ntrecord [3] uses go-libghostty to make an improved version of Charm's vhs. The most important difference is it supports Kitty Graphics Protocol, but of course has all the compatibility that libghostty provides.
gloss [4] is 'less' for graphics. The hardest part of 'gloss' is forgetting to type 'less'. If you have Rex, run "gloss skill install rex" and you'll have a new "grex" command to view files in a side block, also command-shift-G will open a Gloss block. There's too much to write about, including how agents can use it... coincidentally released a new version yesterday.
I made a Golang 3D game engine that targets Kitty Graphics [5]. Started at 4fps but got it to 120fps! And once you are there, you can add yummies like Gaussian Splatting.
Our fuzzing dash/orchestrator [6] uses this platform in several ways, including OSC 7501-driven web GUI via booba.
Everything in the Nimble Terminal Platform is layered, so you can grab the parts that fit your needs.
Thank you Mitchell and the libghostty team for empowering and inspiring us!!!
I love the features mappings you do, then you wrapped a nice UX around it. I did try to find dispensaries in Stamford, which here means cannabis retailers. It mapped that to "pharmacies" instead, so I got a CVS drug store. It got my Stamford (CT) correct and suggested a few other Stamfords (like VT).
Since it is Golang, so you might be interested in our ntmaps library. It is MIT-licensed, so should be compatible. It would let you make terminal apps with this (or browser, but you handled that already).
https://nimbleterminal.github.io/ntmaps/?demo=explorer
reply