Re: [Pharo-users] [seaside] adding attributes to link/stylesheet tag

2019-02-20 Thread sergio ruiz
Scratch that .. false alarm.. had to go up a level to find attributeAt: put:

sorry for the interruption ..

On February 20, 2019 at 10:37:21 PM, sergio ruiz (sergio@gmail.com)
wrote:

How would I go about rendering this:

https://use.fontawesome.com/releases/v5.7.2/css/all.css";
integrity="sha384-fnmOCqbTlWIlj8LyTjo7mOUStjsKC4pOpQbqyi7RrhN7udi9RwhKkMHpvLbHG9Sr"
crossorigin="anonymous”>

I am not sure how to add the *integrity* and *crossorigin* attributes to
the tag..

Thanks!





peace,
sergio
photographer, journalist, visionary

Public Key: http://bit.ly/29z9fG0
#BitMessage BM-NBaswViL21xqgg9STRJjaJaUoyiNe2dV
http://www.codeandmusic.com
http://www.twitter.com/sergio_101
http://www.facebook.com/sergio101


peace,
sergio
photographer, journalist, visionary

Public Key: http://bit.ly/29z9fG0
#BitMessage BM-NBaswViL21xqgg9STRJjaJaUoyiNe2dV
http://www.codeandmusic.com
http://www.twitter.com/sergio_101
http://www.facebook.com/sergio101


[Pharo-users] [seaside] adding attributes to link/stylesheet tag

2019-02-20 Thread sergio ruiz
How would I go about rendering this:

https://use.fontawesome.com/releases/v5.7.2/css/all.css";
integrity="sha384-fnmOCqbTlWIlj8LyTjo7mOUStjsKC4pOpQbqyi7RrhN7udi9RwhKkMHpvLbHG9Sr"
crossorigin="anonymous”>

I am not sure how to add the *integrity* and *crossorigin* attributes to
the tag..

Thanks!






peace,
sergio
photographer, journalist, visionary

Public Key: http://bit.ly/29z9fG0
#BitMessage BM-NBaswViL21xqgg9STRJjaJaUoyiNe2dV
http://www.codeandmusic.com
http://www.twitter.com/sergio_101
http://www.facebook.com/sergio101


Re: [Pharo-users] how to test, if the class has "shared identity" of instances in the whole image (SmallIntegers, Symbols...)

2019-02-20 Thread Petr Fischer via Pharo-users
--- Begin Message ---
> It is not clear to me what the semantics of such a selector would be.
> Consider this example:
>  t := [:x | x copy == x].
>  a := t value: 1.0e38.
>  b := t value: 1.0e308.
> What do you expect a and b to be?
> GNU Smalltalk: a=true, b=true.
> My Smalltalk, 32-bit or 64-bit: a=true, b=true.
> Squeak/Pharo, 32-bit: a=false, b=false.
> Squeak/Pharo, 64-bit: a=true, b=false.
> Squeak/Pharo, after a patch: a=true, b=true.
> 
> There are two quite different reasons why x copy == x
> might be true:
> * x is immutable (including its parts), and can be
>   thought of as a mathematical value, so that there
>   is no need to copy it
>   Examples: every kind of number, characters,
>   booleans, immutable collections, block closures
> * x is a way of accessing a unique resource, and
>   should not be copied, so making copy the identity
>   is a safety measure.
>   Examples: Semaphores, Mutexes, SharedQueues, data base
>   connections, some kinds of streams, singletons.
> * Laziness or error (inherited method not revised).
> 
> What is your use case?

I see... My use case was too superficial - thanks for answer!

pf

> 
> On Thu, 21 Feb 2019 at 07:32, Petr Fischer via Pharo-users <
> pharo-users@lists.pharo.org> wrote:
> 
> > Hello, some classes, like Symbols or SmallIntegers, shares identity of
> > value instances in the whole image (I may say it wrong), so:
> >
> > 1 == 1 copy. [true]
> > #aaa == #aaa copy. [true]
> >
> > all other classes not, like Strings, Objects etc., so:
> >
> > 'aaa' == 'aaa' copy. [false]
> >
> > Is there any test method (maybe on the class side) I could ask for this
> > (isXXX)?
> >
> > Thanks! pf
> >
> >

--- End Message ---


Re: [Pharo-users] Pluralising messages or choosing word alternatives

2019-02-20 Thread Tim Mackinnon
Some great suggestions here guys - I had forgotten there were conditionals in 
expandMacros… that is the better solution.

Although I do kind of think that something on OrderedCollection like:

chooseBasedOn: count

^self at: ((count max: 1) min: self size)

Would be a nice general solution for other things (I’m kind of suprised there 
isn’t something like that there)

> On 20 Feb 2019, at 21:21, Esteban Maringolo  wrote:
> 
> Why not use the condition macro so you have a single string literal, that in 
> the future could be used for translation?
> 
> E.g. 
> | occurences |
> occurences := 3.
> 'There <1?is:are> <2p> <1?occurrence:ocurrences> of <3p>' expandMacrosWith: 
> occurences = 1 with: 3 with: 'Foo'
> 
> 
> Esteban A. Maringolo
> 
> 
> El mié., 20 feb. 2019 a las 18:08, Tim Mackinnon () 
> escribió:
> I was browsing some of the Pharo issues (always worth doing) - and noticed an 
> interesting one about Test results reporting and pluralisation
> (https://github.com/pharo-project/pharo/issues/2578 
> )
> 
> In it, I hadn't noticed String>>asPluralBasedOn: before (and judging from 
> many messages in the image, many others hadn't either). 
> 
> I'm fixing something similar for a refactoring bug and can use this technique 
> there (although from memory, it comes with a health warning as if ever we 
> want to internalise the messages in Pharo, this will need a different 
> approach). However we are probably a distance from doing that - so cleaning 
> up what we have is a good start.
> 
> Anyway I was curious if there is something to help with messages like:
> 
> ‘There is 1 occurrence of {1}’  vs ‘There are many occurrences of {1}’, which 
> I’d like to write something like:
> 
> ‘There ‘,  (‘is 1 ’, ‘are many ’) pick: result size, ‘occurrence’ 
> asPluralBasedOn: result size, ‘ ‘,  result printString.
> 
> 
> Tim
> 
> 



Re: [Pharo-users] Trying to understand Developing with Pharo, Deploying with Gemstone/s

2019-02-20 Thread Dale Henrichs

Hello Sergio,

Sorry for the delay in replying .. too many balls in the air:) I'll 
comment in-line ..


On 2/8/19 7:07 AM, sergio ruiz wrote:


I have an app that is ready to deploy to alpha. I usually do this by 
creating a script that builds a minimal pharo image, and run that on a 
cloud server.


I then use TelePharo to make any live tweaks that need to happen, and 
something like:


|./pharo Pharo.image "/run/the/script" |

to keep run cron jobs, etc.

I would like to start using Gemstone/s.

I got GsDevKit_home up and running, with no problems, but I am having 
a little bit of trouble figuring out how to proceed. I get what tODE 
is doing, but I don’t get how to do the things I normally do:


  * I got Seaside installed in the image, but I need several other
packages in my install: JSON, Soup, AWS S3, etc. How do I go about
installing those?

I assume that you used the following tODE command to install Seaside, 
following these instructions[1]?


   |project install
   --url=http://gsdevkit.github.io/GsDevKit_home/Seaside32.ston|

The url in the command resolves to a project entry for Seaside32, that 
looks like this:


^ TDProjectSpecEntryDefinition new
baseline: 'Seaside3'
  repository: 'filetree://$GS_HOME/shared/repos/Seaside/repository'
  loads: #('Zinc Project' 'Welcome' 'Development' 'Examples');
installScript:
'project clone --https --local Seaside3
  project install --local 
--url=http://gsdevkit.github.io/GsDevKit_home/GsApplicationTools.ston';
gitCheckout: 'master';
status: #(#'inactive');
locked: true;
yourself

The `installScript` is run by the `project install` command and causes 
the two projects to be cloned into your shared git repository area. The 
project entries for both projects are also dropped to a common disk 
location and will show up in your `project list` as unloaded projects in 
all of the stones you create, so the `install` only needs to be done once.


I'm pointing this out because you can use the `project entry` command to 
create project entries in the "common disk location" by using the 
`project entry` command ... here's the man page obtained by doing `man 
project entry` (`man project` will list all of available `project` 
commands):


NAME
  project entry - Create a new project entry

SYNOPSIS
  project entry --baseline= --repo= 
[--loads=] \

  entry --config= [--version=] \
--repo= [--loads=] 
  entry --git= [--repo=] 
  entry --url= 

DESCRIPTION
  The project entry specifies project options used by the `project list` window.

  A project entry can be created for loaded projects or for projects that have
  yet to be loaded.

  There are three basic types of project entry: Git, Metacello, and HTTP.

  Git Project Entries
  ---
  For Git project entries you define the name of the project and the location on
  disk where the git repository is located. For example:

project entry --git=projectHome --repo=$GS_HOME /sys/local/server/projects

  Metacello Project Entries
  -
  For Metacello project entries you define the name of the project, the type of
  the project (baseline or configuration), the repository where the baseline or
  configuration may be found, and (optionally) the package/project/groups to be 
loaded.
  For configurations, you also specify the version of the project to be loaded. 
For example:

project entry --config=External  \
  --version=1.0.0\
  --repo=http://ss3.gemstone.com/ss/external \
  --loads=`#('Core')`  \
  /sys/local/server/projects

project entry --baseline=External\
  --repo=github://dalehenrich/external:master/repository \
  /sys/local/server/projects

  If you don't specify a `--loads` option, the 'default' group is loaded. Once 
you have
  created a project entry, you may change or add attributes. For example, you 
may want to
  change the status to #inactive.

  HTTP Project Entries
  
  For HTTP project entries, you an download an existing project entry from a 
web-site. For
  example:

project entry --url=http://gsdevkit.github.io/GsDevKit_home/Seaside31.ston \
  /sys/stone/projects

  Downloads a project entry from 
http://gsdevkit.github.io/GsDevKit_home/Seaside31.ston
  into the /sys/stone/projects node.

  Once a project is loaded, only changes to the loads specification, locked
  attribute and active attribute may have an effect. The remaining information
  is taken directly from the loaded project itself.

  Any changes you make will take effect after the project list is refreshed.

  If there is already a project with the same project name in your project 
list, the download
  will be skipped.

  If this command is run as a 

Re: [Pharo-users] Pluralising messages or choosing word alternatives

2019-02-20 Thread Sven Van Caekenberghe
You should have a look at what Seaside has.

Like Integer>>#pluralize:with:

But also the class GRInflector that understand more about English than I do ;-)

> On 20 Feb 2019, at 22:07, Tim Mackinnon  wrote:
> 
> I was browsing some of the Pharo issues (always worth doing) - and noticed an 
> interesting one about Test results reporting and pluralisation
> (https://github.com/pharo-project/pharo/issues/2578)
> 
> In it, I hadn't noticed String>>asPluralBasedOn: before (and judging from 
> many messages in the image, many others hadn't either). 
> 
> I'm fixing something similar for a refactoring bug and can use this technique 
> there (although from memory, it comes with a health warning as if ever we 
> want to internalise the messages in Pharo, this will need a different 
> approach). However we are probably a distance from doing that - so cleaning 
> up what we have is a good start.
> 
> Anyway I was curious if there is something to help with messages like:
> 
> ‘There is 1 occurrence of {1}’  vs ‘There are many occurrences of {1}’, which 
> I’d like to write something like:
> 
> ‘There ‘,  (‘is 1 ’, ‘are many ’) pick: result size, ‘occurrence’ 
> asPluralBasedOn: result size, ‘ ‘,  result printString.
> 
> 
> Tim
> 
> 




Re: [Pharo-users] Pluralising messages or choosing word alternatives

2019-02-20 Thread Esteban Maringolo
Why not use the condition macro so you have a single string literal, that
in the future could be used for translation?

E.g.
| occurences |
occurences := 3.
'There <1?is:are> <2p> <1?occurrence:ocurrences> of <3p>' expandMacrosWith:
occurences = 1 with: 3 with: 'Foo'


Esteban A. Maringolo


El mié., 20 feb. 2019 a las 18:08, Tim Mackinnon ()
escribió:

> I was browsing some of the Pharo issues (always worth doing) - and noticed
> an interesting one about Test results reporting and pluralisation
> (https://github.com/pharo-project/pharo/issues/2578)
>
> In it, I hadn't noticed String>>asPluralBasedOn: before (and judging from
> many messages in the image, many others hadn't either).
>
> I'm fixing something similar for a refactoring bug and can use this
> technique there (although from memory, it comes with a health warning as if
> ever we want to internalise the messages in Pharo, this will need a
> different approach). However we are probably a distance from doing that -
> so cleaning up what we have is a good start.
>
> Anyway I was curious if there is something to help with messages like:
>
> ‘There is 1 occurrence of {1}’  vs ‘There are many occurrences of {1}’,
> which I’d like to write something like:
>
> ‘There ‘,  (‘is 1 ’, ‘are many ’) pick: result size, ‘occurrence’
> asPluralBasedOn: result size, ‘ ‘,  result printString.
>
>
> Tim
>
>
>


Re: [Pharo-users] Pluralising messages or choosing word alternatives

2019-02-20 Thread Gabriel Cotelli
Maybe you can use the conditional syntax of expandMacros.

On Wed, Feb 20, 2019, 18:08 Tim Mackinnon  wrote:

> I was browsing some of the Pharo issues (always worth doing) - and noticed
> an interesting one about Test results reporting and pluralisation
> (https://github.com/pharo-project/pharo/issues/2578)
>
> In it, I hadn't noticed String>>asPluralBasedOn: before (and judging from
> many messages in the image, many others hadn't either).
>
> I'm fixing something similar for a refactoring bug and can use this
> technique there (although from memory, it comes with a health warning as if
> ever we want to internalise the messages in Pharo, this will need a
> different approach). However we are probably a distance from doing that -
> so cleaning up what we have is a good start.
>
> Anyway I was curious if there is something to help with messages like:
>
> ‘There is 1 occurrence of {1}’  vs ‘There are many occurrences of {1}’,
> which I’d like to write something like:
>
> ‘There ‘,  (‘is 1 ’, ‘are many ’) pick: result size, ‘occurrence’
> asPluralBasedOn: result size, ‘ ‘,  result printString.
>
>
> Tim
>
>
>


[Pharo-users] Pluralising messages or choosing word alternatives

2019-02-20 Thread Tim Mackinnon
I was browsing some of the Pharo issues (always worth doing) - and noticed an 
interesting one about Test results reporting and pluralisation
(https://github.com/pharo-project/pharo/issues/2578)

In it, I hadn't noticed String>>asPluralBasedOn: before (and judging from many 
messages in the image, many others hadn't either). 

I'm fixing something similar for a refactoring bug and can use this technique 
there (although from memory, it comes with a health warning as if ever we want 
to internalise the messages in Pharo, this will need a different approach). 
However we are probably a distance from doing that - so cleaning up what we 
have is a good start.

Anyway I was curious if there is something to help with messages like:

‘There is 1 occurrence of {1}’  vs ‘There are many occurrences of {1}’, which 
I’d like to write something like:

‘There ‘,  (‘is 1 ’, ‘are many ’) pick: result size, ‘occurrence’ 
asPluralBasedOn: result size, ‘ ‘,  result printString.


Tim




Re: [Pharo-users] how to test, if the class has "shared identity" of instances in the whole image (SmallIntegers, Symbols...)

2019-02-20 Thread Richard O'Keefe
It is not clear to me what the semantics of such a selector would be.
Consider this example:
 t := [:x | x copy == x].
 a := t value: 1.0e38.
 b := t value: 1.0e308.
What do you expect a and b to be?
GNU Smalltalk: a=true, b=true.
My Smalltalk, 32-bit or 64-bit: a=true, b=true.
Squeak/Pharo, 32-bit: a=false, b=false.
Squeak/Pharo, 64-bit: a=true, b=false.
Squeak/Pharo, after a patch: a=true, b=true.

There are two quite different reasons why x copy == x
might be true:
* x is immutable (including its parts), and can be
  thought of as a mathematical value, so that there
  is no need to copy it
  Examples: every kind of number, characters,
  booleans, immutable collections, block closures
* x is a way of accessing a unique resource, and
  should not be copied, so making copy the identity
  is a safety measure.
  Examples: Semaphores, Mutexes, SharedQueues, data base
  connections, some kinds of streams, singletons.
* Laziness or error (inherited method not revised).

What is your use case?







On Thu, 21 Feb 2019 at 07:32, Petr Fischer via Pharo-users <
pharo-users@lists.pharo.org> wrote:

> Hello, some classes, like Symbols or SmallIntegers, shares identity of
> value instances in the whole image (I may say it wrong), so:
>
> 1 == 1 copy. [true]
> #aaa == #aaa copy. [true]
>
> all other classes not, like Strings, Objects etc., so:
>
> 'aaa' == 'aaa' copy. [false]
>
> Is there any test method (maybe on the class side) I could ask for this
> (isXXX)?
>
> Thanks! pf
>
>


Re: [Pharo-users] How do you easily re-categorise methods in Calypso?

2019-02-20 Thread Tim Mackinnon
No problem Denis - I’m ready to dip a toe in on things like this. I just wanted 
to make sure I wasn’t missing something or stick in old habits.

Just tried a simple fix today and discovered it’s in the Calypso code - so need 
to get my fork sorted again.

Tim

Sent from my iPhone

> On 20 Feb 2019, at 19:21, Denis Kudriashov  wrote:
> 
> Hi Tim.
> 
> It needs to be improved. 
> I simply reused the choose dialog from add protocol command because the 
> change protocol dialog was the part of Nautilus.
> 
> вт, 19 февр. 2019 г., 15:06 Tim Mackinnon tim@testit.works:
>> Hi - I’m scratching my head over how to easily re-caegorise methods in 
>> calypso? I’ve overridden some methods in subclasses and picked up the wrong 
>> category (which the critic is slapping me for).
>> 
>> But when I click on the method - I can’t drag it to the new category, so if 
>> I click on the pencil in the status line (or the current category name - not 
>> sure why they are independently clickable?) - it shows me a rather unhelpful 
>> list of protocols. I’m not sure where this list comes from as it doesn’t 
>> seem to include any of the protocols that are already in the class? (and 
>> those which I want to use?). So I have to start typing “acces” and can click 
>> on accessing…
>> 
>> Am I missing a simple trick - or is this an area that needs some work?


Re: [Pharo-users] How do you easily re-categorise methods in Calypso?

2019-02-20 Thread Denis Kudriashov
Hi Tim.

It needs to be improved.
I simply reused the choose dialog from add protocol command because the
change protocol dialog was the part of Nautilus.

вт, 19 февр. 2019 г., 15:06 Tim Mackinnon tim@testit.works:

> Hi - I’m scratching my head over how to easily re-caegorise methods in
> calypso? I’ve overridden some methods in subclasses and picked up the wrong
> category (which the critic is slapping me for).
>
> But when I click on the method - I can’t drag it to the new category, so
> if I click on the pencil in the status line (or the current category name -
> not sure why they are independently clickable?) - it shows me a rather
> unhelpful list of protocols. I’m not sure where this list comes from as it
> doesn’t seem to include any of the protocols that are already in the class?
> (and those which I want to use?). So I have to start typing “acces” and can
> click on accessing…
>
> Am I missing a simple trick - or is this an area that needs some work?
>


Re: [Pharo-users] Pharo general questions for a commercial application

2019-02-20 Thread ducasse



> On 20 Feb 2019, at 17:23, BrunoBB  wrote:
> 
> Hi Esteban,
> 
> Nice to see you here too...
> 
> The web application will run Linux 64bits, the Pharo 64bits for Linux is
> stable or i should use a 32bit VM ?
> 
> Thanks for all the information slowly but surely we will implement this app.
> 
> Also it seems that Pharo has a very active community !!!

It is :)


> 
> regards,
> bruno
> 
> 
> 
> --
> Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html
> 





[Pharo-users] how to test, if the class has "shared identity" of instances in the whole image (SmallIntegers, Symbols...)

2019-02-20 Thread Petr Fischer via Pharo-users
--- Begin Message ---
Hello, some classes, like Symbols or SmallIntegers, shares identity of value 
instances in the whole image (I may say it wrong), so:

1 == 1 copy. [true]
#aaa == #aaa copy. [true]

all other classes not, like Strings, Objects etc., so:

'aaa' == 'aaa' copy. [false]

Is there any test method (maybe on the class side) I could ask for this (isXXX)?

Thanks! pf

--- End Message ---


Re: [Pharo-users] Pharo general questions for a commercial application

2019-02-20 Thread Sven Van Caekenberghe
Pharo 7/8 is 64-bits by default on macOS and Linux, no problems there.

> On 20 Feb 2019, at 17:23, BrunoBB  wrote:
> 
> Hi Esteban,
> 
> Nice to see you here too...
> 
> The web application will run Linux 64bits, the Pharo 64bits for Linux is
> stable or i should use a 32bit VM ?
> 
> Thanks for all the information slowly but surely we will implement this app.
> 
> Also it seems that Pharo has a very active community !!!
> 
> regards,
> bruno
> 
> 
> 
> --
> Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html
> 




Re: [Pharo-users] Pharo general questions for a commercial application

2019-02-20 Thread BrunoBB
Hi Esteban,

Nice to see you here too...

The web application will run Linux 64bits, the Pharo 64bits for Linux is
stable or i should use a 32bit VM ?

Thanks for all the information slowly but surely we will implement this app.

Also it seems that Pharo has a very active community !!!

regards,
bruno



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



Re: [Pharo-users] How to load a single package in a Metacello baseline

2019-02-20 Thread Sean P. DeNigris
Tim Mackinnon wrote
> Yeah - I have a similar issue with ExternalWebBrowser... that drags in...
> [a] huge raft of tests 

My workflow is to make every project one monolithic package until the need
to do otherwise is presented (like right now!). I used to carefully think
about theoretical use case scenarios and split projects up along those
lines, but management (especially with the tooling available at that time)
seemed to explode exponentially, so I went monolithic. After several years
of experience, this is the first time someone expressed a pain point (that I
remember anyway)! This seems to validate the current approach and my
suspicion that preemptively creating multiple packages is akin to premature
optimization.


Tim Mackinnon wrote
> I think what we have to do is submit pull requests to these projects such
> that they create better baselines with Groups

Yes! I will happily integrate. The tests may need to be promoted to a
package if they are currently in a tag, but 'Core' without and 'Tests' with
seems appropriate given your issue. I don't have a strong opinion on the
default but my guess is to leave it as is (i.e. all packages) because
newbies will get the tests (i.e. documentation) and advanced users will know
enough to customize.



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



Re: [Pharo-users] Pharo general questions for a commercial application

2019-02-20 Thread Eric Gade
>
> 2) For RDBMS forget about DBXTalk and Garage, I would suggest you go
> straight to the PostgreSQL client (P3) or SQLite. Those are maintained and
> used, the rest... who knows.
> If you need ORM you can use Glorp with any of those.
>

What about MySQL connectors -- is anyone in the community using this, and
what are the most up to date packages?

Also I think we should add a DBs section to the Pharo Open Documentation
(based on this
email exchange).


Re: [Pharo-users] Pharo general questions for a commercial application

2019-02-20 Thread Esteban Maringolo
Hi Bruno,

Is good to see you here as well :)

1) 7.0+. If you're in Windows only 32 bit is supported.

2) For RDBMS forget about DBXTalk and Garage, I would suggest you go
straight to the PostgreSQL client (P3) or SQLite. Those are maintained and
used, the rest... who knows.
If you need ORM you can use Glorp with any of those.

3) As Sven mentioned there are many options, there is people using Docker
containers managed by Docker Swarm, so the options are many. But if you use
Seaside with stateful sessions (you'll need affinity by session or IP).

Regards,

Esteban A. Maringolo


El mar., 19 feb. 2019 a las 22:27, BrunoBB ()
escribió:

> Hi,
>
> My name is Bruno i'been using Smalltalk since 1999 for commercial
> applications, mostly Dolphin, GemStone/S and Visual Works.
>
> Now we have a commercial project and we are going to use Pharo :)
>
> So we have some general questions.
>
> 1) Which version of Pharo to use in a production deployment 6.1 or 7.0 ?
>
> 2) We need a local database to Pharo app, which open source database is
> better to use with Pharo: mysql, postgree or  In term of packages for
> Pharo.
> There is https://guillep.github.io/DBXTalk/ but i do not know if is up to
> date.
>
> 3) There is any documentation about deployment and maintenance for a Pharo
> +
> Seaside app ?
> I have found "2016-10-06-EnterprisePharo.pdf" but may there are other
> sources...
>
> regards,
> bruno
>
>
>
> --
> Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html
>
>


Re: [Pharo-users] Pharo general questions for a commercial application

2019-02-20 Thread BrunoBB
Sven,

Thanks for you answer and links.

SQL will be enough and no need for a complex ORM.

I will take a look at:
https://github.com/svenvc/pharo-server-tools

Thanks again !

regards,
bruno

PS: my client has an running Java app and need another app to do some
functionality and they will give Smalltalk (Pharo) and opportunity. The apps
will be connected through a database and web services.




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



Re: [Pharo-users] [ANN] SETT (Store Export to Tonel Tools) for Pharo6.1

2019-02-20 Thread Esteban Maringolo
Hi Dale,

The issue I faced was a trivial one, but also easy to miss.
I installed a vanilla linux environment to run it, and git was not
initialized, so I needed to config the user.name and user.email global
settings.
So every time Sett executed `git` it was complaining about the missing
config.

In the docs it talks about Rowan, but I couldn't spot what is the Rowan
part in the repo, other than the "rowan" directory itself. There aren't any
Rowan related classes in the image.

Esteban A. Maringolo


El mar., 19 feb. 2019 a las 23:09, Dale Henrichs (<
dale.henri...@gemtalksystems.com>) escribió:

> Esteban,
>
> I'm glad that you are taking SETT for a spin.
>
> I am not familiar with the details of SETT, but if you could submit an
> issue[1] with the SETT project, then someone should be able to start
> looking into it:)
>
> I will ping them that you ran into issues ...
>
> Dale
>
> [1] https://github.com/GemTalk/SETT/issues
> On 2/19/19 4:36 PM, Esteban Maringolo wrote:
>
> Dale,
>
> I tried to test SETT to migrate a Package from Store to our repo.
>
> But it fails while initializing the git repository. I set the destination
> config to `isNewRepository := false`, then it works as expected.
>
> I'm testing it against the Cincom Public Repository, which being remote
> and full of code (and garbage), limiting by date isn't useful if I can't
> filter by a particular package name/pattern (I couldn't find such option).
>
> In any case, it's a helpful tool to ease the migration of code.
>
> Regards,
>
> Esteban A. Maringolo
>
>
> El mié., 16 ene. 2019 a las 18:18, Dale Henrichs via Pharo-users (<
> pharo-users@lists.pharo.org>) escribió:
>
>>
>> On 1/16/19 11:56 AM, Esteban Maringolo wrote:
>>
>> This is great!
>>
>> One less fence to move code from one dialect to another. :)
>>
>> I will follow the examples and try to export code from Store and load id
>> in Pharo.
>>
>> Is it mandatory to use Linux?
>>
>> We've only tested with Linux and it looks like the current code base is
>> wired to use Unix[1] 
>>
>> Dale
>>
>> [1]
>> https://github.com/GemTalk/SETT/blob/master/StoreImporter.package/SettGitRepository.class/instance/runGitWithArguments..st
>>
>>
>> Esteban A. Maringolo
>>
>>
>> El mié., 16 ene. 2019 a las 16:38, Dale Henrichs (<
>> dale.henri...@gemtalksystems.com>) escribió:
>>
>>> GemTalkSystems is pleased to announce SETT (Store Export to Tonel
>>> Tools)[1]. SETT is open source project with an MIT license.
>>>
>>> SETT (Store Export to Tonel Tools) is a set of tools to export Smalltalk
>>> code from Store and
>>> write into the Tonel file format managed using Git.
>>>
>>> SETT is:
>>>
>>>- a Pharo 6.1 application, that
>>>- connects to a Postgres Database
>>>- containing source code history in VisualWorks Store format; and
>>>- writes to a Git repository
>>>- in Tonel format
>>>- maintaining all version history, source code and SCM metadata.
>>>
>>> SETT was developed last year to support one of our commercial customers
>>> in their conversion From Store to Rowan[2]. Rowan artifacts are produced as
>>> part of the output of SETT, but the Rowan artifacts can be ignored. The
>>> important bit is that SETT converts from Store to Tonel and maintains
>>> version history in git.
>>>
>>> Please see the project ReadMe[3] and Wiki[4] for additional details.
>>>
>>> Dale
>>> [1] https://github.com/GemTalk/SETT
>>> [2] https://github.com/GemTalk/Rowan
>>> [3] https://github.com/GemTalk/SETT#overview
>>> [4] https://github.com/GemTalk/SETT/wiki
>>>
>>>
>>>


Re: [Pharo-users] Phorms repository?

2019-02-20 Thread Manuel Leuenberger
Found it.

RewriteTool (http://smalltalkhub.com/#!/~MarkRizun/RewriteTool/commits 
)
Phorms (http://smalltalkhub.com/#!/~CamilleTeruel/Patterns/commits 
)

Anybody has experience using these after Pharo 5, i.e. Pharo 6/7?

> On 19 Feb 2019, at 13:50, Manuel Leuenberger  wrote:
> 
> Hi,
> 
> I am looking into AST transformations and played with the RBPattern language, 
> which isn't quite powerful enough to do what I want to do (my matching 
> patterns are more complex). I found papers about Phorms, which seems like a 
> nice language to investigate. But I could not find any repository to load the 
> code from.
> 
> Where can I find the Phorms code?
> 
> Cheers,
> Manuel
> 
> 



Re: [Pharo-users] RBPattern syntax

2019-02-20 Thread Manuel Leuenberger
Hi Henrik,

Thanks for the the link. Interestingly, I was presented the same page on an old 
version, 
https://web.archive.org/web/20090227160738/http://st-www.cs.uiuc.edu/users/brant/Refactory/Rewrite.html
 
.
 Good to see, that there is still a maintained source.

As for the rule you presented, that is pretty cool, you got way closer to the 
goal than I did. John Brant mentioned that these kind of 
matches/transformations are not easily supported by RB by design, especially 
cascades seem to be problematic, as well as sequenced/nested message sends.

I am now looking into the RewriteTool 
(http://smalltalkhub.com/#!/~MarkRizun/RewriteTool/commits 
) and Phorms 
(http://smalltalkhub.com/#!/~CamilleTeruel/Patterns/commits 
), which seems to 
have a more powerful pattern matching language.

Cheers,
Manuel

> On 19 Feb 2019, at 14:04, Henrik Sperre Johansen 
>  wrote:
> 
> Manuel Leuenberger wrote
>> Hi,
>> 
>> I am looking into the RB pattern language for refactoring and I am having
>> trouble matching and replacing non-trivial pattern. Given the following
>> excerpt, I want to match "b shape 
>> 
>> ." and replace it with "b shape: [ :x | x 
>> 
>> ]"
>> 
>>  b shape circle
>>  size: 15;
>>  color: (Color veryLightGray alpha: 0.4);
>>  if: [ :value | toBeRed includes: value ] fillColor: Color red.
>> 
>> How can I do this? I tried using "b shape ``@messages", but this only
>> matches "b shape circle". Using "b shape `message `;middle; `;last" for
>> some reason then also matches the following, which I think it should not:
>> 
>>  b edges
>>  moveBehind;
>>  connectToAll: [ :v | 
>>  v \\ 20 ~~ 0
>>  ifTrue: [ Array with: v + 1 with: v + 20 ]
>>  ifFalse: [ Array with: v + 20 ] ].
>> 
>> There seems not be too much documentation about the pattern language, only
>> found tests, some short help description from RB and Yuriy's MatchTool.
>> How can I match the node correctly?
>> 
>> Cheers,
>> Manuel
> 
> The best documentation is at https://refactory.com/rewrite-tool/
> What isn't covered, is cascade nodes (`@;messages1), but my first naive
> attempt did not work as I expected on your example;
> '(b shape `@method: `@keywords) 
>   @;messages1: `@args'
> -> 
> 'b shape: [ :x |  
>   (x `@method: `@keywords) 
>  @;messages1: `@args ]'
> 
> b shape circle
>   size: 15;
>   color: (Color veryLightGray alpha: 0.4);
>   if: [ :value | toBeRed includes: value ] fillColor: Color red
> ->
> b
>   shape: [ :x | x circle size: 15 ];
>   shape: [ :x | x circle color: (Color veryLightGray alpha: 0.4) ];
>   shape: [ :x | x circle if: [ :value | toBeRed includes: value ]
> fillColor: Color red ]
> 
> 
> 
> --
> Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html
> 



Re: [Pharo-users] Pharo general questions for a commercial application

2019-02-20 Thread Sven Van Caekenberghe
Hi Bruno,

> On 20 Feb 2019, at 02:26, BrunoBB  wrote:
> 
> Hi, 
> 
> My name is Bruno i'been using Smalltalk since 1999 for commercial
> applications, mostly Dolphin, GemStone/S and Visual Works. 
> 
> Now we have a commercial project and we are going to use Pharo :) 

Great !

> So we have some general questions. 
> 
> 1) Which version of Pharo to use in a production deployment 6.1 or 7.0 ? 

7.0.1 for sure.

> 2) We need a local database to Pharo app, which open source database is
> better to use with Pharo: mysql, postgree or  In term of packages for
> Pharo. 
> There is https://guillep.github.io/DBXTalk/ but i do not know if is up to
> date. 

There are multiple options. I think with your background/experience, it comes 
down mostly to your own preferences. What do you like to use (SQL or not) ? How 
much assistance do you need (object mapper or not) ? 

There are also 

https://github.com/svenvc/P3 (a newer PostgreSQL client).

http://books.pharo.org/booklet-Voyage/ (non-SQL)

http://books.pharo.org/booklet-Glorp/ (Object Mapper)

...

> 3) There is any documentation about deployment and maintenance for a Pharo +
> Seaside app ? 
> I have found "2016-10-06-EnterprisePharo.pdf" but may there are other
> sources... 

Here too, you have many options, depending on style/experience. Like you said:

There is 
https://ci.inria.fr/pharo-contribution/job/EnterprisePharoBook/lastSuccessfulBuild/artifact/book-result/DeploymentWeb/DeployForProduction.html
 ?

You can also study this https://github.com/svenvc/pharo-server-tools

In any case, this is a solved problem (apart from session sharing, but you can 
get far with session affinity).

Please keep on asking questions, so that we can help you with your 
technology/stack POC.

Sven

> regards, 
> bruno
> 
> 
> 
> --
> Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html
> 




Re: [Pharo-users] Looking for a STON in/out "factory"

2019-02-20 Thread Cyril Ferlicot
On Wed, Feb 20, 2019 at 11:01 AM ducasse  wrote:
>
> Hi
>
> I would like to use STON to save objects that non programmer will edit.
> From that perspective I would like to be able to have a different class name
> than the one in the implementation.
>
> For example
> instead of
>
> 'SQOne{#question:''Where do developers typically write the Pharo 
> syntax?'',#choices:[''a stamp'',''an envelop'',''a 
> postcard''],#solution:3,#explanation:''It is common to say that the Pharo 
> syntax fits on a postcard.’'}
>
> having
>
> ‘OneChoice{#question:''Where do developers typically write the Pharo 
> syntax?'',#choices:[''a stamp'',''an envelop'',''a 
> postcard''],#solution:3,#explanation:''It is common to say that the Pharo 
> syntax fits on a postcard.’'}
>

Hi Steph,

In the class side of your class you need to override the method #stonName.

> I’m wondering if
> - there are hooks for that in STON so that I can inject a map. I look 
> super fast at the doc
> and browsing the code and I could not find them.
> - if someone build such kind of layers on top of STON
>
> Stef
>


-- 
Cyril Ferlicot
https://ferlicot.fr



Re: [Pharo-users] Looking for a STON in/out "factory"

2019-02-20 Thread Sven Van Caekenberghe
That is already provided, you should implement 

SQOne class>>#stonName
  ^ #OneChoice

Apart from that I would also use STON class>>#toStringPretty: or #prettyPrint: 
true on a writer, if the target audience are humans.

> On 20 Feb 2019, at 11:00, ducasse  wrote:
> 
> Hi 
> 
> I would like to use STON to save objects that non programmer will edit. 
> From that perspective I would like to be able to have a different class name 
> than the one in the implementation.
> 
> For example 
> instead of 
> 
> 'SQOne{#question:''Where do developers typically write the Pharo 
> syntax?'',#choices:[''a stamp'',''an envelop'',''a 
> postcard''],#solution:3,#explanation:''It is common to say that the Pharo 
> syntax fits on a postcard.’'}
> 
> having 
> 
> ‘OneChoice{#question:''Where do developers typically write the Pharo 
> syntax?'',#choices:[''a stamp'',''an envelop'',''a 
> postcard''],#solution:3,#explanation:''It is common to say that the Pharo 
> syntax fits on a postcard.’'}
> 
> I’m wondering if 
>   - there are hooks for that in STON so that I can inject a map. I look 
> super fast at the doc 
>   and browsing the code and I could not find them. 
>   - if someone build such kind of layers on top of STON
> 
> Stef
> 




[Pharo-users] Looking for a STON in/out "factory"

2019-02-20 Thread ducasse
Hi 

I would like to use STON to save objects that non programmer will edit. 
From that perspective I would like to be able to have a different class name 
than the one in the implementation.

For example 
instead of 

'SQOne{#question:''Where do developers typically write the Pharo 
syntax?'',#choices:[''a stamp'',''an envelop'',''a 
postcard''],#solution:3,#explanation:''It is common to say that the Pharo 
syntax fits on a postcard.’'}

having 

‘OneChoice{#question:''Where do developers typically write the Pharo 
syntax?'',#choices:[''a stamp'',''an envelop'',''a 
postcard''],#solution:3,#explanation:''It is common to say that the Pharo 
syntax fits on a postcard.’'}

I’m wondering if 
- there are hooks for that in STON so that I can inject a map. I look 
super fast at the doc 
and browsing the code and I could not find them. 
- if someone build such kind of layers on top of STON

Stef