~smlavine

~smlavine/colat-devel

Last active 2 months ago

~smlavine/colat-announce

Last active 2 months ago

~smlavine/err-announce

Last active 10 months ago

~smlavine/bf-announce

Last active 11 months ago

~smlavine/bf-devel

Last active 11 months ago

~smlavine/globalregularexpressionprint-devel

Last active 11 months ago

~smlavine/globalregularexpressionprint-announce

Last active 11 months ago

~smlavine/smlss-announce

Last active 1 year, 2 months ago

~smlavine/smlss

Last active 1 year, 2 months ago

~smlavine/hareimports-dev

Last active 1 year, 3 months ago
View more

Recent activity

Re: [RFC v2] @compiler and #third-party 23 days ago

From Sebastian LaVine to ~sircmpwn/hare-rfc

On Fri Sep 1, 2023 at 7:17 PM EDT, Ember Sawady wrote:
> On Fri Sep 1, 2023 at 5:06 PM UTC, Drew DeVault wrote:
> > The following changes will be introduced as part of this work:
> >
> > Changed expressions:
> > 	offset(expr) => @offset(expr)
> > 	size(type) => @size(type)
> >
> > New expressions:
> > 	@sizeof(expr)	return size of expression result type
> > 	@align(type)	return alignment of type
> > 	@alignof(expr)	return aligment of expression result type
> > 	@capacity(expr)	return capacity of slice
>

Re: Notice: *void has changed to *opaque a month ago

From Sebastian LaVine to ~sircmpwn/hare-users

On Mon Aug 21, 2023 at 9:42 AM EDT, Ember Sawady wrote:
> Pointers and slices of zero-size types are no longer allowed. The role
> of generic pointers and slices has been replaced by "opaque": For
> example, here is sort::sort's new prototype:
>
> fn sort::sort(items: []opaque, itemsz: size, cmp: *cmpfunc) void;
> type cmpfunc = fn(a: const *opaque, b: const *opaque) int;
>
> Running the following command in your project root should entirely
> handle the migration:
>
> find . -name '*.ha' -exec sed -i -E 's/(\*|\[\])(const )?void/\1\2opaque/g' {} +

But any other time that void was used, it should still be used, right?

Re: How Hare manage module? a month ago

From Sebastian LaVine to ~sircmpwn/hare-users

Just run `hare build`.
-- 
Sebastian LaVine | https://smlavine.com

Re: How Hare manage module? a month ago

From Sebastian LaVine to ~sircmpwn/hare-users

On Fri Aug 11, 2023 at 8:48 PM EDT, Pablo Ariza wrote:
> On Fri Aug 11, 2023 at 6:57 PM -05, Sebastian LaVine wrote:
> > I think you basically understand how modules in Hare work; they are
> > based on directory structure. Would you mind sharing your code so that
> > we can help identify the issue?
>
> Here is the code: https://git.sr.ht/~essoca/hlox

Thanks.

I see two problems with your code (line numbers as of commit 64b110a):

First (and not related to your main problem), is:

Re: How Hare manage module? a month ago

From Sebastian LaVine to ~sircmpwn/hare-users

On Fri Aug 11, 2023 at 7:35 PM EDT, Pablo Ariza wrote:
> Hi everyone
>
> I am starting to work on a project and I have some doubts about modules. 
> In the begining the structure was
>
> 	- cmd/hlox/
> 	- scanner/
> 	- token/
>
> But when I see that the folders only have one file, I decide to refactor 
> to:
>
> 	- cmd/main.ha

[PATCH hare] io: make io::writeall take const []u8 a month ago

From Sebastian LaVine to ~sircmpwn/hare-dev

This matches the signature of io::write.

Signed-off-by: Sebastian LaVine <mail@smlavine.com>
---
 io/util.ha | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/io/util.ha b/io/util.ha
index 88151440..03c3f363 100644
--- a/io/util.ha
+++ b/io/util.ha
@@ -25,7 +25,7 @@ export fn readall(in: handle, buf: []u8) (size | EOF | error) = {
// Writes an entire buffer, perhaps issuing several [[write]] calls to do so.
// Aborts on errors after partial writes. Hence it should only be used if it is
[message trimmed]

Re: Only single source for a project? a month ago

From Sebastian LaVine to ~sircmpwn/sr.ht-discuss

On Wed Aug 9, 2023 at 9:26 AM EDT, Jiri Vlasak wrote:
> I am curious, how is that done that writefreesoftware.org project [1]
> has single source [2] redirected to directly?

That's the case for all projects with only one repository source. For
your own projects, though, you always see the list so that you can
configure more repos to add.

Recommended TOTP application is unmaintained a month ago

From Sebastian LaVine to ~sircmpwn/sr.ht-discuss

The recommended TOTP application that is linked here[0], andOTP, is
unmaintained[1][2]. The F-Droid link 404s.

Are there any suggestions for an alternative app to use?

[0]: https://meta.sr.ht/security/totp/enable
[1]: https://f-droid.org/en/packages/org.shadowice.flocke.andotp/
[2]: https://github.com/andOTP/andOTP

strio, bufio, memio changes a month ago

From Sebastian LaVine to ~sircmpwn/hare-users

Just letting folks know that due to recent work by autumnull with strio,
bufio, and memio[0], you might need to update your Hare programs if you
use bufio, and definitely if you use strio. strio functionality has been
moved to memio, and some assorted changes were made to bufio.

[0]: https://git.sr.ht/~sircmpwn/hare/commit/ed762a2

After I pulled the commit and `make install`'d on my system I had an
odd error involving bufio and double declaration. `make uninstall`ing
first and then `make install` fixed that for me. I also still had the
strio source installed after the commit until the `make uninstall`.

Re: [PATCH hare] io: Change interface types to accept handle instead of *stream a month ago

From Sebastian LaVine to ~sircmpwn/hare-dev

On Wed Aug 2, 2023 at 11:02 AM EDT, Drew DeVault wrote:
> On Wed Aug 2, 2023 at 4:59 PM CEST, Sebastian LaVine wrote:
> > Is there a simpler way to fix the problem that io::{close, copy, read,
> > seek, write} can't be used as io::{closer, copier, reader, seeker,
> > writer}?
>
> Can you explain your use-case for this functionality?


I am writing a simple macro processer that I can use with my blog. I
read text from stdin, bytes::cut it on delimiters `` and '', process it,
and move on past the delimiter. I loop until the text has all been
processed, switching the delimiter I'm using on each loop.