Hi Nick!
There are no plans to add the ability to load C++ based libraries
into SLiM. This would be non-trivial to do in a cross-platform way,
I would imagine (I wouldn't even know where to start). Qt is not an
option, since it is only used in SLiMgui, not in the `slim`
command-line tool. It would certainly be nice to be able to do
something like this, but as you say, it's a big ask. Feel free to
open an issue on GitHub about it, but it'll get marked "long-term"
and "help needed"; since I have no idea how to do such things, it
would be unlikely to get addressed by me any time soon. If you were
to provide a PR that actually implements such a scheme, in a
cross-platform way (Windows, Linux of various varieties, and macOS,
at a minimum), that would be interesting but even then I'm not sure
I'd want to merge it without a solid long-term commitment from you
that you would maintain and support the feature far into the
future. Otherwise the feature would just be subject to code rot,
and would eventually break and need to be removed. A good
philosophy for big projects like SLiM is: don't add anything that
you're not prepared to maintain going forward. I'm not prepared to
maintain dynamic library linking long-term, since I have zero
technical understanding of it, so I'd be hesitant to add it even if
someone gave it to me gift-wrapped with a bow on top. :-> And
even beyond the dynamic linking aspect of it, it would be
non-trivial to add plug-in extensibility to Eidos and SLiM in terms
of their own architecture, too.
I might question your assumption that an ODE solver would not be a
welcome addition to base SLiM (or presumably, more precisely,
Eidos). It might not be a bad idea to open an issue about that,
providing a detailed description of what you've done, how you would
vend it in SLiM through an Eidos API, how it is useful for your
model, and how much C++ code is involved. If you could provide a
reasonably compact PR that implements it, and if the Eidos API was
clean and documented, and if it didn't rely on any external link
dependencies, I could imagine adding such a thing. The evolution of
biological networks is certainly an area that it would be
interesting for SLiM to support better.
Another possibility is to implement this as a command-line tool that
Eidos calls out to using the `system()` function. That facility can
be used for all sorts of added functionality. Of course `system()`
is somewhat slow and somewhat clunky; but perhaps it would work fine
for your purposes.
A third possibility, if the functionality can be implemented in
Eidos itself (maybe an ODE solver can?), is to package it up as a
user-defined function in a standalone file that can be included in a
SLiM model using the `source()` function.
You're certainly free to package it up as a fork – SLiM and Eidos
are open-source, after all – but to me that is perhaps the worst
possible solution, and I would not be happy to see it. We could get
into a discussion of why, but that would be better done off-list.
(On slim-community, for example – that's the intended place for such
philosophical discussions, since then people can subscribe to
discussions that interest them. This list goes out to hundreds of
users who probably wouldn't want to receive a long discussion about
forks.)
Cheers,
-B.
Benjamin C. Haller
Messer Lab
Cornell University