Re: [Pharo-users] How to subclass Float class

2015-01-11 Thread stepharo
Hilaire what is your requirement? Stef Le 10/1/15 22:52, Hilaire a écrit : It looks like when I want to create a subclass of Float, I have this odd class creation message. Moreoever, I can add instance variable to this new class: when compiling there are wipe out: argument instanceVariableName

Re: [Pharo-users] Problem due to deprecation of class Url in Pharo 3 and Moose 5.0

2015-01-11 Thread stepharo
Yes change the code of the Parser not to use old code. As I pointed out, the Parser is a large and complex package, and I am not the author, so this is easier said than done. I'm dealing daily with code having the same characteristics. It seems a bit odd to dismiss code which worked OK in Mo

Re: [Pharo-users] How to subclass Float class

2015-01-11 Thread Hilaire
Le 11/01/2015 09:06, stepharo a écrit : > Hilaire > > what is your requirement? > > Stef I want to create a currency object, basically a Float with an attribute to specify the currency unit. Hilaire -- Dr. Geo - http://drgeo.eu iStoa - http://istoa.drgeo.eu

Re: [Pharo-users] How to subclass Float class

2015-01-11 Thread Joachim Tuchel
Hilaire, unless you have very (very very) specific needs, I would strongly discourage you to use Float for anything related to Money or Percentages. We use a subclass of Object for MonetaryAmounts and implemented most of the protocol of Magnitude. But, most importantly, the amount instVar is

Re: [Pharo-users] How to subclass Float class

2015-01-11 Thread Joachim Tuchel
Ah, I just saw on second reading that you want to implement something for currency exchange rates, not MonetaryAmounts. Still, don't use Float, use ScaledDecimal or FixedPoint and make sure it NEVER contains a Float. You'll get into all kinds of strange problems, starting with Imports from data

Re: [Pharo-users] How to subclass Float class

2015-01-11 Thread Joachim Tuchel
There are more arguments against Subclassing any Number class: Exchange rates are two-way most of the times. It is not only USD->EUR, but also the other way round. This is not the responsibilty of a number. For more information, I recommend Martin Fowler's Analysis Patterns book (old, but not

Re: [Pharo-users] How to subclass Float class

2015-01-11 Thread Hilaire
Joachim, Thanks for the tips. I saw the Unit package was following the same pattern you are describing. My first though was to use ScaledDecimal, but I discovered it is pretty slow with computation (amortization schedule, search for rate) but there are workarounds for that. Hilaire Le 11/01/2015

Re: [Pharo-users] How to subclass Float class

2015-01-11 Thread stepharo
Hilaire you have also acancagua that support unit and conversion and aconcagua came out of a project dealing with money and trades. http://sdmeta.gforge.inria.fr/Teaching/CoursAnnecy/0506-M1-COO/ read the two articles in there. Stef Le 11/1/15 11:22, Hilaire a écrit : Joachim, Thanks for t

Re: [Pharo-users] How to subclass Float class

2015-01-11 Thread Hilaire
Very interesting reading. The formula in figure 1 is wrong as it is "composed" interest, and power should be used. rate := 10 % / 1 year terms := 6 months 100$ * (1 + rate) ^ terms So I wonder how the simplification as exposed in Fig. 4 goes in that case (rate should be transformed to 10/1200)

Re: [Pharo-users] if Pharo is key for you

2015-01-11 Thread Offray Vladimir Luna Cárdenas
Hi all, Just picking up some old threads, so I answer this below. El 18/09/13 a las 01:19, Stéphane Ducasse escribió: Hi guys if Pharo is key for you then you should ask yourself what you did for Pharo recently. Writing code, writing documentation helping closing bug entries, participating t

Re: [Pharo-users] if Pharo is key for you

2015-01-11 Thread kilon alios
Good thread I would love also to hear what other Pharoers work behind the scenes My own project is Ephestos a visual coding enviroment for Blender . I have made some good progress in 2014 and I am sure 2015 will bring more features. Ephestos will benefit the Pharo community by 1) Offering full ac

Re: [Pharo-users] Metacello does not load the expected version from ConfigOf

2015-01-11 Thread Dale Henrichs
Usman, Well I don't have an official bugfix yet, but if you filein the attached method and run the following, PetitParser will downgrade and get loaded correctly (at least it worked for me)...The fist two statements are intended to replace GTMetacelloPlatform with MetacelloPharo30Platform and

Re: [Pharo-users] How to subclass Float class

2015-01-11 Thread stepharo
ask the authors they are both in the pharo mailing-list. Le 11/1/15 16:25, Hilaire a écrit : Very interesting reading. The formula in figure 1 is wrong as it is "composed" interest, and power should be used. rate := 10 % / 1 year terms := 6 months 100$ * (1 + rate) ^ terms So I wonder how th

Re: [Pharo-users] if Pharo is key for you

2015-01-11 Thread stepharo
super! It is always good to do retrospective analysis to see what we learned and it looks like you learned a lot. If you need pharo slides let me know. Stef Le 11/1/15 17:21, Offray Vladimir Luna Cárdenas a écrit : Hi all, Just picking up some old threads, so I answer this below. El 18/09/13

Re: [Pharo-users] if Pharo is key for you

2015-01-11 Thread Offray Vladimir Luna Cárdenas
Hi, Yep, would be nice to have that slides to add to my open Zotero collection about Pharo/Smalltalk [1] https://www.zotero.org/groups/diseo_y_creacion_phd_msc_universidad_de_caldas/items/collectionKey/IVQ5BUUC Cheers, Offray El 11/01/15 a las 15:05, stepharo escribió: super! It is alw