I prefer to use Zod or JSON Schema as the source of truth. Then I use QuickType [1] in the build process to generate code in different languages. This lets me share data structures. I mostly do this in Tauri apps to keep the same data shape in TypeScript and Rust. I also use it to define protocols, like for REST APIs.
Here are the advantages of this approach compared to using guts lib:
- I get validation with clear error messages.
- It supports many languages out of the box.
- I don’t need to maintain a custom library.
- JSON Schema is well supported in LLMs (for example, with structured output or vibe coding).
I know there exists more generic typing tools. One idea I had was to make a "guts" to convert Golang -> Generic Typing -> All languages.
The reason to keep Golang as the source of truth is these types originate from the backend. So when you are writing the backend, it is just the easiest place to write and maintain things. No obstacles.
Golang types are also very simple. I imagine almost all Go types can be converted because of that.
I share Durov’s disappointment about where the internet is heading.
But I think it’s hypocritical to talk about freedom of speech issues in Western Europe while ignoring similar or worse restrictions in China, Russia, or Dubai, where he lives.
It’s similar to Musk’s approach — when Twitter is shut down in Brazil, it’s a freedom of speech violation, but having a Tesla factory in China suddenly makes that problem disappear there.
I view it differently. China and Russia are lost causes and are fundamentally authoritarian. Western democracies or countries that claim to constitutionally protect free speech (like Brazil) can be held to a higher standard. Not doing so leads to them ultimately becoming authoritarian.
I’m more focused on the situation from Musk’s point of view, not yours. Maybe your view is less controversial. But I don’t think Musk sees China and Russia as failed states. He’s said many positive things about both countries.
Well, Russia has basically never had freedom of speech, except for a brief period in the 1990s, so it contributes nothing to his thesis in the tweet that "once-free countries are introducing dystopian measures."
That was before the Kremlin fully launched its repressive measures against the Internet, and before he was forced to leave Russia for refusing to cooperate with the authorities.
Makes it weird that he's choosing to live in a never-free country maybe though (as an alternative to living in the other seldom-free country in which he is a citizen).
Shameful plug: I've made an npm library for treemaps [1]. There is a sample app [2] that can draw a treemap of your drive file system, similar to SequoiaView or Disk Inventory X, in the browser using the file system API.
I've not found in docs anything related to static site configuration files (like netlify.toml or vercel.yml in hosted services). How to configure particular site?
This tool allows to create transport schemas such as metro maps. You can import data from open street map data to save time or start from scratch. Maps stored in git repository so you can consider this editor like headless CMS for static site and in order to edit schema created by other user you need to fork it.
That's why we tried to make this library as simple as possible. It doesn't do any state updates besides the positions. You can easily store state inside nodes and change it as seen in the custom node example https://react-flow.netlify.app/custom-node
Here are the advantages of this approach compared to using guts lib: - I get validation with clear error messages. - It supports many languages out of the box. - I don’t need to maintain a custom library. - JSON Schema is well supported in LLMs (for example, with structured output or vibe coding).
[1] https://quicktype.io/