~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 2 months ago

~vladh/general

Last active 4 months ago

~vladh/hare-project-library

Last active 10 months ago
View more

Recent activity

[PATCH hare-docs] conduct: remove Vlad 2 days ago

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

Signed-off-by: Vlad-Stefan Harbuz <vlad@vlad.website>
---
 community/conduct.rst | 1 -
 1 file changed, 1 deletion(-)

diff --git a/community/conduct.rst b/community/conduct.rst
index b638e07..bc6e90f 100644
--- a/community/conduct.rst
+++ b/community/conduct.rst
@@ -93,7 +93,6 @@ if the complainant so desires:

* Drew DeVault <sir@cmpwn.com>
* Ember Sawady <ecs@d2evs.net>
* Vlad-Stefan Harbuz <vlad@vladh.net>
[message trimmed]

Re: regex alernation ignores second expression 30 days ago

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

Hey,

Whole-expression alternation is implemented, and so are nested capture groups. So this must be a bug. I'll look into this. Thanks for reporting it!

Wishing you a great day,
Vlad

Re: regex fixes 3 months 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.

Re: regex module bug 3 months ago

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

This bug has now been fixed. For more details, see: https://lists.sr.ht/~sircmpwn/hare-dev/%3C0d1adb8a-1842-4364-881e-d7163d919d0b@app.fastmail.com%3E

regex fixes 3 months 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 3 months 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 4 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 4 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 4 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 :)