Hacker News new | comments | show | ask | jobs | submit login
Write your next Ethereum contract in Pyramid Scheme (michaelburge.us)
406 points by MichaelBurge 8 months ago | hide | past | web | favorite | 56 comments



Oh well done. Taking the pun and then actually implementing it fully, for the win.

> Pyramid Scheme is implemented using the appropriately-named Racket.


This is perfect. What would actually be perfect is if it replaced solidity.


don't worry, Cardano is going to eat Ethereum's lunch and it most definitely will not be using solidity.


How can you be so sure cardano will eat ethereums lunch when the concentration of developers in eth > cardano ?

I can see the benefits of cardano but I don't think it can catch up ?


How about a single large scale smart contract launch that doesn’t end up needing a hard fork or result in people having money permanently frozen?

I hold ETH and I am excited for what it could do. But Solidity is hot garbage and that Python inspired alternative is a close second. I also don’t care about quantity of developers. These things deal with real money from real people, it demands a level of seriousness an average developer should run screaming from.


Serpent is deprecated, there's no first or second there.

Also think you are confusing poorly made cookie cutter erc20 tokens as representative of smart contracts in general, it is most certainly all a mess, but perhaps those treating alpha software as production ready is the real problem?

Last i looked the biggest user of gas and thus what is keeping your jaded investment afloat is ENS, no token just a pure smart contact. It has been running fine for a year.

Sadly we have people investing into hairbrained marketing brochures created by unqualified people in their underwear rather than proven products, in a free world I see no solution to this other than education.

On the other side of the equation we have people like Dan Guido seeking funding to make formal verification frameworks and the commmunity barely even notices nor puts it on a pedestal like every doomed ico that comes along.


It's not just the cookie cutter ERC20 contracts. There have been repeated serious issues with, for example, multisig contracts written by core Etherium developers and shipped in wallet apps. I think people may still be waiting on a hard fork to release funds locked by the latest multisig fuckup.


Yep this is what I mean. If the core developers find it hard to write bulletproof smart contracts the problem is real.


Fair call, parity bug and dao are indefensible, the fact they were both so intimately involved with Ethereum makes it a magnitude worse.

I just wanted to lament that for all the money sloshing around there isn't more work being done on security.


And PHP powers some of the largest sites on the web. Solidity will work for most people who just copy a boilerplate smart contract.


Like the folks who lost their multisig ethereum wallets less than a month back because a rando sent a kill command to the master contract?


You don’t see people losing millions of dollars when a webpage fails to load due to a simple logic error.


Webpages don't store money in the form of digital tokens that move in accordance to the webpage's logic.


Online gambling webpages do.


I don't think anyone can be sure about anything, but I am very impressed by the team behind this and the source code I have looked through so far.


That's just marketing hype from Cardano, which is the same hype being used to promote Tezos. It's based on the plan to allow Cardano smart contracts to be formally verified. Two other programming languages are being developed for Ethereum that are being formalized by independent teams, and will allow formal verification of smart contracts. e.g. an ERC20 token smart contract implementation is being formally verified by the KEVM project. And a third language is being developed with the aim of doing the same.

Also, Cardano is currently centralized and will be until 2018 at the earliest when further upgrades are made in an attempt to make it decentralized. Meanwhile, Ethereum is already decentralized and work is under way to upgrade it to massively increase its scalability. Ethereum is way ahead and has the critical mass of developer and industry support.


Please elaborate, what cardano does differently?


What about NEO? it supports writing smart contracts in Java, Kotlin and C#


I would never have thought that anyone would want to replace something with Scheme)))))))


You just learned something, great.


Hopefuly nobody is forcing me to use that language XD


And you can tell that it's not a scam, no `cons` here!


Or, you know, it could also have been a variant of Scheme


[flagged]


Is that literate brainfuck?


> Formal Verification: Get an absolute 100% guarantee that your contracts are free of errors

Seems to me that should be priority #1 considering there's potentially millions of $local_currency riding on these contracts and they seem to be done with the hard forks when one goes awry (though I was reading that they collude to make it really, really hard to sell off the ill gotten gains).


> Formal Verification: Get an absolute 100% guarantee that your contracts are free of errors

This is not actually possible, there could have been an issue with your threat model. e.g. side-channel attacks could be out of scope.


Formal verification only ever verifies as far as your spec specifies


That is true, but it should not be assumed that a spec. is a thing of fixed validity. A formal spec. has a reasonable likelihood of being less ambiguous, incomplete or self-contradictory than an informal one, or whatever substitutes for a spec. in an agile approach.


That only tells me a spec and its formal verification are necessary but not sufficient assets. Not "we can't prove everything so we'll keep our millions riding on half-assed piles of garbage.


A ycombinator backed project called Quantstamp aims to preform security audits for smart contracts, and seems like a very necessary part of the platform ecosystem that is developing.


Was this done purely for the joke of writing Pyramid-Scheme next to Ethereum ?


why would someone write Scheme not as a joke?

wait do the downvotes mean that some people actually use Scheme?


Scheme is a wonderful and flexible language. There's a reason it was used as a teaching language and in books like SICP. I don't use it very much, but you really have to admire some of the power in the language, like the way variable binding is handled to make macros so powerful. In short: scheme is probably one of the best base languages for building DSLs. If I had to pick "most tasteful" programming languages I would put scheme in the top 3. (Above Python, which is the language I use the most, and above C++ and Java which are other languages I use at work.)


Yes.


"Destabilizing Nation-states with Math", ha, one of the most insightful summaries of cryptocurrencies I have seen.


"Destabilizing nation-states with beliefs" - see politics, religion.


Huh. Looks like it can be applied to a bunch of other innovations too.

"Destabilizing Nation-states with Biology" - Bio weapins

"Destabilizing Nation-states with Nuclear Physics" - N-bomb


Those were state controlled. The scary thing is, we're quickly approaching the time when bioweapons can be made cheaply and by non-biologists.


Nuclear weapons could have ended up made by non-state actors (e.g. the average corporation) cheaply enough for a long time now; the state(s) just made sure to get an early lock on publications about uranium enrichment processes, before any of the really good ones became public knowledge.


So which states exactly are destabilized with crypto-currencies and blockchain? Etc?


Maths isn't destabilizing nation states. Even if Bitcoin were, it would be good old financial capitalism doing it, not crypto purists and weed buyers.


Nice article and project.

I have been experimenting with Pact that is written in Haskell and implements a non Turing complete Lisp language for writing contracts and provides a blockchain implementation. https://github.com/kadena-io/pact


What is the shortest compiling deployable ETH pyramid scheme you can write in Pyramid Scheme?


A shoo in for the Oscars in 2017. Amazing title and article.


It's 'shoe in' by the way.



This is a lesson in follow through in pun economics. Well done


Did you first implemented this project and then realized the hilarious naming? Or was it the other way around?


> Haskell programmers often code in ivory towers with their heads in the cloud. In this multi-part article series, we’ll get our feet wet diving deep below C level.

I'm a bit confused by this article's introduction. Pyramid Scheme is a Scheme dialect implemented in another Scheme (RAcket). What does the whole thing have to do with Haskell?


The guy who wrote the article programs in Haskell, he might assume the audience is in on the joke


Headlines coming next week on HN: "Write your next Ethereum contract in [Forth|Elixir|Rust|Brainfuck]".

Headlines coming next month on HN: "How I wrote an Ethereum clone in [Rust|Node.JS|Minecraft|Dwarf Fortress]".

Headline coming next year on HN: "Running the Linux kernel as a blockchain application".


I think you may have missed the joke here. A pyramid scheme is an unsustainable business model where the gains accrue at the top. The fact the author built it in racket (a racket being another dishonest scheme) makes it all the funnier.


FWIW, I made my MSc thesis working on Idris as a smart contract programming language:

https://publications.lib.chalmers.se/records/fulltext/234939...

https://github.com/vindaloo-thesis/idris-se

Note that the state of the code is a messy PoC and abandonware - I hope to be able to pick up the ball here again at some point but probably not happening any time soon. If anyone really wants to continue on this and wants to take over as a maintainer, feel free to PM.

Someone also created this list of resources: https://github.com/pirapira/fp-ethereum


I've long wanted to be able to make a "The Year of Linux on the Blockchain" post title.


Relevant xkcd: https://xkcd.com/410/


unbelievable people! next thing they will try to sell us hot ether




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: