Posts

Showing posts from February, 2026

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...