home.social

#dlang — Public Fediverse posts

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

  1. Недавно достиг первого результата в SDL GPU: потестировал меши, трансформации, постпроцессинг свечения - простой, но зрелищный эффект, текстуры и прочее элементарное.

    Вышел регулятор Уатта из эпохи паровых машин. Механизм ходит не слишком ровно, но я доволен. Хотя бы что-то движок уже показывает.

    Есть некоторые проблемы производительности при смешивании старого SDL_Renderer и нового API.

    youtube.com/shorts/wX5A2W_oJI4

    #dlang #sdl #enginedev #graphicsprogramming #программирование #ит

  2. Попытка оптимизировать техноблог, обходясь лишь видеоплощадками - с треском провалилась. Трудоёмкость экспериментов создаёт перерывы в видео, нужно место для девлогов. Приземляемся в Mastodon обратно.

    Фиксируем результат весны 2026. Лучше развился инфоотсек: почти выстроен прототип GUI-тулкита на #SDL (SDL_Renderer + Cairo) и #Dlang. Но SDL GPU в SDL3 заставляет погружаться в 3D. Весной вспоминал OpenGL, аналогией портируя в SDL GPU и HLSL.

    #enginedev #graphicsprogramming #программирование #ит

  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. 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.

  6. 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.

  7. 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.

  8. @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

  9. @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

  10. @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

  11. @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

  12. @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

  13. 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

  14. 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

  15. 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

  16. 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

  17. 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

  18. 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

  19. The latest and greatest: BindBC-bgfx 1.0 is coming out very soon! It features a new API based on bgfx’s C++ API with some slight tweaks to make it match the D style better, so it should be a lot nicer to use than before! :) and yes, it’s still auto-generated so it has full documentation!
    I’ve already converted one of my projects to using it and I’m excited to see everyone else getting to try it!

    #bindbc #dlang #foss #bgfx #programming #programminglanguages

  20. The latest and greatest: BindBC-bgfx 1.0 is coming out very soon! It features a new API based on bgfx’s C++ API with some slight tweaks to make it match the D style better, so it should be a lot nicer to use than before! :) and yes, it’s still auto-generated so it has full documentation!
    I’ve already converted one of my projects to using it and I’m excited to see everyone else getting to try it!

  21. I’ve been needing something akin to, what I now know to be Java’s ExecutorService, but in my language of choice - D! So I decided to go about it and implement it.

    I’ve written it in such a manner such that is is extendable and new providers (job runners, think “pooled threads”, “serial runners” and so on) can be plugged in easily. For the initial proof of concept I created a SequentialProvider which just consumes tasks and executes them on a single thread in serial, next up is the thread pool version which I will get around to soon enough.

    It’s really been fun to actually play with meta-programming more in D - I had to this time as I had to be able to make using this library as pleasant as possible as I require it for a project of mine - and I don’t want any hassles.

    So there ya go!

    https://deavmi.assigned.network/blog/guillotine/

    #threading #executors #futures #dlang

  22. 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

  23. 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

  24. 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

  25. 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

  26. 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