RSSAmplifier

Blog

Davide Lettieri Blog

Davide Lettieri Blog

davidelettieri.itRSS feed ↗20 posts

Latest posts

Lox as a Racket language module

For a long time, I wanted to implement a Racket language module with a non-lispy surface syntax. Lox, from Crafting Interpreters, was an obvious candidate: I didn't want to invent a new syntax nor new semantics and I already ported the project to C#. In this case, my main objective was to leverage Racket language-building facilities while learning Racket, Scheme, and macros.

Extensible Visitor Pattern in C#

Recently, I stumbled upon this paper Synthesizing Object-Oriented and Functional Design to Promote Re-Use. The paper wants to provide a solution to the expression problem. The authors suggest an improved version of the visitor pattern that they call "extensible visitor pattern" which is essentially a combination of the visitor pattern with the factory method pattern.

Sutton & Barto Gridworld example in C#

Lately, I've been exploring various examples from Sutton and Barto's "Reinforcement Learning

Webhooks packages to simplify payload signing

A few weeks back I became aware of an attempt to create a technology agnostic standard to send and receive webhooks securely. The proposal is here.

Announcing the new comment system

After thinking about it for some time I decided to add a comment system to the blog. What I hope is that I will get valuable feedback from readers, which will help me improve the content, my understanding of the topics I write about, and the overall quality of the blog.

Ray tracing in one weekend in go

I had the Ray Tracing in One Weekend book in my todo list for a long time and I had finally the time to go through it.

Multi armed bandit exercise 2.5 with C#

Recently I tried to code the 10 armed testbed example from chapter 2 of Sutton and Barto Reinforcement Learning: an introduction book.

Ten armed testbed for the Bandit problem with C#

I'm continuing my attempt to reproduce examples from Reinforcement Learning: An Introduction book using C#.

CSV parsing with typescript

A few years ago I needed to troubleshoot some imports based on csv files and I had one big issue, depending on the language the user was using on Windows, Excel would export csv files with different separators. Being located in Italy, this means that the separator was ;. The same was true when trying to read csv with Excel, the separator is chosed based on the language of the OS.

Asynchronous request reply pattern without polling

The asynchronous request reply pattern is useful in cases where an application has a client application running in a browser where the user starts an operation and is waiting for an immediate feedback and possibly a success notification. An issue arises only if the requested operation is long running, even a few seconds is unacceptable to return a feedback to a waiting user. Microsoft has a nice…

Tic-tac-toe reinforcement learning with C#

A couple of weeks ago I wanted to take a look at reinforcement learning and possibly work on a very simple sample in C#. In search for a book to learn some basics I found Reinforcement Learning: An Introduction suggested in multiple places. The book is available for free as a PDF on the linked website, so I thought it would be a good starting point.

Kaleidoscope tutorial with C# using LLVMSharp and llvm 18

Since writing this, LLVMSharp had a new stable v20 release. The code in the repo is updated to this package.

Trying to implement Lox as Racket language module

Given my previous attempt of having a basic scaffolding for creating a new racket language, I thought it was worth a shot at implementing Lox from the Crafting interpreters book as a Racket language module.

Fedora, switch audio channels with pipewire and wireplumber 0.5

This is an update on this post, on wireplumber v0.5 lua configuration files are not supported anymore. To switch channels on v0.5 you have to create the following file

Use cilium service mesh on AKS

On 2025-08-02 I updated the repo corresponding to this post to use updated versions of Kubernetes, Cilium and Gateway API. The post is not updated accordingly. I did follow again the procedure explained here to confirm that everything is still working as expected. Most notable change is that we don't need experimental channel of Gateway API except for one resource, as described in Cilium v1.17.0…

Fedora, switch audio channels with pipewire

The lua configuration files are valid only for wireplumber v\<0.5. Please check here for the configuration required on v=0.5. This post remains valid for what concerns retrieving the node name required in the config file.

TreeSitter C# bindings - new languages

I updated my TreeSitter.Bindings packages to support additional languages. I wanted to check how solid the bindings were and if I could implement a more complex sample with the respect to the json one I started with.

Flux and SOPS on AKS with workload identity

The post and the repository has been updated on 07-05-2025 to use latest versions of sops, kubectl, azure apis. The devcontainer is modified to be able to use it with podman.

Implementing APIs with the visitor pattern

I want to leverage my visitor pattern source generator to implement a simple minimal api.

TreeSitter C# bindings

In a previous experiment I made I used the LLVMSharp library and I was quite curious on how the bindings are made. In the readme is it stated they are generated using che ClangSharp library, this one auto-generate hitself from the headers of Clang C header.