snabelen.no er en av mange uavhengige Mastodon-servere du kan bruke for å delta i det desentraliserte sosiale nettet.
Ein norsk heimstad for den desentraliserte mikroblogge-plattformen.

Administrert av:

Serverstatistikk:

363
aktive brukere

#cpp

29 innlegg28 deltakere0 innlegg i dag

I spent all day digging into code to discover and fix this issue.

auto make_func(int v) {
auto f1 = [&] { return v; }; // OK
auto f2 = [=] { return f1(); }; // OK
return f2; // DANGER (has reference to local `v`)
}

int main() {
auto f = make_func(42);
return f();
}

I'm glad I found it, but is there any tooling that would save future me from spending so much time?

Unfortunately the state of graphics programming frameworks in #commonlisp is not quite there yet, so it seems I'll be crawling back to #cpp and #openframeworks for my graphics needs.

Bits and pieces are there in the lisp ecosystem, but there's nothing at the moment that ties it all together in the way that oF or Processing does. In the future I might think of going down the Clojure/quill route, as it seems I should be able to leverage the full power of a lisp and all of Java/Processing.

Just submitted a patch to #Guix adding Sourcetrail[1]! (PR #1129 [2]) It's a cool little tool and it was fun packaging it. Walking around a C/C++ project with a graphical tool is a great way to try and get a handle on what the big important functions and data structures are.

[1] github.com/OpenSourceSourceTra
[2] codeberg.org/guix/guix/pulls/1

Sourcetrail - free and open-source interactive source explorer - OpenSourceSourceTrail/Sourcetrail
GitHubGitHub - OpenSourceSourceTrail/Sourcetrail: Sourcetrail - free and open-source interactive source explorerSourcetrail - free and open-source interactive source explorer - OpenSourceSourceTrail/Sourcetrail

Learn to create custom fmt::formatter specializations in C++ for readable, indented output of nested structs. This guide uses CRTP and helpers to format complex types with indentation, making fmt and spdlog logging more human-friendly. #Cpp #CPlusPlus
kdab.com/indented-printing-wit

KDABIndented Printing of Nested Structs in C++ with fmt and spdlog | KDABEnhance your C++ logging with pretty-printed, indented output for nested structs using fmt and spdlog. Learn to implement custom formatters with CRTP for clean, readable logs.