r/cpp • • 5d ago

C++ Show and Tell - December 2026

24 Upvotes

Use this thread to share anything you've written in C++. This includes:

  • a tool you've written
  • a game you've been working on
  • your first non-trivial C++ program

The rules of this thread are very straight forward:

  • The project must involve C++ in some way.
  • It must be something you (alone or with others) have done.
  • Please share a link, if applicable.
  • Please post images, if applicable.

Last month's thread: https://www.reddit.com/r/cpp/comments/1xo0gru/c_show_and_tell_november_2026/


r/cpp • • Oct 02 '26

C++ Jobs - Q4 2026

46 Upvotes

Rules For Individuals

  • Don't create top-level comments - those are for employers.
  • Feel free to reply to top-level comments with on-topic questions.
  • I will create top-level comments for meta discussion and individuals looking for work.

Rules For Employers

  • If you're hiring directly, you're fine, skip this bullet point. If you're a third-party recruiter, see the extra rules below.
  • Multiple top-level comments per employer are now permitted.

    • It's still fine to consolidate multiple job openings into a single comment, or mention them in replies to your own top-level comment.
  • Don't use URL shorteners.

    • reddiquette forbids them because they're opaque to the spam filter.
  • Use the following template.

    • Use **two stars** to bold text. Use empty lines to separate sections.
  • Proofread your comment after posting it, and edit any formatting mistakes.
  • Check if your comment is visible in Incognito mode, after waiting a few minutes.

    • If not, it was probably automatically removed, which happens frequently for new accounts. Send modmail, otherwise we might not notice quickly.

Template

**Company:** [Company name; also, use the "formatting help" to make it a link to your company's website, or a specific careers page if you have one.]

**Type:** [Full time, part time, internship, contract, etc.]

**Compensation:** [This section is optional, and you can omit it without explaining why. However, including it will help your job posting stand out as there is extreme demand from candidates looking for this info. If you choose to provide this section, it must contain (a range of) actual numbers - don't waste anyone's time by saying "Compensation: Competitive."]

**Location:** [Where's your office - or if you're hiring at multiple offices, list them. If your workplace language isn't English, please specify it. It's suggested, but not required, to include the country/region; "Redmond, WA, USA" is clearer for international candidates.]

**Remote:** [Do you offer the option of working remotely? If so, do you require employees to live in certain areas or time zones?]

**Visa Sponsorship:** [Does your company sponsor visas?]

**Description:** [What does your company do, and what are you hiring C++ devs for? How much experience are you looking for, and what seniority levels are you hiring for? The more details you provide, the better.]

**Technologies:** [Required: what version of the C++ Standard do you mainly use? Optional: do you use Linux/Mac/Windows, are there languages you use in addition to C++, are there technologies like OpenGL or libraries like Boost that you need/want/like experience with, etc.]

**Contact:** [How do you want to be contacted? Email, reddit PM, telepathy, gravitational waves?]

Extra Rules For Third-Party Recruiters

Send modmail to request pre-approval on a case-by-case basis. We'll want to hear what info you can provide (in this case you can withhold client company names, and compensation info is still recommended but optional). We hope that you can connect candidates with jobs that would otherwise be unavailable, and we expect you to treat candidates well.

Previous Post


r/cpp • • 9h ago

One of the rare times i hate this language

105 Upvotes

So i was just trying to do something simple. I had to make the user choose between 1 or 2. I just did

std::uint8_t input;
std::cin >> input;

You see anything wrong here? well uint8_t is implemented as an alias to usigned char so when you use the >> operator of cin it actually chooses the char overload instead of an integer overload.

Which means if the user inputted 2, input would actually be 50 since thats the ascii value of 2

I thought i was going crazy, my code was so simple and i didnt know where it was going wrong. Luckily it was simple so it wasant that hard to debug but damn that was annoying.

Now imagine if it was beginner with this issue lol...

I just used uint16_t to fix it, there might be better ways tho?


r/cpp • • 8h ago

Beating std::memset by 1.2-2.3x or more on runtime lengths of 1–128 bytes

12 Upvotes

Hey everyone, so it seems as though significant performance gains can be made by decomposing std::memset into a collection of "compile-time known" sizes, when running it with runtime-only known lengths. We bench-marked the code that follows by performing 4096 memsets per iteration into a 64 KiB buffer, with misaligned destination offsets and lengths that are uniformly randomly distributed across [1, N].

Tbh the lengths themselves are sourced from a 64K-entry LCG table, where we vary our starting position on each iteration in order so as to prevent the branch predictor from learning the sequence, and pass the lengths through a volatile to obscure them from the compiler. Both implementations are given a compile-time known fill value of 0x5A.

We're measuring the aggregate number of bytes set per iteration divided by the elapsed time (in MB/s).

For sampling, we start with 60 iterations and repeatedly double the number of iterations per epoch until we reach either our 10-second time limit or our maximum iteration count. We retain the epoch that yielded the lowest total of the relative standard error and the shift in the mean between epochs, with our convergence thresholds being 10% and 5%, respectively.

As far as correctness goes, we're exhaustively testing every length from 0 through 300 across the various destination offsets, verifying both the integrity of the surrounding guard bytes and the equivalence of the resultant buffer contents to those produced by std::memset - let me know what you think about this.

Cheers!

Linux-Clang (EPYC 9V45, AVX-512, Clang 24)

Lengthmemset_decompstd_memsetSpeedupmemset_decomp_up_tostd_memsetSpeedup
1-158,0054,3971.82x9,0454,5142.00x
1-168,4824,7691.78x9,6104,7182.04x
1-179,3874,9491.90x10,1904,9642.05x
1-3116,6298,9181.86x18,1458,9402.03x
1-3217,1829,2211.86x18,7528,9922.09x
1-3317,1419,5261.80x19,0349,4582.01x
1-6333,01917,9821.84x36,42117,9272.03x
1-6432,14216,8801.90x35,42016,3622.16x
1-6531,46715,5482.02x34,65115,0302.31x
1-12716,42511,0271.49x16,28611,2011.45x
1-12816,09811,0671.45x16,93011,4111.48x
1-12917,29611,1091.56x16,67211,0251.51x

Linux-GCC (EPYC 9V45, AVX-512, GCC 16.0.1)

Lengthmemset_decompstd_memsetSpeedupmemset_decomp_up_tostd_memsetSpeedup
1-158,1334,4901.81x8,9584,4332.02x
1-168,4284,6591.81x9,4604,8631.95x
1-178,7384,9011.78x10,1335,0821.99x
1-3116,1178,8381.82x18,0119,0781.98x
1-3216,2768,4731.92x18,7278,3522.24x
1-3316,3249,7751.67x18,8109,2902.02x
1-6330,70618,0421.70x36,22817,6052.06x
1-6431,42816,1361.95x36,38517,0632.13x
1-6528,89115,4741.87x33,92415,6012.17x
1-12715,16611,9361.27x15,57112,0311.29x
1-12815,20911,8791.28x15,83912,5441.26x
1-12914,99212,0661.24x15,36312,5211.23x

Windows-MSVC (Xeon Platinum 8573C, AVX-512, MSVC 19.52)

Lengthmemset_decompstd_memsetSpeedupmemset_decomp_up_tostd_memsetSpeedup
1-153,9886316.32x2,8016324.43x
1-164,3896756.50x3,6726675.51x
1-174,4996786.63x4,5676766.76x
1-317,7201,4035.50x7,8541,3925.64x
1-328,0791,4925.41x6,2481,5094.14x
1-338,2461,4965.51x4,8891,4963.27x
1-6313,3712,2705.89x13,3822,2405.97x
1-6413,5382,4005.64x13,1982,4305.43x
1-6513,6812,4355.62x13,8382,4485.65x
1-1278,8904,2732.08x10,0104,3152.32x
1-1289,0384,2352.13x10,1354,2092.41x
1-1299,1084,4562.04x9,1274,4232.06x

macOS-Clang (Apple M1 virtual, NEON, Clang 23.1.6)

Lengthmemset_decompstd_memsetSpeedupmemset_decomp_up_tostd_memsetSpeedup
1-151,3296911.92x1,4666852.14x
1-161,7217112.42x1,6976122.77x
1-171,6388192.00x1,4577851.86x
1-312,7231,1932.28x2,5861,1372.28x
1-322,1061,2661.66x2,3061,1182.06x
1-332,5421,1902.14x2,3731,2621.88x
1-635,9212,2072.68x5,3161,9782.69x
1-645,9141,9083.10x6,3721,6933.76x
1-655,4532,1792.50x6,3362,2582.81x
1-12711,3674,2542.67x13,0204,9572.63x
1-12812,8554,8352.66x11,7003,0813.80x
1-12911,0694,5862.41x12,8235,1152.51x

macOS-GCC (Apple M1 virtual, NEON, GCC 16.2.0)

Lengthmemset_decompstd_memsetSpeedupmemset_decomp_up_tostd_memsetSpeedup
1-151,3557321.85x1,2967331.77x
1-168747001.25x1,3476692.01x
1-171,6826512.59x1,5917372.16x
1-312,5111,2661.98x2,4961,2631.98x
1-322,3461,1662.01x2,3401,3261.76x
1-332,8461,1652.44x2,2291,1891.88x
1-636,5032,3222.80x5,9212,1892.71x
1-645,5532,3692.34x5,4072,1072.57x
1-655,4042,1652.50x6,1662,2332.76x
1-12713,7625,2432.62x12,8645,2342.46x
1-12813,1425,2992.48x11,8655,2802.25x
1-12911,7384,7222.49x11,5054,6652.47x

Code

#pragma once

#include <cassert>
#include <utility>
#include <cstddef>
#include <cstdint>
#include <cstring>
#include <limits>
#include <bit>

#if defined(_MSC_VER) && defined(__AVX512BW__)
	#define MEMSET_DECOMP_MSVC_AVX512BW_IMPLIES_BMI2
#endif

#if defined(__AVX512BW__) && (defined(__BMI2__) || defined(MEMSET_DECOMP_MSVC_AVX512BW_IMPLIES_BMI2))
	#include <immintrin.h>
#endif

#if defined(_MSC_VER) && !defined(__clang__)
	#define MEMSET_DECOMP_INLINE [[msvc::forceinline]] inline
#elif defined(__GNUC__) || defined(__clang__)
	#define MEMSET_DECOMP_INLINE __attribute__((always_inline)) inline
#else
	#define MEMSET_DECOMP_INLINE inline
#endif

namespace memset_decomp_ns {

#if defined(__AVX512F__)
	inline constexpr std::uint64_t register_width{ 64 };
#elif defined(__AVX2__)
	inline constexpr std::uint64_t register_width{ 32 };
#else
	inline constexpr std::uint64_t register_width{ 16 };
#endif

	inline constexpr std::uint64_t small_set_limit{ 16 };
	inline constexpr std::uint64_t smallest_pair_size{ std::bit_floor(small_set_limit + 1) };
	inline constexpr std::uint64_t largest_pair_size{ 128 };

	template<std::uint64_t max_bytes>
	inline constexpr std::uint64_t top_pair_size{ std::bit_floor(max_bytes) < largest_pair_size ? std::bit_floor(max_bytes) : largest_pair_size };

	template<std::uint64_t max_bytes> inline constexpr std::uint64_t pair_class_count{
		top_pair_size<max_bytes> < smallest_pair_size ? 0 : static_cast<std::uint64_t>(std::bit_width(top_pair_size<max_bytes>) - std::bit_width(smallest_pair_size)) + 1
	};

	template<std::byte value, std::uint64_t size> struct pow2_set {
		static_assert(std::has_single_bit(size), "Sorry, but you can only memset a power-of-2 size.");

		MEMSET_DECOMP_INLINE static void impl(std::byte* dst) noexcept {
			std::memset(dst, std::to_integer<int>(value), size);
		}
	};

	template<std::byte value, std::uint64_t pair_size, std::uint64_t chunk_size, typename sequence_type> struct pair_set_impl;

	template<std::byte value, std::uint64_t pair_size, std::uint64_t chunk_size, std::uint64_t... indices>
	struct pair_set_impl<value, pair_size, chunk_size, std::integer_sequence<std::uint64_t, indices...>> {
		MEMSET_DECOMP_INLINE static void impl(std::byte* dst, std::uint64_t byte_count) noexcept {
			std::byte* tail = dst + byte_count - pair_size;
			(pow2_set<value, chunk_size>::impl(dst + indices * chunk_size), ...);
			(pow2_set<value, chunk_size>::impl(tail + indices * chunk_size), ...);
		}
	};

	template<std::byte value, std::uint64_t pair_size> struct pair_set {
		static_assert(std::has_single_bit(pair_size), "Sorry, but pairs must be a power-of-2 size.");
		static constexpr std::uint64_t chunk_size{ pair_size < register_width ? pair_size : register_width };
		static constexpr std::uint64_t chunk_count{ pair_size / chunk_size };

		MEMSET_DECOMP_INLINE static void impl(std::byte* dst, std::uint64_t byte_count) noexcept {
			pair_set_impl<value, pair_size, chunk_size, std::make_integer_sequence<std::uint64_t, chunk_count>>::impl(dst, byte_count);
		}
	};

	template<std::byte value> struct small_set {
		MEMSET_DECOMP_INLINE static void impl(std::byte* dst, std::uint64_t byte_count) noexcept {
			if (byte_count >= 8) {
				pow2_set<value, 8>::impl(dst);
				pow2_set<value, 8>::impl(dst + byte_count - 8);
			} else if (byte_count >= 4) {
				pow2_set<value, 4>::impl(dst);
				pow2_set<value, 4>::impl(dst + byte_count - 4);
			} else if (byte_count >= 2) {
				pow2_set<value, 2>::impl(dst);
				pow2_set<value, 2>::impl(dst + byte_count - 2);
			} else if (byte_count != 0) {
				*dst = value;
			}
		}
	};

	template<std::byte value, typename sequence_type> struct pair_dispatcher;

	template<std::byte value, std::uint64_t... class_indices> struct pair_dispatcher<value, std::integer_sequence<std::uint64_t, class_indices...>> {
		template<std::uint64_t pair_size> MEMSET_DECOMP_INLINE static bool try_pair(std::byte* dst, std::uint64_t byte_count) noexcept {
			if (byte_count <= pair_size * 2) {
				pair_set<value, pair_size>::impl(dst, byte_count);
				return true;
			}
			return false;
		}

		MEMSET_DECOMP_INLINE static void impl(std::byte* dst, std::uint64_t byte_count) noexcept {
			if (byte_count <= small_set_limit) {
				small_set<value>::impl(dst, byte_count);
			} else if (!(try_pair<(smallest_pair_size << class_indices)>(dst, byte_count) || ...)) {
				std::memset(dst, std::to_integer<int>(value), byte_count);
			}
		}
	};

	template<std::byte value, std::uint64_t max_bytes> using memset_dispatcher = pair_dispatcher<value, std::make_integer_sequence<std::uint64_t, pair_class_count<max_bytes>>>;

#if defined(__AVX512BW__) && (defined(__BMI2__) || defined(MEMSET_DECOMP_MSVC_AVX512BW_IMPLIES_BMI2))
	inline constexpr std::uint64_t masked_width{ 64 };

	MEMSET_DECOMP_INLINE __mmask64 length_mask(std::uint64_t byte_count) noexcept {
		return _bzhi_u64(~0ull, static_cast<std::uint32_t>(byte_count));
	}

	template<std::byte value> struct masked_set {
		MEMSET_DECOMP_INLINE static void impl(std::byte* dst, std::uint64_t byte_count) noexcept {
			const __m512i fill{ _mm512_set1_epi8(static_cast<char>(value)) };
			if (byte_count <= masked_width) {
				_mm512_mask_storeu_epi8(dst, length_mask(byte_count), fill);
			} else {
				_mm512_storeu_si512(dst, fill);
				_mm512_mask_storeu_epi8(dst + masked_width, length_mask(byte_count - masked_width), fill);
			}
		}
	};

	template<std::uint64_t max_bytes> MEMSET_DECOMP_INLINE bool fits_masked(std::uint64_t byte_count) noexcept {
		return max_bytes <= masked_width * 2 || byte_count <= masked_width * 2;
	}

	template<std::byte value, std::uint64_t max_bytes> MEMSET_DECOMP_INLINE void memset_decomp_up_to(void* dst, std::uint64_t byte_count) noexcept {
		assert(byte_count <= max_bytes);
		if (fits_masked<max_bytes>(byte_count)) {
			masked_set<value>::impl(static_cast<std::byte*>(dst), byte_count);
		} else {
			memset_dispatcher<value, max_bytes>::impl(static_cast<std::byte*>(dst), byte_count);
		}
	}
#else
	template<std::byte value, std::uint64_t max_bytes> MEMSET_DECOMP_INLINE void memset_decomp_up_to(void* dst, std::uint64_t byte_count) noexcept {
		assert(byte_count <= max_bytes);
		memset_dispatcher<value, max_bytes>::impl(static_cast<std::byte*>(dst), byte_count);
	}
#endif

	template<std::byte value> MEMSET_DECOMP_INLINE void memset_decomp(void* dst, std::uint64_t byte_count) noexcept {
		memset_decomp_up_to<value, std::numeric_limits<std::uint64_t>::max()>(dst, byte_count);
	}

}

#undef MEMSET_DECOMP_MSVC_AVX512BW_IMPLIES_BMI2
#undef MEMSET_DECOMP_INLINE

r/cpp • • 1h ago

Opensource Project Contribution - Flow++

0 Upvotes

Blender Like Node Connector, Jupiter notebook like live Update of code, but for C++(future Rust, Python etc) One App, Fast Prototyping.

I have been working on this project which is a tool for fast prototyping, and honestly and mostly its just AI coded... but i want support to raise this project to another level,

it would be a fantastic app where you can fast prototype in any language under one workspace cpp, rust, python with included, now its just C++, will have gpu and kernel and multidimensional space and fast keyboard inputs and a editor, and all node could be connected, start and end.

its currently build on Chromium CEF which cost it extra default memory for now but best enough for control(could be change with other light framework future), uses CPP in backend and FullStack in backend Html, Css, Javascript.

Its a new repo on GitHub Known As Flow++ or FlowPP.

It would be a Pleasure if you ppl help the Open Source Project To Grow,

you can contribute here https://github.com/iampokebro/FlowPP.git


r/cpp • • 1d ago

simdjson Version 5.4.0 Released

Thumbnail github.com
24 Upvotes

r/cpp • • 1d ago

What C++ library do you wish existed but hasn’t been created yet?

15 Upvotes

r/cpp • • 1d ago

InsideC++26491, The Module Story

Thumbnail youtu.be
19 Upvotes

With CMake's support for import std no longer experimental, we thought it was a good time to talk about modules.
Gabriel Dos Reis joins us at InsideC++ to discuss the original design goals, the history of standardization, the compromises, the tooling challenges, and what comes next.


r/cpp • • 6h ago

Let's talk about package managers

0 Upvotes

Guys,

It's 2026 and almost 2027. We have AI designing PCBs, doing bank transfers and assisted self-driving cars. But for some reason, C++ devs need, for every package we install, to do research. Why is this package management issue not yet resolved?

Others have tried: VCpkg, conan2, build2, cabinpkg, SCons, CMake's Fetchcontent. All have steep learning curves, none is written in C++ , and feel like compromises. Coming from cargo and uv, i just couldn't believe the CMake boilerplate. `cmake init`? `cmake new`? `cmake add`? Need to do everything by hand. Want an http client? Want a testing library? Want to manage documentation? Figure it out yourself.

We created a package manager for C++ at my company for dependency resolution, as none of the existing package managers were complete. 2 weeks ago, with AI's help i created a public version of it, called cortex (`cx`) and released it on reddit. It uses pubcrub package resolution, mixes `uv` and `Cargo` features for declarative package management in C++, writing in modern C++ 23. It wraps CMake and lets it do most of the work, at least until the build engine is built.

The communities ate me up. Got no single improvement or recommendation.

A question to the community: how do you recommend we tackle the package management problem in this modern age?


r/cpp • • 2d ago

Meeting C++ Meeting C++ Blogroll 555

Thumbnail meetingcpp.com
9 Upvotes

r/cpp • • 3d ago

Wolaz: Protobuf in non-dynamic-allocating C++

Thumbnail github.com
51 Upvotes

Protobuf is the most popular serialization format, but it has always been difficult to use Protobuf in in embedded systems because all of the conforming C++ Protobuf implementations require dynamic memory allocation.

Wolaz is the first mostly-conforming C++ Protobuf implementation which uses only stack memory. It works by the "lazy view" technique on the I/O buffer, also known as "zero-copy."


r/cpp • • 3d ago

Terrible tips for a C++ developer: 2026 edition, Part 2

Thumbnail pvs-studio.com
16 Upvotes

Another part of terrible tips for C++ developers. Part 1


r/cpp • • 3d ago

Quick Bench has moved to Compiler Explorer

Thumbnail quick-bench.com
95 Upvotes

r/cpp • • 3d ago

NRVO from compilers' perspective

Thumbnail thisnotes.dev
30 Upvotes

Hey. I've recently presented at Meeting C++ 2026 with a talk about NRVO. While you wait for the recording being available, you can check text version of the talk on my blog.

Also I have newsletter about C++, performance and backends: https://thisnotes.substack.com/


r/cpp • • 3d ago

Video: From Simula to C++ (Bjarne Stroustrup)

Thumbnail cs.au.dk
18 Upvotes

r/cpp • • 4d ago

Latest News From Upcoming C++ Conferences (2026-12-02)

7 Upvotes

This is the latest news from upcoming C++ Conferences. You can review all of the news at https://programmingarchive.com/upcoming-conference-news/

TICKETS AVAILABLE

The following conferences currently have tickets available to purchase

  • C++Online (10th – 12th March) – Tickets will be available soon but you can register your interest here – http://eepurl.com/i0ZqOc or find out more about the event here https://cpponline.uk
  • [NEW] ACCU On Sea (29th June – 2nd July 2027) Tickets both for the main conference and for pre-conference workshops can be found at https://accuonsea.uk/. You can also become a member of ACCU to get discounted rates to both the main conference and workshops.

OPEN CALL FOR SPEAKERS

  • C++Online Call For Workshops – C++Online are looking for instructors to run online workshops and training courses from April – June 2027 with a 50% revenue share being offered. Find out more including how to apply at https://cpponline.uk/call-for-workshops/. All workshops will be reviewed as they are submitted
  • [NEW] C++Now Call For Speakers – Anyone interested in speaking at C++Now 2027 which is scheduled to take place from May 17th – 21st has until February 1st to submit a proposal. Find out more at https://cppnow.org/announcements/2026/11/2027-call-for-submissions/

OTHER OPEN CALLS

  • [NEW] C++Online Call For Reviewers – C++Online are looking for people to review the talks that were submitted for their call for speakers. You can make an account and start reviewing talks by visiting https://speak.cpponline.uk/

TRAINING COURSES AVAILABLE FOR PURCHASE

There are no training courses available for purchase

OTHER NEWS

  • [NEW] C++Online Call For Speakers Closed – Submissions for C++Online Call For Speakers have now closed. However, they are still taking workshop submissions.
  • [NEW] Subscribe to the Meeting C++ YouTube Channel – Meeting C++ took place last week and videos from the event have already started to be released. Subscribe to their YouTube channel today so you are notified when new videos are available https://www.youtube.com/@MeetingCPP

r/cpp • • 5d ago

Bottom Up Coroutines in C++

Thumbnail forcedrift.github.io
63 Upvotes

r/cpp • • 4d ago

notweerdmonk / notweerdmonk.github.io

Thumbnail notweerdmonk.github.io
0 Upvotes

I recently wrote an article about formatted extraction using input streams in C++.


r/cpp • • 4d ago

How to Generate C++ Docs Straight from Clang with MrDocs

Thumbnail youtube.com
0 Upvotes

This is not just about an interesting topic, since I guess most of us have struggled with dogygen and are wishing for a better alternative, but also an amazingly creative way to release a tech talk (cppcon) video!


r/cpp • • 5d ago

New C++ Conference Videos Released This Month - November 2026 (Updated To Include Videos Released 2026-11-23 - 2026-11-29)

13 Upvotes

C++Now

2026-11-23 - 2026-11-29

2026-11-16 - 2026-11-22

2026-11-09 - 2026-11-15

2026-11-02 - 2026-11-08

2026-10-26 - 2026-11-01

ACCU

2026-11-23 - 2026-11-29

2026-11-16 - 2026-11-22

2026-11-09 - 2026-11-15

2026-11-02 - 2026-11-08

2026-10-26 - 2026-11-01

CppCon

2026-11-23 - 2026-11-29

2026-11-16 - 2026-11-22

2026-11-09 - 2026-11-15

ADC

2026-11-23 - 2026-11-29

2026-11-16 - 2026-11-22

2026-11-09 - 2026-11-15

2026-11-02 - 2026-11-08

2026-10-26 - 2026-11-01


r/cpp • • 5d ago

Local models for C++: Qwen3.8-27B FP8 vs QFN IQ4_XS

Thumbnail reddit.com
5 Upvotes

For anyone interested.


r/cpp • • 6d ago Bravo

Pattern Matching for C++29

Thumbnail mpark.github.io
254 Upvotes

r/cpp • • 5d ago

Visual Studio/MSBuild should have a way to easily consume modules and/or CPS from external libraries

Thumbnail developercommunity.visualstudio.com
7 Upvotes

Well, there it is. Maybe it'll go somewhere, maybe not. Hopefully, it would be a step towards some form of standard package support (with the packages acquired and built through some other means). Maybe also, VS projects could deploy to CPS. CPS all the things.


r/cpp • • 4d ago

Why we shouldn't want a remote package registry, universal package manager or a binary toolchain orchestrator

0 Upvotes

Hi, as most of you now, we get cargo good cmake bad posts and comments here nearly every week.

I want to write a definitive post to answer these criticisms. In this post I'm going to argue for a decentralized approach instead, and will try to list some cons and pros of this approach.

Cargo is the package manager of the rust language, it stores packages in source form in a remote registry called crates.io, It also sort of acts as a build system, as you invoke it directly, rather than calling the package manager first then the build system. The problem with this approach is that you don’t own sources, you don’t know about licenses. If one of your packages break, trying to fix it is very annoying. Also builds are very slow, since you don’t have local binary cache for packages. Additionally, unlike a sane dependency model as proposed by Titus Winters. Cargo relies on semver. This means your dependency tree will not scale and will be hard to maintain.

Rustup is a toolchain orchestrator tool that downloads compiler, stdlib and various other tools from the internet.

It seems very nice to be able to setup a toolchain in seconds, as opposed to doing that with c++ which takes very long.

The drawback of this approach is the lack of knowledge about dependencies of your tools wnd especially stdlib. You need to know what version of xcode or msvc you app is compiled against.

What to do then?

We need a decentralized solution, organizations should clone their deps from a remote and write package recipes for them, we need some sort of organization to collaborate and several standards to make this easier, such as a binary package format.

Cargo and rustup are currently more closer to web technologies in toolchain departmant than c++, I don’t see why everyone is so obsessed about it. There is a new slop project written on it every minute, and we think that's a good thing. It is not, it made library quality very questionable.

Wrote on my phone so probably a lot of typos.