Hacker GitHub

← All repos

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

Mentions per year 93 mentions · busiest year 2020 (17)
20082026
  1. …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…
  2. 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.
  3. …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...
  4. …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...
  5. …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...
  6. > 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
  7. 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
  8. …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
  9. …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
  10. > 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…
  11. Yup, dmd also has an error type: https://github.com/dlang/dmd/blob/master/compiler/src/dmd/mt...
  12. 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...
  13. 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
  14. …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
  15. …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)
  16. …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...
  17. …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...
  18. 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.
  19. 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:…
  20. …GDC is based on GCC: https://github.com/D-Programming-GDC/gdc DMD is stand-alone: https://github.com/dlang/dmd
  21. 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
  22. > difficult to parse Not really. Just create a bit mask. https://github.com/dlang/dmd/blob/master/compiler/src/dmd/cp...
    comment by WalterBright · 2022-12-21 · in Checked C
  23. …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
  24. 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…
  25. 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
  26. …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
  27. …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
  28. 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…
  29. …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
  30. …* 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:…
  31. 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
  32. 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
  33. …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
  34. 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 -…
  35. 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.
  36. …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)
  37. …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
  38. …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
  39. …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…
  40. …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…
  41. …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…
  42. …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]…
  43. …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
  44. …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
  45. …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)
  46. …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...
  47. 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…
  48. 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…
  49. Here's D's spell checker, tests included! Edit: forgot the link https://github.com/dlang/dmd/blob/master/src/dmd/root/spelle...
  50. …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