Live data from Hacker News

Programming in D: Tutorial and Reference

ddili.org

121–130 of 134 posts

Re: Programming in D: Tutorial and Reference

#121
post #110

Earlier quoted context omitted.

Still curious: How did you choose Serverino among the many servers?

Might seem silly, but the choice just came from looking at ( https://code.dlang.org/search?q=websockets ) and seeing that serverino is the only one maintained. vibe-d isn't listed there, I only learned about that later. Basically, serverino has good SEO.

Thanks, good to know. Also the fact that you searched directly on the site is a clue for me :)

Re: Programming in D: Tutorial and Reference

#122
post #121

Earlier quoted context omitted.

Might seem silly, but the choice just came from looking at ( https://code.dlang.org/search?q=websockets ) and seeing that serverino is the only one maintained. vibe-d isn't listed there, I only learned about that later. Basically, serverino has good SEO.

Thanks, good to know. Also the fact that you searched directly on the site is a clue for me :)

How so, if I may ask?

Re: Programming in D: Tutorial and Reference

#123
post #24
post #2

I feel like D is such an underrated language.

Just to add, I learned D in a day and finished most of project euler without needing to look up the manual. D is more "python" than python in that it makes coding very. IMHO, Zig is the closest thing to being D-esk (like with comptime), but it's still not a mainstream option yet.

* makes coding very straight forward. Most of the time I find what I needed in the language just using intuition.

Re: Programming in D: Tutorial and Reference

#124
post #77
post #70

Earlier quoted context omitted.

> we have so much better dynamic languages with advanced JIT implementations What are some of these better languages that you're referring to? (The usual dynamic language JITs I hear people praise are LuaJIT and Chez. And V8. And the JVM?)

I'd suggest F#, Clojure, Elixir, Scala, and TS, if that counts.

Clojure could never really be a thing since it ignores the most important rule: fast startup. Because of this, and for no other reason, Clojure will always be an "also ran". It's not about competency of the people working on it. It's a solvable problem the community doesn't acknowledge exists, unless you press them on it, in which case they think "graal" and "babashka" is a valid response, and you're back to square 1.

Re: Programming in D: Tutorial and Reference

#125
post #115

Earlier quoted context omitted.

In Ruby's case that would be RubyMotion, TruffleRubby and JRuby. That trace back to Apple's efforts with MacRuby, or Sun's (for a while Netbeans even had Ruby support).

If you go that route, GraalPy is there too, so the argument is not as strong as it seems.

You missed my remark about PyPy feeling abandoned on the corner, well the same applies to GraalPy.

The Ruby JITs I mentioned are used in production.

While other dynamic language comunities embrace their JITs, in Python world, outside using it as a DSL for GPGPU JITs, it is pretty much let's just keep using CPythion with C and C++ extensions. Adding a JIT to CPython only became a thing after Facebook and Microsoft decided to push for its development.

Re: Programming in D: Tutorial and Reference

#126
post #121

Earlier quoted context omitted.

Thanks, good to know. Also the fact that you searched directly on the site is a clue for me :)

How so, if I may ask?

Well, you might have searched for GitHub or got there from some page where serverino was mentioned (forum, ...) or maybe someone suggested it to you in the community. Once a program of mine was mentioned in a telegram channel and I started seeing a lot of stars on github and I didn't understand why.

Re: Programming in D: Tutorial and Reference

#127

Earlier quoted context omitted.

> Python preferred over Ruby ... Perhaps what you're describing is having a niche opinion. If you had some opinions, like a preference for "Everything must be done in as many ways as possible with funky characters" or "I hate indentation", it would certainly seem that the world is against you. But, perhaps, you just really smart and can remember the intention of all the complicated code you wrote a year ago, so you d…

> "Everything must be done in as many ways as possible with funky characters" Are you sure you're not talking about Perl here? Because there are very few "funky characters" in Ruby and code written in it tends to be very readable, more so than Python in many cases. I agree with OP. While Python is not a bad language, Ruby is a better language in general, and I'm reminded of it every time I have to work in Python (whi…

Your critique rests heavily on a small part of the language and specificaly the odd? trick. Python has filter available as well, but you did not use it:

    ys = sorted(x for x in xs if x % 2)
        # vs
    ys = sorted(filter(lambda x: x % 2, xs))

    ys = ", ".join(str(y) for y in ys)
I find Python a better language in total, more regular and readable, when one-liners are avoided (though "".join() is not my favorite). I do however like shell and gleam style pipelines, a bit more than fluent style.

Re: Programming in D: Tutorial and Reference

#129
post #51

I constantly feel like inferior languages are picked up, while superior languages are discarded. It's almost as if the universe had a law: "inferior technology is always preferred no matter how hard you seethe". Examples: * Python preferred over Ruby * TypeScript preferred over Dart or even JavaScript (which is fine and, as a bonus, doesn't require compilation step like TS) * Go is preferred over Crystal and D. While…

speaking of typescript and dart, the language i was really rooting for in that niche was haxe. wish it had gotten more mainstream.

Haxe is still alive!

The devs are working on 5.0 as we speak!

Its really calming that Haxe is not moving as fast as the JS/TS ecosystem. You upgrade once every 3-4 years. Everything just usually "works"

We use Haxe for PHP and its really a secret hidden superpower, im amazed people dont know about / use.

Its mostly marketing, i guess. But i wish more devs tried it as an alternative to PHP or TypeScript, as the language is WAY better in almost every way.

Re: Programming in D: Tutorial and Reference

#130
post #21

Anything compiled with LDC2 >=1.29 (3y old) will immediately crash/segfault on macOS >=15.4 A fix is on master/beta but will still take some time to be released. https://github.com/dlang/dmd/issues/21126

Good thing there's the DMD and GDC compilers too then
Post reply on HN