Testing pseudo-currency "BTC"

90 views
Skip to first unread message

Bost

unread,
Apr 9, 2013, 9:52:34 AM4/9/13
to clojure-money
Can you please tell me what am I doing wrong? (Thx)

user=> (require '[clojurewerkz.money.currencies])
nil
user=> (clojurewerkz.money.currencies/pseudo-currency?
(clojurewerkz.money.currencies/of "XXX"))
true
user=> (clojurewerkz.money.currencies/pseudo-currency?
(clojurewerkz.money.currencies/of "BTC"))
IllegalCurrencyException Unknown currency 'BTC'
org.joda.money.CurrencyUnit.of (CurrencyUnit.java:213)

Michael Klishin

unread,
Apr 9, 2013, 1:50:32 PM4/9/13
to clojur...@googlegroups.com
2013/4/9 Bost <rostisla...@gmail.com>

IllegalCurrencyException Unknown currency 'BTC'
org.joda.money.CurrencyUnit.of (CurrencyUnit.java:213)

Bitcoin is not part of ISO-4217.

You need to add your own currency provider using Joda Time and Java interop.
--
MK

http://github.com/michaelklishin
http://twitter.com/michaelklishin

Rostislav Svoboda

unread,
Apr 10, 2013, 7:52:50 AM4/10/13
to clojur...@googlegroups.com
Joda Time and Java interop??? I did that in MoneyDataExtension.csv
Except that I found several errors in joda-money mostly revolving
around the concept of pseudo-currency.
Long story told short:
What makes my currency the only-true-one and yours just a pseudo-currency?
The only thing ISO-4217 says is: Currency FOO is standardised,
currency BAR is not standardised.
And the detection standardised/not standardised should not be based on
the count of decimal places of a given currency (rather on something
like being defined in MoneyData.csv/MoneyDataExtension.csv).

I need to talk about it with some joda-money devs. Anyway what do yo
think about that?

Bost
> --
> You received this message because you are subscribed to the Google Groups
> "clojure-money" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure-mone...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

Michael Klishin

unread,
Apr 10, 2013, 8:21:07 AM4/10/13
to clojur...@googlegroups.com

2013/4/10 Rostislav Svoboda <rostisla...@gmail.com>

What makes my currency the only-true-one and yours just a pseudo-currency?

Governments do. Welcome to the world of fiat currencies.
 
The only thing ISO-4217 says is: Currency FOO is standardised,
currency BAR is not standardised.
And the detection standardised/not standardised should not be based on
the count of decimal places of a given currency (rather on something
like being defined in MoneyData.csv/MoneyDataExtension.csv).


The specifics do not matter. There needs to be an indicator of sorts and most "electronic"
currencies don't have a fixed number of decimal places. So it's a good criteria to use.
 
I need to talk about it with some joda-money devs. Anyway what do yo
think about that?

I think that in the world where probably about 0.1% knows what Bitcoin is,
it is not a problem that Joda Money needs to worry about.

Rostislav Svoboda

unread,
Apr 10, 2013, 9:28:48 AM4/10/13
to clojure-money
>> What makes my currency the only-true-one and yours just a pseudo-currency?
>
> Governments do. Welcome to the world of fiat currencies.

Governments?
So we also need to consider the Governments of Syria, Libya, Zimbabwe etc. ?
And what about Somalia?

>> The only thing ISO-4217 says is: Currency FOO is standardised,
>> currency BAR is not standardised.
>> And the detection standardised/not standardised should not be based on
>> the count of decimal places of a given currency (rather on something
>> like being defined in MoneyData.csv/MoneyDataExtension.csv).
>>
>
> The specifics do not matter. There needs to be an indicator of sorts and
> most "electronic"
> currencies don't have a fixed number of decimal places. So it's a good
> criteria to use.

Do you realize that you're complecting a notion of "Number of decimal
places" with "Currency defined by ISO norm"?
http://www.infoq.com/presentations/Simple-Made-Easy

>> I need to talk about it with some joda-money devs. Anyway what do yo
>> think about that?
>
> I think that in the world where probably about 0.1% knows what Bitcoin is,
> it is not a problem that Joda Money needs to worry about.

Ah statistics... :)
I think that in the world where probably about 0.2% knows what Java is
and where about 20% of those know what Bitcoin is, IT IS a problem
that Joda Money needs to worry about.

Well, my original intention was to use clojurewerkz/money for my project.
And now I see I should think twice about that.

Bost

Michael Klishin

unread,
Apr 10, 2013, 10:22:14 AM4/10/13
to clojur...@googlegroups.com

2013/4/10 Rostislav Svoboda <rostisla...@gmail.com>

Do you realize that you're complecting a notion of "Number of decimal
places" with "Currency defined by ISO norm"?
http://www.infoq.com/presentations/Simple-Made-Easy


You are putting too much thought into this. The Clojure community should focus
less on decomplecting and more on writing quality libraries with documentation.
 
>> I need to talk about it with some joda-money devs. Anyway what do yo
>> think about that?
>
> I think that in the world where probably about 0.1% knows what Bitcoin is,
> it is not a problem that Joda Money needs to worry about.

Ah statistics... :)
I think that in the world where probably about 0.2% knows what Java is
and where about 20% of those know what Bitcoin is, IT IS a problem
that Joda Money needs to worry about.


This argument is a red herring. 100% of the world knows what fiat currencies are,
whether they have flaws or not. So Joda Money focuses on those.
 
Well, my original intention was to use clojurewerkz/money for my project.
And now I see I should think twice about that.

No problem. All it takes is adding a currency provider but I see that you would
rather debate what other people are complecting and how the current situation with
currencies and standards is broken instead of just doing that and using a pretty
decent library.
Reply all
Reply to author
Forward
0 new messages