Language Selection

English French German Italian Portuguese Spanish

Programming Leftovers

Filed under
Development

  • LLVM Clang 12 Adds Support For Vectorization Using Glibc's Vector Math Library - Phoronix

    Upstream LLVM/Clang now supports making use of the vector math library found within the GNU C Library.

    Clang 12 will allow for vectorization using libmvec via the -fvec-lib=libmvec compiler option.

  • Notes to self on frama-c | Richard WM Jones

    Frama-C is a giant modular system for writing formal proofs of C code. For months I’ve been on-and-off trying to see if we could use it to do useful proofs for any parts of the projects we write, like qemu, libvirt, libguestfs, nbdkit etc. I got side-tracked at first with this frama-c tutorial which is fine, but I got stuck trying to make the GUI work.

  • Why I Dislike Switch Statements

    Of course this is a contrived example, but readers will hopefully agree it's representative of the construct.

  • Setup - Full Stack Tracing Part 2 - KDAB

    If you’ve read the first article in this series, you’ll know what full stack tracing is and why you definitely want it. This time, we’ll show you how to setup full stack tracing on your Linux system. There are two steps – first get everything configured to capture a trace, and then view and interpret the trace.

    Setup full stack tracing with a bit of kernel help

    To capture a trace, we’ll be using LTTng (Linux tracing toolkit next generation) in our examples. LTTng captures tracepoints with minimal overhead. This is something you definitely want, as too much extra CPU introduced by tracing can change the system’s behavior, even causing it to fail unpredictably. Another factor in LTTng’s favor is that it’s well supported by the open source community.

    LTTng was designed to record kernel level events. However, you’ll also want to use its user space tracepoints to capture application level events. That will give you consistent visibility, regardless of where execution moves throughout the software stack. User space tracepoints is critical to the setup of full stack tracing as it lets you integrate application, Qt, and kernel tracepoints together in a single view.

  • Mariuz's Blog: Firebird 3.0.7 sub-release is available

    Firebird Project is happy to announce general availability of Firebird 3.0.7 — the latest point release in the Firebird 3.0 series.This sub-release offers many bug fixes and also adds a few improvements, please refer to the Release Notes for the full list of changes.Binary kits for Windows, Linux, Mac OS and Android platforms are immediately available for download.All users of Firebird v3.0.6 are

  • Use of self or $this in PHP – Linux Hint

    In PHP object-oriented programming, we have the self keyword and $this variable that is used for different purposes. The self keyword represents current and static members of the class. While the $this variable represents current object and non-static members of the class. More about these are discussed in this article.

  • 4 C programming courses for every skill level

    Even with so many other system-level languages to choose from, C remains the popular choice. Many key projects—such as the Linux kernel and the Python runtime—still use C, and they will likely do so indefinitely. For some fields of computing, like embedded programming, C is a must.
    And there has never been a better time to learn C. Resources abound, from books to guided courses. Here we’ll look at four major online course offerings for learning C programming, each aimed at different levels of user and offering different approaches. For instance, one combines learning C with learning Linux, while another teaches C and C++ together.

  • rand() Function in C Language – Linux Hint

    In the C language, the rand() function is used for Pseudo Number Generator(PRNG). The random numbers generated by the rand() function are not truly random. It is a sequence that repeats periodically, but the period is so large that we can ignore it. The rand() function works by remembering a seed value that is used to compute the next random number and the next new seed. In this article, we are going to discuss in detail how random numbers can be generated using the rand() function. So, let’s get started!

  • A bug by any other name – Open Source Security

    This tweet from Jim Manico really has me thinking about why we like to consider security bugs special. There are a lot of tools on the market today to scan your github repos, containers, operating systems, web pages … pick something, for security vulnerabilities. I’ve written a very very long series about these scanners and why they’re generally terrible today but will get better, but only if we demand it. I’m now wondering why we want to consider security special. Why do we have an entire industry focused just on security bugs?

    Let’s change the conversation a little bit. Rather than focus on security bugs, let’s ask the question: Which bugs in a given project should we care about?

    There are of course bugs an attacker could use to compromise your system. There are also bugs that could result in data loss. Or bugs that could bring everything down. What about a bug that uses 10% more CPU? Every piece of software has bugs. All bugs are equal, but some bugs are more equal than others.

    We are at a time in software history where we have decided security bugs are more equal than other bugs. This has created entire industries around scanning just for security problems. Unfortunately the end goal isn’t always to fix problems, the goal is often to find problems, so problems are found (a LOT of problems). I think this is a pretty typical case of perverse incentives. You will always find what you measure. The pendulum will swing back in time, maybe we can help it swing a little faster.

  • Why you should use ppport.h in your XS code modules | Karl Williamson [blogs.perl.org]
    
    
    
    
    The answer comes down to two words: Security and Reliability.
    As a bonus, less work on your part.
    
    
    
    
    It's surprising to find that there are modules on CPAN that aren't using
    ppport.h that could stand to benefit from it.
    
    
    
    
    ppport.h is a file that is part of the Devel::PPPort distribution. As you
    know, Perl has evolved over the years, adding new features, and new API for XS
    writers to use. Some of that is to support the new features, and some to make
    tasks easier to accomplish. ppport.h implements portions of the API that
    people have found desirable to have when a module gets installed in a Perl that
    was released before that API element was created. You can write your module
    using the latest API, and have it automatically work on old Perls, simply by
    #including ppport.h in your XS code. ppport.h generally provides support for
    an API element as is reasonably practicable, with many supported to 5.03007.
    
    
    
    
    Importantly, but often overlooked, ppport.h can override buggy early Perl
    implementations of an API element. By using it, you get fixed, proper
    behavior. That sure beats trying to reproduce a reported problem in your
    module that only happens in some ancient Perl, and then try to come up with a
    workaround in an area you aren't familiar with.
    
    
    
    
    This is especially important if your XS code interacts with Unicode in any way.
    Early versions of the Unicode standard and early Perls allowed things that we
    now know are potential attack vectors. Right now, someone could be using your
    module to hack into systems, so you are actually being negligent if you don't
    use ppport.h.
    
    
    
    
    If your XS code has preprocessor #if statements that check for the existence of
    functions, macros, etc, that are only in later perls, you can generally avoid
    that by simply using ppport.h
    

More in Tux Machines

digiKam 7.7.0 is released

After three months of active maintenance and another bug triage, the digiKam team is proud to present version 7.7.0 of its open source digital photo manager. See below the list of most important features coming with this release. Read more

Dilution and Misuse of the "Linux" Brand

Samsung, Red Hat to Work on Linux Drivers for Future Tech

The metaverse is expected to uproot system design as we know it, and Samsung is one of many hardware vendors re-imagining data center infrastructure in preparation for a parallel 3D world. Samsung is working on new memory technologies that provide faster bandwidth inside hardware for data to travel between CPUs, storage and other computing resources. The company also announced it was partnering with Red Hat to ensure these technologies have Linux compatibility. Read more

today's howtos

  • How to install go1.19beta on Ubuntu 22.04 – NextGenTips

    In this tutorial, we are going to explore how to install go on Ubuntu 22.04 Golang is an open-source programming language that is easy to learn and use. It is built-in concurrency and has a robust standard library. It is reliable, builds fast, and efficient software that scales fast. Its concurrency mechanisms make it easy to write programs that get the most out of multicore and networked machines, while its novel-type systems enable flexible and modular program constructions. Go compiles quickly to machine code and has the convenience of garbage collection and the power of run-time reflection. In this guide, we are going to learn how to install golang 1.19beta on Ubuntu 22.04. Go 1.19beta1 is not yet released. There is so much work in progress with all the documentation.

  • molecule test: failed to connect to bus in systemd container - openQA bites

    Ansible Molecule is a project to help you test your ansible roles. I’m using molecule for automatically testing the ansible roles of geekoops.

  • How To Install MongoDB on AlmaLinux 9 - idroot

    In this tutorial, we will show you how to install MongoDB on AlmaLinux 9. For those of you who didn’t know, MongoDB is a high-performance, highly scalable document-oriented NoSQL database. Unlike in SQL databases where data is stored in rows and columns inside tables, in MongoDB, data is structured in JSON-like format inside records which are referred to as documents. The open-source attribute of MongoDB as a database software makes it an ideal candidate for almost any database-related project. This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘sudo‘ to the commands to get root privileges. I will show you the step-by-step installation of the MongoDB NoSQL database on AlmaLinux 9. You can follow the same instructions for CentOS and Rocky Linux.

  • An introduction (and how-to) to Plugin Loader for the Steam Deck. - Invidious
  • Self-host a Ghost Blog With Traefik

    Ghost is a very popular open-source content management system. Started as an alternative to WordPress and it went on to become an alternative to Substack by focusing on membership and newsletter. The creators of Ghost offer managed Pro hosting but it may not fit everyone's budget. Alternatively, you can self-host it on your own cloud servers. On Linux handbook, we already have a guide on deploying Ghost with Docker in a reverse proxy setup. Instead of Ngnix reverse proxy, you can also use another software called Traefik with Docker. It is a popular open-source cloud-native application proxy, API Gateway, Edge-router, and more. I use Traefik to secure my websites using an SSL certificate obtained from Let's Encrypt. Once deployed, Traefik can automatically manage your certificates and their renewals. In this tutorial, I'll share the necessary steps for deploying a Ghost blog with Docker and Traefik.