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
-
…the entire article. > Not sure what you mean. RAX means register RAX. %RAX is not accepted. This: https://github.com/dlang/dmd/blob/master/druntime/src/core/i... It's why I referred to your "trick", which is something I wanted to need in…
comment by gingerBill · 2026-08-23 · in Everyone says assembly is untyped—everyone is wrong -
Here's how D does it for the x86_64: https://github.com/dlang/dmd/blob/master/druntime/src/core/i... It's the statement form, uses Intel syntax, and the compiler keeps track of which registers are modified.
comment by WalterBright · 2026-08-22 · in Everyone says assembly is untyped—everyone is wrong -
…to be passed to walker(), because the other context data is accessible from the enclosing function. https://github.com/dlang/dmd/blob/master/compiler/src/dmd/ba...
comment by WalterBright · 2026-08-15 · in Using GCC's Nested Functions with Wide Pointers and No Trampolines II -
…spend a lot of time finding ways to work with all the nutburger nonsense in the various .h files. https://github.com/dlang/dmd/blob/master/druntime/src/import... https://github.com/dlang/dmd/blob/master/druntime/src/__impo...
comment by WalterBright · 2026-05-25 · in C extensions, portability, and alternative compilers -
…https://github.com/golang/go/blob/2bd7f15dd7423b6817939b199c... D, https://github.com/dlang/dmd/tree/master/druntime/src/core/i... Or even Smalltalk, https://github.com/pharo-project/pharo-vm/blob/pharo-10/smal...
comment by pjmlp · 2026-01-29 · in Writing a .NET Garbage Collector in C# – Part 6: Mark and Sweep -
> I use: https://github.com/dlang/dmd/blob/master/compiler/src/dmd/ba... It's pretty minimalist on purpose. I don't much care for kitchen sink types. I feel you're demonstrating exactly the problems I highlighted through your example here…
comment by dataflow · 2025-07-03 · in Features of D That I Love -
I use: https://github.com/dlang/dmd/blob/master/compiler/src/dmd/ba... It's pretty minimalist on purpose. I don't much care for kitchen sink types. The BetterC is the no-gc version. Use the -betterC switch on the compiler. Or, if you want…
comment by WalterBright · 2025-07-03 · in Features of D That I Love -
…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
comment by croemer · 2025-04-26 · in Programming in D: Tutorial and Reference -
▲ 5
Programs compiled with recent D compiler are broken in macOS 15.4story by croemer · 2025-04-06 · 0 comments
-
▲ 3
DMD v2.110.0 has been releasedstory by fithisux · 2025-03-08 · 1 comment
-
…returned by a lambda that computes the array and then returns it. A link to the full glory of it: https://github.com/dlang/dmd/blob/master/compiler/src/dmd/ba... Another common use for CTFE is to use it to create a DSL.
comment by WalterBright · 2025-01-07 · in Zig's comptime is bonkers good -
> you've written an an ARM disassembler Here's my AArch64 disassembler work in progress: https://github.com/dlang/dmd/blob/master/compiler/src/dmd/ba... I add to it in tandem with writing the code generator. It helps flush out bugs in both…
comment by WalterBright · 2024-07-10 · in Things I learned while writing an x86 emulator (2023) -
▲ 2
D: Initial Aarch64 Supportstory by tosh · 2024-06-04 · 0 comments
-
Yup, dmd also has an error type: https://github.com/dlang/dmd/blob/master/compiler/src/dmd/mt...
comment by WalterBright · 2024-05-06 · in Results of the Grand C++ Error Explosion Competition (2014) -
P.S. The DFA I wrote for Datalight C still persists in the DMD D compiler: https://github.com/dlang/dmd/blob/master/compiler/src/dmd/ba...
comment by WalterBright · 2024-05-05 · in A History of C Compilers – Part 1: Performance, Portability and Freedom -
Here's the pipeline spitting out the same error as on my macbook did. https://github.com/dlang/dmd/actions/runs/8023469412/job/219...
comment by Alifatisk · 2024-02-23 · in DMD Compiler as a Library: A Call to Arms -
…on all supported platforms, including Windows and OSX. I am at a loss why it isn't working for you. https://github.com/dlang/dmd/pull/16238
comment by WalterBright · 2024-02-23 · in DMD Compiler as a Library: A Call to Arms -
…compiler badass and HN frequenter, where he checks in an entire C compiler to the D language repo: https://github.com/dlang/dmd/pull/12507 https://news.ycombinator.com/item?id=27102584
comment by tomcam · 2024-02-01 · in My favourite Git commit (2019) -
…it is far less complex and, in my opinion, much smaller than the entire C parser proper. [1] https://github.com/dlang/dmd/pull/15307/files#diff-3677bcc89...
comment by lifthrasiir · 2024-01-31 · in The C bounded model checker: criminally underused -
…Richard Cattermole has been adding them to D's C support, requiring 6000 lines of code!! https://github.com/dlang/dmd/pull/15307 The entire C parser is 6000 lines of code: https://github.com/dlang/dmd/blob/master/compiler/src/dmd/cp...
comment by WalterBright · 2024-01-30 · in The C bounded model checker: criminally underused -
D is completely opensource already ( https://github.com/dlang/dmd ). The "open" of OpenD is just ADR saying that OpenD will be more open to new language features than D has historically been.
comment by LorenDB · 2024-01-14 · in OpenD, a D language fork that is open to your contributions -
The reference compiler, DMD, is open source: https://github.com/dlang/dmd But they don't accept just any Pull Request or features the community submits, understandably. There's a process called DIP for language improvements:…
comment by brabel · 2024-01-05 · in The OpenD Programming Language (fork of D) -
…GDC is based on GCC: https://github.com/D-Programming-GDC/gdc DMD is stand-alone: https://github.com/dlang/dmd
comment by gomoboo · 2023-09-23 · in Ask HN: Who is using the D language and likes/doesn't like it? Why? -
An example: https://github.com/dlang/dmd/blob/master/compiler/src/dmd/cp...
comment by WalterBright · 2023-01-15 · in The Inner Beauty of Basic Electronics -
▲ 2
cparse.dstory by tosh · 2022-11-07 · 0 comments
-
…read the .h file, parse it, and present the ABI to it in a D-ish manner to your D code. Here it is: https://github.com/dlang/dmd/blob/master/compiler/src/dmd/cp... It's so darned useful I expect other languages will do it, too. People were…
comment by WalterBright · 2022-11-07 · in C isn't a programming language anymore -
Here's a one file disassembler for x86 and its successors: https://github.com/dlang/dmd/blob/master/compiler/src/dmd/ba... The fun thing to do with it is send it your name and have it disassemble it. (I use it to check the object code…
comment by WalterBright · 2022-10-31 · in A 23-byte “hello, world” program assembled with DEBUG.EXE in MS-DOS -
The C compiler I wrote last year: https://github.com/dlang/dmd/blob/master/compiler/src/dmd/cp... is vastly different from the one I wrote in the 1980s: https://github.com/DigitalMars/Compiler/blob/master/dm/src/d... My original evil plan…
comment by WalterBright · 2022-10-29 · in The Business Impact of Code Quality -
…the D lexer and semantics to handle the differences of C. It's not too bad, about 5000 lines of D: https://github.com/dlang/dmd/blob/master/compiler/src/dmd/cp...
comment by WalterBright · 2022-10-23 · in C2Rust Transpiler -
…For something more modern in D, also a GC enabled systems programming language, https://github.com/dlang/dmd/tree/master/druntime/src/core
comment by pjmlp · 2022-08-29 · in I like Odin -
And now you can embed a free x86 disassembler in your program. https://github.com/dlang/dmd/blob/master/compiler/src/dmd/ba... The cool thing to do with it is add it to your favorite text editor as a command - highlight some of your text…
comment by WalterBright · 2022-07-26 · in Yes, the 8086 wanted to be mechanically translatable from the 8080, but -
…say that dmd's backend is terrible and undocumented, but I don't know what they're talking about: https://github.com/dlang/dmd/tree/master/src/dmd/backend
comment by WalterBright · 2022-06-14 · in Diving into GCC Internals -
…* License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/parse.d, _parse.d) * Documentation: https://dlang.org/phobos/dmd_parse.html * Coverage:…
comment by WalterBright · 2022-04-15 · in Moreutils: A collection of Unix tools that nobody thought to write long ago -
I like to use compile time code to generate fixed tables, like these: https://github.com/dlang/dmd/blob/master/src/dmd/backend/ope... Notice how a static immutable array is created by a lambda at compile time. The lambda never appears in…
comment by WalterBright · 2022-02-13 · in Compile-Time Sort in D -
https://github.com/dlang/dmd/tree/master/test I work on D too, feel free to email.
comment by mhh__ · 2022-01-12 · in Why I Like D -
…can add it to your favorite text editor! Admit it, you've always wanted to disassemble your text. https://github.com/dlang/dmd/blob/master/src/dmd/backend/dis...
comment by WalterBright · 2022-01-12 · in Why I Like D -
Hi! Massively predictable comment making noises about Symantec code-dumping QEMM, DESQview and DESQview/X :) Besides being a lot of fun to read, the latter (which incidentally got some attention on here just a month ago -…
comment by exikyut · 2022-01-08 · in Unidentified PC DOS 1.1 Boot Sector Junk Identified -
Just read the code for an existing one like: https://github.com/dlang/dmd/blob/master/src/dmd/cparse.d which is a C parser. It's not hard to follow.
comment by WalterBright · 2021-08-22 · in Parser generators vs. handwritten parsers: surveying major languages in 2021 -
…ability to execute functions at compile time, I've been using a lot of _Static_assert() constructs. https://github.com/dlang/dmd/blob/a5b16bd8e72a447d509cca862e...
comment by WalterBright · 2021-08-10 · in Constexpr is a Platform (2020) -
…the specific commit you're looking at, ensuring the line number doesn't get out of date. Example: https://github.com/dlang/dmd/blob/9003e2ae7e11faed433638e9cb...
comment by dkorpel · 2021-08-07 · in Reflections on 10k Hours of Programming -
…link (for D) or a paragraph number (for C) that references the corresponding specification section: https://github.com/dlang/dmd/blob/master/src/dmd/cparse.d#L5... Ever since the Intel CPU spec went online, I started doing this with the…
comment by WalterBright · 2021-08-06 · in Reflections on 10k Hours of Programming -
…form. https://dlang.org/spec/importc.html It works by having an extra module called cparse.d https://github.com/dlang/dmd/blob/master/src/dmd/cparse.d which parses Standard C. The lexer and semantic routines of the D compiler are then…
comment by WalterBright · 2021-07-18 · in Zig cc: A drop-in replacement for GCC/Clang (2020) -
▲ 1
Allow using if (condition) instead of if ( (condition))story by crazypython · 2021-05-11 · 1 comment
-
…the C code through the D front end. You can see it in action in the test cases in this file: https://github.com/dlang/dmd/pull/12507/files#diff-b94776a02... Scroll down a bit and you'll see it executes C functions at compile time. I…
comment by WalterBright · 2021-05-10 · in Adding ANSI C11 C compiler to D so it can import and compile C files directly -
…D is going the route of actually implementing a C compiler in the D compiler. Here's the C parser: https://github.com/dlang/dmd/pull/12507/files#diff-2fc171ca9... You could argue that writing a C compiler instead of using libclang is an…
comment by WalterBright · 2021-05-10 · in Adding ANSI C11 C compiler to D so it can import and compile C files directly -
▲ 165
Adding ANSI C11 C compiler to D so it can import and compile C files directlystory by ingve · 2021-05-10 · 105 comments
-
…a custom backend so this change was easy. Rust which relies on LLVM would probably need a fork. [1] https://github.com/dlang/dmd/pull/8168 [2] https://github.com/dlang/dmd/blob/33406c205b76a8c2b5fb918da1... [3]…
comment by JacobCarlborg · 2021-04-18 · in Reducing Rust Incremental Compilation Times on macOS -
…weeds.] ¹ Although, I appreciate far less than either you, or especially WalterBright, have. ² https://github.com/dlang/dmd/pull/6680
comment by JNRowe · 2021-03-15 · in Creating an Excel Add-In in D -
…in the last few days I started putting in optimizations to take advantage of D's new "bottom" type: https://github.com/dlang/dmd/pull/12245
comment by WalterBright · 2021-03-04 · in Accidentally quadratic: When Python is faster than C++