Live data from Hacker News

BasicCoin, a cryptocurrency in less than 600 lines of Python

github.com

21–30 of 40 posts

Re: BasicCoin, a cryptocurrency in less than 600 lines of Python

#21
Wouldn't it be even easier to just use Git for most of the heavy lifting?

- Ledger is a file in a Git repo

- Blocks are confirmed by committing them with a SHA1 with sufficiently many leading zeros (adjust a nonce in the commit msg until it fits)

- Some bot accepts all pull requests into the Github repo that are fast-forward and whose commits have sufficiently many leading 0s (possibly after confirming that the booking is valid ;)

We could call that... oh I don't know, DvcsCoin or so.

Re: BasicCoin, a cryptocurrency in less than 600 lines of Python

#22
Basically unreadable. Not sure what you were going for, but I think it was the wrong thing.

Off the top of my head:

1.) There's no reason not to use newlines. They have no chance of introducing bugs in any reasonable language and they aid readability.

2.) You're using closures all over place and I haven't checked every occurrence, but I strongly suspect that almost all of them are unnecessary and unhelpful. Closures are not free in terms of code complexity. Use them only when necessary.

Re: BasicCoin, a cryptocurrency in less than 600 lines of Python

#23
post #21

Wouldn't it be even easier to just use Git for most of the heavy lifting? - Ledger is a file in a Git repo - Blocks are confirmed by committing them with a SHA1 with sufficiently many leading zeros (adjust a nonce in the commit msg until it fits) - Some bot accepts all pull requests into the Github repo that are fast-forward and whose commits have sufficiently many leading 0s (possibly after confirming that the booki…

Interesting idea, but I hate the name :)

Re: BasicCoin, a cryptocurrency in less than 600 lines of Python

#24
post #21

Wouldn't it be even easier to just use Git for most of the heavy lifting? - Ledger is a file in a Git repo - Blocks are confirmed by committing them with a SHA1 with sufficiently many leading zeros (adjust a nonce in the commit msg until it fits) - Some bot accepts all pull requests into the Github repo that are fast-forward and whose commits have sufficiently many leading 0s (possibly after confirming that the booki…

'gitcoin'

Perfect name.

Knowing HN this is gonna be a show HN in a couple of days and rewritten in 10 lines of js a week after that.

Re: BasicCoin, a cryptocurrency in less than 600 lines of Python

#26
post #21

Wouldn't it be even easier to just use Git for most of the heavy lifting? - Ledger is a file in a Git repo - Blocks are confirmed by committing them with a SHA1 with sufficiently many leading zeros (adjust a nonce in the commit msg until it fits) - Some bot accepts all pull requests into the Github repo that are fast-forward and whose commits have sufficiently many leading 0s (possibly after confirming that the booki…

That's what Stripe's CTF3's Gitcoin was like: https://github.com/ctfs/write-ups/tree/master/stripe-ctf3/le...
Post reply on HN