Recent activity

[PATCH himitsu] Makefile: add CMDS and DOCS to install dependency 2 months ago

From kurth4cker to ~sircmpwn/himitsu-devel

---
Fixes build issues like himitsu-firefox: https://builds.sr.ht/~sircmpwn/job/1277921#task-himitsu

 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index b972d4f..daaad4f 100644
--- a/Makefile
+++ b/Makefile
@@ -51,7 +51,7 @@ himitsu.7: docs/himitsu.7.scd
clean:
	rm -f himitsud himitsu-store hiq hiprompt-tty $(DOCS)

[message trimmed]

[PATCH hautils] Makefile: fix targets 4 months ago

From kurth4cker to ~sircmpwn/hare-dev

.gitignore: fix for new utils

Signed-off-by: kurth4cker <kurth4cker@gmail.com>
---
 .gitignore |  3 +++
 Makefile   | 10 ++++++----
 2 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/.gitignore b/.gitignore
index 9390ac9..aeef5da 100644
--- a/.gitignore
+++ b/.gitignore
@@ -9,10 +9,13 @@ ls
nl
[message trimmed]

[PATCH hare-json] encoding::json: fix usage of strconv::stou32b 5 months ago

From kurth4cker to ~sircmpwn/hare-dev

Signed-off-by: kurth4cker <kurth4cker@gmail.com>
---
 encoding/json/lex.ha | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/encoding/json/lex.ha b/encoding/json/lex.ha
index df3373e..97a05e0 100644
--- a/encoding/json/lex.ha
+++ b/encoding/json/lex.ha
@@ -314,7 +314,7 @@ fn scan_escape(lex: *lexer) (rune | error) = {
		case =>
			return lex.loc: invalid;
		};
		match (strconv::stou32b(s, strconv::base::HEX)) {
[message trimmed]

Re: How to append bytes to a file? 5 months ago

From to ~sircmpwn/hare-users

> If someone knows why this happens, thanks for your answer!

WRONLY, RDONLY and RDWR are three different open modes for each other. If you
don't have WRONLY or RDWR flag on a file, you cannot write to it.

But it seems you cannot append data with only WRONLY flag. By default it
discards old content. You should use both of WRONLY and APPEND like this:

```
use os;
use io;
use fs;
use fmt;
use strings;

Re: Test a function that prints to stdout 5 months ago

From to ~sircmpwn/hare-users

On Sat, Apr 13, 2024 at 08:31:43AM +0200, Max Schillinger wrote:
> @test fn print() void = {
> 	let buf = memio::dynamic();
> 	os::stdout = buf;
> 	print("hello");
> 	assert(memio::string(&buf)! == "hello");
> };

os::stdout is a io::handle. And io::handle is a tagged union like:

	type handle = (file | *stream)

so if you assign a stream to handle, you should pass it via address. Like this:

Re: [PATCH entr] language changes and switch expression fix 5 months ago

From to ~torresjrjr/public-inbox

On Fri, Apr 12, 2024 at 09:54:18AM +0000, Byron Torres wrote:
> On Fri Apr 12, 2024 at 4:47 AM UTC,  wrote:
> > On Thu, Apr 11, 2024 at 09:39:46PM +0100, Byron Torres wrote:
> > > As you can see, this is quite a dead project,
> > > but thanks for the patch nonetheless.
> >
> > Yes I see. I'm just a newbie and excited about both email-based contributing
> > and hare itself. So I'm spending time on both of them. But thanks for apply
> > the patch.
> 
> Great.
> 
> > Next time I can try other projects like I'm actively using or interested.
> 

Re: [PATCH entr] language changes and switch expression fix 5 months ago

From to ~torresjrjr/public-inbox

On Thu, Apr 11, 2024 at 09:39:46PM +0100, Byron Torres wrote:
> As you can see, this is quite a dead project,
> but thanks for the patch nonetheless.

Yes I see. I'm just a newbie and excited about both email-based contributing
and hare itself. So I'm spending time on both of them. But thanks for apply
the patch.

Next time I can try other projects like I'm actively using or interested.

Re: Question about const 5 months ago

From to ~sircmpwn/hare-users

On Thu, Apr 11, 2024 at 03:40:50PM +0200, laburnumT wrote:
> But I have some code where this does not appear to be enforced. Is this
> functionality that is still missing from the compiler or am I misreading
> the tutorial, because the following code will happily output 11:
> 
> ```
> use fmt;
> export fn main() void = {
> 	const i = 10;
> 	i += 1;
> 	fmt::println(i)!;
> };
> ```
> 

[PATCH entr] language changes and switch expression fix 5 months ago

From kurth4cker to ~torresjrjr/public-inbox

* for-each change
* never type
* switch expression should handle all possibilities

Signed-off-by: kurth4cker <kurth4cker@gmail.com>
---
 entr.ha | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/entr.ha b/entr.ha
index f35bc74..4f3c2ff 100644
--- a/entr.ha
+++ b/entr.ha
@@ -21,8 +21,7 @@ export fn main() void = {
[message trimmed]

[PATCH himitsu v2] Makefile: fix hiprompt-tty cleaning and uninstallation 5 months ago

From kurth4cker to ~sircmpwn/himitsu-devel

---
Previous patch wrongly cleans himitsu-tty instead of hiprompt-tty. Sorry
for that.

 Makefile | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index fcaf6fe..3db4e87 100644
--- a/Makefile
+++ b/Makefile
@@ -62,7 +62,7 @@ himitsu.7: docs/himitsu.7.scd
	$(SCDOC) <docs/himitsu.7.scd >$@

[message trimmed]