Live data from Hacker News

The Hare programming language

harelang.org

271–280 of 323 posts

Re: The Hare programming language

#271

Lack of macros in recent systems languages like Zig/Hare/etc seems to be a design flaw, a handicap marketed as safety feature or bargain for clarity. If a language can't replace C macros, it cannot replace C.

C doesn't exactly have macros. That's a text substitution done by the preprocessor in its own limited, special-purpose language. True hygienic macros of something like Common Lisp are a different beast. If all you want are textual substitutions, you can use the C preprocessor in front of any language.

> you can use the C preprocessor in front of any language.

You will be paddling upriver if that language doesn't have a mostly C-compatible token structure, or has white space sensitivities that C preprocessing doesn't preserve and such.

Re: The Hare programming language

#272

Earlier quoted context omitted.

Nobody ever said it wanted to be mainstream. It targets a niche, quite blatantly.

No based on what's going on the thread. There is comparison everywhere with mainstream languages.

It is fine to compare it to the mainstream languages, that's what programmers do.

Re: The Hare programming language

#273
post #236

Earlier quoted context omitted.

Hard disagree. Linux is by far the largest majority of server deployments, and you are not doing yourself any favors by not developing on the same platform as your deploy target.

I agree 100%, but balanced against the fact that many devs need laptops from their employer, and it's way easier to get a good macbook that just works good enough for development than a linux machine. Especially when you don't control ordering, or need to inherit machines. Dev on Mac and deploy on Linux is a popular setup for a reason. Until there's a macbook pro for linux that you can just buy*, it's going to contin…

Macs are overpriced garbage. I cringe when I see one.

There are so many good laptops that work fine on Linux.

Re: The Hare programming language

#274

Earlier quoted context omitted.

> Not supporting Windows and macOS will likely hurt the adoption of the language. Not among our target audience it won't. > Anyway, is it possible to target bare-metal with Hare? Is it possible to use it without the standard library? Yes. Here are two kernels written in Hare that don't use the stdlib: https://git.sr.ht/~sircmpwn/helios https://git.sr.ht/~yerinalexey/carrot

>> Not supporting Windows and macOS will likely hurt the adoption of the language. > Not among our target audience it won't. No gamedev?

You can develop games just fine on Linux.

Re: The Hare programming language

#275
post #197

Earlier quoted context omitted.

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.

Macros were one of the biggest mistakes that C allowed, along with the undefined behavior.

Not allowing macros means a more standardized reference implementation, which translates to a more readable code overall.

Re: The Hare programming language

#276

Earlier quoted context omitted.

This is a gift to the world, so they aren't selfish. You are demanding, and you have no right to demand anything of random strangers on the Internet. Nobody is required to market their work as you demand, or even try very hard to seek new users. Often, slow growth is better. Maybe someone not on the team will write a decent review of the language, and we will find out more. Hopefully that person will read the documen…

> You are demanding, and you have no right to demand anything of random strangers on the Internet. In which case, the developers of this language are demanding that I spend my valuable time trying to read through their documentation to figure out if this language is good for me, in which case I reply: my time is also a gift and you have no right to demand that of me - I'm going to go and look at another language, and…

No post body was provided.

Re: The Hare programming language

#277

Earlier quoted context omitted.

Honestly that really kills my interest I have in the language. That’s not realistically going to happen (a reimplementation) or go well (maintaining a fork) with a (frankly) niche language. I suspect the pool of people who develop locally (on Win or Mac, and need something functional if not optimal) and deploy to Linux is not small. Is there a particular reason? io-uring?

As other commenters alluded to, it's an ideological and practical decision. We simply prefer free software operating systems. We do not care to legitimize nonfree platforms, and we prefer to be able to read (and patch) the code to understand the tools we depend on. If that's a deal-breaker for you, no worries - Hare does not have to appeal to everyone to achieve its goals.

For those not familiar with the concept: this is how moral backbone looks like.

Re: The Hare programming language

#278

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.

Why do you want to do that? Accessing a member of a namespace is conceptually the same thing as accessing a member of an instance, and in many languages like Python or Zig its literally the same thing too.

Re: The Hare programming language

#279

Earlier quoted context omitted.

Rust is a complicated language, but I don’t it reaches C++ levels of complexity. One of the pernicious aspects of “mastering” C++ is understanding all of its leaky abstractions; there’s nothing like SIOF or SFINAE in Rust.

It definitely does. I think a lot of people think it doesn't because a) most people who know both have far more experience with C++ and are yet to experience its really complicated bits yet, and b) C++ has an actual specification so you can read about all its complexity. Rust may not have SFINAE but C++ doesn't have for , Phantom data or Pin.

> Rust may not have SFINAE but C++ doesn't have for, Phantom data or Pin.

I'll grant you PhantomData, but I'd argue with the other two. C++ does have lifetimes and pinning semantics, they're just implicit and (largely) taken for granted. That is, until you cause memory unsafety with either.

IMO, the overall pattern between C++ and Rust is that "advanced" use requires many of the same skills between the two, but that (1) Rust is much better about avoiding "advanced" use, and (2) Rust forces the user to be much more explicit about what they actually mean (cf. lifetimes and pinning). These are arguably more complex than what C++ does, but only in the sense that C++ amortizes that complexity in blood.

Re: The Hare programming language

#280

Earlier quoted context omitted.

> Not among our target audience it won't. Yes it will. I have no interest in using Linux as desktop but I do use it for deployments. If there is one trait of major PL is the adoption of the big 3 OSes. This is Hare’s biggest flaw right now.

Hard disagree. Linux is by far the largest majority of server deployments, and you are not doing yourself any favors by not developing on the same platform as your deploy target.

With cross compilation or docker for development, I'm not clear on why using Linux is a huge boon to developing servers. Having been down the path of Linux-for-all-things, these days I'd much rather have a nice, fast macbook.
Post reply on HN