Live data from Hacker News

The Hare programming language

harelang.org

201–210 of 323 posts

Re: The Hare programming language

#201

lol my other post got flagged, so let me reiterate perhaps in a less inflammatory way. It is disappointing to see that "trust the programmer" is a design goal. Programmers can not be trusted with manual memory management. We have decades of proof, billions and billions of dollars of bug fixes and mitigation investments, real world damages, etc. Building a language like this and saying you hope it will be the foundati…

Maybe be less zealous and aware of your assumptions? Your assumption is that memory safety has to be baked in the language. It could be baked into proof assistants that are part of (optional or add-on) tooling, like what sel4 does. A simpler language makes this more possible, and the things that a proof assistants can do go far beyond what rust is able to provide, without sacrificing compilation speed or other forms…

> It could be baked into proof assistants that are part of (optional or add-on) tooling, like what sel4 does. A simpler language makes this more possible, and the things that a proof assistants can do go far beyond what rust is able to provide

I’m actually doing my PhD on the verification of Rust programs and wanted to add that the opposite is actually true. The type system of Rust helps to create a much simpler model of the language which allows us to do proofs in much larger scale than with C (for the same effort). This is specifically because of how ownership typing helps us simplify reasoning.

Re: The Hare programming language

#202

Not supporting Windows and macOS will likely hurt the adoption of the language. Anyway, is it possible to target bare-metal with Hare? Is it possible to use it without the standard library?

I am wondering: if hare compile for some UNIX systems, then it should be "easy" to port this to MacOS.

Re: The Hare programming language

#203
post #197
post #177

The first thing I look for in something that claims to be a systems language is whether it provides anything that helps me out. First and foremost, does it provide any primitive that can be used for automation? C++ brought destructors, Rust did a Drop trait. What do you have? Second, does it provide any way to operate on types? C++ got templates, Rust offers generics. What do you have? Third, does it provide useful c…

From my brief look at the documentation, the answers look like this: they have a defer statement much like Go's, they don't seem to have any form of generics, they don't seem to have any form of comptime logic. They really need a section on the landing page to compare Hare to Zig. (And to C, for that matter.)

> they don't seem to have any form of comptime logic

Or macros, not even textual C-style ones. Non-starter for me.

Re: The Hare programming language

#205
post #177

The first thing I look for in something that claims to be a systems language is whether it provides anything that helps me out. First and foremost, does it provide any primitive that can be used for automation? C++ brought destructors, Rust did a Drop trait. What do you have? Second, does it provide any way to operate on types? C++ got templates, Rust offers generics. What do you have? Third, does it provide useful c…

> We have learned things since then. Have you? We have learned to read the documentation before we judge things.

This is an extremely selfish answer - by refusing to spend a few hours writing a front-page summary of your language, you're valuing the time of your m developers (where m is small) over that of the n developers who might want to evaluate the language (where n is large).

A language made by people who consciously make that tradeoff is almost certainly not worth even trying to learn. At least, if you're looking for a language that will actually act like a force-multiplying lever and save you time. Like, you know, programming languages are meant to do.

Re: The Hare programming language

#206
post #169

It looks like self-hosting is still WIP. Do I have that right? * https://git.sr.ht/~sircmpwn/hare/tree/master/item/cmd/harec * https://git.sr.ht/~sircmpwn/hare/tree/master/item/hare * https://harelang.org/blog/2021-03-14-a-self-hosting-toolchain/

Self-hosting is a very last-millennium form of wankage. Back then, a compiler was a pretty significant program, and compiler construction tools weren't mature. Nowadays, self-hosting your compiler doesn't demonstrate much of anything. It takes a lot more than a compiler to prove anything meaningful about your language. Time spent on self-hosting is mostly just time wasted. It mainly suggests you were not really serio…

You are missing one subtle but important flaw in your dismissal: not self-hosting means that your compiler will only be developed by people willing to write C/C++ code, which has practical implications as well as taking away some of the punch from your effort to improve on the status quo.

Re: The Hare programming language

#207

Why do people keep choosing :: over simply .? How does adding more visual noise help anyone?

To distinguish between an instance and a namespace? The same can be said for why do we need to put parenthesis after functions that take no parameters? So people still know it's a function.

But why not use a single character? With the double colon, something like foo::bar(xyz) looks like bar is “closer” to xyz, when in fact it's closer to foo.

Re: The Hare programming language

#208

I don't know if the world needs this language, but I'm glad it exists. There's a real charm to C's straightforwardness. It deserves to be expressed without broken array handling and a clunky preprocessor and overzealous UB and so on. I use Rust and like it well enough but it's amazing that its amount of complexity can work at all. It's healthy to have a counterpoint that stays clear even of generics.

It is impressive the number of times Rust is mentioned in this thread.

I agree. Rust is very complicated and it still feels experimental. It is good to have more conservative languages.

Re: The Hare programming language

#209

I don't know if the world needs this language, but I'm glad it exists. There's a real charm to C's straightforwardness. It deserves to be expressed without broken array handling and a clunky preprocessor and overzealous UB and so on. I use Rust and like it well enough but it's amazing that its amount of complexity can work at all. It's healthy to have a counterpoint that stays clear even of generics.

You might want to look into Zig, which has most/all of Hare's features, supports a wider range of platforms and OSes (Hare only does Linux+FreeBSD), and has metaprogramming in the form of comptime expressions (unlike Hare, which has no metaprogramming at all) while being pretty widely considered to be an "easy" language to learn (and everyone I've heard talk about it has said that it's far easier than Rust).

Re: The Hare programming language

#210

lol my other post got flagged, so let me reiterate perhaps in a less inflammatory way. It is disappointing to see that "trust the programmer" is a design goal. Programmers can not be trusted with manual memory management. We have decades of proof, billions and billions of dollars of bug fixes and mitigation investments, real world damages, etc. Building a language like this and saying you hope it will be the foundati…

How would I trust the programers who implement automatic memory management that they are not going to make any mistake?

"How would I trust the programmers who implement compilers that they are not goin to make any mistakes? I'll write the assembly myself, thank you very much."

It's much better to push logic from being manually re-written over and over by tens of thousands of different programmers, to being built into a language/tool/library by a team of a few hundred experts and then robustly tested.

Post reply on HN