Hacker News

Top stories

Live mirror
30 storiesupdated just nowView source snapshot
  1. Bend 2 and the Vibe-Coding Trap(liampwll.com ↗)
    137comments
  2. An Empirical Study of Harness Design for Coding Agents(arxiv.org ↗)
    4comments
  3. AI chatbots becoming experts at changing people's minds. What's their secret?(science.org ↗)
    20comments
  4. I don't like passkeys(hawksley.dev ↗)
    205comments
  5. ZCode, the GLM coding agent, silently uploads your Git history(tokenstead.ai ↗)
    42comments
  6. OpenJev(openjev.com ↗)
    174comments
  7. The Shadows Lurking in the Equations – Underwater Islands(gods.art ↗)
    3comments
  8. Subnormal floating-point numbers are expensive on Intel processors(lemire.me ↗)
    26comments
  9. Jemalloc 5.4.0(github.com/jemalloc ↗)
    59comments
  10. Microsoft exec called AI scraping 'the largest theft of labor in human history'(techcrunch.com ↗)
    420comments
  11. Cekura (YC F24) Is Hiring(ycombinator.com ↗)
    discuss
  12. Warren Buffett Steps Down as Berkshire Chairman, Names Son to Replace Him(nytimes.com ↗)
    92comments
  13. Replacing Pull Requests with Delta(zed.dev ↗)
    41comments
  14. The scourge of x86 emulation(fex-emu.com ↗)
    54comments
  15. Bonsai 2 27B: Near-Lossless Compression in a 9x Smaller Footprint(prismml.com ↗)
    159comments
  16. Astra for Law(openai.com ↗)
    638comments
  17. If materialism is true, the United States is probably conscious(jstor.org ↗)
    33comments
  18. Show HN: Navier-Stokes Visualized as 1kB i386 demos(juandecos.github.io ↗)
    3comments
  19. Bend – A language that blocks AI mistakes via proof, on CPU and GPU(bend-lang.com ↗)
    264comments
  20. Qwen 3.8 Omni Flash(qwen.ai ↗)
    100comments
  21. Hister: A private search engine for the pages you visit and the files you keep(github.com/asciimoo ↗)
    177comments
  22. Wax motor(wikipedia.org ↗)
    87comments
  23. When the fractional part of a float fixes your shader(crocidb.com ↗)
    10comments
  24. Fujitsu launches made-in-Japan next-generation CPU FUJITSU-MONAKA(global.fujitsu ↗)
    240comments
  25. Pre-Greek: The lost language hidden within Ancient Greek(linguisticdiscovery.com ↗)
    56comments
  26. How to Write with an LLM(sockpuppet.org ↗)
    163comments
  27. A heap overflow and SSO misconfiguration to compromise OpenAI internal repos(hacktron.ai ↗)
    168comments
  28. Dr Julius Neubronner's Miniature Pigeon Camera(publicdomainreview.org ↗)
    discuss
  29. Shapelearn Qwen 3.8 27B (13.1 GB VRAM)(byteshape.com ↗)
    25comments
  30. Telstra outage: The night a network decided the year was 2006(netnod.se ↗)
    31comments

Compilers in OpenBSD (2013)

77 pointsby 11y agomarc.info
34 comments
11y agoHN ↗

The license of CompCert is an instant no to be part of base in openBSD. I believe the reason openBSD hasn't changed to llvm is because it doesn't support all of their current architectures(feel free to correct me on this).

11y agoHN ↗

It is really worrying because it seems to be the trend with everything, from web browsers, compilers, all the way down to kernels.

11y agoHN ↗

This was my favorite quote: "The free software world needs an LTS compiler."

11y agoHN ↗

Agree.

I wonder what it would take to make Rust 1.0 + LLVM into an LTS?

11y agoHN ↗

Rust 1.0 represents a foundation for the language, rather than the ultimate expression of it. A LTS release could be a good idea, but I don't see it happening for at least a year or so.

11y agoHN ↗

Sorry to be that guy, but what's an LTS compiler? (Google was not forthcoming.)

11y agoHN ↗

LTS means long-term support, which means freezing features and maintaining that version for 2-5 (or more) years.

11y agoHN ↗

Also LTS means "95% of the developers left for the newer version because on open source projects no one can be forced to work on legacy applications like in business world".

Good luck with that. I tried to go on with the Ubuntu's LTS once, and the logic definitely doesn't work. Bugs, even major ones, just pile up faster than the remaining couple developers can fix, and it's was too painful of an experience to repeat. Ubuntu LTS has shelf life of 6-12 months unless if you start paying. Which is unfortunate.

11y agoHN ↗

unless if you start paying. Which is unfortunate.

So you want something for nothing. Why exactly would Ubuntu (or anybody else) want you as an user?

11y agoHN ↗

I want "something", that something being backwards compatibility and long-term support, for $100-150. Can I get it from Ubuntu or any other Linux/Unix? I sure as hell get it from Microsoft.

11y agoHN ↗

95% of the developers left for the newer version because on open source projects no one can be forced to work on legacy applications

Yep. I see this a lot in the scientific world. Clusters and other high-performance hardware run old versions of Scientific Linux or CentOS (because they are well-supported and the bugs are known). However, a lot of open source project (e.g. in machine learning) expect you to run the latest Ubuntu or OS X version. Result: you usually end up hand-compiling large amounts of software, manually adding '-I' and '-L' flags to oddball build systems that don't pick up CFLAGS or LDFLAGS correctly.

Nobody cares about backwards compatibility, everyone wants the new toys.

11y agoHN ↗

LTS as in Long-Term Support:

http://en.wikipedia.org/wiki/Long-term_support

The basic idea is that once released, the LTS version of the compiler would continue to receive fixes and updates for several years (at least two according to Wikipedia), no matter how many new versions are released during that time.

11y agoHN ↗

The enterprise world already had them since decades.

Just try to update a compiler version on a large code base, specially in corporations where developer tools are managed by IT support.

11y agoHN ↗

Of course, everybody wants to have an LTS release of every piece of software they depend on, that "just works" for all their use cases [1], and that somebody else maintains for many years, like magic.

The problem is, nobody wants to pay for its maintenance, hence it does not exist [2].

In the FOSS world, nobody is entitled to a pony.

Also it's rather ironic that it's an OpenBSD developer wanting this, considering http://www.tedunangst.com/flak/post/long-term-support-consid... - how does that reasoning not apply to compilers?

[1] including of course the all-important Motorola 88k back-end!

[2] with very few exceptions: RHEL, SLES

11y agoHN ↗

That's not true for all open source projects. Look at PostgreSQL for instance, they back-patch all bugfixes (where possible) to all of the previous supported major versions.

11y agoHN ↗

Miod and I have different opinions. Anyway, what I think Miod really wants is a compiler free from regressions. Unfortunately, new compiler versions tend to introduce at least as many regressions as bug fixes.

11y agoHN ↗

If obsd moves to clang I'll eat my hat.

pccm is naturlly where they're headed. It's just not ready yet.

11y agoHN ↗

On a somewhat related note, I found it amusing that in OS X gcc has been aliased to clang.

11y agoHN ↗

It's a practical concern, really. Too many people wrote Makefiles which called gcc instead of cc.

11y agoHN ↗

Traditionally on most Unix systems cc and gcc where two different compilers. Many times people would write code in ways that compiled with gcc, but not cc, so specifying exactly which compiler you want makes sense.

11y agoHN ↗

It might be bit ugly, but couldn't you use a variable inplace of the compiler name, so that it would be trivial for someone to attempt using another compiler

11y agoHN ↗

That is exactly what make supports out of the box. If ${CC} is missing from the Makefile, ${CC} is globally set to the system C compiler i.e. cc

Users can use a different compiler by specifying it on the command line via e.g.

  make CC=clang

Some people set

  CC=gcc

in their Makefile to force the usage of gcc. Never do this. Do this instead:

  CC?=gcc

That way users can still override the value of ${CC} on the command line if they want to.

11y agoHN ↗

CC?=gcc

This is only relevant if you want portability to other versions of Make. I simply don't care about anybody who's not using GNU Make these days. Try it yourself: command line options override variables in makefiles unless "override" is specified for that assignment.

11y agoHN ↗

The last de-facto LTS compiler we have had was gcc 2.7.2.1, and it is too old to compile modern C and C++ code.

Wont any LTS compiler be "too old" quickly?

11y agoHN ↗

Depends on your code. C isn't moving at the pace C++ is so given that most (all?) of the OpenBSD base is C and sh, LTS will work with base, no problem. It's important too that developers are rather happy with what C99 brings to the table so it's a solid reference point for any LTS compiler that would/could happen. It's ports, I think, where the problem is. A lot of that code is C++ so you need compiler and std lib implementation to be able to handle it. But there are two problem.

First one: the quality of ports varies from project to project. There's code out there that depends on certain gcc-specific extension, compiler quirks, bugs, you name it. C++ is insanely complex and features just keep piling on. I bet the moment C++17 is available some projects start using certain features because they can. In this case C++ is a moving target and it's hard to imagine LTE C++ compiler for open source projects.

Second one: AFAIK only gcc's standard library has support for all of the wacky constructs C++ requires. You're probably out of luck if you try to compile C++ code with thread local storage intermingled with exceptions and you want to depends on non-GPL musl or bionic (which would be important for projects like OpenBSD). And there's code depending on that in ports, you can bet on it.

Until these problems are solved[1], OpenBSD won't migrate. LLVM could become the LTS compiler for projects that would benefit from using it, but it doesn't look like a complete operating system is a project that would fit.

[1] plus some others, like backends available for more than x86/64, arm, mips, PPC, Sparc and z (or whatever the list is today); OpenBSD supports quite a few esoteric platforms

11y agoHN ↗

Great place to shamelessly mention my MIT licensed work in progress C compiler (written in Go), https://github.com/andrewchambers/cc/ . Nowhere near the level it needs to be, but would be fun if I could start a community to push it forward.