MurphyA/hacker-news huggingface dataset:
What about a "preferred" keyword in TypeScript?
by noduerme | 2025-04-11 09:11:14+00:00
95% of the time these days, when I'm trying to figure out how to make some imported piece of code do what I need it to do, I'm relying on the IDE to jump my way through interfaces and types until I find what I need.

Wouldn't it be cool if instead of just public, protected and private, there was also a "preferred" keyword that told IDEs that this is a public method or attribute that was ALSO meant for people to use?

The concept of "public/private" is great for class inheritance. But not so great for building an API. So we resort to naming conventions: An API might have its own internally public methods, but name certain ones certain ways and block calls that try to access them. Wouldn't it be nice if you could say this method is "public" but not "open" to certain calls, or not "preferred" for someone hooking the API? A sprite might have an .x and an ._x, and we assume we should probably assign things to the .x or something weird might happen. But lots of codebases still make ._x public, for various reasons. I'm thinking here of Pixijs's Container.pivot._x. While the underscore is clearly a warning of some kind not to do things this way, there's nothing about public ._x that makes it stand out from public .set(x,y), besides that underscore. Wouldn't it be nice if the suggested methods were somehow, like, suggested by the IDE when you try to use another method to set something like that?

This could be as simple as adding a `preferred` keyword to a public method, and then sticking `prefer [method]` into the comments of another public method that refers to it. Your little light bulb in VSCode would say "You should prefer pivot.set() to directly assigning pivot._x". Or something like that.

Stray thought. Obviously, this is just a sugar concept, doesn't affect code relationships at all, but I feel like it would really help as a way to document code as you go along, especially when some methods do need to be exposed to internal code but really shouldn't be used externally.
by rcarmo | 2025-04-11 09:11:43+00:00
Yep. But all the informal chats I've had over the years across Europe (from Greece to the Nordics) point to no change whatsoever because even though we have more and more sovereignty concerns there is zero interest from national governments in truly invest in anything but showy stuff that will bring immediate cashbacks -- like 5G licensing, which also taxed telcos and infrastructure providers heavily without any real return (and thus soaked up any mindshare/cash they might have to improve the hosting situation).
by HenryBemis | 2025-04-11 09:12:53+00:00
> ‘Let's take an existing made-in-China product and then just produce the same thing in the US.’

This is what got me. I remember 40-50 years ago everything (or most) "made in the USA". And how "Chinese product" was an insult while "American product" was a badge of honour. Oh how the turnstable..

When I was studying in the UK the _most_ diligent students were the Chinese ones. First to come, last to leave, spent hours and hours on workshops, but they were not interested in staying in the UK to live/work there. As if they were on a mission. Go-Learn-Return-SpreadKnowledge. Many other nationalities were tempted by the mighty-GBP and stayed. But not the Chinese. Vast majority of them learned as much as they could and then went back home. That was mid-90s.

And those 20yo students of the mid-90s are 50yo with great studies and 30 years of experience, and there were thousands of them studying all over the UK, USA, and other countries. So there you have it..

I keep thinking of "Principles for Dealing with the Changing World Order by Ray Dalio" [0]. The game is almost over, time for the next cycle..

[0]: https://www.youtube.com/watch?v=xguam0TKMw8
by tomasol | 2025-04-11 09:14:25+00:00
Sorry for the late reply.

The actual order in which child workflows finish and their results hit the persistence layer is indeed nondeterministic in real-time execution. Trying to force deterministic completion order would likely be complex and defeat the purpose of parallelism, as you noted.

However, this external nondeterminism is outside the scope of the workflow execution's determinism required for replay.

When the workflow replays, it doesn't re-run the race. It consumes events from the log. The `-await-next` operation during replay simply reads the next recorded result, based on the fixed order. Since the log provides the same sequence of results every time, the workflow's internal logic proceeds identically, making the same decisions based on that recorded history.

Determinism is maintained within the replay context by reading the persisted, ordered outcomes of those nondeterministic races.
by cedws | 2025-04-11 09:14:40+00:00
>I am telling you that it is difficult to use systemd subcomponents without running all of systemd

Actually it's the first time you have stated that, but I'll bite.

How do you propose that would work, and why would you even want to do that? The entire point of having these modules is for them to plug in to core systemd, which enables a lot of magic that would otherwise require an amalgam of shitty shell scripts. If you don't want to use systemd, why not just use chronyd for NTP, dnsmasq for DNS, and so on? Your problem is completely imaginary.
by itfourall | 2025-04-11 09:14:50+00:00
We just released NetStruct, a powerful browser-based tool for visualizing and managing complex network topologies in real time.

Drag & Drop Network Planning Multi-page layouts for sites/floors/data centers Real-time status via ICMP (green/red live markers) Alarm system with API triggers per category CSV-based data structure (device info, status, links) Draw directional lines (LeaderLine) for connections Upload background maps/floorplans Available as Docker container or install via script Optimized for Debian/Raspberry Pi Desktop

It’s ideal for IT admins, network engineers, MSPs, or anyone managing multiple network zones and devices. Fully local, no vendor lock-in.

GitHub: https://github.com/IT-4-ALL/NetStruct Live Demo: [Link to your demo if public] Docker: docker pull itfourall/netstruct
by itfourall | 2025-04-11 09:15:28+00:00
Hey all — I'm one of the developers behind NetStruct We built this tool because we needed a fast, visual, and flexible way to map real-world networks across multiple locations (data centers, office floors, etc.), including:

Custom device icons for routers, switches, servers, firewalls, etc.

Live status tracking (ICMP ping-based) with color-coded borders

Multi-page support (e.g. Site A, Site B, Rack 1, Rack 2...)

Alarm triggers linked to your own API endpoints

CSV-based storage (easy to edit, backup, version control)

Some extra details:

Frontend: Vanilla JS + PHP + LeaderLine for visual connections

Backend: No heavy frameworks — just CSV + shell scripts + ICMP

Deployment: → Install script for Debian/Ubuntu (Raspberry Pi Desktop recommended) → Or run via Docker: docker pull itfourall/netstruct

We’re actively improving the UX, and would love your feedback. Happy to answer technical questions — AMA!
by dyl000 | 2025-04-11 09:16:14+00:00
this is hilarious, you define misinformation as things that go against mainstream consensus. Yes, please -- Believe everything you're told.

You're not testing peoples ability to separate wheat from chaff, you're just diffing your world view to others with the assumption you're correct.

Don't get me wrong, i'm not a conspiracy nut, but if the last 5 years hasn't showed you that the mainstream consensus has large amounts of what the powers be wants you to believe, then your brain is toast. -- Theres no implicit binary here either, use some nuance.

completely junk "study"
by janandonly | 2025-04-11 09:16:37+00:00
I agree that Mastodon isn’t it in its current form.

I’ve left Twitter a while ago now, although when I have to, I will read messages via https://xcancel.com/

Since there is no clear winner I’ve set up a mastodon and nostr and bluesky account and I use https://openvibe.social/ to read and cross-post to all platforms, when I feel the need to share anything at all. There are other apps that do the same trick like https://nootti.com/, but I am content with OpenVibe.

Mostly, I’ve found that not being on any “social” media is better for my mental state.
by rockmeamedee | 2025-04-11 09:16:40+00:00
I too made a version of this (just a small Go DNS resolver + port forwarding proxy) that lets you do a similar thing: https://gitlab.com/amedeedabo/zoxy

I used the .z domain bc it's quick to type and it looks "unusual" on purpose. The dream was to set up a web UI so you wouldn't need to configure it in the terminal and could see which apps are up and running.

Then I stopped working the job where I had to remember 4 different port numbers for local dev and stopped needing it lol.

Ironically, for once it's easier to set this kind of thing up on MacOS than on Linux, bc configuring a local DNS resolver on linux (cf this taiscale blog post "The Sisyphean Task Of DNS Client Config on Linux" https://tailscale.com/blog/sisyphean-dns-client-linux). Whereas on Mac it's a couple commands.

I think Tailscale should just add this to their product, they already do all the complicated DNS setup with their Magic DNS, they could sprinkle in port forwarding and be done. It'd be a real treat.
by rcarmo | 2025-04-11 09:17:20+00:00
Part of it, perhaps. But telcos have shifted from getting revenue from business services to mass-market stuff like broadband and being a conduit for streaming services, as well as outsourcing most of their critical systems -- which was another reason why many people left the industry.

Telcos aren't going to be able to pivot this without paying for knowledgeable staff.
by bildung | 2025-04-11 09:17:26+00:00
Your scenario is more like a best-case option, actually. I mean currently there are only 13M people employed in manufacturing in the US [0], while output is at an all time high [1]. The vast majority of this manufacturing is dependent on components imported from other countries - which just got much more expensive. So even if employment in manufacuturing would increase by 20% (unrealistic IMO), that would only translate to 2.6M people - while at the same time losing multiples of that in better-paid jobs in other industries, mostly services.

[0] https://fred.stlouisfed.org/series/manemp [1] https://www.macrotrends.net/global-metrics/countries/USA/uni...
by arghwhat | 2025-04-11 09:18:19+00:00
Modularity would be to be able to use, say, systemd-logind or systemd-udev without using systemd as your init, as there is no tangible or important dependency on the use of systemd as init for those functions.

On a fully-systemd system you can opt out of systemd features. But you cannot opt in to systemd features on a non-systemd system.
Show HN: Blob Goes 3D – A 3D game for the Gameboy Advance in Rust
by milanfin | 2025-04-11 09:18:24+00:00
Been wanting to learn Rust for a while and wrote a GBA game as a learning exercise. Also got to familiarize myself with 3d rendering as a bonus. Previously I've written a raycast game, but this is my first one in "real" 3d.

A lot of the hardware abstractions are done by the agb rust library. The video memory intractions were rewritten as that turned out to be way faster. Since there is no OS on the gba, this was a no_std project, with only core rust features available.

On noteworthy features:

The game "engine" includes a non textured polygon renderer that uses a painters algorithm instead of a zbuffer.

The game levels are declared in json files, that are sanity checked and bundled into the ROM file at compile time. The contents are parsed at runtime with serde. With this approach the user can receive more readable error messages in case of malformed file contents.

The repo contains a release .gba rom file that can be run with pretty much any accurate GBA emulator (eg. mGBA) or on real hardware with a flashcart or by flashing a bootleg cartridge.
by oytis | 2025-04-11 09:18:27+00:00
Deliberate choices to avoid being addictive is exactly why I use Mastodon. I do agree that private messages don't quite work - probably it's best to use a third-party messenger for that. There is also an annoying corollary to anti-virality and lack of recommendation algorithm that if you subscribe to an account that posts or reposts a lot (like an organization or just a very active user), then you feed gets dominated by that account, and you end up unsubscribing. There is no solution to this problem as far as I know, and I'm not sure it's widely discussed either.

Otherwise, if you want to stay informed, connected, but not addicted, Mastodon seems to work quite well.
by Ukv | 2025-04-11 09:18:52+00:00
I believe this is the picture in question (and original): https://www.gbnews.com/media-library/nancy-faeser-photo-befo...

Seven months for that seems insane to me. It looks far more like a meme/satire than an attempt to create a realistic fake, given it's just pure-black impact font and an implausible message ("I hate freedom of speech!") to be holding up on a sign.
by iNic | 2025-04-11 09:19:05+00:00
I don't think you got the point of the article? It is saying that we as wise humans know (sometimes) when to stop optimizing for a goal, due to the negative side effects. AIs (and as some other people have pointed out corporations) do not naturally have this line in their head, and we must draw such lines carefully and with purpose for these superhuman beings.
Ask HN: Does any one know if Firebase is a successful from Google's perspective?
by pritambarhate | 2025-04-11 09:19:17+00:00
Recently, we haven’t seen much marketing for Firebase, Google’s core Backend-as-a-Service product.

Given Google’s well‑known reputation for discontinuing products that don’t meet its internal success criteria, I’m wondering whether Firebase is considered successful by Google’s standards.

They’ve already begun deprecating individual services under the Firebase umbrella—for example, Firebase Dynamic Links (https://firebase.google.com/support/dynamic-links-faq).

Does anyone know where Firebase’s App Backend‑as‑a‑Service is headed?
by mubou | 2025-04-11 09:19:19+00:00
I think what you're looking for is an `internal` modifier. This allows class members to be public within a library, but private outside it.

It's been proposed since 2015: https://github.com/microsoft/TypeScript/issues/5228

Currently, you can use `@internal` in jsdoc, which with the `stripInternal` option in tsconfig will cause it to be omitted from the type declarations for a similar effect.

https://www.typescriptlang.org/tsconfig/#stripInternal

Edit: I've also seen libraries abuse `@deprecated` to inform users not to use an internal API:

https://www.typescriptlang.org/play/?#example/jsdoc-deprecat...
by nickslaughter02 | 2025-04-11 09:19:26+00:00
> To be fair, it's only in discussions now, it hasn't been voted AFAIK and it hasn't been implemented.

Correct but ChatControl now has a majority among EU Commissioners. The fact that something like this is even proposed in the "free" land and the people responsible not laughed out of the room is sickening.

> Compare that to the NSA... ever heard of Snowden?

Spying on your unencrypted communication? That's not comparable + https://en.wikipedia.org/wiki/Whataboutism
by BrenBarn | 2025-04-11 09:19:37+00:00
It's a nice article. In a way though it kind of bypasses what I see as the main takeaways.

It's not about AI development, it's about something mentioned earlier in the article: "make as much money as I can". The problems that we see with AI have little to do with AI "development", they have to do with AI marketing and promulgation. If the author had gone ahead and dammed the creek with a shovel, or blown off his hand, that would have been bad, but not that bad. Those kinds of mistakes are self-limiting because if you're doing something for the enjoyment or challenge of it, you won't do it at a scale that creates more enjoyment than you personally can experience. In the parable of the CEO and the fisherman, the fisherman stops at what he can tangibly appreciate.

If everyone working on and using AI were approaching it like damming a creek for fun, we would have no problems. The AI models we had might be powerful, but they would be funky and disjointed because people would be more interested in tinkering with them than making money from them. We see tons of posts on HN every day about remarkable things people do for the gusto. We'd see a bunch of posts about new AI models and people would talk about how cool they are and go on not using them in any load-bearing way.

As soon as people start trying to use anything, AI or not, to make as much money as possible, we have a problem.

The second missed takeaway is at the end. He says Anthropic is noticing the coquinas as if that means they're going to somehow self-regulate. But in most of the examples he gives, he wasn't stopped by his own realization, but by an external authority (like parents) telling him to stop. Most people are not as self-reflective as this author and won't care about "winning zero sum games against people who don't necessarily deserve to lose", let alone about coquinas. They need a parent to step in and take the shovel away.

As long as we keep treating "making as much money as you can" as some kind of exception to the principle of "you can't keep doing stuff until you break something", we'll have these problems, AI or not.
by mattashii | 2025-04-11 09:19:44+00:00
No, not individual message boards per se, but when they're connected they are called a social network. Case in point: Reddit is called a social network.

And Mastodon, by its inclusion in the fediverse, is part of that fediverse social network.

Yes, it isn't a monolith, but when has that become a requirement for something to be called a network?
by palata | 2025-04-11 09:19:48+00:00
I don't get this interpretation of "free". Would you say that one should be "free" to kill someone else?

Nobody wants absolute freedom. We all want some set of rules (e.g. "You should not be allowed to burn my house for fun"). Of course, we may want rules that benefit us personally ("Taxes should be paid to me personally, not to the country"), but that obviously doesn't work (if taxes are paid exclusively to me, they can't be paid exclusively to you).

So as a group, we agree on a set of rules that benefits society the most. We want to "maximize the global utility", if I can say it like this.

If "not having unicorns" is better for the society at large than "having unicorns", then it works. And your short-sighted, convenient understanding of "freedom" doesn't change that.
by anon_e-moose | 2025-04-11 09:20:08+00:00
If grandma can't tell that the picture is edited, then it's no longer a meme, it's slander.

The comedic value would be even higher if it was an obvious tongue-in-cheek edit. Given it's professionally and seamlessly edited, then it's too ambiguous to be a meme and thus should not be protected as free speech.
by dsign | 2025-04-11 09:20:16+00:00
> Ai will destroy critical thinking in our youths

I don't think that's the argument the article was making. It was, to my understanding, a more nuanced question about if we want to destroy or severely disturb systems at equilibrium by letting AI systems infiltrate our society.

> Sometimes there is an adjustment period (we still haven't figured out how to deal with short dopamine hits from certain types of entertainment and social media), but things will balance themselves out eventually.

One can zoom out a little bit. The issue didn't start with social media, nor AI. "Star Wars, A New Hope", is, to my understanding, an incredibly good film. It came out in 1977 and it's a great story made to be appreciated by the masses. And in trying to achieve that goal, it really wasn't intellectually challenging. We have continued in that downhill for a bit, and now we are in 16 second stingers in TikTok and Youtube. So, the way I see it, things are not balancing out. Worse, people in USA elected D.J. Trump because somehow they couldn't understand how this real-world Emperor Palpatine was the bad guy.
by Propelloni | 2025-04-11 09:20:27+00:00
Hehe, that's certainly one way of looking at it. Just as well we could say that the religious fanatics, the absolutists, the utopians, and some other malcontents dissatisfied with the enlightenment went overseas to establish their puritan and perfect societies because those boring Europeans just wouldn't see the light and all the violence did not change that.

Would that be more accurate? No, but no less either.
by rokbenko | 2025-04-11 09:20:34+00:00
Thanks for the question! That's a tough one. I still didn't figure out how to do it programmatically.

That said, keep in mind that I'm not using just an LLM. I equip the LLM with a tool to give it up-to-date knowledge from the web, which significantly reduces AI hallucinations. Still, it's not perfect.

What I've done so far is:

1) I tested the report for myself. It was 100% on point. 2) I tested the report with a few potential customers. None reported information in reports being incorrect.
by satvikpendem | 2025-04-11 09:20:44+00:00
Why would you...make a podcast given you know nothing about that person? Or rather, the podcast created by your product is not necessarily "yours." Your product should more accurately be called a somewhat of a NotebookLM by Google, synthesizing data and in the future perhaps creating a podcast from different sources for personal use, not for being production grade enough to publish for others to listen to, as one would expect from a traditional podcast about hosts and guests, like Tim Ferriss, Joe Rogan, etc. Your product is essentially LLM deep research, with text to speech in the future perhaps. This distinction is where most commenters are getting tripped up.
by DonHopkins | 2025-04-11 09:22:14+00:00
I wonder what fun The Amazing David Beazley thinks PEP 750 t-strings are?

I recently asked him:

--

Hi David! I am a huge long time fan of SWIG and your numerous epic talks on Python.

I remember watching you give a kinda recent talk where you made the point that it’s a great idea to take advantage of the latest features in Python, instead of wasting your time trying to be backwards compatible.

I think you discussed how great f-strings were, which I was originally skeptical about, but you convinced me to change my mind.

I’ve googled around and can’t find that talk any more, so maybe I was confabulating, or it had a weird name, or maybe you’ve just given so many great talks I couldn’t find the needle in the haystack.

What made me want to re-watch and link my cow-orkers to your talk was the recent rolling out of PEP 701: Syntactic formalization of f-strings, which makes f-strings even better!

Oh by the way, do you have any SWIG SWAG? I’d totally proudly wear a SWIG t-shirt!

-Don

--

He replied:

Hi Don,

It was probably the "Fun of Reinvention".

https://www.youtube.com/watch?v=js_0wjzuMfc

If not, all other talks can be found at:

https://www.dabeaz.com/talks.html

As for swag, I got nothing. Sorry!

Cheers, Dave

--

Thank you!

This must be some corollary of rule 34:

https://www.swigwholesale.com/swig-swag

(Don’t worry, sfw!)

-Don

--

The f-strings section starts at 10:24 where he's live coding Python on a tombstone with a dead parrot. But the whole talk is well worth watching, like all his talks!

https://youtu.be/js_0wjzuMfc?t=624