Earlier quoted context omitted.
Yeah, that is why carpenters are still around and no one buys Ikea.
> that is why carpenters are still around and no one buys Ikea The irony in this statement is hilarious, and perfectly sums up the reality of the situation IMO. For anyone who doesn't understand the irony: a carpenter is someone who makes things like houses, out of wood. They absolutely still fucking exist. Industrialised furniture such as IKEA sells has reduced the reliance on a workforce of cabinet makers - people…
D Programming Language
261–270 of 278 posts
Re: D Programming Language
#262Earlier quoted context omitted.
The problem is called Mono, and Unity's refusal to pay for an update.
instead they made (or funded? not exactly sure) il2cpp which is a batshit compiler that compiles IL to C++ for better performance, I guess. sidenote, I wonder how many other low-level to high-level compilers exist out there. can't be many.
Allegedly some games are now managing to ship on console with ports of .NET NativeAOT.
Re: D Programming Language
#263Earlier quoted context omitted.
C# wouldn't be a problem for Unity if they hadn't mapped most engine abstractions to class hierarchies with reflection-based dispatch instead of value-type handles and the seldom interface, and had dropped the Boehm GC. .NET has actually got a lot of features to avoid allocations on the hot paths.
The problem is called Mono, and Unity's refusal to pay for an update.
Re: D Programming Language
#264Earlier quoted context omitted.
Here's how it works in some C++ libraries. struct resource { resource(ctx *c, ...) {index = c->store(...); ...;} size_t index; ctx *c; ~resource() {c->free(index);} // copy constructor+op creates new handle // move constructor+op copies the handle, maybe zeroes the current one }; With this you can rely on RAII, smart pointers, upcoming lifetime checks and annotations, etc. The core idea is that you treat objects of c…
But if I'm not mistaken, this is just handling index allocation, release and avoiding dangling manually. The programmer is still responsible, right? And I don't think Rust can do better for indices, since indices are normal, "eternal" values.
No, it is abstracted away. You just have to follow best practices when writing a library.
resource foo(...); // This gets freed at the end of scope. See RAII.
auto x = make_unique(...); // can be moved, freed when owner is.
auto y = make_shared(...); // freed on zero reference countRe: D Programming Language
#265IMHO D just missed the mark with the GC in core. It was released in a time where a replacement for C++ was sorely needed, and it tried to position itself as that (obvious from the name). But by including the GC/runtime it went into a category with C# and Java which are much better options if you're fine with shipping a runtime and GC. Eventually Go showed up to crowd out this space even further. Meanwhile in the C/C+…
I used to think of D as the same category as C# and Java, but I realized that it has two important differences. (I am much more experienced with Java/JVM than C#/.Net, so this may not all apply.) 1. Very load overhead calling of native libraries. Wrapping native libraries from Java using JNI requires quite a bit of complex code, configuring the build system, and the overhead of the calls. So, most projects only use l…
On #2, I generally reach for either TS/JS with Deno if I need a bit more than a shell script, or Rust for more demanding things. I like C# okay for the work stuff that I do currently though.
Re: D Programming Language
#266Earlier quoted context omitted.
I agree with the person you're replying to. Python was definitely already a thing before ML. The way I remember it is it started taking off as a nice scripting language that was more user friendly than Perl, the king of scripting languages at the time. The popularity gain accelerated with the proliferation of web frameworks, with Django tailgating immensely popular at the time Ruby on Rails and Flask capturing the mi…
As I remember it there was a time when Ruby and Python were the two big up-and-coming scripting languages while Perl was in decline.
At the time Java was the mature but boring "enterprise" alternative to both, but also beginning its decline in web mindshare as Ruby/Python (then JavaScript/Node) were seen as solving much of the verbosity/complexity associated with Java.
There was a lot of worry that the Python 2->3 controversy was threatening to hurt its adoption, but that concern came from Python in a position of strength/growing fast.
Python's latter day positioning as the ML/scientific computing language of choice came as its position in the web was being gobbled up by JavaScript by the day and was by then well on the downswing for web, for a variety of technical/aesthetic reasons but also just simply no longer being "cool" vs. a Node/NoSQL stack.
Re: D Programming Language
#267I like D in general, however it is missing out in WASM where other languages like Rust, Zig, even Go are thriving. Official reasoning usually included waiting for GC support from WASM runtime, but other GC languages seem to just ship their own GC and move on.
OpenD added almost-full (you can't catch exceptions or spawn threads, so not really full, but the GC and such work fine) wasm support with like .... i think it was less than one day of work. wasm sucks though, what a miserable platform.
I had read about the split (D vs. OpenD) recently on the Dlang newsgroup.
Also, just had the thought that the split may damage Dlang's progress / prospects, for users, like the Phobos issue etc. stuff was supposed to have done.
I don't know much about those details either, I had just read a bit about it earlier, as an interested light user of the language.
Re: D Programming Language
#268Earlier quoted context omitted.
> Are there technical reasons that Rust took off and D didn't? Yes. D tried to jump on the "systems programming with garbage collection" dead horse, with predictable results. (People who want that sort of stupidity already have Go and Java, they don't need D.)
> (People who want that sort of stupidity already have Go and Java, they don't need D.) Go wasn't around when D was created, and Java was an unbelievable memory hog, with execution speeds that could only be described as "glacial". As an example, using my 2001 desktop, the `ls` program at the time was a few kb, needed about the same in runtime RAM and started up and completed execution in under 100ms. The almost equiv…