• DSLA ProtocolDSLA Protocol(DSLA)$0.003681-6.85%
  • lympoLympo(LYM)$0.004392-4.43%
  • YAM v2YAM v2(YAMV2)$4.70-1.41%
  • PolkaBridgePolkaBridge(PBR)$0.439876-7.02%
  • CornichonCornichon(CORN)$0.073096-0.86%
  • StacyStacy(STACY)$0.0007100.00%
  • Heart NumberHeart Number(HTN)$0.000553-30.47%
  • TadpoleTadpole(TAD)$7.32-1.76%
  • SEENSEEN(SEEN)$2.05-2.27%
  • EvedoEvedo(EVED)$0.082301-0.80%
Wednesday, August 17, 2022
  • Login
247 Crypto
No Result
View All Result
  • HOME
  • BITCOIN
  • CRYPTO UPDATES
    • GENERAL
      • BINANCE COIN
      • CARDANO
      • DOGECOIN
      • TETHER
      • XRP
      • POLKADOT
      • BITCOIN CASH
      • LITECOIN
    • ALTCOINS
    • ETHEREUM
  • BLOCKCHAIN
  • EXCHANGES
  • MINING
  • DEFI
  • ANALYSIS
  • SCAM ALERT
  • REGULATIONS
Crypto Live Price
  • HOME
  • BITCOIN
  • CRYPTO UPDATES
    • GENERAL
      • BINANCE COIN
      • CARDANO
      • DOGECOIN
      • TETHER
      • XRP
      • POLKADOT
      • BITCOIN CASH
      • LITECOIN
    • ALTCOINS
    • ETHEREUM
  • BLOCKCHAIN
  • EXCHANGES
  • MINING
  • DEFI
  • ANALYSIS
  • SCAM ALERT
  • REGULATIONS
No Result
View All Result
247 Crypto
No Result
View All Result
Home Ethereum

My unedited, uncensored thoughts about Ethereum, Cardano, Tezos, formal proofs and functional programming being a gimmick : ethereum

by 247 Crypto
June 4, 2021
in Ethereum
Reading Time: 11 mins read
A A
0
Share on FacebookShare on Twitter


**Warning: this post is a huge wall of unedited thoughts. **

When browsing another thread on this subreddit, I’ve noticed a comment about Cardano from /u/Theory-Early, who wrote:

I dont think it sounds promising at all. 99.99% of all programmers do not give a single fuck about functional programming or formal verification. it’s literally a gimmick to scam non-programmers with an ICO.

programmers aren’t attracted to cardano, only fucking retarded investors who think functional programming and formal verification is some magic bullet.

First of all, Cardano is a mess that does not represent how a functional blockchain should be made. But I’ll talk about this subject later. For now, I’d like to talk about the “FP is a gimmick” part. Rather than getting offended and discard /u/Theory-Early as someone who just “doesn’t get it” (like most FP elitists would probably do), this inspires me to really understand where this perception comes from, evaluate its merits and wonder what could be done to change it. This isn’t just an isolated case. When I was developing Formality, I’ve felt that impression coming from many of you, and I know many of you feel that way. Rightfully so, ok? It is my job to understand this feeling, its roots, and figure out how to change it.

It is true that functional programming and formal verification has certain fame of being over-hyped tools that, in the end, provide little to no practical benefit. At the same time, those who do get it ultimately fall in love and almost universally come to the conclusion that it is objectively, profoundly superior to the alternatives. Isn’t that weird? Why there is such a huge disconnect between people who “get it” think it is the best thing ever, and everyone else, who just watches from the outside and judges it as a useless gimmick?

I think both sides have a fair judgement. The thing is, when you, in a personal level, learn about FP, you instantly realize how good it is. It is obvious for you, because all the tools it directly provides you objectively make you a better programmer, today. You get access to abstractions like functors, monads, folds, composition, a next-gen type-system. Learning to use these things properly makes you so much better that you wonder how you could ever lived so long without those things. And then you start preaching about how amazing FP is. And write about burritos. And ultimately proceed to build nothing of real value.

Ah, that happens sooo often. But why? If FP is so objectively better, where are all the cool things built with it? I have a simple answer to that paradox, but it might make some people really upset with me: Haskell isn’t a practical language. And that’s all.

See, there are some practical FP languages like Scala and Clojure, but these are practical exactly because of all the non-FP concepts mixed in. They are hybrid, multi-paradigm languages. So that doesn’t count as a solid argument in favor of FP. When it comes to fully embracing FP, there is only one mature language in the market: Haskell. And that language isn’t practical. Simple as that. I hope that doesn’t make r/haskell upset with me, but, as much as I love it, it isn’t.

  1. Haskell has possibly the worst package manager in the world. It is not just bad, it is terrible. As in, “can’t install more than 3 libs without breaking the world” terrible. It is so bad the community had to create a second package manager that maintains a curated list of packages that work in conjunction. Which kinda works, but 1. requires a ton of work, 2. doesn’t scale and 3. still breaks if you need to install anything outside of that curated list.

  2. Its error messages are sometimes great, sometimes completely cryptic. Problem is: it takes just one cryptic messages to waste hours of your time. Even worse, in the end, often it isn’t even your fault. Which takes us to…

  3. A messy soup of package extensions that is required to make up for the lack of dependent types. Sooner or later, something you need to do will not work just because Haskell can’t understand it. And then you’ll need to add extensions like RankNTypes, GADTs, FlexibleInstances, ScopedTypeVariables, and eventually you’re coding in a frankenstein dialect with error messages that not even the author understands.

  4. Too many obscure, academic words that exist for historical reasons (or no good reason). This only further isolates the community in a bubble. If a word requires explaining, it isn’t a good word. A programmer shouldn’t learn a whole new vocabulary to just get started. Things like: why isn’t Functor called Mappeable?

  5. The idiomatic syntax isn’t very practical. For example, a fold is beautiful when the body is short, but when it is large, it requires you to indent your code in bizarre ways. See this comment for an example. The acclaimed point-free style often leads to unreadable one-liners that do 1000 things. The equational notation for function declaration becomes redundant once you have many arguments, and it doesn’t scale vertically. Monads are a genius, profound way to handle effects… once you spend a semester learning about them and getting overwhelmed by the awful or plain wrong tutorials. Pattern-matching records with many fields requires you to rename all fields, every single time. Extracting big or deep fields is extremely verbose, almost forcing you to deal with lenses. Which then require another semester of courses, 10’s of cryptic symbols, and once you do it, have fun with your 10x performance penalty. And then you miss the times when you could just write foo.bar.x.y += 3.

  6. Finally, and perhaps mostly, its failure to compete on the front-end, user-facing space. There is still no viable JS compiler, no satisfactory way to make iOS/Android apps, or Windows/OSX/Linux releases.

In short, what I’m saying is that Haskell is a very unpractical language out of the box, and that it is a major contributor to this perception that FP is a gimmick. And don’t get me wrong, I’m not hating on Haskell, it is still one of my favorite languages, and it can be extremely powerful for an individual or isolate team with enough time. But I truly don’t think it is going to, say, replace TypeScript anytime soon. It just doesn’t scale, community-wise. And what is the point of being a god-like programmer, in a language that few use? Only to get beat by a CS freshman who just installed a npm package that does what he wanted?

But FP, as a concept… that’s a different matter. It has a lot of potential, and I don’t think anybody will be able to judge it until they truly get it. So, this sparks the question: what would happen if we had an catual hardcore functional language, with all the power of Haskell, but none of its practical problems? I.e., one that would be as easy to learn as TypeScript? One that would strip away all the academic jargon, one with amazing error messages, one with an easy, obvious ways to anything you do in conventional languages (effects, field updates, loops)? One that, like TypeScript, was ready to scale into a massive ecosystem of real-world applications? Yet, one that, under the hoods, was grounded on the solid foundations of type theory, with dependent types, formal proofs and all that powerful stuff waiting for you, when – and if – you’re ready for it? If we had such a language, what would happen? Would the common developer still dismiss FP as a weird thing of weird people, or would they suddenly realize the immense power that FP has, and fall in love? I honestly, deeply, strongly, think the later would happen.

Am I right? Am I wrong? Well, for one, we could almost see that happening a few years ago, powered by another language: Elm. It did just some of the things I sad, and the result was clear, as it quickly grew to be one of the most used functional languages. But it had a big issue: it simplified things so much, it ended up shallow. Once you learned enough and started needing the additional power, it wasn’t there. The language was too limited to do certain things. So the hype eventually died off. But do you really need to overly simplify the core language in order to make it simple? No! I don’t think so. You can just be careful to get these things out of the way of the common developer, and that can be accomplished by serving the common developer a familiar syntax that is just enough for him to thrive. The advanced stuff can still be accessible for those who want it.

This line of thought is what ultimately lead me to build Formality, now named Kind. Kind is the language being developed with the main purpose of becoming the ultimate functional language that can scale to the wide market, maintaining all the power of Haskell, fixing its mistakes, bringing powerful concepts from proof languages and keeping itself approachable, efficient. Are we there yet? Honestly, I think we are. At least, very close. A solid foundation? Check. Performance? Check. Can it be used by normal developers to build real stuff? Well, in the last few months, I’ve made an experiment. I’ve hired about 5 individuals with little or no programming experience, taught them Kind, and asked them to build a game and left. 3 months after, they’re almost done building an engine with rollback netcode, a graphics framework, a reactive user interface, state computations based on stream of events. They’re dealing with monads, folds, dependent types. And they just keep building and giving, not ever getting stuck or feeling hopeless. I truly think no other proof language has accomplished anything like that.

So, why this big wall of text, here on r/ethereum? I actually don’t know. I guess I had too much to say, and I wanted to vent. I do feel a little anxious when I see idiots getting so much voice and attention, but nothing gets me more than projects that have no substance or fundamentals getting treated as if they were somehow profound. Doge deserves its spot, it has a foundation, for being a meme, for being cute, for challenging the seriousness of money. But Cardano? What is its foundation? It sells itself as a more functional, research-based alternative to Ethereum. So, please, can anyone tell me one thing Cardano does, that Kind+Ethereum doesn’t do much better? It makes me upset to see people dismissing FP as a whole, because of a project with no real substance, that promises to change the world, yet can’t deliver smart-contracts after half a decade of existence. I think Cardano is a big disservice for the FP community.

When it comes to formally verified smart-contracts, Kind+Ethereum is all we ever need. And, no, I’m not saying formal proofs are a silver bullet for security, but I do think it will massively improve the issue, and I promise eventually you’ll get it. But how? For some time, I thought it’d be a matter of compiling Kind to the EVM. That would allow you to write normal Kind programs and run them inside Ethereum. I don’t think that is a great idea anymore. The gas overhead of compiling lambdas, as little as we make them, is still superior to 0. In a network where every opcode costs a fortune, people would just write in a cheaper, less safe language. And, in reality, smart-contracts are often simple and don’t require all the features you have in Kind.

So, for now, the plan is to just create a SmartContract DSL on Kind, with a reasonable syntax sugar, that will allow people to write Ethereum smart-contracts embedded on it. They’ll then be able to easily deploy, monitor and prove things about these contracts. Simple, easy and effective. Sure, this is something that can be done on Agda, Idris, Coq too. And perhaps that is why I’ve avoided this solution for a while. But, honestly? That is the way to go. And these are not practical languages either, I don’t think they’ll ever have massive ecosystems, so doing it in Kind will enable formally verified smart-contracts for the masses, which is something new. Now, please, tell me: once Kind is popular, has a great ecosystem, and people can easily write, deploy and verify Ethereum smart-contracts on it… then what is even the point of Cardano anymore? In what technical sense it even needs to exist? It doesn’t scale better than Ethereum, the built-in forking stuff is an actual gimmick, and it isn’t safer or more functional in any way. So I honestly can’t find a reason. If anyone has a great answer to that question, let me know, because I’ve been waiting for years and there is none.

To be clear, I don’t want to sound like a hater. I’m not lying when I say I love when I’m proven wrong, because I can cut losses and stop wasting my time in a wrong idea (just be Kind, please). But for now, I can’t look at Cardano and not think: what is the point? Or, rather: why people are so hyped about something that is, in my head, objectively inferior to what I’m building? Am I that out of touch? I’m just trying to understand. What Cardano does? The best arguments I’ve found so far are that:

  1. “Haskell is safer than Solidity.” Fair. But Kind is much safer than Haskell. By a large margin. Is there anyone who disagrees with that? So, are you telling me that Cardano built an entire network, with the whole premise of being “a safer, more functional” alternative to Ethereum, only to be obsolete as soon as an actual proof language adds support to Ethereum smart-contracts? Or are they betting that a proof language like Kind will never be popular enough to be viable? Or that people will never realize Haskell doesn’t even have formal proofs?

  2. “Our virtual-machine language is easier to reason about.” Fair. But a DSL in Kind, that compiles to the EVM, can also be made very easy to reason about. There is no need to create a whole network around that. Now, to be clear, I still think compiling Kind to its own INet-based “functional virtual machine” is a fucking amazing idea. That would justify building its own, separate blockchain, because the cost model is so beautifully great. But that’s a lot of work, and NOT what Cardano is proposing.

To be fair, I could be really misunderstanding something, since Cardano smart-contracts aren’t even written in Haskell, and it is still not clear to me what is the actual language used for it. Is it Plutus? Is it Marlowe? What is the execution environment that every full node runs? Is it a stack-machine? Are there lambdas? What are the opcodes? Where is the cost table? Is there even one? How much a beta-reduction costs? How do they measure that? Perhaps I’m too dumb to get it, but, I mean, if I can’t get it, how do they expect everyone will? It has been years and I still don’t get Cardano. And I swear I’m not lazy, I’ve tried. For a comparison, it took me a 5 minutes to open Ethereum’s yellow paper and immediately get its point.

Anyway, these are my un-edited thoughts about all these things, for whoever this may interest. About Kind, soon we’ll be back with a bunch of cool things to show. I just hope people give us some space to show these things! If Cardano deserves a $54b network, we deserve some attention. It is so sad to see crap getting so much attention, while people building real stuff gets ignored. But, fair enough, the market decides what it wants. For now, we’ll keep building.

See you, eventually.



Source link

Related articles

Crypto Index Products on ARGENT : ethereum

March 15, 2022

European Union (EU) Parliament Votes against Ban on Bitcoin and Ethereum’s Proof-of-Work (PoW) : ethereum

March 14, 2022
Tags: CardanoethereumformalfunctionalgimmickprogrammingproofsTezosthoughtsuncensoredunedited
Share76Tweet47

Related Posts

Ethereum

Crypto Index Products on ARGENT : ethereum

March 15, 2022
Ethereum

European Union (EU) Parliament Votes against Ban on Bitcoin and Ethereum’s Proof-of-Work (PoW) : ethereum

March 14, 2022
Ethereum

Joe Lubin Says Crypto Is Among The Best Weapons For Ukraine Now

March 14, 2022
Ethereum

Announcing the Kiln Merge Testnet

March 14, 2022
Ethereum

Terra Surpassed Ethereum To Become Second Most Staked Asset

March 13, 2022
Ethereum

CryptoPunks ETH NFT Sales Surges After BAYC IP Acquisition

March 13, 2022
No Result
View All Result

Recent Posts

  • Crypto Index Products on ARGENT : ethereum
  • Everything You Need to Know – Press release Bitcoin News
  • There will only ever be a MAXIMUM of 225,000 sats PER PERSON. Stack Sats! : Bitcoin
  • Where Ethereum and Bitcoin Headed After Musk’s Tweet
  • FinCEN Chief Digital Currency Adviser Korver Departs for A16z

Recent Comments

    • Home
    • Disclaimer
    • Privacy Policy
    • DMCA
    • Cookie Privacy Policy
    • Terms and Conditions
    • Contact
    247 CRYPTO

    Copyright © 2021 247 Crypto
    247 Crypto is not responsible for the content of external sites.

    No Result
    View All Result
    • HOME
    • BITCOIN
    • CRYPTO UPDATES
      • GENERAL
        • BINANCE COIN
        • CARDANO
        • DOGECOIN
        • TETHER
        • XRP
        • POLKADOT
        • BITCOIN CASH
        • LITECOIN
      • ALTCOINS
      • ETHEREUM
    • BLOCKCHAIN
    • EXCHANGES
    • MINING
    • DEFI
    • ANALYSIS
    • SCAM ALERT
    • REGULATIONS

    Copyright © 2021 247 Crypto
    247 Crypto is not responsible for the content of external sites.

    Welcome Back!

    Login to your account below

    Forgotten Password?

    Retrieve your password

    Please enter your username or email address to reset your password.

    Log In
    We use cookies on our website to give you the most relevant experience by remembering your preferences and repeat visits. By clicking “Accept”, you consent to the use of ALL the cookies.
    Do not sell my personal information.
    Cookie settingsACCEPT
    Manage consent

    Privacy Overview

    This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
    Necessary
    Always Enabled
    Necessary cookies are absolutely essential for the website to function properly. These cookies ensure basic functionalities and security features of the website, anonymously.
    CookieDurationDescription
    cookielawinfo-checbox-analytics11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics".
    cookielawinfo-checbox-functional11 monthsThe cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional".
    cookielawinfo-checbox-others11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other.
    cookielawinfo-checkbox-necessary11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary".
    cookielawinfo-checkbox-performance11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance".
    viewed_cookie_policy11 monthsThe cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data.
    Functional
    Functional cookies help to perform certain functionalities like sharing the content of the website on social media platforms, collect feedbacks, and other third-party features.
    Performance
    Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.
    Analytics
    Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics the number of visitors, bounce rate, traffic source, etc.
    Advertisement
    Advertisement cookies are used to provide visitors with relevant ads and marketing campaigns. These cookies track visitors across websites and collect information to provide customized ads.
    Others
    Other uncategorized cookies are those that are being analyzed and have not been classified into a category as yet.
    SAVE & ACCEPT