shafik, to random
@shafik@hachyderm.io avatar

#2 Christmas C++

Santa I want ...

#cplusplus

shafik, to random
@shafik@hachyderm.io avatar

Late

#18 Spooky Halloween C++

👻🎃👻🎃👻🎃👻🎃👻🎃

What is a dragons favorite algorithm

🐲🐲

std::accumulate

👻🎃👻🎃👻🎃👻🎃👻🎃

#cplusplus

DM_Ronin, to embedded
@DM_Ronin@mstdn.social avatar

Me using both Python and C at work: :ablobcatknitsweats:

#Embedded #Programming #Software #Development #Python #C #Cplusplus #Coding

gracicot, to cpp
@gracicot@mastodon.social avatar

Today my PR to add the #vcpkg package to nix has been merged!

A minimal set of patches was needed for vcpkg to work as an installed program in an immutable file system. A wrapper script to set mutable paths (download, buildtrees, packages) in the home directory, and make vcpkg write the lock file to /tmp/vcpkg/root-id. Works like a charm!

The only features that don't work (and cannot work) is anything requiring the vcpkg git history, but usually there's ways around that. #cpp #cplusplus

simontoth, to cpp
@simontoth@hachyderm.io avatar

📆 Day 7 of Advent of Code 2023 is here. Today, we are analyzing "Poker" hands.

😴 I have to apologize for laziness today. I went the easy route.

🤔 Did you take the time to come up with a fancy encoding to analyze the hands?

https://open.substack.com/pub/simontoth/p/daily-bite-of-c-advent-of-code-day-078?r=1g4l8a&utm_campaign=post&utm_medium=web

#cpp #cplusplus #coding #programming #dailybiteofcpp #adventofcode

JSMuellerRoemer, to programming

A work-related post for a change: Our team is planning to expand in the field of automatic, robust geometry processing. If you are interested in applied research in that field with the option of a PhD, you can find the job posting (German only for now) here: https://jobs.fraunhofer.de/job/Darmstadt-Wissenschaftlicher-Mitarbeiterin-im-Themenbereich-Geometrieverarbeitung-und-Optimierung-64283/1010285501/

Please boost for reach

#researchanddevelopment #appliedresearch #geometry #optimization #programming #cplusplus #rustlang #hiring

shafik, to random
@shafik@hachyderm.io avatar

Is Zero a Butterfly: https://shafik.github.io/c++/2021/01/03/is_zero_a_butterfly.html

Or

How do you turn a meme into a blog post.

#Cplusplus

fell, to programming
@fell@ma.fellr.net avatar

I just found a piece of old code where I encoded some information into an 8-bit bitfield just to decode it again 3 lines later.

I am certainly wiser now.

#programming #cpp #cplusplus #gamedev #gamedevelopment

shafik, to random
@shafik@hachyderm.io avatar

C++ and Zero

#cplusplus

shafik, to random
@shafik@hachyderm.io avatar

Extremely cursed code of the day:

struct A {
void f(int) const;
void f(const std::string&);
};

void b() {
A a;
a.f(1); // Well-formed
a.f(0); // Ill-formed?!?!?!?
}

Godbolt: https://godbolt.org/z/qbEzz6hhv

It is worse b/c clang reject, gcc accepts w/ diagnostic and MSVC silently accepts 🤯

#Cplusplus

simontoth, to cpp
@simontoth@hachyderm.io avatar

📆 Day 2 of Advent of Code 2023 is here. Today, we are parsing information about cubes.

😱 Did you struggle with the parsing?
😉 What was your approach?

https://open.substack.com/pub/simontoth/p/daily-bite-of-c-advent-of-code-day-e49?r=1g4l8a&utm_campaign=post&utm_medium=web

#cpp #cplusplus #coding #programming #dailybiteofcpp #adventofcode

meetingcpp, to cpp German

Better C++ ranges - Arno Schödl - Meeting C++ 2023
https://www.youtube.com/watch?v=fODb3MsfWRM
#cpp
#cplusplus

ChristosArgyrop, to cpp

The experience with #Copilot dramatically improved after I stopped asking it for novel code, & started using it as an autocomplete for #Clang. Code for functions with different prototypes but the same functionalities appear after I do the 1st. This plays nice with variadic macros.
On the #cpp #cplusplus side, it can use the STL rather well, saving me from having to look up things. I've observed that it will do better with higher level lang (e.g. #perl or templated C++) than C @Perl

ChristosArgyrop,

@Perl An interesting application of these observations (at least for my beloved #perl) is that one can write very quickly large chunks of Inline #clang or #cplusplus code for @Perl . Again, it is important not to let it hallucinate (especially if you have a tendency to typedef the living daylights out of your code): just finish your function BY HAND and let it generate boiler plate to use it, variations with different signatures, and even XS glue to move data from C <-> Perl.

vitaut, to programming
@vitaut@mastodon.social avatar
fosstian, to random
@fosstian@fosstodon.org avatar

Spent some time wrestling with #cPlusPlus and #debugging in #gdb to give #ledgerCLI the ability to cope with the UK's mad tax year. I blame Henry VIII 👑

https://galagic.com/post/20231201155114/hacking-on-a-ledger/

foonathan, to cpp
@foonathan@fosstodon.org avatar

Fun fact: std::common_type_t is not associative.

That is, you can define types A, B, C where

std::common_type_t<A, B, C>

and

std::common_type_t<B, C, A>

are different, without user-defined specializations.

https://godbolt.org/z/avje767xq

matias, to windows

If you ever want to prank someone, here's a good one: Add " <Windows.h>" to one of their C++ projects. It will definitely mess up a lot of stuff, and break their code in strange ways 😈

vitaut, to programming
@vitaut@mastodon.social avatar

Thanks to Corentin Schreiber, {fmt} can now handle large dates and ready for the final Odyssey #programming #cplusplus https://github.com/fmtlib/fmt/pull/3727

meetingcpp, to cpp German
khalidabuhakmeh, to dotnet
@khalidabuhakmeh@mastodon.social avatar

I think folks are spoiled by tooling, but reading the overwhelmingly positive feedback from CLion Nova users writing with is a nice reminder of the joy great tooling can bring folks.

hankg, to programming

I did a lot of C++ programming back in the early 2000s. C++ has evolved a lot since then. Every time I go back to revisit it to see what is new it seems to be filled more and more with these sorts of easy to step on your own foot pedanticness. I think I'd rather jump to Rust than back to C++ if I had to pick a lower level language again and straight C wasn't an option. #programming #CPlusPlus devblogs.microsoft.com/oldnewt…

smurthys, to cpp
@smurthys@hachyderm.io avatar

Given all the ad block conversation around YouTube, I wonder what it would take for conferences to post their videos to PeerTube or similar video service. I mean they have the content ready to go.

Various conferences in a topic could even together start their own instance and share the infrastructure cost. There won't be any need for content moderation.

Looking at you Cpp North, C++ on Sea, C++ Now, Meeting CPP, AdaCon, ...

https://joinpeertube.org/

#cpp #cPlusPlus #video #peerTube #cpp_video

foonathan, to cpp
@foonathan@fosstodon.org avatar

The "fun" thing about C++ is that

static_cast<decltype((x))>(x)

is a no-op, but

static_cast<decltype(x)>(x)

isn't.

foonathan, to cpp
@foonathan@fosstodon.org avatar

I've written a new blog post:

C++ needs undefined behavior, but maybe less

https://www.think-cell.com/en/career/devblog/cpp-needs-undefined-behavior-but-maybe-less

#cpp #cplusplus

  • All
  • Subscribed
  • Moderated
  • Favorites
  • JUstTest
  • mdbf
  • ngwrru68w68
  • modclub
  • magazineikmin
  • thenastyranch
  • rosin
  • khanakhh
  • InstantRegret
  • Youngstown
  • slotface
  • Durango
  • kavyap
  • DreamBathrooms
  • provamag3
  • GTA5RPClips
  • tacticalgear
  • normalnudes
  • tester
  • osvaldo12
  • everett
  • cubers
  • ethstaker
  • Leos
  • anitta
  • cisconetworking
  • megavids
  • lostlight
  • All magazines