1421
|
Bitcoin / Project Development / Re: Bitcoin.org Redesign (mockups inside)
|
on: March 12, 2011, 04:02:00 PM
|
How about using the bitcoin logo that use binary as the official logo? You can thanks skull88 for the logo. Did anybody bribe skull88 already to release this on public domain ? If not, we could make a bounty - i think it's worth it.
|
|
|
1423
|
Bitcoin / Development & Technical Discussion / Re: why JSON RPC values not use INT64 instead of float string?
|
on: March 11, 2011, 11:07:10 PM
|
OK, i have found the base for my allegations about dangers of using floats: Warning Floating point precision
Floating point numbers have limited precision. Although it depends on the system, PHP typically uses the IEEE 754 double precision format, which will give a maximum relative error due to rounding in the order of 1.11e-16. Non elementary arithmetic operations may give larger errors, and, of course, error progragation must be considered when several operations are compounded.
Additionally, rational numbers that are exactly representable as floating point numbers in base 10, like 0.1 or 0.7, do not have an exact representation as floating point numbers in base 2, which is used internally, no matter the size of the mantissa. Hence, they cannot be converted into their internal binary counterparts without a small loss of precision. This can lead to confusing results: for example, floor((0.1+0.7)*10) will usually return 7 instead of the expected 8, since the internal representation will be something like 7.9999999999999991118....
So never trust floating number results to the last digit, and never compare floating point numbers for equality. If higher precision is necessary, the arbitrary precision math functions and gmp functions are available.
If this doesn't shout "floats are bad", then i don't know what else to say about that. So everything i said was true. "Precision depends on the system". So it may be different on 32bit and 64bit systems, and perhaps even on windows / Linux / different types of Unix/BSD.
|
|
|
1425
|
Bitcoin / Development & Technical Discussion / Re: why JSON RPC values not use INT64 instead of float string?
|
on: March 11, 2011, 10:51:31 PM
|
Yeah those are integer values, var_dump(gmp_strval(gmp_div_q(gmp_init("5"), gmp_init("2")))); output: string(1) "2" Here's my solution, http://codepad.viper-7.com/tbZ9oD<?php
$quot = gmp_init("5"); $divis = gmp_init("2"); # number of decimals $precision = 2;
$shift = gmp_pow("10", $precision); $quot = gmp_mul($quot, $shift);
$res = gmp_div_q($quot, $divis); $repr = gmp_strval($res); $dotpos = strlen($repr) - $precision; $repr = substr($repr, 0, $dotpos) . "." . substr($repr, $dotpos);
echo "Number is $repr"; $res = gmp_init($repr);
Multiply the quotient by 10^p (p = precision), perform the integer division, convert to string, insert the decimal point, convert back to GMP. Can't you do everything of that iside GMP (resources) ? It will be much faster than operating on strings. Moving the decimal point should be also possible inside GMP.
|
|
|
1426
|
Bitcoin / Development & Technical Discussion / Re: why JSON RPC values not use INT64 instead of float string?
|
on: March 11, 2011, 10:12:47 PM
|
ShadowOfHarbringer: Do you know how to divide numbers in PHP GMP and obtain a decimal number (not quotient + remainder)?
Well it should be fairly easy using GMP, however i have never done that before. You will probably need to study usage of following functions: http://www.php.net/manual/en/function.gmp-init.phphttp://www.php.net/manual/en/function.gmp-div-q.phphttp://www.php.net/manual/en/function.gmp-strval.phpExample from PHP.net: <?php
$div1 = gmp_div_q("100", "5"); echo gmp_strval($div1) . "\n";
$div2 = gmp_div_q("1", "3"); echo gmp_strval($div2) . "\n";
$div3 = gmp_div_q("1", "3", GMP_ROUND_PLUSINF); echo gmp_strval($div3) . "\n";
$div4 = gmp_div_q("-1", "4", GMP_ROUND_PLUSINF); echo gmp_strval($div4) . "\n";
$div5 = gmp_div_q("-1", "4", GMP_ROUND_MINUSINF); echo gmp_strval($div5) . "\n";
And result:
|
|
|
1428
|
Bitcoin / Development & Technical Discussion / Re: why JSON RPC values not use INT64 instead of float string?
|
on: March 11, 2011, 09:19:46 PM
|
This is stubborness... Now I'm trying to integrate Bitcoin into a website but the JSON-RPC library only returns floats.
Why can't Bitcoin return strings?
+ 1 Floats are a royal pain in the ass. Every bank application programmer will probably tell you that. Especially RPC-like services should operate on strings - it makes a lot of stuff easier and allows infinite precision. According to the PHP manual: The size of a float is platform-dependent, although a maximum of ~1.8e308 with a precision of roughly 14 decimal digits is a common value (the 64 bit IEEE format).
For operations of extreme precision, PHP has many sets of mathematical libraries which also operate on strings, not floats. For example, BC-Math or GMP. http://php.net/manual/en/book.bc.phphttp://www.php.net/manual/en/book.gmp.php
|
|
|
1431
|
Bitcoin / Project Development / Re: Top reasons why bitcoin is awesome (or "killer feature list")
|
on: March 11, 2011, 05:24:19 PM
|
The ability to quickly easily send somebody some money when they need it, no matter where they are.
- I'm not restricted how I spend my Bitcoins. Governments make it really difficult to deposit money online to play poker. Poker is banned in Washington state, Turkey, Thailand. UK has a bunch of restrictions... France cannot play on international sites. Russia, India, and a bunch of other places it's illegal. - I've got friends in Iran. They contribute a lot to Free Software projects, but because of sanctions they find it impossible to pay for stuff they need web space .etc - I own the Bitcoins. Not in some place, but actually on my hard drive. - Coins are dividable to many decimal places. - I am my own master. I can be truly independent in a Bitcoin economy if such a thing exists. Right now it's impossible for me to boycott corruption. - Microtransactions. Will revolutionise the way artists/producers earn on the internet. Will really step up the game and improve the internet. - Anonymous (you say it isn't but with precaution it is). OK.... these don't strictly abide by the rules (one sentence, 24 words), but i will try to correct them a little for placement on the list...
|
|
|
1432
|
Bitcoin / Project Development / Top reasons why bitcoin is awesome (or "killer feature list")
|
on: March 11, 2011, 01:08:55 PM
|
I just had an idea to write down all "killer-features" of Bitcoin in one place, so it can be used later to advertise it, or convince people to use Bitcoin. Rules: Every "feature" has to be a sentence and have max 24 words in it. - 1. Governments cannot control Bitcoin.
- 2. Using Bitcoin, you can earn money by keeping them in a safe.
- 3. With Bitcoin, you are your own bank.
- 4. No one (and no government) can tax Bitcoin users using inflation.
- 5. With Bitcoin, tomorrow's pizza will always cost less than today's pizza.
- 6. Thanks to Bitcoin, for the first time in history you can have monetary value without any government stealing it from you. [by noagendamarket].
- 7. Using Bitcoin, you don't have to trust any middlemen when transfering money.
- 8. Bitcoin protects you from instability caused by central banks.
- 9. Bitcoin is an open-source project and everything about it is transparent, so you can easily audit it & trust it.
- 10. Bitcoin allows cheap and easy international funds transfers [by ColdHardMetal].
- 11. With Bitcoins, you don't need to pay commissions for transactions [by mico]
- 12. The Bitcoin payment network never has downtime [by mndrix]
- 13. Bitcoin payments are not subject to fraudulent chargebacks [by mndrix]
- 14. With Bitcoins, nobody can restrict you in the way you want to spend your money. [by genjix]
- 15. Using Bitcoins, you can send money to anybody in any country without any border limitations. [by genjix]
- 16. With Bitcoin, money you own are only yours and are stored on your computer, nobody else owns or keeps them. [by genjix]
- 17. Using Bitcoin, you are your own master and you can be truly independent. [by genjix]
- 18. Bitcoin revolutionizes the way artists/producers can earn on the internet by allowing cheap & easy microtransactions. [by genjix]
- 19. Bitcoin gives you the ability to easily send somebody some money when they need it, no matter where they are. [by theGECK]
- 20. Bitcoin just works [by vladimir]
- 21. Using Bitcoin, you can make fully autonomous payment handling code with zero-dependency on third-party APIs. [by forever-d]
- 22. Bitcoin makes it possible to become rich without becoming famous. [by forever-d]
- 23. The divorce lawyer may take your house, but he will never get his hands on your Bitcoins.[by forever-d]
- 24. You don't have to trust Bitcoin, because you can verify it yourself. [by forever-d]
- 25. Your Bitcoins won't be gone once you get out of prison. [by forever-d]
- 26. Bitcoin makes banks useless. [by grondilu]
- 27. The price of a bitcoin is the price of freedom. [by Sedo]
- 28. Bitcoin is the 2.0 version of gold standard. [by nofuture]
- 29. Bitcoin could be the next forex market [by johnieeliang]
------------- Please write down new ideas in replies, i will add them to the list. In a month, I will make a multi-selection poll to choose the best ones.
|
|
|
1434
|
Bitcoin / Project Development / Re: Bounty for Bitcoin Animated Movie [13622.05 BTC ($2520) and growing]
|
on: March 10, 2011, 10:29:05 PM
|
Guys, thanks, but let me emphasize that I'm posting these status updates for fun mostly and because publicly announced deadlines help me keep people motivated. Please reserve your judgement positive or negative until you see the final product. Next status update on Monday. I hope you understand the technical side perfectly, because without that it would be difficult to create anything that explains bitcoin in an intuitive, easy way.
|
|
|
1435
|
Economy / Marketplace / Re: Gas Molecules from the dying breath of Caesar
|
on: March 10, 2011, 04:51:59 PM
|
Not had a chance to see the film yet, but that'll be quite interesting. Richard Dawkins, in The God Delusion, argues that a case for Jesus' non-existence could be made, although Dawkins personally believes Jesus did exist. Personally, I think existence/non-existence of Jesus is, for atheists and agnostics, as irrelevant as theists arguing over the esoteric arcana that seems to divide different churches. http://en.wikipedia.org/wiki/Historical_Jesus
|
|
|
1437
|
Economy / Economics / Re: WTH? why a sudden drop by 10 cents?
|
on: March 10, 2011, 07:30:23 AM
|
Depends on the weakness.
- If this is a critical design-related weakness, it may even destroy the currency (but i don't think something like this exists, BTC has been on for 2 years and everything looks perfect) - If this is a serious weakness, it may reverse the expansion for some time. - Smaller weaknesses will only slow down the expansion.
That's not what I asked. My point is, it's perfectly possible for Bitcoin never to gain sufficient critical mass to remain viable and for the economy to slowly grind to a halt, without any technical flaws at all. OK, i re-read your post and i understood what you were asking about. Yes, i think that technical weakness is the only thing that can stop/slow down Bitcoin in the long term. Bitcoin is ultimately superior to all existing currencies, so it's completely natural that it will replace them sooner or later. Or perhaps other currencies will be backed in Bitcoin. Of course, there will be clones, but the original one will always rule.
|
|
|
1440
|
Bitcoin / Bitcoin Discussion / Re: I solved 7 blocks yesterday
|
on: March 09, 2011, 03:22:48 PM
|
...
You assume that the software random generator has enough entropy, but it does not. That is only pseudo-random, and that's why i was saying that transactions add more randomness by adding more entropy to the pool. I disagree, for this purpose the PRNG doesn't need a lot of entropy to be in practice indistinguishable from truly random. This can be verified by experiment - generate for a test block chain with no transactions, and see if any deviation from randomness can be found. Has such experiment been ever done by anybody ? Just in case this question is directed to me, I didn't mean to suggest I know of the experiment having been made, only that I have little doubt what its results would be. I am also interested to know if someone already did it. Truecrypt did experiments on their alrogithms, and the result was around 70% entropy. I seriously doubt that any no-human-interaction algorithm can do much better.
|
|
|
|