From Coutinho de Souza to ~sircmpwn/hare-users
Thanks for the clarification!, Luna
From Coutinho de Souza to ~sircmpwn/hare-users
I'm trying to understand why in the case below `match` is unable to treat `handle` as an `io::file` while being capable of treating it as an `*io::stream`. Maybe there something to do with the fact that, on linux, `io::file == int` while io::stream is a struct? ```hare use fmt; use io; use os; fn cb(user: nullable *opaque) void = { assert(user is *opaque);
From Coutinho de Souza to ~rjarry/aerc-discuss
What is used as the user for the outgoing key --- i. e., smtp --- in accounts.conf? Sometimes providers allow sending from an alias, that is, setting the alias as the From header, but still needing the underlying email to be the smtp user.
From Coutinho de Souza to ~sircmpwn/hare-users
Good to known, Lorenz! It's much easier now to deal with heap allocated nullable pointers.
From Coutinho de Souza to ~sircmpwn/hare-users
I've being trying to interop Hare with libmpv[0], but I'm unable to generate a C NULL terminated char** --- { "command", "arg", NULL } --- from a Hare []str. That is needed for the mpv_command function --- declaration [1] and implementation[2] in libmpv ---, which takes a mpv_handle* --- implemented in Hare as `type handle = opaque` in the mpv Hare module --- and a char**. I've tried the following, but with no success: ```hare @symbol("mpv_command") fn _command(ctx: *handle, args: *opaque) int;
From Coutinho de Souza to ~sircmpwn/hare-users
I see.
From Coutinho de Souza to ~sircmpwn/hare-users
I was looking around the mailing for ways of allocating and deallocating memory on tagged unions when I found this thread: What's the correct way to allocate `([][]int | void)` on the heap[0]. In it, there's an example in which match is used on a reference[1]. Here's a minimal reproduction of it: ```hare export fn main() void = { let foo: (void | []int) = []; assert(len(foo as []int) == 0); match(&foo) { case let foo: *[]int =>
From Coutinho de Souza to ~sircmpwn/hare-users
> But for my current project this fails: > > $ hare build -o hare.o -lX11 -lGLESv2 -lEGL -lm -lvorbisfile -lasound > 3/4 tasks completed (75%) > /usr/bin/ld: /home/max/.cache/hare/usr/local/src/hare/stdlib/rt/d7c626663d880db7bbe2f80f47acaeb71d8caad14c59b6ca1bf535177bd100bb.o: in function `main': > /home/max/repos/TinyTicTacToe-Hare/app/src/main/jni/rt/+linux/start+libc.ha:20:(.text.main+0x2d): undefined reference to `.main' This hare call is not utilizing the hare.o object file, since it's being treated as the -o's option argument. Is it a typo?
From Coutinho de Souza to ~sircmpwn/hare-dev
Had forgotten to add hare's repo to the subject. Now the builds trigger and succeed.
From Coutinho de Souza to ~sircmpwn/hare-dev
From: Coutinho de Souza <dev@onemoresuza.com> --- scripts/version | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/scripts/version b/scripts/version index 64a75a76..16a1025f 100755 --- a/scripts/version +++ b/scripts/version @@ -1,22 +1,16 @@ #!/bin/sh # Distro packagers may set the LOCALVER variable to add their distribution to # the version, e.g. 1.0-alpine. [message trimmed]