Title: Bitcoin in Perl6 Post by: grondilu on January 26, 2012, 10:14:21 AM I'd like to help implementing Bitcoin in Perl6 (http://www.perl6.org), one of the most awesome programming language of the future.
Here is the beginning, the Base58 encoding: Code: #!/usr/local/bin/perl6 More will come. Title: Re: Bitcoin in Perl6 Post by: grondilu on February 28, 2012, 10:29:00 AM I wrote a Crypto module. Only Sha256 and rmd160 so far.
http://s0.barwen.ch/~grondilu/Crypto.pm6 Title: Re: Bitcoin in Perl6 Post by: grondilu on May 16, 2012, 08:41:41 AM I created two github repositories:
You can now create addresses in Perl6: Code: use Bitcoin; my Bitcoin::Key $key .= new; .say for $key, $key.address; Or check an existing key or address: Code: use Bitcoin; say Bitcoin::Address.new: "1SomeSi11yAddressToCheckXXXXX"; This is still the most basic stuff and it is awefully slow but there is a begin to everything, right? This is a very long term project anyway. Title: Re: Bitcoin in Perl6 Post by: da2ce7 on May 16, 2012, 12:52:30 PM This is still the most basic stuff and it is awefully slow but there is a begin to everything, right? This is a very long term project anyway. Yes! Perl 6 is shaping to be the best thing since sliced bread! :) I wish I had more time to help this project... However all my time is going to Open Transactions. Title: Re: Bitcoin in Perl6 Post by: grondilu on May 25, 2012, 02:16:48 PM Lots of improvements. The Bitcoin::DataStream class is now implemented. This allows me to create a block object from a hexdump and check its proof-of-work.
However, it requires a customed version of rakudo with more complete pack/unpack functions. They can be found on my fork of rakudo: http://github.com/grondilu/rakudo It's still pretty slow, though. But I love the syntax of the whole thing, for instance for creating a new, random bitcoin address: Code: use Bitcoin; What is really missing now is a decent database library. If someone would like to port BerkeleyDB on perl6, it would be awesome. Title: Re: Bitcoin in Perl6 Post by: grondilu on June 06, 2012, 09:16:38 AM I found out that a really slow part was the elliptic curve exponentiation (this is needed when converting a private key to a bitcoin address). So I wrote a wrapper to make it possible to compute this using BC. It is used when the environment variable "PERL6_EC_METHOD" is set to "BC". It's now about five times faster. Here is the bc code: Code: /* Title: Re: Bitcoin in Perl6 Post by: MatthewLM on June 06, 2012, 02:53:03 PM You should note when making the cryptography code that there are some irregularities with OpenSSL which is what bitcoin-qt uses and your code should be compatible with these irregularities. Discussed here: http://bitcoinstats.com/irc/bitcoin-dev/logs/2012/06/05/2#l3670669 It's possible that if you have a client that does not take care of these OpenSSL irregularities then particular public keys and maybe signatures in transactions would be accepted by OpenSSL but not your code. This means bitcoin-qt would accept the transactions as valid but your code wont.
I'm no expert on that though. |