Nested concepts

2021-09-27 Thread SFR0815
Works. Much nicer code, I must admit :-)

Nested concepts

2021-09-27 Thread SFR0815
OK, will try. `var` is superfluous - there to allow the wrapperless deepcopy as a default. Thank you!

FFI - std::string

2021-09-27 Thread Recruit_main707
there is [nim-cppstl](https://github.com/Clonkk/nim-cppstl), which wraps vectors, strings, smart pointers, exceptions and complex

FFI - std::string

2021-09-27 Thread mantielero
Ahh ok. That might be the reason why it was working fine with **cinterop**.

FFI - std::string

2021-09-27 Thread mantielero
Wrapping the following function with **c2nim** : void Write(const std::string& filename); Run I get: proc Write*(this: var ExtendedSTEPExporter; filename: string) {.importcpp: "Write", header: "ExtendedSTEP.hxx".} Run But when I u

FFI - std::string

2021-09-27 Thread haxscramper
If you don't want to wrap `std::string` yourself you can use one of the C++ standard library wrappers like You would need to explicitly convert nim string `"cubo.step"` in your code into `StdString` object.

Nested concepts

2021-09-27 Thread exelotl
> I have not yet looked into this. Is there any documentation (or alike) > available yet? (Tried to find some ...) - Would really like to start using > these rather sooner than later. For now there's just the RFC on new-style concepts: And some tes

Issue with passL

2021-09-27 Thread mantielero
Thanks a lot. It worked. For the record, just fixing a few typos: const libPath = "/usr/local/lib" const libName = "occutils" {.passL: "-L" & libPath.} {.passL: "-Wl,-rpath," & libPath.} {.passL: "-l" & libName.} Run

Issue with passL

2021-09-27 Thread Clonk
You need to add -Wl,-rpath to linker options. const libPath = "/usr/local/lib" const libName =) "-loccutils" {.passL: "-L" & libPath} {.passL: "-Wl,-rpath," & libPath} {.passL: "-l" & libName} Run

Issue with passL

2021-09-27 Thread mantielero
I am trying to compile against a library but it is not finding it: error while loading shared libraries: liboccutils.so: cannot open shared object file: No such file or directory Run I am using: {.passL: "-L/usr/local/lib/ -loccutils".} Ru

Nested concepts

2021-09-27 Thread shirleyquirk
glad you got it working! it's possible to do so with less genericity, should you desire: `concepts.nim` type Concept0* = concept C0, var varC0, type TC0 varC0.copy_C0() is TC0 varC0.init_C0() Concept1*[C0:Concept0] = concept C1, var varC1, type TC1

Hot Code Reloading viability for Jupyter-Notebook like Nim IDE

2021-09-27 Thread Clonk
AS a REPL `inim` is quite good

Hot Code Reloading viability for Jupyter-Notebook like Nim IDE

2021-09-27 Thread Hlaaftana
`nim js` is pretty fast, enough to use for a normal REPL or scripting purposes, though it's not exactly a substitute for all the C bindings.

Hot Code Reloading viability for Jupyter-Notebook like Nim IDE

2021-09-27 Thread Araq
There is a patch for enabling the FFI with Nim's VM or you can use hot-code-reloading. I think neither approaches are that good, I encourage you to look into solutions that patch Nim's allocator to be support "shared" memory and patch the C(++) codegen so that globals are accessed via an indirec