Questions about creating dll with Nim

2022-02-14 Thread rockcavera
Truth. I started accessing IRC in 1999 with mIRC. And thanks to mIRC, around 2003/2004 I started programming, first in mIRC Scripting and then in Perl, PHP... Today I'm here with Nim. Good times.

Questions about creating dll with Nim

2022-02-14 Thread kobi
mIRC? wow, you bring me back to the nineties!

Questions about creating dll with Nim

2022-02-12 Thread cblake
Of possible interest is some example code (sorry - not a foundational article) that I have for the run-time user configurable/extensible [lc](https://github.com/c-blake/lc) file lister, in particular [extensions/lcNim.nim](https://github.com/c-blake/lc/blob/master/extensions/lcNim.nim). { The e

Questions about creating dll with Nim

2022-02-12 Thread Prince213
I'd wonder if these information could make their way to the documentation, presumably as a section in the Compiler User Guide. They're currently either missing or scattered in places.

Questions about creating dll with Nim

2022-02-11 Thread Araq
`NimMain` is only required when you have top level statements in your program that need to run. (Assuming `--gc:orc -d:useMalloc`.)

Questions about creating dll with Nim

2022-02-11 Thread mratsim
I would love some foundational article about Nim for standalone DLLs / .so, ideally without having to call NimMain so that for library consumers they work like C libraries. This would be especially valuable for applications with a plugin system as well.

Questions about creating dll with Nim

2022-02-11 Thread rockcavera
A long time ago I created a mIRC dll with C and I forgot to free a memory allocated with malloc and there was a leak. So, I believe that mIRC only controls the memory it allocates and the dll should be responsible for the memory it allocates itself. Thanks for the reply and advice.

Questions about creating dll with Nim

2022-02-10 Thread Araq
All of your questions can be effectively answered with a simple "yes". You understand the situation quite well. My advice is to compile with `--gc:orc -d:useMalloc`, you don't need to worry about cycles and you don't need `nimrtl.dll`. Watch out though, it's often not clear which libc on Window

Questions about creating dll with Nim

2022-02-10 Thread rockcavera
I have a small package for creating dlls for use in mIRC - [mdlldk](https://github.com/rockcavera/nim-mdlldk). Faced with this situation, some questions arose about Nim and dlls, especially with regard to memory management. I'll explain first how the mIRC dlls work (or I believe they work with