dlang/dmd
View on GitHub ↗ ★ 3,332 D
dmd D Programming Language compiler
93 mentions on Hacker News by 33 people: 9 stories, 84 comments · first 2011-06-15 · latest 2026-08-23
20082026
-
…allocator today. [1] [0] https://web.archive.org/web/20190126213344/https://www.drdob... [1] https://github.com/dlang/dmd/blob/025caed79/src/dmd/root/rme...
comment by MaxBarraclough · 2020-12-13 · in Writing a Memory Allocator (2019) -
…got a preprocessor so the compiler can resolve the token properly. The implementation of that is at https://github.com/dlang/dmd/blob/v2.094.2/src/dmd/expressio...
comment by mhh__ · 2020-12-06 · in Is the preprocessor still needed in C++? (2017) -
https://github.com/dlang/dmd/blob/master/src/dmd/dtemplate.d That must be why the implementation of D's templates, which are designed to be easier to implement than C++'s is at least 8337 lines? edit: Clang's clocks in at about 11k lines…
comment by mhh__ · 2020-12-06 · in Is the preprocessor still needed in C++? (2017) -
I believe that this may be the missing link (or equivalent): https://github.com/dlang/dmd/blob/master/src/dmd/root/spelle... This is a spell-checker in the D reference compiler that detects typos in identifiers and suggests potential…
comment by bombastry · 2020-12-04 · in A spellchecker used to be a major feat of software engineering (2008) -
Here's D's spell checker, tests included! Edit: forgot the link https://github.com/dlang/dmd/blob/master/src/dmd/root/spelle...
comment by WalterBright · 2020-12-04 · in A spellchecker used to be a major feat of software engineering (2008) -
…printf-style format strings.) https://dlang.org/spec/pragma.html#printf And the code to do it: https://github.com/dlang/dmd/blob/master/src/dmd/chkformat.d
comment by WalterBright · 2020-08-14 · in Implementing a Type-safe printf in Rust -
…but because the compiler authors care about compilation speed: Lexer skips four spaces at once https://github.com/dlang/dmd/pull/11095 Optimize core logic to 7x compilation speed of language feature https://github.com/dlang/dmd/pull/11303…
comment by crazypython · 2020-07-11 · in Linux kernel in-tree Rust support -
I'm still regularly refactoring code I initially wrote 35 years ago. https://github.com/dlang/dmd/pull/11301
comment by WalterBright · 2020-07-02 · in Things I wish I had known when I started programming, Part 4 (2019) -
I constantly refactor my code, even the ancient stuff. Here's my most recent one: https://github.com/dlang/dmd/pull/11202 which changes a data structure from a linked list to an array.
comment by WalterBright · 2020-06-03 · in Refactor vs. Rewrite -
Use dmd master and you will have printf/scanf format argument validation [0]. [0] https://github.com/dlang/dmd/pull/10852
comment by arunc · 2020-04-28 · in Better C – A subset of D Programming Language -
I don't remember how long it took me to do the spell checker challenge: https://github.com/dlang/dmd/blob/master/src/dmd/root/spelle... but I'm sure it was much longer than it took Peter. This checker is used by the D compiler to look for…
comment by WalterBright · 2020-02-18 · in The Myth of the Myth of the 10x Programmer -
D is also getting an Ownership/Borrowing system: https://github.com/dlang/dmd/pull/10747
comment by WalterBright · 2020-01-28 · in Wc in D: 712 Characters Without a Single Branch -
▲ 2
Prototype of Ownership/Borrowing System in Dstory by anaphor · 2020-01-17 · 0 comments
-
…a tool. And some good news, the first stage of D's Ownership/Borrowing system was pulled today! https://github.com/dlang/dmd/pull/10586
comment by WalterBright · 2020-01-17 · in A Sad Day for Rust -
A prototype for the O/B system: https://github.com/dlang/dmd/pull/10586
comment by WalterBright · 2020-01-08 · in Specification for the D Programming Language -
…system memory safety is in the works for D. There's a prototype of it as a Pull Request: https://github.com/dlang/dmd/pull/10586
comment by WalterBright · 2020-01-08 · in Specification for the D Programming Language -
▲ 3
Dlang moves towards safe defaultstory by arunc · 2020-01-04 · 0 comments
-
Here's a piece I was proud of 20 years ago. Can you count all the ways it's a steaming pile? https://github.com/dlang/dmd/blob/master/src/dmd/root/outbuf... I've recently fixed a number of its problems, but it's got a ways to go. Am…
comment by WalterBright · 2019-10-09 · in Habits of Expert Software Designers -
…of disallowing more than one mutable pointer to the same variable being passed to a function: https://github.com/dlang/dmd/pull/10249 It's hard to tell in advance what effect this will have on the existing D user code base.
comment by WalterBright · 2019-08-02 · in John Carmack on Parallel Implementations (2018) -
I'm still running/maintaining code I originally wrote in the 1980's. https://github.com/dlang/dmd/tree/master/src/dmd/backend
comment by WalterBright · 2019-07-20 · in What senior engineers do: fix knowledge holes -
…program. Here's some code that initializes an array at compile time with a non-trivial computation: https://github.com/dlang/dmd/blob/master/src/dmd/backend/var... This used to be initialized by a separate program that generated some .d…
comment by WalterBright · 2019-07-16 · in Ownership and Borrowing in D -
…about dlang. I got the compiler flags from googling and happening upon the test case in this PR https://github.com/dlang/dmd/pull/8504/files#diff-bb6a3ed8a5... )
comment by Arnavion · 2019-04-20 · in The Power of Lifetimes -
…(1) and (2), you'd have been better off just writing a custom one. Here are D's lexer and parser: https://github.com/dlang/dmd/blob/master/src/dmd/lexer.d https://github.com/dlang/dmd/blob/master/src/dmd/parse.d For a complex language like…
comment by WalterBright · 2019-02-24 · in A meta approach to implementing programming languages (2018) -
I like how main() can still be found in mars.d[1]. 1. https://github.com/dlang/dmd/blob/master/src/dmd/mars.d#L909
comment by eco · 2018-12-05 · in Using D to Create the World’s Fastest File System -
…the least restrictive license we could find. We aren't going to switch to a more restrictive one. https://github.com/dlang/dmd/blob/master/LICENSE.txt
comment by WalterBright · 2018-08-22 · in The Commons Clause is an existential threat to open source -
…it does require arbitrary lookahead. It still isn't hard to parse, and the parser fits in one file: https://github.com/dlang/dmd/blob/master/src/dmd/parse.d
comment by WalterBright · 2018-08-20 · in Is Lisp Still Unique? Or at Least Different? (2002) -
…worked on it until it was flawless, then ran it overnight and did the transition all at once: https://github.com/dlang/dmd/pull/4923 I think the Go compiler did something similar. It certainly requires iteration of continuously attempting…
comment by trishume · 2018-06-20 · in How an Engineering Company Chose to Migrate to D -
Rather than debate, here's an example of replacing goto's with a nested function: https://github.com/dlang/dmd/pull/6656/files
comment by WalterBright · 2018-05-11 · in The Evolution of C Programming Practices: A Study of Unix (2016) [pdf] -
…in gcc will now be GPL(v?) licensed? This is certainly possible since dmd is licensed permissively. https://github.com/dlang/dmd/blob/master/LICENSE.txt I don't mean this to start a fight over licenses I'm just curious how it works when…
comment by CogitoCogito · 2017-06-21 · in D Language accepted for inclusion in GCC -
And best of all, it's the Boost license! Here it is: https://github.com/dlang/dmd/pull/6680
comment by WalterBright · 2017-04-07 · in The reference D compiler is now open source -
Here's how the dmd D compiler does it: https://github.com/dlang/dmd/blob/master/src/backend/divcoef...
comment by WalterBright · 2017-02-20 · in How do compilers optimize divisions? -
…into them and their associated tools. It's still fun watching a new optimization rumble into life: https://github.com/dlang/dmd/pull/6176 (Yes I know some other compilers do that already.) It's fun knowing how it all works from the source…
comment by WalterBright · 2016-10-07 · in Reflections of an “Old” Programmer -
…recently renamed https://github.com/D-Programming-Language to https://github.com/dlang , and e.g. https://github.com/D-Programming-Language/dmd redirects in the same way.
comment by CyberShadow · 2016-08-31 · in Smaller and faster data compression with Zstandard -
Here's one: https://github.com/D-Programming-Language/dmd/pull/4381/file... It's not even that big, and it's nearly impossible to scroll it.
comment by WalterBright · 2015-02-26 · in The birth of Microsoft's new web rendering engine -
…is a bit too big. You'd know better than I, but it looks like this is the round-up algorithm: https://github.com/D-Programming-Language/dmd/blob/master/sr...
comment by simonster · 2014-09-25 · in Faster Unsigned Division by Constants (2011) -
I think all modern compilers do this now. I know the D compiler does: https://github.com/D-Programming-Language/dmd/blob/master/sr...
comment by WalterBright · 2014-09-25 · in Faster Unsigned Division by Constants (2011) -
Seems to be open source now: https://github.com/D-Programming-Language/dmd
comment by eranation · 2014-05-03 · in Ask HN: Why isn't D more popular? -
▲ 3
Should we deprecate comma? (D programming language)story by redox_ · 2014-03-24 · 0 comments
-
…want to figure out how to write a lexer or parser, what better way than to read the code for one? https://github.com/D-Programming-Language/dmd/blob/master/sr... https://github.com/D-Programming-Language/dmd/blob/master/sr... There's a lot…
comment by WalterBright · 2014-02-05 · in So you want to write your own language? -
…and codegen) is not. The source code is available but you are not allowed to redistribute it. https://github.com/D-Programming-Language/dmd/blob/master/sr... (I wonder if you are allowed to fork it on GitHub.)
comment by albertzeyer · 2013-10-11 · in Facebook is using D in production starting today -
…of the compiler's work goes even faster. The top cycle sucker is Lexer::scan(). Here's the source: https://github.com/D-Programming-Language/dmd/blob/master/sr... See line 440. It's entirely possible I've missed something glaringly obvious…
comment by WalterBright · 2013-07-25 · in Increasing the D Compiler Speed by Over 75% -
Parts of the D compiler were written in 1982-3 and are still in use. https://github.com/D-Programming-Language/dmd 30 years! It's sorta like our genes carry bits and pieces of the animals we evolved from millennia ago.
comment by WalterBright · 2012-03-29 · in Prince of Persia creator finds lost source code 23 years later -
…the D programming language compiler could use your help in improving its optimizations. https://github.com/D-Programming-Language/dmd
comment by WalterBright · 2011-06-15 · in Pentium Appendix H fiasco