Skip to content
  • 0 Votes
    2 Posts
    0 Views
    alison@burningboard.netA
    @meetingcpp I enjoy just randomly flipping through that book and reading a page or two.
  • 0 Votes
    2 Posts
    0 Views
    W
    @thing how about you stay away from that mess?Jokes aside I use this website quite a lot to look for specific APIs: https://cppreference.com/
  • 0 Votes
    1 Posts
    0 Views
    marcelschmall@infosec.exchangeM
    spdlog — Logging for C++ that actually gets out of your wayWhen you’re writing a Linux server in C++ close to the hardware, the last thing you want is a logging library that slows you down — at build time, at runtime, or when reading the code.That’s exactly where spdlog shines. Header-only — zero build ceremonyDrop the headers into your project, #include "spdlog/spdlog.h" and you’re done. No linking against extra libraries, no CMake gymnastics, no ABI headaches. For embedded systems or minimal server builds this alone is worth a lot.And because spdlog supports C++11 and up, it runs happily on older GCC toolchains — exactly the kind you find in Linux BSP environments and long-lived server codebases. Logging should be fast AND readablespdlog uses the {fmt} library under the hood, which means your log messages are formatted at compile time where possible. Instead of stringing together cout-style streams, you write:spdlog::info("Connection from {} on port {}", client_ip, port);Clean, readable, and significantly faster than printf or std::cout at runtime.🪣 The Sink System — one logger, many destinationsThe real power comes from sinks. A sink is simply a destination for log output — and you can attach as many as you want to a single logger.→ stdout_sink for live debugging in the terminal→ rotating_file_sink to write to disk with automatic file rotation→ syslog_sink to feed directly into the Linux system journalIn a hardware-near server this means you can log to syslog for production monitoring AND to a rotating file for post-mortem debugging — with a single log call in your code. No duplication, no extra logic. Log levels keep noise under controlspdlog supports the classic hierarchy — trace, debug, info, warn, error, critical. You set the minimum level per sink, so your rotating file might catch everything from debug upwards while syslog only sees warn and above. Perfect for production servers where log volume matters. For C++ server development on Linux, spdlog hits a rare sweet spot: trivial to integrate, fast enough for hot paths, and flexible enough for real production setups.#Cpp #Linux #SystemsProgramming #ServerDevelopment
  • Spot the error?

    Uncategorized cpp
    2
    0 Votes
    2 Posts
    7 Views
    charette@mstdn.caC
    And in case anyone tries to bring it up, keywords like "and", "not", "or" and many more have been part of the C standard since 1994 and C++ since 1998.That is not a bug!But it is true that many C and C++ developers don't know this is perfectly valid.The code above contains a very real bug I spent time hunting down tonight in that large codebase I've been looking into recently.
  • 0 Votes
    1 Posts
    0 Views
    jbz@indieweb.socialJ
    A Brief History of Bjarne Stroustrup, the Creator of C++ https://youtu.be/uDtvEsv730Y#cpp #programming
  • 0 Votes
    1 Posts
    4 Views
    patrick@hatoya.cafeP
    One Open-source Project DailyFree open-source non-linear video editorhttps://github.com/olive-editor/olive#1ospd #opensource #cpp #crossplatform #glsl #hardwareacceleration #linux #macos #opengl #qt #videoeditor #vst #windows