{"id":2736,"date":"2022-03-19T17:52:55","date_gmt":"2022-03-19T12:22:55","guid":{"rendered":"https:\/\/www.rangakrish.com\/?p=2736"},"modified":"2022-03-19T17:54:28","modified_gmt":"2022-03-19T12:24:28","slug":"book-review-introducing-blockchain-with-lisp","status":"publish","type":"post","link":"https:\/\/www.rangakrish.com\/index.php\/2022\/03\/19\/book-review-introducing-blockchain-with-lisp\/","title":{"rendered":"Book Review: Introducing Blockchain with Lisp"},"content":{"rendered":"<p><span style=\"color: #0000ff;\"><em><strong>Title:<\/strong><\/em><\/span> Introducing Blockchain with Lisp: Implement and Extend Blockchains with the Racket Language<\/p>\n<p><span style=\"color: #0000ff;\"><em><strong>Author:<\/strong><\/em><\/span> Boro Sitnikovski<\/p>\n<p><span style=\"color: #0000ff;\"><em><strong>Publisher:<\/strong><\/em><\/span> Apress<\/p>\n<p><span style=\"color: #0000ff;\"><em><strong>Year:<\/strong><\/em><\/span> 2021<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2022\/03\/Blockchain-Book.png?ssl=1\"><img data-recalc-dims=\"1\" fetchpriority=\"high\" decoding=\"async\" data-attachment-id=\"2738\" data-permalink=\"https:\/\/www.rangakrish.com\/index.php\/2022\/03\/19\/book-review-introducing-blockchain-with-lisp\/blockchain-book\/\" data-orig-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2022\/03\/Blockchain-Book.png\" data-orig-size=\"425,356\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2022\/03\/Blockchain-Book.png\" class=\"alignleft size-medium wp-image-2738\" src=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2022\/03\/Blockchain-Book.png?resize=300%2C251&#038;ssl=1\" alt=\"\" width=\"300\" height=\"251\" srcset=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2022\/03\/Blockchain-Book.png?resize=300%2C251&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2022\/03\/Blockchain-Book.png?w=425&amp;ssl=1 425w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a>Blockchains are a hot topic these days and interestingly, I am getting involved in a project that uses Blockchain. Languages such as <em><strong>C++<\/strong><\/em>, <em><strong>Java<\/strong><\/em>, <em><strong>Go<\/strong><\/em> and <em><strong>Node.js<\/strong><\/em> are commonly used in such projects, so when I came across this book that teaches Blockchains using <a href=\"https:\/\/racket-lang.org\" target=\"_blank\" rel=\"noopener\"><em><strong>Racket<\/strong><\/em><\/a> (a descendent of <em><strong>Scheme<\/strong><\/em>, a <em><strong>Lisp<\/strong><\/em> variant), I was pretty excited and purchased it immediately.<\/p>\n<p>I haven\u2019t used <em><strong>Racket<\/strong><\/em> before, but because it is a dialect of <em><strong>Lisp<\/strong><\/em> (my favourite language), it was quite easy to get started. I downloaded and installed the environment on my <em><strong>iMac<\/strong><\/em> computer.<\/p>\n<p>The book itself is quite compact, running to just 145 pages, and four chapters in all.<\/p>\n<p><em><strong>Chapter 1<\/strong><\/em> 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!<\/p>\n<p><em><strong>Chapter 2<\/strong> <\/em>gives an overview of the <em><strong>Racket<\/strong><\/em> programming language. Compared to the first chapter, this one is three times longer, with 47 pages. <em><strong>Racket<\/strong><\/em> is a <em><strong>Lisp<\/strong><\/em>-based programming language and is widely respected. It is multi-platform and has a rich Editor (<em><strong>Dr.Racket<\/strong><\/em>). 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 <em><strong>Racket<\/strong><\/em>, check this <a href=\"https:\/\/racket-lang.org\/books.html\" target=\"_blank\" rel=\"noopener\"><em><strong>resource list<\/strong><\/em><\/a>.<\/p>\n<p><em><strong>Chapter 3<\/strong><\/em> 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.<\/p>\n<p><em><strong>Chapter 4<\/strong><\/em> extends the implementation in interesting, non-trivial ways. First, it defines a proprietary expression language to specify <em><strong>Smart Contracts<\/strong><\/em>.<span class=\"Apple-converted-space\">\u00a0 <\/span>The second major enhancement is implementing support for <em><strong>Peer-to-Peer<\/strong><\/em> network, making the project more realistic.<\/p>\n<p>If you are new to Blockchains and do not mind learning a new language (in fact, I enjoyed learning\u00a0<em><strong>Racket)<\/strong><\/em>, then this book will get you started off confidently.<span class=\"Apple-converted-space\">\u00a0<\/span><\/p>\n<p><span class=\"Apple-converted-space\">\u00a0<\/span>The full source code is available in <a href=\"https:\/\/github.com\/MarkP88\/racket-coin\" target=\"_blank\" rel=\"noopener\"><em><strong>GitHub<\/strong><\/em><\/a>.<\/p>\n<p>Possible improvements? I personally feel that <em><strong>Chapter 1<\/strong><\/em> could have been more detailed. One obvious drawback is the absence of references to existing Blockchain platforms such as <a href=\"https:\/\/www.corda.net\" target=\"_blank\" rel=\"noopener\"><em><strong>Corda<\/strong><\/em><\/a>, <a href=\"https:\/\/www.multichain.com\" target=\"_blank\" rel=\"noopener\"><strong><em>MultiChain<\/em><\/strong><\/a>, <a href=\"https:\/\/www.hyperledger.org\/use\/fabric\" target=\"_blank\" rel=\"noopener\"><em><strong>Hyperledger Fabric<\/strong><\/em><\/a>, and <a href=\"https:\/\/ethereum.org\/en\/\" target=\"_blank\" rel=\"noopener\"><em><strong>Ethereum<\/strong><\/em><\/a>. And, while there is brief mention of <a href=\"https:\/\/www.investopedia.com\/terms\/s\/smart-contracts.asp\" target=\"_blank\" rel=\"noopener\"><em><strong>Smart Contracts<\/strong><\/em><\/a>, there is no mention of <a href=\"https:\/\/hackernoon.com\/eli5-zero-knowledge-proof-78a276db9eff\" target=\"_blank\" rel=\"noopener\"><em><strong>Zero Knowledge Proofs<\/strong><\/em><\/a> (ZKP). I would have loved to see a (toy) real world example that uses <em><strong>Racket<\/strong><\/em> to interact with <em><strong>Hyperledger Fabric<\/strong><\/em> or another popular Blockchain platform. That would have added substantial value to this book.<\/p>\n<p>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\u00a0<em><strong>Blockchain<\/strong><\/em> and <em><strong>Lisp<\/strong><\/em>.<\/p>\n<p>Have a nice weekend!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"advanced_seo_description":"","jetpack_seo_html_title":"","jetpack_seo_noindex":false,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[94,18,17],"tags":[313,19,312],"class_list":["post-2736","post","type-post","status-publish","format-standard","hentry","category-book-review","category-lisp","category-programming","tag-blockchain","tag-lisp","tag-racket"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p9OLnF-I8","jetpack-related-posts":[{"id":190,"url":"https:\/\/www.rangakrish.com\/index.php\/2016\/03\/15\/book-review-common-lisp-recipes-by-edi-weitz\/","url_meta":{"origin":2736,"position":0},"title":"Book Review: Common Lisp Recipes &#8211; A Problem-Solution Approach","author":"admin","date":"March 15, 2016","format":false,"excerpt":"Last Saturday (March 12, 2016), I got my most eagerly awaited book from Amazon.com. Yes, I am talking about Common Lisp Recipes: A Problem-Solution Approach\u00a0authored by Dr.Edmund Weitz. Of course, if you have been programming in Lisp for a couple of years, you would have definitely heard of Dr.Edi Weitz,\u2026","rel":"","context":"In &quot;Book Review&quot;","block_context":{"text":"Book Review","link":"https:\/\/www.rangakrish.com\/index.php\/category\/book-review\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":2200,"url":"https:\/\/www.rangakrish.com\/index.php\/2020\/11\/08\/book-review-the-common-lisp-condition-system-beyond-exception-handling-with-control-flow-mechanisms\/","url_meta":{"origin":2736,"position":1},"title":"Book Review &#8211; The Common Lisp Condition System: Beyond Exception Handling with Control Flow Mechanisms.","author":"admin","date":"November 8, 2020","format":false,"excerpt":"Title: The Common Lisp Condition System: Beyond Exception Handling with Control Flow Mechanisms Author: Micha\u0142 \"phoe\" Herda Publisher: Apress Year: 2020 Unlike with other languages, it is rare to find new books being published on Lisp. The last book on Lisp, which I purchased was \u201cCommon Lisp Recipes\u201d\u00a0\u00a0by Edmund Weitz\u2026","rel":"","context":"In &quot;Book Review&quot;","block_context":{"text":"Book Review","link":"https:\/\/www.rangakrish.com\/index.php\/category\/book-review\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2020\/11\/Cover-page-209x300.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":2377,"url":"https:\/\/www.rangakrish.com\/index.php\/2021\/04\/12\/book-review-programming-algorithms-in-lisp\/","url_meta":{"origin":2736,"position":2},"title":"Book Review: Programming Algorithms in Lisp","author":"admin","date":"April 12, 2021","format":false,"excerpt":"Title: Programming Algorithms in Lisp: Writing Efficient Programs with Examples in ANSI Common Lisp Author: Vsevolod Domkin Publisher: Apress Year: 2021 It is only about 5 months since I read and reviewed\u00a0a good book on Lisp written by Micha\u0142 \u201cphoe\u201d Herda. The present book is by Vsevolod Domkin\u00a0and I purchased\u2026","rel":"","context":"In &quot;Book Review&quot;","block_context":{"text":"Book Review","link":"https:\/\/www.rangakrish.com\/index.php\/category\/book-review\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2021\/04\/Book-Cover-209x300.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":2927,"url":"https:\/\/www.rangakrish.com\/index.php\/2022\/10\/20\/why-learn-lisp\/","url_meta":{"origin":2736,"position":3},"title":"Why Learn Lisp?","author":"admin","date":"October 20, 2022","format":false,"excerpt":"In the last article, I had shared my views on why programmers should learn Prolog, preferably as the first language. What language should one learn next? I strongly pitch for Lisp, to be precise, \u201cCommon Lisp\u201d. Lisp happens to be the second oldest (1958) programming language, only after Fortran (1957)!\u2026","rel":"","context":"In &quot;LISP&quot;","block_context":{"text":"LISP","link":"https:\/\/www.rangakrish.com\/index.php\/category\/lisp\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":2057,"url":"https:\/\/www.rangakrish.com\/index.php\/2020\/07\/19\/calling-lisp-functions-from-elixir\/","url_meta":{"origin":2736,"position":4},"title":"Calling Lisp Functions from Elixir","author":"admin","date":"July 19, 2020","format":false,"excerpt":"In the last article\u00a0I showed how we can simulate the idea of Lisp's \"closure\" in Elixir. Today, I would like to demonstrate how we can call Lisp functions from Elixir using the NIF interface. What is the need to integrate Elixir with another language? I can think of two reasons:\u2026","rel":"","context":"In &quot;Elixir&quot;","block_context":{"text":"Elixir","link":"https:\/\/www.rangakrish.com\/index.php\/category\/elixir\/"},"img":{"alt_text":"Using the Lisp Functions","src":"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2020\/07\/Session.jpg?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2020\/07\/Session.jpg?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2020\/07\/Session.jpg?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2020\/07\/Session.jpg?resize=700%2C400&ssl=1 2x"},"classes":[]},{"id":541,"url":"https:\/\/www.rangakrish.com\/index.php\/2017\/06\/04\/definite-clause-grammars-in-lisp-part-2\/","url_meta":{"origin":2736,"position":5},"title":"Definite Clause Grammars in Lisp &#8211; Part 2","author":"admin","date":"June 4, 2017","format":false,"excerpt":"In the last post, I showed how we can implement DCGs in LispWorks using the KnowledgeWorks package. The grammar discussed in that post did not take into account subject\/predicate number agreement. This is one of the basic constraints in English grammar. Today I will show how easy it is to\u2026","rel":"","context":"In &quot;LISP&quot;","block_context":{"text":"LISP","link":"https:\/\/www.rangakrish.com\/index.php\/category\/lisp\/"},"img":{"alt_text":"Prolog Grammar","src":"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2017\/06\/Prolog-Grammar.png?resize=350%2C200","width":350,"height":200},"classes":[]}],"_links":{"self":[{"href":"https:\/\/www.rangakrish.com\/index.php\/wp-json\/wp\/v2\/posts\/2736","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.rangakrish.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rangakrish.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rangakrish.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rangakrish.com\/index.php\/wp-json\/wp\/v2\/comments?post=2736"}],"version-history":[{"count":0,"href":"https:\/\/www.rangakrish.com\/index.php\/wp-json\/wp\/v2\/posts\/2736\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.rangakrish.com\/index.php\/wp-json\/wp\/v2\/media?parent=2736"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rangakrish.com\/index.php\/wp-json\/wp\/v2\/categories?post=2736"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rangakrish.com\/index.php\/wp-json\/wp\/v2\/tags?post=2736"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}