Nim programming language on Haiku

Good day,

So I’ve been a bit out these weeks, as free time got shorter and shorter. I was looking for some language as “easy” as Python on the eyes, that wouldn’t take me years to understand. Thought of Rust, but damn… that is for the pros not for an amateur wannabe like myself. So by accident I found Nim. To me it looks nice enough, at least on the eyes, with a clean sintax and whatever. So decided to give it a try on a test OS I have around.

Then I thought that it might be also possible to run it on Haiku, so what the heck, here it is:

This is the typical Hello World example. I built Nim from source with SUCCESS exit code and used the Nim compiler to run the helloworld.nim example which is a single line:

echo “hello world”

I still have to add the binary to the path and try other things, but at least, the first attempt worked. I’ll try to do something more serious and add the binary to the path, or move the binary to the /bin dir. Of course, it does not install to the Haiku /bin directory.

Regards,
RR

8 Likes

Nice! Would love to have it in the depot.

1 Like

Haiku Depot Server :thinking: it’s already there…

4 Likes

Even if HDS version is 1.6.0. it is indeed certainly enough to discover.
According Nim website current is version 1.6.4.
Thanks to @roiredxsoto, we know that this new version compiles and seems to work.
I guess that after few more tests, he will update the recipe.

Good day,

To be honest, I didn’t search Haiku Depot for it :sweat_smile:. I searched the forums and found no topic on this matter, so I posted.

Regarding updating the recipe… mmmmmm… if we talk recipes in a kitchen, with stoves, pots, meat, vegetables… I can do. Talking about Haikuporter recipes, I’m stilll quite an ignorant on that topic. I’ll have to take a look at the actual recipe and see how to change it to use the latest release (once I understand what a recipe does… :nerd_face: studying needed here). Then again, still some testing needed. I have to test nimble too and some more complex code.

Will see what I can do. Though it might take some time. :clock2: :clock130:
Regards,
RR

2 Likes

It’s time you get in the saddle there :wink: :clock2: :clock130:

EDITstrike 32bit, no node_js there

1 Like

why not yab? Or you want to make something crosscompiled?

1 Like

Yab is an interpreter, Nim is a compiler.

1 Like

Speaking of yab, the API doc app keeps crashing for me on R1B3 64-bit.

Now that is an interesting language. Looking at the documentation, the compiler has a C++ back-end, and can make calls to a C++ API.
Could it realistically be a simpler language for people wanting to do GUI programming without going through C++?

Will have to test it :slight_smile:

2 Likes

Hello dcatt, i found the mistake from my side. I will update the program as soon as possible. i think today.

On yab.besly.de you can find also the documentation.

Regards lorglas

1 Like

Good day,

Well, that is one of the reasons for leaning towards Nim too. Theoretically can use the C++ API, though I haven’t done much research on that yet. To me this seems more feasible than porting the whole API to Python… I might be wrong on that though :thinking: Time will tell…

Yep, it’s a good chance to get dirty with recipes. Could help with the Cuda one too. :laughing:

Well, actually I like the clean syntax of Nim, and the fact that it runs everywhere, Windows, Linux, BSD, Mac, Haiku… though I don’t care at all about Win and Mac. And for what I’ve read, depending on how you code, can get quite high processing speeds like C/C++ without the syntax “complexity” (for me) of those.
We will see what comes out of this “accident”.

Regards,
RR

1 Like

I already replied to your work on your repository (some work I done is on github (see below), this is already an older version I think and only for 32bit (based on the work you did for 64bit), still waiting on you there) :stuck_out_tongue:

Good day,

Damn!!! I just went through the recipe for the prior Nim release… :sweat_smile: and… I barely understand a couple of things!.. Well, let’s see if during Eastern I have time to study it and update it for the next rev. I didn’t found anything there about “nimble” so indeed I need to study and understand what that recipe does. :nerd_face:

Will try to update progress. Please, be patient.

Regards,
RR

2 Likes