Posts

Prolog: between logic and programming language

Image
Table of Contents 1. Introduction 2. Hands on the keyboard 3. Example 4. The appeal of Prolog 5. Let's play with logic 5.1. Prolog version 5.2. Python version 6. Observations on the two languages 1. Introduction Created in the 1970s for natural language processing and artificial intelligence, Prolog (short for "Programmation en Logique") is a somewhat unusual programming language. Prolog's “logic” focuses on defining relationships and facts rather than sequential instructions. The language is based on three fundamental pillars: Facts: Absolute truths about the world we are modeling. Rules: Conditional relationships that allow us to infer new information. Queries: Questions asked of the system to verify the truth of a statement or find solutions. In Prolog, there are no “for” loops or variables in the traditional sense. 2. Hands on the keyboard To test Prolog code on your computer it's possible to install SWI-Prolog, ...

Vim... beyond Vim

Image
Table of Contents 1. Vim in five minutes 2. Not a tutorial about Vim 3. Vim in Emacs: Evil Mode, the emulator par excellence 4. Vim in Sublime Text 5. Vim in Visual Studio Code 6. Vim in Zed: the youngest 1. Vim in five minutes Vim is not just a text editor, it is an editing language that allows you to interact with text through logical key combinations. The basis of Vim's "language" is the "modal" system. The main modes are as follows: Normal Mode : The "command center." Each key is a movement or modification command. Insert Mode : Where you actually write the text. Visual Mode : For selecting blocks of text. This separation eliminates the need to use the Ctrl key or mouse for every operation, reducing hand fatigue. In Vim, your hands never leave the center position of the keyboard. Basic movements are performed with h, j, k, and l, but the real power lies in semantic jumps: Words : w (jump to the beginnin...

Personal observations on Robocopy, Rsync, and Rclone

Image
Table of Contents 1. Introduction 2. Previous article: brief comparison between robocopy and rsync 3. Slow rsync with WebDAV 4. Installing Rclone on Linux: repository or official website? 5. Configuring Rclone 1. Introduction Robocopy: The "Robust File Copy" is a built-in powerhouse for Windows users. It’s the native way to handle massive local transfers or network shares (SMB) while perfectly preserving NTFS permissions. Rsync: The de facto standard for the Unix world (Linux and macOS). It’s famous for its efficiency—instead of re-copying everything, it only syncs the specific parts of a file that have changed. Rclone: Think of Rclone as "Rsync for the Cloud." While the tools above were born for physical disks and local servers, Rclone was built for the API era. It is a true multi-platform "Swiss Army knife" that runs seamlessly on Windows, Linux, macOS, and even FreeBSD. What sets it apart is its incredible versatility: it ...

Comments on the APPLICATION BAR and KEYBOARD SHORTCUTS in WINDOWS and GNU/LINUX.

Image
Table of Contents 1. Introduction 2. What is the "Super" Key? 3. What is the Taskbar? 4. The Core Concept: Super + Number 5. To Pin or Not to Pin? That is the Question. 6. More Than Just Windows: The "Super + Number" Shortcut on Linux 7. Beyond the OS: Browsers and Outlook 8. The Bottom Line 1. Introduction In modern desktop environments, from Windows to mainstream GNU/Linux distributions, Alt+Tab remains the go-to shortcut for window switching. While seamless for light multitasking, this method hits a wall as your workflow grows. Once you have dozens of active windows, what was once a quick "flip" becomes a tedious cycle of repetitive keystrokes. Even Alt+Esc fails to address the root of the problem, as it still forces you to manually scan through an endless stack of applications to find the one you need. There is, however, a faster and more surgical approach: the Super + Number combination. In this article, I will e...

Two open source tools for editing PDF documents: GUI versus CLI.

Image
Table of Contents 1. Introduction 2. Managing operations with PDF Arranger 3. Managing the same operations with PDFtk. 4. In summary 1. Introduction The “PDF” is the essentially static document format par excellence. However, even PDF documents can be modified, especially with operations such as deleting, adding, reversing pages, inserting text, and more. There are various applications, including free ones, for performing these operations. In this article, I will report some parallel observations between two systems for page manipulation: one graphical, PDF Arranger, and one command line, PDFtk. PDF Arranger is a free and open source application (a fork of PDF-Shuffler) ideal for merging, splitting, rotating, and cropping PDF files in an intuitive way. PDFtk is one of the most powerful tools for manipulating PDFs in command line mode. I would like to point out that this article does not claim to be exhaustive on the two systems mentioned, but is onl...

Four text commands in GNU/Linux, MS Windows, and, with a bit of nostalgia, MS-DOS.

Image
Table of Contents 1. Does it still make sense to perform operations via the command line? 2. How do you open a command terminal? 3. The “cd” command. 4. The “ls” and “dir” commands. 5. The “cp” command. 6. The “rm” command. 7. In conclusion. 1. Does it still make sense to perform operations via the command line? Talking about the command line in today's operating systems might seem a bit vintage, as if the topic were a historical remnant of the first personal computers of the 1980s. In reality, even today, the command line is an extraordinarily efficient resource, despite the most modern graphical interfaces. MS-DOS was my first operating system back when “windows” had not yet been invented. To write this article, I recovered from my paper library an old book published in 1989 dedicated to MS-DOS, in which I found my underlinings from that time. Graphical systems have made everything easier but not faster . The advantage of text commands over thei...

LibreOffice Writer and non-sequential page numbering.

Image
Table of Contents 1. Subject of the article. 2. How to insert a page number other than 1. 3. Change the page number when inserting a page break. 4. The common denominator. 1. Subject of the article. LibreOffice is an open source, multi-platform suite for document processing. Great for writing, calculating, drawing, and much more. The reference page in English can be found at this page . Writer is the module of the Suite dedicated to word processing. This article is not a tutorial on how to use the LibreOffice Writer module, for which there are numerous pages on the internet, but focuses on a specific feature that, although perfectly efficient, initially caused me some confusion: non-sequential page numbering . I would therefore like to share some considerations that may be useful. 2. How to insert a page number other than 1. The first difficulty came when I had to change the numbering of the first page of a document by inserting a number othe...

MS Windows: xcopy and robocopy with mentions of batch procedures and rsync.

Image
Table of Contents 1. Copy and Paste: the universal method. 2. A short introduction to the Command Line in MS Windows. 3. Two integrated command-line solutions: xcopy and robocopy. 4. Basic scheme and some options, among many, of the robocopy command. 5. Robocopy and batch procedures. 6. Robocopy and Rsync. 7. FreeFileSync 1. Copy and Paste: the universal method. To transfer files from one folder to another folder we usually use “copy and paste.” The “universal method” is “copy and paste”: we all know how it works and it is certainly simple and straightforward. But is it also the most efficient method? If there were some documents already previously transferred and others to be transferred, it would be necessary to manually select those to be transferred before doing the “copy and paste,” and this operation could be particularly time-consuming. In cases like these, more efficient solutions should be sought. These solutions exist but are somewhat hidden...