Live data from Hacker News

D Programming Language

dlang.org

261–270 of 278 posts

Re: D Programming Language

#261
post #13

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…

These guys made one of the most amazing tables for someone I know: https://rustictradesfurniture.com/. If you said "you're not a carpenter because you aren't slapping 2x4s together", you'd get a wry chuckle that means 'who is this idiot'.

Re: D Programming Language

#262
post #228

Earlier 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.

AFAIK, the original reason to build IL2CPP was to appease console certification and leave behind Mono's quirky AOT on iOS. Capcom is also using their own C# implementation targeting C++ for console certification.

Allegedly some games are now managing to ship on console with ports of .NET NativeAOT.

Re: D Programming Language

#263
post #228

Earlier 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.

I agree Mono is bad compared to upstream .NET, but I used to write game prototypes with it back before .NET Core without as many performance issues as I still find in Unity. It was doable with a different mindset.

Re: D Programming Language

#264
post #234
post #183

Earlier 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.

> this is just handling index allocation, release and avoiding dangling manually

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 count

Re: D Programming Language

#265
post #213

IMHO 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…

Native calls from C# are MUCH better than then the Java experience. It's a massive part of why I chose it when it came out. Today, C# is pretty great... not ever MS dev shop, which is often, like Java, excessively complex for its' own sake.

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

#266
post #72
post #50

Earlier 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.

That is correct. I "came of age" in 2010-11 during the Web 2.0 era of web apps beginning to eat the world. Ruby was just starting to come down from its peak as the new hotness, and Python thanks to Django + Google's support/advocacy was becoming the new Next Big Thing for the web and seemed like a no-brainer to learn as my main tool back at the time.

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

#267

I 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.

what's the latest news about OpenD, anyone?

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

#268

Earlier 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…

It still is an unbelievable memory hog. It got faster though.

Re: D Programming Language

#269
post #242

Earlier quoted context omitted.

I was hoping to see one of his posts here. If he's going to post under an alt, he should advertise it so that I can know which posts I should be taking extra ironically.

He's not posting under an alt--that's an absurd slander.

Of course
Post reply on HN