Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
ddevault
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
39 ms
·
421.
▲
by
ddevault
4y ago
Yes, I tried to work with Zig long before Hare was even an idea. I had hoped that Zig would fill the hole in the ecosystem that Hare is designed to fill, but ultimately I felt that I needed to write Hare. I think that Zig is far too complex
422.
▲
by
ddevault
4y ago
Hare does not prevent use-after-free, but it does prevent many other kinds of bugs which are common in C. I will go into greater detail in another blog post.
423.
▲
by
ddevault
4y ago
This is a harsh statement, but not an ignorant one, borne of years of experience with these systems.
424.
▲
by
ddevault
4y ago
http://cve.mitre.org/cgi-bin/cvekey.cgi?keyword=rust "use-after-free", "data race", "memory corruption", "out-of-bounds write", "read from uninitialized memory", "
425.
▲
by
ddevault
4y ago
Hare does not have a package manager, by design. We feel that package management is best left in the hands of distributions. We don't want the npm/pypi/crates/etc disease to infect Hare - your dependencies should be chos
426.
▲
by
ddevault
4y ago
I can assure you that Hare takes security more seriously than assuming the programmer is smart enough to do it right. I don't appreciate shallow takes which make unsympathetic judgements on the language which are not based in any under
427.
▲
by
ddevault
4y ago
I feel like we're really picking nits at this point. We're using it to develop these things. There are ongoing projects to make a kernel in Hare, POSIX utilities, a password manager, graphics libraries, and so on. There's a l
428.
▲
by
ddevault
4y ago
I think that Hare has a pretty rich standard library, though balanced with a constrained scope which prevents it from growing without bound. Note, though, that web programming is not really a domain that Hare is designed for, so we're
429.
▲
by
ddevault
4y ago
To me, Hare's greatest strengths are in its simplicity, error handling, the standard library, and its documentation. Hare also has a culture of careful and deliberate engineering which values correctness, completeness, and predictabili
430.
▲
by
ddevault
4y ago
Strings are essentially a usage-constrained slice alias. You can pass a string into "free" and it will free the underlying storage. Check out the spec for the full answer: https://harelang.org/specification.pdf Th
431.
▲
by
ddevault
4y ago
We do take security pretty seriously with Hare. To quote our crypto module's introduction as an example: > Cryptography is a difficult, high-risk domain of programming. The life and well-being of your users may depend on your abilit
432.
▲
by
ddevault
4y ago
I really want to avoid measuring Hare up against other languages. I think it stands on its own merits, and would prefer that people evaluate it in earnest rather than compare bullet points with another language. Nevertheless, there does exi
433.
▲
by
ddevault
4y ago
It is too early for most, if not all, projects to consider working in Hare over C/C++/Rust. It is a young, incomplete language, still pre-1.0. It may be interesting to those who are open to a more experimental language to work wit
434.
▲
by
ddevault
4y ago
Hare has significantly more safety and security features than C. Bounds-checked slices, no uninitialized data, mandatory error handling, nullable pointer types, and others still. What it lacks that Rust users object to is a borrow checker.
435.
▲
by
ddevault
4y ago
Hare's target niche is stated on its home page: > Hare is a systems programming language designed to be simple, stable, and robust. Hare uses a static type system, manual memory management, and a minimal runtime. It is well-suited t
436.
▲
Will Hare replace C? Or Rust? Or Zig? Or anything else?
(harelang.org)
10 points
by
ddevault
4y ago
|
0 comments
437.
▲
by
ddevault
4y ago
I don't think our design is particularly coupled to ELF. We only really do one thing with it (store the test array in an ELF section), which can be done differently for another platform, and isn't the end of the world if omitted a
438.
▲
by
ddevault
4y ago
Totally agree that metaprogramming is fun. But I don't think it's a recipe for simplicity and robust engineering, and that's the priority with Hare.
439.
▲
by
ddevault
4y ago
Good question. The answer is that Hare does not have real pattern matching as you may understand it. The switch statement switches on values, and the match statement switches on types. Merging these faces two problems: one is that the gramm
440.
▲
by
ddevault
4y ago
I agree that a macOS port should be relatively straightforward.
441.
▲
by
ddevault
4y ago
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 unde
442.
▲
by
ddevault
4y ago
The language is standardized. I encourage you to write an implementation for any platform you wish, or maintain a fork of our compiler/stdlib for your platform of choice. We're not interested in it upstream, but that does not prev
443.
▲
by
ddevault
4y ago
I have no plans to do either. I can't see wlroots being rewritten, but I could see someone writing bindings for it. Hare does not make C obsolete, there's no reason to rewrite old code imo.
444.
▲
by
ddevault
4y ago
The licensing model is essentially designed in deference to users who want to vendor standard library modules in their projects. They can do so, and patch them, but have to publish their patches. Then the compiler is GPL because it does not
445.
▲
by
ddevault
4y ago
This is a very unsympathetic take. If you expand to the full context, you'll note that I weigh memory safety against other trade-offs, and come away with a different answer than Rust does. Hare does have safety features. Checked arra
446.
▲
by
ddevault
4y ago
Right - but defining a type alias makes a new type, which does not collapse.
447.
▲
by
ddevault
4y ago
We do not have first-class iterators, but we do have an iterator pattern which is common throughout the Hare standard library. As an example, here's how you can enumerate the nodes in a directory: let iter = os::iter("/&q
448.
▲
by
ddevault
4y ago
No, there are no plans for first-class metaprogramming. The purpose of exposing the parser, type checker, module system, etc, in the standard library is to allow for users to more easily build custom Hare tooling. The closest thing you coul
449.
▲
by
ddevault
4y ago
I'm not sure what you mean by "select by type". I can say that you can define new types: type a = int; type b = int; type c = (a | b); Which seems to be what you're angling for here? I also suspect that you
450.
▲
by
ddevault
4y ago
I am not a security maximalist: I will not pursue it at the expense of everything else. There is a trend among security professionals , as it were, to place anything on the chopping block in the name of security. I find this is often count
More ›