Book Review: Introducing Blockchain with Lisp

Written by on March 19, 2022 in Book Review, LISP, Programming with 0 Comments

Title: Introducing Blockchain with Lisp: Implement and Extend Blockchains with the Racket Language

Author: Boro Sitnikovski

Publisher: Apress

Year: 2021

Blockchains are a hot topic these days and interestingly, I am getting involved in a project that uses Blockchain. Languages such as C++, Java, Go and Node.js are commonly used in such projects, so when I came across this book that teaches Blockchains using Racket (a descendent of Scheme, a Lisp variant), I was pretty excited and purchased it immediately.

I haven’t used Racket before, but because it is a dialect of Lisp (my favourite language), it was quite easy to get started. I downloaded and installed the environment on my iMac computer.

The book itself is quite compact, running to just 145 pages, and four chapters in all.

Chapter 1 introduces Blockchain. Definitions and brief explanations are given for the core ideas including Ledger, Digital Signature, Hashing, Symmetric/Asymmetric Key algorithms, Smart Contracts, and Bitcoin. The author manages to cover the key concepts in around 16 pages!

Chapter 2 gives an overview of the Racket programming language. Compared to the first chapter, this one is three times longer, with 47 pages. Racket is a Lisp-based programming language and is widely respected. It is multi-platform and has a rich Editor (Dr.Racket). The author describes the essential language features that are useful for implementing the project. For those who wish to go beyond the basics covered in this chapter, there are some good books on Racket, check this resource list.

Chapter 3 delves into the details of the implementation. The author has done a good job of showing the code organisation in terms of files and the various dependencies (external packages) that are required for the implementation. He takes us through the different steps gradually and so the presentation is easy to follow and implement.

Chapter 4 extends the implementation in interesting, non-trivial ways. First, it defines a proprietary expression language to specify Smart Contracts.  The second major enhancement is implementing support for Peer-to-Peer network, making the project more realistic.

If you are new to Blockchains and do not mind learning a new language (in fact, I enjoyed learning Racket), then this book will get you started off confidently. 

 The full source code is available in GitHub.

Possible improvements? I personally feel that Chapter 1 could have been more detailed. One obvious drawback is the absence of references to existing Blockchain platforms such as Corda, MultiChain, Hyperledger Fabric, and Ethereum. And, while there is brief mention of Smart Contracts, there is no mention of Zero Knowledge Proofs (ZKP). I would have loved to see a (toy) real world example that uses Racket to interact with Hyperledger Fabric or another popular Blockchain platform. That would have added substantial value to this book.

I hope the author will address these concerns in the next edition. That said, I have to congratulate the author for his sincere attempt at combining Blockchain and Lisp.

Have a nice weekend!

Tags: , ,

Subscribe

If you enjoyed this article, subscribe now to receive more just like it.

Subscribe via RSS Feed

Leave a Reply

Your email address will not be published.

Top