General Programming Discussion
- Never* use Datagrams - Media over QUICquic.video Never* use Datagrams - Media over QUIC
Media over QUIC is a new live media protocol in development by the IETF.
- Is the Java ecossystem of languages and related stuff a thing, professionally?
I'm in the course of pursuing a change in my career towards software engineering/architecture. So far I've been brought mostly to C#/.NET and Java, though Java attracts me more, even considering that it might be a "dying" language. Still, Scala and Clojure are there, so I thought that they might give a pump at least to JVMs. In your opinion, should I invest in pursuing certifications/jobs in this field, or sticking to C#/.NET is a better path?
- Study finds 268% higher failure rates for Agile software projectswww.theregister.com 268% higher failure rates for Agile software projects
In praise of knowing the requirements before you start cranking out code
- Using Vectorize to build an unreasonably good search engine in 160 lines of codeblog.partykit.io Using Vectorize to build an unreasonably good search engine in 160 lines of code
PartyKit now includes a vector database and access to an embedding model. Here’s a guide on how to use them to build a search engine.
- KDGpu 0.5.0 released: Vulkan wrapper now has OpenXR integration and morewww.kdab.com KDGpu 0.5.0 is here!
Our Vulkan wrapper KDGpu has evolving! Explore it's new features like OpenXR integration and wider device support.
Since we first announced it last year, our Vulkan wrapper KDGpu has been busy evolving to meet customer needs and our own. Our last post announced the public release of v0.1.0, and version 0.5.0 is available today. It’s never been easier to interact with modern graphics technologies, enabling you to focus on the big picture instead of hassling with the intricacies and nuances of Vulkan.
- Why are algorithms called algorithms? A brief history of the Persian polymath you’ve likely never heard oftheconversation.com Why are algorithms called algorithms? A brief history of the Persian polymath you’ve likely never heard of
Our modern lives are influenced by algorithms at every step. We can trace this influence back more than 1,200 years ago – to a Muslim mathematician.
- Why does every REST testing software want me to login?
I just want to build requests and read the responses, why the hell does everyone suddenly want me to make an account?
- Cobalt is a high-performance, small-footprint application container that implements a subset of HTML5/CSS/JSgithub.com GitHub - youtube/cobalt: Cobalt is a lightweight HTML5 application container
Cobalt is a lightweight HTML5 application container - youtube/cobalt
- Code Goes In, Art Comes Outwww.tylerxhobbs.com Code Goes In, Art Comes Out | Tyler Hobbs
The artwork of Tyler Hobbs, a practicing generative artist, creative coder, and painter, whose work has been featured in numerous exhibitions and has been...
- Your opinions on Bendgithub.com GitHub - HigherOrderCO/Bend: A massively parallel, high-level programming language
A massively parallel, high-level programming language - HigherOrderCO/Bend
New language promises to reduce compilation times by using all threads and gpu cores available on your machine. What's your opinions on it so far?
- C/Cpp projects
A while back, I created a repository for all the C/Cpp projects I’ve worked on, ones I’m still creating, or projects I’ve really liked from other people (including their licenses and credits). It’s essentially a big collection of C++ projects you can browse or use.
I recommend starting with:
-
miniShell
-
canChat
-
Simple-Code
-
design-patterns
-
Template_Language_Generator
-
simple_turso
-
CPP20_Develop
GitHub repository: https://github.com/ibra-kdbra/Cpp_Projects
Every directory has a README markdown file. The main README file is a bit disorganized because I’ve just been adding projects to it. To be honest, I could use some help with that.
Any contribution is welcome, spreading Cpp projects more among people
-
- How to split JavaScript strings into sentences, words or graphemes with "Intl.Segmenter"www.stefanjudis.com How to split JavaScript strings into sentences, words or graphemes with "Intl.Segmenter"
`Intl.Segmenter` enables you to split strings into meaningful parts such as words, sentences and graphemes.
- Computer Scientists Invent an Efficient New Way to Countwww.quantamagazine.org Computer Scientists Invent an Efficient New Way to Count | Quanta Magazine
By making use of randomness, a team has created a simple algorithm for estimating large numbers of distinct objects in a stream of data.
Traditionally, algorithms for counting distinct items in a stream of data would store all the items. A new algorithm, called CVM, uses randomization to estimate the number of distinct items with minimal memory usage. The trick is to keep track of items by recording them and then randomly deleting some. The probability of an item staying on the list is related to the number of rounds it survives. With this method, the researchers were able to accurately estimate the number of distinct words in Hamlet.
- New C++ features in GCC 14developers.redhat.com New C++ features in GCC 14 | Red Hat Developer
Discover new features and enhancements in the C++ front end in GCC 14, the next major version of the GNU Compiler Collection.
The next major version of the GNU Compiler Collection (GCC), 14.1, was released on May 7 2024. Like every major GCC release, this version brings many additions, improvements, bug fixes, and new features.
- euler-cl now tracks coverage with Codecov
cross-posted from: https://lemmy.ml/post/15607790
> Just wanted to share some (exciting) news about my Common Lisp project, euler-cl. I finally got the time to sit down and integrate it with Codecov! This means a couple of cool things: > > * 📈 Test Coverage Tracking: I can now see how well my code is tested over time, giving valuable insights into code quality. > * 🏅 Codecov Badge: euler-cl now sports a snazzy Codecov badge to show off! > * 📦 Reusable Setup: The code and setup process should be simple enough to be used as a reference to integrate Codecov (and potentially other services) into your own Common Lisp projects! > > If you're interested this commit is almost all you need: https://github.com/bahmanm/euler-cl/commit/855b014 > > Let me know in the comments if you have any questions or want to chat about integrating Codecov into your own projects!
- Useful K-hunt-gather pattern and O-hunt-gather patterns from Erlang patternsblog.syncpup.com Two Erlang patterns I love
But, all the same, sometimes you have to roll your own. And with the ‘K-hunt-gather’ and the ‘O-hunt-gather’ patterns, I generally plow ahead with confidence.
- On Hack Club
A comprehensive guide to Hack Club's inner circle, potential labor law violations, union busting, and fundamental lack of transparency, democracy & respect for members.
- Do (pure) functional system programming language exist?
Sorry if the question is a little vague. Lately, I've been exploring functional languages, and I'm really ill-informed about them.
I'm aware that most of these languages use some sort of garbage collection or reference counting, also that they're (slightly) slow, and that there's no other way for them to clear their memory manually apart from having to use inline C/C++. I know that some functional language can convert to C, but I'm not really interested in that.
I would like to understand if a system programming language, that is also purely functional, exists? If so, how does memory management work in such circumstances? Can be accommodated in a way such that it helps in the creation of, let's say, the OS kernel, and not the other way round. Can it run without having to use any inline assembly/C/C++ code?
If not pure functional languages, then what about impure ones?
- vague posting for profit and fun
im really tempted to quit my job and make this thing that has no potential for income.
50% of it is dissatisfaction with my day job. It pays the bills but i spend all of my time cleaning up after devs that are long gone.
50% is i want this project idea to exist. honestly i just want to make things. i dont remember the last time i just made a thing.
- Third edition of Programming: Principles and Practice Using C++ by Bjarne Stroustrup released
"Programming: Principles and Practice using C++ (3rd Edition)", aka PPP3, is an introduction to programming for people who have never programmed before. It will also be useful for people who have programmed a bit and want to improve their style and technique - or simply learn modern C++. It is designed for classroom use, but written with an eye on self study. Ealier versions of this book have been used as the basis for first programming classes for electrical engineering, computer engineering, and computer science students at Texas A&M University and in many other places.
People who have seen PPP2 will notice that PPP3 is about half its size. What I have done to keep the weight down is to
- strengthen the foundational chapters usually covered in a one-semester course, utilizing key parts of C++20 and C+23, and re-basing the Graphics/GUI chapter code on Qt for portability (e.g., to browsers and phones).
- placed the more specialized chapters (known as "broadening the view" in PPP2) on the Web for people to use as needed. See below.
- eliminate the pure reference material. You now can find more and more up-to-date material on the web, e.g. cppreference.com.
- Software Architecture is Overrated, Clear and Simple Design is Underratedblog.pragmaticengineer.com Software Architecture is Overrated, Clear and Simple Design is Underrated
I had my fair share in designing and building large systems. I've taken part in rewriting Uber's distributed payment systems [https://blog.pragmaticengineer.com/distributed-architecture-concepts-i-have-learned-while-building-payments-systems/] , designing and shipping Skype on Xbox One and open-sour...
- What's a good way to configure git with multiple providers using the conditional clause?
I have forge accounts from three respective sites: GitHub, GitLab and Codeberg. In all of these forges, I've opted to use secret e-mail. The reason for this is that when I had my original e-mail, I was spam-bombed job roles by a company from Shanghai within the Linux foundation, called Zilliz. Apparently, they extracted emails from git patches or something, I don't know much about it.
I want it to be configured, such that when I clone projects from respective sites, I will use their respective secret emails. However, the issue with this is that it is only configured for SSH, and not HTTPS-based URL - when I forget to fork and clone, and instead directly clone the repo from where it originally was, that is where I start to have problems - I can no longer commit, because I did not associate HTTPS URLs with an e-mail. I could, but the git config becomes really messy.
So far, I've come up with a setup that makes use of the if-clause supported by git. But the worst thing about configuring this is that it is so damn painful - I have to setup three different SSH keys, followed by setting up the config, and then also make sure that the keys are working for each sites individually, as well as check that the if-clause is working properly for email. Finally, I also have to create another set of SSH keys for signing commits, and at last, a allowed signer's file so that I can verify my own commits locally, all of this process is so damn frustrating. And again, the same mess on another desktop.
Is there an easier way to go about this?
- Mystical software design adviceericnormand.substack.com Mystical software design advice
Musings on the mystical cult of software engineering
- Khronos Releases OpenXR 1.1 to Further Streamline Cross-Platform XR Developmentwww.khronos.org Khronos Releases OpenXR 1.1 to Further Streamline Cross-Platform XR Development
The Khronos Group announces the immediate availability of the…
The Khronos® Group, an open consortium of industry-leading companies creating advanced interoperability standards, announces the immediate availability of the OpenXR™ 1.1 specification. This release evolves the widely adopted OpenXR open API standard for high-performance, cross-platform access to VR, AR, and mixed reality (MR) — collectively known as XR—platforms and devices. OpenXR 1.1 consolidates widely used API extensions into the core specification to reduce fragmentation and adds new functionality to streamline the development of more powerful and efficient XR applications.
In particular, OpenXR 1.1 consolidates multiple vendor extensions for key functionality to reduce differences in application code across multiple platforms, while still remaining flexible and extensible to foster innovation in a rapidly growing and evolving market. The OpenXR Working Group will focus on managing a pipeline of extensions to develop and seek feedback on new functionality, while proactively integrating proven technology into the core specification to provide developers with robust cross-platform XR capabilities.
Today, most major XR platforms have transitioned to using OpenXR to expose current and future device capabilities. Vendors with conformant OpenXR implementations include Acer, ByteDance, Canon, HTC, Magic Leap, Meta, Microsoft, Sony, XREAL, Qualcomm, Valve, Varjo, and Collabora’s Monado open source runtime. OpenXR is also supported by all the major game and rendering engines, including Autodesk VRED, Blender, Godot, NVIDIA’s Omniverse, StereoKit, Unreal Engine, and Unity.
The OpenXR 1.1 specification can be found on the Khronos website and on GitHub OpenXR Registry.
- Trying to understand how project isolation works in a SAAS platforms.
By project, I am talking about a "virtual" instance. I get to use a computer on their server, but how? Are those virtual machines, or containers?
If the former, then why - given how virtual machines have a large overhead? If the latter, then containers have a low degree of isolation compared to VMs, right? I've also heard about K3 and K8 before, but I don't know exactly what they are, and what role they place here.
And speaking about either of them - how are they introduced through a backend - by using bindings? Or is there a port-equivalent to pass instructions, similar to how we connect to a database?
- Is modern C (C11, C17 and C2x) strongly typed compared to C99?
I saw the video for C23 by ACCU, and I couldn't help but feel that C2x has gotten a bit stricter than what I had learnt. Since this is based on my intuition, and that is not reflective of the reality, I was wondering if modern versions of the language post C99 is a little bit strongly-typed?
- Opinions on this implementation of perfect square root finder?
This is a small program I've come up with, with the intention of finding the root of a perfect square. I wanted some comments on the performance impact, as well as the use of resources.
**square_root.c**
```c #include "square_root.h"
static uint64_t power(uint8_t base, uint8_t exp) { uint64_t result = 1;
while (exp--) { result *= base; }
return result; }
static uint64_t seed(uint64_t radicand) { uint64_t a = radicand; uint64_t n = 0;
while (radicand /= 100) { a = radicand; ++n; }
return ((a < 10) ? ((0.28 * a) + 0.89) : ((0.089 * a) + 2.8)) * power(10, n); }
static uint64_t heron(uint64_t x, uint64_t s) { while (s != power(x, 2)) { x = (x + (s / x)) / 2; }
return x; }
uint16_t square_root(uint64_t radicand) { return heron(seed(radicand), radicand); } ```
**square_root.h**
```c #ifndef SQUARE_ROOT_H #define SQUARE_ROOT_H
#include <stdbool.h> #include <stdint.h> #include <stddef.h>
uint16_t square_root(uint64_t radicand);
#endif ```
- Is this an efficient version of RNA Transcription in C?
Here's the program:
rna_transcription.c
```C #include "rna_transcription.h" #include <malloc.h> #include <string.h>
static const char lookup[] = { ['A'] = 'U', ['C'] = 'G', ['G'] = 'C', ['T'] = 'A' };
char *to_rna(const char *dna) { if (!dna) return NULL;
char *rna = calloc(strlen(dna) + 1, 1), *start_rna = rna; if (rna) { for (; *dna; dna++, rna++) { if (!(*rna = lookup[(int)*dna])) { free(rna); return NULL; } } } return start_rna; } ```
rna_transcription.h ```C #ifndef RNA_TRANSCRIPTION_H #define RNA_TRANSCRIPTION_H
char *to_rna(const char *dna);
#endif ```
I can't help but wonder how much of a waste of space the array would be. Surely, using a map is better, right?
- Embedding the Servo Web Engine in Qtwww.kdab.com Embedding the Servo Web Engine in Qt
Using CXX-Qt to integrate a web rendering engine written in Rust
While the task of writing a brand new standard-compliant browser engine is infamous as being almost unachievable nowadays (and certainly so with Chromium coming in at 31 million lines of code), the Rust ecosystem has been brewing up a new web rendering engine called Servo. Initially created by Mozilla in 2012, Servo is still being developed today, now under the stewardship of the Linux Foundation.
At KDAB they managed to embed the Servo web engine inside Qt, by using their CXX-Qt library as a bridge between Rust and C++. This means that we can now use Servo as an alternative to Chromium for webviews in Qt applications.
- Qt 6.7 releasedwww.qt.io Qt 6.7 Released!
With Qt 6.7, developers can use C++20, use SVG beyond 1.2 Tiny, visualise data with 2D graphs, and lots more!
Qt 6.7 is out with lots of large and small improvements for all of us who like to have fun when building modern applications and user experiences. Several additions are released as technology previews, and we are looking forward to your feedback so that we can get everything ready for the next LTS release!
- As a C beginner, should I be bothered by not being able to understand this?
Most of the stuff went over my head, Why should I care that C is no longer low-level? What exactly is considered close-to-metal in today's time, apart from binary and assembly?
- Where does arena allocator fail, when it comes to memory safety?
I've recently come across arena allocator, and I can already see how they are a big improvement to the standard heap allocator present in C.
What are the other areas it fails to address, when it comes to memory safety?
- Why did Cyclone fail?
Cyclone was supposed to be a safer dialect of C. Shouldn't it have replaced C by now, while also adding some improvements and reducing the burden of legacy code?
- AMD Makes HIP Ray-Tracing Open-Source
AMD's HIP Ray-Tracing library "HIP RT" has been one of the few projects under the GPUOpen umbrella that starts off as closed-source software but then is eventually open-sourced... That happened now with the HIP ray-tracing code becoming publicly available.
- Docker Image Fusions for Simpler Workflows!github.com GitHub - bahmanm/bdockerimg: A collection of Docker images which are otherwise not easy to find.
A collection of Docker images which are otherwise not easy to find. - bahmanm/bdockerimg
If you've found yourself manually crafting complex Docker images or repeatedly installing tools, I've got something for you 😁
Check out "fusions" in bdockerimg project (https://github.com/bahmanm/bdockerimg).
---
With fusions, you merge base images into powerful composite images.
Currently there are:
- sdkman.bmakelib
- quicklisp.bmakelib
---
Let me know what other fusions would make your Docker life easier 🙏
- There is a right way to contribute to Open Sourceopensource.net There is a right way to contribute to Open Source
We've fostered a culture that prioritizes being seen over being supportive and we we've instilled this belief in the next generation of developers. Here's what to do about it.
There’s been a lot of noise recently about contributing to Open Source. Many developers contribute to Open Source projects for various reasons, including building their commit history for recruiters or gaining visibility through badges. However, experienced Open Source contributors have observed a troubling trend: contributing is seen as an obligation and a badge of honor, leading to frustration when it’s not straightforward.
- The Book You Need to Start With Linux Kernel Developmentitsfoss.com The Book You Need to Start With Linux Kernel Development
The Linux Kernel Programming (Second Edition) is a must-read for anyone who is interested in writing code for the Linux Kernel.
- Open-source project ZLUDA lets CUDA apps run on AMD GPUswww.cgchannel.com Open-source project ZLUDA lets CUDA apps run on AMD GPUs | CG Channel
Experimental tech lets NVIDIA-only apps, including RealityCapture and Arnold, run unmodified on AMD GPUs. Check out our FAQs on it.
Andrzej Janik has released ZLUDA 3, a new version of his open-source project that enables GPU-based applications designed for NVIDIA GPUs to run on other manufacturers’ hardware. The wrapper technology is designed to enable existing applications to run on new hardware unmodified, without the need for any work on their developers’ part.
- Could bdockerimg make your dev life easier?
I've been working on a small project called bdockerimg.
It's a collection of pre-built Docker images for some less common development tools (currently bmakelib, QuickLisp, and SDKMAN).
The idea is to streamline setup, especially for CI/CD pipelines, where I found myself repeating the same Dockerfile steps a lot. Basic functionality tests are included for a bit of extra peace of mind.
---
👀 Here's the repo if you're interested: https://github.com/bahmanm/bdockerimg 🗣 And here's the the Matrix room: https://matrix.to/#/#bdockerimg:matrix.org
---
I'm curious:
- Does this seem like something you might find useful?
- Are there any specific tools you'd love to see as easy-to-use Docker images?
---
This project is still in its early stages, so any feedback or contributions are much appreciated 🙏
- GDB 14.2 released
Release 14.2 of GDB, the GNU Debugger, is now available. GDB is a source-level debugger for Ada, C, C++, Fortran, Go, Rust, and many other languages. GDB can target (i.e., debug programs running on) more than a dozen different processor architectures, and GDB itself can run on most popular GNU/Linux, Unix and Microsoft Windows variants. GDB is free (libre) software.
GDB 14.2 brings the following fixes and enhancements over GDB 14.1:
- PR symtab/31112 (DLL export forwarding is broken)
- PR c++/31128 (gdb crashes when trying to print a global variable stub without a running inferior)
- PR tdep/31254 ([gdb/tdep, arm] FAIL: gdb.threads/staticthreads.exp: up 10)
- PR gdb/31256 (Crash with basic 'list .')
- PR python/31366 (Frame.static_link() segfaults)