90 karma · joined Oct 12, 2019 (7y ago) · 41 submissions
comment 2mo ago · link · parent
comment 7mo ago · link · parent
What exactly is it you do/need that can't be reasonably solved using the FetchContent module?
https://cmake.org/cmake/help/latest/module/FetchContent.html
7.
The kenopsia of dead software [video](youtube.com ↗)
2 points · by macgyverismo · 7mo ago · 1 comment
9.
Datacenters behaving like acoustic weapons [video](youtube.com ↗)
2 points · by macgyverismo · 9mo ago · discuss
comment 1y ago · link · parent
Reading the part about pure functions (including the extension [[gnu::pure]]) made me feel that this is a part where the C++ default is actually wrong. Not just because it could be better/hindsight/other languages have it/etc. but because it is in conflict with its own motto, don't pay for what you don't use. I really hope I can enable a compiler flag some time in the future that would make my variables const, and my functions pure by default.
comment 1y ago · link · parent
The author needed to use unsafe in order to pass his pointer to libmodem, but libmodem is going to require a pointer with static lifetime itself. Which would have prevented the issue in the first place had the author done this.
I can see why you wouldn't want to use static, it hinders testability, but that means you need to ensure that the pointer you supply libmodem outlives libmodem. I would use RAII to do that in C++ and I am sure in rust you could/would do the same.
I guess I am asking, is there anything here that a libmodem written in rust would have magically solved? It feels like wishful thinking, but I am open to learn where I am mistaken.
In any case, kudos for finding this bug. Having worked with Zephyr/NRF connect SDK and this exact chip myself I can definitely relate to the pain they (can) bring.
comment 2y ago · link · parent
No need to school me on how that isn't true, I'm just describing my feeling and why I love C++.
comment 2y ago · link · parent
comment 2y ago · link · parent
comment 2y ago · link · parent
comment 2y ago · link · parent
Could someone explain to me when one would use this? Is it for educational purposes perhaps?
comment 2y ago · link · parent
- everything in Rust-land is named differently. They are not different, but use different names.
- nothing wants to be a value
- nothing is implemented by default.
If you can get those 3 items in your brain, you can start thinking in Rust. Coming from one c++ dev to another; You may still not like the language. I know I dont, even though I agree with the premise that defaults should be ‘safe’
comment 2y ago · link · parent
comment 2y ago · link · parent
comment 2y ago · link · parent
comment 3y ago · link · parent
With the recent AI buzz I got to think, maybe the keep from the story are higher level concepts that exist only after the underlaying layers have been trained and can therefore not be adressed before.
28.
Lead Acid Alternative Battery(gelion.com ↗)
1 points · by macgyverismo · 4y ago · 1 comment