Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
kubkon
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
5 ms
·
1.
▲
by
kubkon
2y ago
FYI, Zig is in the process of dropping dependence on lld on Linux and Windows; macOS uses Zig's own linker since roughly 2021 as far as I recall. Tracking issue for reference: https://github.com/ziglang/zig/is
2.
▲
by
kubkon
3y ago
Hi, kubkon here, the author of Zig's MachO linker. I just wanted to explain our reasoning here a little bit. As you have hopefully noticed in the release notes, there are 5 core team members that are paid either full- or part-time for
3.
▲
by
kubkon
5y ago
Great question. With the presented approach in Zig, since you work on the binary directly, after you finish your hot-code reloading session, you can still run the generated binary from disk (and debug it or whatnot) as all writes to memory
4.
▲
by
kubkon
5y ago
Exactly, and the way I see it, this is the only valid use case for hot-code reloading in the first place: app in-development. I'll try augmenting my linker to be able to bake in the entitlements into the Zig compiler and this hopefully
5.
▲
by
kubkon
5y ago
Nice! V does it the same way as Nim though, right? From quickly browsing over the sources, it looks like it is based on dynamic library hot swapping https://github.com/vlang/v/tree/master/vlib/v/
6.
▲
by
kubkon
5y ago
Wait, but what about debuggers then? Plus hot-code reloading should only ever be used for quick development cycles when prototyping your app in debug mode, so very much what a debugger is used for, right? Additionally, I actually based the
7.
▲
by
kubkon
5y ago
Yep, you are absolutely right, and hence why this is a proof-of-concept after all and a start really. With the proper tweaks to the linker though I am sure it would be possible orchestrate updates in such a way as to not clobber any existin
8.
▲
by
kubkon
5y ago
Hey, author of the article here. Thanks for the suggestion! I actually didn't know about the MAP_JIT flag to mmap before and will defo consider it. As to elevating your privs - this is just a temp solution until I work out how to add t
9.
▲
by
kubkon
5y ago
One tiny correction that we do support seamless C/C++ cross-compilation to macOS now with the advent of our own in-house linker `zig ld`. :-)
10.
▲
by
kubkon
5y ago
Hey smeenai! I am the author of the MachO linker in Zig. First of, I am closely following your work in LLVM and I am really delighted that someone of your aptitude took over the backend - I definitely intend to take it for a spin soon! As f