Cross-compiling for M1 mac from non-M1 mac

2023-01-28 Thread mratsim
compile "lib" & bindingsName & ".dylib.arm", "--cpu:arm64 -l:'-target arm64-apple-macos11' -t:'-target arm64-apple-macos11'" compile "lib" & bindingsName & ".dylib.x64", "--cpu:amd64 -l:'-t

Numerical libraries for data science

2023-01-28 Thread haghighat
Hi, I had a look on Tensor class from scinim, which is very close to Numpy in Python. I tried to use Nimpy with Tensor class and called the exported function with numpy class. I receive memory segmentation error. Do you have perhaps a code snippet how you export things in Nim side via Nimpy an

Cross-compiling for M1 mac from non-M1 mac

2023-01-28 Thread sls1005
I don't use Mac but I've successfully done it for fedora/arm64. At least I think so. Basically you'll need to cross-compile the compiler (from Nim) into C sources (by specifying the `--os` and `--cpu` options), then move the generated C files to the target machine, using a C compiler installed

Accessing the generated C in comp time

2023-01-28 Thread jmgomez
Im working on supporting virtual functions in NimForUE and I have a POC working fine. The issue that I have is that I need to generate all the cpp fields by hand, I was wondering if there is a way to reuse the compiler work (maybe via the compiler API) so I dont have to rewrite all of it, especi

Cross-compiling for M1 mac from non-M1 mac

2023-01-28 Thread jmgomez
In NimForUE we compile one of the dynlibs for x86 and ARM and then we unify it with lipo. Didnt test it from x86 but it works fine from a M1. Here is the code in case you want to take a look:

Why I stopped programming in Nim

2023-01-28 Thread pietroppeter
Hi and welcome to the forum (although I guess the message looks more like a bye-bye 😥)! Unfortunately this is a known issue that presents occasionally and where we have struggled to find a solution. I do not think we were able to ever get in contact with anti malware software, the most decisive

Strange error: system module needs: nimAsgnStrV2

2023-01-28 Thread Araq
Inconsistent config or `mm` switches? I've never seen this error before though. Maybe reinstall Nim and ensure no outdated stdlib is picked up but that too I've never seen before...

Cross-compiling for M1 mac from non-M1 mac

2023-01-28 Thread drkameleon
So, that's the case. Basically, the main use scenario is having a Github workflow compile binaries for the M1. (I'm mainly using a Mac, and as a matter of fact I also have an M1-powered one around, but I would totally love it if I was able to automate the whole process. And given that GitHub's

Strange error: system module needs: nimAsgnStrV2

2023-01-28 Thread RodSteward
I have a strange error that seems to be a compiler bug. I have the following code in its own module, let's say stringrecord.nim. type StringRecord* {.importcpp, header: "StringRecord.h".} = object size*: csize_t `string`*: ptr UncheckedArray[char]