need more mutuals/friends on here. rts appreciated. here's some things i'm interested in:
#programming #bbs #bbses #linux #kde #cpp #archlinux #opensource #shitposting #metal #privacy #InternetExploring
#InternetExploring #Privacy #Metal #shitposting #OpenSource #ArchLinux #cpp #KDE #Linux #bbses #bbs #Programming
C++23 will be officially released later this year but is already complete. Explore how the latest C++ standard helps write modern, efficient, robust, & future-proof code with Giuseppe D'Angelo at the KDAB Training Day on November 27th. #cpp #cplusplus
I received the Best Speaker Award from ESE Kongress for my talk C++ 20 Templates - Die nächste Generation.
#AwardWinning #cpp20 #cpp #cplusplus
I've created a simple C-struct based v-table object and a C++
virtual class with the same methods. C and C++ apps could link both variants and apply native C or C++ method invocations to the same object pointers.
I run some tests on Windows X64 + ARM64 and on Linux x64 + ARM32 + RISC-V. No crashes, all succeeded.
Now I know: My virtual C++ classes have a C interface too. It's not a standard, but implemented by standard compilers. Nice! 🤓
https://bitbucket.org/gatenetwork/gate-blog-classroom/src/master/c_cpp/vtable_interfaces/
Constants can sometimes help find (certain) errors at compile time instead of runtime: constexpr over const variables; const variables over non-const variables; and macros or literals if you must.
Obviously, constants don't always provide this benefit, but strive to use them where opportunity permits.
Example: https://sigcpp.godbolt.org/z/sjd5vWrPn
(Also, avoid "naked new", but that's for another time.)
#cpp #cplusplus #programming #software #softwarequality
@jakub_neruda Yeah!
But please remember: this is #cpp 2023 alpha. Cpp 2023 has abandoned io streams and sent them to greener pastures.
I will be speaking at NDC TechTown 2023! The talk's title is "C++ Coroutines from scratch". Come and join me there!
https://ndctechtown.com/agenda/c-coroutines-from-scratch-0mqw/0n2r6pkwh1g
@meetingcpp Jens, it looks like *deliberately not* checking any of the options before hitting 'submit' keeps bringing up the same poll over and over again. For example
"Which boost libraries from the concurrent programming category do you use?"
My answer: absolutely none unless you aim a gun on my head.
I totally love vanilla, untainted Asio, though. I'm not sure if 'true' Asio ever appears in one of your polls.
@smurthys RAII is about maintaining 'responsibility' of some resource throughout the lifetime of the object that provides 'RAII-ness'.
'Copy-ability' (or the lack thereof) is a trait that's SOLIDly orthogonal to 'RAII-ness'. The lack of 'copy-ability' provides the notion of 'uniqueness', that or alternatively non-sharing 'copy-ability' provide the notion of 'independence'. And that is a *necessary* trait of value types.
Sharing 'copy-ability' provides a new class of headaches.
Here it is https://github.com/chromium/subspace/pull/356
The Error, Fn, FnMut and FnOnce concepts all support type erasure now, as the DynError, DynFn, DynFnMut, and DynFnOnce types respectively.
Other libs or applications can provide the same functionality for their concepts where it makes sense.
This enables the use of concept-based development without requiring the use of templates. Thus concepts can appear in virtual APIs or in functions where the body lives in a .cc file.
Otherwise, you are required to use inheritance to do the same, but you can't make everything inherit from a base class. For example an enum can match a concept but can't inherit.
And inheritance _forces_ virtual dispatch onto all users of your type. A concept-based approach allows templated code to work in the most efficient way possible, and to be completely constexpr, while now allowing non-template code access to those same concepts.
WIP. Updated a lot of the code. Added initial sound support (pc speaker) with test tune.
Now the intro can be run in DosBox in a browser!
=> https://demoscene.p1x.in/intros/01/
It runs 2x fast as it should but still fascinating :)
#demoscene #dos #freedos #cpp #intro #dosbox #wasm
My robotics experiments are slowly but surely coming together. It’s a nice feeling. #supercollider #cpp #robotics
WIP. Updated scenes. Added sprite snake.
#demoscene #dos #freedos #cpp #intro
I am unsure whether to learn :rust: #Rust or :haskell: #Haskell next. (Not that I have time to, but one may dream, right? 😉).
Knowing Haskell would allow me to contribute to some software I deeply care about (#hledger, :gitannex: #gitAnnex). Rust on the other hand looks *much* easier to get going with coming from #Python (and embedded #C / #Cpp). Its cargo toolchain and ecosystem also looks nicer, plus easier availability on all architectures (aarch64!).
#rust #haskell #hledger #gitannex #python #c #cpp
I think we can generalize the pattern of "type-erasure of a concept through a virtual interface" sufficiently that
Box<DynConcept>::from(Concept c)
can be implemented generically for any concept/template-type pair that provides this erasure.
https://godbolt.org/z/9EEznnq8a
Like Box<dyn Trait>::from(T: Trait) which is implemented for special stdlib traits in Rust.
#Cpp lets you do ~anything for better or for worse, so I guess we can make it more general in #SubspaceCpp.
I would like if you can `using X = Concept` to alias a concept from in a type, unlucky that we have to fall back to a static constexpr bool which won't participate in the better error messages that concepts allow.
@cuchaz I am also troubled by #Cpp stdlib norm being (start, len) vs #Rust stdlib being (start, end) which is going to be a source of bugs in mixed-language codebases. And it’s conspicuously the same thing as long as your start is 0, which is very common.
(I also think Rust has the right choice here.)
The std::queue is a container adapter that implements the interface of a FIFO queue.
The options for the backing containers are std::deque and std::list.
Compiler Explorer link: https://compiler-explorer.com/z/5Gbo53hMx
#cpp #cplusplus #coding #programming #dailybiteofcpp