Welcome to my site. I am a former CS university lecturer, now looking forward to becoming a developer.
Recent Posts
Providing the USD/VES Rate, using C# Functional Extensions
As part of dobs, a C# CLI USD-VES converter, I wrote a library that provides the official exchange rate from the US dollar to Venezuelan Bolivars (VES). I developed the dobs app mainly for personal use and to practice building .NET applications in C#. I also took the opportunity to explore the CSharpFunctionalExtensions library. In this post, I describe this Rate Provider library, which can serve as an example use of CSharp Functional Extensions.
read more
Calculating the nth prime in Rust, with memoization and thread-safety
Going through the Rust track at exercism.org, I found the Nth Prime exercise. The exercise asks to determine the nth prime for a given integer n, considering 2 as the 0th prime. To make it more interesting, I decided to memoize the calculated primes in a table and to make the calculation thread-safe so that several primes can be computed concurrently. The implementation described here is available as a GitHub repo.
read more
Parsing Diff Output in Haskell
Parser combinators and the libraries available to build parsers using them are among the best features of Haskell. I describe here a parser for diff output written in Haskell using attoparsec, a monadic parser combinator library designed to be fast and efficient. The parser accepts git output in the normal or unified format, or the output produced by “git diff” when comparing two files. I assume the reader has some familiarity with monadic parsing in Haskell, particularly with the Attoparsec library, as well as with the diff formats parsed.
read more