Re: [Pharo-users] [ANN] Pharo Compendium

2020-05-03 Thread Torsten Bergmann
Yes - I was developing on P9 and never tried it in Pharo 8. But I checked now - 
seems to work without
any problem there as well.

Thx
T.


Gesendet: Sonntag, 03. Mai 2020 um 22:36 Uhr
Von: "Stéphane Ducasse" 
An: "Any question about pharo is welcome" 
Betreff: Re: [Pharo-users] [ANN] Pharo Compendium

It can probably work in P8 because parts of Spec20 are working in P8 but not 
all the features and widgets like tables and others. 
But torsten will tell us. 
 
On 3 May 2020, at 17:34, Esteban Maringolo 
mailto:emaring...@gmail.com]> wrote: 

Excellent Torsten!

I guess it will not work in Pharo 8 because of the Spec 2 requirement. Right?

Regards!

Esteban A. Maringolo




[Pharo-users] MetaLinks for Dynamic Contracts

2020-05-03 Thread Evan Donahue
Hello,

I am returning to some work in Pharo after about ~2.5 years and reminding
myself of what I was working on before I got sidetracked. It appears

I had mostly finished for release a dynamic contracts library for run time
type checking based on Racket's contract library.[1] However, it relied on
some hackery to interact well with the TestCoverage class, since both the
contract and the TestCoverage wanted to replace the method during the run
of a test. However, since it seems in Pharo 8 the TestCoverage class is no
longer present, this seems like a good time to re-evaluate the project
before I go in to see what needs to be patched up. I therefore have three
questions:

1) Are there now any existing libraries for dynamic contracts that I should
use instead of patching my old library?

2) Is MetaLinks the preferred way to intercept messages, and if so can
someone point me to the repo (I can't seem to find it on Github)?

3) If 2, does MetaLinks play well with whatever is the current TestCoverage
alternative that I assume still does some form of message interception,
e.g. will the test coverage function still work properly on a MetaLink'ed
message, or will that require further hackery (I discovered MetaLinks after
the first version, so I used the more basic message replacement apis)?

Thank you,
Evan


[1] https://docs.racket-lang.org/reference/contracts.html


Re: [Pharo-users] New type of web application using HTML, CSS and Smalltalk

2020-05-03 Thread Cédrick Béler
Really great Erik. I just want to try ! ;-)

This is great to see such practical and cool uses of small images. It’s a long 
dream that seems happening. And of course, thanks to all people who made it 
possible, especially those who work on the bootstrap process and others in 
general (the list is too long). 

Exciting time in the Smalltalk world. Feels like Renaissance to me ;-)

Cheers,
Cedrick 


Re: [Pharo-users] Thinking aloud about project at hand

2020-05-03 Thread Stéphane Ducasse


> On 3 May 2020, at 11:03, Lorenzo  wrote:
> 
> Hi Stephane,
> 
> may be you remeber me as I helped you for a ESUG in Brescia.

Yes I remember. 

> At present I am working on a revision of fuzzy expert system generator that,
> IMHO, could be used for the project.

Please publish it. 

S. 

> If you believe that it could be interesting, please, let me know.
> 
> Ciao
> 
> Lorenzo
> 
> -Messaggio originale-
> Da: Pharo-users [mailto:pharo-users-boun...@lists.pharo.org] Per conto di
> Stéphane Ducasse
> Inviato: sabato 2 maggio 2020 22:01
> A: Any question about pharo is welcome 
> Oggetto: Re: [Pharo-users] Thinking aloud about project at hand
> 
> 
>> 
>>> I'm thinking about implementing a software solution in Pharo (as one
>>> of the
>> candidate environments), it's
>>> a project that I'm dealing with professionally. The goal is to
>>> develop a financial planning/simulation application on the country
>>> level, which is at present developed as a set of interrelated Excel
>>> spreadsheets.
>>> The requirement is that the solution should be more "manageable",
>>> resilient and straightforward than Excel permits, that it should
>>> present a workflow to the user - i.e. , that the tasks the user
>>> should do are suggested through the GUI.
>> 
>> Thanks again for all the ideas regarding my project. So far I prepared
>> the domain model and all the calculations. The model might be changed
>> in the future, but that's basically it. Now I'm going to focus on the
>> user's workflow and GUI.
>> 
>> I have to say that I'm positively surprised by Pharo. Besides Pharo, I
>> explored the feasibility of using other environments for the same
>> project, namely VBA, .NET, Python. What took me in VBA and C#.NET
>> roughly two weeks - and these are my 'native' programming environments
>> - I finished in five days in Pharo. If GUI and finalization will go
> smoothly, this will be a success.
>> I'm playing with Pharo for some time, but until now I haven't done any
>> serious work with it. Nice!
>> 
> 
> Thanks Tomaz.
> This is a really interesting story.
> Let us know and we will do our best to help you.
> Spec20 has still some rough edges. But one step at a time.
> I think that we will get to a point where we can start to breath a bit
> around Spec2.0.
> 
> S.
> 
> 
> 
> --
> Questa e-mail è stata controllata per individuare virus con Avast antivirus.
> https://www.avast.com/antivirus
> 
> 


Stéphane Ducasse
http://stephane.ducasse.free.fr / http://www.pharo.org 
03 59 35 87 52
Assistant: Julie Jonas 
FAX 03 59 57 78 50
TEL 03 59 35 86 16
S. Ducasse - Inria
40, avenue Halley, 
Parc Scientifique de la Haute Borne, Bât.A, Park Plaza
Villeneuve d'Ascq 59650
France



Re: [Pharo-users] [ANN] Pharo Compendium

2020-05-03 Thread Stéphane Ducasse
It can probably work in P8 because parts of Spec20 are working in P8 but not 
all the features and widgets like tables and others. 
But torsten will tell us. 

> On 3 May 2020, at 17:34, Esteban Maringolo  wrote:
> 
> Excellent Torsten!
> 
> I guess it will not work in Pharo 8 because of the Spec 2 requirement. Right?
> 
> Regards!
> 
> Esteban A. Maringolo
> 
> On Sat, May 2, 2020 at 5:35 PM Torsten Bergmann  wrote:
>> 
>> Hi,
>> 
>> time flows and Pharo-Project is improving on all ends since its inception in 
>> 2008. As you know over time for the code project hosting we used
>> SqueakSource, SS3 repos and other and later switched to SmalltalkHub 
>> available on http://smalltalkhub.com.
>> Starting with Iceberg in Pharo 6 many community projects are now hosted 
>> elsewhere - most of them moved to GitHub. Pharo's git support allows
>> also for GitLab, BitBucket and other git hosting services.
>> 
>> I still think easy and quick accessibility to external (re)sources directly 
>> from the image is key - especially for new users who often get lost
>> among all the various things that are available. Back in 2013 I therefore 
>> provided a small tool called ConfigBrowser as a replacement for
>> MetacelloConfigurationBrowser to easily load Metacello configs directly into 
>> Pharo.
>> 
>> Later we improved quick loading with a primary tool called "Catalog" written 
>> by Esteban. Catalog is indexing every 24 hours all configs within
>> specific meta-repositories on SmalltalkHub (per Pharo version) like
>> 
>>  http://www.smalltalkhub.com/#!/~Pharo/MetaRepoForPharo80
>> 
>> to automatically build
>> 
>>   http://catalog.pharo.org/
>> 
>> and also a JSON source
>> 
>>   http://catalog.pharo.org/catalog/json
>> 
>> The last one feeds the catalog browser and catalog spotter search within the 
>> Pharo image.
>> 
>> So Catalog helped us and especially new Pharo users to find what is 
>> available as external project or package. Unfortunately some package 
>> maintainers
>> are too lazy and do not maintain their configs over old and new Pharo 
>> versions. Also SmalltalkHub.com is now seen as legacy and will only be 
>> available
>> in a read only mode or as a browseable archive soon.
>> 
>> So we have to think about others steps beyond Catalog and (triggered by a 
>> recent discussion on Discord) I started now a simple tool that helped me
>> finding all GitHub projects marked with "pharo" as GitHub topic. I 
>> additionally also added previous catalog loading. More sources could be added
>> as well as some kind of custom stores/plugins. Maybe this tool could be the 
>> base for a future replacement of the catalog tool.
>> 
>> Long story short - let me introduce "Pharo Compendium":
>> 
>> Compendium is a new UI tool to list, browse and load Pharo artefacts from 
>> the web like:
>> 
>> - GitHub Projects
>> - Catalog Projects
>> 
>> and other
>> 
>> By default there are two plugin packages available for GitHub and Catalog - 
>> but you can implement own ones easily to connect to other sources
>> on the web. Compendium is available on:
>> 
>>   https://github.com/astares/Pharo-Compendium
>> 
>> It is implemented using the new Spec2 UI framework - so you need a recent 
>> Pharo 9 image to give it a try. Just run:
>> 
>>Metacello new
>>repository: 'github://astares/Pharo-Compendium/src';
>>baseline: 'Compendium';
>>load
>> 
>> to load the tool. Then go to "Tools" -> "Compendium Browser". Attached is a 
>> screenshot demoing the primary functionality.
>> 
>> If you want your GitHub project to be listed in the tool you simply need to 
>> add the topic "pharo" to the GitHub repository on the GitHub webpage.
>> 
>> Feel free to comment or help improving the tool by sending PR's.
>> 
>> Thx
>> T. (aka astares)
>> 
>> 
> 


Stéphane Ducasse
http://stephane.ducasse.free.fr / http://www.pharo.org 
03 59 35 87 52
Assistant: Julie Jonas 
FAX 03 59 57 78 50
TEL 03 59 35 86 16
S. Ducasse - Inria
40, avenue Halley, 
Parc Scientifique de la Haute Borne, Bât.A, Park Plaza
Villeneuve d'Ascq 59650
France



Re: [Pharo-users] New type of web application using HTML, CSS and Smalltalk

2020-05-03 Thread Stéphane Ducasse
Ok I did not hear that you were talking :)


> On 3 May 2020, at 22:30, Stéphane Ducasse  wrote:
> 
> Hi erik
> 
> this is strange since during a couple of minutes we do not see much. 
> 
> S. 
> 
>> On 3 May 2020, at 20:11, Erik Stel > > wrote:
>> 
>> I have published my first demo of a new type of webapplication based on a
>> tiny Smalltalk image running in the browser, acting as the JS-engine. Create
>> a dynamic application using Smalltalk only, with the direct manipulation
>> you're familiar with from Smalltalk. And ...(in the near future)... with the
>> same debugging capabilities. Still work in progress, but hopefully providing
>> an idea of what's in store.
>> 
>> Feel free to ask questions.
>> 
>> https://www.youtube.com/watch?v=qvY7R6te7go 
>> 
>> 
>> 
>> 
>> 
>> --
>> Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html
>> 
> 
> 
> Stéphane Ducasse
> http://stephane.ducasse.free.fr  / 
> http://www.pharo.org  
> 03 59 35 87 52
> Assistant: Julie Jonas 
> FAX 03 59 57 78 50
> TEL 03 59 35 86 16
> S. Ducasse - Inria
> 40, avenue Halley, 
> Parc Scientifique de la Haute Borne, Bât.A, Park Plaza
> Villeneuve d'Ascq 59650
> France
> 


Stéphane Ducasse
http://stephane.ducasse.free.fr / http://www.pharo.org 
03 59 35 87 52
Assistant: Julie Jonas 
FAX 03 59 57 78 50
TEL 03 59 35 86 16
S. Ducasse - Inria
40, avenue Halley, 
Parc Scientifique de la Haute Borne, Bât.A, Park Plaza
Villeneuve d'Ascq 59650
France



Re: [Pharo-users] New type of web application using HTML, CSS and Smalltalk

2020-05-03 Thread Stéphane Ducasse
Hi erik

this is strange since during a couple of minutes we do not see much. 

S. 

> On 3 May 2020, at 20:11, Erik Stel  wrote:
> 
> I have published my first demo of a new type of webapplication based on a
> tiny Smalltalk image running in the browser, acting as the JS-engine. Create
> a dynamic application using Smalltalk only, with the direct manipulation
> you're familiar with from Smalltalk. And ...(in the near future)... with the
> same debugging capabilities. Still work in progress, but hopefully providing
> an idea of what's in store.
> 
> Feel free to ask questions.
> 
> https://www.youtube.com/watch?v=qvY7R6te7go
> 
> 
> 
> 
> --
> Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html
> 


Stéphane Ducasse
http://stephane.ducasse.free.fr / http://www.pharo.org 
03 59 35 87 52
Assistant: Julie Jonas 
FAX 03 59 57 78 50
TEL 03 59 35 86 16
S. Ducasse - Inria
40, avenue Halley, 
Parc Scientifique de la Haute Borne, Bât.A, Park Plaza
Villeneuve d'Ascq 59650
France



[Pharo-users] New type of web application using HTML, CSS and Smalltalk

2020-05-03 Thread Erik Stel
I have published my first demo of a new type of webapplication based on a
tiny Smalltalk image running in the browser, acting as the JS-engine. Create
a dynamic application using Smalltalk only, with the direct manipulation
you're familiar with from Smalltalk. And ...(in the near future)... with the
same debugging capabilities. Still work in progress, but hopefully providing
an idea of what's in store.

Feel free to ask questions.

https://www.youtube.com/watch?v=qvY7R6te7go




--
Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html



Re: [Pharo-users] [ANN] Pharo Compendium

2020-05-03 Thread Esteban Maringolo
Excellent Torsten!

I guess it will not work in Pharo 8 because of the Spec 2 requirement. Right?

Regards!

Esteban A. Maringolo

On Sat, May 2, 2020 at 5:35 PM Torsten Bergmann  wrote:
>
> Hi,
>
> time flows and Pharo-Project is improving on all ends since its inception in 
> 2008. As you know over time for the code project hosting we used
> SqueakSource, SS3 repos and other and later switched to SmalltalkHub 
> available on http://smalltalkhub.com.
> Starting with Iceberg in Pharo 6 many community projects are now hosted 
> elsewhere - most of them moved to GitHub. Pharo's git support allows
> also for GitLab, BitBucket and other git hosting services.
>
> I still think easy and quick accessibility to external (re)sources directly 
> from the image is key - especially for new users who often get lost
> among all the various things that are available. Back in 2013 I therefore 
> provided a small tool called ConfigBrowser as a replacement for
> MetacelloConfigurationBrowser to easily load Metacello configs directly into 
> Pharo.
>
> Later we improved quick loading with a primary tool called "Catalog" written 
> by Esteban. Catalog is indexing every 24 hours all configs within
> specific meta-repositories on SmalltalkHub (per Pharo version) like
>
>   http://www.smalltalkhub.com/#!/~Pharo/MetaRepoForPharo80
>
> to automatically build
>
>http://catalog.pharo.org/
>
> and also a JSON source
>
>http://catalog.pharo.org/catalog/json
>
> The last one feeds the catalog browser and catalog spotter search within the 
> Pharo image.
>
> So Catalog helped us and especially new Pharo users to find what is available 
> as external project or package. Unfortunately some package maintainers
> are too lazy and do not maintain their configs over old and new Pharo 
> versions. Also SmalltalkHub.com is now seen as legacy and will only be 
> available
> in a read only mode or as a browseable archive soon.
>
> So we have to think about others steps beyond Catalog and (triggered by a 
> recent discussion on Discord) I started now a simple tool that helped me
> finding all GitHub projects marked with "pharo" as GitHub topic. I 
> additionally also added previous catalog loading. More sources could be added
> as well as some kind of custom stores/plugins. Maybe this tool could be the 
> base for a future replacement of the catalog tool.
>
> Long story short - let me introduce "Pharo Compendium":
>
> Compendium is a new UI tool to list, browse and load Pharo artefacts from the 
> web like:
>
>  - GitHub Projects
>  - Catalog Projects
>
> and other
>
> By default there are two plugin packages available for GitHub and Catalog - 
> but you can implement own ones easily to connect to other sources
> on the web. Compendium is available on:
>
>https://github.com/astares/Pharo-Compendium
>
> It is implemented using the new Spec2 UI framework - so you need a recent 
> Pharo 9 image to give it a try. Just run:
>
> Metacello new
> repository: 'github://astares/Pharo-Compendium/src';
> baseline: 'Compendium';
> load
>
> to load the tool. Then go to "Tools" -> "Compendium Browser". Attached is a 
> screenshot demoing the primary functionality.
>
> If you want your GitHub project to be listed in the tool you simply need to 
> add the topic "pharo" to the GitHub repository on the GitHub webpage.
>
> Feel free to comment or help improving the tool by sending PR's.
>
> Thx
> T. (aka astares)
>
>



Re: [Pharo-users] mentor question 4

2020-05-03 Thread Roelof Wobben via Pharo-users
--- Begin Message ---

  
  
Op 3-5-2020 om 12:32 schreef Ben Coman:


  
  

  


  On Sun., 3 May 2020,
3:48 pm Roelof Wobben,  wrote:
  
  

  Op 3-5-2020 om 04:24 schreef Ben Coman:
  
  

  




  On Sun, 3
May 2020 at 03:09, Roelof Wobben 
wrote:
  
  

  Op 2-5-2020 om 19:33 schreef Ben
Coman:
  
  

  
  
  
  
On
  Sat, 2 May 2020 at 15:52, Roelof
  Wobben via Pharo-users 
  wrote:

Op
  1-5-2020 om 08:35 schreef Roelof
  Wobben:
  >> On Fri, 1 May 2020 at
  02:16, Roelof Wobben 
  wrote:
  >>> Op 30-4-2020 om 16:06
  schreef Richard O'Keefe:
   This sounds very
  much like the Luhn test task at
  RosettaCode.
   https://rosettacode.org/wiki/Luhn_test_of_credit_card_numbers
   except that there
  it is described as working on the
  digits of an
   integer.
  
   (1) There are two
  approaches to traversing a
  sequence in reverse.
     (A) Reverse
  the sequence, then traverse the
  copy forward.
     aString
  reverse do: [:each | ...]
     (B) Just
  traverse the sequence in reverse
     aString
  reverseDo: [:each | ...]
     My taste is
  for the second.
  
   (2) There are two
  approaches to deleting spaces.
     (A) Make a
  copy of the string without spaces.
     x :=
  aString reject: [:each | each =
  Character space].
     x do:
  ...
     (B) Ignore
  spaces as you go:
     (i)
  aString do: [:each | each =
  Character space ifFalse: 
   [...]]
     (ii)
  aString select: [:each | each ~=
  Character space] 
   thenDo:
   [:each | ...]
  
   Combining (1A)
  and (2A) you get very obvious
  code:
     (aString
  reject: [:each | each = Character
  space]) reverse do:
   [:digit } ...]

Re: [Pharo-users] mentor question 4

2020-05-03 Thread Ben Coman
On Sun., 3 May 2020, 3:48 pm Roelof Wobben,  wrote:

> Op 3-5-2020 om 04:24 schreef Ben Coman:
>
>
>
> On Sun, 3 May 2020 at 03:09, Roelof Wobben  wrote:
>
>> Op 2-5-2020 om 19:33 schreef Ben Coman:
>>
>>
>>
>> On Sat, 2 May 2020 at 15:52, Roelof Wobben via Pharo-users <
>> pharo-users@lists.pharo.org> wrote:
>>
>>> Op 1-5-2020 om 08:35 schreef Roelof Wobben:
>>> >> On Fri, 1 May 2020 at 02:16, Roelof Wobben  wrote:
>>> >>> Op 30-4-2020 om 16:06 schreef Richard O'Keefe:
>>>  This sounds very much like the Luhn test task at RosettaCode.
>>>  https://rosettacode.org/wiki/Luhn_test_of_credit_card_numbers
>>>  except that there it is described as working on the digits of an
>>>  integer.
>>> 
>>>  (1) There are two approaches to traversing a sequence in reverse.
>>>    (A) Reverse the sequence, then traverse the copy forward.
>>>    aString reverse do: [:each | ...]
>>>    (B) Just traverse the sequence in reverse
>>>    aString reverseDo: [:each | ...]
>>>    My taste is for the second.
>>> 
>>>  (2) There are two approaches to deleting spaces.
>>>    (A) Make a copy of the string without spaces.
>>>    x := aString reject: [:each | each = Character space].
>>>    x do: ...
>>>    (B) Ignore spaces as you go:
>>>    (i) aString do: [:each | each = Character space ifFalse:
>>>  [...]]
>>>    (ii) aString select: [:each | each ~= Character space]
>>>  thenDo:
>>>  [:each | ...]
>>> 
>>>  Combining (1A) and (2A) you get very obvious code:
>>>    (aString reject: [:each | each = Character space]) reverse do:
>>>  [:digit } ...]
>>>  Combining (1B) and (2Bi) you get more efficient code:
>>>    aString reverseDo: [:digit |
>>>    digit = Character space ifFalse: [ ...]]
>>> 
>>>  By the way, let's start by checking that the character in the
>>>  string *are*
>>>  digits or spaces:
>>>    (aString allSatisfy: [:each | each isDigit or: [each =
>>>  Character s[ace]])
>>>    ifFalse: [^false],
>>> 
>>>  (3) There are two approaches to doubling the even digits.
>>>    (A) Make a new string that starts as a copy and change every
>>>  second
>>> digit from the right.
>>>    (B) Simply *act* as if this has been done; keep track of
>>>  whether the
>>>    current digit position is even or odd and multiply by 1
>>>  or 2 as
>>>    appropriate.
>>>    nextIsOdd := true.
>>>    aString reverseDo: [:digit |
>>>    digit = Character space ifFalse: [
>>>    nextIsOdd
>>>    ifTrue:  [oddSum := ...]
>>>    ifFalse: [evenSum := ...].
>>>    nextIsOdd := nextIsOdd not]].
>>> 
>>>  I *like* code that traverses a data structure exactly once and
>>>  allocates no intermediate garbage, so I'd be making (B) choices.
>>> 
>>> 
>>> >>> For me  , I use this to practice solving problems  and doing the
>>> >>> "right"
>>> >>> steps.
>>> >>> So I love it , that so many people share there way of solving it.
>>> >>> I can learn a lot from it
>>> >>> Expecially when they explain there thinking process so detailed.
>>> >>>
>>> >>> I like this code also a lot.
>>> >>> Am  I correct for testing if it is a valid string by doing this ^
>>> >>> (oddSum + evenSum) dividedBy: 10
>>> >>>
>>> >>> Roelof
>>> >>>
>>> >
>>> >
>>> > oke,
>>> >
>>> > so this is better
>>> >
>>> > cardNumber := '8273 1232 7352 0569'.
>>> > oddSum := 0.
>>> > evenSum := 0.
>>> > nextIsOdd := false.
>>> >  cardNumber reverseDo: [:character |
>>> >   digit := character digitValue.
>>> >  character = Character space ifFalse: [
>>> >  nextIsOdd
>>> >  ifFalse:  [oddSum := oddSum + digit ]
>>> >  ifTrue: [(digit >= 5 )
>>> > ifTrue: [evenSum := evenSum + (digit * 2) - 9 ]
>>> > ifFalse: [ evenSum := evenSum + (digit * 2) ]].
>>> > nextIsOdd := nextIsOdd not]].
>>> > ^ evenSum + oddSum // 10 == 0.
>>> >
>>> >
>>> > where I could even make a seperate method of the ifTrue branch when
>>> > the digit is greater then 5.
>>> >
>>> >
>>> nobody who can say if this is a good solution ?
>>>
>>
>> You didn't actually ask a question :)
>>
>> btw, Its good you are stretching yourself to do it the most complicated
>> way,
>> but pay attention that when Richard says HE "likes code that traverses a
>> data structure exactly once"
>> its because he is starting with the philosophy to OPTIMISE for EFFICIENCY.
>> Often in programming that is the LAST thing you should do because to do
>> so your code often becomes more complex,
>> and Kernagan's law applies...
>> https://talixa.com/blog/why-i-write-simple-code/
>>
>> In general, you want to avoid premature optimization.
>> 

[Pharo-users] R: Thinking aloud about project at hand

2020-05-03 Thread Lorenzo
Hi Stephane,

may be you remeber me as I helped you for a ESUG in Brescia.
At present I am working on a revision of fuzzy expert system generator that,
IMHO, could be used for the project.
If you believe that it could be interesting, please, let me know.

Ciao

Lorenzo

-Messaggio originale-
Da: Pharo-users [mailto:pharo-users-boun...@lists.pharo.org] Per conto di
Stéphane Ducasse
Inviato: sabato 2 maggio 2020 22:01
A: Any question about pharo is welcome 
Oggetto: Re: [Pharo-users] Thinking aloud about project at hand


>
>> I'm thinking about implementing a software solution in Pharo (as one
>> of the
> candidate environments), it's
>> a project that I'm dealing with professionally. The goal is to
>> develop a financial planning/simulation application on the country
>> level, which is at present developed as a set of interrelated Excel
>> spreadsheets.
>> The requirement is that the solution should be more "manageable",
>> resilient and straightforward than Excel permits, that it should
>> present a workflow to the user - i.e. , that the tasks the user
>> should do are suggested through the GUI.
>
> Thanks again for all the ideas regarding my project. So far I prepared
> the domain model and all the calculations. The model might be changed
> in the future, but that's basically it. Now I'm going to focus on the
> user's workflow and GUI.
>
> I have to say that I'm positively surprised by Pharo. Besides Pharo, I
> explored the feasibility of using other environments for the same
> project, namely VBA, .NET, Python. What took me in VBA and C#.NET
> roughly two weeks - and these are my 'native' programming environments
> - I finished in five days in Pharo. If GUI and finalization will go
smoothly, this will be a success.
> I'm playing with Pharo for some time, but until now I haven't done any
> serious work with it. Nice!
>

Thanks Tomaz.
This is a really interesting story.
Let us know and we will do our best to help you.
Spec20 has still some rough edges. But one step at a time.
I think that we will get to a point where we can start to breath a bit
around Spec2.0.

S.



--
Questa e-mail è stata controllata per individuare virus con Avast antivirus.
https://www.avast.com/antivirus




Re: [Pharo-users] mentor question 4

2020-05-03 Thread Roelof Wobben via Pharo-users
--- Begin Message ---

  
  
Op 3-5-2020 om 04:24 schreef Ben Coman:


  
  

  
  
  
  
On Sun, 3 May 2020 at
  03:09, Roelof Wobben  wrote:


  
Op 2-5-2020 om 19:33 schreef Ben Coman:


  




  On Sat, 2 May
2020 at 15:52, Roelof Wobben via Pharo-users

wrote:
  
  Op 1-5-2020
om 08:35 schreef Roelof Wobben:
>> On Fri, 1 May 2020 at 02:16, Roelof
Wobben 
wrote:
>>> Op 30-4-2020 om 16:06 schreef
Richard O'Keefe:
 This sounds very much like the
Luhn test task at RosettaCode.
 https://rosettacode.org/wiki/Luhn_test_of_credit_card_numbers
 except that there it is
described as working on the digits of an
 integer.

 (1) There are two approaches to
traversing a sequence in reverse.
   (A) Reverse the sequence,
then traverse the copy forward.
   aString reverse do:
[:each | ...]
   (B) Just traverse the
sequence in reverse
   aString reverseDo:
[:each | ...]
   My taste is for the
second.

 (2) There are two approaches to
deleting spaces.
   (A) Make a copy of the
string without spaces.
   x := aString reject:
[:each | each = Character space].
   x do: ...
   (B) Ignore spaces as you
go:
   (i) aString do:
[:each | each = Character space ifFalse: 
 [...]]
   (ii) aString select:
[:each | each ~= Character space] 
 thenDo:
 [:each | ...]

 Combining (1A) and (2A) you get
very obvious code:
   (aString reject: [:each |
each = Character space]) reverse do:
 [:digit } ...]
 Combining (1B) and (2Bi) you
get more efficient code:
   aString reverseDo:
[:digit |
   digit = Character
space ifFalse: [ ...]]

 By the way, let's start by
checking that the character in the 
 string *are*
 digits or spaces:
   (aString allSatisfy:
[:each | each isDigit or: [each = 
 Character s[ace]])
   ifFalse: [^false],

 (3) There are two approaches to
doubling the even digits.
   (A) Make a new string
that starts as a copy and change every 
 second
    digit from the
right.
   (B) Simply *act* as if
this has been done; keep track of 
 whether the
   current digit
position is even or odd and multiply by 1 
 or 2 as
   appropriate.
   nextIsOdd := true.
   aString reverseDo:
[:digit |
   digit = Character
space ifFalse: [
   nextIsOdd