Hi, Does Nim have some good ways to handle shared memory? The only way I found
was manual memory management, but that can't handle inner references and,
hello, that's the reason I'm using a garbage collected language in the first
place :D The experimental manual says that the parallel statement
Hi, I'm looking for a binary serializer that will hopefully allow newer
versions of my program that for example add new fields to a type to still load
data created by older versions of that same program. Is there anything like
that? Thanks!
I'm curious, would it be hard or beneficial to change the nim compiler so that
every time you build a project, it generates a cmake_lists.txt file and uses
Cmake to run the C or C++ compiler to compile the project. This seems to be at
least one of the things that Cmake was made for. You might al
Hi, I'm trying to wrap a function of BASS sound library so I can learn how it
works. My code is:
#{. emit: """#include "bass.h" """ .}
type dword {. importc: "DWORD" .} = uint32
type hwnd {. importc: "HWND" .} = uint32
type guid {. importc: "struct GUID" .}= object
ty
OK, here is an example. logic.c: typedef int (adder)(int, int);
int run(adder fn, int a, int b) {
return fn(a, b);
}
logic.nim: {. compile: "logic.c" .} type adder {. importc .} = proc(a, b:
cint): cint proc run(fn: adder, a, b: cint): cint {. importc, cdecl, nodecl .}
proc add(a, b: cint)
H. I've looked around and I can't answer this. I want to be able to pass a Nim
function / proc to C as a function pointer and get C to call it. I don't have a
specific reason I want to do this, but I might need it soon. Thanks