Gold collapsing. Bitcoin UP.

Richy_T

Well-Known Member
Dec 27, 2015
1,085
2,741
core went full @Putin, and now they won't be able to put the genie back in the bottle . . . o dear, dear.
It's like the blockchain itself. The longer they keep going, the harder it is to roll back their position.
[doublepost=1514101981][/doublepost]
this guy really thinks he is singlehandedly steering the bitcoin economy. delusional egomania.
Gregomania
[doublepost=1514102317,1514101600][/doublepost]
Came across this gem while doing a search to make sure that I wasn't the only one who thinks that whoever used floating point in the bitcoind RPC deserves to burn at the stake.

https://bitcointalk.org/index.php?topic=13837.msg754860#msg754860
It's probably a fairly reasonable argument that the 8 decimal places are arbitrary and might change at any time. Thus you need to specify as a whole number of bitcoin and a fraction of a bitcoin. The trick is not to think of it as a float but as two integers with float-like notation.
[doublepost=1514102506][/doublepost]
The Bitcoin Core mailing list is now discussing the viability of price fixing to solve the problem created by their production quota.

https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2017-December/015463.html

Nobody could have seen this coming.
I maybe should go back and find the pictures of the Russian bread lines I posted a couple of years ago (though they were just what turned up first on a Google image search).
 

Justus Ranvier

Active Member
Aug 28, 2015
875
3,746
The trick is not to think of it as a float but as two integers with float-like notation.
You've just made a parallel argument for why returning that value as a float is brain-damaged.

Standard json parsing libraries do not have provisions for treating floats as "actually two integers with float-like notation" a.k.a a string.

Standard json rpc libraries built on top of standard json parsing libraries do not have provisions for overriding the lower level library.

It's a catastrophe that anyone who had to write software that talks to any blockchain daemon that inherited the bitcoind rpc gets to experience.
 
  • Like
Reactions: throwaway

Richy_T

Well-Known Member
Dec 27, 2015
1,085
2,741
A reasonable argument. Though they do have string processing functions (I have had to deal with the same myself with a Python app that went nowhere). It is not complex. Split on the decimal point, then add enough zeroes to the fractional part to make it 8 digits then atoi() or equivalent are your friends.

So given that, how would *you* have the RPC interface return say 1.5BTC and what then if we move the smallest division another couple of decimal places? Satoshi may have used integers everywhere but that was an *internal* representation. (The wallet also displays BTC value as floating point).
 
Last edited:

Richy_T

Well-Known Member
Dec 27, 2015
1,085
2,741
"1.5" is a string ;)

You can't return it as an integer as there is no valid integer representation of that. You could return the number of Satoshi as an integer but again, move the decimal places (as is allowed and expected) and suddenly you have to start returning fractional Satoshi or come up with some more complex scheme to encode the fractions (which could change again in a year or five).

The truth is that "1.5" is an accurate representation of the value and thus is what should be used as the external representation of the value (barring that you don't want to express it differently for display purposes like mBTC or Satoshi). If it was in the spec that it was not extensible beyond the limit of the Satoshi then an integer-only representation would be acceptable and desirable but it *is* explicitly extensible so floating point representation it is. Any way you come up with to deal with this is just another way of expressing the decimal point.

The weakness of the libraries available to you is not a valid reason to do it wrong :)
 
Last edited:
  • Like
Reactions: Norway and Dusty

theZerg

Moderator
Staff member
Aug 28, 2015
1,012
2,327
You've just made a parallel argument for why returning that value as a float is brain-damaged.

Standard json parsing libraries do not have provisions for treating floats as "actually two integers with float-like notation" a.k.a a string.

Standard json rpc libraries built on top of standard json parsing libraries do not have provisions for overriding the lower level library.

It's a catastrophe that anyone who had to write software that talks to any blockchain daemon that inherited the bitcoind rpc gets to experience.
What apis in particular are giving you problems? I'd be happy to provide satoshi modes for them.
 

solex

Moderator
Staff member
Aug 22, 2015
1,558
4,693
Must be the time of year. The small-blocker Core Dev mind-set is absolutely clear:


1) Bitcoin was broken when we found it and it has to be fixed with off-chain, 2nd-layer solutions. (The bonus is that this will ensure our place in history).
2) Focus on the whole future at once. Bitcoin must be fixed for centuries. (Bonus is our place in history will be revered for centuries).

What they can't see is that just a few years: 2016,17,18,19, are vitally important. These are the years which will choose the winners and losers in cryptocurrency - quite possibly those which will have network effect inertia lasting for centuries.

BTC's share of coinmarketcap is at 44% and falling. How low can it go in the next few years. Has it reached the point of no-return already?
 

79b79aa8

Well-Known Member
Sep 22, 2015
1,031
3,440
this is not about faith. especially not in an incompetent bunch.

bitcoin rests on a masterfully balanced set of incentives, built upon the single assumption of rational choice. it leaves nothing to faith. keep that unsullied for graver concerns.

going out on a limb with a prediction*: 2018 will see the launch of the first bitcoin ETF. the underlying asset will be BCH (the bitcoin branch with the settled tech).

*not unhappy so far with my nov. 29 call.
 

Justus Ranvier

Active Member
Aug 28, 2015
875
3,746
The weakness of the libraries available to you is not a valid reason to do it wrong :)
Using a float to represent an amount of currency is always "doing it wrong" because it invokes undefined behavior between different platforms.
[doublepost=1514152111,1514151134][/doublepost]
What apis in particular are giving you problems? I'd be happy to provide satoshi modes for them.
The two I use most often are listsinceblock and gettransaction. If those methods returned a field called "satoshis" (or maybe something more generic like "units" if you wanted to encourage other currencies to pick up the convention) it would help. Ideally any json object that include an "amount" field should have it.
 

Richy_T

Well-Known Member
Dec 27, 2015
1,085
2,741
Using a float to represent an amount of currency is always "doing it wrong" because it invokes undefined behavior between different platforms.
Only if you use tools inappropriate to the job. Just because money is represented as a floating point number and you have something called a float in your language of choice does not mean it is appropriate to use one to manipulate the other. Particularly in the realm of OO languages. Many languages have classes designed specifically for this situation. This is DEV-201 along with not making assumptions about dates.

These things were true (for traditional fiat currencies) even before Bitcoin was a gleam in Satoshi's eye and there is even less excuse for getting it wrong now as libraries have improved over the years. There are libraries specifically designed for handling money types (or the bigger class of needs this applies to). Perl has Math::BigFloat, for example which I have recently been using for calculating fees via the API.

Math::BigFloat provides support for arbitrary precision floating point. Overloading is also provided for Perl operators.
 
Last edited:
  • Like
Reactions: Norway and Dusty

solex

Moderator
Staff member
Aug 22, 2015
1,558
4,693
A [Short] Christmas Tale

-: The book of Crypto Currency :-

Locked away by his own hand in a tower above Constantinople, overlooking the sparkling blue waters of the Bosphorus, was the mad monk Adbul Alhazred. Not that he ever looked out the window, as his head was down, shaking his matted black hair to and fro, as he feverishly crafted, embellished and poured forth the fabled Necronomicon. No one knows for sure when and how he achieved the feat, but when it was finally done Alhazred fainted; a man broken by his labours.

In his spare time, though it is hard to imagine he had any spare time, after trawling all the occult texts since the days of Hermes Trismegistus, he dabbled in mathematics and cryptography, and knowing the weaknesses of greed and fear in the hearts of men and women, he understood incentive systems all too well.

Those scraps of paper were left lying around, to be swept up many years after his death by the servants of the keeper of the guards of the Great Sultan's mightiest general. Somehow the scraps found themselves into a curio shop in the back alleys of the city (now known as Istanbul) where they were bought by a young traveller from the West on his grand tour through the European centres of culture.

That traveller was a student of the Irish mathematician William Hamilton, inventor of quaternions. The student, whose name is mysteriously lost today, was the first to understand Alhazred's mad scrawlings since the time they were penned. He compiled the fragments, filled in the gaps and anonymously published his tome Crypto Currency on December 25th, 1850.

Only two copies are known to exist, one of which was reportedly last seen in the vast library of Satoshi Nakamoto, which fills the magma chamber of an extinct volcano of an island somewhere in the Sea of Japan. The second copy has finally been found, and is about to be enjoyed with a glass or two of 1850 port.

Merry Christmas!

 

BldSwtTrs

Active Member
Sep 10, 2015
196
583
Must be the time of year. The small-blocker Core Dev mind-set is absolutely clear:


1) Bitcoin was broken when we found it and it has to be fixed with off-chain, 2nd-layer solutions. (The bonus is that this will ensure our place in history).
2) Focus on the whole future at once. Bitcoin must be fixed for centuries. (Bonus is our place in history will be revered for centuries).

What they can't see is that just a few years: 2016,17,18,19, are vitally important. These are the years which will choose the winners and losers in cryptocurrency - quite possibly those which will have network effect inertia lasting for centuries.

BTC's share of coinmarketcap is at 44% and falling. How low can it go in the next few years. Has it reached the point of no-return already?
At this point I think there is a very high probability there will be some kind of flippenning or cashening in 2018.

The question is: will BTC be able to ever retake the first rank? I don't think so, the only shot at it would be if Lightning deliver on all its promise but I assign that a very low probability.

Short BTC. Long BCH, ETH and XMR.

One fundamental lesson we should learn from the incoming failure of BTC is this: people are stupid.
A 5 minutes discussion with the average bitcoiner make you understand why governments managed to pull the Central Banks scam in the first place: because people are so damn stupid and easily manipulable. Even high IQ people lake the humility which would prevent them from being stupid. They are only good at hating men telling the truth and building fortresses of mental delusion preventing their false beliefs to be challenged. Stupid people deserved to get poorer.
 
Last edited:

torusJKL

Active Member
Nov 30, 2016
497
1,156
Unfortunately, the cypherpunks who took over after Satoshi left decided to stick the well-meaning volunteers (themselves) back into the design, as a layer between users and miners, in an attempt to keep control over the network. That obviously broke Satoshi's solution, by negating the very idea that made it work.
I wonder if jstolfi will accept Bitcoin Cash as not being a failure once the idea of full-non-mining nodes for every user has been finally debunked and only miners and big businesses will run them.
 

Zangelbert Bingledack

Well-Known Member
Aug 29, 2015
1,485
5,585
This guy is learning fast. He is nailing the big picture with very few inaccuracies anymore, putting it in layman's terms. Even covers full nodes properly and explains how this interplays with Segwit in the Blockstream business plan, a point not often made and that I had sort of forgotten myself.