Language Selection

English French German Italian Portuguese Spanish

Programming Leftovers

Filed under
  • 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

IBM and Red Hat

  • Languages and DevOps: Mainframe

    In true DevOps fashion, I nearly forgot to cover the mainframe after saying it warranted its own blog! There is a lot going on right now in the mainframe space, so the question of mainframe language choices has several different answers. We’ve got Linux running on the mainframe, we’ve got cross-compiled open source capable of running on the mainframe natively, we’ve got mainframe-based containers and we even have traditional mainframe tools being ported to other platforms (hello, COBOL on Linux!) so that development can happen on smaller platforms but target the mainframe. Taken in the order they came available, we have traditional mainframe development, in languages like COBOL and RPG, right on the mainframe in standard LPARs. This has gotten easier over the years, but is still basically the same development environment that was used in the 1980s, with prettier UIs.

  • Paving the path to organizational goals: Consider the bridge not built

    Thomas Sowell opines in Basic Economics that “[…] the real cost of anything is still its value in alternative uses. The real cost of building a bridge is whatever else could have been built with that same labor and material. The cost of watching a television sitcom or soap opera is the value of the other things that could have been done with that same time.” Organizations make this determination every time they choose to work on one ticket, project, or objective and key result (OKR) over another. Making this value judgment explicit is critical to a well-functioning organization. To do this effectively, organizations must understand and communicate priorities, and individuals must be incentivized to work towards those priorities.

  • Optimize your RHEL infrastructure: 5 performance areas to focus on

    Would you rather wait for something to become a problem, or do some performance tweaking and optimization to avoid downtime or performance headaches altogether? The answer to that is easy, but deciding what to optimize or troubleshoot isn't always obvious. In this post we'll cover some common areas where you can use Red Hat Insights and its Advisor service to solve problems before they start.

Programming Leftovers

  • Node.js 16 is here with updated platform support, V8 version 9, and more!

    As with most major releases, this release updates the minimum supported levels for platforms and tooling used to build Node.js. Some examples include updating the minimum supported Xcode version to 11 and the GCC version for Linux and AIX platforms to 8.3. Please check the documentation in Node's building instructions for all the latest minimum levels. More interesting is the work being done to add support for the new Apple M1 architecture. The Red Hat team is active in the Node.js build working group, helping to keep the infrastructure running to support the Power PC and s390 architectures, but also helps with work across the other architectures. Red Hat's Ash Cripps, a build work group member for Node.js, has been actively working to install/configure M1 machines so that we can test/build binaries that are compiled for M1 and run natively. Node.js 16 will be the first version to provide native M1 support.

  • Glassfish and Payara Auto-clustering: Running Java EE Highly-available Applications In The Cloud

    Building a highly-available clustered infrastructure is one of the most commonly used solutions to achieve 100% uptime for your application. In a clustered environment, there is a number of interconnected instances running the same stack and operating the same data. So cluster is able to handle more load than a single server. It will also add more servers automatically to the cluster as per application demand.

  • Python output buffering

    This only works if the script's stdout is unbuffered. Pipe the output through cat, and you get a long wait, and then the final string, without the animation. What is happening is that since the output is not going to a terminal, optimizations kick in that buffer the output and send it in bigger chunks, to make processing bulk I/O more efficient. I haven't found a good introductory explanation of buffering in Python's documentation. The details seem to be scattered in the io module documentation and they mostly assume that one is already familiar with concepts like unbuffered, line-buffered or block-buffered. The libc documentation has a good quick introduction that one can read to get up to speed.

  • Kushal Das: Adding dunder methods to a Python class written in Rust

    Last week I did two rounds of my Creating Python modules in Rust workshop. During the second session on Sunday, someone asked if we can create standard dunder methods, say __str__ or __repr__. I never did that before, and during the session I tried to read the docs and implement it. And I failed :)

  • Optimize your Python code with C |

    Cython is a compiler for the Python programming language meant to optimize performance and form an extended Cython programming language. As an extension of Python, Cython is also a superset of the Python language, and it supports calling C functions and declaring C types on variables and class attributes. This makes it easy to wrap external C libraries, embed C into existing applications, or write C extensions for Python in syntax as easy as Python itself.

Latest Linux Foundation Press Releases

  • Magma Project Accelerates with Establishment of Magma Core Foundation and New Members Under Open Governance
  • Magma Project Accelerates with Establishment of Magma Core Foundation and New Members Under Open Governance

    Today, the Magma project, an open-source software platform that gives network operators an open, flexible and extendable mobile core network solution, announced project and community growth since its recent move to the Linux Foundation to establish a neutral governance framework. Since moving to the Linux Foundation, Magma has made strides as a community, in partnership with the Open Infrastructure Foundation and OpenAirInterface Software Alliance. The collaboration has formally become the Magma Core Foundation, and project and community growth includes new members, the adoption of a master architecture roadmap, and formation of a neutral governance structure. In addition, the community will host its first Linux Foundation-managed event, Magma Day, co-located with KubeCon + CloudNativeCon Europe 2021.

  • The Linux Foundation Hosts Open19 to Accelerate Data Center and Edge Hardware Innovation

    The Linux Foundation, the nonprofit organization enabling mass innovation through open source, today announced it will host the Open19 Foundation, an open hardware platform for data center and edge hardware innovation. It is also announcing that one of the original founders of the Open19 project, Yuval Bachar, is joining the Linux Foundation to lead this effort. Project leadership includes premiere members Equinix and Cisco.

  • The Linux Foundation Hosts Open19 to Accelerate Data Center and Edge Hardware Innovation
  • Linux Foundation To Host Open19 Foundation

    Linux Foundation has announced that it will host the Open19 Foundation, an open hardware platform for data center and edge hardware innovation. Yuval Bachar, one of the original founders of the Open19 project, is joining the Linux Foundation to lead this effort. Project leadership includes premiere members Equinix and Cisco. Open19 focuses on hardware standards that enable compute, storage and network manufacturers and end users to develop differentiated hardware solutions while protecting their competitive intellectual property.

Ubuntu: New Video (Final Release Imminent) and More

  • Ubuntu 21.04 overview | Fast, secure and simple.

    In this video, I am going to show an overview of Ubuntu 21.04 and some of the applications pre-installed.

  • Community AMA: Indaba for 21.04

    An indaba is a conference or gathering to discuss matters of importance, originating from the Xhosa and Zulu languages. Following this theme, we are excited to be hosting our first Desktop Indaba this Friday. Everybody is welcome to take part by asking questions for our AMA (Ask Me Anything) part of the session. Learn more below!

  • Deploying Mattermost and Kubeflow on Kubernetes with Juju 2.9

    Since 2009, Juju has been enabling administrators to seamlessly deploy, integrate and operate complex applications across multiple cloud platforms. Juju has evolved significantly over time, but a testament to its original design is the fact that the approach Juju takes to operating workloads hasn’t fundamentally changed; Juju still provides fine grained control over workloads by placing operators right next to applications on any platform. This is exemplified in our most recent changes to how Charmed Operators behave on Kubernetes. In recent release candidates of Juju 2.9 (rc7/rc8/rc9/rc10), we’ve done a lot of work to ensure the juju bootstrap process on Kubernetes is as smooth and as universal as possible – meaning it should be easier than ever to bootstrap a Juju controller on a Bring-your-own-Kubernetes! But don’t take our word for it, deploy yourself some killer apps on a Kubernetes of your choice…