Language Selection

English French German Italian Portuguese Spanish

Programming Leftovers

Filed under
  • The Joy Of Limitations: Writing an ARexx REPL in ARexx

    I like limited computers. Of course all computers are limited in some sense: there's finite amounts of memory, disk space and screen real estate on all machines. When I'm talking limited, I usually mean home computers made during the 1990s and 1980s, machines that are now far surpassed by even the cheapest system on a chip.

    There are several reasons for this. One is familiarity: they're the type of machines I started my computing career on. Having used them and the software they run for three decades means that sitting down in front of one feels like coming home.

    Another one is scale: simpler machines are, well, simpler. When resources are scarce, there's less room for overengineered bloat, telemetry collection, "trusted computing" and other frivolities. More importantly, simple things are easier to understand, learn and remember.

  • Porting NU-Prolog (c. 1995) from BSD Unix to modern Linux

    NU-Prolog is a Prolog variant designed by the members of the Machine Intelligence Project at the University of Melbourne, released circa 1986, with a version 1.6.9 released circa 1995.

    Recently, I sought to port some software written in NU-Prolog (written by one of its creators, Lee Naish). Due to NU-Prolog's unique features, not found in contemporary free Prolog implementations such as GNU Prolog or SWI-Prolog, this pointed to porting NU-Prolog to modern systems as the easiest approach.

  • C++ Programming examples

    C++ is one of the popular programming languages to develop different types of applications. The application developed by this language is portable, which means the C++ application developed in Windows operating can be executed in Linux operating system without any change. It supports both structured and object-oriented programming. This tutorial has designed for those learners who are new users of C++ programming and want to learn from the basics. 40 C++ easy examples have been shown in these tutorials.

  • Can You Make a Vector of Vectors in C++?

    Yes! Yes, you can make a vector of vectors in C++. The normal vector is a one-dimensional list data structure. A vector of vectors is a two-dimensional list data structure, from two normal vectors. A 2-dimensional list is a table, without a proper header row and without a proper header column. A vector of vectors is one vector nesting other vectors. The template argument for the outer vector, is a vector. And so, a vector of vectors can only be of one type, e.g., all integers or all characters.

  • Python Is Integer

    This notebook explains how to check in Python if a number is a integer.

    There are multiple ways to check for integer in Python 2 and Python 3.

  • Cooperative package management for Python []

    A longstanding tug-of-war between system package managers and Python's own installation mechanisms (primarily pip, but there are others) looks on its way to being resolved—or at least regularized. PEP 668 ("Graceful cooperation between external and Python package managers") has been created to provide ways for the two types of package installation to work together, rather than at cross-purposes at times. Since many operating systems depend on Python tools, with package versions that may differ from those of users' Python applications, making them play together nicely should result in more stable systems.

    The root cause of the problem is that distribution package managers and Python package managers ("pip" is shorthand to refer to those throughout the rest of the article) often share the same "site‑packages" directory for storing installed packages. Updating a package, or, worse yet, removing one, may make perfect sense in the context of the specific package manager, but completely foul up the other.

  • This Week In Rust: This Week in Rust 407
  • How the JVM uses and allocates memory | Red Hat Developer

    This is the second article in a series that explains garbage collection in Java and how to tweak it for optimal Java application performance. The previous article introduced the stages and levels of garbage collection (including generational garbage collection) and showed how to check garbage collection behavior in your applications. This article goes into more depth about memory use in the Java Virtual Machine (JVM) and how to control it.

  • Break and Continue statements in JavaScript

    Do you ever feel stuck at some point in life where you just want to get rid of a moment or an instance? When you just want to skip some moments and then go with the flow? That might not be possible in real life but it’s possible in programming languages like JavaScript by using break and continue statements.

    These statements are known as Loop Control Statements; We are going to explain the break as well as continue statements in this article. We will make sure that everything about both of the concepts is delivered properly and in a precise way.

  • JavaScript Event Handlers

    In JavaScript, an event is an action that occurs on a webpage inside the browser. This action can be typing in a field, clicking a button, or loading a page. The actions can either be initiated by the browser or the user; when any action occurs on a web page the browser notifies the system that an event has occurred. Developers can then respond to these events by writing functions that are known as event handlers.Event handlers are functions that listen for a specific type of event and when that event occurs they execute a block of code.

  • Data Types in JavaScript? – Explained for Beginners

    Every value is always distinct from each other, which categorizes them into various types. This categorization of various data is called Data Type. The reason for categorizing the data is to ensure how the data is being used within the program.

    Like any other programming language, JavaScript also consists of various data types. Data Type is dynamic in JavaScript, which means a single value can be stored in various ways.

  • How to write Comments in JavaScript code

    Comments are notes that a programmer leaves in their code to make it more understandable. Most senior devs focus on writing code which is efficient and can be easily read and interpreted by computers. However it is of equal importance to make the code easily readable for the people (who will be working with the code in future) as well. A programmer must know how to properly structure code to make it more understandable for humans.

  • How to read and write text into a file using JavaScript?

    In this article, we are going to talk about how to read or write text to a file in JavaScript. If you are a JavaScript developer you know that one cannot save a file locally as it can create massive security problems.

    Another method would be saving the file on our server. For this, we have to pass all the text data in our file to our server. After this, we have to use the server-related server-side language due to which we will be able to execute the written code in the file. Apart from this, we can also store the file on the client-side. An example would be using cookies to store the information.

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.