PGSimCity - How PostgreSQL Works
Posted by jonbaer 17 hours ago
Comments
Comment by layoric 16 hours ago
I really do like these kinds of approaches to showing the inner workings of different kinds of tech, so think this is on the good path to being a very useful tool, but needs some focus rather than more data/graphs/info boxes.
Comment by titzer 16 hours ago
Comment by npl 16 hours ago
Comment by samokhvalov 15 hours ago
thanks for all the feedback. It's amazing for me too. It all started yesterday with a single prompt and curiosity what Opus 5 can do.
~3.86B tokens used so far (not counting GPT 5.6 Sol that at some point started to do a lot of legwork for coding)
Comment by nugator 7 hours ago
Is that the cost you've payed for this or is my calculation completely wrong?
Comment by hectormalot 4 hours ago
Comment by samokhvalov 2 hours ago
Comment by saransh12345 10 hours ago
Comment by samokhvalov 2 hours ago
here it is from history, without edits
> you're a veteran Postgres hacker and expert. I want 3D visualization of how Postgres works, for browser -- all its major components, presented as a 3d model, complex, with all parts zoomable, and animated, with controls -- checkpointer, bgwriter, autovacuum, walwriter, backends, walsender, etc etc etc. Imagine we need to build a 3d model of whole city. That's same level. We need this so engineers who are non-DB-experts would easily understand how it works. Design must be cool, modern, super cool, running all in browser, with controls, with camera position flying with arrow keys and mouse, zoomable, etc. Think deep how to implement it, which modern cool tech to use, and use ultracode to implement in a new directory (we'll commit it later). OK to use the most cool and most modern stuff. Think deep choose tools wisely and let's build an awesome in-browser 3d model of Postgres engine
(later I came with lots of materials about internals and behavior and we started to polish / improve)
Comment by npl 1 hour ago
Comment by yieldcrv 14 hours ago
Comment by derac 11 hours ago
Comment by andyfilms1 15 hours ago
Comment by appplication 14 hours ago
Comment by vixen99 12 hours ago
Comment by narmiouh 16 hours ago
What others are saying - fantastic attempt, but don't know where to start or where to end.
Comment by samokhvalov 13 hours ago
Comment by INTPenis 10 hours ago
Comment by justinclift 7 hours ago
Comment by narmiouh 4 hours ago
Comment by samokhvalov 2 hours ago
Comment by willquack 5 hours ago
Comment by Curtis_Guan 16 hours ago
Comment by tptacek 15 hours ago
Comment by robertlagrant 8 hours ago
Comment by notachatbot123 10 hours ago
Comment by parthdesai 1 hour ago
Comment by itomato 6 hours ago
This is a brutalist gew-gah.
Comment by stronglikedan 49 minutes ago
Comment by fragmede 9 hours ago
Comment by INTPenis 6 hours ago
Comment by stronglikedan 44 minutes ago
Comment by youre-wrong3 9 hours ago
Comment by dbgrman 49 minutes ago
Comment by arjie 15 hours ago
Cool UI.
Comment by jedberg 13 hours ago
Comment by augunrik 13 hours ago
Comment by jedberg 13 hours ago
But even at .1x it's too quick. :) I should be able to fire individual transactions and watch them flow.
Comment by chrisweekly 2 hours ago
Comment by thelastgallon 2 hours ago
Comment by WiSaGaN 6 hours ago
Comment by loveparade 16 hours ago
Comment by getfluxly 12 hours ago
Comment by citizenpaul 19 minutes ago
There is. "Run a query" at the top nav bar.
Comment by samayashar 10 hours ago
The operation intricacies are a bit difficult to understand because the core looks a bit clogged up. Nonetheless, great work!
Comment by npunt 16 hours ago
1. remove ~50% of the UI since it covers too much of a laptop screen
2. improve the camera controls so its easier to pan and zoom.
Comment by harvie 5 hours ago
Comment by dostick 15 hours ago
Comment by computomatic 15 hours ago
Comment by samokhvalov 13 hours ago
but I agree, could be better – thinking
Comment by johnhamlin 3 hours ago
Comment by skreem 16 hours ago
Also (assuming this is LLM-generated, apologies if it’s not) seems like the future of learning/self-teaching… gonna try and generate similar things for stuff I’m learning
Comment by smhaziq 15 hours ago
Comment by robertlagrant 8 hours ago
Comment by antoinetouss 10 hours ago
Comment by futurecat 10 hours ago
Comment by itomato 6 hours ago
Comment by num42 15 hours ago
Comment by gregsadetsky 15 hours ago
Comment by samokhvalov 13 hours ago
thanks
Comment by manytimesaway 14 hours ago
Comment by DonHopkins 8 hours ago
At the time, there was a disk drive manufacturer by that name, so Will Wright renamed it SimCity.
Fortunately the guy who now owns the rights to the Micropolis trademark (and is an old school hacker who really gets it) was kind enough to allow us to use the name for non commercial purposes, under the Micropolis Public Name License.
https://github.com/SimHacker/MicropolisCore/blob/main/Microp...
Here's the explanation from the MicropolisCore repo's LICENSE file:
https://github.com/SimHacker/MicropolisCore/blob/main/LICENS...
>MICROPOLIS LICENSING
>The Micropolis project operates under two important licenses:
>1. The Micropolis GPL License Notice - This is the GNU General Public License with additional terms added by Electronic Arts to protect the SimCity trademark while allowing the code to be freely used and modified.
>2. The Micropolis Public Name License - This license governs the use of the "Micropolis" name itself, which is a registered trademark of Micropolis Corporation.
>We extend our sincere gratitude to Electronic Arts <https://www.ea.com> for their generosity in releasing the SimCity source code under an open-source license, and to Micropolis Corporation <https://www.micropolis.com> for allowing the community to use the Micropolis name for this open-source city simulation project. Please respect both Electronic Arts' SimCity trademark and Micropolis Corporation's Micropolis trademark by adhering to the terms of these licenses. Additionally, we ask all users to please honor the terms of the <https://www.gnu.org/licenses/gpl-3.0.html> GNU General Public License v3, which protects the freedoms that allow this project to exist and thrive as open-source software.
More details, and another cautionary tale about accidentally getting sued for trademark infringement:
https://news.ycombinator.com/item?id=46981012
>This matters more than people think. Jeff Braun, CEO of Maxis, told me this story:
>"Maxis was sued by Toho. We never referred to the name Godzilla, our monster on the box cover was a T-Rex looking character, but... a few magazine reviews called the monster, Godzilla. That was all it took. Toho called it 'confusion in the marketplace'. We paid $50k for Godzilla to go away. In all honesty, Toho liked Maxis, they said $50k was the minimum they take for Godzilla infringement."
>So please: call the game Micropolis, not SimCity, or EA's lawyers may come knocking. And unlike Toho, EA and their Saudi investors and Jarod Kushner might want to use their bone saws on you, which are much worse than Godzilla.
If any busy-body lawyers find this thread and actually want to go after someone's who's disparaging their trademark, they should look into this instead of open source projects:
https://news.ycombinator.com/item?id=43952567
>I let the domain "micropolisonline.com" expire, which I was using for the old OpenLaszlo/Flash Python/SWIG/C++ client/server based version of open source SimCity, and somebody took it over and replaced it with AI generated claptrap, stealing a lot of my own and other's images without any credit. It even promises the source code, but doesn't actually link to it, just has promises and placeholders.
>It totally misrepresents what Micropolis is, which was based on the original SimCity classic, and confuses it with all the subsequent versions of SimCity and other made-up stuff. And it never mentions the GPL-3 license, EA's license and restrictions on the use of their SimCity trademark, or Micropolis's license to use their trademark. I have no idea what the point of it is.
Here's some more interesting stuff about applying machine learning and LLMs to Micropolis:
https://news.ycombinator.com/item?id=46981043
>Sam Earle's fractal neural network approach (https://arxiv.org/pdf/2002.03896) is exactly this kind of thing. His key trick: recursive weight-sharing in fractal convolutional blocks, so each column of the network acts as a continuous-valued cellular automaton ticking different numbers of times. The deepest column gets a 33x33 receptive field -- enough to connect power across an entire 32x32 map in one forward pass.
>The agents discovered power-plant + residential pairing, road placement for density, zone clustering by type, and traffic-avoiding road layouts. When stuck at local optima, a human player could intervene (deleting power plants) to force re-exploration -- and the agent would improve its design.
>The paper was 2019, before LLMs were doing this kind of thing. Different paradigm (RL on tile grids vs. LLMs on coordinate text), same hard problem.
https://news.ycombinator.com/item?id=46981059
>Sam Earle did exactly this with RL agents trained via quality-diversity methods on Micropolis:
https://github.com/smearle/gym-city
>[...] Here's more about my plans for making a multi player version of Micropolis with time travel, branching, and merging, by using github as a social network and MMPORG platform (when it's not down ;):
https://github.com/SimHacker/moollm/blob/main/designs/sims/s...
Comment by laurentiurad 10 hours ago
Comment by j1436go 10 hours ago
Comment by laurentiurad 9 hours ago
Comment by bspammer 9 hours ago
Comment by antonyragleap 12 hours ago
Comment by kandros 9 hours ago
Comment by BowBun 16 hours ago
Comment by bazzingadev 14 hours ago
Comment by terra_nera 10 hours ago
Comment by LowLevelKernel 13 hours ago
Comment by deadbabe 15 hours ago
“Every city has secrets. Ours have indexes.”
Comment by svog23 11 hours ago
Comment by Jonathanfishner 15 hours ago
Comment by someothherguyy 13 hours ago
Good luck continuing it, hope you generated something that can be iterated on.
Comment by npl 16 hours ago
Comment by abstrct 15 hours ago
Comment by bibimsz 16 hours ago
Comment by soulcache 11 hours ago
Comment by paper_andbeyond 2 hours ago
Comment by swaminarayan 3 hours ago
Comment by khanhnguyen8386 7 hours ago
Comment by sqemo 12 hours ago
Comment by runtime_lens 11 hours ago
Comment by codedump 14 hours ago
Comment by extra-AI 9 hours ago
Comment by Izmaki 5 hours ago
Comment by luciana1u 14 hours ago
Comment by samokhvalov 13 hours ago