fosstodon.org is one of the many independent Mastodon servers you can use to participate in the fediverse.
Fosstodon is an invite only Mastodon instance that is open to those who are interested in technology; particularly free & open source software. If you wish to join, contact us for an invite.

Administered by:

Server stats:

8.8K
active users

#harelang

4 posts4 participants0 posts today

While writing my project, I think i found a bug in one of the strings functions in harelang.

strings::split seems to fail to split with delim '\n\n' and it seems to think that '\n\n' is '\n'.

My workaround was using strings::cut. It seems strings::tokenize and strings::split behave the same with '\n\n'. I haven't checked other kind of delimiters.

I was so confused at first because I expected it to behave similar to Rust's or Python's split.

Replied in thread

@mms It's a tricky one.

I don't necessarily blame the #wlroots developers here, but each release has breaking changes which they could do better to document/manage.

Take the release notes:

gitlab.freedesktop.org/wlroots

Some of this information is excellent, but doesn't go far enough. When you have a API in flux, having tooling to help might be worthwhile.

#hare #harelang did this with their hare-update(1) tool recently:

harelang.org/blog/2025-06-11-h

I'd rather see something like #coccinelle scripts in #wlroots to help with the transition, akin to what #harelang are doing.

I know #hikari is coming from 0.15 as its starting point, but the fact remains there's going to be further breaking changes, and I feel this should be addressed.

I might have to see what I can do to help as I do feel this is important.

I know that if the delta between releases is small, the changes might be small, but that's not guaranteed to cause big, sweeping changes. Case in point is the whole wlr_output_damage deprecated for wlr_damage_ring -- we're not just talking changes to the API, but rather, changes in *functionality* which I still don't see documented anywhere.

Hmm. The future.... great....

GitLabReleases · wlroots / wlroots · GitLabA modular Wayland compositor library
I think I have a solution for adding syntax highlighting to Hare by Example without JavaScript.

I think I'll just run this over each example and then inject the results into the code section of each example at generation-time. Sure, it adds a CLI dependency, but avoids JavaScript and needing to rewrite this in Hare directly...for now.

https://github.com/alecthomas/chroma?tab=readme-ov-file#command-line-interface

#HareByExample #HareLang #Programming
A general purpose syntax highlighter in pure Go . Contribute to alecthomas/chroma development by creating an account on GitHub.
GitHubGitHub - alecthomas/chroma: A general purpose syntax highlighter in pure GoA general purpose syntax highlighter in pure Go . Contribute to alecthomas/chroma development by creating an account on GitHub.

#hare #harelang #programming

Hare 0.25.2 has been released:

harelang.org/blog/2025-06-21-h

Congratulations to all involved!

It's an interesting release. The "nomem" error type will make memory allocation errors easier (the stdlib changes for this show this).

It's also interesting to see the "Semantic code annotations" changes -- this will be great for things like JSON parsing.

It's very interesting watching hare develop, and I don't think it quite gets the respect it deserves sometimes...

harelang.orgHare 0.25.2 released