Installing nim was easy!

91 views
Skip to first unread message

Edward K. Ream

unread,
Jan 1, 2024, 10:27:25 AM1/1/24
to leo-editor
Apparently the malware warnings are spurious: See nim issue #23151.

That said, there is no way I would open the .zip file without first disinfecting it.

The Nim install page said to run finish.exe after unpacking the .zip file. But that file does not exist. Happily, earlier I had found the Nim Package Directory.

I was looking for a python tokenizer, but I noticed the Nim package.

To complete the install I just ran nimble install nim from Nim's bin directory. Everything just worked!

Perhaps I got lucky: I had already installed gcc (and added gcc.cmd) so nimble could invoke gcc even with gcc missing from my Windows path.

Summary

Use nimble install nim to complete the install.

I am eager to start playing with Nim!

Edward

Thomas Passin

unread,
Jan 1, 2024, 12:05:00 PM1/1/24
to leo-editor
How did you install gcc?  Using minGW?

jkn

unread,
Jan 1, 2024, 1:49:40 PM1/1/24
to leo-editor
"nim is both case- and underscore-insensitive"

I had forgotten this when reading about nim some time ago. I know that
first appearances can be deceptive, but hmm...

Thomas Passin

unread,
Jan 1, 2024, 2:10:13 PM1/1/24
to leo-editor
I went a different route but didn't get nimble.  I installed minGW from the Nim Github site, then cloned the Nim Github and followed the instructions as given on Nim.  This gave me Nim 1.9.1.  However, the build script also tries to build koch, and Windows Defender thinks it's malware and deletes it.  That might be the source of the warning for the zip of the binary distro.  According to the instructions, kock is used to further upgrade Nim.  So that won't work.

Also, this distro doesn't build nimble.  I'll go after that next.

On Monday, January 1, 2024 at 10:27:25 AM UTC-5 Edward K. Ream wrote:

Thomas Passin

unread,
Jan 1, 2024, 3:12:29 PM1/1/24
to leo-editor
In the end, I was able to get the latest version of nim (2.0.2), nimble, and koch.  Recall that Windows defender (and various browsers) are not allowing the standard zip file from the Nim site to be downloaded.  When I compiled Nim another way, the koch executable was deleted by Defender right after it was compiled, and the result didn't include nimble.  Here's what worked in the end:

I ran a Linux VM and used it to download the Nim zip *for Windows* from the Nim site. I unzipped it *on the Linux VM*.  I copied the unzipped tree from the VM to my Windows drive - I have a shared directory that lets me do this.

Then (on Windows) I ran the build-all script and it built the Nim 2.02 compiler.  When it went on to try to build the koch executable, Defender deleted it as before.  However, I was able to run the Nim compiler to create a nimble executable.  Then I was able to run nimble install nim, which rebuilt nim but also succeeded in building koch, which this time Defender did not delete.

Apparently the spurious virus warning applies to the version of koch compiled by an earlier version of Nim, but not by the latest  version.

Remember, you have to have installed the gcc compiler package, which you can get from the Nim GitHub site in the minGW distro.  The reason is that earlier versions of Nim were compiled from c code (or maybe c++, I'm not sure).  The newer versions can be compiled by the Nim compiler itself.  You have to have a working Nim compiler before it can be used to build later versions of itself, and that's where the gcc compiler comes in.

Edward K. Ream

unread,
Jan 2, 2024, 5:35:25 AM1/2/24
to leo-editor
On Monday, January 1, 2024 at 11:05:00 AM UTC-6 Thomas wrote:
How did you install gcc?  Using minGW?

where gcc reports  C:\msys64\ucrt64\bin\gcc.exe, so the answer was probably msys2.

Iirc, I installed this package for use by a music engraving package, maybe LilyPond.

As usual, I did not alter the Windows path. Instead, I created gcc.cmd, which is on the path.

Edward

Thomas Passin

unread,
Jan 2, 2024, 7:20:53 AM1/2/24
to leo-editor
So did I, but at one point my distro called "gcc.exe", so I had to add it to the path.
Reply all
Reply to author
Forward
0 new messages