nomicon
dmd
Our great sponsors
nomicon | dmd | |
---|---|---|
87 | 146 | |
1,655 | 2,882 | |
3.9% | 0.9% | |
5.5 | 9.9 | |
4 days ago | 6 days ago | |
CSS | D | |
Apache License 2.0 | Boost Software License 1.0 |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
nomicon
-
[Media] I'm comparing writing a double-linked list in C++ vs with Rust. The Rust implementation looks substantially more complex. Is this a bad example? (URL in the caption)
itโs even written by the same person that wrote the Nomicon (the guide to the dark arts of unsafe)
-
Rust books to read
If you want to dive deeper you can always have other options but now there are concrete cases, if you want to do low level thing https://doc.rust-lang.org/nomicon/ while if you want multi thread/concurrency stuff https://marabos.nl/atomics/ . There are many many books so you will have to point yourself to what you want
-
Unsafe Rust
Nice video! Glad I could help out. This stuff is hard, and I'm still learning a lot about it myself even years later. The Rustonomicon is a great read if you haven't already.
-
Stepping up the YAML engineer game
Have you got a moment to read through the good book , after reading through this perhaps try the Rustonomicon.
- Questions about ownership rule
-
How to write deserializer for custom binary protocol?
However, this is a wide topic out of scope for a Reddit comment, so maybe just read the Rustonomicon. It explains everything about data handling in Rust.
-
Performance critical ML: How viable is Rust as an alternative to C++
The ownership model & borrow checker makes rust a bit of an awkward language in which to write complex data structures like trees and graphs. It can be done - since you can always use raw pointers & unsafe code when you absolutely need to to treat rust like C. But the language fights you, and the community can get a bit moralistic about this sort of thing. The rust nomicon is a fantastic resource for learning the limits of the borrow checker, and where and how to use unsafe code correctly. You will need unsafe less than you think you will, but sometimes you will have no choice.
-
Sudo and Su Being Rewritten in Rust for Memory Safety
That's a really good point that I feel like isn't talked about enough. Unsafe rust is a lot harder to write correctly than bog standard C, because you have to uphold the invariants to avoid undefined behavior (1). It's why there's a whole ebook about it (2).
That doesn't mean it's impossible to write correct unsafe code, it's just not as obvious as "trust me bro I know better than borrowck." You can't actually elide the invariants Rust upholds, you just have to take over from the compiler when it can't prove them.
(1) https://doc.rust-lang.org/reference/behavior-considered-unde...
-
C++ to Rust Books?
If you are interested in the theoretical stuff that doesn't have much overlap with C++, give the Nomicon a try, or even Learn Rust the Dangerous Way.
-
How can I use rust libraries in zig/C
There's also cbindgen for automating the generation of C headers once you've got your code in the right shape and you'll also want to read the Rustonomicon.
dmd
- D2 Playground
-
DMD Compiler as a Library: A Call to Arms
Here's the pipeline spitting out the same error as on my macbook did.
https://github.com/dlang/dmd/actions/runs/8023469412/job/219...
I added your code to the D test suite. It passes on all supported platforms, including Windows and OSX. I am at a loss why it isn't working for you.
-
My favourite Git commit (2019)
Not completely on topic (if you read TFA) but my favorite Git commit is by compiler badass and HN frequenter, where he checks in an entire C compiler to the D language repo:
-
The C Bounded Model Checker: Criminally Underused
A new generated code alone is 4000 lines long [1]. The actual code added is just 2000 lines, and some are used to pay debts, I mean, to make a proper code generator (which can be alternatively written in a simpler scripting langauge). In any case it is never comparable to the entier C parser proper.
[1] https://github.com/dlang/dmd/pull/15307/files#diff-3677bcc89...
Thank you for the explanation.
I agree that if one isn't going to enhance C, one is going to have to resort to these tools.
C gets new features now and then. Why not add something incredibly useful, like the slice proposal? Instead, C23 got enhanced with the crazy Unicode identifiers. 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...
-
OpenD, a D language fork that is open to your contributions
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.
-
The OpenD Programming Language (fork of D)
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: https://github.com/dlang/DIPs/blob/master/DIPs/README.md
However, by some accounts, it's really hard to get anything through.
Given D already has so many feature, I find that to be a good thing , to be honest, by not everyone agrees, of course.
- Odin Programming Language
- D Programming Language
What are some alternatives?
book - The Rust Programming Language
zig - General-purpose programming language and toolchain for maintaining robust, optimal, and reusable software.
mdBook - Create book from markdown files. Like Gitbook but implemented in Rust
rust-ffmpeg - Safe FFmpeg wrapper.
ldc - The LLVM-based D Compiler.
v - Simple, fast, safe, compiled language for developing maintainable software. Compiles itself in <1s with zero library dependencies. Supports automatic C => V translation. https://vlang.io
dextool - Suite of C/C++ tooling built on LLVM/Clang
Theseus - Theseus is a modern OS written from scratch in Rust that explores ๐ข๐ง๐ญ๐ซ๐๐ฅ๐ข๐ง๐ ๐ฎ๐๐ฅ ๐๐๐ฌ๐ข๐ ๐ง: closing the semantic gap between compiler and hardware by maximally leveraging the power of language safety and affine types. Theseus aims to shift OS responsibilities like resource management into the compiler.
Exercism - website - The codebase for Exercism's website.
Odin - Odin Programming Language
miri - An interpreter for Rust's mid-level intermediate representation
llvm-project - The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.