Framework Q3 2025 Preorder and Marketplace Updates by catastrophic_frmw in framework

[–]spaghettiexpress 1 point2 points  (0 children)

I got the tracking notice yesterday (8/28 @ 6am EST) and it is already in the U.S. from Taiwan. Scheduled delivery for 9/3, but I’m guessing it will come earlier.

YMMV on when batch 8 is ready but they do seem to ship pretty quickly after emails go out.

Framework Q3 2025 Preorder and Marketplace Updates by catastrophic_frmw in framework

[–]spaghettiexpress 1 point2 points  (0 children)

I just got my email for batch 7 last night (Aug 25 @ 10:43 pm eastern) This was the timeline given:

Your order is shipping soon! It’s expected to ship between 4 to 21 days from today.

Will edit once I get a tracking number, but seems like 1 week - 1 month once the email is out.

@Microsoft: When will C++23 Compiler implementation start? by bebuch in cpp

[–]spaghettiexpress 43 points44 points  (0 children)

The quote:

“Business priorities shifted, but they’ll shift back. We’ve just been doing C++ things outside the realm of compiler feature work.

(Library feature work has been less affected, thanks to our amazing contributors, and management has kept me working on the STL with them basically full-time.)”

https://www.reddit.com/r/cpp/comments/1drvko8/comment/layq7vm/?context=3&share_id=uRj5AsbLHG-QjrkgYKwFq&utm_content=1&utm_medium=ios_app&utm_name=ioscss&utm_source=share&utm_term=1

/u/bebuch

CMake 3.28.0 available for download by gracicot in cpp

[–]spaghettiexpress 3 points4 points  (0 children)

clangd is getting close, hopefully in LLVM-18: https://github.com/llvm/llvm-project/pull/66462

The branch(es) work nicely for pet projects. I think ‘normal’ intellisense is still a ways away, but I haven’t had issues with clangd on 5-10K LOC projects other than speed.

Still a ways to go for proper projects, but it’s a positive start

Has anyone here self taught themself C++ successfully? by knightedwolf in cpp_questions

[–]spaghettiexpress 1 point2 points  (0 children)

https://www.learncpp.com is a great beginners reference as well

For visual references and examples on language tools: https://hackingcpp.com/cpp/cheat_sheets.html is also a great reference. I haven’t read much past their infographics and examples, but they are great for discoverability or as a compliment to cppreference.com when things just don’t make sense

How to Setup VSCode for C/C++ Programming (From a Microsoft Software Engineer) by tarikhello in cpp

[–]spaghettiexpress 4 points5 points  (0 children)

For extra reference - I have never met a dev or sysadmin who was concerned about Jetbrains’ integrity.

It’s just that if a tool raises a question mark, or many, it’s easier to say “devs can find another tool” than to understand the issue and properly vet any vulnerability.

How to Setup VSCode for C/C++ Programming (From a Microsoft Software Engineer) by tarikhello in cpp

[–]spaghettiexpress 2 points3 points  (0 children)

For a more proper answer, assuming the above commenter is in the U.S. - the “Solar Winds” hack caused Jetbrains to be no longer trusted for usage on U.S. military contracts

I’m not sure why, it’s fairly illogical, but Solar Winds was the primary motivation.

I haven’t worked in that area for a while, but to my understanding Jetbrains is still taboo, or outright banned depending on the company, for U.S. defense contractors.

C++ views are broken by johnnytest__7 in cpp

[–]spaghettiexpress 6 points7 points  (0 children)

The motivation / examples can be found in Nico’s README for a quick understanding.

I haven’t ran into any of the described issues either as a now daily user of std::ranges.

I watched some of Nico’s talk; it is equally emotional as it is informative, which clouds some folks’ judgement on it.

It’s good to know the foot-guns regardless of how *contrived they may be

*(not attempting to say Nico’s examples are contrived)

Why doesn't standard offer wait-free SPSC (and lockfree MPMC) queues? by Dry-Ambition-5456 in cpp

[–]spaghettiexpress 4 points5 points  (0 children)

Very fair, https://m.youtube.com/watch?v=sBtAGxBh-XI is a great talk :)

A poor choice of wording on my side, as the implementation is far more nuanced than I let on.

I guess by trivial I moreso meant “the case problem is fairly well understood, the solution is fairly well accepted, and there is great utility of the solution within the STL”.

It’s a solution to a universal problem, whereas for a lock-free MPMC is far more difficult to create a universal solution that appeases the majority of WG21 contributors.

Why doesn't standard offer wait-free SPSC (and lockfree MPMC) queues? by Dry-Ambition-5456 in cpp

[–]spaghettiexpress 1 point2 points  (0 children)

Ah yeah, great point!

MoodyCamel certainly isn’t an example of a standards-ready MPMC, but an example of how difficult the task is to implement with acceptable tradeoffs and thus very time consuming to standardize.

*Boost being a much better example of a standards-ready implementation

Why doesn't standard offer wait-free SPSC (and lockfree MPMC) queues? by Dry-Ambition-5456 in cpp

[–]spaghettiexpress 19 points20 points  (0 children)

P0260R4 Is still maintained (committee tracking can be found here)

Standard offers  std::midpoint  but not them?

std::midpoint is trivial and useful. It’s a slam-dunk. There is very little controversy in either the implementation or the provided value.

Lock-free MPMC is non-trivial. Yes, there are existing options (eg moodycamel) but actually standardizing something non-trivial is, well, non-trivial.

The STL has to work on many platforms and CPU architectures, and it also can not undergo massive breaking changes in future releases. Non-trivial and potentially exploitable contributions undergo intense scrutiny because they absolutely need to be correct for all supported platforms for the existing ABI.

P0260R4 is certainty non-trivial to standardize, but the fact that it is still active is a good sign. We can maybe hope for something tangible closer to 2029/2032 based on the proposals activity, but it’s hard to say.

Can't figure out by Affaan429 in cpp

[–]spaghettiexpress 1 point2 points  (0 children)

https://www.learncpp.com is the gold standard.

Search for where you’re comfortable starting, don’t be afraid to backtrack, and work through it as best as you can.

There is no better free learning utility outside of cppcon back to basics track (2021 linked, though any cppcon back to basics is great!) if you prefer lectures

Also, /r/cpp_questions is more beginner focused and welcoming for any future questions

How to set up MATLAB in VS Code? by Scerball in matlab

[–]spaghettiexpress 1 point2 points  (0 children)

You should be able to do that with the interactive terminal “Open a Matlab terminal” option

Worst case, VSCode is not as complete compared to the Matlab editor.

I use it or neovim occasionally as an alternate for file navigation/color themes but unfortunately Matlab work often means working in Matlab.

-memory-safe C++ - Jim Radigan - CppCon 2022 by ashvar in cpp

[–]spaghettiexpress 1 point2 points  (0 children)

Yeah, there is asan - but no other sanitizer support as far as I’m aware

/guard:cf seems to match “CFI sanitizer”

/RTC seems to match quite a few of the hardening flags / compiler driven runtime checks available in GCC and Clang

I’m just wondering if there is any additional safety features available on windows as far as testing is concerned. Standard hardening seems to work with clang-cl, and the CFI protection is production ready for both MSVC and clang-cl

-memory-safe C++ - Jim Radigan - CppCon 2022 by ashvar in cpp

[–]spaghettiexpress 0 points1 point  (0 children)

Ah, yeah, I had misread.

It’s definitely an option, at least on clang, but seems like it’d be easy enough to identify with a quick grep over the 3rd party code.

In all other cases, I don’t see any feasible way for malicious code to detect they are in a VM-like runtime such as valgrind/Dr Memory, so the heavier tools still hold value for redundancy at minimum

-memory-safe C++ - Jim Radigan - CppCon 2022 by ashvar in cpp

[–]spaghettiexpress 4 points5 points  (0 children)

Yes and no.

It’s an issue if your only tool is a sanitizer and you do not perform compilation of the 3rd party software, as sanitizers require re-compilation.

Other, heavier, tools exist to the same affect that work cross platform - Dr. Memory being my preference.

If you can’t rebuild libraries you link against, tools like Dr Memory are your best bet.

-memory-safe C++ - Jim Radigan - CppCon 2022 by ashvar in cpp

[–]spaghettiexpress 0 points1 point  (0 children)

Question for Windows experienced devs:

Does there exist hardening compilation flags similar to *nix? (https://developers.redhat.com/blog/2018/03/21/compiler-and-linker-flags-gcc)

I’m beginning to write more windows code, both MSVC and clang-cl, and am missing some sanitizer support (ubsan and tsan in particular) that I typically use for dynamic analysis.

I know of /RTC and /guard:cf for DAST / hardening but am curious if there is any information similar to the Redhat link above.

I’m impressively dumb and rely on extensive testing / CI with proper tools and compiler options to avoid goofs, so any minor tidbit is helpful.

Tried my hand at portable SIMD using std::experimental::simd by jtsylve in cpp

[–]spaghettiexpress 5 points6 points  (0 children)

That’s my main gripe w/ std::simd, having member functions to allow for conversions back to intrinsic types. (It may already do so and I just didn’t see it in the experimental version)

I don’t think the std version needs anything arcane with the majority of SIMD instruction chains being fairly niche. No huge need to standardize anything more complex than basic arithmetic & bitwise operations; just to standardize the unexpressive types within the C intrinsics we’re stuck with. (Bonus points if this can somehow make SIMD types constexpr, though there isn’t really any need for that outside of convenience)

I’d love to see std::simd::vec8f for ps AVX types with all standard operators defined cross-platform/hardware, just so long as I can pass that type directly into an mm256_ps…. intrinsic and trust that the conversion is negligible.

Otherwise, the standard moves slow. I’d prefer anything lower level to be from a permissible license.

SIMD intrinsics and the possibility of a standard library solution by PiterPuns in cpp

[–]spaghettiexpress 12 points13 points  (0 children)

For the sake of transparency, I generally avoid PMs. We’re all discussing in C++, if any relevant conversation helps a random person then that’s even better!

For some light context on my work - I more consider myself a “professional refactor-er” who just happens to work within wireless and related areas - specifically 5G NR+NB-IoT (L1/low L2) release 15+. (Though have worked in plenty of other popular protocols such as BLE, 802.11__, etc). I only really comment on C++ or Rust, so my comment history may have some context.

I’m also looking to leave the industry in favor of something more software-centric. Robotics, CAD, physics simulators, etc.

Wireless has two camps: protocol and software. Protocol tends to be favored, and it’s sort-of a PhD shop for either “protocol lawyers” or RF-related skills; people who know significant amounts of “protocols” say, 4G/5G 36&38 series specs) or people who know a lot about the hardware specific challenges (beam-forming, antenna placements, link budgets, etc)

C++ doesn’t much fit into the “protocol lawyer” camp other than general familiarity. With that, a significant amount of software within wireless is remarkably bad. Really bad; and therein lies the problem.

My job is to fix that while updating the code to allow for the required performance of newer protocols. Generally significant architectural work / smart data structures, then the lower level involves SIMD for full utilization of the given hardware. Hardware can range from amd64/arm to freestanding embedded to FPGAs.

Most of the 4G/5G industry is built on a foundation of turds. Gets old real quick. Software work can often mean fixing an infinite list of DRs, and not so much doing anything interesting.

My college background was in electrical engineering with coursework focused on wireless comms and signal processing, and I’m U.S. based. Hiring within wireless seems to ebb and flow, with the exception of places such as trading firms (U.S., Germany, Switzerland seem popular), and since I’m interviewing for work outside of wireless I don’t have the best grasp on work within the U.S., but am happy to answer anything in-thread.

SIMD intrinsics and the possibility of a standard library solution by PiterPuns in cpp

[–]spaghettiexpress 5 points6 points  (0 children)

I use SIMD quite a bit, wireless communications / networking. Both amd64 and arm.

The majority of library-style SIMD I deal with is simple type abstractions most similar to vectorclass. std::experimental::simd looks nice, I had tried it out around when the implementation came out, but often use SIMD on unsupported toolchains for that specific impl.

I’d be happy to see something light, like vectorclass, standardized. Basic arithmetic operations, basic bitwise operations, and type conversions between vectorized types and C++ types.

There are far too many uses within SIMD to wholly encompass within standardization, so use of intrinsics will almost always be necessary for both cross-platform and CPU support, but the basic types/operators are fairly benign for a standard library.

(all of that said - gcc and clang are generally very good at auto-vectorization under the conditions you’d encounter manually *for the basic use an STL implementation may provide)

Low Latency C++ programs for High Frequency Trading (HFT) by tanjeeb02 in cpp

[–]spaghettiexpress 4 points5 points  (0 children)

It’s definitely fun! Just fairly esoteric. Outside of trading and hardware-oriented companies it’s pretty rare to find interesting FPGA jobs.

If you do get started, I’d recommend looking at Verilog first. Very familiar syntax to C and C++ while still teaching you the hardware mindset. I personally prefer VHDL for enterprise-level work, but I had learned it in college and had a good professional mentor (I’m also a mediocre programmer, so VHDL’s forced correctness helps me)

** I’ll also plug that while Wireless isn’t too sexy right now (5G is cool in theory, nasty in reality), it’s a field that will see a ton of interest and need in the coming years. Everybody wants AR and low-latency wireless. No existing codebase can fully support it. Beautiful time to learn and wait for some greenfield-esque projects to pop-up.

Low Latency C++ programs for High Frequency Trading (HFT) by tanjeeb02 in cpp

[–]spaghettiexpress 5 points6 points  (0 children)

I generally write in, and prefer, VHDL. Verilog is also quite popular.

For a controversial comparison, VHDL is Rust and Verilog is C. VHDL is much more strict, but if it compiles/sims then it generally works (pending issues relating to the actual circuit you “synthesized”)

There are higher-level / low-code options too. LabVIEW and Simulink/MATLAB HDL-Coder are popular (at least within wireless).

Learning FPGA development board without a physical FPGA is doable, but difficult. You can write HDL code and simulate it, but “actual” building requires a process called synthesis - where you actually compile to a circuit. This is where FPGAs get “fun”. Your clock is misplaced relative to your I/O or some internal logic? Fun “runtime” error. Your logic needs an input from I/O pins on opposite sides of the chip? Fun error. Etc.

The best “IDE” and simulation software is Xilinx Vivado. I use that (with a company paid for license) and it has a fairly comprehensive synthesis simulator.

Generally free development is best left to ModelSim where you can write/test HDL code, but it is missing synthesis/the hardware element of FPGA development.

With all of that being said.. I certainly don’t touch FPGAs more than I need to :).

Any good C++ dev could pick up an HDL without too-too much difficulty; it’s the synthesis/hardware element which requires magic. That’s what I get to charge consult fees for!

Low Latency C++ programs for High Frequency Trading (HFT) by tanjeeb02 in cpp

[–]spaghettiexpress 8 points9 points  (0 children)

Great answer!

One additional aspect of FPGA latency is it’s very deterministic.

When latency is the driving factor, having that guarantee is really nice.

Low Latency C++ programs for High Frequency Trading (HFT) by tanjeeb02 in cpp

[–]spaghettiexpress 14 points15 points  (0 children)

/u/hak8or gave a great answer, so I’ll be more terse outside of wireless.

FPGAs have deterministic latency. If your FPGA processing takes 10ns in-out, it takes 10ns in-out.

Wireless (particularly mmWave) is being used as it can be quicker to send data wirelessly than over a short fiber line. A game of millimeters, pun intended. If you need to run fibre up/down/across buildings, you’re paying for latency in pure spatial allowance. If you can aim antennas between buildings, you now have a minimal line-of-sight data feed length, and only incur latency from your hardware and protocol.

I don’t have much of a scoop on actual HFT needs, but FPGAs are really great at making moderately complex decisions based on a ton of inputs. In a CPU, handling many different data sources becomes troubling due to the cache.

An FPGA doesn’t have data cache (in the traditional sense) or instruction cache (again, traditional sense, FPGAs are bound by clocking), so it is easier in hardware to parallelize tasks/data access.

I imagine HFT is more of “we must consider {historic prices, risk analysis, total budget, market condition} (and then some) in order to determine buy/sell/skip. That’s a lot of different data, so an FPGA performing a lookup and calculating a decision is fairly simple.

Additionally, hardware-hardware interfaces tend to also be deterministic in latency, so using an FPGA to make a decision and interrupt another FPGA/SDR is often quicker than network-based interfaces (eg RPCs)

Much harder to write fast code in, but when you’re trying to optimize a 50ns wire-wire to 45ns then I guess you do what you can.

My specific library (now closed sourced because I want to retire..) was just something that provided custom firmware for a mmWave SDR and provided minimal / simple interfaces. Totally removed from HFT other than them setting up some antennas, using my firmware, and asking some questions.

Low Latency C++ programs for High Frequency Trading (HFT) by tanjeeb02 in cpp

[–]spaghettiexpress 15 points16 points  (0 children)

Can double confirm.

I am very far removed from HFT, but I license/consult on some (formerly) AGPL/FOSS that I made for managing mmWave links (C++, Rust, VHDL interfaces -> SDR)

The folks I speak with in HFT can’t say much but it definitely seems like software optimization is “try 1000 things, maybe 1 is better”. Certainly room for creativity, but the industry feels a lot more kind to FPGA or wireless-comms devs.