~turminal

Ljubljana, Slovenia

~turminal/test

Last active 2 years ago

~turminal/public-inbox

Last active 4 years ago
View more

Recent activity

Re: [PATCH harec] fix branching expression result type calculation a day ago

From Bor Grošelj Simić to ~sircmpwn/hare-dev

On Fri Jan 17, 2025 at 5:17 PM CET, Lorenz (xha) wrote:
> On Fri, Jan 17, 2025 at 04:04:12AM +0100, Bor Grošelj Simić wrote:
> > This is essentially the same change as 56f9fa50, but for match, if and
> > compound expressions instead of switch. The reasoning behind this change
> > is provided in the accompanying spec commit.
> > 
> > This commit makes harec comply with the new spec and ensures the change
> > does not introduce problems in gen.
> > 
> > Breaking-Change: language
> > Signed-off-by: Bor Grošelj Simić <bgs@turminal.net>
> > ---
> > This implements the spec change at
> > https://lists.sr.ht/~sircmpwn/hare-dev/patches/56767

[PATCH harec v3] fix branching expression result type calculation a day ago

From Bor Grošelj Simić to ~sircmpwn/hare-dev

This is essentially the same change as 56f9fa50, but for match, if and
compound expressions instead of switch. The reasoning behind this change
is provided in the accompanying spec commit.

This commit makes harec comply with the new spec and ensures the change
does not introduce problems in gen.

Breaking-Change: language
Signed-off-by: Bor Grošelj Simić <bgs@turminal.net>
---
v2 -> v3: revert to v1
Those changes were in fact in part of the patch on purpose.

 src/check.c            | 121 +++++++++++++++++++++++++----------------
[message trimmed]

[PATCH harec v2] fix branching expression result type calculation a day ago

From Bor Grošelj Simić to ~sircmpwn/hare-dev

This is essentially the same change as 56f9fa50, but for match, if and
compound expressions instead of switch. The reasoning behind this change
is provided in the accompanying spec commit.

This commit makes harec comply with the new spec and ensures the change
does not introduce problems in gen.

Breaking-Change: language
Signed-off-by: Bor Grošelj Simić <bgs@turminal.net>
---
v1 -> v2:
remove some changes to tests that accidentally made their way into the patch

 src/check.c            | 121 +++++++++++++++++++++++++----------------
[message trimmed]

[PATCH harec v2] check: don't autodereference append/insert value a day ago

From Bor Grošelj Simić to ~sircmpwn/hare-dev

Initial support for this (only in check) was introduced 3 years ago. Then
someone reported this aborts in gen, tracked as #809. Some time later we
fixed that, but really this should not have been introduced in the first
place.

Does not need a spec change because the spec doesn't say anything about
append/insert values at the moment.

Breaking-Change: language
References: https://todo.sr.ht/~sircmpwn/hare/809
Signed-off-by: Bor Grošelj Simić <bgs@turminal.net>
---
v1 -> v2:
drop mention of pointers from an error message as suggested by Lorenz
[message trimmed]

Re: [PATCH harec] fix branching expression result type calculation a day ago

From Bor Grošelj Simić to ~sircmpwn/hare-dev

On Fri Jan 17, 2025 at 5:17 PM CET, Lorenz (xha) wrote:
> On Fri, Jan 17, 2025 at 04:04:12AM +0100, Bor Grošelj Simić wrote:
> > This is essentially the same change as 56f9fa50, but for match, if and
> > compound expressions instead of switch. The reasoning behind this change
> > is provided in the accompanying spec commit.
> > 
> > This commit makes harec comply with the new spec and ensures the change
> > does not introduce problems in gen.
> > 
> > Breaking-Change: language
> > Signed-off-by: Bor Grošelj Simić <bgs@turminal.net>
> > ---
> > This implements the spec change at
> > https://lists.sr.ht/~sircmpwn/hare-dev/patches/56767

[PATCH hare] hare::parse: parse attributes better 2 days ago

From Bor Grošelj Simić to ~sircmpwn/hare-dev

Only allow one attribute per function, and represent lack of symbol as void,
not as an empty string.

Breaking-Change: hare::ast::, hare::unit::
Signed-off-by: Bor Grošelj Simić <bgs@turminal.net>
---
This implements the spec change that I've just sent.

 cmd/haredoc/doc/sort.ha |  2 +-
 cmd/haredoc/main.ha     | 24 ++++++++++++++++--------
 hare/ast/decl.ha        | 14 +++++++++-----
 hare/parse/decl.ha      | 26 ++++++++++++--------------
 hare/unit/process.ha    |  4 ++--
 hare/unit/scan.ha       |  2 +-
[message trimmed]

[PATCH harec] fix branching expression result type calculation 2 days ago

From Bor Grošelj Simić to ~sircmpwn/hare-dev

This is essentially the same change as 56f9fa50, but for match, if and
compound expressions instead of switch. The reasoning behind this change
is provided in the accompanying spec commit.

This commit makes harec comply with the new spec and ensures the change
does not introduce problems in gen.

Breaking-Change: language
Signed-off-by: Bor Grošelj Simić <bgs@turminal.net>
---
This implements the spec change at
https://lists.sr.ht/~sircmpwn/hare-dev/patches/56767

 src/check.c            | 121 +++++++++++++++++++++++++----------------
[message trimmed]

[PATCH harec] check: don't autodereference append/insert value 2 days ago

From Bor Grošelj Simić to ~sircmpwn/hare-dev

Initial support for this (only in check) was introduced 3 years ago. Then
someone reported this aborts in gen, tracked as #809. Some time later we
fixed that, but really this should not have been introduced in the first
place.

Breaking-Change: language
References: https://todo.sr.ht/~sircmpwn/hare/809
Signed-off-by: Bor Grošelj Simić <bgs@turminal.net>
---
 src/check.c        | 12 +-----------
 tests/19-append.ha |  4 ++--
 tests/28-insert.ha |  4 ++--
 3 files changed, 5 insertions(+), 15 deletions(-)
[message trimmed]

[PATCH hare-specification] allow at most one function attribute in the grammar 2 days ago

From Bor Grošelj Simić to ~sircmpwn/hare-dev

Signed-off-by: Bor Grošelj Simić <bgs@turminal.net>
---
 language/unit.tex | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)

diff --git a/language/unit.tex b/language/unit.tex
index 8e59a36..5bcdb7b 100644
--- a/language/unit.tex
+++ b/language/unit.tex
@@ -232,12 +232,8 @@ diagnostic message shall be printed and the translation phase shall be aborted.

\begin{grammar}
\nonterminaldef{function-declaration} \\
	\optional{\nonterminal{fndec-attrs}} \terminal{fn} \nonterminal{identifier} \nonterminal{prototype} \\
[message trimmed]

[PATCH harec] check: disallow C variadism in @init/@fini/@test 2 days ago

From Bor Grošelj Simić to ~sircmpwn/hare-dev

Breaking-Change: language
Signed-off-by: Bor Grošelj Simić <bgs@turminal.net>
---
 src/check.c              | 2 ++
 tests/34-declarations.ha | 5 +++++
 2 files changed, 7 insertions(+)

diff --git a/src/check.c b/src/check.c
index dd91dd88..eecb4470 100644
--- a/src/check.c
+++ b/src/check.c
@@ -3867,6 +3867,8 @@ check_function(struct context *ctx,
		}
		if (afndecl->prototype.params) {
[message trimmed]