zayd · @zayd
3 followers · 21 posts · Server mstdn.social
KDAB · @kdab
193 followers · 147 posts · Server techhub.social

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.

🔗 youtu.be/ZakKAQiEBRs

#cpp #cplusplus

Last updated 1 year ago

Andreas Fertig · @andreasfertig
250 followers · 74 posts · Server mas.to

I received the Best Speaker Award from ESE Kongress for my talk C++ 20 Templates - Die nächste Generation.

andreasfertig.blog/2023/09/bes

#AwardWinning #cpp20 #cpp #cplusplus

Last updated 1 year ago

GateLinker · @gatelinker
15 followers · 85 posts · Server fosstodon.org

== vtable

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! 🤓

bitbucket.org/gatenetwork/gate

#c #vtable #cpp

Last updated 1 year ago

sigcpp · @sigcpp
41 followers · 79 posts · Server hachyderm.io

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: sigcpp.godbolt.org/z/sjd5vWrPn

(Also, avoid "naked new", but that's for another time.)

#cpp #cplusplus #programming #software #softwarequality

Last updated 1 year ago

zayd · @zayd
2 followers · 16 posts · Server mstdn.social

ugh i'm stuck using instead of for and even then i don't know what i'm doing with either.

#cpp #lldb #gdb

Last updated 1 year ago

Dani (:cxx: modules addict) · @DanielaKEngert
318 followers · 1023 posts · Server hachyderm.io

@jakub_neruda Yeah!

But please remember: this is 2023 alpha. Cpp 2023 has abandoned io streams and sent them to greener pastures.

#cpp

Last updated 1 year ago

Jakub Neruda · @jakub_neruda
194 followers · 591 posts · Server techhub.social

(Note: This is a joke)

in 2023 be like:

#cpp

Last updated 1 year ago

KDAB · @kdab
193 followers · 145 posts · Server techhub.social

Follow our YouTube channel for weekly uploads covering a vast diversity of topics as well as a monthly news edition and recordings of talks from our events.

🔗 youtube.com/@KDABtv

#qtdev #qml #cpp #cplusplus #embedded #rustlang #3d

Last updated 1 year ago

Andreas Fertig · @andreasfertig
250 followers · 74 posts · Server mas.to

I will be speaking at NDC TechTown 2023! The talk's title is "C++ Coroutines from scratch". Come and join me there!

ndctechtown.com/agenda/c-corou

#cplusplus #cpp20 #cpp

Last updated 1 year ago

Dani (:cxx: modules addict) · @DanielaKEngert
318 followers · 1023 posts · Server hachyderm.io

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

#cpp

Last updated 1 year ago

Dani (:cxx: modules addict) · @DanielaKEngert
318 followers · 1023 posts · Server hachyderm.io

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

#cpp

Last updated 1 year ago

dana :blobhaj_witch: · @blinkygal
220 followers · 1502 posts · Server sunny.garden

Here it is github.com/chromium/subspace/p

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.

#cpp #subspacecpp

Last updated 1 year ago

C:\KKJ\>:idle: · @w84death
803 followers · 554 posts · Server fosstodon.org

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!

=> demoscene.p1x.in/intros/01/

It runs 2x fast as it should but still fascinating :)

#demoscene #dos #freedos #cpp #intro #dosbox #wasm

Last updated 1 year ago

Mads Kjeldgaard · @madskjeldgaard
506 followers · 1499 posts · Server sonomu.club

My robotics experiments are slowly but surely coming together. It’s a nice feeling.

#supercollider #cpp #robotics

Last updated 1 year ago

C:\KKJ\>:idle: · @w84death
803 followers · 554 posts · Server fosstodon.org

WIP. Updated scenes. Added sprite snake.

#demoscene #dos #freedos #cpp #intro

Last updated 1 year ago

Yann Büchau :nixos: · @nobodyinperson
272 followers · 1194 posts · Server fosstodon.org

I am unsure whether to learn :rust: or :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 (, :gitannex: ). Rust on the other hand looks *much* easier to get going with coming from (and embedded / ). Its cargo toolchain and ecosystem also looks nicer, plus easier availability on all architectures (aarch64!).

#rust #haskell #hledger #gitannex #python #c #cpp

Last updated 1 year ago

dana :blobhaj_witch: · @blinkygal
217 followers · 1487 posts · Server sunny.garden

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.

godbolt.org/z/9EEznnq8a

Like Box<dyn Trait>::from(T: Trait) which is implemented for special stdlib traits in Rust.

doc.rust-lang.org/stable/std/b

lets you do ~anything for better or for worse, so I guess we can make it more general in .

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.

#cpp #subspacecpp

Last updated 1 year ago

dana :blobhaj_witch: · @blinkygal
217 followers · 1487 posts · Server sunny.garden

@cuchaz I am also troubled by stdlib norm being (start, len) vs 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.)

#cpp #rust

Last updated 1 year ago

Å imon Tóth · @simontoth
268 followers · 795 posts · Server hachyderm.io

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: compiler-explorer.com/z/5Gbo53

#cpp #cplusplus #coding #programming #dailybiteofcpp

Last updated 1 year ago