Amber is a web development framework for Crystal programming language. It uses Granite as its default ORM. While Granite works, I think Clear is more feature rich if your database choice is PostgreSQL. I wanted to integrate Clear ORM with Amber and give it a try. This article’s primary focus is to explain the process I had to go through to integrate Clear with Amber and how I solved some of the problems I faced during the process.
In this article, I will re-write Amber’s quick start guide’s Pet Tracker example using Clear ORM. The source code of the final…
In the previous article, I focused on storing nested trees as Merkle trees so that egit can store nested directories. In this article, I will focus on writing building index so that in subsequent articles we can store changes incrementally in repository.
Git Index is used to provide cache of all the blobs representing current state of the project. Git add command uses this information to incrementally save changes in repository. …
In the previous article, I focused on making history and storing executables in repository. In this article, I will focus on storing nested directories in repository by building nested trees as Merkle trees.
Git stores nested directories as nested trees and each tree is a Merkle tree. From wikipedia definition of Merkle tree —
“a hash tree or Merkle tree is a tree in which every leaf node is labelled with the cryptographic hash of a data block, and every non-leaf node is labelled with the cryptographic hash of the labels of its child nodes. …
In the previous article, I focused on storing trees and our first commit. In this article, I will focus on making commit history and storing executable files.
Git maintains commit history by linking the latest commit to its parent commit, thereby, building a commit history. Let’s examine how Git does it.
When we make our first commit using Git, it outputs something like this —
This output tells us its our (root-commit) since this is the first commit. If we examine the commit ID, we can see this details —
In the previous article of this series, I focused on initializing repository and storing blobs for file content. In this article, I will focus on storing trees and first commit.
As explained in previous article, a tree stores certain information about the stored blobs. It is one more level of indirection above blobs for easier lookup. If we examine Git’s objects database using
git cat-file command we can see —
Here, commit 88e38705fdbd3608cddbe904b67c731f3234c45b is a tree and as we can see it stores a list of entries. …
I recently got hold of this book Building Git, written by James Coglan. It’s a pretty thick book covering, as the title says, building Git version control system using Ruby programming language. I thought it would be a fun exercise to implement Git using Elixir as I read the book. This article is the first introductory one in a series of articles focusing on my journey implementing Git in Elixir programming language.
In the first part of this article series, I focused on comparing Crystal and Go’s concurrency from Communicating Sequential Processes (CSP) perspective. This second part is to fill in the gap and cover more traditional Shared Memory Multithreading.
I make the assumption that you are somewhat familiar with the concepts of multiple threads, critical region, mutual exclusion, and lock/unlock to ensure mutual exclusion.
Like my previous article, this one will also focus on converting some Go programs to Crystal and try to compare the two.
In Shared Memory Multithreading, multiple threads can access common shared variable(s) and to avoid race…
In my previous article on Crystal Programming Language titled — “A First Look at Crystal Programming Language and its Ecosystem”, I wrote about my first experience with Crystal language and its ecosystem. Since then I tried to delve a bit more in Crystal’s syntax and semantics. Having already familiar with Go, I wanted to compare concurrency support in Crystal and Go by converting some Go programs into Crystal.
I make the assumption that you are familiar with at least one of these two languages and its concurrency constructs.
Go supports two forms of concurrency and both are very mature —
Crystal is a general purpose, statically-typed, object-oriented, and compiled programming language coming from Manas Tech. The language has been in development since 2014 (for about 6 years now) and the most recent language version is 0.35.1. While everyone eagerly waits for the official release of version 1.0 of Crystal, I came across this language and wanted to take a first look. This article is the result of that first look at Crystal for a few hours. Coming from Ruby/Rails and Elixir/Phoenix background, I felt naturally inclined to look at this Ruby like slick programming language.
As mentioned on the github…
In this article, I will focus on creating a data ingestion and processing pipeline for Elixir using Broadway  library. As per Broadway’s github page, this library is used to —
“Build concurrent and multi-stage data ingestion and data processing pipelines with Elixir. It allows developers to consume data efficiently from different sources, known as producers, such as Amazon SQS, Apache Kafka, Google Cloud PubSub, RabbitMQ, and others.”
In this article, I will use Broadway producer for RabbitMQ , to demonstrate it’s basic usage developing a simple stock quote retrieval application.
P.S.: The example in this article is a concocted…