~smlavine

Trackers

~smlavine/globalregularexpressionprint

Last active a month ago

~smlavine/hareimports

Last active 6 months ago

~smlavine/navipage

Last active 9 months ago

~smlavine/omnavi

Last active 11 months ago

~smlavine/tmp

Last active 11 months ago

#1 -i case-sensitive option should handle Unicode a month ago

Ticket created by ~smlavine on ~smlavine/globalregularexpressionprint

...but for now, we'll just use the ascii module to convert to/from upper/lowercase.

I don't think there is any proper external Unicode library that can do this in Hare yet, so the way we will probably want to do this is produce a hash map from these tables:

https://www.ibm.com/docs/en/i/7.2?topic=tables-unicode-lowercase-uppercase-conversion-mapping-table

https://www.ibm.com/docs/en/i/7.1?topic=tables-unicode-uppercase-lowercase-conversion-mapping-table

Since we know all of the values in advance, we could do the hashing and "putting" in advance, and hard-code an array.

#754 HAREPATH components repeat in `hare version -v` 3 months ago

Ticket created by ~smlavine on ~sircmpwn/hare

As shown by

$ hare version -v
Hare dev+f86f8229-arch

Build tags      +x86_64+linux
HAREPATH        /usr/src/hare/stdlib
                /usr/src/hare/third-party
                /usr/src/hare/stdlib
                /usr/src/hare/third-party

On Arch Linux, built from version r2658.f86f8229-1 of the AUR package.

#741 Cannot export an error type of an enum 4 months ago

Comment by ~smlavine on ~sircmpwn/hare

brocc in #hare said today that this code works on commit fcb4b5f. I tested this and it is true. One git-bisect later, I've identifed the bad commit as 8fcadc2. This helps to narrow down the scope of the problem a bit.

#741 Cannot export an error type of an enum 5 months ago

Comment by ~smlavine on ~sircmpwn/hare

I believe I've narrowed done the problem to this case in emit_type(): https://git.sr.ht/~sircmpwn/harec/tree/master/item/src/typedef.c#L301

With some print debugging I have determined that type->alias.exported is not set for foo. Therefore emit_type() returns false when called below, here: https://git.sr.ht/~sircmpwn/harec/tree/master/item/src/typedef.c#L329

Furthermore, if in my test program above, I comment out error and get(), then my debugging print statements show that type->alias.exported is set for foo. Weird!

Hopefully someone with a bit more familiarity with the codebase might be able to solve this faster than I can.

#741 Cannot export an error type of an enum 5 months ago

Ticket created by ~smlavine on ~sircmpwn/hare

With a main.ha of

use module;

export fn main() void = void;

and a module/module.ha of

export type foo = enum {
	ONE,
};

export type error = !foo;

export fn get() (void | error) = void;

attempting to compile with hare build complains:

Cannot use unexported type !module::foo in exported declaration 'module::error'
Error: harec: exited with status 1
hare build: build failed

Despite the fact that foo is in fact exported.

This works if error is not defined as an error type.

The problem is only with enums; this works if foo is defined instead as a scalar, slice, struct, or union.

#1 unqualified (i.e. ::*) imports 6 months ago

Comment by ~smlavine on ~smlavine/hareimports

Here is an example in real code of this sort of import: https://git.sr.ht/~turminal/flood/tree/master/item/main.ha#L5

#1 unqualified (i.e. ::*) imports 6 months ago

Ticket created by ~smlavine on ~smlavine/hareimports

This ticket will track progress on supporting this type of import, as described in §6.12.6 of the spec.

#714 hare.vim: Switch misindents if first line of case is a comment 6 months ago

Ticket created by ~smlavine on ~sircmpwn/hare

As shown by this example:

use fmt;
use os;

export fn main() void = {
	switch (len(os::args)) {
	case 0 =>
		// This is a test.
		fmt::print("0")!;
	case => void; // This line wants to be indented one level back
	};

	switch (len(os::args)) {
	case 2 =>
		// This is a comment, still.
		fmt::print("2")!;
		fmt::print("Still 2")!; // This line wants to be indented one level back
	case => void; // And this one too
	};
};

#619 shlex::quote: return number of bytes written 7 months ago

Comment by ~smlavine on ~sircmpwn/hare

This was fixed in c80c71f.

#37 Can't bind > to a command 7 months ago

Ticket created by ~smlavine on ~rjarry/aerc

When trying to bind > to a command, as in

> = :save<space>

aerc does not launch, printing

Failed to load config: Found '>' without '<'

Using ">" also fails with the same message.

This comes from this section in config/bindings.go.

Removing that case from the switch seems to fix the issue, but I don't know if there is any other problem that that this switch is supposed to address, except for catching malformed bindings.