[ANN] New Aconcagua & Chalten packages

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[ANN] New Aconcagua & Chalten packages

Torsten Bergmann
Reminds me again how close Smalltalk comes to the real world.

Dont know if the interest rate of 0.1 is still valid after
the financial crisis ;) but I always liked this natural
expression style of Smalltalk:

  initialCapital := 100 dollars.
  interestRate := 0.1 / 1 year.

Especially the ease of "1 year", "1 month" or "Date today".
If you ever worked with the date and calendar mess in Java
you know what I'm talking about. I can even write:

   100 m2
   100 USD
   100 EUR
   100 €

Unfortunately I cant (yet) write unary messages like this in Smalltalk:

  100 $
  100 %

Wonder why not. Parser gives "Message pattern expected", maybe
because of unary vs. binary.

Have to think about it ...


--
GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT!
Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: [ANN] New Aconcagua & Chalten packages

hernan.wilkinson
We did that in a financial system that uses Aconcagua and Chalten.... so you have things like:

InterestRate yearlyOf: 10 percent.
InterestRate of: 10 percent every: 6 months.

and of course:

Interest simpleFor: 100 dollars with: (InterestRate yearlyOf: 10 percent) during: 10 years.
and
Interest compoundFor: 100 dollras with: (InterestRate yearlyOf: 10 percent) during: 10 years withPeriodsOf: 6 months

And of course more complex things... anyway, some people call this DSL... :-)


On Fri, Oct 9, 2009 at 10:19 AM, Torsten Bergmann <[hidden email]> wrote:
Reminds me again how close Smalltalk comes to the real world.

Dont know if the interest rate of 0.1 is still valid after
the financial crisis ;) but I always liked this natural
expression style of Smalltalk:

 initialCapital := 100 dollars.
 interestRate := 0.1 / 1 year.

Especially the ease of "1 year", "1 month" or "Date today".
If you ever worked with the date and calendar mess in Java
you know what I'm talking about. I can even write:

  100 m2
  100 USD
  100 EUR
  100 €

Unfortunately I cant (yet) write unary messages like this in Smalltalk:

 100 $
 100 %

Wonder why not. Parser gives "Message pattern expected", maybe
because of unary vs. binary.

Have to think about it ...


--
GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT!
Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: [ANN] New Aconcagua & Chalten packages

Ramiro Diaz Trepat-2
Chalten is also a brilliant framework.
Anyone using the old calendar framework from Smalltalk should take a look at it.
Cheers

r



2009/10/9 Hernan Wilkinson <[hidden email]>
We did that in a financial system that uses Aconcagua and Chalten.... so you have things like:

InterestRate yearlyOf: 10 percent.
InterestRate of: 10 percent every: 6 months.

and of course:

Interest simpleFor: 100 dollars with: (InterestRate yearlyOf: 10 percent) during: 10 years.
and
Interest compoundFor: 100 dollras with: (InterestRate yearlyOf: 10 percent) during: 10 years withPeriodsOf: 6 months

And of course more complex things... anyway, some people call this DSL... :-)



On Fri, Oct 9, 2009 at 10:19 AM, Torsten Bergmann <[hidden email]> wrote:
Reminds me again how close Smalltalk comes to the real world.

Dont know if the interest rate of 0.1 is still valid after
the financial crisis ;) but I always liked this natural
expression style of Smalltalk:

 initialCapital := 100 dollars.
 interestRate := 0.1 / 1 year.

Especially the ease of "1 year", "1 month" or "Date today".
If you ever worked with the date and calendar mess in Java
you know what I'm talking about. I can even write:

  100 m2
  100 USD
  100 EUR
  100 €

Unfortunately I cant (yet) write unary messages like this in Smalltalk:

 100 $
 100 %

Wonder why not. Parser gives "Message pattern expected", maybe
because of unary vs. binary.

Have to think about it ...


--
GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT!
Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: [ANN] New Aconcagua & Chalten packages

gcotelli
In reply to this post by Torsten Bergmann
Yeah!!

I think in a unary % message too... but the syntax become ambiguous.

For example:
| positive |
positive := 8.
1 % positive.

It's not clear if % is in binary form and must use positive as a collaborator... or if is a unary message and must then send positive.. :(

(By the way I like the % as a unary message more than a binary :P )

It's great with dates too:

January first, 2010

works ok in Chalten...

Regards,
Gabriel

On Fri, Oct 9, 2009 at 10:19 AM, Torsten Bergmann <[hidden email]> wrote:
Reminds me again how close Smalltalk comes to the real world.

Dont know if the interest rate of 0.1 is still valid after
the financial crisis ;) but I always liked this natural
expression style of Smalltalk:

 initialCapital := 100 dollars.
 interestRate := 0.1 / 1 year.

Especially the ease of "1 year", "1 month" or "Date today".
If you ever worked with the date and calendar mess in Java
you know what I'm talking about. I can even write:

  100 m2
  100 USD
  100 EUR
  100 €

Unfortunately I cant (yet) write unary messages like this in Smalltalk:

 100 $
 100 %

Wonder why not. Parser gives "Message pattern expected", maybe
because of unary vs. binary.

Have to think about it ...


--
GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT!
Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project