Hacker Newsnew | past | comments | ask | show | jobs | submit | yatsyk's commentslogin

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).

[1] https://quicktype.io/


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.


Hypocrisy is a virtue. It gives you the strength to batter the enemy while remaining untouched yourself.


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.


Stateless individuals shouldn't lecture us on values.


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."


If he had written that Western Europe is moving toward China’s model, I would have had no questions about his tweet and would have fully supported it.

As I understand it, Durov doesn’t agree with your statement — you can check point 5 of his 2014 manifesto [1]

[1] https://globalvoices.org/2014/03/13/pavel-durovs-seven-reaso...


>2014

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.


Already after 2012 street protests in Moscow.


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).


https://treemap.yatsyk.com/

Disclaimer: I'm the author


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.

[1] https://treemap.yatsyk.com/ [2] https://treemap.yatsyk.com/folderstat


Hello HN,

I've created npm module for cushion treemap rendering [1]. Treemaps is most compact way to visualize huge tree structures such as file sytem.

[1] https://treemap.yatsyk.com/


Usually I'm adding linuxserver/smokeping docker container to boxes I want to check internet speed history.


I'm struggling with my Internet connection lately and have been planning on doing exactly this.


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?


Author here.

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.


If someone used strapi and parse platform, how would you compare two platforms as self hosted api backends?


There are few similar libraries. I think most feature reach is https://github.com/projectstorm/react-diagrams , but there is also https://github.com/DrummerHead/react-flow-diagram https://github.com/alibaba/GGEditor , actually I’ve found about 15 different js open source react and non-react editors for node-based UI. But unfortunately most of them is not very extensible. One of the reason is that the authors prefer to store state inside component, so it’s impossible to create non-trivial behaviour.


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


One thing that seems to be missing though is slot names.

For example if the nodes are objects in C++ and the edges are relations, you want to know the names of the members that point to the other nodes.

Labels on the edges would also be nice.


What sort of non-trivial behaviour would you be interested in?


For example: can I connect one port of node to other port of node and how this connection needs to be drawn.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: