Hacker News

Top stories

Live mirror
30 storiesupdated just nowView source snapshot
  1. Laya the open source version of Jev(convaiinnovations.com ↗)
    69comments
  2. What Zig felt like, coming from Rust(besok.github.io ↗)
    21comments
  3. A graphical desktop for the ZX Spectrum(github.com/mindbox77 ↗)
    6comments
  4. AI-generated posters don’t have to be horrible(john.hartnup.uk ↗)
    350comments
  5. Human brain is two separate organs, Stanford Medicine-led research finds(stanford.edu ↗)
    161comments
  6. Tin: full-text search for Postgres(planetscale.com ↗)
    3comments
  7. “The Secret Life of Circuits” is here(coredump.cx ↗)
    34comments
  8. Asking Authors About Their Own Papers(medium.com/tmlrorg ↗)
    3comments
  9. Android 17 is the first since 3.x to add new APIs without releasing to the AOSP(grapheneos.social ↗)
    515comments
  10. Black Holes or Black Hole Stars? Astronomers Spar over 'Little Red Dots'(quantamagazine.org ↗)
    5comments
  11. San Francisco Onion Futures Company(onionfutures.com ↗)
    91comments
  12. If math is more than proof, we need to better celebrate the rest of it(terrytao.wordpress.com ↗)
    162comments
  13. GPT-6 Astra Solves a WWI German Radio Cipher(prinzai.com ↗)
    120comments
  14. Cloudflare Quick Tunnels(cloudflare.com ↗)
    299comments
  15. Communication by means of modulated Johnson noise(pnas.org ↗)
    16comments
  16. Learning Another Language May Be One of the Best Ways to Keep Your Brain Healthy(theconversation.com ↗)
    2comments
  17. How to Write with an LLM(sockpuppet.org ↗)
    356comments
  18. You can run Git on object storage if you re-make packfiles(tigrisdata.com ↗)
    23comments
  19. SDCC – Small Device C Compiler(sourceforge.net ↗)
    21comments
  20. Saving another 100TB of RAM(cloudflare.com ↗)
    87comments
  21. Science Is Open Software(jepedersen.dk ↗)
    46comments
  22. From Stonemasons to Carpenters(thelastsoftwareengineer.substack.com ↗)
    4comments
  23. Why building a Rust LSP is hard(rust-glancer.github.io ↗)
    44comments
  24. How OpenAI Used Its Own LLMs to Design Its Jalapeño Chip(ieee.org ↗)
    112comments
  25. Ctenophores: Wonders of Biology(quantamagazine.org ↗)
    6comments
  26. NASA-IBM Lunar Foundation open-Source Geospatial AI Model(usra.edu ↗)
    5comments
  27. The first new cat species discovered in 100 years(nationalgeographic.com ↗)
    118comments
  28. OpenJev(openjev.com ↗)
    275comments
  29. Ray Ozzie and the Optimism of Being Early(reproof.app ↗)
    5comments
  30. Goroutine Leak Profiles(go.dev ↗)
    6comments

What Zig felt like, coming from Rust

41 pointsby 1h agobesok.github.io
21 comments
37m agoHN ↗

“ The language is different from Rust (who could’ve thought that, yeah), but it left a genuinely good impression. It’s straightforward, modern, and blazingly fast. I believe it has real potential to become the true successor to C. On the other hand, it’s still young, and it shows: the shape of the language itself feels unfinished in places, and I suspect it’ll pick up more of the cooler quality-of-life features and syntax sugar as it matures.

As for me, I’d like to keep contributing to the ecosystem, and I will, whenever I come across a project worth building.”

Idk I don’t write either well enough to have a hand in this but losing out all of this for more Imperative stuff seems like a step back.

“ No functional paradigm

Rust is technically an imperative language, but it draws heavily on functional concepts: zero-cost iterators, lazy evaluation, ADTs, pattern matching, monadic types, traits, closures, and so on. Having also spent time with Haskell and Erlang, I’ve become fairly inclined toward the functional style, and it shows in this library. It leans heavily on FP idioms:

Monadic error control via combinators like Queryable and related types Monadic-style data types like Data<T> with map, flat_map, reduce, and friends Pure, immutable transformations Combinators over iterators instead of loops Closures for local abstraction Declarative macros as a small embedded DSL Sum types and product types”

31m agoHN ↗

I would say Rust is a functional language that has been hammered into the shape of C++. It also draws heavily on ML.

I get why, and it makes it a better fit for its obvious “C++ reimagined, cleaner, and better” niche.

26m agoHN ↗

Modern and blazing fast, what we lost leaving behind languages like Modula-2 and Object Pascal, having newer generations to think C and C++ were the only compiled languages alternatives to scripting languages.

12m agoHN ↗

I miss the years of writing CLI tools, web servers and clients, in Ada (and of real-time complex distributed system...). Felt so simple and right and fast and robust. The code is still readable today and maintaining it is a zero effort today. Clean Java without the enterprise BS was a close second in ease of programming - boilerplate be damned.

I'm glad NVIDIA found a way to make GPUs programmable and got us out of the shaders tarpit, but did it have to be C++...

17m agoHN ↗

I’m more than a bit out of my depth discussing the topic, but I’m not sure than imperative-dominant languages will ever really go away or that functional-dominant languages will ever become as popular as C and C++. Ugly as they may be, imperative languages seem to be grokked by humans more readily and are more often than not “good enough” for the most part so it’s difficult to see them losing substantial momentum.

7m agoHN ↗

Until there is a machine that is natively functional, there is always going to an incentive to go lower level for more performance.

Even hardware (GPUs) that functional language could trivially exploit, it’s still higher performance to write low level code and manages all the memory imperatively

22m agoHN ↗

I don’t see the point of letting an LLM generate an article when the topic is your personal, subjective experience which only you, a human, would be able to express.

20m agoHN ↗

So anything that has em dashes is now considered LLM generated? What made you think this is generated?

15m agoHN ↗

Not OP, but I think the leading and trailing paragraphs were mostly human-written (and nice to read), but the memory leak example cases had a very different flavor of prose and code comments that smelled very Claude-y to me

7m agoHN ↗

After going over that section again I can see it now.

12m agoHN ↗

"It's young, and it shows"

"Holds up"

"not a toy, but not a sprawling project either, and ideally.."

"And that’s the trap"

ctrl F "real" -> 6 usages

ctrl F "genuine" -> 4 usages

11m agoHN ↗

It's unfortunate, but to come across as genuine now I think you have to actively avoid AI-isms.

In this case it feels AI generated with human polish, or vice versa. A couple tells are "One caveat worth stating up front..." and of course, "...the shape of the language itself...".

6m agoHN ↗

So anything that has em dashes is now considered LLM generated?

Is that what they said? If that's not what they said, why are you putting words in their mouth in an attempt to weaken their statement into some completely ridiculous stupid strawman that is obviously not actually what they said?

2m agoHN ↗

It kind of says so at the bottom:

Disclaimer: styling and error handling throughout this article were cleaned up with the help of AI.

The implication seems to be "light editing", but the LLM styling really comes through, so I guess that tracks.

19m agoHN ↗

The first thing that caught me off guard — and honestly, who would’ve expected this to be the memorable part — was IDE support, or the near-total lack of it.

I would have completely expected that.

11m agoHN ↗

I think when we're looking back on the 2020s we'll be struck by the Allocator obsession

All of the Handmade "C successor" languages seem to have this obsession, including not only Zig but Odin, C3 and Jai.

For some toy problems you can do clever allocator tricks and get a huge perf win. For example Jai and Odin both seem to really want you to write code which can throw away a "per-frame" arena periodically so they're not paying to track allocations in the arena because they're all thrown away at the same time.

But a lot of real world software just isn't that simple. This doesn't make such features worthless, it just means they're one of a thousand tools the experienced developer could want in their toolkit, not really deserving headline status.

5m agoHN ↗

Off topic, but I remember fondly the pre-LLM days when I used to love reading about programming languages. I never got a chance to professionally work with Rust, but made some cool hobby projects with it. Would have eventually tried out zig too.

Now it all feels so pointless though. Like memorizing rules to do mental arithmetic. Sure, there is still use for language expertise, but not enough to get excited over new concepts and ideas.

2m agoHN ↗

I think (for now), it is still relevant. A language is an abstraction, and a good abstraction, like a good LLM harness, can be quite valuable.

Let’s say I’m writing some concurrent code with an LLM. I’d probably feel much safer having it write Rust, rather than C. So even in a post-LLM world, languages will continue to evolve as long as abstractions can be improved.

5m agoHN ↗

Would recommend learning how to use arena allocation. You would have patterns like:

fn run_query(alloc) {

   arena = init_arena(alloc);

   defer arena.deinit();

}