Advertisement · 728 × 90
#
Hashtag
#cxx
Advertisement · 728 × 90
Post image

Choosing between Zngur and CXX for Rust/C++ #interoperability?

This detailed comparison explores their design philosophies, container support, trait objects, async capabilities, build systems, and real-world tradeoffs: www.kdab.com/weighing-up-...

#RustLang #Zngur #CXX #Cpp

0 0 0 0
Video

#ebony #ebonysky #ebonyporn #blacksky #blackporn #skyafterdark #skeetsafterdark #betweentheskeets #horny #nsfwacc #nsfw #nsfwbsky #nsfwbluesky #taboo #freeuse #backshots #doggy #cheating #adultcontent #breeding #breedkink #creamy #creampie #wetpussy #kinky #orgasm #cheating #porn #onlyfans #cxx

200 28 1 0
Preview
Call for maintainers · Issue #244 · sizmailov/pybind11-stubgen I've started pybind11-stubgen when there were no good alternatives to make good enough stubs for pybind modules. As of today I don't have a C++ project that needs python bindings, so I'm a bit out ...

Are you one of the 10'000s of #CXX #Python developers using #pybind11? Do you care about great #autodocs and #autocompletion in #interactive workflows?

0 0 1 0
Screenshot of a code snippet containing two functions written in C++.

The first function is called `CreateServiceProvider()` and uses a pattern closely resembling modern .NET dependency injectors. It calls `services.AddSingleton<>()` to register a `ProjectService` and a `ProjectDatabase`, then calls `MvvmServicesRegistrator::Register()` to automatically add the entire MVVM subsystem to the dependency injector.

The second function is called `BindViewModels()` and grabs the `WindowManager` out of the dependency injector, then calls `BindViewModel<MainViewModel, MainWindow>()` to automatically associate the `MainViewModel` with the `MainWindow`.

Later on, the application can simply instruct the `WindowManager` to display a window for the `MainViewModel` and it will figure out everything - which Qt Widgets main window class to use, which view model to construct and its constructor-injected dependencies, too - just like it would be in a modern .NET environment.

Screenshot of a code snippet containing two functions written in C++. The first function is called `CreateServiceProvider()` and uses a pattern closely resembling modern .NET dependency injectors. It calls `services.AddSingleton<>()` to register a `ProjectService` and a `ProjectDatabase`, then calls `MvvmServicesRegistrator::Register()` to automatically add the entire MVVM subsystem to the dependency injector. The second function is called `BindViewModels()` and grabs the `WindowManager` out of the dependency injector, then calls `BindViewModel<MainViewModel, MainWindow>()` to automatically associate the `MainViewModel` with the `MainWindow`. Later on, the application can simply instruct the `WindowManager` to display a window for the `MainViewModel` and it will figure out everything - which Qt Widgets main window class to use, which view model to construct and its constructor-injected dependencies, too - just like it would be in a modern .NET environment.

That was easier than I thought.

Simple WindowManager class, one-line View <-> ViewModel binding, view model is constructed through dependency injector, so just adding services as constructor parameters provides them to the view model with no other change :)

#cxx #programming #moderncpp

1 0 0 0

Wrote some documentation with examples for my C++ .NET-inspired dependency injector:

github.com/nuclex-share...

(DI that closely resembles Microsoft.Extensions.DependencyInjection, with lifetime scopes, transient services, annotation-free constructor injection, but for C++ code)

#programming #cxx

0 0 0 0
C++ implementation of a `ServiceCollection` interface loosely inspired by Microsoft.Extensions.DependencyInjection under .NET (which in itself it inspired by prior .NET and Java dependency injectors).

The image is screenshot of code showing three templates methods that are part of the `ServiceCollection` interface, all the overloads of `AddScoped()`, one taking a single `TServiceAndImplementation` type parameters, one taking two type parsmeters: `TService` and `TImplementation` and the third overload taking a `TService` type parameter and a factory method passed as an `std::function<TService>`.

C++ implementation of a `ServiceCollection` interface loosely inspired by Microsoft.Extensions.DependencyInjection under .NET (which in itself it inspired by prior .NET and Java dependency injectors). The image is screenshot of code showing three templates methods that are part of the `ServiceCollection` interface, all the overloads of `AddScoped()`, one taking a single `TServiceAndImplementation` type parameters, one taking two type parsmeters: `TService` and `TImplementation` and the third overload taking a `TService` type parameter and a factory method passed as an `std::function<TService>`.

I just love the level of reflection that's in C++. RTTI + compile-time template techniques such as SFINAE are just the right level to avoid writing code that essentially makes its own undocumented rules at runtime (i.e. convention-over-configuration turned malevolent).

#programming #cxx

1 0 0 0
Original post on chaos.social

Anyone have a recommendation for a small (ideally single-file?) C++ Markdown parser library?

I have some Markdown files that I would love to export to various other formats, and don't want to reinvent the wheel if I don't have to. I don't need any support for HTML in Markdown.

Basically I'd […]

0 0 0 0
Screenshot of a C++20 code snippet that registers an entity class for a database table:

```
r.RegisterTable<TestEntity>(u8"users").
  WithColumn<&TestEntity::Id>(u8"id").NotNull().AutoGenerated().PrimaryKey().
  WithColumn<&TestEntity::Name>(u8"name").NotNull().
  WithColumn<&TestEntity::PasswordHash>(u8"passwordHash");
```

Screenshot of a C++20 code snippet that registers an entity class for a database table: ``` r.RegisterTable<TestEntity>(u8"users"). WithColumn<&TestEntity::Id>(u8"id").NotNull().AutoGenerated().PrimaryKey(). WithColumn<&TestEntity::Name>(u8"name").NotNull(). WithColumn<&TestEntity::PasswordHash>(u8"passwordHash"); ```

Screenshot of a C++20 code snippet that executes a "fluent" query on a database table using a registered entity class:

```
std::optional<User> johnUser = myProjectDataContext.Users.
  Where(Column(&User::Name) == u8"John")).
  SingleOrDefault();
```

Screenshot of a C++20 code snippet that executes a "fluent" query on a database table using a registered entity class: ``` std::optional<User> johnUser = myProjectDataContext.Users. Where(Column(&User::Name) == u8"John")). SingleOrDefault(); ```

The neat "mini" ORM for C++20 I started recently turned out very well and is already seeing use :)

github.com/nuclex-share...

The registration of entity classes is very easy now, too. Just the fluent query system and a packageable CMake build remain.

#programming #cxx #cplusplus #moderncpp

2 0 0 0
Preview
Anonymized Network Sensing using C++26 std::execution on GPUs Large-scale network sensing plays a vital role in network traffic analysis and characterization. As network packet data grows increasingly large, parallel methods have become mainstream for network…

Anonymized Network Sensing using C++26 std::execution on GPUs

#CUDA #CXX

hgpu.org?p=30303

0 0 0 0
Original post on hachyderm.io

I want to be your next #FediHire ! I've been a programmer since 1985 (as a child), I've been an IT professional since 1995 (pulling wires and swapping cards and configuring MS Windows). I graduated from University of Arkansas Fayetteville with a BS in CS in December of 2003. A full resume is […]

0 2 0 0
Original post on chaos.social

Say, is there a trick in C++ to make to_string() work for any type?

If I have

using namespace std;

and then just write

to_string(foo)

it will prefer my local namespace's to_string() and error when given an int, instead of picking std::to_string() for those.

Do I really have to add all […]

0 2 0 0
A table describing the new __counted_by(n), __noescape and  __lifetimebound annotations in Apple's clang and Swift's C parser.

A table describing the new __counted_by(n), __noescape and __lifetimebound annotations in Apple's clang and Swift's C parser.

A table summarizing the SWIFT_NONESCAPABLE and SWIFT_SHARED_REFERENCE annotations in Apple's clang/Swift's C parser.

A table summarizing the SWIFT_NONESCAPABLE and SWIFT_SHARED_REFERENCE annotations in Apple's clang/Swift's C parser.

Some nice additions for annotating C++ code to make it import better into Swift:

https://developer.apple.com/videos/play/wwdc2025/311

#CPlusPlus #cpp #cxx #swiftlang

1 1 0 0
Original post on chaos.social

Things I wish they fixed in C/C++:

When you init an instance variable from a parameter, you often copy-paste the name of the instance variable into the parameter. This allows you to accidentally forget editing code and generate perfectly compiling but wrong code like:

class Foo {
public:
int […]

0 0 0 0
cyberdoskel (@doskel.net) thaaat's a new one

When CMake likes building the project too much.
#NotMine #cmake #cxx #develoment

0 1 2 0
Preview
Issues when linking Rust bindings to C++ code. · Issue #1472 · dtolnay/cxx I have the following PR here: https://github.com/AcademySoftwareFoundation/OpenImageIO/pull/4643/files The test https://github.com/AcademySoftwareFoundation/OpenImageIO/pull/4643/files#diff-69049d4...

Anyone a master of #cxx/#RustLang? I'm having troubles linking the OpenImageIO_Utils library for some Rust bindings that I'm writing, and could use some help. Some more info here: https://github.com/dtolnay/cxx/issues/1472

1 1 1 0
Unlocking Modern CPU Power - Next-Gen C++ Optimization Techniques - Fedor G Pikus - C++Now 2024
Unlocking Modern CPU Power - Next-Gen C++ Optimization Techniques - Fedor G Pikus - C++Now 2024 YouTube video by CppNow

Oh yea low-level 'gineers, break out your popcorn, Fedor continues to deliver. #cxx #cpp #cplusplus #optimization #lowlevelcoding

www.youtube.com/watch?v=wGSS...

2 0 0 0

Oh ha, this platform is loaded by now. Noice. #HPC people 👋

Can I be my most geeky self again?! #HPC #GPU #FOSS #CXX #Snakelanguage #Simulation and obligatory #AI #ML because obvs

14 0 2 0