cfnptr, to cpp

Made a custom css theme for Doxygen. At least now it doesn't look like it's from the 90's 🙂

#cpp #docs

ollibaba, to cpp German
@ollibaba@chaos.social avatar
gpakosz, to programming
@gpakosz@mastodon.gamedev.place avatar

Another drop-in 2 files library that you may find handy: https://github.com/gpakosz/uuid4

Robust implementation for UUID v4 generation that works on all major operating systems.

Validated with PractRand and TestU01.

#c

ypujante, to webassembly

I am very happy to announce the 1.0 release of my new free and open source project emscripten-glfw (https://github.com/pongasoft/emscripten-glfw) which is a port of glfw written in C++ for the web/webassembly platform. Check out the live demo: https://pongasoft.github.io/emscripten-glfw/test/demo/main.html.

#wasm #cpp #cplusplus #emscripten #glfw

hankg, to programming

The latest C standard, C23, adds some really nice modern C++ features like auto-typing, thousands separator on large integer definitions, depracation pre-processor markings etc. #programming #c #cpp lemire.me/blog/2024/01/21/c23-…

gpakosz, to programming
@gpakosz@mastodon.gamedev.place avatar

If you're developing in C or C++ and want to load assets or plugins relative to the current executable or module running, I made https://github.com/gpakosz/whereami a while ago

Runs on all major operating systems

#programming #c #cpp

mo8it, to rust
@mo8it@fosstodon.org avatar

Constructors in #Rust and #Cpp

An unbiased deep dive into constructors and their pitfalls

https://www.youtube.com/watch?v=KWB-gDVuy_I

Logan Smith's videos are very underrated!

#RustLang

AstraKernel, to rust
simontoth, to cpp
@simontoth@hachyderm.io avatar

C++20 introduced a set of safe integral comparison functions that can compare different integral types without introducing accidental conversions.

Compiler Explorer: https://compiler-explorer.com/z/3Phjhrcqv

#cpp #cplusplus #coding #programming #dailybiteofcpp

phiofx, to rust

For several years it seemed like deficiencies of older ecosystems will usher new takes: fixing , fixing , fixing , fixing etc.

But it no longer feels so. Maybe it was a case of "you have to move fast to fix things" and as incumbents raise their game the window of opportunity closes. The vast investment in established stacks incentivises patching the most egregious weaknesses.

One exception seems , which found a network niche

mstrohm, to random

By removing direct dvdread support, mpv broke DVD ripping for me since it now jumps to the dvd menu after the title I want to rip, producing a garbage output file. I tried alternatives like dvdbackup and handbrake, but both are not usable. The latter crashed at some point.

Seems I do have to write my own code again just to be able to batch rip DVDs on the command line. If that happens, it will be released here:

https://codeberg.org/ncc1988/moeripper

#DVD #DVDRipping #MPV #Handbrake #Fail

mstrohm,

Work on my own DVD ripping functionality that doesn't need mpv anymore started here:

https://codeberg.org/ncc1988/moeripper/src/branch/move-to-cpp

This will be a great opportunity to gradually move the whole functionality of moeripper.rb into a C++ application.

#Moeripper #Ruby #Cpp #Software #DVD #DVDRipping

mstrohm,

The small C++ program for ripping individual DVD titles is working now and available in the main branch of moeripper:

https://codeberg.org/ncc1988/moeripper

Thank you to all of those that contributed to libdvdread. It does all the magic during ripping and without it, my small C++ program could not be written in just a few hours.

#Moeripper #Ruby #Cpp #Software #DVD #DVDRipping #libdvdread

kloetzl, to python

New years resolution: stop using loops. In particular no more for(int i; i<size; i++){} that is just bad style. Use more algorithms, list-comprehensions or yield from. Much more expressive.

#python #cpp

Septem9er, to programming German

Edit: Solved

m_parts ist a vector. When lengthOfShip = 4, the code does add four objects to the vector but all with (row,col) not (row,col+i).

Why? I really don't see what's wrong.

#programming #cpp #cplusplus

Septem9er,

Next question: Why does this cause an segmentation fault? m_status is definitely 0 at this point (verified with debugger).

#programming #cpp #cplusplus

image/png

Ozzy, to cpp

in case you also wonder #1brc and compare #cpp vs #java I ran some code in my old laptop and numbers are fun to share.

cpp is from https://github.com/lehuyduc/1brc-simd and java from https://github.com/gunnarmorling/1brc/blob/main/src/main/java/dev/morling/onebrc/CalculateAverage_royvanrijn.java

for java I used #GraalVM to generate a native binary image and results:

./run_cpp.sh
Using 8 threads

real 0m23.854s

and for java
./calculate_average_royvanrijn.sh

real 0m13.402s

looks like java winning here or am I reading wrong ?

slint, to rust
@slint@fosstodon.org avatar

Throwback Thursday - Last month we had great discussions at the #ESEKongress in Sindelfingen. Our partner Cloudflight gave a great presentation on #Slint at the conference - "Slint in practice".

#rustlang #gui #cpp

Picture of customers discussing with Slint team at ESE Kongress.

darkcisum, to cpp
@darkcisum@swiss.social avatar

Does anyone know a tool to compare APIs of two different versions of a C++ library?
Meaning, it would list added, changed, and removed public APIs.

#cpp #cplusplus #api #OpenSource #FOSS #library

Chaos_99, to programming
@Chaos_99@fosstodon.org avatar

I'm always looking for new ways to explore large legacy code bases. I'm still wondering why there are no/few dedicated tools for this.

I've now tried the way of pre-processing C/C++ Source files with unifdef to remove the confusing mess that is build-options via preprocessor defines and then use doxygen to generate a browsable version of the code with call-graphs.

It's still far from perfect, but it helps.

#programming #cpp

artagnon, to cpp

In #kernel news, a 2018 thread on #LKML has recently had some activity, notably from H. Peter Anvin. It’s about using #cpp in the kernel. While it might arguably go nowhere, HPA’s lengthy commentary is worth reading.

https://lore.kernel.org/lkml/3465e0c6-f5b2-4c42-95eb-29361481f805@zytor.com/

uliwitness, to swift German
@uliwitness@chaos.social avatar

Wow! I hadn't realized calling Swift from C++ had landed in mainline Xcode already! And it's really easy to use:

  1. In Xcode, set ‘SWIFT_OBJC_INTEROP_MODE = objcxx’
  2. Make sure all Swift you want to call is public
  3. Include the "MYSWIFTMODULENAME-Swift.h" header from your C++ code. (Where MYSWIFTMODULENAME is your Swift module’s name)
  4. Create the Swift object by calling the MYSWIFTMODULENAME::MYSWIFTCLASSNAME::init() method. (with your initializer's arguments)

#swift #cplusplus #cpp

martinhelmut, to cpp

It's one thing to start using CMake in a project, it's another to actually create a distributable package for major operating systems. Something I learned on my journey mastering CPack with CMake.

I'll try to cover much: from application bundle structure, how installation works with CMake, adding a shared library, static assets like fonts and images, application icons, the installer itself, and more.

https://martin-fieber.de/blog/cmake-cpack-cross-platform-distributables/

lesley, to cpp
@lesley@mastodon.gamedev.place avatar

It is interesting that both C++ coroutines and async Rust are stackless coroutines, but unlike Rust, C++ coroutine states must be dynamically allocated.

In addition, C++ coroutines is a more general-purpose feature that can model things such as generators, which I definitely wish it could reside on stack.

I am not knowledgable enough about what kind of tradeoff lead to those design decisions though.

herzenschein, to cpp

:blobfoxdrakedislike:​

using namespace std::ranges;<br></br>using namespace std::ranges::views;<br></br><br></br>auto squaresOfEvenNumbers = someVectorOfInts<br></br>  | filter([](const int n){return n % 2 == 0;};)<br></br>  | transform([](const int n){return n * n;};)<br></br>  | to<std::vector>();<br></br>

:blobfoxdrakelike:​

using namespace std::ranges;<br></br>using namespace std::ranges::views;<br></br><br></br>auto isEven = [](const int n){return n % 2 == 0;};<br></br><br></br>auto square = [](const int n){return n * n;};<br></br><br></br>auto squaresOfEvenNumbers = someVectorOfInts<br></br>  | filter(isEven)<br></br>  | transform(square)<br></br>  | to<std::vector>();<br></br>

diehlpk, to cpp

We are happy to announce that we submitted our book to the publisher:

Parallel C++: Efficient and Scalable High-Performance Parrallel Programming

Using HPX

Stay tuned for the official release ad paperback and ebook.

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