TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Rolling Your Own Blockchain in Haskell

234 pointsby nicolastalmost 8 years ago

7 comments

lambdaxdotxalmost 8 years ago
Here is another &quot;minimum viable&quot; blockchain implementation in Haskell: <a href="https:&#x2F;&#x2F;github.com&#x2F;adjoint-io&#x2F;nanochain" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;adjoint-io&#x2F;nanochain</a>.<p>It&#x27;s a bit simpler in implementation; the relevant data structures are defined a bit differently, so it could give a nice alternate perspective about what a blockchain written in Haskell may look like.
qaezelover 7 years ago
<a href="https:&#x2F;&#x2F;github.com&#x2F;input-output-hk&#x2F;cardano-sl" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;input-output-hk&#x2F;cardano-sl</a>
umenalmost 8 years ago
Great stuff , where can I learn about blackchain in begginers level with code examples ?
评论 #15059484 未加载
ngcc_hkover 7 years ago
any other language? Python and lisp would be interesting.
评论 #15061982 未加载
alphaalpha101almost 8 years ago
I like the idea behind this article, but this isn&#x27;t the way to do it. It hides the simplicity of the blockchain concept behind arcane syntax and overly complicated higher-order typing constructs.<p><pre><code> newtype BlockF a = Block (V.Vector a) deriving (Eq, Show, Foldable, Traversable, Functor, Monoid) type Block = BlockF Transaction type Blockchain = Cofree MerkleF Block </code></pre> Does anyone really think this is how one should write software? I think that constructions like Cofree are interesting, but I don&#x27;t think they&#x27;re programming.
评论 #15061584 未加载
评论 #15060480 未加载
评论 #15060577 未加载
评论 #15061564 未加载
macsj200almost 8 years ago
Initially read submission site as malbolge.us
cypharalmost 8 years ago
It&#x27;s quite a cute idea, implementing a blockchain (a fundamentally impure concept) in Haskell. If you&#x27;re interested in other cool Haskell projects, check out JoeyH[1].<p>[1]: <a href="http:&#x2F;&#x2F;joeyh.name&#x2F;code&#x2F;" rel="nofollow">http:&#x2F;&#x2F;joeyh.name&#x2F;code&#x2F;</a>
评论 #15060042 未加载
评论 #15059804 未加载