Error: VM does not support 'cast' from tyOpenArray to tyPtr

2023-02-28 Thread alexgustafson
Yes, thanks for the tip! It was not c2min's fault, but my own. I set something to const that could not properly be evaluated at compile time.

Error: VM does not support 'cast' from tyOpenArray to tyPtr

2023-02-27 Thread alexgustafson
When I try to compile my program I get the error: `Error: VM does not support 'cast' from tyOpenArray to tyPtr` The message in the console shows the error, with the path to the system.nim file in the nim library. It does not show me the line in my code that is giving me this error. I am not exp

passing pointer from nim dynlib to c host application

2022-09-22 Thread alexgustafson
I am working on a nim wrapper for the CLAP audio plugin format. I can compile an audio plugin written in nim as a dynlib and load it into a test host ( written in c ). The host is finding the exposed methods and endpoints that it needs to create a plugin instance, however I am having trouble pa

c2nim - working with arrays

2022-09-01 Thread alexgustafson
Thanks, that worked! I should have figured that myself, I was so busy trying to get rid of UncheckedArray in other bits of code that c2nim had created that I didnt realize it might be usefull here. For future nim forum users needing a solution: c2nim was converting float **data;

c2nim - working with arrays

2022-08-31 Thread alexgustafson
I'm try to put together a nim wrapper for the Clap AudioPlugin API/ABI/interface. In the c world a clap audio plugin has a process method that will be called by the host. One of the arguments is a clap_process struct that stores info about, and pointers to audio buffers. In the process method t

c2nim problem with char[] to UncheckardArray[char]

2022-08-31 Thread alexgustafson
Ok, thanks for taking a look. I have a script that does some preprocessing on the .h files and some post processing on the .nim files after the c2nim conversion. I was looking at how nimraylib_now does it, and trying to do something similar. I am dealing with this in the post-processing by repl

c2nim problem with char[] to UncheckardArray[char]

2022-08-30 Thread alexgustafson
Hi, I am trying to use c2nim to make a wrapper for the Clap AudioPlugin API. I have a line of c code that looks like this: static CLAP_CONSTEXPR const char CLAP_EXT_LATENCY[] = "clap.latency"; Run c2nim converts that to: var CLAP_EXT_LATENCY*: UncheckedA

nimscript - import configuration file

2022-01-20 Thread alexgustafson
Nice, thanks for both examples. the include "settings.nims" is exactly what I need. good bye YAML, hello nim!

nimscript - import configuration file

2022-01-19 Thread alexgustafson
Hi, We are using nimscript as a task runner for various (non nim ) projects. Typical tasks might be to deploying a docker based project to a remote server, or synchronizing data between local test servers and remote servers. I would like to be able to have a configuration file that is separate