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.

On Monday, January 1, 2024 at 2:10:13 PM UTC-5 Thomas Passin wrote:

> 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 
> <https://github.com/nim-lang/nim?tab=readme-ov-file#compiling>.  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:
>
>> Apparently the malware warnings are spurious: See nim issue #23151 
>> <https://github.com/nim-lang/Nim/issues/23151>.
>>
>> That said, there is no way I would open the .zip file without first 
>> disinfecting it.
>>
>> The Nim install page <https://nim-lang.org/install_windows.html>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 
>> <https://nimble.directory/>.
>>
>> I was looking for a python tokenizer, but I noticed the Nim package 
>> <https://nimble.directory/pkg/nim>.
>>
>> 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
>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/5109c22b-2c55-47e5-a164-9bdddbda064cn%40googlegroups.com.

Reply via email to