home.social

#dlang — Public Fediverse posts

Live and recent posts from across the Fediverse tagged #dlang, aggregated by home.social.

fetched live
  1. surprised Walter Bright didn't get a mention, seems to me he had something to do with how early c++ "just spread" #dlang

  2. surprised Walter Bright didn't get a mention, seems to me he had something to do with how early c++ "just spread" #dlang

  3. During the pandemic lockdowns, I did the first "Ray Tracing in One Weekend" book in D (#dlang).

    raytracing.github.io/

    I thought it'd be fun to continue with the second book. I now wasted so many hours trying to get this working again (both on macOS and a Linux container) that it's probably quicker to rewrite it in another language and forget about D. Shame.

  4. During the pandemic lockdowns, I did the first "Ray Tracing in One Weekend" book in D (#dlang).

    raytracing.github.io/

    I thought it'd be fun to continue with the second book. I now wasted so many hours trying to get this working again (both on macOS and a Linux container) that it's probably quicker to rewrite it in another language and forget about D. Shame.

  5. @soulsource it’s worse than that. Non-destructive moves, while definitely an improvement on the semantic horror of auto_ptr, force us to have objects with an “empty” state, repeating the billion dollar mistake again and again… Rust is so much better in that respect that it isn’t funny

    Self-referential legacy objects could probably even have been made movable by introducing something akin to D’s post-blit operator (but for moves)

    #cplusplus #rust #dlang

  6. @soulsource it’s worse than that. Non-destructive moves, while definitely an improvement on the semantic horror of auto_ptr, force us to have objects with an “empty” state, repeating the billion dollar mistake again and again… Rust is so much better in that respect that it isn’t funny

    Self-referential legacy objects could probably even have been made movable by introducing something akin to D’s post-blit operator (but for moves)

    #cplusplus #rust #dlang

  7. Juan Vazquez and Cameron Cunning rejoin the show to discuss how we fared with the 2025 Advent of Code competition.

    straypointers.com/e/s4e01.htm

  8. So thinking about asyncronous programming again and how I probably need to ditch #dlang's GC if I want performance and then it hit me:

    Why tf is std.socket.Socket an heap-allocated, gc'd class to begin with?!?!

    It dosn't uses syncronized that would require a classes monitor, nor does it hold any significant amount of data.

    • a socket_t (fancy 32-bit fd)
    • a ushort-enum for the address family (16-bit)
    • and an bool under windows, which in an asyncronous context we could remove since all will always be non-blocking

    So in sum it holds 48-bit of data, while an pointer on modern systems will always be 64-bit (classes are always pointers / by ref in dlang).

    Sure, it "uses" inheritance for 2 wrapper types TCPSocket and UDPSocket, which dont actually do anything other than pre-filling the type/protocol arguments in the constructor, which dont even survive after the call to socket(2)...

    Is the std really that badly engineered at times or am I going crazy???

    #dlang #programming #development #async #networking #garbagecollector

  9. So thinking about asyncronous programming again and how I probably need to ditch #dlang's GC if I want performance and then it hit me:

    Why tf is std.socket.Socket an heap-allocated, gc'd class to begin with?!?!

    It dosn't uses syncronized that would require a classes monitor, nor does it hold any significant amount of data.

    • a socket_t (fancy 32-bit fd)
    • a ushort-enum for the address family (16-bit)
    • and an bool under windows, which in an asyncronous context we could remove since all will always be non-blocking

    So in sum it holds 48-bit of data, while an pointer on modern systems will always be 64-bit (classes are always pointers / by ref in dlang).

    Sure, it "uses" inheritance for 2 wrapper types TCPSocket and UDPSocket, which dont actually do anything other than pre-filling the type/protocol arguments in the constructor, which dont even survive after the call to socket(2)...

    Is the std really that badly engineered at times or am I going crazy???

    #dlang #programming #development #async #networking #garbagecollector

  10. Currently working (again) on my async framework in #dlang

    I need to say coming back to #dlang after a extensive while of #rust coding, I do miss a lot of features of rust already (tho it's nice for once not fighting against the borrow checker or some strange tokio bugs), like choice-types, pattern matching and traits.

    Tho it's nice to just have an decent gc and not the need of wrapping everything in `Arc<RefCell<Box<T>>>` /s

    Got plenty of ideas for my async framework after working with tokio (and reading parts of it and mio).

    #coding #programming #development #async #eventdriven

  11. The Advent of Code 2025 Pregame Show

    Cameron Cunning and Juan Vazquez rejoin the podcast to discuss our approaches to the forthcoming Advent of Code 2025 coding competition in December.

    straypointers.com/e/s3e11.htm

  12. The Advent of Code 2025 Pregame Show

    Cameron Cunning and Juan Vazquez rejoin the podcast to discuss our approaches to the forthcoming Advent of Code 2025 coding competition in December.

    #rust #elixirlang #dlang #Aoc2025 #AdventOfCode #programming

    straypointers.com/e/s3e11.htm

  13. About 8 years ago I tried to convert Titanion (a 2.5D shooter game by Kenta Cho) from #dlang to #rust as a means to learn Rust and make the game open to more developers. The porting effort was also done in part as a live coding session at @OpenLabAugsburg. After about three month of intense head scratching I gave up because the Rust borrow checker does not like spaghetti code and I was a beginner. Now I tried again but with C++. I succeeded. So here it is: github.com/mwarning/titanion

  14. A new #blog post appears!

    I discovered that the GNU D compiler has been broken on FreeBSD 14 for over a year and it seems no one noticed. Let's discover the issue and brainstorm some solutions to it.

    A great case study for why operating system package maintainers matter.

    briancallahan.net/blog/2025081

    #dlang #dlanguage #freebsd #bsd #openbsd #netbsd #dragonflybsd #unix #gcc #gdc #gnu #compiler #compilers #d #linux #opensource #freesoftware

  15. A new #blog post appears!

    I discovered that the GNU D compiler has been broken on FreeBSD 14 for over a year and it seems no one noticed. Let's discover the issue and brainstorm some solutions to it.

    A great case study for why operating system package maintainers matter.

    briancallahan.net/blog/2025081

    #dlang #dlanguage #freebsd #bsd #openbsd #netbsd #dragonflybsd #unix #gcc #gdc #gnu #compiler #compilers #d #linux #opensource #freesoftware

  16. I don't get it. Why is #Dlang not more popular? Why do people talk about it only in whispers?
    #programminglanguages

  17. I don't get it. Why is #Dlang not more popular? Why do people talk about it only in whispers?
    #programminglanguages