Bitcoin Forum
April 26, 2024, 08:07:24 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Poll
Question: Should Bitcoin: URIs use low-level or high-level units?
Low-level - 15 (46.9%)
High-level - 17 (53.1%)
Total Voters: 32

Pages: [1] 2 »  All
  Print  
Author Topic: [POLL 1/3] Bitcoin: URI refactor? Low-level vs high-level  (Read 3889 times)
Luke-Jr (OP)
Legendary
*
expert
Offline Offline

Activity: 2576
Merit: 1186



View Profile
April 21, 2011, 01:26:02 AM
Last edit: April 21, 2011, 03:17:01 PM by Luke-Jr
 #1

Should Bitcoin: URIs use low-level or high-level units?

If you want to request/bill for 1 BTC, you (or your shopping cart) would write:
  • Low-level: bitcoin:youraddress?amount=100000000
  • High-level: bitcoin:youraddress?amount=1

If you want to request/bill for 1 mBTC (milli-BTC), you (or your shopping cart) would write:
  • Low-level: bitcoin:youraddress?amount=100000
  • High-level: bitcoin:youraddress?amount=0.001

If you want to request/bill for 1 TBC (TonalBitcoin), you (or your shopping cart) would write:
  • Low-level: bitcoin:youraddress?amount=65536
  • High-level (without hexadecimal support): bitcoin:youraddress?amount=0.00065536
  • High-level (with hexadecimal support): bitcoin:youraddress?amount=x1

If you want to request/bill for 1 ᵐTBC (mill-TonalBitcoin), you (or your shopping cart) would write:
  • Low-level: bitcoin:youraddress?amount=268435456
  • High-level (without hexadecimal support): bitcoin:youraddress?amount=2.68435456
  • High-level (with hexadecimal support): bitcoin:youraddress?amount=x1000

Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714118844
Hero Member
*
Offline Offline

Posts: 1714118844

View Profile Personal Message (Offline)

Ignore
1714118844
Reply with quote  #2

1714118844
Report to moderator
1714118844
Hero Member
*
Offline Offline

Posts: 1714118844

View Profile Personal Message (Offline)

Ignore
1714118844
Reply with quote  #2

1714118844
Report to moderator
1714118844
Hero Member
*
Offline Offline

Posts: 1714118844

View Profile Personal Message (Offline)

Ignore
1714118844
Reply with quote  #2

1714118844
Report to moderator
Garrett Burgwardt
Sr. Member
****
Offline Offline

Activity: 406
Merit: 256


View Profile
April 21, 2011, 03:13:50 AM
 #2

Now you see, this is an unbiased poll Wink

Low level, because then any interface made by community members can convert to whatever other unit rather easily.

As a side note, decimal over tonal, because most people know decimal and likely it will be around longer than this tonal business (yes yes, I know you hope that changes). If by some miracle tonal becomes prominent, the code can always be changed later, but in 20 years people aren't going to want to lookup tonal to decimal conversions and deal with odd characters (your post displays several square "missing character" symbols for me in Opera 11.10 (which is odd, this only recently started happening).
[Tycho]
Hero Member
*****
Offline Offline

Activity: 742
Merit: 500



View Profile WWW
April 21, 2011, 03:20:32 AM
 #3

I see squares too.

Welcome to my bitcoin mining pool: https://deepbit.net - Both payment schemes (including PPS), instant payout, no invalid blocks !
ICBIT Trading platform : USD/BTC futures trading, Bitcoin difficulty futures (NEW!). Third year in bitcoin business.
Garrett Burgwardt
Sr. Member
****
Offline Offline

Activity: 406
Merit: 256


View Profile
April 21, 2011, 03:24:29 AM
 #4

In fact, I just went through every possible encoding scheme for this page - none of them show actual characters in place of the squares.
Luke-Jr (OP)
Legendary
*
expert
Offline Offline

Activity: 2576
Merit: 1186



View Profile
April 21, 2011, 03:28:54 AM
 #5

In fact, I just went through every possible encoding scheme for this page - none of them show actual characters in place of the squares.
More likely a font problem than encoding.

Insti
Sr. Member
****
Offline Offline

Activity: 294
Merit: 252


Firstbits: 1duzy


View Profile
April 21, 2011, 06:33:07 AM
 #6

Should Bitcoin: URIs use low-level or high-level units?

Low-level unit examples (favours software):
  • 100000000 = 1 BTC = 55.1 TBC
  • 268435456 = 2.68435456 BTC = 1 ᵐTBC
  • 100000 = 1 mBTC = 1.869 TBC
  • 65536 = 0.00065536 BTC = 1 TBC

High-level unit examples (favours humans):
  • 1 = 1 BTC = 55.1 TBC
  • x1000 = 2.68435456 BTC = 1 ᵐTBC
  • 0.001 = 1 mBTC = 1.869 TBC
  • x1 = 0.00065536 BTC = 1 TBC


I don't understand the poll question.
Particularly the high level unit examples.

is the '=' sign being used inappropriately?
Matt Corallo
Hero Member
*****
expert
Offline Offline

Activity: 755
Merit: 515


View Profile
April 21, 2011, 09:53:53 AM
 #7

I don't understand the poll question.
Particularly the high level unit examples.

is the '=' sign being used inappropriately?
The question is how should things be represented in bitcoin: URIs.  Should people have to write
bitcoin:address?amount=100000000 for 1 BTC (Low-level) or
bitcoin:address?amount=1 for 1 BTC (High-Level)

Bitcoin Core, rust-lightning, http://bitcoinfibre.org etc.
PGP ID: 07DF 3E57 A548 CCFB 7530  7091 89BB B866 3E2E65CE
Insti
Sr. Member
****
Offline Offline

Activity: 294
Merit: 252


Firstbits: 1duzy


View Profile
April 21, 2011, 03:56:47 PM
 #8

Why does anyone think low level is a good idea? you're going to spend  all your time having to add 'redundant' zeros. I guess this is discussed at length elsewhere...
xf2_org
Member
**
Offline Offline

Activity: 98
Merit: 13


View Profile
April 21, 2011, 04:41:54 PM
 #9

Why does anyone think low level is a good idea? you're going to spend  all your time having to add 'redundant' zeros. I guess this is discussed at length elsewhere...

Computer geeks think like computer geeks, I suppose Smiley

I strongly urge the adoption of human-friendly conventions of which everyone is already familiar:  50.00 BTC, 0.01 BTC, etc.  These are already in wide use on websites and in software, both bitcoin and non-bitcoin (such as paypal's API).

Matt Corallo
Hero Member
*****
expert
Offline Offline

Activity: 755
Merit: 515


View Profile
April 21, 2011, 04:42:28 PM
 #10

Why does anyone think low level is a good idea? you're going to spend  all your time having to add 'redundant' zeros. I guess this is discussed at length elsewhere...
Not sure, every discussion I've ever seen on the topic came to the conclusion that high-level is better.

Bitcoin Core, rust-lightning, http://bitcoinfibre.org etc.
PGP ID: 07DF 3E57 A548 CCFB 7530  7091 89BB B866 3E2E65CE
BitterTea
Sr. Member
****
Offline Offline

Activity: 294
Merit: 250



View Profile
April 21, 2011, 05:47:37 PM
 #11

Why does anyone think low level is a good idea? you're going to spend  all your time having to add 'redundant' zeros. I guess this is discussed at length elsewhere...
Not sure, every discussion I've ever seen on the topic came to the conclusion that high-level is better.

For small amounts (like will most likely be used in the future if Bitcoin becomes widely adopted), it's perhaps easier to use the low level format. What's easier to write and think about, 0.000001 Bitcoins or 1000 Satoshis/base units?

In general, high level is better for numbers intended for human use, whereas I think low level is better for numbers intended for computer use. A URI is kind of a mix between the two, as a human creates the link, a human clicks on it, but a computer parses the data.
HostFat
Staff
Legendary
*
Offline Offline

Activity: 4214
Merit: 1203


I support freedom of choice


View Profile WWW
April 21, 2011, 05:56:10 PM
 #12

What do you think about these example? Cheesy

bitcoin:address?type=low&amount=1
bitcoin:address?type=high&amount=x1

Simple: it's possible to put the type of URI.
It can also be chose to use "low" by "default".
If nothing is specified, then it's low Smiley

So everyone is happy.
This will help also to understand which one will be used more on next months/years.

NON DO ASSISTENZA PRIVATA - http://hostfatmind.com
Matt Corallo
Hero Member
*****
expert
Offline Offline

Activity: 755
Merit: 515


View Profile
April 21, 2011, 05:59:19 PM
 #13

What do you think about these example? Cheesy

bitcoin:address?type=low&amount=1
bitcoin:address?type=high&amount=x1

Simple: it's possible to put the type of URI.
It can also be chose to use "low" by "default".
If nothing is specified, then it's low Smiley

So everyone is happy.
This will help also to understand which one will be used more on next months/years.
I think that far overcomplicates it.

In general, high level is better for numbers intended for human use, whereas I think low level is better for numbers intended for computer use. A URI is kind of a mix between the two, as a human creates the link, a human clicks on it, but a computer parses the data.
So true.  However, I think we should fall back on human.  Its just as easy for the computer to do either (even if one is ideal), but its not as easy for a human to convert to base units. 

Bitcoin Core, rust-lightning, http://bitcoinfibre.org etc.
PGP ID: 07DF 3E57 A548 CCFB 7530  7091 89BB B866 3E2E65CE
BitterTea
Sr. Member
****
Offline Offline

Activity: 294
Merit: 250



View Profile
April 21, 2011, 06:08:22 PM
 #14

Well, if we're defaulting to decimal, will this be a problem?

User in Europe creates a bitcoin: link for two and a half BTC. They may enter this as "bitcoin:...?amount=2,5".

User in USA clicks this link. Depending on their regional settings and the programming language of the parsing application, "2,5" may not be the same as "two and a half".
Matt Corallo
Hero Member
*****
expert
Offline Offline

Activity: 755
Merit: 515


View Profile
April 21, 2011, 06:15:00 PM
 #15

Well, if we're defaulting to decimal, will this be a problem?

User in Europe creates a bitcoin: link for two and a half BTC. They may enter this as "bitcoin:...?amount=2,5".

User in USA clicks this link. Depending on their regional settings and the programming language of the parsing application, "2,5" may not be the same as "two and a half".
That has been handled by so many programs fairly well over the years, I don't think that is a problem any more.

Bitcoin Core, rust-lightning, http://bitcoinfibre.org etc.
PGP ID: 07DF 3E57 A548 CCFB 7530  7091 89BB B866 3E2E65CE
BitterTea
Sr. Member
****
Offline Offline

Activity: 294
Merit: 250



View Profile
April 21, 2011, 06:24:02 PM
 #16

That has been handled by so many programs fairly well over the years, I don't think that is a problem any more.

C#, en-US localization...

decimal.Parse("1,2")
-> 12
Matt Corallo
Hero Member
*****
expert
Offline Offline

Activity: 755
Merit: 515


View Profile
April 21, 2011, 06:26:22 PM
 #17

That has been handled by so many programs fairly well over the years, I don't think that is a problem any more.

C#, en-US localization...

decimal.Parse("1,2")
-> 12
So don't use C# decimal.Parse?

Bitcoin Core, rust-lightning, http://bitcoinfibre.org etc.
PGP ID: 07DF 3E57 A548 CCFB 7530  7091 89BB B866 3E2E65CE
Matt Corallo
Hero Member
*****
expert
Offline Offline

Activity: 755
Merit: 515


View Profile
April 21, 2011, 07:04:49 PM
 #18

I'm with Jgarzik on this one. Make it human readable. Not computer readable, not tonal geek readable, human readable and even human writeable. Take a hint from ed2k URI's.

And one question... why would you want variable names in URI when there are like two variables?

http://subdomain=www&domain=example&tld=com/   this is what you are proposing.

bitcoin://0.01/1zdsffssdfsfsdfsfdsdf - that's how should it look like
The problem with that is you can specify any of the variables but don't have to specify and standard set.  I might not want to specify amount, but want to specify my name, or maybe the other way around.  Plus it makes them more human readable.

Bitcoin Core, rust-lightning, http://bitcoinfibre.org etc.
PGP ID: 07DF 3E57 A548 CCFB 7530  7091 89BB B866 3E2E65CE
BitterTea
Sr. Member
****
Offline Offline

Activity: 294
Merit: 250



View Profile
April 21, 2011, 07:07:52 PM
 #19

I'm with Jgarzik on this one. Make it human readable. Not computer readable, not tonal geek readable, human readable

When did Jgarzik say this? It seems to me that he just does not like Luke pushing tonal.

You're not understanding that the URI being human readable has little purpose, but it definitely has to be computer readable. How else do you propose that Bitcoin (or whatever software) parse it?
Matt Corallo
Hero Member
*****
expert
Offline Offline

Activity: 755
Merit: 515


View Profile
April 21, 2011, 07:20:18 PM
 #20

When did Jgarzik say this? It seems to me that he just does not like Luke pushing tonal.
On IRC, plus here:
I strongly urge the adoption of human-friendly conventions of which everyone is already familiar:  50.00 BTC, 0.01 BTC, etc.  These are already in wide use on websites and in software, both bitcoin and non-bitcoin (such as paypal's API).

You're not understanding that the URI being human readable has little purpose, but it definitely has to be computer readable. How else do you propose that Bitcoin (or whatever software) parse it?
Completely disagree.  It is easy for a program to read a human readable number (there is already a function in util.cpp).  But its a URL, many, many people will be writing them in Forum sigs, websites, etc. 

Bitcoin Core, rust-lightning, http://bitcoinfibre.org etc.
PGP ID: 07DF 3E57 A548 CCFB 7530  7091 89BB B866 3E2E65CE
Pages: [1] 2 »  All
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!