hare is a relatively new systems programming language that seems to well encompass permacomputing concepts. it’s minimal enough to fit on a floppy disk1, yet is still extremely capable.
its main appeal to me comes from its simple syntax (see hello world example), easily compilable nature (see later comments), and minimal toolchain. i’m currently working on an implementation of the age encryption format in hare. while it did take some work to get the compiler running on my my silicon mac, i was able to get it eventually by using a fork
hare honestly just feels really good to write; i enjoy it now about as much as i enjoyed rust when i first figured it out. i wish that it was more capable in terms of cross-compilation because i’d certainly find things to do with it if possible
hello world is pretty simple:
use fmt;
export fn main() void = {
fmt::println("hello world!")!;
};however, getting it working is much less simple </3
the hare team outright refuses to ever provide support for windows or macOS2, stating that “Hare does not and will not officially support proprietary operating systems upstream.” of course, i’m not a system’s programmer; harec is written largely in C and assembly, two languages i’m entirely unfamiliar with, and i don’t know how to interface with systems at this level. nevertheless, the fact that no other mainstream language seems to deal with such struggles, not even languages that can compile freestanding binaries like zig or V, makes me feel as though they just dont want to support these platforms for some reason.
hare is relatively easy to compile; you just need a c11 compiler and qbe and you’re basically set. you just build the harec compiler and then use that to compile the rest of the hare standard library and tools. outside of the fighting i had to do to get it running on macOS, it was an extremely simple process.
cross-compilation, however, is a whole different beast. coming from language like python and rust, i usually can expect it to be possible to get my code to work on other platforms somehow, whether that’s by compiling on that machine (e.g. rust on github actions) or through a universal interpreter. but hare simply does not support cross compilation for anything besides the host OS on a different architecture3.
overall, i definitely love hare; it’s a joy to write, it’s pretty performant, it produces lightweight binaries; but they frequently make calls that just make hare more difficult to use on a wider scale, at least for me. for my age implementation, i can’t reliably build binaries for other platforms, nor can i expect for users to even be able to build their own binaries. if a user wants to use my software and is on macOS or windows (about 70% of people right now, as of last month) then it’s just over! and that does not seem like a very desirable thing in general
i suppose nothing will ever be perfect