[UNIMATRIx] Concept of an AI society simulation
What happens if a group of agents, with different personalities, roles, and social positions, are given rules that require them to form a democratic society? I started from this question to create UNIMATRIx, an open source software project, a sociological experiment, a testbed to understand and find definitions of the LLMs' ways of thinking. The setup: roughly fifty AI agents, all running off one model, sharing a single simulated society. Each has a name, a personality, a backstory, and a stati...
Read post
02. Coding Sound in c++: the toolchain
Before writing code, it is necessary to understand the software environment that transforms human-readable text into a functioning audio plugin. This collection of software is referred to as the "toolchain." In this course, we utilize a specific set of tools standard in the Windows audio development industry. The process begins with the Source Code, which is the C++ text you write. This text is processed by a Compiler, a program that translates your commands into machine code (...
Read post
00. Coding Sound in c++: introduction
Welcome to Coding Sounds in C++ learning path. This module serves as the blueprint for everything we are about to build together. Many audio programming tutorials simply show you how to generate a sine wave and leave you there, but this course is fundamentally different because it is entirely project-based and coding focused. By the end of our time together, you will have built a fully functional VST3 and AU plugin that you can load into any Digital Audio Workstation like Ablet...
Read post
Rustlers Atom 2.11: Returning references
Returning references is one of the most common stumbling blocks for new Rustaceans. The rule is simple but strict: You cannot return a reference to something created inside the function. Why? Because when the function returns, its stack frame is destroyed. Any variable created inside that function (that isn't returned by ownership) is dropped. If you returned a reference to it, you would be pointing to freed memory. The Dangling Reference (Forbidden) fn create_dangling() ->...
Read post
Rustlers Atom 2.10: Move vs Clone Semantics
Understanding the memory layout of growable collections like String and Vec is the key to understanding why Moves are fast and Clones are expensive. A String (or Vec) is made of three parts stored on the Stack: Pointer: Points to the data on the heap. Length: How much data is currently used. Capacity: How much space is allocated before we need to ask the OS for more. The actual data (the letters of the string) lives on the Heap. We can prove how this works by inspecting t...
Read post
Rustlers Atom 2.9: RefCell/Cell interior mutability
In rust you cannot mutate data behind a shared (immutable) reference. But what if you need to? What if you have a struct that is logically immutable to the outside world, but needs to update an internal counter, a cache, or a log? This pattern is called Interior Mutability. Rust provides safe wrappers that let you bend the rules by moving the checks from compile time to runtime. Cell<T>: Copying in and out Cell is for types that implement Copy (like integers or boolean...
Read post
Rustlers Atom 2.8: Cow<T> - Clone On Write
Sometimes you want to efficiently return a string slice &str (no allocation) but sometimes you need to modify that string before returning it, which requires a String (heap allocation). Do you return String every time and pay the allocation cost even when you didn't change anything? Do you return Option<String> and make the caller confuse? Rust provides a standard enum for this exact scenario: std::borrow::Cow (Clone-on-Write). Cow is a smart wrapper that can hold ei...
Read post
Rustlers Atom 2.7: Reborrowing
If Rust strictly followed the "Move" rule for mutable references, programming would be incredibly tedious. Technically, a &mut T is not Copy. This means if you pass a mutable reference to a function, it should be moved into that function, and the original variable holding that reference should become unusable. But . . . this code works: fn modify(x: &mut i32) { *x += 1; } fn main() { let mut data = 10; let r = &mut data; modify(r); // r is moved into...
Read post
Rustlers Atom 2.6: NLL (non-lexical lifetimes)
For a long time, Rust’s concept of a "lifetime" was strictly tied to lexical scope—the curly braces {}. If you created a reference inside a block, the compiler assumed that reference lived until the closing brace }, period. This was safe, but annoying. It often rejected valid code because the compiler wasn't smart enough to see that you were done with a variable before the block ended. Since the 2018 edition, Rust uses Non-Lexical Lifetimes (NLL). The borrow checker now looks...
Read post
Rustlers Atom 2.5: Scope, Drop and distruction determinism
Rust uses Resource Acquisition Is Initialization (RAII). This means the life of a resource (memory, file handle, network socket) is tied directly to the life of the variable bound to it. In garbage-collected languages, objects are cleaned up "eventually." In Rust, cleanup is deterministic. It happens exactly when the owner goes out of scope. This is handled by the Drop trait. When a value’s scope ends, Rust automatically calls its drop function. struct CustomSmartPointer { dat...
Read post
Rustlers Atom 2.4: The Borrow Checker Rules
The Borrow Checker is the part of the compiler that enforces memory safety without a garbage collector. These rules are non-negotiable. They prevent data races—the situation where two pointers access the same memory, at least one is writing, and there is no synchronization. The Two Laws of Borrowing RULE 1 - The Validity Rule References must always be valid. You cannot have a reference pointing to memory that has been freed (dangling pointer). // Valid reference let x = 10;...
Read post
Rustlers Atom 2.3: Mutable and immutable borrow
Owning values is great, but moving them around constantly is stupid. Often, you want to let a function use a value without taking responsibility for freeing it. In Rust, this is called borrowing. You borrow a value by creating a reference. References are pointers that are guaranteed to be valid and align with Rust’s safety rules. There are two types. Immutable Reference &T An immutable reference allows you to read data but not change it. You create one by adding & bef...
Read post
Rustlers Atom 2.2: `Copy` and `Clone` traits
A type that implements Copy behaves much like the old-school C integers: when you write let b = a;, the value is copied rather than moved; passing it to a function copies it; returning it from a function copies it as well; and in all these cases, the original value is still valid and can continue to be used. All the primitive scalar types you met in chapter 1 are Copy: this includes integers like i32, u64, and usize, floating-point numbers like f32 and f64, as well as bool and ...
Read post
Rustlers Atom 2.1: Rust ownership explained
Ownership is Rust’s replacement for the garbage collector, manual free, and “hope nothing double-frees” all at once. It’s a compile-time bookkeeping system with one simple law: Every value has exactly one owner. When the owner goes out of scope, the value is dropped. That’s it. Everything else is consequences. Scopes and owners Start with the smallest example. Here x owns the value 42. When the inner block ends, x goes out of scope and its storage is released. fn main() { {...
Read post
Rust stdt now with Date & Time management
I am pleased to announce the release of stdt version 0.0.6. In the Rust ecosystem, date and time handling is often delegated to heavyweight crates like chrono or time. While these are excellent for comprehensive production needs, there is a distinct need for lightweight, zero-dependency implementations for standard formats. Version 0.0.6 introduces stdt::date, a domain-specific module focusing on strict RFC 3339 and ISO 8601 parsing, validation, and formatting. The Architecture The main idea o...
Read post
Rustlers Molecule 1A: ToDo CLI Application
This molecule stitches together only the atoms 1.1–1.10. No structs, no macros beyond formatting, no external crates. You’ll see how far you can get with just: expressions and statements (1.1), scalars (1.2), tuples/arrays/slices (1.3), bindings and mutability (1.4), if / match (1.5), loops (1.6), functions (1.7), &str vs String (1.8), conversions (1.9), and formatting (1.10). We’ll build a single-file program: Stores tasks in todo.txt in the current directory (simple pe...
Read post
Rustlers Atom 1.10: Formatting
Rust’s formatting is compile-time checked. Placeholders must match the values and the traits they implement. This are the available macros: println! prints to stdout with a newline. print! prints without a newline. eprintln! prints to stderr. format! builds a String (no I/O). println!("Hello, {}!", "world"); let s = format!("{} + {} = {}", 2, 3, 2 + 3); Formatting use this Placeholders and specifiers: {} → uses the value’s Display human-readable implementation. {:?} → us...
Read post
Rustlers Atom 1.9: Numbers and conversions
Rust keeps numeric conversions explicit and typed. You choose how to convert so the compiler can enforce safety. as as performs a primitive cast right now, even if information may be lost (e.g., narrowing or sign changes). Use it when you know what you’re doing. fn main() { let a: u16 = 500; let b: u8 = a as u8; // 500 → 244 (wraps modulo 256) let x: f32 = 3.9; let y: i32 = x as i32; // truncates toward zero → 3 println!("{b}, {y}"); } Integers ...
Read post
Random in Rust with stdt
__ .___ __ _______/ |_ __| _// |_ / ___/\ __\/ __ |\ __\ \___ \ | | / /_/ | | | /____ > |__| \____ | |__| \/ stdt on GitHub | stdt on crates.io The stdt Rust library (v0.0.5) now provides minimal, non-cryptographic PRNG utilities for generating integers, floating-point values, and random selections. Seeds are derived from the current time in nanoseconds combined with a hashed thread ID. Inputs are mixed with a SplitMix-inspired multiply-rotate s...
Read post
Rustlers Atom 1.8: Strings
Strings in Rust are collections of UTF-8 bytes, wrapped in safe abstractions. &str &str (read “string slice”) is a view into UTF-8 text. It doesn’t own the data — it borrows it. String literals like "hello" are of type &'static str (a slice baked into the program’s binary). fn main() { let greeting: &str = "Hello, world!"; println!("{}", greeting); } You can think of &str as a window into some existing string data. Because it borrows, it’s ligh...
Read post
Rustlers Atom 1.7: Functions
Functions in Rust are explicit and predictable. You define a function with fn, name it in snake_case` and declare parameters with type annotations: fn main() { greet_to("Gioele"); } fn greet_to(name: &str) { println!("Hello, {name}!"); } Rust requires type annotations for all parameters — they’re not optional. This makes functions self-documenting and ensures compile-time clarity. A function body is a block expression, and, just like before, the last expression w...
Read post
TèchnoSophìa 7.2 Augustine: Linear Time and Progress
_____________________________________________________________________________ ______ __ / / / ) / , ---/-------__----__---/__----__----__----\--------__------__---/__--------__- / /___) / ' / ) / ) / ) \ / ) / ) / ) / / ) _/______(___ _(___ _/___/_/___/_(___/_(____/___(___/___/___/_/___/_/___(___(_ ...
Read post
Rustlers Atom 1.6: Loops: `loop`, `while`, `for`
Rust gives you three looping constructs. There’s no hidden behaviours, no accidental infinite loops, and no implicit coercions. Each kind of loop expresses a specific intent. loop: The Infinite Primitive loop is the most fundamental looping construct. It runs forever unless you explicitly stop it with break. fn main() { let mut counter = 0; let result = loop { counter += 1; if counter == 10 { break counter * 2; // Break with a value ...
Read post
TèchnoSophìa 7.1 Augustine: Useful Arts vs. Voluptuary Arts
_____________________________________________________________________________ ______ __ / / / ) / , ---/-------__----__---/__----__----__----\--------__------__---/__--------__- / /___) / ' / ) / ) / ) \ / ) / ) / ) / / ) _/______(___ _(___ _/___/_/___/_(___/_(____/___(___/___/___/_/___/_/___(___(_ ...
Read post
Rustlers Atom 1.5 - Flow Control
Rust’s control flow is an extension of its expression-oriented design: every conditional and pattern match produces a value. if Unlike in C or Python, if returns always a value. The branches must evaluate to the same type. fn main() { let temperature = 25; let weather = if temperature > 30 { "hot" } else if temperature < 10 { "cold" } else { "mild" }; println!("The weather is {}", weather); } Here, the entire if block y...
Read post
Rustlers Atom 1.4 - Variables, binding, shadowing, mutability
Rust variables are bindings: a name tied to a value. By default, they are immutable. Immutable vs mutable fn main() { let x = 5; // x = 6; ❌ compile error let mut y = 5; y = 6; // ✅ works println!("y = {}", y); } The mut keyword makes intent explicit. No silent mutation is allowed in rust. Shadowing Instead of mutating, you can re-declare the same name. fn main() { let spaces = " "; let spaces = spaces.len(); // new binding, new type print...
Read post
TèchnoSophìa 6.3 The Skeptics: The Suspension of Progres
_____________________________________________________________________________ ______ __ / / / ) / , ---/-------__----__---/__----__----__----\--------__------__---/__--------__- / /___) / ' / ) / ) / ) \ / ) / ) / ) / / ) _/______(___ _(___ _/___/_/___/_(___/_(____/___(___/___/___/_/___/_/___(___(_ ...
Read post
TèchnoSophìa 6.2 The Stoics: Logos and Coherence
_____________________________________________________________________________ ______ __ / / / ) / , ---/-------__----__---/__----__----__----\--------__------__---/__--------__- / /___) / ' / ) / ) / ) \ / ) / ) / ) / / ) _/______(___ _(___ _/___/_/___/_(___/_(____/___(___/___/___/_/___/_/___(___(_ ...
Read post
Rustlers Atom 1.3 - Composite Types: tuple, array, slice
Rust’s composite types let you pack values together and work with them as a unit. They are minimal but powerful, and you’ll use them everywhere. Tuples A tuple can hold multiple values of different types. fn main() { let point: (i32, i32, i32) = (3, 4, 5); // Destructure let (x, y, z) = point; println!("x = {}, y = {}, z = {}", x, y, z); // Access by index println!("First: {}", point.0); println!("Second: {}", point.1); // Function returning a t...
Read post
TèchnoSophìa 6.1 Epicurus: Techniques of Sober Pleasure
_____________________________________________________________________________ ______ __ / / / ) / , ---/-------__----__---/__----__----__----\--------__------__---/__--------__- / /___) / ' / ) / ) / ) \ / ) / ) / ) / / ) _/______(___ _(___ _/___/_/___/_(___/_(____/___(___/___/___/_/___/_/___(___(_ ...
Read post
Rustlers Atom 1.2 - Scalar Types: Integers, bool, char, Floats
Scalar types represent a single value. Rust has four primary scalar types, and they all have a fixed, known size at compile time, which makes them very efficient. Integers Integers are numbers without a fractional component. They come in two main families: Signed (i): can be positive or negative (e.g., i8, i32, i64). Unsigned (u): can only be positive (e.g., u8, u32, u64). The number after the i or u indicates how many bits of space the value takes up. There are also isi...
Read post
TèchnoSophìa 5.4 Eudaimonia and the Limits of Technicization.
_____________________________________________________________________________ ______ __ / / / ) / , ---/-------__----__---/__----__----__----\--------__------__---/__--------__- / /___) / ' / ) / ) / ) \ / ) / ) / ) / / ) _/______(___ _(___ _/___/_/___/_(___/_(____/___(___/___/___/_/___/_/___(___(_ ...
Read post
Rustlers Atom 1.1 - Expressions vs Statements
In Rust, the distinction between expressions and statements is a core concept that shapes the entire language. A statement is an instruction that performs an action but does not return a value. Statements almost always end with a semicolon ;. For example, creating a variable with let is a statement. An expression evaluates to and produces a value. Most of Rust code is made of expressions: a math operation (5 + 6), a function call, or even a code block {}. The crucial differ...
Read post
TèchnoSophìa 5.3 Practical Judgment as Governance.
_____________________________________________________________________________ ______ __ / / / ) / , ---/-------__----__---/__----__----__----\--------__------__---/__--------__- / /___) / ' / ) / ) / ) \ / ) / ) / ) / / ) _/______(___ _(___ _/___/_/___/_(___/_(____/___(___/___/___/_/___/_/___(___(_ ...
Read post
Rust minimalist JSON management with stdt::json
This JSON crate is built as part of a zero-dependency stdt tools library. The purpose is clear: provide just enough JSON handling to be useful, while remaining compact, dependency-free, and easy to read. The architecture reflects the purpose. At its core there is only one data type, Value, an enum that represents the six JSON primitives: null, boolean, number, string, array, and object. Everything flows through this type. Parsing is handled by a small, recursive descent parser, which reads dir...
Read post
TèchnoSophìa 5.2 The Four Causes.
_____________________________________________________________________________ ______ __ / / / ) / , ---/-------__----__---/__----__----__----\--------__------__---/__--------__- / /___) / ' / ) / ) / ) \ / ) / ) / ) / / ) _/______(___ _(___ _/___/_/___/_(___/_(____/___(___/___/___/_/___/_/___(___(_ ...
Read post
Rustlers Atom 0.3 - Cargo
Cargo is Rust’s project+build+package manager in one. You describe your app or library in Cargo.toml, put code under src/, and let Cargo handle compilation, tests, docs, and dependencies reproducibly. Build & Run Make a new binary crate (has a main): cargo new hello cd hello` Make a library instead: cargo new mylib --lib If you’re turning an existing folder into a project, use: shell cargo init Build once to prime the target dir with: shell cargo build This produces a...
Read post
TèchnoSophìa 5.1 Epistème vs Technè vs Phronèsis.
_____________________________________________________________________________ ______ __ / / / ) / , ---/-------__----__---/__----__----__----\--------__------__---/__--------__- / /___) / ' / ) / ) / ) \ / ) / ) / ) / / ) _/______(___ _(___ _/___/_/___/_(___/_(____/___(___/___/___/_/___/_/___(___(_ ...
Read post
Rustlers Atom 0.2 - Install: rustup and toolchains
rustup is the official Rust toolchain manager. Use it because it keeps Rust in your home directory (safe, no system package churn), lets you switch between stable, beta, and nightly per project, and installs extras like rustfmt and clippy cleanly. It also supports a rust-toolchain.toml file so a repo can declare exactly which compiler it needs; when you cd into the project, the right toolchain is activated automatically. In short: predictable installs, painless updates, and rep...
Read post
TèchnoSophìa 4.4 The Cave as proto-VR.
_____________________________________________________________________________ ______ __ / / / ) / , ---/-------__----__---/__----__----__----\--------__------__---/__--------__- / /___) / ' / ) / ) / ) \ / ) / ) / ) / / ) _/______(___ _(___ _/___/_/___/_(___/_(____/___(___/___/___/_/___/_/___(___(_ ...
Read post
Rustlers Atom 0.1 - Set the mindset
Rust’s reputation is paradoxical: many developers consider it hard, yet the language is built from a small set of rules that never change. What feels hard is the shift — a rewiring of habits you’ve collected from GC’ed languages and from C/C++. Once those habits click into place, Rust becomes predictable, even comforting. Rustlers - Atomics Rust exists to make that click happen quickly. Think of it as Molecular Design for a programming language. We’ll start with minimal atoms...
Read post
TèchnoSophìa 4.3 Critique of imitative art.
_____________________________________________________________________________ ______ __ / / / ) / , ---/-------__----__---/__----__----__----\--------__------__---/__--------__- / /___) / ' / ) / ) / ) \ / ) / ) / ) / / ) _/______(___ _(___ _/___/_/___/_(___/_(____/___(___/___/___/_/___/_/___(___(_ ...
Read post
RustLandia - Matrix Rain
This is a dissection of a simple Matrix Rain implementation i write in my Rust exploring journey. All the code is base on a simple data structure like this: const GRID_ROWS: usize = 40; const GRID_COLS: usize = 140; // in main() let mut grid: [[char; GRID_COLS]; GRID_ROWS] = [[' '; GRID_COLS]; GRID_ROWS]; let mut active_cols: [bool; GRID_COLS] = [false; GRID_COLS]; The grid and active_cols are fixed-size arrays, not vectors (Vec). This is a deliberate architectural choice. Because thei...
Read post
TèchnoSophìa 4.2 The Demiurge of the Timaeus.
_____________________________________________________________________________ ______ __ / / / ) / , ---/-------__----__---/__----__----__----\--------__------__---/__--------__- / /___) / ' / ) / ) / ) \ / ) / ) / ) / / ) _/______(___ _(___ _/___/_/___/_(___/_(____/___(___/___/___/_/___/_/___(___(_ ...
Read post
Conway's Game of Life in Rust
Conway's Game of Life stands as a canonical example of a cellular automaton. The state of each cell, either ALIVE or DEAD, evolves synchronously across a grid based on four simple, local rules. Drawing inspiration from a video by Salvatore Sanfilippo, I built a simple implementation of Conway's Game of Life in Rust, featuring an infinite toroidal grid. Toroidal Grid Geometry and Coordinate Mapping A key idea of this implementation is the handling of grid boundaries. Rather than imposin...
Read post
TèchnoSophìa 4.1 Hierarchy of Knowledge.
_____________________________________________________________________________ ______ __ / / / ) / , ---/-------__----__---/__----__----__----\--------__------__---/__--------__- / /___) / ' / ) / ) / ) \ / ) / ) / ) / / ) _/______(___ _(___ _/___/_/___/_(___/_(____/___(___/___/___/_/___/_/___(___(_ ...
Read post
AutoSite: a near-zero-config, Markdown-based static site generator
Static site generators tend to grow heavy fast: complex configuration schemas, sprawling theme layers, and plugin systems that force you to memorize dozens of toggles before you can publish “Hello, world.” AutoSite goes in the opposite direction. It is a minimalist, Markdown-driven generator: a small set of primitives, a single YAML file for configuration, and sane defaults that yield a clean, responsive site out of the box.   Project on GitHub Design goals AutoSite pursues four explicit goal...
Read post
TèchnoSophìa 3.3 The necessity of an ethics of Tecnē.
_____________________________________________________________________________ ______ __ / / / ) / , ---/-------__----__---/__----__----__----\--------__------__---/__--------__- / /___) / ' / ) / ) / ) \ / ) / ) / ) / / ) _/______(___ _(___ _/___/_/___/_(___/_(____/___(___/___/___/_/___/_/___(___(_ ...
Read post
[C#] RandomCustomStrings
The RandomCustomStrings class in the Promezio.RandomCustomStrings namespace provides a simple yet flexible way to generate random strings in C#. This can be highly useful in scenarios like generating random IDs, passwords, test data, and more. The class allows for extensive customization through the StringConfig class, enabling users to specify the length and character types of the generated strings. Project on GitHub NuGet package Features Customizable String Length: Define the length of t...
Read post
TèchnoSophìa 3.2 Maieutics: Technology of Dialogue.
_____________________________________________________________________________ ______ __ / / / ) / , ---/-------__----__---/__----__----__----\--------__------__---/__--------__- / /___) / ' / ) / ) / ) \ / ) / ) / ) / / ) _/______(___ _(___ _/___/_/___/_(___/_(____/___(___/___/___/_/___/_/___(___(_ ...
Read post
[ngnchess] How to validate a FEN string
Forsyth-Edwards Notation (FEN) is a standard system used to represent a chess position in a single line of text. This notation is widely used in chess engines, databases, and software applications to save and share positions. A FEN string fully describes the current state of a game, allowing it to be reconstructed at any time. Structure of the FEN String A FEN string consists of six sections, each separated by a space, detailing different aspects of the chess position. string[] parts = fen.Spl...
Read post
TèchnoSophìa 3.1 Knowing That One Does Not Know.
_____________________________________________________________________________ ______ __ / / / ) / , ---/-------__----__---/__----__----__----\--------__------__---/__--------__- / /___) / ' / ) / ) / ) \ / ) / ) / ) / / ) _/______(___ _(___ _/___/_/___/_(___/_(____/___(___/___/___/_/___/_/___(___(_ ...
Read post
IsSynchronized and SyncRoot: multithreaded collections in C#
Multithreaded programming demands robust synchronization mechanisms for shared resource access. C# offers various tools to tackle this challenge, including the IsSynchronized and SyncRoot properties found in many collection classes. This deep dive examines these properties, their implementation details, and optimal usage patterns in C# concurrent programming. Theoretical Introduction to IsSynchronized and SyncRoot IsSynchronized and SyncRoot are properties inherited from the ICollection interf...
Read post
TèchnoSophìa 2.3 Sophistic Manual of Power.
_____________________________________________________________________________ ______ __ / / / ) / , ---/-------__----__---/__----__----__----\--------__------__---/__--------__- / /___) / ' / ) / ) / ) \ / ) / ) / ) / / ) _/______(___ _(___ _/___/_/___/_(___/_(____/___(___/___/___/_/___/_/___(___(_ ...
Read post
FrozenDictionary and FrozenSet in C#
With the introduction of FrozenDictionary and FrozenSet in .NET 8, developers now have powerful tools to enhance the efficiency of their applications, particularly in scenarios involving immutable collections. This article is an introduction to these data structures, their theoretical background, and practical applications through real-life code examples. FrozenDictionary and FrozeSet theory FrozenDictionary and FrozenSet are immutable, highly optimized versions of Dictionary and HashSet, resp...
Read post
TèchnoSophìa 2.2 Gorgias: The Word-Machine.
_____________________________________________________________________________ ______ __ / / / ) / , ---/-------__----__---/__----__----__----\--------__------__---/__--------__- / /___) / ' / ) / ) / ) \ / ) / ) / ) / / ) _/______(___ _(___ _/___/_/___/_(___/_(____/___(___/___/___/_/___/_/___(___(_ ...
Read post
The fixed statement in C#
In C#, the fixed statement is important when working with pointers in unsafe code. It ensures that the garbage collector does not relocate the variable, allowing for stable pointer operations. The fixed statement is used to pin a variable in memory, preventing the garbage collector from moving it. This is essential when dealing with pointers to managed objects, ensuring that the address remains constant throughout the fixed block. The primary use cases include interfacing with unmanaged code, p...
Read post
TèchnoSophìa 2.1 - Protagoras: The Human Measure.
_____________________________________________________________________________ ______ __ / / / ) / , ---/-------__----__---/__----__----__----\--------__------__---/__--------__- / /___) / ' / ) / ) / ) \ / ) / ) / ) / / ) _/______(___ _(___ _/___/_/___/_(___/_(____/___(___/___/___/_/___/_/___(___(_ ...
Read post
[C#] Recursion with Memoization
Recursion is a fundamental concept in computer science where a function calls itself to solve a problem. While powerful, it can sometimes be inefficient, especially for problems with overlapping subproblems. This is where memoization comes into play. Memoization is a technique used to speed up recursive algorithms by storing the results of expensive function calls and reusing them when the same inputs occur again. This article explores the synergy between recursion and memoization, providing a t...
Read post
TèchnoSophìa 1.8 - Technē and _Phýsis_: The Origins of the Contract
_____________________________________________________________________________ ______ __ / / / ) / , ---/-------__----__---/__----__----__----\--------__------__---/__--------__- / /___) / ' / ) / ) / ) \ / ) / ) / ) / / ) _/______(___ _(___ _/___/_/___/_(___/_(____/___(___/___/___/_/___/_/___(___(_ ...
Read post
[C#] How to use Late Binding
Late Binding in C# is a mechanism that allows resolving an object's members (methods, properties, events) at runtime instead of during compilation. It means that the binding between the object and its members occurs later than the normal Early Binding, which happens during the compilation phase. Late Binding offers more flexibility compared to Early Binding, as it allows working with objects whose type is unknown at compile-time. However, this advantage comes with a performance cost, as Late Bi...
Read post
TèchnoSophìa 1.7 - Democritus and the Fabricable Combinatory Worlds
_____________________________________________________________________________ ______ __ / / / ) / , ---/-------__----__---/__----__----__----\--------__------__---/__--------__- / /___) / ' / ) / ) / ) \ / ) / ) / ) / / ) _/______(___ _(___ _/___/_/___/_(___/_(____/___(___/___/___/_/___/_/___(___(_ ...
Read post
C# - How to create appealing CLI applications with Spectre.Console
Introduction to Spectre Console Spectre.Console is a super cool library for C# developers that love command line interfaces. Developed by the Spectresystems, this library empowers developers to create rich, interactive, and visually stunning console applications with ease. Traditionally, building console applications in C# has been a tedious task, often requiring developers to write extensive code for handling input, rendering output, and managing the overall user experience. However, Spectre ...
Read post
TèchnoSophìa 1.6 - The Pythagoreans: The Architecture of Number
_____________________________________________________________________________ ______ __ / / / ) / , ---/-------__----__---/__----__----__----\--------__------__---/__--------__- / /___) / ' / ) / ) / ) \ / ) / ) / ) / / ) _/______(___ _(___ _/___/_/___/_(___/_(____/___(___/___/___/_/___/_/___(___(_ ...
Read post
[C#] How to use stackalloc (wisely)
In C# programming, memory management remains a crucial aspect that developers need to understand and handle effectively to create efficient applications. Although the .NET runtime provides automatic memory management through garbage collection, there are scenarios where manual memory allocation can be beneficial for performance optimization. One such technique is stackalloc, which allows you to allocate memory on the stack rather than the managed heap. stackalloc is an unsafe code feature in C#...
Read post
TèchnoSophìa 1.5 - Parmenides: Being as an Unmoving Constraint
_____________________________________________________________________________ ______ __ / / / ) / , ---/-------__----__---/__----__----__----\--------__------__---/__--------__- / /___) / ' / ) / ) / ) \ / ) / ) / ) / / ) _/______(___ _(___ _/___/_/___/_(___/_(____/___(___/___/___/_/___/_/___(___(_ ...
Read post
[C#] Pattern Matching explained with code
Pattern matching is a powerful feature in C# that allows you to match an expression against a pattern and conditionally execute code based on the match. It provides a concise and expressive way to handle various scenarios, such as type checking, constant comparison, and data deconstruction. C# supports several types of patterns, each serving a specific purpose. 1\. Declaration Pattern The declaration pattern checks the runtime type of an expression and, if a match succeeds, assigns the express...
Read post
TèchnoSophìa 1.4 - Heraclitus: Becoming as Infrastructure
_____________________________________________________________________________ ______ __ / / / ) / , ---/-------__----__---/__----__----__----\--------__------__---/__--------__- / /___) / ' / ) / ) / ) \ / ) / ) / ) / / ) _/______(___ _(___ _/___/_/___/_(___/_(____/___(___/___/___/_/___/_/___(___(_ ...
Read post
[C#] The right way to use iDisposable interface
The IDisposable interface is one of the fundamental components of the .NET framework and represents an idiomatic pattern for managing unmanaged resources in C#. When an object implements this interface, it signals to the runtime that it owns unmanaged resources, such as file handles, network sockets, or other unmanaged objects, that need to be explicitly released. The Dispose method defined in the IDisposable interface serves as a mechanism for releasing these unmanaged resources. When called, ...
Read post
TèchnoSophìa 1.3 - Anaximenes: The Physics of Processes as Proto-Engineering
_____________________________________________________________________________ ______ __ / / / ) / , ---/-------__----__---/__----__----__----\--------__------__---/__--------__- / /___) / ' / ) / ) / ) \ / ) / ) / ) / / ) _/______(___ _(___ _/___/_/___/_(___/_(____/___(___/___/___/_/___/_/___(___(_ ...
Read post
TèchnoSophìa 1.2 - Anaximander: from measuring to modeling
_____________________________________________________________________________ ______ __ / / / ) / , ---/-------__----__---/__----__----__----\--------__------__---/__--------__- / /___) / ' / ) / ) / ) \ / ) / ) / ) / / ) _/______(___ _(___ _/___/_/___/_(___/_(____/___(___/___/___/_/___/_/___(___(_ ...
Read post
[C#] How to log to file with serilog
A good logging system is one of the first things to set up when starting a new project. In C#, managing logging with the right tools and the right approach is quite easy. Serilog is one of the right tools available; it's a popular logging library that provides a straightforward and powerful way to log your application's events to various destinations, including files, the console, and more. Let's take a look at some example code that explains how to create (and how to use) a logger to be used th...
Read post
Bloom Filters in C#: a visual introduction
A Bloom filter is a data structure used to test if an element is a member of a set or not. It was invented by Burton Howard Bloom in 1970. The Bloom filter uses multiple hash functions to map the input data to a bit array. Let’s see together how it works. We’ll start with a bit of theory that helps to understand how it works, and then we’ll look at a direct example in C#. Bloom Filters: The Theory A Bloom filter is based on the idea of hashing, which is a process of mapping data of arbitrary s...
Read post
TèchnoSophìa 1.1 - Thales: From Measurement to Control
_____________________________________________________________________________ ______ __ / / / ) / , ---/-------__----__---/__----__----__----\--------__------__---/__--------__- / /___) / ' / ) / ) / ) \ / ) / ) / ) / / ) _/______(___ _(___ _/___/_/___/_(___/_(____/___(___/___/___/_/___/_/___(___(_ ...
Read post
[C#] Immutable vs ReadOnly members
Secure and predictable programming often requires that some data remain constant during program execution. In C#, this can be achieved through the use of Immutable and ReadOnly variables. Although both prevent unwanted modifications, their application and implications are different. Immutable An Immutable object is an object whose state cannot be modified after its creation. In C#, this is commonly achieved through the use of classes whose internal state is defined at the time of creation and ...
Read post
[C#] How to download resources form .csproj.
MSBuild is the build platform for Microsoft and Visual Studio, and it's very powerful. Among the various functions of the .csproj file, there is one that allows you to embed resources from the web into a project. Let's take a look at how to do this, and then discuss the possible uses of this feature and its security implications. The csproj file is the core of a C# project containing configurations, dependencies, and everything else related to the code build process. By using the exec task, you...
Read post
[C#] Understanding Boxing and Unboxing
Boxing in C# is the process where we take a value type (like an int or bool) and encapsulate it within a reference type (like Object or Interface). Unboxing is the reverse process: converting the value contained within the reference type back to its original type. Examples of Boxing and Unboxing Here's a boxing example: // Boxing an integer into an object int number = 123; object box = number; // Boxing And here's unboxing: // Unboxing the integer from its box object box = 123; int number = (...
Read post
AI: pilot or co-pilot?
The application development of the new generation of artificial intelligence is unfolding in a liminal space: the interstice between presence and absence. In this hitherto little-considered space, one of the keys to human evolution is taking shape, and within this development, we must elucidate the nuances of a new ontological problem: Should AI be regarded as a co-pilot, a synergistic extension of human will, or rather as an autopilot, an autonomous entity that transcends the limits of our mand...
Read post
Digital Atox
"Dumb" phones, which are the opposite of smartphones, seem to be in vogue. These simple devices allow only for phone calls and sending a few text messages—no browsers, no games, no multimedia. It’s essentially a return to the past. What purpose do they serve? Digital Detox—disconnecting from the digital world to reconnect with the real one. In other words, they are utterly pointless. Digital detox is a temporary and ineffective solution for a problem that demands a radical and permanent change....
Read post
[C#] Dynamic Assembly Loading
Thanks to Reflection, in C# it's possible to dynamically load an assembly and invoke its methods. There are two ways to do this: simple loading and contextualized loading (only available in .NET Core). Let's take a closer look. First, we create a new Library Project that contains only a class with a static method: namespace HelloAssembly; public class HelloWorld { public static void SayHello() { Console.WriteLine("Hello world, it'm a dinamically loaded assembly!"); } } After ...
Read post
Overly Convincing Synthetic Reality
Virtualization technologies create immersive and all-encompassing worlds that may either be related to the physical reality or entirely replace it. While these technologies have yet to fully simulate the wide range of physical sensory experiences, we are nonetheless faced with a new dimension of reality: the synthetic. This dimension, algorithmically generated or created by AI, possesses the power to blur, overlap, and in some cases, supplant tangible reality. But what are the risks of a reality...
Read post
[C#] Reflection made simple.
Reflection in C# is a powerful mechanism that allows programs to introspect and manipulate themselves.This feature allows inspecting and modifying a program's types at runtime. It enables obtaining information about types, members, methods, and properties of an object, and dynamically invoking methods or accessing properties. A definition for Reflection Reflection is the process by which a computer program can observe and modify its own structure and behavior. In C#, this is achieved using the...
Read post
Mediated Existence
The swift operational expansion of AI outpaces our current capacity for regulation, posing a significant potential threat. Addressing this issue necessitates a deeper comprehension of how AI transitions from a supportive tool to a potentially invasive control mechanism. AI's ascension and its deployment in critical domains mark a pivotal shift in our techno-anthropological evolution. Two aspects distinguish this epochal change: The exponential acceleration of AI's capabilities. Its prowess ...
Read post
[C#] out, in and ref: when and how to use them
C# offers three options for parameter passing in methods:'out', 'ref', and 'in'. These modifiers dictate how values are passed and handled within methods, impacting both the performance and readability of the code. 'ref' - Passing by Reference The 'ref' modifier is used to pass an argument to a method by reference. This means any changes made to the parameter within the method are reflected in the original argument passed. public void ModifyWithRef(ref int number) { number += 10; } In...
Read post
Ethical Assessment
Speed is the main differentiating factor between technological advancement over the last 1000 years and the last 100. Automation technology is about to reach the right-hand limit of the exponential development curve thanks to artificial intelligence powered by large neural networks. Once this limit is reached, reality risks diluting, to the point of dissolving, into a broth of imitative confusion, devoid of thought, creativity and centers of interest. Synthetic content is an extremely powerful ...
Read post
[C#] Struct vs Record
In C#, there are two similar data types that often cause confusion: records and structs. Both have their own advantages and disadvantages. Understanding exactly how they function is crucial for determining when and why to use one over the other. This article aims to clarify the differences between records and structs, providing practical guidelines to help developers make the right choice. What are records in C#?? Introduced in C# 9.0, records are a reference type primarily intended to be immu...
Read post
Induced anthropodecentrism
We consider ourselves the measure of all things. This sentiment echoes directly from Protagoras 2500 years ago, as well as from unlikely television personalities during bizarre, decontextualized, and alienating sketches. The dogma of anthropocentrism and its dissolution have always been at the heart of fascinating cultural debates, proving to be anything but unshakeable. Artificial Intelligence has made the discussion on anthropocentrism more significant and more "contemporary," widening the br...
Read post
Plastic Interactions
Observing online conversation with the analytical support of AI can serve as an excellent sociological laboratory. The Key Performance Indicators (KPIs) we gather with Promezio Datarooms correlate sentiment, emotions, demographic data, and multimedia content, providing a snapshot of the contemporary modes of interacting with others. How We Interact Today Interactions, especially digital ones, are characterized by immediacy and brevity that often condense and sometimes distort our way of relati...
Read post
[C#] Value Type vs Reference Type.
In C# programming one of the most important distinctions every developer needs to grasp, is the one between ValueType and ReferenceType. This distinction is fundamental to how the language handles memory and can significantly impact the performance and behavior of your code. In this article, we'll dive into the key features of ValueType and ReferenceType, exploring how and why they differ. What is a ValueType? In C#, ValueTypes are data types that directly contain their values in memory. These...
Read post
[C#] Struct VS Object.
Definitions and Characteristics Struct Semantics: A struct in C# is a value type. This means when it is assigned to a new variable or passed to a method, a copy of the original value is made. Memory Usage: struct is generally more memory-efficient for small data types. They are allocated on the stack, which is quicker in allocation and deallocation. Limitations: They do not support inheritance, except for interface implementation, and cannot have a parameterless constructor. Object Semant...
Read post
Implementing LinkedList and DoubleLinkedList in C#.
Linked lists are one of the fundamental tools in computer data structures. These data structures play a crucial role in a wide range of applications, from database implementation to games, from web applications to image processing. In this article, we will explore linked lists and their variations, focusing in particular on double linked lists and the advantages they offer over traditional linked lists. What is a LinkedList A linked list is a collection of nodes, each of which contains a piece...
Read post
[C#] What is the Difference Between IComparable and IComparer Interfaces?
IComparable and IComparer sound like distant cousins in the Interface family, but they have their unique charms. Let’s unravel this mystery. The IComparable Interface: Making Objects Self-Aware Picture IComparable as a confident object that knows its worth. This interface is all about self-comparison. It's like an object looking in the mirror and saying, "Yeah, I know where I stand." Implementing IComparable means your object can compare itself to another object of the same type. It's pretty s...
Read post
Digital Autonomy and AI DIS-Education.
AI has transformed our approach to knowledge and learning, opening new educational frontiers by offering new tools for understanding, learning, and acquiring new skills. However, a significant ethical issue arises when such technologies are oriented towards monetizing young users. Leading the charge in this direction is Meta, which has already announced the launch of "Gen AI Personas," generative chatbots targeted at younger audiences. Autonomy: From Traditions to Digital Vulnerability To unde...
Read post
[C#] LIFO & FIFO: implementing stack and queue in C#.
In the world of C# programming, understanding data structures is crucial for building efficient and scalable applications. In this post, we'll dive into the fundamental concepts of data structures by focusing on two essential ones: the stack and the queue. We'll explore what these data structures are, how they work, and most importantly, how to implement them in C#. Whether you're a seasoned developer looking to refresh your knowledge or a newcomer eager to grasp these essential concepts, this a...
Read post
AI reliability and evolution of thinking.
I ask an AI a not-too-complicated question. Like Socrates, ChatGPT-4 starts the conversation by claiming not to know. But is this a warning to users or a subtle indication that the future of philosophy will be guided by AI? Whether generative AIs "know" or not depends on how we approach the discussion. The technology behind LLMs have a statistics base, the output words are generated following ptobabilistic patterns and structures built during the neural network's training phase. Therefore, the...
Read post
How to create a python package with GitHub Action
I recently published pymermaiddiagram, a python package that allows you to create mermaid.js diagrams from python, using a webservice. For publishing, I chose Github Actions, to automate releases when I push new versions. The goal of this guide is to show, in the most direct way possible, how to create a package and how to publish it on pypi with GitHub Actions. I will avoid accessory considerations to focus on the essentials, because when I look for a guide of this type I like to read a few pr...
Read post
Being and being human. Solving the CAPTCHA.
Is it more human to correctly identify traffic lights in a series of photos, or to grow frustratedwhen we fail? A CAPTCHA is a test designed to check whether the user accessing a website or filling out an online form is a human being or a bot, an automaton, a machine. That is done by presenting a test that only (and here the doubts and uncertainties begin) a human being can solve, such as precisely selecting images with a traffic light in it or performing, according to instructions, some mathem...
Read post
TXTCalendar, a plain Text Calendar Generator in Python.
If you love the command line and TXT files like me, you’ve probably found yourself wanting to manage your agenda with these tools. Precisely for this purpose I wrote this simple python tool to be used via CLI to generate weekly, monthly and yearly calendars in two different formats. No dependencies, external packages or virtual environments are required. You can find the code on my GitHub. How To Use TXT Calendar To launch TXTCalendar: python3 TXTCalendar.py ################### TXTCalenda...
Read post
AI has no traditions.
AI's lack of traditions and its impact on ethics, progress, and the evolving nature of human knowledge. Conservatives and progressives, democrats and republicans, reactionaries and innovators. Existence is a conflict: sociopolitical history is a succession of struggles between traditions that are hard to abandon and ground-breaking revolution. Internet multiplied the speed at which this struggle is fought, and AI seems to be pushing this speed to an even more extreme upper limit. You can’t sto...
Read post