~vladh

Edinburgh

https://vlad.website

Love cats, programming, philosophy, music, languages and videogames. Being kind is cool.

I worked on the Hare programming language, please check it out! https://harelang.org

Image by Irasutoya.

~vladh/open-source-sustainability

Last active 10 days ago

~vladh/general

Last active 2 months ago

~vladh/hare-project-library

Last active 8 months ago
View more

Recent activity

Re: regex fixes a month ago

From Vlad-Stefan Harbuz to ~sircmpwn/hare-dev

Yep, I think using relative jumps would fix a lot of these issues, but
we would have to do a survey of where jump and split instructions are
used, to make sure we catch all scenarios where something could be
inserted in the middle, as you say. My main worry is that relative jumps
might be more difficult to reason about.

regex fixes a month ago

From Vlad-Stefan Harbuz to ~sircmpwn/hare-dev

I just pushed some commits to master with some regex fixes. I would have
sent a patch series, but for various reasons you'll see below, it would
have gotten too confusing, and the changes are already confusing enough,
so I'm just documenting what I did here.

First of all, Sebastian implemented nested capture groups:
https://lists.sr.ht/~sircmpwn/hare-dev/patches/56226

That patch had an unnecessary dependency on the nomem patch, but I
modified it to remove the dependency and I applied it.

But this patch also uncovered a different issue.

*The Shifting Issue*

Re: regex module bug a month ago

From Vlad-Stefan Harbuz to ~sircmpwn/hare-users

Thanks! There's already a patch that fixes this. I'm just waiting for an update from Sebastian (cc'd).

[PATCH hare v2] regex: document and test split insertion 2 months ago

From Vlad-Stefan Harbuz to ~sircmpwn/hare-dev

Signed-off-by: Vlad-Stefan Harbuz <vlad@vlad.website>
---

This addresses a discussion with bgs2 on IRC.

v1 -> v2:
* made the new test fail if the inst_split offset is incorrectly
    `len(insts) + 1`

 regex/+test.ha | 2 ++
 regex/regex.ha | 4 ++++
 2 files changed, 6 insertions(+)

diff --git a/regex/+test.ha b/regex/+test.ha
[message trimmed]

[PATCH hare] regex: document and test split insertion 2 months ago

From Vlad-Stefan Harbuz to ~sircmpwn/hare-dev

Signed-off-by: Vlad-Stefan Harbuz <vlad@vlad.website>
---
 regex/+test.ha | 2 ++
 regex/regex.ha | 4 ++++
 2 files changed, 6 insertions(+)

diff --git a/regex/+test.ha b/regex/+test.ha
index 279eeea7..40097b2c 100644
--- a/regex/+test.ha
+++ b/regex/+test.ha
@@ -412,6 +412,8 @@ fn run_rawreplace_case(
		(`^x(abc){,2}$`, "xabc", matchres::MATCH, 0, -1),
		(`^x(abc){,2}$`, "xabcabc", matchres::MATCH, 0, -1),
		(`^x(abc){,2}`, "xabcabcabc", matchres::MATCH, 0, 7),
[message trimmed]

Re: [PATCH hare 2/3] regex: implement nested capture groups 2 months ago

From Vlad-Stefan Harbuz to ~sircmpwn/hare-dev

Gotcha. Could we split the shift() stuff out into a different (prior) commit, so that I can test it separately? Tysm :)

Re: [PATCH hare-glm 1/2] Add aabb_point 2 months ago

From Vlad-Stefan Harbuz to ~vladh/general

Done — would recommend `git rebase upstream/main`.

Re: [PATCH hare-glm 1/2] Add aabb_point 2 months ago

From Vlad-Stefan Harbuz to ~vladh/general

Oh yeah there's some missing stuff — I'll just pull it in. Thanks!