Bitcoin Forum
April 28, 2024, 02:08:53 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
  Home Help Search Login Register More  
  Show Posts
Pages: « 1 ... 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 [72] 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 »
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.
1422  Bitcoin / Development & Technical Discussion / Re: why JSON RPC values not use INT64 instead of float string? on: March 11, 2011, 11:15:04 PM
GMP is an integer only library,

http://codepad.viper-7.com/pj58SK

You can still use bcmath, may be faster than working strings:

http://www.php.net/manual/en/book.bc.php

Also, somebody on the forums told me that there are many other libraries supporting arbitrary precision mathematics for PHP, but i don't know them myself because i never needed that.
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.
1424  Bitcoin / Development & Technical Discussion / Re: why JSON RPC values not use INT64 instead of float string? on: March 11, 2011, 10:59:19 PM
You can do everything in GMP except decode the JSON, which is what I think OP was complaining about.

This is a misunderstanding.
I only meant do the calculations in GMP, and only convert from/to string on input/output .

GMP is an integer only library,

http://codepad.viper-7.com/pj58SK

Ah sorry then, my mistake.
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
Code:
<?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($repr0$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.php
http://www.php.net/manual/en/function.gmp-div-q.php
http://www.php.net/manual/en/function.gmp-strval.php

Example from PHP.net:

Code:
<?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:

Code:
20
0
1
0
-1
1427  Bitcoin / Development & Technical Discussion / Re: why JSON RPC values not use INT64 instead of float string? on: March 11, 2011, 09:33:09 PM
One more thing:

Additionally I think that in PHP, result of float <-> integer calculations may differ on 32Bit & 64Bit platforms, however i may be wrong (and I am too lazy to check with Google).

There may be some bugs or php-specific "features" involved.
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:
Quote
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.php
http://www.php.net/manual/en/book.gmp.php
1429  Bitcoin / Project Development / Re: Top reasons why bitcoin is awesome (or "killer feature list") on: March 11, 2011, 06:04:26 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.

  Like, for use in the bitcoin.org redesign?
  http://bitcointalk.org/index.php?topic=4223.0

Well, i didn't think of it, but sure - why not.
It's a great idea.

Of course if Gavin and Sirius approve.
1430  Bitcoin / Project Development / Re: Top reasons why bitcoin is awesome (or "killer feature list") on: March 11, 2011, 05:31:02 PM
Bitcoin works.

That doesn't look like a "killer" Wink to me.
Are you sure you want me to add it to the list ?
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.
1433  Economy / Economics / Re: WTH? why a sudden drop by 10 cents? on: March 11, 2011, 12:50:12 PM
Bitcoin is the first time in my life I've had monetary value and no government is stealing it from me.

That is all.

+10

Government can even make[1] fake[2] gold[3], but it cannot mine fake bitcoins.

Bitcoin FTW.
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.  Smiley

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
You are probably not aware that Jesus did not actually exist:

http://www.youtube.com/watch?v=MFsmmMTMCHU
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
1436  Economy / Marketplace / [SCAM WARNING] [SCAM WARNING] [SCAM WARNING] [SCAM WARNING] [SCAM WARNING] on: March 10, 2011, 01:41:43 PM
Using the same email address on different scams/different places ?
For a scammer, he is not a very smart one...

Well, if he would be, he would also learn better english before trying scams. Fool.

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.
1438  Bitcoin / Bitcoin Discussion / Bigger "B" versions of Bitcoin logotypes [Fixed - working image server] on: March 09, 2011, 08:06:42 PM
Hello,

These are bigger "B" versions (done by me) of bitboy's BTC logotypes licensed on public domain.

Links from the old thread stopped working because they were supposed to be freely-downloadable, but somebody (not me) mistakenly placed them behind a paywall instead.


This work is in the Public Domain.

(Only the biggest one is a little blurred, because at the time i lacked a SVG version to stretch it to any resolution, the others are OK)

Enjoy. Also, please do not hotlink as this is my private site.
Please right-click & select "save picture as" or something.

If you like them, don't hesitate to donate a small amount of BTC to 1LZUUGcEPZiiTLvEtqT3MXgcojGMZuNq1w, or to original author's address.

















EDIT:





----------
The original thread with "smaller B" versions of the logotypes by bitboy is here:
http://bitcointalk.org/index.php?topic=1631.0
1439  Bitcoin / Bitcoin Discussion / Re: Thought Experiment: Is Bitcoin a Ponzi scheme? on: March 09, 2011, 05:11:52 PM
Economists say always a bunch of garbage, Austrian included.

Well, the "garbage" of austrian economists is many orders of magnitude closer to reality than the garbage of "standard" economists and/or keynesists.
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.
Pages: « 1 ... 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 [72] 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 »
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!