Programming Leftovers
-
Eclipse OpenJ9 Version 0.37.0 -
Eclipse OpenJ9™ release 0.37.0 works with OpenJDK 19. OpenJDK 19 is out of support at the time of the 0.37.0 release. Builds of 0.37.0 should not be used in production and might contain known security vulnerabilities as of 18 April 2023.
-
Announcing WCGI: WebAssembly + CGI
Welcome to the future of server-side development with WebAssembly! Today we are introducing WCGI, a technology that marries the power of WebAssembly with the versatility and simplicity of CGI.
-
Implementing C++20 semaphores
C++20 introduces
counting_semaphore
andbinary_semaphore
, which support blockingacquire()
and non-blockingtry_acquire()
as well as timedtry_acquire_for()
andtry_acquire_until()
. On platforms that support__platform_wait()
/__platform_notify()
, we select an implementation strategy based onatomic
; otherwise, we attempt to use POSIX semaphores.If you missed the previous article, read it here: Implementing C++20 atomic waiting in libstdc++
Semaphores in C++
Here's what the ISO C++ Standard has to say on the matter of semaphores:
1 Class template counting_semaphore maintains an internal counter that is initialized when the semaphore is created. The counter is decremented when a thread acquires the semaphore, and is incremented when a thread releases the semaphore. If a thread tries to acquire the semaphore when the counter is zero, the thread will block until another thread increments the counter by releasing the semaphore.
-
Defining interfaces in C++ with ‘concepts’ (C++20)
In an earlier blog post, I showed on the Go programming language allow you to write generic functions once you have defined an interface. Java has a very similar concept under the same name (interface).
-
Meson & VSCode: Develop your project in a modern IDE [Ed: So now Collabora is pushing proprietary Microsoft spyware and calls it "modern"; this makes Collabora look hostile.]
Want to develop your Meson project in a modern IDE? Make sure to install Meson VSCode extension which is now fully functional with the recent release of Meson 1.1.0!
-
Sebastian Dröge: Building a GStreamer plugin in Rust with meson instead of cargo
Over the Easter holidays I spent some time on a little experiment: How hard is it to build a GStreamer plugin in Rust with meson instead of using the default Rust build system cargo?
meson is a community-developed, open-source, cross-platform (including Windows), multi-language build system that is supposed to be fast and easy to use. It’s nowadays used as a build system by a lot of components of the GNOME desktop, by GStreamer, systemd, Mesa, X.org, QEMU and many other pieces of Free Software. Mostly for building C or C++ code, but also for configuring and installing Python or JavaScript code, Vala, and other languages.