Is this you? As a journalist, you can create a free Muck Rack account to customize your profile, list your contact preferences, and upload a portfolio of your best work.
Claim your profile
Articles by Davide Santangelo
Running LLMs Locally in 2026: The Complete Guide to Benefits, Trade-offs, and Getting Started
A few years ago, "running an LLM on your own machine" mostly meant a slow, low-quality toy. That's no longer true. In 2026, open-weight models routinely match or beat mid-tier cloud APIs on coding and reasoning benchmarks, consumer GPUs have enough VRAM to host 70B-parameter models, and tools like Ollama make the whole process feel closer to docker run than to a research project.
Why Ruby Shines in the Age of AI-Powered Development: A Token Efficiency Story
The rise of Large Language Models in software development has introduced a fascinating new constraint that few developers anticipated: token efficiency. While modern models like GPT-4 and Claude boast impressive context windows of 128k tokens or more, real-world coding tasks rapidly consume these tokens with code, comments, test cases, documentation, and conversation history.
Ruby 4.0: The Structural Maturation of a Thirty-Year-Old Language
1. Introduction: The Significance of the Thirtieth Anniversary The release of Ruby 4.0 on December 25, 2025, represents a watershed moment in the history of dynamic programming languages.
GitHug: Finding Your Code Soulmate in the Octoverse
Let's face it: GitHub is a social network where we rarely get social. We follow the rockstars—the creators of Next.js, the core maintainers of Linux, the people with 50k stars. But what about the developer three blocks away who is also struggling with the same obscure Rust borrow checker error? Or the person in your city building a project just like yours? That's why I built GitHug. It’s not another "LinkedIn for Developers." It’s a tool to cut through the noise and find people, not just profiles.
Numla: The Notepad That Thinks in Numbers
I'm excited to share Numla, a new open-source project I've been working on. It's a minimal, privacy-focused calculator notepad that lets you solve problems the way you think about them—using natural language. Why Numla? Traditional calculators are great for quick arithmetic, but they lack context. Spreadsheets are powerful but can be overkill for everyday tasks. I wanted something in between: a scratchpad where I could type out my thoughts and have the math happen automatically.
Stop Wasting LLM Tokens: Introducing CTON (Compact Token-Oriented Notation)
If you are building applications with Large Language Models (LLMs), you are likely familiar with the "Token Tax." Every character you send to an API like OpenAI or Anthropic costs money and eats into your context window. We’ve spent decades treating JSON as the gold standard for data serialization, and for good reason—it's readable and ubiquitous. But JSON is chatty.
Building a Fast, Lightweight Web Server in Pure Ruby: A Complete Guide
Building your own web server might seem daunting, but Ruby's built-in libraries make it surprisingly straightforward. In this comprehensive guide, we'll create a fast, lightweight, and performant web server using nothing but pure Rubyâno external gems or dependencies required. Why Build Your Own Web Server? Understanding how web servers work under the hood is crucial for any developer.
Exploring Ruby's Networking Capabilities: From Basics to Advanced Implementations
Ruby, known for its elegant syntax and developer-friendly ecosystem, offers robust tools for networking tasks. Whether you're building web clients, servers, or handling low-level socket communications, Ruby provides built-in modules and libraries that make networking straightforward and powerful. This comprehensive guide explores Ruby's networking capabilities, from basic socket operations to HTTP requests, with practical examples to get you started.
Simulating C-Style Pointers in Ruby: A Complete Guide
Introduction When transitioning from low-level languages like C to high-level languages like Ruby, one concept that developers often miss is direct pointer manipulation. While Ruby's garbage-collected, object-oriented nature abstracts away memory management, understanding pointers and their simulation can deepen your appreciation for both languages and open up interesting programming techniques.
Why Software Developers Might Be the Last Humans Standing
Everyone's freaking out about AI taking jobs. Truckers are doomed. Radiologists are toast. Accountants better start learning to code, right? Wrong. Here's a hot take that'll probably piss off the AI evangelists: software developers could end up being the last profession standing, not the first casualty. I know, I know. Sounds like developer arrogance. But hear me out.
Advanced Ruby Regular Expressions: Mastering Pattern Matching and Text Processing
Introduction Regular expressions in Ruby represent one of the most powerful text processing capabilities available to developers. While many tutorials cover basic pattern matching, this comprehensive guide delves into advanced techniques, performance optimization strategies, and sophisticated use cases that push the boundaries of what's possible with Ruby's regex engine.
Unveiling the Magic of Object-Oriented Programming with Ruby
Welcome, aspiring code wizards and seasoned developers alike! Today, we embark on an exciting journey into the heart of Ruby, a language renowned for its elegance, developer-friendliness, and its pure embrace of Object-Oriented Programming (OOP). If you've ever wondered how to build robust, maintainable, and intuitive software, OOP with Ruby is a fantastic place to start or deepen your understanding. What's OOP, Anyway? And Why Ruby?
VSUM: Blazing-Fast Array Summation in C
VSUM is an open-source C library engineered for high-performance summation of numerical arrays. Designed for applications involving large datasets, scientific computing, and performance-critical systems, VSUM leverages multithreading, SIMD vectorization (AVX/AVX2/SSE2), and cache-conscious algorithms to achieve significant speedups over naive implementations.
Chain of LLMs: A Collaborative Approach to AI Problem Solving
Introduction In the rapidly evolving field of artificial intelligence, researchers are constantly developing new techniques to enhance the capabilities of Large Language Models (LLMs). Recently, I had an innovative idea called "Chain of LLM" (CoLLM), which came to me ("mi è venuta questa idea") while exploring extensions of the well-established "Chain of Thought" (CoT) methodology.
Train Your Own LLM: A Deep Dive with Ruby
Author: Davide Santangelo www.davidesantangelo.com The landscape of Artificial Intelligence (AI) is increasingly dominated by Large Language Models (LLMs), powerful systems capable of understanding and generating human-like text. While Python has traditionally been the dominant language in the Machine Learning (ML) sphere [1], the versatility and developer-centric nature of Ruby, particularly within the Ruby on Rails framework [3], raise intriguing possibilities.
GitHub Follower Analysis: Discovering Your One-Way Connections
Have you ever wondered which GitHub developers you're following don't reciprocate the connection? Unlike social media platforms that clearly show mutual connections, GitHub doesn't provide an easy way to see who follows you back. This article explains a fun Ruby script that solves this problem by revealing your one-sided GitHub relationships. The Social Imbalance on GitHub GitHub, while primarily a code-hosting platform, also functions as a social network for developers.
Understanding Model-Context-Protocol (MCP) in Ruby
What is the Model-Context-Protocol (MCP) Pattern? The Model-Context-Protocol (MCP) pattern is an architectural design pattern that provides a structured approach to organizing code, particularly in applications with complex business logic. Unlike the more common MVC (Model-View-Controller) pattern which focuses on UI separation, MCP is concerned with organizing the domain logic of your application. Model: Represents the data structures and basic operations.
Building FastRace: A High-Performance Traceroute Implementation in Pure C
As a network engineer and C programmer, I've always been fascinated by the tools we use daily for network diagnostics. Traceroute is one of those essential utilities that helps us understand network paths, identify bottlenecks, and diagnose routing issues. However, I was often frustrated by its slow execution and limited visualization capabilities.
I’m thrilled to share my latest creation with you: gitingest, a Ruby gem I’ve built to make your Git experience smarter and smoother. You can find it on GitHub at github.com/davidesantangelo/gitingest. As a developer who’s spent countless hours wrangling repositories, I designed this tool to save time, simplify tasks, and bring a bit of Ruby magic to the Git world. I took inspiration from the awesome work done in cyclotruc/gitingest, and I’ve put my own spin on it to create something unique.
Building a Homegrown LLM with Python: Training on Hacker News Data
Introduction Large Language Models (LLMs) have transformed AI applications, from conversational agents to intelligent code assistants. While OpenAI’s GPT models are widely used, many developers want to understand how these models work and even train their own versions from scratch. In this in-depth guide, we will explore how to build a lightweight LLM using Python, train it on Hacker News data, optimize its performance, and deploy it for real-world usage.
Mastering IP Addresses in Ruby with the IPAddress Gem
Introduction In the world of networking and system administration, handling IP addresses is a fundamental task. Whether you're designing networks, managing servers, or developing applications that interact with network resources, having a robust and easy-to-use tool for IP address manipulation is crucial. Enter the IPAddress gem for Ruby—a powerful library designed to make working with both IPv4 and IPv6 addresses simple, efficient, and enjoyable.
Building a Tiny Language Model (LLM) in Ruby: A Step-by-Step Guide - V3 "Integrating Reasoning into the Tiny LLM"
Recent advancements in LLMs have shown that explicit "chain-of-thought" reasoning (i.e. generating intermediate steps before the final answer) can help models solve complex tasks by breaking them into smaller steps. In our context, we’ll simulate this process using our Markov Chain model by adding a new method that: Generates a chain-of-thought: A short sequence of intermediate tokens (or "thoughts") that reflect the model’s internal "reasoning" about the text.
A Novel Approach for Text Encryption Using Tokenizers in Ruby
# frozen_string_literal: true require 'tokenizers' require 'openssl' require 'base64' require 'securerandom' require 'json' # SecureTextCipher implements an enhanced reversible text encryption # algorithm based on tokenization and secure token mapping. class SecureTextCipher AES_KEY_SIZE = 32 # 256-bit key AES_MODE = 'AES-256-CBC' # Initializes the cipher with a tokenizer and a secret key.
10 Basic Ruby/ RoR Prompts to Test in Your Favorite LLM
In this article, we will delve into 10 highly detailed coding prompts focused on Ruby and Ruby on Rails. Each prompt is designed to test various aspects of Ruby programming—from algorithms and data structures to web development with Rails. Below, we explain the purpose of each prompt, the key requirements, and the skills that developers will practice while solving them. 1. Ruby Recursive Quicksort Implementation Prompt: "Implement a recursive quicksort algorithm in Ruby.
How to Build a Tiny Language Model (TLM) in Ruby: A Step-by-Step Guide
In this article, we will walk through how to create a very simple language model using Ruby. While true Large Language Models (LLMs) require enormous amounts of data and computational resources, we can create a toy model that demonstrates many of the core concepts behind language modeling. In our example, we will build a basic Markov Chain model that “learns” from input text and then generates new text based on the patterns it observed.
Building a Tiny Language Model (LLM) in Ruby: A Step-by-Step Guide
In this article, we will walk through how to create a very simple language model using Ruby. While true Large Language Models (LLMs) require enormous amounts of data and computational resources, we can create a toy model that demonstrates many of the core concepts behind language modeling. In our example, we will build a basic Markov Chain model that “learns” from input text and then generates new text based on the patterns it observed.
Streaming large CSV files directly from your Rails application is an efficient way to handle data exports, especially when dealing with large datasets. By streaming the CSV, you avoid loading the entire dataset into memory, which can significantly improve performance. In this article, we'll walk through how to implement streaming CSV downloads in a Rails application using a generic Post model as an example. Model Let’s start with the Post model.
Prime Number Generation Algorithm in Ruby
Combining Historical Mathematics with Modern Optimizations # ===================================================================== # Optimized Hybrid Prime Number Algorithm # Author: Davide Santangelo # Combines: # - Trial Division for small primes # - Miller-Rabin Deterministic Test for numbers < 2^64 # - Wheel Factorization (mod 210) for candidate generation # ===================================================================== class PrimeFinder #...
Building Your Own Language Model in Ruby: A Step-by-Step Guide
Introduction Large Language Models (LLMs) have revolutionized the field of natural language processing (NLP), enabling machines to understand, generate, and even engage in meaningful dialogue with humans. They are the backbone of applications such as chatbots, machine translation, content generation, and more.
Building a Smart Log Pipeline: Syslog Parsing, Data Enrichment, and Analytics with Logstash, Elasticsearch, and Ruby
Introduction In modern IT environments, effectively managing and analyzing log data is essential for monitoring user access, ensuring security, and maintaining system integrity. Logs serve as the backbone of any monitoring system, providing a wealth of information about system behavior, user actions, and potential security threats. However, the sheer volume of logs and the diversity of log formats can make it challenging to extract meaningful insights.
Building an Efficient Text Compression Algorithm Inspired by Silicon Valley’s Pied Piper
If you’re familiar with the hit show Silicon Valley, you’ve likely heard of Pied Piper, the fictional company that develops a revolutionary compression algorithm capable of reducing file sizes dramatically while maintaining quality. The idea of creating an ultra-efficient compression algorithm that pushes the limits of current technology is not just a captivating concept in the show—it also reflects the real-world desire for optimizing data compression.
Efficient Chunked File Downloads in Rails: Streaming CSV Exports
In Rails applications, exporting large datasets into CSV files can be challenging, especially when the file size exceeds what memory can comfortably handle. In these cases, we can leverage Rails streaming to create and send the file in chunks, improving both performance and memory usage. This article walks through an implementation of chunked CSV file downloads using Rails streaming to handle large datasets efficiently. Why Streaming?
A Deep Dive into the Statesman Gem for Ruby: Building Flexible State Machines
State management is an integral part of many applications, especially when dealing with workflows, order statuses, or user lifecycle management. A state machine helps manage the transitions between various states in a well-defined, predictable manner. While there are many gems available for implementing state machines in Ruby, one of the most powerful and flexible is the statesman gem.
Mastering Kredis in Ruby: Your Essential Guide
Introduction In the ever-evolving world of web development, caching mechanisms have become an indispensable tool for enhancing application performance and scalability. Ruby, a dynamic and expressive language, has gained immense popularity among developers worldwide, thanks to its simplicity and elegance. However, when it comes to caching, Ruby's built-in caching solutions often fall short of meeting the demands of high-traffic applications.
Show More
loading
Actions
Is this you?
As a journalist, you can create a free Muck Rack account to customize your profile, list your contact preferences, and upload a portfolio of your best work.Get in touch with Davide
Contact Davide, search articles and posts on X, monitor coverage, and track replies from one place.
Learn more about Muck Rack