Hacker News new | ask | show | jobs
by klardotsh 12 days ago
Windows support is huge. One of the barriers to me considering QBE for a project in recent memory was that it had no story for proprietary OSes (Windows, MacOS), and whether I like it or not, those make up the overwhelming majority of desktop-like market share. (this is the same reason I find Hare, a language that builds with QBE, interesting but not practical for my own uses - targeting only Linux and the BSDs is a non-starter, even if I personally am a Linux-only guy)
2 comments

I agree!

One of the benefits of this new QBE feature of supporting windows could be that this allows a language like Hare to be used for windows too, all the more power to Hare and other programming languages built on top of QBE!

In theory, sure, but there's no way Hare is going to ever officially support Windows. Even if the compiled backend supports the target, the language still needs to abstract over the OS interfaces and implement syscalls.
I'm not familiar with the language but if it targets libc, it might be easily able to work with MINGW. There are mingw/native versions of most popular libraries.
The whole point of Hare is to be a part of a modern computing environment that offers most of the creature comforts of modern computing, yet is small enough to be understood by one person.
This doesn't clarify much.

The Linux kernel ABI, while stable, is not simpler than libc and not portable at all. You can build the modern computing environment on mingw.

However, if they chose to target Linux–only to show how low–level Hare is, that's understandable as well —no shade.

To take it to its logical conclusion, they're saying libc will be a package you install on your Hare/Linux system for compatibility with obsolete systems, which to me implies willingness to work on ports to other platforms —you're not going to replace libc otherwise.

It is not libc based.
Isn't libc mandatory on OpenBSD?
It looks like they do link to libc on OpenBSD hosts, but other hosts directly invoke syscalls
There was an article linked on here or lobste by an OpenBSD dev showing how to make your own "libc".

The main issue on that OS is that it is neither ABI or API stable.

The Blaise Pascal compiler uses QBE for it's backend compiler.

https://github.com/graemeg/blaise

Having Blaise work on Windows, could be interesting... Though of course only in the long tail of already built Delphi apps... that still have source.... that are reasonably written... that don't rely on now unsupported libraries...

Hmmm... Ah yes. These may be some of the reasons people might not do Delphi as much anymore. Still, Delphi was great for me and helped me get a mortgage and things like that.

The Blaise author is progressing his development along nicely using QBE for the compiler. To me, Blaise looks like a team progressing things nicely, but I think it's mostly the original author.

Blaise could be a neat Pascal compiler with a great deal of old cruft cleaned out and is quite quick.

Besides FreePascal, I think those of us that like such languages are probably better playing with Ada or Modula-2.

Ada, as it continues to evolve as ISO standard, and there is an official open source compiler (among 7 vendors), and Modula-2 as it got added to the set of GCC frontends, and being the language Wirth actually designed for systems stuff (the uppercase keywords are a downer if not using a proper IDE though).

Naturally Delphi still has lots of goodies.