Hacker News

New stories

Live mirror
30 storiesupdated just nowView source snapshot
  1. RunMyWealth(runmywealth.com ↗)
    discuss
  2. Unit tests mark territory more than squash bugs(yosefk.com ↗)
    discuss
  3. Spain Orders Blocks on Archive.today and Its Mirrors(reclaimthenet.org ↗)
    discuss
  4. Free scanner for exposed Supabase data in AI-built apps (Lovable, Bolt, Base44)(trustboost.dev ↗)
    discuss
  5. Dancing Mania(wikipedia.org ↗)
    discuss
  6. Office Open XML(wikipedia.org ↗)
    discuss
  7. Here’s How an AI Slowdown An AI Slowdown Could Be Enforced(wired.com ↗)
    discuss
  8. Some Thoughts on the Economics of UPI and MDR
    discuss
  9. AgentSec Audit(github.com/hicklax13 ↗)
    discuss
  10. OpenAI retiring GPT-5.5 on October 14(gizmochina.com ↗)
    discuss
  11. SpriteIt – Feature Rich, Re-designed 2D/3D SpriteSheet Maker(ssstand.itch.io ↗)
    1comments
  12. Seven, Forever(github.com/02zerocool ↗)
    discuss
  13. AI art is theft – on artists, mathematicians impact on AI(twitter.com/wordgrammer ↗)
    discuss
  14. ScoreTail. Browser-based sheet music editor with live collaboration(scoretail.com ↗)
    discuss
  15. Orchestrating Claude Code Agents: The Chief of Staff Pattern(asyncdot.com ↗)
    discuss
  16. Best Websites to Generate Theme for PowerBi
    discuss
  17. Dark Age(artagnon.com ↗)
    2comments
  18. Built the first open source Python library – converting Word, Excel to PDF(github.com/mini-software ↗)
    discuss
  19. Phylo brings frontier AI to more scientists with open models on Fireworks(fireworks.ai ↗)
    discuss
  20. Observations on LLMs for Privacy Work(desfontain.es ↗)
    discuss
  21. VoltGrid AI: Mitigating GPU cluster dI/dt power surges in software(zenodo.org ↗)
    discuss
  22. A Man Who Named AI: John McCarthy and the End of the Code–Data Divide(nirmalutwani.substack.com ↗)
    1comments
  23. U.S. House Passes Bill to Require Am Radio in New Cars(radioworld.com ↗)
    discuss
  24. Chrome extension to declutter my inbox – might also have cybersecurity upside(?)(chromewebstore.google.com ↗)
    1comments
  25. US judge signals rejection of part of TikTok privacy settlement(reuters.com ↗)
    discuss
  26. UTF-8000: Unlimited UTF-8(jb2170.com ↗)
    discuss
  27. Pi Connects Colliding Blocks to a Quantum Search Algorithm (2020)(quantamagazine.org ↗)
    discuss
  28. Telling a Computer to Do Things(will-keleher.com ↗)
    discuss
  29. Saudi Arabia quits China-led cross-border currency platform(ft.com ↗)
    discuss
  30. Tracking Capabilities for Safer Agents(arxiv.org ↗)
    1comments

Comparing reflection capabilities of C++, Zig and C3

10 pointsby 4h agonyr24.github.io
5 comments
3h agoHN ↗

"not an expert in zig" but you can't even look at the documentation to find the `@tagName` builtin to do exactly the problem posed?: https://ziglang.org/documentation/0.16.0/#tagName

i can literally google "zig enum to string" and the first result is a reddit post where the given solution is `@tagName`. i'm ready to write this post off as a low-effort ad for C3

2h agoHN ↗

If it's for debugging purposes, you can use `{any}` as the format and it will print `.BLUE`

  std.debug.print("{any}\n", .{color});
3h agoHN ↗

There's a large black zig-zag blocking reading the text.

2h agoHN ↗

Zig doesn't have attributes, but you could just create a thin wrapper struct over an inner type and use setter functions that throw errors on invalid values. Personally I prefer this over attributes because it forces you to handle possible error states from the callers of the setters, instead of relying on you remembering to call `validate` on your types.