I’m not doing that. There’s another way to get Rustup, and I can make it use the OS installation as default, too. It’ll allow me to use their then-current version when I need to without losing the OS-installed default.
(I’m so very glad that both #gdc and #ldc for !DLang, along with #dub, are in Debian / Ubuntu and work fine. I’m not a #Rustacean or #Rusticrucian, so I don’t want something that I’ll forget to update between my occasional uses.)
Taking a brief time away from learning !Dlang and #PHP to go through a couple of #Ocaml tutorials before I return to $EMPLOYER's garbage training courses tomorrow.
@dansup @clipsey Adding link to the conversation to the !DLang group (not sure how many people will see it now that most #Fediverse users use software that does not support groups).
It takes an almost-D file that contains C-#includes, inserts those, translates any prototypes into the right D prototype in an extern(C) block, runs the result through the real cpp to expand any macros, and that becomes a D file that the normal compiler can compile.
Sounds crazy, but apparently it's been tested to work for calling libcurl, openssl, nanomsg and a few others, and that's still early days. Kindasorta works with C++ if it's basically a C-compatible subset.
Is the !dlang GC an issue for you as you're interfacing with your C and other non-D code?
There is the -betterC mode, which is still pretty limiting (but no more than writing in C?), but it's being worked on. More and more of the standard library is being made available.
There are methods for separating your GC code and your non-GC code in different threads, and you can make sure certain code parts (and everything they call) are free of GC with the @nogc attribute.
There's also always the nuclear option of GC.disable. If you have safe points where you're not under scheduling pressure you can run GC.collect explicitly. I don't think there's a way to make the collection time bounded though, which would have been useful.
> It can’t be repeated enough given how often it’s misunderstood: D’s GC will only have a chance to run when the programmer allocates GC memory and it will only run if it needs to. Use that knowledge to your advantage by keeping the allocations small, infrequent, and isolated outside your inner loops.
> A not-so-well-written article about the fuzzing capability recently added to LDC, using LLVM’s libFuzzer. Compiling code with -fsanitize=fuzzer adds control-flow instrumentation used to guide the fuzzing and links-in the libFuzzer library that drives the fuzz testing (same as Clang). -fsanitize=fuzzer is available from LDC 1.4.0, not on Windows. LDC 1.6.0 was used for the examples in this article.