digitalmars.D - hot reloading code gist
- monkyyy (3/3) May 15 https://gist.github.com/crazymonkyyy/f3d40f5b7c0454bfaa118d5a73a3fe1c
- H. S. Teoh (6/10) May 15 dlopen is a POSIX call. It sux because it's an OS C API, and there's
- Ogion (4/6) May 16 We do have `core.runtime.Runtime.loadLibrary` that uses
- Hipreme (3/11) May 30 We have the libraray "bindbc-loader", which solves this exactly
- monkyyy (3/15) May 30 Hotloading local d code vs dymanic loading some big c lib
- Hipreme (5/21) May 30 They are exactly the same thing. The only other use-case I know,
- xoxo (13/29) May 30 https://github.com/ddovod/jet-live
- monkyyy (5/6) May 31 A quick skim suggest they exploded the complexity budget. Im
- Ogi (2/8) Jun 08 I mean, this should be in the standard library.
- monkyyy (4/13) Jun 20 I dont imagine this execution model will survive phoboes styles
- monkyyy (5/8) May 30 Id like to extend this to work with more then one function per
https://gist.github.com/crazymonkyyy/f3d40f5b7c0454bfaa118d5a73a3fe1c dlopen is one of the functions not really documented in core, its api really sucks. This section of d could use some love.
May 15
On Fri, May 16, 2025 at 01:03:46AM +0000, monkyyy via Digitalmars-d wrote:https://gist.github.com/crazymonkyyy/f3d40f5b7c0454bfaa118d5a73a3fe1c dlopen is one of the functions not really documented in core, its api really sucks. This section of d could use some love.dlopen is a POSIX call. It sux because it's an OS C API, and there's nothing we can do about it. T -- Bomb technician: If I'm running, try to keep up.
May 15
On Friday, 16 May 2025 at 03:18:38 UTC, H. S. Teoh wrote:dlopen is a POSIX call. It sux because it's an OS C API, and there's nothing we can do about it.We do have `core.runtime.Runtime.loadLibrary` that uses `dlopen`/`LoadLibrary` depending on platform. But for some reason there’s no wrapper for `dlsym`/`GetProcAddress`.
May 16
On Friday, 16 May 2025 at 08:37:34 UTC, Ogion wrote:On Friday, 16 May 2025 at 03:18:38 UTC, H. S. Teoh wrote:We have the libraray "bindbc-loader", which solves this exactly problemdlopen is a POSIX call. It sux because it's an OS C API, and there's nothing we can do about it.We do have `core.runtime.Runtime.loadLibrary` that uses `dlopen`/`LoadLibrary` depending on platform. But for some reason there’s no wrapper for `dlsym`/`GetProcAddress`.
May 30
On Friday, 30 May 2025 at 17:52:19 UTC, Hipreme wrote:On Friday, 16 May 2025 at 08:37:34 UTC, Ogion wrote:Hotloading local d code vs dymanic loading some big c lib probably are different problems.On Friday, 16 May 2025 at 03:18:38 UTC, H. S. Teoh wrote:We have the libraray "bindbc-loader", which solves this exactly problemdlopen is a POSIX call. It sux because it's an OS C API, and there's nothing we can do about it.We do have `core.runtime.Runtime.loadLibrary` that uses `dlopen`/`LoadLibrary` depending on platform. But for some reason there’s no wrapper for `dlsym`/`GetProcAddress`.
May 30
On Friday, 30 May 2025 at 18:04:14 UTC, monkyyy wrote:On Friday, 30 May 2025 at 17:52:19 UTC, Hipreme wrote:They are exactly the same thing. The only other use-case I know, is that it is possible to hotload class code, which I don't use and never saw any project using. I've been hot reloading my code for more than 3 years now.On Friday, 16 May 2025 at 08:37:34 UTC, Ogion wrote:Hotloading local d code vs dymanic loading some big c lib probably are different problems.On Friday, 16 May 2025 at 03:18:38 UTC, H. S. Teoh wrote:We have the libraray "bindbc-loader", which solves this exactly problemdlopen is a POSIX call. It sux because it's an OS C API, and there's nothing we can do about it.We do have `core.runtime.Runtime.loadLibrary` that uses `dlopen`/`LoadLibrary` depending on platform. But for some reason there’s no wrapper for `dlsym`/`GetProcAddress`.
May 30
On Friday, 30 May 2025 at 18:04:14 UTC, monkyyy wrote:On Friday, 30 May 2025 at 17:52:19 UTC, Hipreme wrote:https://github.com/ddovod/jet-live This is for C++, but the logic is language agnostic, with some work, you could make it work for D, (strip the C++ compile part, and reuse the parsing and process patching patch). I've seen people make it work for Zig, this is much better than shared library reload, since the user has no build script to duplicate or code to separate. https://www.jakubkonka.com/2022/03/16/hcs-zig.html https://www.jakubkonka.com/2022/03/22/hcs-zig-part-two.html It's ARM in that example, but they plan to make it available for all the supported targets, built right in the compiler. The day they land that feature will be the day I switch.On Friday, 16 May 2025 at 08:37:34 UTC, Ogion wrote:Hotloading local d code vs dymanic loading some big c lib probably are different problems.On Friday, 16 May 2025 at 03:18:38 UTC, H. S. Teoh wrote:We have the libraray "bindbc-loader", which solves this exactly problemdlopen is a POSIX call. It sux because it's an OS C API, and there's nothing we can do about it.We do have `core.runtime.Runtime.loadLibrary` that uses `dlopen`/`LoadLibrary` depending on platform. But for some reason there’s no wrapper for `dlsym`/`GetProcAddress`.
May 30
On Saturday, 31 May 2025 at 06:29:03 UTC, xoxo wrote:https://github.com/ddovod/jet-liveA quick skim suggest they exploded the complexity budget. Im wondering if thats oo or c++ having much worse meta-programming then I previously believed I should probably try to do file watching tho.
May 31
On Friday, 30 May 2025 at 17:52:19 UTC, Hipreme wrote:On Friday, 16 May 2025 at 08:37:34 UTC, Ogion wrote:I mean, this should be in the standard library.We do have `core.runtime.Runtime.loadLibrary` that uses `dlopen`/`LoadLibrary` depending on platform. But for some reason there’s no wrapper for `dlsym`/`GetProcAddress`.We have the libraray "bindbc-loader", which solves this exactly problem
Jun 08
On Sunday, 8 June 2025 at 09:53:15 UTC, Ogi wrote:On Friday, 30 May 2025 at 17:52:19 UTC, Hipreme wrote:I dont imagine this execution model will survive phoboes styles opinions but heres a gist https://gist.github.com/crazymonkyyy/e6edc498376da0501c851c8c339eba4bOn Friday, 16 May 2025 at 08:37:34 UTC, Ogion wrote:I mean, this should be in the standard library.We do have `core.runtime.Runtime.loadLibrary` that uses `dlopen`/`LoadLibrary` depending on platform. But for some reason there’s no wrapper for `dlsym`/`GetProcAddress`.We have the libraray "bindbc-loader", which solves this exactly problem
Jun 20
On Friday, 16 May 2025 at 01:03:46 UTC, monkyyy wrote:https://gist.github.com/crazymonkyyy/f3d40f5b7c0454bfaa118d5a73a3fe1c dlopen is one of the functions not really documented in core, its api really sucks. This section of d could use some love.Id like to extend this to work with more then one function per file; whats a "good enough" target for api given that Im parsing code manually, or my previous experience with trying to grab functions from a module is just a mess.
May 30