~goto-engineering

Recent activity

Re: Cannot build hello world on manjaro aarch64 2 days ago

From Max to ~sircmpwn/hare-users

On Sat Aug 6, 2022 at 9:34 PM CEST, kt0f wrote:
> On Saturday, August 6th, 2022 at 6:05 PM, Max <max@gotoengineering.io> wrote:
>
>
> > On Sat Aug 6, 2022 at 6:41 PM CEST, Eyal Sawady wrote:
> >
> > > On Sat Aug 6, 2022 at 2:41 PM UTC, Max wrote:
> > >
> > > > Lol, weird. Is the name `linux` somehow special to hare?
> > >
> > > It's the name of a stdlib module. The build driver assumed that kt0f
> > > wanted to shadow that module with ~/linux, which broke things.
> >
> >

Re: Cannot build hello world on manjaro aarch64 3 days ago

From Max to ~sircmpwn/hare-users

On Sat Aug 6, 2022 at 6:41 PM CEST, Eyal Sawady wrote:
> On Sat Aug 6, 2022 at 2:41 PM UTC, Max wrote:
> > Lol, weird. Is the name `linux` somehow special to hare?
>
> It's the name of a stdlib module. The build driver assumed that kt0f
> wanted to shadow that module with ~/linux, which broke things.

And this only happens in the home directory? I just tried it in another
folder w/ an empty `linux` folder, and it worked fine.

Re: Cannot build hello world on manjaro aarch64 3 days ago

From Max to ~sircmpwn/hare-users

Lol, weird. Is the name `linux` somehow special to hare?

On Sat Aug 6, 2022 at 11:36 AM CEST, kt0f wrote:
> I figured it out! There was "linux" folder in my home dir, so hare only looked for the files there and not in /usr/src/hare/stdlib.

Re: Cannot build hello world on manjaro aarch64 3 days ago

From Max to ~sircmpwn/hare-users

On Fri Aug 5, 2022 at 8:03 PM CEST, kt0f wrote:
> Hi, I built and installed the compiler successfully, but it doesn't build hello world.
>
> [oem@manjaro-arm ~]$ cat main.ha
> use fmt;
>
> export fn main() void = {
> fmt::println("Hello world!")!;
> };
> [oem@manjaro-arm ~]$ hare run main.ha
> Error: Module linux has no Hare input files
>
> Am i doing something wrong?

Re: fzf file previews of grep results with hare 7 days ago

From Max to ~sircmpwn/hare-users

On Tue Aug 2, 2022 at 12:17 PM CEST, Jon Eskin wrote:
> Hey all, just wanted to share some stuff that somebody might find
> useful.
>
> I wrote a program that reads files and writes them to stdout with
> syntax highlighting that supports Hare
>
> https://jeskin.net/blog/clp/
>
> I also made a blog post on how you can use it with grep & fzf to get
> file previews for your grep results
>
> https://jeskin.net/blog/grep-fzf-clp/

Re: Is there any plan to support thread? 20 days ago

From Max to ~sircmpwn/hare-users

On Wed Jul 20, 2022 at 1:29 PM CEST, Drew DeVault wrote:
> On Wed Jul 20, 2022 at 1:26 PM CEST, Max wrote:
> > Can I ask why not? Seems like Hare would be a great fit for at least
> > C-style threads.
>
> Threads make a problem way more complicated and their use-cases are
> generally better served by event loops or multiprocessing.

I think I know what an event loop is (from game programming). E.g. each
loop decide which of multiple tasks to chew on for a little bit?

What is multiprocessing?

Re: Is there any plan to support thread? 20 days ago

From Max to ~sircmpwn/hare-users

On Wed Jul 20, 2022 at 10:22 AM CEST, Drew DeVault wrote:
> There are no plans to support re-entrancy in the standard library. But
> nothing stops you from linking to pthread and starting a new thread
> yourself.

Can I ask why not? Seems like Hare would be a great fit for at least
C-style threads.

Re: Switch Puzzling 2 months ago

From Max to ~sircmpwn/hare-users

On Fri May 13, 2022 at 2:30 PM CEST, Drew DeVault wrote:
> On Fri May 13, 2022 at 2:27 PM CEST, John Gabriele wrote:
> > BTW, do users file bug reports in sourcehut? I just went to
> > <https://git.sr.ht/~sircmpwn/harec> to see if there is a bug report
> > on this, and I see tabs for "summary", "tree", "log", and "refs", ... but
> > where's the one for todo (or bug reports, issues, whatev)?
>
> SourceHut's bug trackers are not associated directly with git
> repositories. You can find the project hub here:

This has always confused me in Sourcehut. I have to go up all the way to `todo`, then back down to find the issue tracker in question. Maybe issue trackers could be linked to repos? Or at least a link to the tracker provided at the top of the repo description?

Re: Return array or slice from fn? 3 months ago

From Max to ~sircmpwn/hare-users

On Fri May 6, 2022 at 7:39 PM CEST, Eyal Sawady wrote:
> On Fri May 6, 2022 at 11:41 AM UTC, Max wrote:
> > PS: I have a PCRE regex. I don't suppose I can make that work with
> > Hare's regex module? Seems that one is POSIX ERE, and I'm getting
> > errors. I don't know regexes well enough to translate from one to the
> > other, is there an easy to way to convert them?
>
> PCRE is Turing-complete, while ERE is regular. Basically, what this
> means is that there are certain computations you can perform with a PCRE
> which are impossible with an ERE.[0] This makes converting an arbitrary
> PCRE to an ERE impossible. This likely doesn't apply to your regex in
> particular, but it does mean that automated conversion tools almost
> certainly don't exist.
>

Re: Return array or slice from fn? 3 months ago

From Max to ~sircmpwn/hare-users

On Fri May 6, 2022 at 2:24 PM CEST, Drew DeVault wrote:
> On Fri May 6, 2022 at 2:22 PM CEST, Max wrote:
> > Next question came up immediately: how can I assert my []str return?
> >
> > @test fn test() void = {
> > 	assert(tokenize("(+ 1 2 3)") == ["(", "+", "1", "2", "3", ")"]);
> > };
> > -%<-
> > Do I have to loop through them individually?
>
> Yes. You cannot directly compare slices. You should do something like
> this:
>
> for (let i = 0z; i < len(a); i += 1) {