Live data from Hacker News

The reference D compiler is now open source

forum.dlang.org

171–180 of 313 posts

Re: The reference D compiler is now open source

#171
post #136

Earlier quoted context omitted.

Could you be more specific? It doesn't seem like there's much room in the conventional definition of memory safety (e.g. https://en.wikipedia.org/wiki/Memory_safety ) for variation, other than, I suppose, putting conditions on when/which things are actually guaranteed.

https://wiki.dlang.org/DIP25 https://github.com/dlang/DIPs/blob/master/DIPs/DIP1000.md

Hm, I'm not sure I understand how that's answering my question. Neither of those seem to even define what the "memory safety" notion means for D so I can't compare. And, looking into it further, none of the links from https://dlang.org/spec/memory-safe-d.html define (or compare) what D means by "memory safety"/if it differs to the conventional definition.

I guess your original comment was maybe meaning how D enforces (the "normal" definition of) memory safety differs to Rust? In any case, I read over both of those, and, to me, they both seem to essentially be a slightly less general version of Rust's scheme (possibly independently invented), rather than something very different. I'm interested to hear how you think they specifically differ to Rust.

Re: The reference D compiler is now open source

#172

Earlier quoted context omitted.

I think it's common to avoid the GC in performance critical sections of your code. D's version of BLAS is faster[1] and avoids the GC completely. [1] http://blog.mir.dlang.io/glas/benchmark/openblas/2016/09/23/...

consistently beating OpenBLAS and having performance comparable with MKL is seriously impressive. I'm wondering how that is possible. I assume it's using the same algorithms as other implementations, so the credit goes to the compiler (and to the language to some extent). But the D compiler just uses LLVM for the back end, so is this because LDC produces really good LLVM IR, or is LLVM really good at generating assem…

LDC dev here. All the credit for this goes to Ilya Yaroshenko for the expertly crafted implementation and the LLVM developers for efficient low-level code generation (inlining, register allocation and so on, and in some places auto-vectorization). LDC only needs to make sure not to "mess up" things too much.

D does play a significant role in this achievement, though – D's very powerful yet easy to use features for generics and introspection make it possible to finely tune the code for different parameters (sizes/dimensions/…) while still being easy to understand and modify.

Re: The reference D compiler is now open source

#173
post #59

Please don't get me wrong, as I don't want to start a flame here, but why do they call D a "systems programming language" when it uses a GC? Or is it optional? I'm just reading through the docs. They do have a command line option to disable the GC but anyway...this GC thing is, imho, a no-go when it comes to systems programming. It reminds me of Go that started as a "systems programming language" too but later switch…

Systems programming languages with GC exist since the late 60's, with ALGOL 68RS being one of the first ones.

Since then a few remarkable ones were Mesa/Cedar, Modula-2+, Modula-3, Oberon(-2), Active Oberon, Sing#, System C#.

The reasons why so far most of them didn't won the hearts of the industry weren't not only technical, but also political.

For example Modula-3 research died the moment Compaq bought DEC research labs, or more recently System C# died when MSR disbanded the Midori research group.

If you want to learn how a full workstation OS can be written in a GC enabled systems programming language, check the Project Oberon book.

Here is the revised 2013 version, the original one being from 1992.

https://people.inf.ethz.ch/wirth/ProjectOberon/index.html

Re: The reference D compiler is now open source

#174

Whats special about D? why should i learn it?

If you want to work with C code, it is an excellent choice. I use it for numerical computing. It's an easy language to learn, no need to worry about memory management if you don't want/need to, generally good syntax, nice compile time features. Overall the best "better C" in my opinion.

See bachmeier work on D to R integration.

Re: The reference D compiler is now open source

#175
post #39

Earlier quoted context omitted.

There have been fully open source compiler for D for a long time: LDC and GDC.

Yup, but to be fair, they sometimes lack quite a bit behind dmd.

Just to clarify:

LDC master is on 2.073.2 right now (the latest DMD release), with a 2.072.2-based release imminent, and work towards 2.074.0 (currently in beta) already underway.

GDC is sadly a different story, though.

Re: The reference D compiler is now open source

#176
post #85

Earlier quoted context omitted.

> Why does gc disqualify a language as a system's language? AFAIK a "system programming language" should have deterministic performances, obviously Go hasn't. But different people might define "systems" differently.

The people who define Go as a "systems language" use their own terribly useless definition of "systems language". Per wiki: "For historical reasons, some organizations use the term systems programmer to describe a job function which would be more accurately termed systems administrator." So for them, a language that can be used by DevOps Engineers is a systems language. While for sane developers, a systems language i…

People have been writing OSes with GC enabled systems programming languages since the late 60's.

Would you consider the employees of UK Royal Navy, Xerox PARC, ETHZ, DEC, Compaq, Microsoft as insane developers?

Re: The reference D compiler is now open source

#177
post #162
post #59

Please don't get me wrong, as I don't want to start a flame here, but why do they call D a "systems programming language" when it uses a GC? Or is it optional? I'm just reading through the docs. They do have a command line option to disable the GC but anyway...this GC thing is, imho, a no-go when it comes to systems programming. It reminds me of Go that started as a "systems programming language" too but later switch…

D's garbage collector is both written in D and entirely optional, that alone should qualify it as a systems language. The gc can be disabled with @nogc, the command line flags are only if you want to disable it for the whole program or if you want warnings as to where the allocations happen. https://godbolt.org/g/IQ0O06

> https://godbolt.org/g/IQ0O06

(And, of course, the entire main() disappears on -O1 and above: https://godbolt.org/g/FAWtak.)

Re: The reference D compiler is now open source

#178

Earlier quoted context omitted.

Hi... You have a superb blog. Somebody right now on forum is trying to port your hash map code BTW. Yes past is a shame, though it's momentum relative to itself that matters for a language more than versus others. If Go takes off for network services it doesn't particularly hurt D, because total market is so big. Language has really taken off past years, and I use it within a hedge fund environment. Work with some re…

That's intriguing. I've done a bunch of XLL coding in C++ and C# (with Excel-DNA) for trading floor Excel over the years. Gotta wonder what you're building in D. Have you got a quant analytics lib in D? Or maybe market data connectivity, or historical data? Anyway, you might want to take a look at this [1], which can serverize XLL spreadsheets with no sheet or code changes. Works with RTD too. Once a pricing or risk…

Thanks for sharing.

Friend of mine started a company called Resolver Systems to do that for Python (end result). Nice experiment but bad timing for launch just before the crisis. Have got some algorithmic and infrastructure things in D, though plenty is done in other languages too. I ported Bloomberg API to D - it's open sourced bit currently not yet directly used in production. May start to be in coming months. It's not so hard to turn spreadsheets into code (its rarely the spreadsheet itself that does something complicated) so would rather rewrite that than try to do it automatically because code is easier to read, though I had dinner with a Dutch girl who is a professor who works on spreadsheets as functional languages.

Re: The reference D compiler is now open source

#179

Good news indeed. Switched to D 4 years ago, and have never looked back. I wager that you can sit down a C++/Java/C# veteran, and say write some D code. Here's the manual, have fun. They will with in a few hours be comfortable with the language, and be fairly competent D programmer. Very little FUD surrounding the switching to yet another language with D. D's only issue is that it does not have general adoption, whic…

I think a lot of languages that get popular have to have a thing. Like a thing they do well, and hopefully change the world a little...

Python had math and has lots more maths now. R also has math and started to kill Python, but now Python has Tensorflow and PyTorch. Scala has Spark. Java has Tomcat, and everything that followed, which is probably 20% of the world's mass by volume. Go has Docker Ruby has/had a railroad or something? JS has well, f... I don't know where to start here.

Does D have a thing?

Post reply on HN