~yerinalexey

TODO

~yerinalexey/public-inbox

Last active 26 days ago

~yerinalexey/hare-sql

Last active 10 months ago
View more

Recent activity

[PATCH hare] os+linux: Match resolve_flag values with OS flag values 8 days ago

From Alexey Yerin to ~sircmpwn/hare-dev

Signed-off-by: Alexey Yerin <yyp@disroot.org>
---

 os/+linux/dirfdfs.ha | 26 +++++++-------------------
 1 file changed, 7 insertions(+), 19 deletions(-)

diff --git a/os/+linux/dirfdfs.ha b/os/+linux/dirfdfs.ha
index b748b1ef..944a6cf9 100644
--- a/os/+linux/dirfdfs.ha
+++ b/os/+linux/dirfdfs.ha
@@ -17,27 +17,27 @@ use types::c;
//
// Note that on Linux, specifying BENEATH or IN_ROOT will also disable magic
// symlinks.
[message trimmed]

Re: [PATCH hare] os+linux: Fix resolve_flag values 8 days ago

From Alexey Yerin to ~sircmpwn/hare-dev

On Fri Apr 12, 2024 at 21:52 +0200, Bor Grošelj Simić wrote:
> On Fri Apr 12, 2024 at 9:00 PM CEST, Alexey Yerin wrote:
> > On Fri Apr 12, 2024 at 20:57 +0200, Bor Grošelj Simić wrote:
> > > Should these values match the values defined in linux/openat2.h?
> > > I can see arguments against making them match, but then we should document
> > > that in the definition of this type.
> >
> >
> > Those flags are converted to Linux-specific flags in _fs_open so they don't
> > have to match.
>
> Yeah, I'm just asking you to document that, if you believe it is the correct
> way.

[PATCH hare] cmd/haredoc: Correctly display HTML module references 8 days ago

From Alexey Yerin to ~sircmpwn/hare-dev

Signed-off-by: Alexey Yerin <yyp@disroot.org>
---
This supersedes Vlad's patch.

P.S. That code is a bit of a complete mess

 cmd/haredoc/doc/html.ha | 16 +++++++++++++---
 1 file changed, 13 insertions(+), 3 deletions(-)

diff --git a/cmd/haredoc/doc/html.ha b/cmd/haredoc/doc/html.ha
index d0aaed81..75962587 100644
--- a/cmd/haredoc/doc/html.ha
+++ b/cmd/haredoc/doc/html.ha
@@ -235,7 +235,7 @@ fn details(ctx: *context, decl: *ast::decl) (void | error) = {
[message trimmed]

Re: [PATCH hare] os+linux: Fix resolve_flag values 8 days ago

From Alexey Yerin to ~sircmpwn/hare-dev

On Fri Apr 12, 2024 at 20:57 +0200, Bor Grošelj Simić wrote:
> Should these values match the values defined in linux/openat2.h?
> I can see arguments against making them match, but then we should document
> that in the definition of this type.


Those flags are converted to Linux-specific flags in _fs_open so they don't
have to match.

Re: Unbounded array access bug 9 days ago

From Alexey Yerin to ~sircmpwn/hare-users

> > As you can see in this example program
> > https://paste.sr.ht/~shurizzle/70eb29face6d5bb151f63fe02268758c7dd7d091
> > access to elements in an unbounded array is broken.
> > I think it's broken because it used to work yesterday and, as far as I know,
> > that's the way to avoid bounds checking on arrays/slices.
>
> I looked into this issue and it seems to be a bug in our backend, QBE. A rewrite
> of one of its major components that landed a few days ago appears to be
> responsible.
>
> As a workaround, you can roll back QBE to v1.2 for now.

This is fixed now, you can pull the latest version of QBE to confirm it.

Re: Unbounded array access bug 10 days ago

From Alexey Yerin to ~sircmpwn/hare-users

> As you can see in this example program
> https://paste.sr.ht/~shurizzle/70eb29face6d5bb151f63fe02268758c7dd7d091
> access to elements in an unbounded array is broken.
> I think it's broken because it used to work yesterday and, as far as I know,
> that's the way to avoid bounds checking on arrays/slices.

I looked into this issue and it seems to be a bug in our backend, QBE. A rewrite
of one of its major components that landed a few days ago appears to be
responsible.

As a workaround, you can roll back QBE to v1.2 for now.

[PATCH hare v2] strconv: Merge functions with their -b versions 10 days ago

From Alexey Yerin to ~sircmpwn/hare-dev

This is a breaking change: all calls to stoub and similar functions should drop
the -b suffix.

Signed-off-by: Alexey Yerin <yyp@disroot.org>
---
v1 -> v2: Remove "If the base is not specified, base 10 is used" from
          documentation as this is already clear from the prototype
 encoding/hex/hex.ha  |   4 +-
 fmt/print.ha         |   7 ++-
 format/tar/reader.ha |   4 +-
 hare/lex/lex.ha      |   6 +--
 net/ip/ip.ha         |   2 +-
 net/uri/parse.ha     |   2 +-
 strconv/itos.ha      |  93 +++++++++++++--------------------
[message trimmed]

[PATCH hare] all: Use optional parameters for flags 10 days ago

From Alexey Yerin to ~sircmpwn/hare-dev

Signed-off-by: Alexey Yerin <yyp@disroot.org>
---
 fnmatch/+test.ha       |  6 ++++-
 fnmatch/fnmatch.ha     | 12 +++------
 fs/fs.ha               | 34 ++++++++++++------------
 fs/types.ha            |  8 +++---
 glob/glob.ha           |  8 ++----
 hare/lex/+test.ha      |  8 +++---
 hare/lex/lex.ha        | 12 ++++-----
 net/+freebsd.ha        | 11 +++-----
 net/+linux.ha          | 11 +++-----
 net/+openbsd.ha        | 11 +++-----
 net/tcp/listener.ha    |  4 +--
 net/unix/listener.ha   |  4 +--
[message trimmed]

Re: [PATCH hare] haredoc: fix symbol links 11 days ago

From Alexey Yerin to ~sircmpwn/hare-dev

On Tue Apr 9, 2024 at 17:02 -0400, Sebastian wrote:
> On Tue Apr 9, 2024 at 4:55 PM EDT, Alexey Yerin wrote:
> > > diff --git a/cmd/haredoc/doc/html.ha b/cmd/haredoc/doc/html.ha
> > > index d0aaed81..7d98cd37 100644
> > > --- a/cmd/haredoc/doc/html.ha
> > > +++ b/cmd/haredoc/doc/html.ha
> > > @@ -265,7 +265,7 @@ fn htmlref(ctx: *context, ref: ast::ident) (void | error) = {
> > >  	case symkind::SYMBOL =>
> > >  		let ipath = strings::join("/", id[..len(id) - 1]...);
> > >  		defer free(ipath);
> > > -		fmt::fprintf(ctx.out, "<a href='/{}#{}' class='ref'>{}</a>",
> > > +		fmt::fprintf(ctx.out, "<a href='/{}/{}' class='ref'>{}</a>",
> > >  			ipath, id[len(id) - 1], ident)?;
> >

Re: [PATCH hare] haredoc: fix symbol links 11 days ago

From Alexey Yerin to ~sircmpwn/hare-dev

On Tue Apr 9, 2024 at 21:02 +0100, Vlad-Stefan Harbuz wrote:
> For example, a reference to [[time::date::]] previously pointed to
> /time#date, but should point to /time/date.

I can't reproduce it. Both [[time::date]] and [[time::date::]] produce
references to /time/date.

> diff --git a/cmd/haredoc/doc/html.ha b/cmd/haredoc/doc/html.ha
> index d0aaed81..7d98cd37 100644
> --- a/cmd/haredoc/doc/html.ha
> +++ b/cmd/haredoc/doc/html.ha
> @@ -265,7 +265,7 @@ fn htmlref(ctx: *context, ref: ast::ident) (void | error) = {
>  	case symkind::SYMBOL =>
>  		let ipath = strings::join("/", id[..len(id) - 1]...);