Language Selection

English French German Italian Portuguese Spanish

Programming Leftovers

Filed under
Development
  • Jussi Pakkanen: Mixing Rust into an existing C shared library using Meson

    Many people are interested in adding Rust to their existing projects for additional safety. For example it would be convenient to use Rust for individual high-risk things like string parsing while leaving the other bits as they are. For shared libraries you'd need to be able to do this while preserving the external plain C API and ABI. Most Rust compilation is done with Cargo, but it is not particularly suited to this task due to two things.

    [...]

    As adding numbers is highly dangerous, we want to implement the adder_add function in Rust and leave the other functions untouched. The implementation in all its simplicity is the following...

  • 20 Useful Grep Command Examples in Linux

    Grep is a command-line utility widely used in Linux/Unix that uses in searching data sets of specific files for lines that match a regular expression of plain texts. Grep stands for Global Regular Expression Print. It was originally named by Ken Thompson who was also the original author. He named it so because in ed the command g/re/p has the same effect as grep. In this guide we will cover 20 useful grep command examples.

  • Bash if-else statements

    In your day-to-day life, many things are associated with conditions. For example, when we decide, we first analyze its conditions, outcomes and finalize the decision. Conditional statements in any programming language shadow the same way, and they are core to every language. These statements are used to manage code execution flow and perform tasks based on true and false conditions.

  • Difference between CPython, Jython, IronPython, PyPy, and Cython – Linux Hint

    Computer Science is one of the hottest fields out there right now, and it keeps on growing and expanding further. It has tremendously evolved from what it used to be in the early days and now is being used for content that is changing the lives of millions of people. Such has been its advancement that has allowed concepts like artificial intelligence, deep learning, and so many others, which once looked impossible to come into existence.

    One particular element of computer science that has seen a large evolution is the programming language section, which is an integral part of machines and comprises instructions that allow the machines to perform different tasks. Python is one high-level programming language that has immensely grown and is being used in multiple sectors of the industry.

    However, Python itself is vast and can be implemented in several different flavors, which shall also be the topic of our discussion in this article, and where we will be looking at the different implementations that currently exist of Python.

  • How to Create Django Views? – Linux Hint

    Different types of data of Django application, such as HTML content, XML data, JSON data, image, 404 error, etc. are transferred to the template through Django view. Each view is created for a specific purpose and associated with a particular template. The data of the view can be generated from the user through HTML form or from the database or business logic. Django views can be created using a method of python class or python function. The class-based views contain many functionalities compared to function-based views. For this, most of the Django applications use class-based views to represent the data of the Django application. The ways of creating the function-based view and class-based view have been explained in this tutorial.

  • A blog post about blog posts

    There are lot's of good reasons for using the system perl, some of which include that the distribution packagers spend much time bundling and patching them, the security advantage of system perl packages being digitally signed (plenv and perlbrew don't have any such mechanisms), or using mod_perl that comes with the distribution.

    Folks may also be using perl for utility scripts in a perl averse company.

    Disparaging comments about which perl interpreter people use and how it's installed don't persuade, inform, or encourage people to do more with perl, nor do they respect the different circumstances that other people may be working under.

  • I failed to pause before blogging
  • Vue Computed Deep Structures – Linux Hint

    When it comes to the computation of nested or deep data types like arrays or objects, Vue.js or any other programming language does not automatically detect the hierarchical change in the data. However, we all know that Vue.js provides the watch and computed properties to perform some change variables. But when it comes to nested data changes, Vue.js does not detect that. This post will learn to perform some changes by watching the nested data of arrays or objects.

    Before learning about watching nested data in Vue.js, let’s first understand how the watch property works?

  • Dirk Eddelbuettel: RcppArmadillo 0.10.2.2.0 on CRAN: New Upstream Patch Release

    Armadillo is a powerful and expressive C++ template library for linear algebra aiming towards a good balance between speed and ease of use with a syntax deliberately close to a Matlab. RcppArmadillo integrates this library with the R environment and language–and is widely used by (currently) 841 other packages on CRAN.

    This release brings us a second update within the Armadillo 10.2 series, one month after the initial release. Upstream work has commenced at a 10.3 series with first pre-releases which we are currently testing. If possible, CRAN release will continue to be at least one month apart (such as this time) but we continue to make interim releases available on the Rcpp drat repo repo.

  • Troubleshoot WiFi problems with Go and a Raspberry Pi

    Last summer, my wife and I sold everything we owned and moved with our two dogs to Hawaii. It's been everything we thought it would be: beautiful sun, warm sand, cool surf—you name it. We've also run into some things we didn't expect: WiFi problems.

    Now, that's not a Hawaii problem. It's limited to the apartment we are renting. We are living in a single-room studio apartment attached to our landlord's apartment. Part of the rent includes free internet! YAY! However, said internet is provided by the WiFi router in the landlord's apartment. BOO!

  • Flutter 2.0 embedded UI toolkit embraces Windows, macOS and Linux
  • Qt 6 - Based Qt Creator Snapshots

    These snapshots are based on the 4.15 branch of Qt Creator and the upcoming Qt 6.1 release. You find them on our download server here: https://download.qt.io/snapshots/qtcreator_qt6/.

  • Boost Your Programming Skills by Reading Git's Code

    Each of these methods will appeal to different people, and each one has elements that will definitely make you a better programmer. If you are an intermediate or advanced coder, it is almost certain that you've tried each of these methods at least once.

    However, there is another method that the vast majority of developers overlook, which is a shame in my opinion because it has so much to offer. This method is to learn by reading, analyzing, and understanding existing, high-quality codebases!

    We are lucky to live in a time where good code is often accessible for free via high-quality, free-and-open-source (FOSS) projects.

  • Java 16 Goes GA on March 16 Includes 17 Enhancements -- ADTmag

    The general availability (GA) release of the Java 16 Platform (Java SE 16) and the Oracle Java Development Kit (Oracle JDK) is set for March 16.

    Oracle JDK 16 will be a short-term support release, which will be obsolete after the Long Term Support (LTS) release of Java 17 in September, but it comes with a long list of enhancements and upgrades, including Pattern Matching for instanceof; Records, previewed in Java 14; the new Packaging Tool; incubating versions of the Vector API, the Foreign Linker API, and the Foreign-Memory Access API; Sealed Classes, which is a preview feature.

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.