Language Selection

English French German Italian Portuguese Spanish

Programming Leftovers

Filed under
Development
  • What is your favorite Linux scripting or programming language? | Enable Sysadmin

    Of all the scripting and programming language options available to you on the Linux platform, which one is your favorite?

  • When costs are nonlinear, keep it small.

    It shows Preventive Maintenance as a series of small costs. Minor repairs are a series of bigger costs, and major repairs are much bigger than that. Every maintenance delayed escalates into a minor repair and then a major repair — costs increase nonlinearly with time delay.

  • Old compilers and old bugs

    The kernel project goes out of its way to facilitate building with older toolchains. Building a kernel on a new system can be enough of a challenge as it is; being forced to install a custom toolchain first would not improve the situation. So the kernel developers try to keep it possible to build the kernel with the toolchains shipped by most distributors. There are costs to this policy though, including an inability to use newer compiler features. But, as was seen in a recent episode, building with old compilers can subject developers to old compiler bugs too.

    On January 5, Russell King reported on a problem he had been chasing for a long time. Some of his 64-bit Arm systems running 5.4 or later kernels would, on rare occasion, report a checksum failure on the ext4 root filesystem. It could take up to three months of uptime for the problem to manifest itself, making it, as King described it, "unrealistic to bisect". He had, however, found a way to more reliably reproduce the failure, making the task of finding out when the problem was introduced plausible, at least.

    Starting with King's findings, a number of developers working in the Arm subsystem looked into the issue; their efforts seemed to point out this commit as the culprit. That change, applied in 2019, relaxed the memory barriers used around I/O accessors, optimizing accesses to I/O memory. Reverting this patch made the problem go away.

  • Callback Function in C++ – Linux Hint

    A callback function is a function, which is an argument, not a parameter, in another function. The other function can be called the principal function. So two functions are involved: the principal function and the callback function itself. In the parameter list of the principal function, the declaration of the callback function without its definition is present, just as object declarations without assignment are present. The principal function is called with arguments (in main()). One of the arguments in the principal function call is the effective definition of the callback function. In C++, this argument is a reference to the definition of the callback function; it is not the actual definition. The callback function itself is actually called within the definition of the principal function.

    The basic callback function in C++ does not guarantee asynchronous behavior in a program. Asynchronous behavior is the real benefit of the callback function scheme. In the asynchronous callback function scheme, the result of the principal function should be obtained for the program before the result of the callback function is obtained. It is possible to do this in C++; however, C++ has a library called future to guarantee the behavior of the asynchronous callback function scheme.

  • Regarding the closure of rt.cpan.

    Let me preface this short post with this, I don't have the solution to this problem. Perhaps there is someone in the wider Perl space who is well placed to pick this up, but there seems to be little going on in terms of community engagement.

    In the first week of 2021 I noticed a link to this sunset message for rt.cpan behind displayed on the rt.cpan homepage. Firstly I believe the notification on the page could be highlighted better, grey on grey, on a page with lots of grey isn't exactly eye catching.

    At the time the linked article didn't contain much information, besides a date. It has since been updated with links to resources to migrate tickets elsewhere.

    A reply to my post in the perlmonks news section was concerning to me, I shortly found the infrastructure working group post on topicbox (which I find no link to on any of the perl websites, or release documentation). This thread was concerning in so much as a single volunteer has decided to step back, which is of course fine, but it doesn't seem like the option of asking the wider community if anyone would be willing to step up and take it over has been explored. It doesn't even seem to be being openly discussed.

  • Perl weekly challenge 096 - Raku
  • GNU Linux Bash – script for troubleshoot long term test testing network internet connection connectivity

    this script is intended for long term testing of reliability of network connection/connectivity

More in Tux Machines

TVs With Linux and Raspberry Pi Latest

  • From Plex to Jellyfin Media Server

    I migrated away from Plex just a week before its much over-publicized “security issues” last month. I just want to go on the record and say that my decision had nothing to do with this incident. The “security issue” boiled down to Plex not behaving ideally on mismanaged and insecure network configurations. In my opinion, Plex isn’t to blame for security errors in network configurations made by inexperienced network administrators.

  • The first Rockchip RK3566 TV box is out with H96 Max running Android 11

    Rockchip RK3566 is a quad-core Cortex-A55 processor with plenty of peripherals designed for AIoT and NVR applications. While it still supports features like high-dynamic range or video post-processing, it’s not really optimized for TV boxes, but this has not stopped the maker of H96 Max “8K UltraHD” TV box to launch an RK3566 model with 4GB RAM and 8GB RAM now sold for respectively $59.99 and $76.99 on Banggood.

  • Raspberry Pi Pico – Vertical innovation
  • Linux 5.13 To Support HDMI CEC With The Raspberry Pi 4

    While the 5.12 merge window hasn't even been closed for a full week yet, there is already the first DRM-Misc-Next pull request heading into DRM-Next with the first batch of feature material aiming for the Linux 5.13 kernel cycle. This initial batch of DRM-Misc-Next includes the removal of TTM memory management and Medfield support from the GMA500 "Poulsbo" driver that goes along with the rest of the Linux kernel dropping the Intel MID support for 5.12 and lingering remnants being removed with 5.13. There is also i.MX8MM support added to the MSXFB driver among many other random changes to these smaller drivers.

AMD Linux 5.12 and Linux 5.10.20

Ubuntu: Unbreaking Unbootable Ubuntu, Snaps Shrunk and More

  • Unbreaking Unbootable Ubuntu

    I run Ubuntu Hirsute - the development release which will become 21.04 - on a bunch of systems. It’s a trade-off though, getting the latest crack each and every day. Being at the bleeding edge of new packages landing means I can experience brand new shiny bugs on my systems. Bugs like 1915579 which rendered my system unbootable.

  • Honey, I Shrunk the Snap! | Ubuntu

    The year is 1989. I bought a computer game called F-16: Combat Pilot, a flight simulator featuring free-flight, five types of single-player missions, a full campaign mode, serial-port multiplayer, and then some. Gloriously wrapped in four colors and magnetized on two single-density 5.25-inch floppy disks. Total size: 680 KB. Nowadays, it is not uncommon for individual applications to weigh dozens if not hundreds of megabytes. But it doesn’t have to be that way. In Linux, you can save some space by using libraries that are shared across multiple applications (hence their name, shared libraries). When it comes to self-contained application formats like snaps, the tables are turned once again, as snaps bundle all the necessary dependencies inside, and thus take more disk space. If you want to make your snapped applications as small and lean as possible, we have a few neat suggestions. [...] The final artifact of the snap build process is a compressed squashFS file, with the .snap suffix. Originally, snaps were compressed using the xz algorithm, for highest compatibility with the widest range of devices. More recently, in order to help speed us snap launch times, we also introduced the use of the lzo algorithm, which results in 2-3x application startup times improvements. The main reason for this is the lesser compression used in lzo compared to xz, meaning the system needs fewer CPU cycles, and thus less time, to uncompress the snap on the system. However, it also introduces size inflation. [...] Disk utilization matters less now than it did a decade or two ago, but you can still try to make your applications small and tidy. This also helps reduce bandwidth usage, improves portability, and if you’re using system backups, reduces the time needed to copy all the relevant data. With snaps, there are many ways you can trim down on the digital excess, including the use of extensions, sparing use of necessary runtime dependencies, and pruning the extras from the prime directory. Not only will your snaps be smaller in size, you will also ensure higher consistency, better system integration and improve the application startup time. All these are important, highly noticeable elements of the user experience. If you have any other suggestions or ideas on how to conserve space or optimize snap creation, please join our forum and share your thoughts.

  • Canonical keynote at Embedded World 2021: Bosch Rexroth achieves complete IoT automation with Ubuntu Core

    series that’s already being used in the current stable release, Ubuntu 20.10 (Groovy Gorilla). But that good news I want to share with you today is the fact that Ubuntu 21.04 will also offer several apps from the GNOME 40 stack.

  • Bad Voltage 3×24: Weaponised Rooster

    Stuart Langridge, Jono Bacon, and special guest star Alan Pope present Bad Voltage, in which we are large and in charge, there is ancient history about electricians and phones...

IBM/Red Hat: Kafka Monthly Digest, Red Hat Upselling, and Cockpit 239

  • Kafka Monthly Digest – February 2021

    This is the 37th edition of the Kafka Monthly Digest! In this edition, I’ll cover what happened in the Apache Kafka community in February 2021.

  • 5 ways Red Hat Insights can improve your sysadmin Life

    The way we do things is changing fast. This has become a necessity as our systems get more complex, our workloads evolve, and our deployments rapidly grow in size. Thanks to the innovations brought about by openness and collaboration, we can develop tools and services to cope with these quickly evolving times. For us to reap the benefits of these advancements, we should open ourselves to carefully exploring how various tools suit our requirements and fit into or change our norms. By doing so, we may simplify a lot of our mundane tasks, reduce overhead, and address the major pain points in our operations. Having worked as a sysadmin in the past, I've discovered many automation tools and services that have made my life easier. One of the most recent is Red Hat Insights. In this article, I share five ways this service that is included with your Red Hat Enterprise Linux (RHEL) subscription can improve your life as an admin.

  • Cockpit Project: Cockpit 239

    Cockpit is the modern Linux admin interface. We release regularly. Here are the release notes from Cockpit version 239.