Bitcoin Forum
September 25, 2017, 04:42:56 AM *
News: Latest stable version of Bitcoin Core:  [Torrent]. (New!)
   Home   Help Search Donate Login Register  
Pages: [1]
Author Topic: 12,222 lines of code?  (Read 2424 times)
Offline Offline

Activity: 934

View Profile
September 07, 2013, 06:54:08 PM

You may find this a superfluous endeavor but I was curious and decided to find out the number of line numbers and of characters in the original version of Satoshi's bitcoin client code (bitcoin-0.1.0).

I disregarded all coments, spaces, line breaks, and so, leaving only his code. The files concatenated and minified were: base58.h, bignum.h, db.cpp, db.h, headers.h, irc.cpp, irc.h, key.h, main.cpp, main.h, market.cpp, market.h, net.cpp, net.h, script.cpp, script.h, serialize.h, ui.cpp, ui.h, uint256.h, util.cpp and util.h. Sha.cpp and sha.h were suppressed.

Without comments and blank lines I got 12,222 lines.
Interesting number, don't you think? (
The number of characters I got without spaces was: 287,274 ( Not markedly so interesting, I guess.

Lastly, one jolly curiosity; there is a code comment line that reads:
// This is why people hate C++

[EDIT-1]: I got 402 lines for sha.cpp and 135 lines for sha.h, so total number of lines including these two files would add up to: 12,222+402+135=12,759.

[EDIT-2]: The record for memorising Pi was achieved by Chao Lu (China) who recited Pi from memory to 67,890 places, at the Northwest A&F University, Shaanxi province, China, on 20 November 2005.

Would be great there was a torrent file of all referenced materials of the paper: "How to Build Time-Lock Encryption" by Tibor Jager. And having its magnet link published on bitcoin blockchain!
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
Hero Member
Offline Offline

Posts: 1506314576

View Profile Personal Message (Offline)

Reply with quote  #2

Report to moderator
Offline Offline

Activity: 98

View Profile WWW
September 09, 2013, 12:34:38 AM

That's pretty funny and cool!

🚂 Unstoppable Organisation - The Movement DAO
Pages: [1]
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!