[Pharo-users] [ANN] Package Formulas v1

2024-05-17 Thread Hernán Morales Durand
Hi everyone.

I've updated package formulas to work with Pharo 12 and Pharo 13.

You can find the project here: https://github.com/hernanmd/package-formulas

Let me know if there's any features you would like to see implemented.

Cheers,

Hernán


[Pharo-users] Re: Squeak By Example 5.3 book

2023-01-22 Thread Hernán Morales Durand
Probably you'd like to ask the Squeak mailing list instead of Pharo mailing
list?

Cheers,

Hernán

El vie, 20 ene 2023 a las 23:46,  escribió:

> There is a new edition of Squeak by Example which is now 5.3. Amazon is
> selling only the old edition from 2011. Can I upload the SBE 5.3 edition
> PDF to lulu.com and have it printed as a bound book?
>


[Pharo-users] [ANN] PI version 0.7

2022-12-30 Thread Hernán Morales Durand
Hello

"PI", which stands for "Pharo Install", is a command line interface (CLI)
to query and install Pharo packages: https://github.com/hernanmd/pi. With
PI you can install Pharo packages in a unix-like shell command line
interface. For example:

$ pi install ISO3166

To get your repository listed with the "pi list" command, just tag your
GitHub repository with "pharo". If there are multiple repositories with the
same name, you can disambiguate specifying the repository owner:

$ pi install user-name/repository-name

Please let me know if this tool is also useful to you; and do not hesitate
to ask a question that might appear using pi.

Enjoy,

Hernán


[Pharo-users] file-dialog

2022-08-31 Thread Hernán Morales Durand
Hi everyone,

I've been working to "rescue" the new file-dialog originally published by
Peter Uhnak with additions of other contributors. This should load in Pharo
10 and 11:

https://github.com/hernanmd/file-dialog

One thing I've been doing is trying to use it a little bit to evaluate its
usability and add details to improve the filters, make all tests pass and
minor issues for example.

As you can see there are some layout alignment details left, but they are
not so important as to make the dialog unusable.

Cheers,

Hernán


[Pharo-users] [ANN] Stemmer uFFI binding

2022-08-30 Thread Hernán Morales Durand
Hello,

Stemming is a well-known technique for information retrieval which maps
different forms of the same word to a common "stem". This, for example,
enables the grouping of words with the same root.

This new package provides a Pharo uFFI wrapper for the fast thread-safe C
library implementation (English stemmer). Check out details at:

https://github.com/hernanmd/libstemmer

Cheers,

Hernán


[Pharo-users] [ANN] Ethnologue

2022-08-22 Thread Hernán Morales Durand
Hi everyone,

This new project is an object model to access information about 7,500
languages from the Ethnologue data in Pharo.

The Ethnologue database is the most authoritative source of information on
languages around the world and includes the most comprehensive database
about languages. In this version, It identifies 7,500 languages currently
spoken worldwide.

Its use is intended mainly for linguistic purposes. It supports dialects,
creoles, mixed languages, etc. except for ancient, historical, and
constructed languages. See installation and usage examples in the GitHub
repository:

https://github.com/hernanmd/ethnologue

Let me know if you find this project useful, or any other ideas about the
project.

Cheers,

Hernán


[Pharo-users] [ANN] Badges

2022-08-17 Thread Hernán Morales Durand
Dear all,

I'd like to share a new Spec app for building badges made with Pharo 10. It is
based on the Shields.io badge service provider. Select the badges you want,
complete the required variables, and get your badge(s). You can also save
and load commonly used variables, so it may help a bit to automate
presenting your project's README.

See the install instructions and usage video at:

https://github.com/hernanmd/shield-badges

Please note that this is a 0.1 release, so there is certainly a lot of room
for improvement.
Cheers,

Hernán


[Pharo-users] [ANN] Shoco uFFI library

2022-08-15 Thread Hernán Morales Durand
Hi everyone,

I just wanted to share a small Pharo wrapper for a string compression C
library called "Shoco", implemented as a uFFI library. You can check it out
basic usage and information at:

https://github.com/hernanmd/libshoco

Best,

Hernán


[Pharo-users] [ANN] Package Formulas

2022-08-12 Thread Hernán Morales Durand
Hi everyone,

I have spent some time creating a new package manager UI for Pharo 10 to
simplify package finding and installation. It is a Spec application which
introduces a new concept: Package Formulas. These are just annotated
methods with an installation expression, so they do not depend on
Metacello, Gofer, Pakbot or any other package manager.

Some features are:

- Package Formulas already includes a predefined set of categorized
formulas.
- UI allows you to install packages in bulk.
- It is simple to create a script from selections.
- Scripts can be decorated with pre, post, and wrapper actions.
- You can request to list your own or recommended formulas by opening
issues from the UI.
  - Then the package formula will be reviewed to avoid naming conflicts,
and to prevent adding broken formulas.
  - The UI could be used with a custom container of your favorite,
validated, isolated or private formulas.
- (Currently) it does not automatically collect packages from remote
repositories or query on-line servers, however, you can easily jump to
browse a selected project homepage.
- License is MIT.

https://github.com/hernanmd/package-formulas

Hope you like it.
Best,

Hernán


[Pharo-users] Re: [ANN] P3 version 1.4

2022-06-16 Thread Hernán Morales Durand
Hi Sven,

I haven't had a chance to use it yet but the project looks very complete,
thank you very much for sharing.
Cheers,

Hernán

El mar, 31 may 2022 a las 12:09, Sven Van Caekenberghe ()
escribió:

> Hi,
>
> There is a new release of P3, the modern, lean and mean PostgreSQL client
> for Pharo.
>
> https://github.com/svenvc/P3
>
> https://github.com/svenvc/P3/releases/tag/v1.4
>
> I thank all contributors and users for their help and feedback: you make a
> real difference.
>
> Sven
>
> --
> Sven Van Caekenberghe
> Proudly supporting Pharo
> http://pharo.org
> http://association.pharo.org
> http://consortium.pharo.org


[Pharo-users] Re: BlockClosure folding

2022-03-15 Thread Hernán Morales Durand
This is an interesting pattern.
Thank you for sharing.

Hernán

El mar, 15 mar 2022 a las 4:43, Julián Maestri ()
escribió:

> Not satisfying the equality, but you can use polymorphism.
>
> Block >> , aBlock
> ^ BlockCompositor andAll: OrderedCollection with: self with: aBlock
>
> BlockCompositor >> #, aBlock
> conditions add: aBlock.
>
> BlockCompositor >> value: anObject
> ^ conditions allSatisfy: [:e | e value: anObject ]
>
> I don't really like the name BlockCompositor, but can't think of a better
> name at the moment.
>
> You could also implement logic for #or: using #+ and: #anySatisfy: for
> example, but need to safeguard against mixing both conditions.
>
> On Mon, 14 Mar 2022 at 22:29, Hernán Morales Durand <
> hernan.mora...@gmail.com> wrote:
>
>> I think I saw a coding pattern a while ago that allows you to do the
>> following:
>>
>> cond1 , cond2 , cond3 , cond4
>>
>> And providing a kind of folding selector condition #and: you would get:
>>
>> [ cond1 and: [ cond2 and: [ cond3 and: [ cond4 ] ] ] ].
>>
>> for example:
>>
>> conditions := [ : each | each firstName = 'Boca' ] ,
>> [ : each | each lastName = 'Baret' ] ,
>> [ : each | each fullName = 'Virgasia' ].
>>
>> such that the following assert is met:
>>
>> self assert: conditions equals: [ : each | each firstName = 'Boca' and: [
>> each lastName = 'Baret' and: [ each fullName = 'Virgasia' ] ] ].
>>
>> Any ideas or pointers?
>>
>> Cheers,
>>
>> Hernán
>>
>>


[Pharo-users] Re: BlockClosure folding

2022-03-15 Thread Hernán Morales Durand
Exactly. This was what I was looking for.
Thank you Sean.

Hernán


El mar, 15 mar 2022 a las 19:15,  escribió:

> ComplexCondition as described in Andres Valloud, "A Mentoring Course on
> Smalltalk"
> 
> is available at http://www.squeaksource.com/ComplexCondition.html
>
> With it, you can do something like:
>
> ^[a includes: $.], [b includes: $.]
> ifAllTrue: [a < b]
> ifAnyTrue: [b includes: $.]
> otherwise: [a > b]
>
>


[Pharo-users] BlockClosure folding

2022-03-14 Thread Hernán Morales Durand
I think I saw a coding pattern a while ago that allows you to do the
following:

cond1 , cond2 , cond3 , cond4

And providing a kind of folding selector condition #and: you would get:

[ cond1 and: [ cond2 and: [ cond3 and: [ cond4 ] ] ] ].

for example:

conditions := [ : each | each firstName = 'Boca' ] ,
[ : each | each lastName = 'Baret' ] ,
[ : each | each fullName = 'Virgasia' ].

such that the following assert is met:

self assert: conditions equals: [ : each | each firstName = 'Boca' and: [
each lastName = 'Baret' and: [ each fullName = 'Virgasia' ] ] ].

Any ideas or pointers?

Cheers,

Hernán


[Pharo-users] [ANN] license selector

2021-12-05 Thread Hernán Morales Durand
Hi everyone,

Today I released license-selector, a little Pharo Spec based application to
browse available licenses from the SPDX list (Software Package Data
Exchange, an open standard now published as ISO). It is also possible to
get updates for new licenses and export the license text to a file.

https://github.com/hernanmd/license-selector

Enjoy,

Hernán


[Pharo-users] [ANN] reprex-it

2021-11-29 Thread Hernán Morales Durand
Hi all,

I released reprex-it, an evaluator of Pharo code to formatted expressions,
useful for sharing evaluated scripts on Github or Discord for example, or
Microdown/Pillar books.

Check the usage demo at the repository at
https://github.com/hernanmd/reprex-it

Please let me know what you think, what's missing, ideas or any comments.
Also don't hesitate to open issues [1] if you experience some trouble.

Enjoy!

Hernán


[Pharo-users] Re: [ANN] DataFrame Inspector

2021-11-29 Thread Hernán Morales Durand
Hi Guille,

El lun, 29 nov 2021 a las 9:49, Guillermo Polito ()
escribió:

> Ahhh super nice!! thanks for sharing :)
>
> Is it by default in polymath?
>

Good idea :)
I opened an issue https://github.com/PolyMathOrg/PolyMath/issues/225

>
> How do you decide what to plot in the inspector pane? Or you by default
> always use histograms on every numerical column?
>
>
Exactly, only numeric columns get histograms.

Hernán


> G
>
> El 27 nov 2021, a las 17:23, Hernán Morales Durand <
> hernan.mora...@gmail.com> escribió:
>
> Hi everyone,
>
> I am glad to announce the first release of Data Inspector, a Pharo
> inspector extension to operate and view DataFrame multiple information in a
> same inspector view
>
> https://github.com/pharo-ai/data-inspector
>
> You may find installation instructions, features list, and example usage
> demo in the GitHub documentation README.
>
> Please let us know what you think, what's missing, ideas or any comments.
> Also don't hesitate to open issues [1] if you experience some trouble.
>
> Cheers!
>
> Hernán
>
> [1] https://github.com/pharo-ai/data-inspector/issues
>
>
>


[Pharo-users] [ANN] DataFrame Inspector

2021-11-27 Thread Hernán Morales Durand
Hi everyone,

I am glad to announce the first release of Data Inspector, a Pharo
inspector extension to operate and view DataFrame multiple information in a
same inspector view

https://github.com/pharo-ai/data-inspector

You may find installation instructions, features list, and example usage
demo in the GitHub documentation README.

Please let us know what you think, what's missing, ideas or any comments.
Also don't hesitate to open issues [1] if you experience some trouble.

Cheers!

Hernán

[1] https://github.com/pharo-ai/data-inspector/issues


[Pharo-users] Comparing source code declarations with #=

2021-04-22 Thread Hernán Morales Durand
Hi,

I want to compare Pharo (8) source code definitions. One source is already
"filed in" the image and the other source is in a .st file in chunk format
(the result of a file out). I've attached in this mail an example for
reproducibility. In my search for a simple equality operator, I found that
MCSnapshot(s) understand #= so it could be used like this:

| imageSnapshot fileSnapshot |

'MySampleClass.st' asFileReference fileIn.
imageSnapshot := (RPackageOrganizer default packageOf: MySampleClass)
mcPackage snapshot.
fileSnapshot := (MCStReader on: 'MySampleClass.st' asFileReference
readStream) snapshot.
imageSnapshot = fileSnapshot.

But to my surprise, the file snapshot from MCStReader is not reading the
class definitions, so comparing them should answer  (assuming nothing
has been modified) but it always returns .

I've also seen that both Ring chunk importers do not read methods.

(RingChunkImporter fromStream: 'MySampleClass.st' asFileReference
readStream) packages collect: #allMethods.
(RGChunkImporter fromStream: 'MySampleClass.st' asFileReference readStream)
packages collect: #allMethods.

The only "solution" I've found so far is to read into CodeChunk's and then
implement the #=

CodeImporter chunksFromFileNamed: 'MySampleClass.st'.

But I don't like it and also I think there should be a clever way to
compare source between image and .st declarations.

Any ideas?

Hernán


MySampleClass.st
Description: Binary data


[Pharo-users] [ANN] Merlin to GitHub

2021-04-21 Thread Hernán Morales Durand
Hi

I just ported Merlin to Github with the GitMigrator. Please let me know if
you want me to transfer the repository since this is mostly work of the
Moose Team.

https://github.com/hernanmd/merlin

Cheers,

Hernán


[Pharo-users] Re: [Pharo-dev] Pharo - GSOC 2021

2021-03-11 Thread Hernán Morales Durand
Congratulations :-)

Hernán

El jue, 11 mar 2021 a las 7:34, Serge Stinckwich (<
serge.stinckw...@gmail.com>) escribió:

> Dear all,
>
> great news I want to share with you: Pharo has been selected to be part of
> GSOC 2021
>
>
> https://summerofcode.withgoogle.com/organizations/?sp-search=pharo#4667274369171456
>
> Thank you to the great team of admins for making this happen: Oleksandr
> Zaitsev, Gordana Rakic and Juan Pablo Sandoval Alcocer !
>
> We will send updates soon on the student selection process soon.
> Regards,
> --
> Serge Stinckwic
> h
> https://twitter.com/SergeStinckwich
>


[Pharo-users] Re: Is there a way to load a dependent repository of assets that doesn't have a baseline - in my Metacello baseline?

2021-01-26 Thread Hernán Morales Durand
You mean something like this?

https://github.com/hernanmd/MetacelloFileDownload


El mar, 26 ene 2021 a las 23:57, Tim Mackinnon ()
escribió:

> Hi - I’m trying to create a baseline for my project so that it includes a
> dependent repository that has some assts but no code. Is there a way to do
> this in Metacello - I have a baseline dependencies like the following - and
> its the last line that fails as it not really a repo with a baseline in it
> - so Metacello signals an error - but I’m wondering if there is something I
> can do to just load that repo without considering it as a baseline - I’m
> after something like:
>
>  spec resources: 'CP-ClientEnvironment' with: [  spec
> repository:
> 'github://ErikOnBike/CP-ClientEnvironment' ].
>
>
> This is what I have to give an idea - possibly I could catch the exception
> and resume - or is there some cunning way (maybe even a post load script or
> something)?
>
> setUpDependencies: spec
>
> spec
> baseline: 'ZincHTTPComponents' with: [ spec
> repository: 'github://svenvc/zinc';
> loads: #('Core' 'WebSocket') ].
>
> spec
> baseline: 'CodeParadise' with: [  spec
> repository:
> 'github://ErikOnBike/CodeParadise/repository' ].
>
> spec
> baseline: 'CP-ClientEnvironment' with: [  spec
> repository:
> 'github://ErikOnBike/CP-ClientEnvironment' ].
>
>
>
>
> Tim
>
>


[Pharo-users] Re: GSOC 2021

2020-11-17 Thread Hernán Morales Durand
Hi Serge,
I tried to register but it says "coming soon":
https://summerofcode.withgoogle.com/terms/mentor
I can help to write some proposals.

Cheers,

Hernán


El lun., 26 oct. 2020 a las 23:05, Serge Stinckwich (<
serge.stinckw...@gmail.com>) escribió:

> GSOC 2021 is out: https://summerofcode.withgoogle.com/
> Anyone is willing to lead the Pharo proposal?
>
> Regards,
> --
> Serge Stinckwic
> h
> https://twitter.com/SergeStinckwich
>


[Pharo-users] Re: [Pharo-dev] [Ann] Pharo new version available & mooc needs subtitle translaters

2020-11-09 Thread Hernán Morales Durand
El mié., 4 nov. 2020 a las 5:30, Stéphane Ducasse (<
stephane.duca...@inria.fr>) escribió:

> Hello
>
> We are about to launch the new version of the Pharo mooc. Spread the word
> around you. It will open the 9th of november
> https://www.fun-mooc.fr/courses/course-v1:inria+41024+session01/about
>
>
> This new version contains
> 70 new videos about the Pharo ide (in french and english voice) + subtitles
> better english dubs
>
> Now we are looking for help for the subtitles
> All the subtitles of the previous mooc and the new ones are at
>
> https://github.com/pharo-mooc/PharoMooc/tree/master/2020-All-Subtitles-Reorganized
> The new ones in folders named C048SD or 2018-Prese*
> The old ones in folders named C019SD.
>


I will help to translate the new ones to Spanish.

Cheers,

Hernán


[Pharo-users] Re: how can I improve this

2020-09-14 Thread Hernán Morales Durand
Hi Roelof,

Maybe something like this:

String>>hammingDistanceTo: aString
" Answer the amount of substitutions between the receiver and
aString. Both must be of equal length "

^ (1 to: self size) count: [ : i | (self at: i) ~= (aString at: i) ]


El lun., 14 sept. 2020 a las 16:15, Roelof Wobben via Pharo-users (<
pharo-users@lists.pharo.org>) escribió:

> Hello,
>
> I have solved the hamming challenge of exercism where I have to find in
> how many places two strings are different.
>
> my solution is :
>
> distanceStrand1: aString strand2: aString2
>  aString size == aString2 size
>  ifFalse: [ DomainError signal: (self messageFor: aString
> strand2: aString2) ].
>  ^ (1 to: aString size)
>  sumNumbers: [ :index |
>  (aString at: index) == (aString2 at: index)
>  ifTrue: [ 0 ]
>  ifFalse: [ 1 ] ]
>
>
> messageFor: aString strand2: aString2
>  aString notEmpty & aString2 notEmpty
>  ifTrue: [ ^ 'left and right strands must be of equal length' ].
>  aString ifEmpty: [ ^ 'left strand must not be empty' ].
>  ^ 'right strand must not be empty'
>
>
> Can this be improved?
>
> Roelof
>


Re: [Pharo-users] Cmd+s in P8 not captured using Commander (works in P9) and SpTextPresenter

2020-08-01 Thread Hernán Morales Durand
For the record, a workaround is to send #whenTextIsAcceptedDo: to the
SpTextPresenter.

Cheers,

Hernán

El jue., 30 jul. 2020 a las 0:10, Hernán Morales Durand (<
hernan.mora...@gmail.com>) escribió:

> I found a difference in shortcut handling between Pharo 8 and Pharo 9
> which you can reproduce with the attached minimum working example. In the
> example, the halt in the Command's #execute method in P9 is sent but not in
> P8.
>
> SpComm2SaveTextMWE show.
>
> The problem seems to be Pharo 8 doesn't execute the KMKeymap callback
> configured for Cmd+s in SpKMCategoryBuilder>>visitCommand: while Pharo 9
> does.
>
> In some way the only way to capture the Accept keypress is to modify the
> #buildShortcutsOn: method in RubTextEditor, but I'd like to avoid such
> approach.
>
> Is there any workaround to this?
>
> Cheers,
>
> Hernán
>
>


[Pharo-users] Cmd+s in P8 not captured using Commander (works in P9) and SpTextPresenter

2020-07-29 Thread Hernán Morales Durand
I found a difference in shortcut handling between Pharo 8 and Pharo 9 which
you can reproduce with the attached minimum working example. In the
example, the halt in the Command's #execute method in P9 is sent but not in
P8.

SpComm2SaveTextMWE show.

The problem seems to be Pharo 8 doesn't execute the KMKeymap callback
configured for Cmd+s in SpKMCategoryBuilder>>visitCommand: while Pharo 9
does.

In some way the only way to capture the Accept keypress is to modify the
#buildShortcutsOn: method in RubTextEditor, but I'd like to avoid such
approach.

Is there any workaround to this?

Cheers,

Hernán


SpComm2SaveTextMWE.st
Description: Binary data


Re: [Pharo-users] A question concerning Nautilus

2020-07-13 Thread Hernán Morales Durand
Hi Rene,

Nautilus was replaced in Pharo 8 by Calypso (ClyFullBrowser)

Cheers,

Hernán

El lun., 13 jul. 2020 a las 11:42, Rene Paul Mages (ramix) (<
ph...@rmages.com>) escribió:

> Hello,
>
> In the chapter 2 ( A quick tour of Pharo )  of this book :
>
> https://github.com/SquareBracketAssociates/UpdatedPharoByExample
>
>  we can read :
>
> http://ramix.org/pharo/UpdatePBE/TheSystemBrowser.png
>
> When I "do it" the following code Nautilus don't open on the method
> factorial :
>
> http://ramix.org/pharo/UpdatePBE/Nautilus.png
>
> I am running Pharo version 8.0. under a 64 bits Linux machine.
>
> --
> Thanks for your help
> Rene Paul Mages ( GnuPG_key 0x9840A6F7 )
> http://www.pharo.fr
> http://www.linux-azur.org/ramix
> http://twitter.com/RenePaulMages
>
>
>
>
>


Re: [Pharo-users] Diacritics in github

2020-07-13 Thread Hernán Morales Durand
Hi Alistair,

You can install it like this from Github:

Metacello new
baseline: 'Diacriticals';
repository: 'github://hernanmd/Diacriticals';
load

Cheers,

Hernán



El lun., 13 jul. 2020 a las 10:19, Alistair Grant ()
escribió:

> Hi All,
>
> Is anyone aware of a port of Diacritics from smalltalkhub to github?
>
> MCSmalltalkhubRepository
> owner: 'hernan'
> project: 'Diacritics'
> user: ''
> password: ''
>
> I'm way behind in reading the pharo lists, but I couldn't find any
> reference to this.
>
> If not, I'll try and make a port, but it will be without history.
>
> Thanks,
> Alistair
>
>


Re: [Pharo-users] [ANN] Launchpad v3.0.0 [v3.0.0] released!

2020-06-30 Thread Hernán Morales Durand
Hi guys,

First thank you for sharing this. Seems to be very useful.
I found the Example Handler is missing in the How To:
https://github.com/ba-st/Launchpad/blob/release-candidate/docs/HowTo.md

Should I look somewhere else?

Cheers,

Hernán

El lun., 29 jun. 2020 a las 14:16, Buenos Aires Smalltalk (<
git...@fast.org.ar>) escribió:

> Launchpad , the entrypoint for your
> Pharo application reached it's v3.0.0
>  version.
> Breaking Changes
>
>- Handlers must now subclass LaunchpadCommandLineHandler instead of
>ApplicationStarterCommandLineHandler
>- Pharo 6.1 is no longer supported
>
> Non breaking changes
>
>- PR #7 Fix --suspend-ui flag when the image is already headless
>- Added Pharo 8 to the build matrix
>- Use GitHubActions and CodeCov
>
> Regards,
>
> The Buenos Aires Smalltalk team
>


Re: [Pharo-users] [Pharo-dev] [ANN] PharoPro

2020-06-17 Thread Hernán Morales Durand
Hi Norbert,

This is really good news for the community.
I wish you all the best for this initiative!

Cheers,

Hernán

El mié., 17 jun. 2020 a las 5:35, Norbert Hartl ()
escribió:

> Dear community,
>
> we are very proud to announce the availability of PharoPro, a company that
> offers professional support for the pharo platform. Our mission is to
> enable people and companies to secure their business when building products
> with pharo.
>
> We have been tinkering with the idea creating it for a long time. We
> talked to a lot of people, especially at last ESUG in cologne and finally
> decided to do it. So at the end of last year we founded the company
> PharoPro. Obstacles (one being covid-19) kept us from make it public until
> today.
>
> In close relationship with the pharo consortium our mission is to extend
> the market opportunities for pharo.
> Although PharoPro is new and still small we want to show our commitment to
> the consortium and the community from the start. We decided therefor that
> PharoPro will join the pharo consortium as platinum member.
>
> Our plans apart from support contracts is to have an LTS (long term
> support) version of pharo, create a professional pharo ecosystem with
> libraries and frameworks and to help out building the infrastructure pharo
> needs.
>
> We are still shaping up. We want to know your requirements and needs that
> help us deciding what are the most needed things. So you might visit
>
> http://pharo-pro.com
>
> and then come talk to us.
>
> Best regards and health,
>
> Norbert
> PharoPro GmbH
>


Re: [Pharo-users] shape file reading

2020-06-06 Thread Hernán Morales Durand
Done!

Cheers

Hernán

El sáb., 6 jun. 2020 a las 3:17, Stéphane Ducasse (<
stephane.duca...@inria.fr>) escribió:

> Please add this to the readme :)
>
>
> On 5 Jun 2020, at 23:19, Hernán Morales Durand 
> wrote:
>
>
>
> El vie., 5 jun. 2020 a las 9:27, Baveco, Hans ()
> escribió:
>
>> Well, it appears that simple direct downloading does not download the
>> real shapefile. Taking care to actually get a shapefile, the result loads
>> without problems.
>>
>> ne_110m_populated_places.shp is a PointShape with 243 shapes (points). If
>> you display it on a Form (#displayMorphic) you won’t see much (243 hardly
>> visible dots).
>>
>>
>>
>
> I checked and my previous download method was completely wrong. Now
> switching from ZnEasy to ZnClient to download and it works nicely:
>
>  | shpE legend urlRoot urlESRIFilePrefix urlESRIFileShp urlPath response
> fileRef |
>
> " Download Shapefile resources "
> urlRoot := '
> https://github.com/nvkelso/natural-earth-vector/blob/master/110m_cultural/
> '.
> urlESRIFilePrefix := 'ne_110m_populated_places'.
> urlESRIFileShp := urlESRIFilePrefix , '.shp'.
> urlPath := urlRoot , urlESRIFilePrefix.
>
> #('.shx' '.dbf' '.shp' '.cpg' '.prj') do: [ : ext |
>   ZnClient new
>url: (urlPath , ext) asZnUrl;
>queryAt: 'raw' put: 'true';
>numberOfRetries: 2;
>enforceHttpSuccess: true;
>downloadTo: urlESRIFilePrefix , ext;
>get ].
>
> " Load and display it in Morphic "
> shpE := ShapeEnsemble fromFile: urlESRIFileShp.
> " List data fields "
> shpE dataFields inspect.
> " List all shape records "
> shpE shapeRecords inspect.
> " Set the current attribute "
> shpE attribute: 'NAME'.
>
> legend := ColorLegend mapValuesToRandom: shpE valuesOfCurrentAttribute.
> shpE legend: legend.
>
> shpE displayMorphic.
>
>
>> With an application for vector graphics (Roassal?) that can read &
>> display the vector data we would get much nicer maps...
>>
>>
>>
>> Hans
>>
>>
>>
>> *From:* Baveco, Hans 
>> *Sent:* vrijdag 5 juni 2020 12:44
>> *To:* Any question about pharo is welcome 
>> *Subject:* [Pharo-users] shape file reading
>>
>>
>>
>> Hi Hernan
>>
>>
>>
>> I downloaded this shapefile directly via the browser. Indeed it won’t
>> load, the type of shape file returned is
>>
>> self longAt: 33 bigEndian: false -> 577660194
>>
>>
>>
>>
>>
>> where it should have answered an Integer between 0 and 31
>>
>>
>>
>> shapeType
>>
>>  "position 32, Integer between 0 and 31, Little Endian"
>>
>>
>>
>>  ^shpBytes longAt: 33 bigEndian: false
>>
>>
>>
>>
>>
>> No idea what could be the cause – apparently the header of the file (the
>> first 100 bytes) is not ok...
>>
>>
>>
>> Hans
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> You mean some types are missing? Because I get this error when I try to
>> read some SHP files: "Types > 20 are not yet accounted for"
>>
>>
>>
>> I wrote this script to reproduce:
>>
>>
>>
>>  | shpE legend urlRoot urlESRIFilePrefix urlESRIFileShp urlPath response
>> fileRef |
>>
>> " Download Shapefile resources "
>> urlRoot := '
>> https://github.com/nvkelso/natural-earth-vector/blob/master/110m_cultural/
>> '.
>> urlESRIFilePrefix := 'ne_110m_populated_places'.
>> urlESRIFileShp := urlESRIFilePrefix , '.shp'.
>> urlPath := urlRoot , urlESRIFilePrefix.
>>
>> #('.shx' '.dbf' '.shp') do: [ : ext |
>> | url |
>> url :=  (urlPath , ext , '?raw=true') asZnUrl.
>> (response := ZnEasy get: url) isSuccess
>> ifFalse: [ self error: 'Cannot download file' ].
>> fileRef := FileSystem disk workingDirectory / (urlESRIFilePrefix , ext).
>> fileRef writeStreamDo: [ : stream |
>> stream nextPutAll: ((ZnByteEncoder newForEncoding: 'koi8r') decodeBytes:
>> response contents ) ] ].
>>
>>
>>
>> Once downloaded:
>>
>>
>>
>> | urlESRIFilePrefix urlESRIFileShp shpE |
>> urlESRIFilePrefix := 'ne_110m_populated_places'.
>> urlESRIFileShp := urlESRIFilePrefix , '.shp'.
>>
>> " Load and display it in Morphic "
>> shpE := ShapeEnsemble fromFile: urlESRIFileShp.
>>
>>
>>
>> Maybe it's related with the fact they are encoded as koi8r?
>>
>> I checked with Zinc downloading first from the browser:
>>
>>
>>
>> | shpFile |
>>
>> shpFile := 'ne_110m_admin_0_countries.shp' asFileReference.
>> [ shpFile binaryReadStreamDo: [ : in |
>> (ZnCharacterEncoder detectEncoding: in upToEnd)
>> identifier ] ]
>> on: ZnCharacterEncodingError
>> do: [ nil ].
>>
>>
>>
>>
>>
>> Cheers,
>>
>>
>>
>> Hernán
>>
>>
>>
>>
>>
>>
> 
> Stéphane Ducasse
> http://stephane.ducasse.free.fr / http://www.pharo.org
> 03 59 35 87 52
> Assistant: Aurore Dalle
> 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] shape file reading

2020-06-05 Thread Hernán Morales Durand
El vie., 5 jun. 2020 a las 9:27, Baveco, Hans ()
escribió:

> Well, it appears that simple direct downloading does not download the real
> shapefile. Taking care to actually get a shapefile, the result loads
> without problems.
>
> ne_110m_populated_places.shp is a PointShape with 243 shapes (points). If
> you display it on a Form (#displayMorphic) you won’t see much (243 hardly
> visible dots).
>
>
>

I checked and my previous download method was completely wrong. Now
switching from ZnEasy to ZnClient to download and it works nicely:

 | shpE legend urlRoot urlESRIFilePrefix urlESRIFileShp urlPath response
fileRef |

" Download Shapefile resources "
urlRoot := '
https://github.com/nvkelso/natural-earth-vector/blob/master/110m_cultural/'.
urlESRIFilePrefix := 'ne_110m_populated_places'.
urlESRIFileShp := urlESRIFilePrefix , '.shp'.
urlPath := urlRoot , urlESRIFilePrefix.

#('.shx' '.dbf' '.shp' '.cpg' '.prj') do: [ : ext |
  ZnClient new
   url: (urlPath , ext) asZnUrl;
   queryAt: 'raw' put: 'true';
   numberOfRetries: 2;
   enforceHttpSuccess: true;
   downloadTo: urlESRIFilePrefix , ext;
   get ].

" Load and display it in Morphic "
shpE := ShapeEnsemble fromFile: urlESRIFileShp.
" List data fields "
shpE dataFields inspect.
" List all shape records "
shpE shapeRecords inspect.
" Set the current attribute "
shpE attribute: 'NAME'.

legend := ColorLegend mapValuesToRandom: shpE valuesOfCurrentAttribute.
shpE legend: legend.

shpE displayMorphic.


> With an application for vector graphics (Roassal?) that can read & display
> the vector data we would get much nicer maps...
>
>
>
> Hans
>
>
>
> *From:* Baveco, Hans 
> *Sent:* vrijdag 5 juni 2020 12:44
> *To:* Any question about pharo is welcome 
> *Subject:* [Pharo-users] shape file reading
>
>
>
> Hi Hernan
>
>
>
> I downloaded this shapefile directly via the browser. Indeed it won’t
> load, the type of shape file returned is
>
> self longAt: 33 bigEndian: false -> 577660194
>
>
>
>
>
> where it should have answered an Integer between 0 and 31
>
>
>
> shapeType
>
>  "position 32, Integer between 0 and 31, Little Endian"
>
>
>
>  ^shpBytes longAt: 33 bigEndian: false
>
>
>
>
>
> No idea what could be the cause – apparently the header of the file (the
> first 100 bytes) is not ok...
>
>
>
> Hans
>
>
>
>
>
>
>
>
>
> You mean some types are missing? Because I get this error when I try to
> read some SHP files: "Types > 20 are not yet accounted for"
>
>
>
> I wrote this script to reproduce:
>
>
>
>  | shpE legend urlRoot urlESRIFilePrefix urlESRIFileShp urlPath response
> fileRef |
>
> " Download Shapefile resources "
> urlRoot := '
> https://github.com/nvkelso/natural-earth-vector/blob/master/110m_cultural/
> '.
> urlESRIFilePrefix := 'ne_110m_populated_places'.
> urlESRIFileShp := urlESRIFilePrefix , '.shp'.
> urlPath := urlRoot , urlESRIFilePrefix.
>
> #('.shx' '.dbf' '.shp') do: [ : ext |
> | url |
> url :=  (urlPath , ext , '?raw=true') asZnUrl.
> (response := ZnEasy get: url) isSuccess
> ifFalse: [ self error: 'Cannot download file' ].
> fileRef := FileSystem disk workingDirectory / (urlESRIFilePrefix , ext).
> fileRef writeStreamDo: [ : stream |
> stream nextPutAll: ((ZnByteEncoder newForEncoding: 'koi8r') decodeBytes:
> response contents ) ] ].
>
>
>
> Once downloaded:
>
>
>
> | urlESRIFilePrefix urlESRIFileShp shpE |
> urlESRIFilePrefix := 'ne_110m_populated_places'.
> urlESRIFileShp := urlESRIFilePrefix , '.shp'.
>
> " Load and display it in Morphic "
> shpE := ShapeEnsemble fromFile: urlESRIFileShp.
>
>
>
> Maybe it's related with the fact they are encoded as koi8r?
>
> I checked with Zinc downloading first from the browser:
>
>
>
> | shpFile |
>
> shpFile := 'ne_110m_admin_0_countries.shp' asFileReference.
> [ shpFile binaryReadStreamDo: [ : in |
> (ZnCharacterEncoder detectEncoding: in upToEnd) identifier
> ] ]
> on: ZnCharacterEncodingError
> do: [ nil ].
>
>
>
>
>
> Cheers,
>
>
>
> Hernán
>
>
>
>
>
>


[Pharo-users] Fwd: GIS support for Pharo

2020-06-05 Thread Hernán Morales Durand
-- Forwarded message -
De: Hernán Morales Durand 
Date: vie., 5 jun. 2020 a las 16:54
Subject: Re: [Pharo-users] GIS support for Pharo
To: Baveco, Hans 




El vie., 5 jun. 2020 a las 4:27, Baveco, Hans ()
escribió:

> Thanks Hernan!
>
>
>
> I will try to find out what the problem is with your shape file.
>
>
>
> Btw is the code for reading/writing dbf files already available on github?
>
>
>

Yes it is: https://github.com/hernanmd/XBase

Cheers,

Hernán



> Hans
>
>
>
> *From:* Hernán Morales Durand 
> *Sent:* vrijdag 5 juni 2020 0:25
> *To:* Any question about pharo is welcome 
> *Subject:* Re: [Pharo-users] GIS support for Pharo
>
>
>
> Hi Hans,
>
>
>
>
>
> El jue., 4 jun. 2020 a las 6:07, Baveco, Hans ()
> escribió:
>
> Would be an interesting project..
>
> An old link to possibly still useful code:
>
>
>
> http://wiki.squeak.org/squeak/3317
>
>
>
>
>
> Btw the shapefile support, from the ESRI spec, was done by me and is still
> available on http://www.squeaksource.com/@CUT95k_uXmPU4uXY/HCmgtrop.
>
>
>
> Thank you for the clarification (and actually sharing your work with ESRI
> files!)
>
> I added proper credits in the Github forked repo :
> https://github.com/hernanmd/Shapes
>
>
>
> I use it daily. I may have some fixes/additions, but in general the code
> as provided works well (I suppose the code at smalltalkhub is still mostly
> the same). Some shapefile formats are still missing, mostly because I never
> encountered them..
>
>
>
> You mean some types are missing? Because I get this error when I try to
> read some SHP files: "Types > 20 are not yet accounted for"
>
>
>
> I wrote this script to reproduce:
>
>
>
>  | shpE legend urlRoot urlESRIFilePrefix urlESRIFileShp urlPath response
> fileRef |
>
> " Download Shapefile resources "
> urlRoot := '
> https://github.com/nvkelso/natural-earth-vector/blob/master/110m_cultural/
> '.
> urlESRIFilePrefix := 'ne_110m_populated_places'.
> urlESRIFileShp := urlESRIFilePrefix , '.shp'.
> urlPath := urlRoot , urlESRIFilePrefix.
>
> #('.shx' '.dbf' '.shp') do: [ : ext |
> | url |
> url :=  (urlPath , ext , '?raw=true') asZnUrl.
> (response := ZnEasy get: url) isSuccess
> ifFalse: [ self error: 'Cannot download file' ].
> fileRef := FileSystem disk workingDirectory / (urlESRIFilePrefix , ext).
> fileRef writeStreamDo: [ : stream |
> stream nextPutAll: ((ZnByteEncoder newForEncoding: 'koi8r') decodeBytes:
> response contents ) ] ].
>
>
>
> Once downloaded:
>
>
>
> | urlESRIFilePrefix urlESRIFileShp shpE |
> urlESRIFilePrefix := 'ne_110m_populated_places'.
> urlESRIFileShp := urlESRIFilePrefix , '.shp'.
>
> " Load and display it in Morphic "
> shpE := ShapeEnsemble fromFile: urlESRIFileShp.
>
>
>
> Maybe it's related with the fact they are encoded as koi8r?
>
> I checked with Zinc downloading first from the browser:
>
>
>
> | shpFile |
>
> shpFile := 'ne_110m_admin_0_countries.shp' asFileReference.
> [ shpFile binaryReadStreamDo: [ : in |
> (ZnCharacterEncoder detectEncoding: in upToEnd) identifier
> ] ]
> on: ZnCharacterEncodingError
> do: [ nil ].
>
>
>
>
>
> Cheers,
>
>
>
> Hernán
>
>
>
> To read a complete shapefile one also needs to read dbf files. This was
> another substantial effort
> http://www.squeaksource.com/@Y4HhnL90iyA2TmAb/X0sPqshM; luckily  there
> was an older implementation.available to build upon.
>
> Not sure whether nowadays there are other ways to read/write files old
> DBASE format files...
>
>
>
> Cheers,
>
>
>
> Hans Baveco
>
>
>
>
>
>
>
>
>
> *From:* Serge Stinckwich 
> *Sent:* donderdag 4 juni 2020 5:32
> *To:* Any question about pharo is welcome 
> *Subject:* [Pharo-users] GIS support for Pharo
>
>
>
> Dear all,
>
>
>
> there was already some discussion in the list about GIS support for Pharo
> previously.
>
>
>
> Working on CORMAS multi-agent simulation platform:
> https://github.com/cormas/cormas some developers feel the need to have
> more GIS support for Pharo.
>
>
>
> I know of existing GIS software:
>
> - GeoJSON by Zweidenker: https://github.com/zweidenker/GeoJSON
>
> - ESRI ascii raster, done by Stephane recently:
> https://github.com/Ducasse/ESRI-ASCII-Raster
>
> - shapefile support by Hernan: http://smalltalkhub.com/#!/~hernan/Shapes
>
> (to be moved to github)
>
> - I found this project also: http://www.squeaksource.com/gekon.html
>
>
>
> I know that Etienne Delay is also interested by GIS support and propose to
> implement OpenGIS model support:
> https://github.com/cormas/cormas/issues/139
>
>
>
> Can we try to unite and maybe create a pharo-GIS organization on github to
> federate our efforts?
>
>
> Cheers,
>
> --
>
> Serge Stinckwic
>
> h
>
> https://twitter.com/SergeStinckwich
>
>
>
>


Re: [Pharo-users] GIS support for Pharo

2020-06-05 Thread Hernán Morales Durand
El vie., 5 jun. 2020 a las 5:03, Stéphane Ducasse (<
stephane.duca...@inria.fr>) escribió:

> Serge I was thinking that it would be good to create pharo-gis
> organisation.
> What do you and the others think?
>
>
I think it is a good idea!

Cheers,

Hernán


> S
>
> On 5 Jun 2020, at 03:46, Serge Stinckwich 
> wrote:
>
> Hi Todd,
>
> you can join. Everyone is welcome.
> GDAL FFI integration would be great, but this is a lot of work I guess.
>
> Regards,
>
> On Fri, Jun 5, 2020 at 2:34 AM Todd Blanchard via Pharo-users <
> pharo-users@lists.pharo.org> wrote:
>
>> Hi Serge,
>>
>> I would love to participate in getting some GIS features into Pharo.  I
>> think it would be a fantastic platform for GIS.
>>
>> My personal orientation is doing marine navigation (have boat with
>> sensors, want boat to be be smarter about navigation).
>>
>> My main interests is in being able to render S57/S52 formats.  There are
>> a number of boat fans that balk at the price of expensive chart plotter
>> computers and software.
>>
>> They have given rise to some DIY stuff.  Some of it just rips code
>> straight out of https://gdal.org - I think possibly a FFI integration
>> with gdal might be an amazing resource.
>>
>> I am time constrained for when I can work on this stuff but would like it
>> a lot if we at least had some core data types for simple things like
>> lat/lng, regions (polygons), and a decent general map renderer.
>>
>> Anyhow, please include me in any conversations.  Navigation (both air and
>> sea) are two things I have an interest in.
>>
>> On Jun 3, 2020, at 8:31 PM, Serge Stinckwich 
>> wrote:
>>
>> Dear all,
>>
>> there was already some discussion in the list about GIS support for Pharo
>> previously.
>>
>> Working on CORMAS multi-agent simulation platform:
>> https://github.com/cormas/cormas some developers feel the need to have
>> more GIS support for Pharo.
>>
>> I know of existing GIS software:
>> - GeoJSON by Zweidenker: https://github.com/zweidenker/GeoJSON
>> - ESRI ascii raster, done by Stephane recently:
>> https://github.com/Ducasse/ESRI-ASCII-Raster
>> - shapefile support by Hernan: http://smalltalkhub.com/#!/~hernan/Shapes
>> (to be moved to github)
>> - I found this project also: http://www.squeaksource.com/gekon.html
>>
>> I know that Etienne Delay is also interested by GIS support and propose
>> to implement OpenGIS model support:
>> https://github.com/cormas/cormas/issues/139
>>
>> Can we try to unite and maybe create a pharo-GIS organization on github
>> to federate our efforts?
>>
>> Cheers,
>> --
>> Serge Stinckwic
>> h
>> https://twitter.com/SergeStinckwich
>>
>>
>>
>
> --
> Serge Stinckwic
> h
> https://twitter.com/SergeStinckwich
>
>
> 
> Stéphane Ducasse
> http://stephane.ducasse.free.fr / http://www.pharo.org
> 03 59 35 87 52
> Assistant: Aurore Dalle
> 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] GIS support for Pharo

2020-06-04 Thread Hernán Morales Durand
Hi Stef


El jue., 4 jun. 2020 a las 11:21, Stéphane Ducasse (<
stephane.duca...@inria.fr>) escribió:

> It would be good to have the related package under an umbrella.
> For example I can spend some time packaging hans package on github but
> only if it helps.
>

I already migrated to Pharo and published in Github
https://github.com/hernanmd/Shapes
so you may use that one if you like

Cheers,

Hernán


> So let me know.
>
> S
>
> On 4 Jun 2020, at 14:15, Serge Stinckwich 
> wrote:
>
> OpenGIS is an object-oriented meta-model for GIS. There is no
> implementation in Pharo but can give a good blueprint if we want to do
> something like that.
>
> I’m GMT+8. So a meeting Thursday at 9am for you is great for me (2pm for
> me).
> It would be nice if Hernan can join also, but might be difficult with the
> time zone difference.
>
> Regards,
>
> Sent from my iPad
>
> On 4 Jun 2020, at 18:50, Norbert Hartl  wrote:
>
> 
>
> Am 04.06.2020 um 12:31 schrieb Serge Stinckwich <
> serge.stinckw...@gmail.com>:
>
>
>
> On Thu, Jun 4, 2020 at 4:11 PM Norbert Hartl  wrote:
>
>> I started this initiative for our company because we are in the mobility
>> bubsiness where maps and geo centric things are important. It is not
>> elaborate as a real GIS support but a start. So here my secret plan:
>>
>>
> Thank you Norbert for your interest on that topic.
> I put Etienne Delay because he is not ont the pharo-users mailing-list and
> I'm working with him on GIS issues for CORMAS.
>
> - GeoJSON [1] was done because web services came up with that format to
>> exchange geo shape information. Furthermore database like MongoDB changed
>> their internal support for 2d/2dsphere indexes also to GeoJSON. There is a
>> package GeoJSON-Voyage which is start of a helper to easily store Geo data
>> in voyage-mongo.
>>
>> - I started to do a KML Reader [2] because besides GeoJSON that is a
>> widely used format. And this can be used in Google Earth which is the best
>> free Geo editor that I know.
>>
>> - As KML and GeoJSON use a similar model for representing geo shapes and
>> POIs I started to factor out that into the Geography package [3].
>>
>> - At the moment in the Geography package there is only a 2D point class
>> GGPoint to have something to hold geo coordinates (there is also a 3D
>> variant). In the past I used Point as the class for these things but came
>> to the conclusion that there is a distinction between a point and geo point
>> when it comes to things like distance etc. So it is better to have them
>> separate. Into this model I want to morph the classes for LineStrings,
>> LinearRings, Polygons etc. from GeoJSON and KML to have a common foundation
>> for the basic geo shapes lines, multi-lines, closed multi-lines (=polygons)
>> etc.
>>
>> - As GGPoint is distinct to Point this is just the context where you use
>> it. The Geography package should be a companion to the Geometry package [4]
>> which I forked from TelescopeSt to make it a community package which is
>> good for this plan but also for roassal which uses the Geometry package. To
>> me the geoX model should be switched between Geometry and Geography
>> regarding to the context you want to work in being planar or spherical.
>>
>> - In my tools that I build this model classes have also gt-inspector
>> extension so the shapes can be viewed just by inspecting them. I'm fighting
>> with the roassal team to make it possible for geo coordinates which
>> conflicts at the moment with their defined thresholds. But with the
>> factoring the shapes into Geography I will move those extension to the
>> Geography package as well
>>
>> - I also implemented a polygon intersection algorithm (Weiler and
>> Atherton) which I will then incorporate in any of the GeoX packages
>>
>>
> You have done a lot of work. And we add all the work done by Hernan on
> supporting ESRI shapefiles, we have already a good start.
>
> Etienne also mention the OpenGIS model in this issue:
> https://github.com/cormas/cormas/issues/139
>
> From what I understood, OpenGIS model crosscut many points of the
> Geography package:
> http://portal.opengeospatial.org/files/?artifact_id=25355
>
> So these are the pieces that are there. The plan in text is:
>>
>> - Have a incarnation of a "point" and make that switch context from
>> planar to spherical
>> - Use planar treatment with the Geometry package (intersections etc.)
>> - Use this "point" to generate shapes either geometric or geographic
>> - Be able to read and write in common formats like GeoJSON and KML
>> - Make shapes be composable and inspectable with the existing tools
>>
>> I think GIS needs more but what we have is more than just a start. The
>> projection system with the current code is WGS84 for sure. If there are
>> other needs we need to think about this early.
>>
>> For everything else I'm open ears. Even for the idea of having a
>> pharo-gis github project to collect those things to a common place. But I
>> like to discuss GIS and not if it makes 

Re: [Pharo-users] GIS support for Pharo

2020-06-04 Thread Hernán Morales Durand
Hi Hans,


El jue., 4 jun. 2020 a las 6:07, Baveco, Hans ()
escribió:

> Would be an interesting project..
>
> An old link to possibly still useful code:
>
>
>
> http://wiki.squeak.org/squeak/3317
>
>
>
>
>
> Btw the shapefile support, from the ESRI spec, was done by me and is still
> available on http://www.squeaksource.com/@CUT95k_uXmPU4uXY/HCmgtrop.
>

Thank you for the clarification (and actually sharing your work with ESRI
files!)
I added proper credits in the Github forked repo :
https://github.com/hernanmd/Shapes


> I use it daily. I may have some fixes/additions, but in general the code
> as provided works well (I suppose the code at smalltalkhub is still mostly
> the same). Some shapefile formats are still missing, mostly because I never
> encountered them..
>

You mean some types are missing? Because I get this error when I try to
read some SHP files: "Types > 20 are not yet accounted for"

I wrote this script to reproduce:

 | shpE legend urlRoot urlESRIFilePrefix urlESRIFileShp urlPath response
fileRef |

" Download Shapefile resources "
urlRoot := '
https://github.com/nvkelso/natural-earth-vector/blob/master/110m_cultural/'.
urlESRIFilePrefix := 'ne_110m_populated_places'.
urlESRIFileShp := urlESRIFilePrefix , '.shp'.
urlPath := urlRoot , urlESRIFilePrefix.

#('.shx' '.dbf' '.shp') do: [ : ext |
| url |
url :=  (urlPath , ext , '?raw=true') asZnUrl.
(response := ZnEasy get: url) isSuccess
ifFalse: [ self error: 'Cannot download file' ].
fileRef := FileSystem disk workingDirectory / (urlESRIFilePrefix , ext).
fileRef writeStreamDo: [ : stream |
stream nextPutAll: ((ZnByteEncoder newForEncoding: 'koi8r') decodeBytes:
response contents ) ] ].

Once downloaded:

| urlESRIFilePrefix urlESRIFileShp shpE |
urlESRIFilePrefix := 'ne_110m_populated_places'.
urlESRIFileShp := urlESRIFilePrefix , '.shp'.

" Load and display it in Morphic "
shpE := ShapeEnsemble fromFile: urlESRIFileShp.

Maybe it's related with the fact they are encoded as koi8r?
I checked with Zinc downloading first from the browser:

| shpFile |

shpFile := 'ne_110m_admin_0_countries.shp' asFileReference.
[ shpFile binaryReadStreamDo: [ : in |
(ZnCharacterEncoder detectEncoding: in upToEnd) identifier
] ]
on: ZnCharacterEncodingError
do: [ nil ].


Cheers,

Hernán

To read a complete shapefile one also needs to read dbf files. This was
> another substantial effort
> http://www.squeaksource.com/@Y4HhnL90iyA2TmAb/X0sPqshM; luckily  there
> was an older implementation.available to build upon.
>
> Not sure whether nowadays there are other ways to read/write files old
> DBASE format files...
>
>
>
> Cheers,
>
>
>
> Hans Baveco
>
>
>
>
>
>
>
>
>
> *From:* Serge Stinckwich 
> *Sent:* donderdag 4 juni 2020 5:32
> *To:* Any question about pharo is welcome 
> *Subject:* [Pharo-users] GIS support for Pharo
>
>
>
> Dear all,
>
>
>
> there was already some discussion in the list about GIS support for Pharo
> previously.
>
>
>
> Working on CORMAS multi-agent simulation platform:
> https://github.com/cormas/cormas some developers feel the need to have
> more GIS support for Pharo.
>
>
>
> I know of existing GIS software:
>
> - GeoJSON by Zweidenker: https://github.com/zweidenker/GeoJSON
>
> - ESRI ascii raster, done by Stephane recently:
> https://github.com/Ducasse/ESRI-ASCII-Raster
>
> - shapefile support by Hernan: http://smalltalkhub.com/#!/~hernan/Shapes
>
> (to be moved to github)
>
> - I found this project also: http://www.squeaksource.com/gekon.html
>
>
>
> I know that Etienne Delay is also interested by GIS support and propose to
> implement OpenGIS model support:
> https://github.com/cormas/cormas/issues/139
>
>
>
> Can we try to unite and maybe create a pharo-GIS organization on github to
> federate our efforts?
>
>
> Cheers,
>
> --
>
> Serge Stinckwic
>
> h
>
> https://twitter.com/SergeStinckwich
>
>
>


Re: [Pharo-users] GIS support for Pharo

2020-06-04 Thread Hernán Morales Durand
El jue., 4 jun. 2020 a las 9:16, Serge Stinckwich (<
serge.stinckw...@gmail.com>) escribió:

> OpenGIS is an object-oriented meta-model for GIS. There is no
> implementation in Pharo but can give a good blueprint if we want to do
> something like that.
>
> I’m GMT+8. So a meeting Thursday at 9am for you is great for me (2pm for
> me).
> It would be nice if Hernan can join also, but might be difficult with the
> time zone difference.
>
>
You mean next Thursday 11/06 ?
On discord cormas channel?
I could connect no problem.

Cheers,

Hernán



> Regards,
>
> Sent from my iPad
>
> On 4 Jun 2020, at 18:50, Norbert Hartl  wrote:
>
> 
>
> Am 04.06.2020 um 12:31 schrieb Serge Stinckwich <
> serge.stinckw...@gmail.com>:
>
>
>
> On Thu, Jun 4, 2020 at 4:11 PM Norbert Hartl  wrote:
>
>> I started this initiative for our company because we are in the mobility
>> bubsiness where maps and geo centric things are important. It is not
>> elaborate as a real GIS support but a start. So here my secret plan:
>>
>>
> Thank you Norbert for your interest on that topic.
> I put Etienne Delay because he is not ont the pharo-users mailing-list and
> I'm working with him on GIS issues for CORMAS.
>
> - GeoJSON [1] was done because web services came up with that format to
>> exchange geo shape information. Furthermore database like MongoDB changed
>> their internal support for 2d/2dsphere indexes also to GeoJSON. There is a
>> package GeoJSON-Voyage which is start of a helper to easily store Geo data
>> in voyage-mongo.
>>
>> - I started to do a KML Reader [2] because besides GeoJSON that is a
>> widely used format. And this can be used in Google Earth which is the best
>> free Geo editor that I know.
>>
>> - As KML and GeoJSON use a similar model for representing geo shapes and
>> POIs I started to factor out that into the Geography package [3].
>>
>> - At the moment in the Geography package there is only a 2D point class
>> GGPoint to have something to hold geo coordinates (there is also a 3D
>> variant). In the past I used Point as the class for these things but came
>> to the conclusion that there is a distinction between a point and geo point
>> when it comes to things like distance etc. So it is better to have them
>> separate. Into this model I want to morph the classes for LineStrings,
>> LinearRings, Polygons etc. from GeoJSON and KML to have a common foundation
>> for the basic geo shapes lines, multi-lines, closed multi-lines (=polygons)
>> etc.
>>
>> - As GGPoint is distinct to Point this is just the context where you use
>> it. The Geography package should be a companion to the Geometry package [4]
>> which I forked from TelescopeSt to make it a community package which is
>> good for this plan but also for roassal which uses the Geometry package. To
>> me the geoX model should be switched between Geometry and Geography
>> regarding to the context you want to work in being planar or spherical.
>>
>> - In my tools that I build this model classes have also gt-inspector
>> extension so the shapes can be viewed just by inspecting them. I'm fighting
>> with the roassal team to make it possible for geo coordinates which
>> conflicts at the moment with their defined thresholds. But with the
>> factoring the shapes into Geography I will move those extension to the
>> Geography package as well
>>
>> - I also implemented a polygon intersection algorithm (Weiler and
>> Atherton) which I will then incorporate in any of the GeoX packages
>>
>>
> You have done a lot of work. And we add all the work done by Hernan on
> supporting ESRI shapefiles, we have already a good start.
>
> Etienne also mention the OpenGIS model in this issue:
> https://github.com/cormas/cormas/issues/139
>
> From what I understood, OpenGIS model crosscut many points of the
> Geography package:
> http://portal.opengeospatial.org/files/?artifact_id=25355
>
> So these are the pieces that are there. The plan in text is:
>>
>> - Have a incarnation of a "point" and make that switch context from
>> planar to spherical
>> - Use planar treatment with the Geometry package (intersections etc.)
>> - Use this "point" to generate shapes either geometric or geographic
>> - Be able to read and write in common formats like GeoJSON and KML
>> - Make shapes be composable and inspectable with the existing tools
>>
>> I think GIS needs more but what we have is more than just a start. The
>> projection system with the current code is WGS84 for sure. If there are
>> other needs we need to think about this early.
>>
>> For everything else I'm open ears. Even for the idea of having a
>> pharo-gis github project to collect those things to a common place. But I
>> like to discuss GIS and not if it makes sense to have a all of these github
>> repos.
>>
>
> We can try to do an online meeting to discuss about that with Etienne and
> other people interested by this topic.
> We are mostly interested to have GIS support on CORMAS, so having a common
> repository will definitively help us.
> At 

Re: [Pharo-users] ESRI ASCII raster format

2020-06-03 Thread Hernán Morales Durand
I think we could also use the GeoJSON package?
I did a little example with the package from the zweidenker repository

Metacello new
baseline: 'GeoJSON';
repository: 'github://zweidenker/GeoJSON';
load.

and use it like this:

| url file |
url := 
'https://github.com/mgaitan/departamentos_argentina/raw/master/departamentos-argentina.json'.
ZnClient new
systemPolicy;
url: url;
numberOfRetries: 2;
maximumEntitySize: 1024 * 1024 * 1024;
signalProgress: true;
contentReader: [ : entity | GeoJSONReader fromString: entity contents ];
get.

And the coordinates can be obtained using:

self features anyOne geometry coordinates

But is this useful for CORMAS?

Cheers,

Hernán


El mié., 3 jun. 2020 a las 18:16, Stéphane Ducasse (<
stephane.duca...@inria.fr>) escribió:

> I did it as a kata as fast as I could …
>
> https://github.com/Ducasse/ESRI-ASCII-Raster
>
> I found the spec a bit strange
>
> The header information is followed by cell value information specified in
> space-delimited row-major order, with each row separated by a carriage
> return.
> and
>
>- No carriage returns are necessary at the end of each row in the
>raster. The number of columns in the header determines when a new row
>begins.
>
> O_o
>
> so I followed the example on wikipedia
>
> It was fun.
> My implementation could be more robust but for 2 hours coding.
> It was a fun kata.
>
> S.
>
>
>
>
> On 3 Jun 2020, at 11:24, Cédrick Béler  wrote:
>
> I’ll try to join.
>
> The file seem indeed easy to process.
>
> 
>
> Except the implication by the or (xllcenter or xllcorner).
>
> Cheers,
> Cédrick
>
>
>
> Le 3 juin 2020 à 09:44, Serge Stinckwich  a
> écrit :
>
>
>
> On Wed, Jun 3, 2020 at 3:40 PM Stéphane Ducasse 
> wrote:
>
>> Ok I’m a paper on the grill and I will give a try to see if I can do it
>> in TDD in 1 or 1:30 as a kata.
>> I will let you know but by the end of the week you have it.
>>
>>
> Our meeting is every Friday at 11:30am (France time), 9:30am UTC time.
>
> Regards,
> --
> Serge Stinckwic
> h
> https://twitter.com/SergeStinckwich
>
>
>
> 
> Stéphane Ducasse
> http://stephane.ducasse.free.fr / http://www.pharo.org
> 03 59 35 87 52
> Assistant: Aurore Dalle
> 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] Preserving Pharo Window state between sessions

2020-05-05 Thread Hernán Morales Durand
What happened with the HostWindowProxy?


El mar., 5 may. 2020 a las 15:32, Esteban Maringolo ()
escribió:

> Is there a way to preserve the window state after saving the image on
> quit and restarting it again?
>
> If I save my image window maximized I would like it to be maximized
> when starting again.
>
> Having it otherwise can be annoying when moving from different screen
> resolutions, because a 1920x1080 maximized window becomes a "floating"
> (non-maximized) window that size on a smaller screen.
>
> I guess this is controlled by the VM and not the image, but there is a
> way to maximize the window from the image? This way it could be a
> preference of some sort.
>
> Regards,
>
> Esteban A. Maringolo
>
>


Re: [Pharo-users] [Pharo-dev] looking for input for a lecture on TDD and XtremeTDD

2020-04-14 Thread Hernán Morales Durand
Hi Stef,

One of the funniest talks about TDD is the one from Hernán Wilkinson :
https://youtu.be/x4CXWBW5fMo
(minute 29 starts the TDD coding show)
It's in Argentine Spanish dialect, but it's worth to see.

Cheers,

Hernán

El mar., 14 abr. 2020 a las 9:36, Stéphane Ducasse (<
stephane.duca...@inria.fr>) escribió:

> Hello
>
> I would like to build a lecture around TDD and XtremeTDD (coding in the
> debugger).
> I’m looking around to see if someone already did such a lecture.
>
> S.
> 
> 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] Status of Marea?

2020-04-10 Thread Hernán Morales Durand
Hi Mariano!

Thank you for the very fast reply!
Yes, I have highSierra and Mojave was the last 32-bit supported so I can
try the image if you send it to me.

I've been wondering if there's huge performance impact if I need to walk
every node of a giant tree (like a phylogenetic tree) for some operations
in my app.

Anyway I would love to check it out :)

Cheers,

Hernán

El vie., 10 abr. 2020 a las 17:33, Mariano Martinez Peck (<
marianop...@gmail.com>) escribió:

> Hi Hernán,
>
> If I remember correctly, that was the last repo I used. I just tried to
> check in SmalltalkHub if there was a new repo but seems already down, so I
> can't check.
> Also, none of my Marea images work anymore for me because latest OSX
> dropped 32 bits support. But I can look for the images and send it to you
> if you want.
>
> To bring it to latest Pharo I would think:
>
> 1) Update it to use latest Fuel version
> 2) Slots may have broken class proxies
> 3) Update Marea proxies to use the latest version of Ghost proxies
> (wherever that is)
>
> As a side note, Marea would work much better these days because of the
> lazy become (AFAIK that is already in Cog since some time).
>
> Let me know if that helps,
>
>
>
> On Fri, Apr 10, 2020 at 5:25 PM Hernán Morales Durand <
> hernan.mora...@gmail.com> wrote:
>
>> Hi everyone,
>>
>> Just checking what it would take to update Marea for a production
>> environment in Pharo 8 or Pharo 9 or beyond. The last repo link I found is
>> this:
>>
>> http://ss3.gemstone.com/ss/Marea.html
>>
>> And I couldn't find other codebase in the Mariano's Github repo.
>>
>> Any updates out there?
>>
>> Cheers,
>>
>> Hernán
>>
>>
>
> --
> Mariano Martinez Peck
> Email: marianop...@gmail.com
> Twitter: @MartinezPeck
> LinkedIn: www.linkedin.com/in/mariano-martinez-peck
> <https://www.linkedin.com/in/mariano-mart%C3%ADnez-peck/>
> Blog: https://marianopeck.wordpress.com/
>


[Pharo-users] Status of Marea?

2020-04-10 Thread Hernán Morales Durand
Hi everyone,

Just checking what it would take to update Marea for a production
environment in Pharo 8 or Pharo 9 or beyond. The last repo link I found is
this:

http://ss3.gemstone.com/ss/Marea.html

And I couldn't find other codebase in the Mariano's Github repo.

Any updates out there?

Cheers,

Hernán


Re: [Pharo-users] Corona virus

2020-03-16 Thread Hernán Morales Durand
Hi Tim, no issues at all!
It's important that developers gets and join into this because people in
science/bio cannot do everything alone.
Cheers,

Hernán

El lun., 16 mar. 2020 a las 14:51, Tim Mackinnon ()
escribió:

> Hi Hernan - I should have been a bit more specific that its your work I’ve
> been looking at (I set my task to get a graph for a specific country - and
> was able to figure out how to do that reasonably easily but hard coded for
> my experiment so far). I now see that Alex has added some thoughts on
> Roassal which I’m keen to look at next.
>
> Anyway, thanks for doing this and sharing it.
>
> Tim
>
> On 16 Mar 2020, at 15:04, Hernán Morales Durand 
> wrote:
>
> Hi Tim, and others
>
> Some weeks ago I started a GitHub repo for COVID-19 analysis with Pharo :
> https://github.com/hernanmd/COVID-2019
>
> A good mindset before digging into the massive amount of info is to define
> what you can/want to do:
>
> 1 - In detection & diagnosis (if you understand CRISPR, Nanobiosensors,
> Direct Fluorescent Antibodies, RNA Aptamers, you can help now)
> 2 - In prevention (doing flyers, visualizations, cards from official
> sites: see below)
> 3 - In treatment & therapeutics: The calendar for clinical trials is set
> and laboratories are working in Drug testing now. If you can discover novel
> information (through Deep/Machine-Learning of drugs like Remdesivir,
> Tocilizumab, other monoclonal antibodies or anti-virals, immunoglobulins)
> it would be an advance. Right now I have some text-mining analysis but I
> did it in Python as they have more NLP libraries, but working with lab
> notebooks is crashing all the time because of memory issues).
>
> Feel free to add issues, requests or code. Examples:
>
>   - Some state of the art analysis seem to involve manual processing:
> https://github.com/galaxyproject/SARS-CoV-2/tree/master/1-PreProcessing#the-history-and-the-workflow
> (this changes because DNA sequences are added as sequencing centers uploads
> more)
>   - From here : https://www.ncbi.nlm.nih.gov/genbank/sars-cov-2-seqs/ you
> can see a list of "SRA sequences". Let me know if you want to address
> something with this because NGS analysis is extremely long and sometimes
> difficult. My GitHub repository only uses the "Nucleotide sequences".
>   - Experiment with visualizations with fetch data from ClinicalTrials:
> https://clinicaltrials.gov/ct2/results?cond=%22wuhan+coronavirus%22
>   - Someone working in workflow engine could try to reproduce this
> workflow in Pharo :
> https://github.com/galaxyproject/SARS-CoV-2/blob/master/1-PreProcessing/pp_wf.png
> and this is the list of steps only for pre-processing sequences:
> https://usegalaxy.org/u/aun1/w/covid-19-pre-pp
>- These guys https://artic.network/rampart work in state of the art
> tools for outbreak analysis (called RAMPART in the jargon). This is their
> repository for SARS-CoV-2 https://github.com/artic-network/artic-ncov2019
>   - And another SOTA https://github.com/blab/sars-like-cov from the guys of
> Nextstrain (phylogenetics analysis, have a look at the visualizations).
> Metadata from Nextstrain about this strain:
> https://github.com/nextstrain/ncov/blob/master/data/metadata.tsv
>   - For someone working with Roassal this is the visualization
> https://www.ncbi.nlm.nih.gov/genbank/sars-cov-2-seqs/#reference-genome
> most bioinformaticians should start to check (note that is pretty advanced
> in features, but it could be rendered by parsing the GFF file
> https://ftp.ncbi.nlm.nih.gov/genomes/all/GCF/009/858/895/GCF_009858895.2_ASM985889v3/GCF_009858895.2_ASM985889v3_genomic.gff.gz),
> the legends are here: https://www.ncbi.nlm.nih.gov/tools/sviewer/legends/
> and the spec :
> https://github.com/The-Sequence-Ontology/Specifications/blob/master/gff3.md
>   - https://healthsites.io/ has also an API :
> https://github.com/healthsites/healthsites/wiki/API which uses OSM
>   - Reliable information (good sources for making visual alerts)
>   - https://www.elsevier.com/connect/coronavirus-information-center
>   - https://novel-coronavirus.onlinelibrary.wiley.com/
>   -
> https://www.cdc.gov/coronavirus/2019-ncov/hcp/clinical-criteria.html?CDC_AA_refVal=https%3A%2F%2Fwww.cdc.gov%2Fcoronavirus%2F2019-ncov%2Fclinical-criteria.html
>   -
> https://www.cdc.gov/coronavirus/2019-ncov/infection-control/control-recommendations.html?CDC_AA_refVal=https%3A%2F%2Fwww.cdc.gov%2Fcoronavirus%2F2019-ncov%2Fhcp%2Finfection-control.html
>   - https://www.thelancet.com/coronavirus
>   - https://www.medrxiv.org/content/early/recent
>   - This is also a good source http://virological.org/ if you'd like to
> read what people is missing
>
> Cheers,
>
> Hernán
>
>
>
> El lun.,

Re: [Pharo-users] Corona virus

2020-03-16 Thread Hernán Morales Durand
Hi Tim, and others

Some weeks ago I started a GitHub repo for COVID-19 analysis with Pharo :
https://github.com/hernanmd/COVID-2019

A good mindset before digging into the massive amount of info is to define
what you can/want to do:

1 - In detection & diagnosis (if you understand CRISPR, Nanobiosensors,
Direct Fluorescent Antibodies, RNA Aptamers, you can help now)
2 - In prevention (doing flyers, visualizations, cards from official sites:
see below)
3 - In treatment & therapeutics: The calendar for clinical trials is set
and laboratories are working in Drug testing now. If you can discover novel
information (through Deep/Machine-Learning of drugs like Remdesivir,
Tocilizumab, other monoclonal antibodies or anti-virals, immunoglobulins)
it would be an advance. Right now I have some text-mining analysis but I
did it in Python as they have more NLP libraries, but working with lab
notebooks is crashing all the time because of memory issues).

Feel free to add issues, requests or code. Examples:

  - Some state of the art analysis seem to involve manual processing:
https://github.com/galaxyproject/SARS-CoV-2/tree/master/1-PreProcessing#the-history-and-the-workflow
(this changes because DNA sequences are added as sequencing centers uploads
more)
  - From here : https://www.ncbi.nlm.nih.gov/genbank/sars-cov-2-seqs/ you
can see a list of "SRA sequences". Let me know if you want to address
something with this because NGS analysis is extremely long and sometimes
difficult. My GitHub repository only uses the "Nucleotide sequences".
  - Experiment with visualizations with fetch data from ClinicalTrials:
https://clinicaltrials.gov/ct2/results?cond=%22wuhan+coronavirus%22
  - Someone working in workflow engine could try to reproduce this workflow
in Pharo :
https://github.com/galaxyproject/SARS-CoV-2/blob/master/1-PreProcessing/pp_wf.png
and this is the list of steps only for pre-processing sequences:
https://usegalaxy.org/u/aun1/w/covid-19-pre-pp
   - These guys https://artic.network/rampart work in state of the art
tools for outbreak analysis (called RAMPART in the jargon). This is their
repository for SARS-CoV-2 https://github.com/artic-network/artic-ncov2019
  - And another SOTA https://github.com/blab/sars-like-cov from the guys of
Nextstrain (phylogenetics analysis, have a look at the visualizations).
Metadata from Nextstrain about this strain:
https://github.com/nextstrain/ncov/blob/master/data/metadata.tsv
  - For someone working with Roassal this is the visualization
https://www.ncbi.nlm.nih.gov/genbank/sars-cov-2-seqs/#reference-genome most
bioinformaticians should start to check (note that is pretty advanced in
features, but it could be rendered by parsing the GFF file
https://ftp.ncbi.nlm.nih.gov/genomes/all/GCF/009/858/895/GCF_009858895.2_ASM985889v3/GCF_009858895.2_ASM985889v3_genomic.gff.gz),
the legends are here: https://www.ncbi.nlm.nih.gov/tools/sviewer/legends/
and the spec :
https://github.com/The-Sequence-Ontology/Specifications/blob/master/gff3.md
  - https://healthsites.io/ has also an API :
https://github.com/healthsites/healthsites/wiki/API which uses OSM
  - Reliable information (good sources for making visual alerts)
  - https://www.elsevier.com/connect/coronavirus-information-center
  - https://novel-coronavirus.onlinelibrary.wiley.com/
  -
https://www.cdc.gov/coronavirus/2019-ncov/hcp/clinical-criteria.html?CDC_AA_refVal=https%3A%2F%2Fwww.cdc.gov%2Fcoronavirus%2F2019-ncov%2Fclinical-criteria.html
  -
https://www.cdc.gov/coronavirus/2019-ncov/infection-control/control-recommendations.html?CDC_AA_refVal=https%3A%2F%2Fwww.cdc.gov%2Fcoronavirus%2F2019-ncov%2Fhcp%2Finfection-control.html
  - https://www.thelancet.com/coronavirus
  - https://www.medrxiv.org/content/early/recent
  - This is also a good source http://virological.org/ if you'd like to
read what people is missing

Cheers,

Hernán



El lun., 16 mar. 2020 a las 8:36, Tim Mackinnon ()
escribió:

> Guys - this is very moving… I have family in Italy and its very worrying
> to hear the accounts, but equally as this spreads wider I worry about
> friends and families here too…
>
> This said - on a more proactive front, I did download the Corona GitHub
> pharo project and it has introduced me to the DataFrames implementation
> that I’ve always meant to dig into and I shall learn a bit more Roassal as
> well…. We must all fight on, and put our energy into the future as well as
> the present!
>
> Tim
>
> > On 16 Mar 2020, at 10:22, dario.trussardi65 
> wrote:
> >
> > Ciao,
> >
> >> It's a good article, very deep on knowledge.
> >
> >   +1
> >
> >> (it let arise a question : why, apparently, nearly none of country all
> over the world, had a plan ready to apply ?)
> >
> >   I would have many things to say about it, but this is not the time
> .
> >
> >   I'm not a mathematician, and take everything very carefully.
> >   From the data I have available ( reliable?! )
> >   here in Bergamo, Lombardy, the mortality 

Re: [Pharo-users] Corona virus

2020-03-14 Thread Hernán Morales Durand
Hi guys,

There is a group working in open source mode against COVID-19
https://itsfoss.com/opencovid19/

You may join if you want to help.
Cheers,

Hernán

El sáb., 14 mar. 2020 a las 14:15, Davide Grandi ()
escribió:

> That's true,
>
> and it will be a worldwide pandemia.
> Try to work @ home,
> limit contacts with other people,
> don't go in crowded places,
> and PROTECT YOUR PARENTS - GRANDPARENTS.
>
> The local newsmagazine of Dario's town, few km from mine,
> has normally ONE page of obituary.
> Yesterday ... TEN pages.
>
> bye,
>
>  Davide
>
> On 14/03/2020 14:52, dario.trussardi65 wrote:
> > Ciao,
> > be very careful ... it's very dangerous ...
> > here in Bergamo it's a disaster.
> > We are losing our grandparents like leaves falling from the tree 
> > Take all precautions  Don't underestimate the situation.
> > See you soon
> > Dario
>
> --
> Ing. Davide Grandi
> email  : davide.gra...@email.it
>
>
>


Re: [Pharo-users] [Lse-pharo4pharo] How to get a list of package versions?

2020-03-12 Thread Hernán Morales Durand
Hi Stef,

Didn't knew this project existed: https://github.com/pharo-pkg
Glad to read someone is taking care of it.
In the meantime I will explore about file system workaround with diff-like
tools.
Thank you for your reply.

Cheers,

Hernán


El jue., 12 mar. 2020 a las 4:25, Stéphane Ducasse (<
stephane.duca...@inria.fr>) escribió:

> Hi hernan
>
> I understand exactly your question :)
> Because we need to have metadata inside the package.
> I hope that the renewed effort around pakbot will address this point.
>
> On 12 Mar 2020, at 04:22, Hernán Morales Durand 
> wrote:
>
> Hi there,
>
> I would like to compare two Pharo deployed images. Specifically, get a
> list/tree of the installed packages with their version number each one, so
> I can compare if there were updates between both deployments.
>
> I started by doing
>
> IceRepository registry collect: #workingCopy
>
> Then discovered the #commitish, though don't know is there another way?
> Cheers,
>
> Hernán
>
> ___
> Lse-pharo4pharo mailing list
> lse-pharo4ph...@lists.gforge.inria.fr
> https://lists.gforge.inria.fr/mailman/listinfo/lse-pharo4pharo
>
>
> 
> 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] How to get a list of package versions?

2020-03-11 Thread Hernán Morales Durand
Hi there,

I would like to compare two Pharo deployed images. Specifically, get a
list/tree of the installed packages with their version number each one, so
I can compare if there were updates between both deployments.

I started by doing

IceRepository registry collect: #workingCopy

Then discovered the #commitish, though don't know is there another way?
Cheers,

Hernán


[Pharo-users] [ANN] COVID-19 analysis in Pharo

2020-02-29 Thread Hernán Morales Durand
Hello,

I have set up a new Pharo project for the analysis of COVID-19 outbreak:

https://github.com/hernanmd/COVID-2019

Thanks to the ObjectProfile for Roassal and PolyMath contributors for the
DataFrame package.

Cheers,

Hernán


Re: [Pharo-users] [Lse-pharo4pharo] Alignment visualization performance

2020-02-22 Thread Hernán Morales Durand
Done here : https://github.com/pharo-project/pharo/issues/5737

Cheers,

Hernán

El sáb., 22 feb. 2020 a las 5:22, Stéphane Ducasse (<
stephane.duca...@inria.fr>) escribió:

> could you open a bug entry and we will tag it for large images.
>
> On 21 Feb 2020, at 06:40, Hernán Morales Durand 
> wrote:
>
> Hello guys.
>
> I want to visualize DNA sequence alignments in Pharo 8. For this task most
> bioinformatics applications set a background color for each letter. But in
> Pharo the Inspector is too slow to open even for just one small sequence of
> 1Kb. Consider now there are about 37k sequences of COVID-19 and each genome
> contains about 30k of letters, so visualizing and scrolling these should be
> fast (as for zooming).
>
> But have a look at this script which takes about 6 seconds to open an
> Inspector. The script uses BioSmalltalk, and the code could be enhanced for
> sure, but that is not relevant to my performance problem of visualization:
>
> [
> | text attributes |
> " Generate a Text object from a random sequence "
> text := ((BioSequence forAlphabet: BioDNAAlphabet) randomLength: 1000)
> sequence asText.
> " Setup an array for each nucleotide background color "
> attributes := Array new: text size.
> 1 to: text size do: [ : index |
> attributes at: index put: {
> (TextBackgroundColor color: (BioDNAAlphabet colorMap at: (text at:
> index))) }  ].
> text runs: (RunArray newFrom: attributes).
> text inspect
> ] timeToRun asString  "'0:00:00:05.911'"
>
> Also, resizing the opened Inspector takes 2-3 seconds to refresh.
> You can see the output here: https://imgur.com/a/xUlBeVY
>
> I should say without the #inspect the code ran without performance issues:
> "'0:00:00:00.009'"
>
> So I ran again the script for different sequence sizes:
>
> String streamContents: [ : stream |
> 100 to: 2000 by: 100 do: [ : sl |
> stream nextPutAll: ([
> | text attributes |
> " Generate a Text object from a random sequence "
> text := ((BioSequence forAlphabet: BioDNAAlphabet) randomLength: sl)
> sequence asText.
> " Setup an array for each nucleotide background color "
> attributes := Array new: text size.
> 1 to: text size do: [ : index |
> attributes at: index put: {
> (TextBackgroundColor color: (BioDNAAlphabet colorMap at: (text at:
> index))) }  ].
> text runs: (RunArray newFrom: attributes).
> text inspect
> ] timeToRun asString);
> cr
> ]
> ]
>
> And these are the results:
>
> 0:00:00:00.147
> 0:00:00:00.28
> 0:00:00:00.568
> 0:00:00:00.993
> 0:00:00:01.776
> 0:00:00:02.123
> 0:00:00:03.111
> 0:00:00:04.084
> 0:00:00:04.574
> 0:00:00:06.192
> 0:00:00:07.214
> 0:00:00:07.915
> 0:00:00:10.382
> 0:00:00:12.725
> 0:00:00:12.359
> 0:00:00:17.357
> 0:00:00:17.147
> 0:00:00:20.651
> 0:00:00:20.392
> 0:00:00:23.238
>
> At first I thought it was a problem of the Glamout text renderer for
> Rubric Text, but profiling a single pass of the snippet for 2000 letters,
> shows a couple of methods in Rubric scanner, after some DNU sends, which
> are consuming a lot of the time:
> RubCharacterBlockScanner(RubCharacterBlockScanner) >>
> characterBlockAtPoint:index:in: and
> RubCharacterBlockScanner(RubCharacterBlockScanner) >> endOfRun". I attached
> the full profiler report so you may have a look if you like. But the
> summary is:
>
> **Leaves**
> 37.4% {8800ms}
> RubCompositionScanner(RubCharacterScanner)>>basicScanCharactersFrom:to:in:rightX:stopConditions:kern:
> 6.3% {1476ms} Dictionary>>at:ifAbsentPut:
> 6.1% {1425ms} Context>>unwindComplete
> 4.6% {1082ms} Semaphore>>criticalReleasingOnError:
> 4.2% {991ms} Dictionary>>at:ifAbsent:
> 3.3% {785ms} Context>>aboutToReturn:through:
> 2.2% {527ms} Context>>resume:through:
> 2.0% {470ms} ExternalAddress>>isNull
> 1.8% {421ms} BlockClosure>>on:do:
> 1.7% {402ms}
> RubCharacterBlockScanner(RubCharacterScanner)>>setConditionArray:
> 1.6% {378ms} FreeTypeFace>>validate
> 1.6% {376ms} Dictionary>>scanFor:
> 1.5% {364ms} Context>>unwindComplete:
> 1.5% {344ms} Context>>unwindBlock
> 1.4% {323ms} Array(SequenceableCollection)>>do:
> 1.3% {299ms} Dictionary(HashedCollection)>>findElementOrNil:
> 1.2% {293ms} RunArray>>at:setRunOffsetAndValue:
> 1.2% {289ms} FreeTypeCache>>atFont:charCode:type:ifAbsentPut:
> 1.1% {252ms} FreeTypeCacheLinkedList>>moveDown:
>
> **Memory**
> old +0 bytes
> young -1,485,272 bytes
> used -1,485,272 bytes
> free +1,485,272 bytes
>
> **GCs**
> full 0 totalling 0ms (0.0% uptime)
> incr 947 t

[Pharo-users] Alignment visualization performance

2020-02-20 Thread Hernán Morales Durand
Hello guys.

I want to visualize DNA sequence alignments in Pharo 8. For this task most
bioinformatics applications set a background color for each letter. But in
Pharo the Inspector is too slow to open even for just one small sequence of
1Kb. Consider now there are about 37k sequences of COVID-19 and each genome
contains about 30k of letters, so visualizing and scrolling these should be
fast (as for zooming).

But have a look at this script which takes about 6 seconds to open an
Inspector. The script uses BioSmalltalk, and the code could be enhanced for
sure, but that is not relevant to my performance problem of visualization:

[
| text attributes |
" Generate a Text object from a random sequence "
text := ((BioSequence forAlphabet: BioDNAAlphabet) randomLength: 1000)
sequence asText.
" Setup an array for each nucleotide background color "
attributes := Array new: text size.
1 to: text size do: [ : index |
attributes at: index put: {
(TextBackgroundColor color: (BioDNAAlphabet colorMap at: (text at: index)))
}  ].
text runs: (RunArray newFrom: attributes).
text inspect
] timeToRun asString  "'0:00:00:05.911'"

Also, resizing the opened Inspector takes 2-3 seconds to refresh.
You can see the output here: https://imgur.com/a/xUlBeVY

I should say without the #inspect the code ran without performance issues:
"'0:00:00:00.009'"

So I ran again the script for different sequence sizes:

String streamContents: [ : stream |
100 to: 2000 by: 100 do: [ : sl |
stream nextPutAll: ([
| text attributes |
" Generate a Text object from a random sequence "
text := ((BioSequence forAlphabet: BioDNAAlphabet) randomLength: sl)
sequence asText.
" Setup an array for each nucleotide background color "
attributes := Array new: text size.
1 to: text size do: [ : index |
attributes at: index put: {
(TextBackgroundColor color: (BioDNAAlphabet colorMap at: (text at: index)))
}  ].
text runs: (RunArray newFrom: attributes).
text inspect
] timeToRun asString);
cr
]
]

And these are the results:

0:00:00:00.147
0:00:00:00.28
0:00:00:00.568
0:00:00:00.993
0:00:00:01.776
0:00:00:02.123
0:00:00:03.111
0:00:00:04.084
0:00:00:04.574
0:00:00:06.192
0:00:00:07.214
0:00:00:07.915
0:00:00:10.382
0:00:00:12.725
0:00:00:12.359
0:00:00:17.357
0:00:00:17.147
0:00:00:20.651
0:00:00:20.392
0:00:00:23.238

At first I thought it was a problem of the Glamout text renderer for Rubric
Text, but profiling a single pass of the snippet for 2000 letters, shows a
couple of methods in Rubric scanner, after some DNU sends, which are
consuming a lot of the time:
RubCharacterBlockScanner(RubCharacterBlockScanner) >>
characterBlockAtPoint:index:in: and
RubCharacterBlockScanner(RubCharacterBlockScanner) >> endOfRun". I attached
the full profiler report so you may have a look if you like. But the
summary is:

**Leaves**
37.4% {8800ms}
RubCompositionScanner(RubCharacterScanner)>>basicScanCharactersFrom:to:in:rightX:stopConditions:kern:
6.3% {1476ms} Dictionary>>at:ifAbsentPut:
6.1% {1425ms} Context>>unwindComplete
4.6% {1082ms} Semaphore>>criticalReleasingOnError:
4.2% {991ms} Dictionary>>at:ifAbsent:
3.3% {785ms} Context>>aboutToReturn:through:
2.2% {527ms} Context>>resume:through:
2.0% {470ms} ExternalAddress>>isNull
1.8% {421ms} BlockClosure>>on:do:
1.7% {402ms}
RubCharacterBlockScanner(RubCharacterScanner)>>setConditionArray:
1.6% {378ms} FreeTypeFace>>validate
1.6% {376ms} Dictionary>>scanFor:
1.5% {364ms} Context>>unwindComplete:
1.5% {344ms} Context>>unwindBlock
1.4% {323ms} Array(SequenceableCollection)>>do:
1.3% {299ms} Dictionary(HashedCollection)>>findElementOrNil:
1.2% {293ms} RunArray>>at:setRunOffsetAndValue:
1.2% {289ms} FreeTypeCache>>atFont:charCode:type:ifAbsentPut:
1.1% {252ms} FreeTypeCacheLinkedList>>moveDown:

**Memory**
old +0 bytes
young -1,485,272 bytes
used -1,485,272 bytes
free +1,485,272 bytes

**GCs**
full 0 totalling 0ms (0.0% uptime)
incr 947 totalling 1,576ms (7.0% uptime), avg 2.0ms
tenures 0
root table 0 overflows

So my question is, is there any other text rendering backends to try? And
when I say backends I say which don't use Rubric.

Cheers,

Hernán
 - 23517 tallies, 23528 msec.

**Tree**

Process: (40s) Morphic UI Process: nil

99.1% {23313ms} UndefinedObject>>DoIt
  99.0% {23300ms} Text(Object)>>inspect
99.0% {23300ms} GTInspector class>>inspect:
  99.0% {23300ms} GTInspector class>>openOn:
99.0% {23300ms} GTInspector>>openOn:
  99.0% {23300ms} GTInspector(GLMCompositePresentation)>>openOn:
99.0% {23300ms} GTInspector(GLMCompositePresentation)>>openOn:with:
  99.0% {23298ms} GTInspector(GLMCompositePresentation)>>openWith:
99.0% {23298ms} GLMMorphicRenderer>>open:
  99.0% {23285ms} GLMMorphicWindowRenderer 
class(GLMMorphicWidgetRenderer class)>>render:from:
99.0% {23285ms} GLMMorphicWindowRenderer>>render:
  98.9% {23274ms} 

Re: [Pharo-users] Test method auto-generation in Calypso

2020-02-01 Thread Hernán Morales Durand
Well, it took some time but I created an issue and dirty implementation
proposal:

https://github.com/pharo-ide/Calypso/issues/498

Cheers,

Hernán

El mié., 9 oct. 2019 a las 1:57, Hernán Morales Durand (<
hernan.mora...@gmail.com>) escribió:

> Hi Denis,
>
> El vie., 4 oct. 2019 a las 5:09, Denis Kudriashov ()
> escribió:
>
>> Hi Hernan.
>> Sorry for late response (noticed mail just now).
>>
>> First try to implement just another browser tab which will show you
>> covering test or allow to create one.
>> Check for example how extra tab with test setup is done.
>>
>>
> Cool!! Well structured!
>
>
>> Then there is a feature in the tab manager to show multiple tabs at same
>> time. On the MacOS it is done by cmd+click on the tab header.
>>
>>
> That deserves a lot of points :)
> Thank you for sharing!
>
> Maybe it will be enough for your idea.
>>
>>
> I will keep you noticed
>
>
> Hernán
>
>
> Best regards,
>> Denis
>>
>> ср, 25 сент. 2019 г., 5:07 Hernán Morales Durand <
>> hernan.mora...@gmail.com>:
>>
>>> Hi,
>>>
>>> I have this idea of typing a method in a Browser and have another code
>>> area in the same browser where the method test is "automagically
>>> generated".
>>>
>>> This is, divide the current method pane in two: One for the method being
>>> written itself, and another for its test, where at least the method
>>> selector could be autogenerated by writing test
>>>
>>> Of course being able to jump to the method test would be super nice!
>>> (and with a keyboard shortcut). This reminds myself to write the method now
>>> instead of forget it forever.
>>>
>>> Any hints to make this happen in Calypso?
>>>
>>> Cheers,
>>>
>>> Hernán
>>>
>>>


Re: [Pharo-users] Pharo image processing library

2020-01-26 Thread Hernán Morales Durand
Hi Pablo,

I did some experiment with the Form class some time ago, maybe you can
borrow something from here:
https://80738163270632.blogspot.com/2018/10/pharo-script-of-day-proto-proto-image.html

Hernán


El sáb., 25 ene. 2020 a las 13:42, Pablo Navarro ()
escribió:

> Hi everyone! Thanks for the comments, I don't create a repository yet
> because, in this first version, I just wanted to try if it was possible, so
> only create a Form subclass and add three methods.
>
> Form subclass: #ImageForm
> instanceVariableNames: 'mode'
> classVariableNames: ''
> package: ‘SmallImage'
>
> ——>
>
> + aImage
> "add two image and return a new ImageForm"
> |aImageResult|
>
> aImageResult := self deepCopy.
>
> 0 to: self width do:[:x| 0 to: self height
> do:[:y|
> |aPoint aColorA aColorB|
> aPoint := (Point x: x y: y).
> aColorA := aImageResult colorAt: aPoint.
> aColorB := aImage colorAt: aPoint.
> aImageResult colorAt: aPoint put: aColorA + aColorB. ]].
> ^ aImageResult
>
> —->
>
> show: anTitle
> "Show a image in a window, scale the image to 500"
> |im|
> im := (ImageMorph withForm: (self scaledIntoFormOfSize:500) ).
> im withSnapshotBorder.
> im borderWidth: 5.
> im color: (Color gray).
> im openInWindowLabeled: (anTitle,' | mode: ', self mode asLowercase, '| ',
> self shape).
>
> -—>
>
>
> The first problem I found was the class Form return 'Form new' and not
> 'self class new' so I had to create two class method (in ImageForm):
>
> newFrom: aForm mode: aMode
> "create an ImageForm from to a Form object."
> | aImage|
>
> aImage := self new.
> aImage copyFrom: aForm.
> aImage mode: aMode.
> ^ aImage.
>
> —>
>
> open: aFileName
> “Open a image.”
> | aImage aForm|
>  aForm := ImageReadWriter formFromFileNamed: aFileName.
> aImage := self newFrom: aForm mode: ‘ARGB’.
> ^ aImage.
>
> —>
>
>
> I think that the methods (+ and show) should be directly in the class Form
> but I didn't want to change the original. If you think it's okay, I can
> continue working and this week upload to github with their respective tests.
>
> P.S. sorry for my limited English.
>
>
>
>
> Best Regards Pablo.
> El 25 de ene. de 2020 12:10 -0300, Stéphane Ducasse <
> stephane.duca...@inria.fr>, escribió:
>
> what I always find strange is that people do not invest in tests for
> domains that are super nice to test….
>
> S.
>
> On 25 Jan 2020, at 16:04, Serge Stinckwich 
> wrote:
>
> You may have a look to Cuis library :
> https://github.com/Cuis-Smalltalk/Numerics
> There is an image analysis package.
> We have some plan in PolyMath to port it:
> https://github.com/PolyMathOrg/PolyMath/issues/158
>
> Best,
>
> On Fri, Jan 24, 2020 at 11:20 PM Pablo Navarro  wrote:
>
>> Hi everyone!
>>
>> I’m searching for one library for image processing in Pharo. I couldn't
>> find anything (only wrappers) so I tried programming one for basic
>> operations (sum,
>> subtraction) with images using class “Form”.
>>
>> What do you think about this?
>>
>>
>> For providing a context, I'm studying a PhD. in image processing, but all
>> of the operations that I do, do it in Python. I try using Pharo for more
>> fun :D.
>>
>> Best Regards Pablo.
>>
>
>
> --
> Serge Stinckwic
> ​h​
>
> Int. Research Unit
>  on Modelling/Simulation of Complex Systems (UMMISCO)
> ​Sorbonne University
>  (SU)
> French National Research Institute for Sustainable Development (IRD)​
> U
> ​niversity of Yaoundé I​, Cameroon
> "Programs must be written for people to read, and only incidentally for
> machines to execute."
> https://twitter.com/SergeStinckwich
> ​
>
>
> 
> 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] Annonce Pharo-LibVLC

2020-01-12 Thread Hernán Morales Durand
Hi Benoit,

Thank you for publishing this one!
This is how I installed:

Iceberg remoteTypeSelector: #scpUrl.
Metacello new
baseline: 'VLC';
repository: 'github://badetitou/Pharo-LibVLC';
load.

However I got this warning on Mac:

This package depends on the following classes:
  VLCLibrary
  VLCLibraryCore
You must resolve these dependencies before you will be able to load these
definitions:
  VLCLibrary>>#macModuleName
  VLCLibraryCore>>#macModuleName

And consequently all test method fails. Is there something I've missing?

Cheers,

Hernán

El dom., 12 ene. 2020 a las 12:42, Benoit Verhaeghe ()
escribió:

> Hello there,
>
> I just want to let you know that I've developed an FFI binding to VLC.
> Since, version 2.1.1 you can use it on Windows, Linux, and OSX.
> https://github.com/badetitou/Pharo-LibVLC
>
> Thanks to the binding you can play easily sounds and videos from Pharo.
>
> The next steps are:
>
>- Documentation and examples (in the Image, GitHub, and a blog
>post/tutorial)
>- Full Travis testing
>- SDL support
>- A #Spec2  UI
>- A Seaside UI (https://github.com/pharo-media-center
>)
>
> Feel free to use the binding and tell me if you need help with it.
>
> Benoît Verhaeghe
>
> --
> Benoît Verhaeghebadetitou.github.io
> benoit.verhae...@berger-levrault.com
> R Engineer at berger-levraultbenoit.verhae...@inria.fr
> PHD student at Inria-Lille--Nord-Europe
>
>


Re: [Pharo-users] How can we celebrate the 50th anniversary of Smalltalk?

2020-01-05 Thread Hernán Morales Durand
Hi there,

Maybe people is thinking about a great celebration idea :)
Cheers,

Hernán

El dom., 5 ene. 2020 a las 1:07, horrido ()
escribió:

> horrido wrote
> >
> https://medium.com/@richardeng/how-can-we-celebrate-the-50th-anniversary-of-smalltalk-e6b35dbc09a9
>
> Amazingly, no one has any suggestions! I'm afraid the 50th anniversary will
> pass very quietly.
>
>
>
> --
> Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html
>
>


Re: [Pharo-users] thesis on using ML for Pharo code completion

2019-12-06 Thread Hernán Morales Durand
Hi Myroslava,

I read your post (actually a few of them) and I have some questions:

- I was surprised to read about n-gram model because at least in NLP was
outperformed by modern DL approaches. But then I read you considered RNN
(and maybe attention model?) so it sounds really interesting.
- Do you plan to benchmark agains TabNine? I know they are a black box, but
they seem to support Smalltalk
https://github.com/zxqfl/TabNine/blob/master/languages.yml
- ERNIE 2.0 supports continual learning (AFAIK this was only applied to
NLP) so develop something which learns incrementally would be an option for
your PhD?

One problem, for me, of code prediction is gathering enough context
information to make informed predictions (I ignore if there is something
like GLUE benchmarks for code). This means to propose contextualized
completions based on multiple factors: for example the class where I am
positioned in the Browser, the recent used/written methods, etc. Of course
the possibilities are infinite! Just thinking out loud.

Cheers,

Hernán


El lun., 2 dic. 2019 a las 11:25, Myroslava Romaniuk via Pharo-users (<
pharo-users@lists.pharo.org>) escribió:

> Hi everyone
>
> I'm starting work on a thesis on using ML for Pharo completion, in
> particular n-gram language models, and I wrote a little blog post with some
> details and research questions that I have. Here's a link:
> https://medium.com/@myroslavarm/using-ml-for-pharo-autocompletion-ideas-80a362258bc3
> .
>
> Any feedback or ideas on the topic (and research questions) are most
> welcome.
>
> Best regards,
> Myroslava
>


Re: [Pharo-users] Script to download specific Pharo version

2019-11-03 Thread Hernán Morales Durand
Hi Bruno

El lun., 21 oct. 2019 a las 18:39, BrunoBB ()
escribió:

> Hi,
>
> We have a Linux script to build our image and was working well until
> recently.
> It seems that the failure is related (not confirmed yet) to
> https://github.com/pharo-project/pharo/issues/4764
>
> Becuase it fail to load Seaside into the Pharo image.
>
> Is there any way to download a specific build or version like ?
> wget -q -O- https://get.pharo.org/64/703 | bash
>
> In this case to download Pharo 7.03
>
> We want to try our script with different Pharo versions, because "wget -O-
> https://get.pharo.org/64 | bash" it download the latest.
>
>
Did you find a way to download a specifivc build or minor version?
Me too I would like to know

Hernán


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


Re: [Pharo-users] ZnCharacterReadWriteStream error?

2019-10-26 Thread Hernán Morales Durand
Hello Eric,

I couldn't reproduce it on Linux, all tests pass ok.  Are you using Pharo
7? Could you post how you're installing it?
The only thing which seems "strange" are three Zn test methods overrides,
but after merging them no problems.

Cheers

Hernán


El sáb., 26 oct. 2019 a las 15:24, Eric Gade ()
escribió:

> Hello all,
>
> I'm attempting to install the OpenAPI package
>  from Github via metacello and am
> experiencing an error I'm having trouble wrapping my head around.
>
> The package itself requires nothing exotic in terms of dependencies, and
> seems to be pulling in Zinc from correct sources in the baseline.
>
> The error I'm seeing is a DNU on  ZnBufferedReadWriteStream >>
> #defaultBufferSize.  This is odd because it seems to be called from
> ZnBufferedReadWriteStream >> on:
>
> You can find my error stack in this Github issue
> .
>
> Thanks!
>
> --
> Eric
>


Re: [Pharo-users] Glorp + P3 + SQLite

2019-10-20 Thread Hernán Morales Durand
Hi Todd,

El sáb., 19 oct. 2019 a las 13:11, Todd Blanchard via Pharo-users (<
pharo-users@lists.pharo.org>) escribió:

> I should probably mention that I do not really have a great handle on how
> package configurations work these days.
>
> Coming back to Smalltalk after a long time away.
>
>
Welcome back!


> Pointer to an explanation of how package configurations work would be
> great.
>
>
Have a look at:
https://github.com/pharo-open-documentation/pharo-wiki/blob/master/General/Baselines.md

Cheers,

Hernán


Re: [Pharo-users] Smallest docker image for pharo >=7 ?

2019-10-17 Thread Hernán Morales Durand
El mié., 16 oct. 2019 a las 19:49, Julián Maestri ()
escribió:

> Example:
>
> # Stage 1: Load the project on an empty image, in this case this is a 
> development image (should change to use a minimal image)
>
> FROM basmalltalk/pharo:7.0-image AS loader
> COPY load-project.st ./
> RUN pharo Pharo.image load-project.st --save --quit
>
> # Stage 2: Copy the resulting Pharo.image with our project loaded
> # into a new docker image with just the vm
> # start in a new stage to keep docker image minimal
> FROM basmalltalk/pharo:7.0
>
> USER root
>
> WORKDIR /opt/app
> COPY start.sh .
> COPY --from=loader /opt/pharo/Pharo.image ./
> COPY --from=loader /opt/pharo/Pharo.changes ./
> COPY --from=loader /opt/pharo/Pharo*.sources ./
>
> RUN mkdir logs \
>   && chmod a+x start.sh \
>   && chown --recursive pharo:pharo /opt/app
>
> USER pharo
> EXPOSE 8080
>
> CMD ["./start.sh"]
>
>
> The resulting image size is ~80mb including image, changes & sources
> Reference:
> https://docs.docker.com/develop/develop-images/multistage-build/
>
> As a side note, the final image size is not what really matters, if you
> have 20 different images all starting from the same base image (eg
> ubuntu:18.04) the base layer is shared among all images so the network /
> disk usage is less than the total size of the image.
>
> It's important to keep the docker image thin, but also to keep layers at a
> minimum and not adding / removing stuff during the build, because those are
> stored in the middle layers (multi stage helps to remove that).
>
>
Cool!! Thank you Julián,

Cheers,

Hernán


> Cheers.
>
> On Tue, 15 Oct 2019 at 20:00, Hernán Morales Durand <
> hernan.mora...@gmail.com> wrote:
>
>>
>>
>> El lun., 14 oct. 2019 a las 5:23, Pierce Ng ()
>> escribió:
>>
>>> On Mon, Oct 14, 2019 at 04:07:49AM -0300, Hernán Morales Durand wrote:
>>> > Because I am lazy and want to avoid searching through all DockerHub
>>> > repository pages... Do you know a Dockerfile to generate the smallest
>>> > possible docker image for Pharo?
>>> > Anyone could make it work Pharo on Alpine since it uses different libc?
>>>
>>> Hi Hernán,
>>>
>>> Please see following links:
>>>
>>> - https://github.com/pharo-contributions/Docker-Alpine
>>> - https://hub.docker.com/r/pierceng/pharovm-alpine
>>> - https://hub.docker.com/r/pierceng/pharo7-alpine
>>> - https://www.samadhiweb.com/blog/2019.07.20.alpine.pharo.minimal.html
>>> - https://www.samadhiweb.com/blog/2019.08.11.minimizing.pharo.html
>>>
>>>
>> Nice! It works with latest minimal 7.0.4 too.
>>
>> BTW you used .sources whith seem to be for Pharo 7
>> (Pharo7.0-32bit-0903ade.sources), but when I tried with latest stable
>> minimal and for some reason requires the V60 sources:
>>
>> $ docker run --rm --ulimit rtprio=2 pharo7_docker_alpine printVersion
>> Pharo cannot locate the sources file named /pkg/image/PharoV60.sources.
>>
>> I found also another approach using rtprio=2:2 suggested from
>> https://github.com/ba-st/docker-pharo/blob/master/docs/rtprio.md
>> (soft:hard ulimits).
>>
>> The Alpine-based VM can be made smaller by removing unused/irrelevant
>>> modules.
>>>
>>> Image-wise, currently I am using Pharo 7 minimal, which is just under
>>> 30MB, and that forms the lower bound of the Pharo image size.
>>>
>>>
>> The built image here is aprox. 99 Mbytes
>>
>> REPOSITORY   TAG IMAGE IDCREATED
>> SIZE
>> pharo7_docker_alpine latest  595b9ece26253 hours
>> ago 99.4MB
>>
>> but I think you didn't sumed the .sources.
>>
>>
>>> However there is also the Pharo Candle effort that aims to make really
>>> small images, which I hope to try out soon.
>>>
>>> > I am also interested in which stage you use to install packages into
>>> the
>>> > image, and why? Do you copy the contained image into docker already
>>> built?
>>>
>>> For Pharo, I start with the regular or minimal image, then load my
>>> packages.
>>>
>>> For Docker, I first build a container image for the VM only. Using that
>>> I build a new container image from the Pharo image and other required
>>> files.
>>>
>>>
>> Thank you for sharing Pierce.
>>
>> Hernán
>>
>>
>


Re: [Pharo-users] Smallest docker image for pharo >=7 ?

2019-10-15 Thread Hernán Morales Durand
El lun., 14 oct. 2019 a las 5:23, Pierce Ng ()
escribió:

> On Mon, Oct 14, 2019 at 04:07:49AM -0300, Hernán Morales Durand wrote:
> > Because I am lazy and want to avoid searching through all DockerHub
> > repository pages... Do you know a Dockerfile to generate the smallest
> > possible docker image for Pharo?
> > Anyone could make it work Pharo on Alpine since it uses different libc?
>
> Hi Hernán,
>
> Please see following links:
>
> - https://github.com/pharo-contributions/Docker-Alpine
> - https://hub.docker.com/r/pierceng/pharovm-alpine
> - https://hub.docker.com/r/pierceng/pharo7-alpine
> - https://www.samadhiweb.com/blog/2019.07.20.alpine.pharo.minimal.html
> - https://www.samadhiweb.com/blog/2019.08.11.minimizing.pharo.html
>
>
Nice! It works with latest minimal 7.0.4 too.

BTW you used .sources whith seem to be for Pharo 7
(Pharo7.0-32bit-0903ade.sources), but when I tried with latest stable
minimal and for some reason requires the V60 sources:

$ docker run --rm --ulimit rtprio=2 pharo7_docker_alpine printVersion
Pharo cannot locate the sources file named /pkg/image/PharoV60.sources.

I found also another approach using rtprio=2:2 suggested from
https://github.com/ba-st/docker-pharo/blob/master/docs/rtprio.md (soft:hard
ulimits).

The Alpine-based VM can be made smaller by removing unused/irrelevant
> modules.
>
> Image-wise, currently I am using Pharo 7 minimal, which is just under
> 30MB, and that forms the lower bound of the Pharo image size.
>
>
The built image here is aprox. 99 Mbytes

REPOSITORY   TAG IMAGE IDCREATED
  SIZE
pharo7_docker_alpine latest  595b9ece26253 hours
ago 99.4MB

but I think you didn't sumed the .sources.


> However there is also the Pharo Candle effort that aims to make really
> small images, which I hope to try out soon.
>
> > I am also interested in which stage you use to install packages into the
> > image, and why? Do you copy the contained image into docker already
> built?
>
> For Pharo, I start with the regular or minimal image, then load my
> packages.
>
> For Docker, I first build a container image for the VM only. Using that
> I build a new container image from the Pharo image and other required
> files.
>
>
Thank you for sharing Pierce.

Hernán


[Pharo-users] Smallest docker image for pharo >=7 ?

2019-10-14 Thread Hernán Morales Durand
Hi guys,

Because I am lazy and want to avoid searching through all DockerHub
repository pages... Do you know a Dockerfile to generate the smallest
possible docker image for Pharo?

I am also interested in which stage you use to install packages into the
image, and why? Do you copy the contained image into docker already built?
or do you prefer install packages on building? (as done by pip -r
requirements.txt)
Anyone using xpra binding from subuser [1]?
Anyone could make it work Pharo on Alpine since it uses different libc?

Anyway sharing opinions would be also appreciated.

[1] http://subuser.org/news/0.3.html

Cheers.

Hernán


Re: [Pharo-users] Test method auto-generation in Calypso

2019-10-08 Thread Hernán Morales Durand
Hi Denis,

El vie., 4 oct. 2019 a las 5:09, Denis Kudriashov ()
escribió:

> Hi Hernan.
> Sorry for late response (noticed mail just now).
>
> First try to implement just another browser tab which will show you
> covering test or allow to create one.
> Check for example how extra tab with test setup is done.
>
>
Cool!! Well structured!


> Then there is a feature in the tab manager to show multiple tabs at same
> time. On the MacOS it is done by cmd+click on the tab header.
>
>
That deserves a lot of points :)
Thank you for sharing!

Maybe it will be enough for your idea.
>
>
I will keep you noticed


Hernán


Best regards,
> Denis
>
> ср, 25 сент. 2019 г., 5:07 Hernán Morales Durand  >:
>
>> Hi,
>>
>> I have this idea of typing a method in a Browser and have another code
>> area in the same browser where the method test is "automagically
>> generated".
>>
>> This is, divide the current method pane in two: One for the method being
>> written itself, and another for its test, where at least the method
>> selector could be autogenerated by writing test
>>
>> Of course being able to jump to the method test would be super nice! (and
>> with a keyboard shortcut). This reminds myself to write the method now
>> instead of forget it forever.
>>
>> Any hints to make this happen in Calypso?
>>
>> Cheers,
>>
>> Hernán
>>
>>


Re: [Pharo-users] Test method auto-generation in Calypso

2019-10-08 Thread Hernán Morales Durand
Hi Stephan

El vie., 4 oct. 2019 a las 4:40, Stephan Eggermont ()
escribió:

> Hernán Morales Durand
>  wrote:
> > Hi,
> >
> > I have this idea of typing a method in a Browser and have another code
> area
> > in the same browser where the method test is "automagically generated".
> >
> > This is, divide the current method pane in two: One for the method being
> > written itself, and another for its test, where at least the method
> > selector could be autogenerated by writing test
>
> When do you find that useful? I have only a very small number of test cases
> where the name of the test is that of the method.
>
>
Actually I don't care too much about the test name, but it would be super
for me to have a side code pane (IN the same browser window) to remember to
write/update the current method test. It is more an usability issue.

 Hernán


Re: [Pharo-users] [cormas-dev] OpenPonk ported to Pharo 7

2019-10-08 Thread Hernán Morales Durand
s/ported/loadable/g

Guys, you may help me on this one:

I suspect some classes in OpenPonk-Spec-Commands are breaking Calypso in
Pharo 7 at some point on usage (not really sure, but I need to discard
possibilities).
Do you know any way to specify conditional loading in a Baseline method?
I want to load all OpenPonk-Spec categories except OpenPonk-Spec-Commands.

Cheers,

Hernán



El mar., 8 oct. 2019 a las 11:03, Hernán Morales Durand (<
hernan.mora...@gmail.com>) escribió:

> Hi Serge,
>
> Noy yet sadly, what I did was to make the changes to make OpenPonk just
> loadable in Pharo 7. Besides additional needed OpenPonk porting tasks, now
> I have to check why Calypso gets broken (unusable) and I have to compile
> some methods by hand, for example:
>
> ClySwitchMethodViewModeCommand compile: 'isAppliedToBrowser
>
> ^browser methodGroupView showsItemsOfType: self methodGroupType'
>
> Also it seems Pharo 7 no longer includes a fallback Browser to solve this
> type of problems...
> Cheers,
>
> Hernán
>
>
>
> El mar., 8 oct. 2019 a las 5:12, Serge Stinckwich (<
> serge.stinckw...@gmail.com>) escribió:
>
>>
>>
>> On Tue, Oct 8, 2019 at 4:57 AM Hernán Morales Durand <
>> hernan.mora...@gmail.com> wrote:
>>
>>> Hi guys!!
>>>
>>> Glad to write to you again.
>>>
>>
>> Hi Hernan,
>>
>> thank you for your commitment.
>>
>>> It took me some days but now I've had a loadable OpenPonk in Pharo 7 :)
>>>
>>> " In case of empty Warning windows appearing you can uncomment:"
>>> " Smalltalk tools debugger alwaysOpenFullDebugger: true. "
>>> [ Metacello new
>>>  baseline: 'OpenPonk';
>>>  repository: 'github://hernanmd/OpenPonk/repository';
>>>  load ]
>>> on: IceGenericError
>>> do: [ : ex | ex retry ].
>>>
>>>
>> You mean OpenPonk is usable in Pharo 7 ?
>> I will give a try.
>> Regards,
>> --
>> Serge Stinckwic
>> h
>>
>> Int. Research Unit
>>  on Modelling/Simulation of Complex Systems (UMMISCO)
>> Sorbonne University
>>  (SU)
>> French National Research Institute for Sustainable Development (IRD)
>> U
>> niversity of Yaoundé I, Cameroon
>> "Programs must be written for people to read, and only incidentally for
>> machines to execute."
>> https://twitter.com/SergeStinckwich
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "cormas-dev" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to cormas-dev+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/cormas-dev/CAOysuxU92FFtx0i4Og-ak%3DQ3D%2BEC3YQ-qTKcnAsnd9_ZAOnyHw%40mail.gmail.com
>> <https://groups.google.com/d/msgid/cormas-dev/CAOysuxU92FFtx0i4Og-ak%3DQ3D%2BEC3YQ-qTKcnAsnd9_ZAOnyHw%40mail.gmail.com?utm_medium=email_source=footer>
>> .
>>
>


Re: [Pharo-users] Test method auto-generation in Calypso

2019-09-30 Thread Hernán Morales Durand
Ok, any hint to split the code area in Calypso at least?

Salut!

Hernán

El mié., 25 sept. 2019 a las 1:06, Hernán Morales Durand (<
hernan.mora...@gmail.com>) escribió:

> Hi,
>
> I have this idea of typing a method in a Browser and have another code
> area in the same browser where the method test is "automagically
> generated".
>
> This is, divide the current method pane in two: One for the method being
> written itself, and another for its test, where at least the method
> selector could be autogenerated by writing test
>
> Of course being able to jump to the method test would be super nice! (and
> with a keyboard shortcut). This reminds myself to write the method now
> instead of forget it forever.
>
> Any hints to make this happen in Calypso?
>
> Cheers,
>
> Hernán
>
>


[Pharo-users] Test method auto-generation in Calypso

2019-09-24 Thread Hernán Morales Durand
Hi,

I have this idea of typing a method in a Browser and have another code area
in the same browser where the method test is "automagically generated".

This is, divide the current method pane in two: One for the method being
written itself, and another for its test, where at least the method
selector could be autogenerated by writing test

Of course being able to jump to the method test would be super nice! (and
with a keyboard shortcut). This reminds myself to write the method now
instead of forget it forever.

Any hints to make this happen in Calypso?

Cheers,

Hernán


Re: [Pharo-users] My Pharo Wiki

2019-09-18 Thread Hernán Morales Durand
Hello Julien and Sean,

Thank you for sharing this, it should be more promoted.

Cheers,

Hernán

El lun., 9 sept. 2019 a las 15:39, Julien ()
escribió:

> Hello Sean,
>
> Nice work. :-)
>
> Do you know about pharo-open-documentation/pharo-wiki [1] ?
>
> With Cyril and Oleks, we started it to collect code snippets.
>
> Now that it gows bigger and people start to contribute, we try to build a
> real wiki to document obscure features of Pharo.
>
> Tell us if you want to contribute, we would be happy of any help! :-)
>
> Cheers,
>
> Julien
>
> Links:
> [1]: https://github.com/pharo-open-documentation/pharo-wiki
>
> ---
> Julien Delplanque
> Doctorant à l’Université de Lille
> http://juliendelplanque.be/phd.html
> Equipe Rmod, Inria
> Bâtiment B 40, Avenue Halley 59650 Villeneuve d'Ascq
> Numéro de téléphone: +333 59 35 86 40
>
> Le 9 sept. 2019 à 20:18, Sean P. DeNigris  a écrit
> :
>
> I've been collecting Pharo tidbits that I found interesting for quite a
> while. I was aggregating everything today and realized that it had grown
> into a small "cookbook" which has some useful information not otherwise
> easily available. I share it in case it is of help:
>
> https://github.com/seandenigris/pharo/wiki
>
> NB it was written for my personal use so it may be rough around the edges.
> Feel free to ask questions if I can clarify anything.
>
>
>
> -
> Cheers,
> Sean
> --
> Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html
>
>
>


Re: [Pharo-users] Introduction GSoC 2019

2019-06-17 Thread Hernán Morales Durand
Hi Nina,

This is very important for the community.
If you want to check graph layouting applied to cancer research this is a
good project to grab ideas from:
http://bioinfo-out.curie.fr/projects/dedal/#downloads

And you can browse Cytoscape apps for more : http://apps.cytoscape.org/

Cheers,

Hernán


El sáb., 11 may. 2019 a las 7:18, Nina Medic ()
escribió:

> Hello,
> I am Nina, and I am a student from Serbia. Currently I am on the second
> year, of my master studies in Computer science. I have been working with
> Pharo for more than a year now. As a project in one of my classes, I was
> implementing a program that parses graphs and makes a visualization of
> them. Last semester I followed MOOC for Pharo.
>
> A couple of days ago, I was fortunate enough to be accepted for this year
> Google Summer of Code. The project I will be working on is called *Graph
> library with layouting algorithm*. What I will do is implement the graph
> structure with all necessary parts in one separate library. Beside that I
> will include layouthing algorithms. Some of which are already implemented
> as a part of some other projects and packages, those I will pull out. For
> the other ones, I will be using doctoral dissertation from Vaderna Renata
> titled *Algorithms and a language for the support of automatically laying
> out diagram elements*. You can find my proposal here:
>
> https://docs.google.com/document/d/1V8_HaZnxYsCfaiZs4vI1C5Dh4TvRPz-H51aYOuY9lFA/edit?usp=sharing
>
>  I would like to know, what are you thinking about this project. How
> important is for the community?
>
> One of fellow students from GSoC (we are both working for Pharo
> consortium) and I are considering using the same blog. What do you think
> about that? I will be also posting about my progress on Twitter:
> https://twitter.com/medicka992 which will make it easy for everybody to
> follow my work.
>
> I am looking forward to working on this project and with all of you.
>
> Sincerely,
> Nina.
>


Re: [Pharo-users] IceGenericError: Failed to connect to github.com: Interrupted system call

2019-06-10 Thread Hernán Morales Durand
This is interesting, Pharo VM crashes with segmentation fault on macOS High
Sierra when I select the error instance variable from the GTDebugger.
crash.dmp attached.

On the other hand, I wrote a workaround for others with the same problem
and who need a quick & dirty fix.

Cheers,

Hernán

El lun., 10 jun. 2019 a las 8:00, Hernán Morales Durand (<
hernan.mora...@gmail.com>) escribió:

> Attached the Stack in FUEL format in case someone want to check it out
>
> Cheers,
>
> Hernán
>
>
>
> El dom., 9 jun. 2019 a las 20:25, Hernán Morales Durand (<
> hernan.mora...@gmail.com>) escribió:
>
>> Hi guys,
>>
>>
>> In Pharo 7.0.3 I get an Iceberg error while cloning a repository. I tried
>> to fix dependent repositories, I guess there is something weird in
>> Diacriticals (https://github.com/hernanmd/Diacriticals) however I have
>> no clue what's wrong there.
>>
>>
>> I can reproduce it in a clean image by evaluating:
>>
>>
>> Metacello new
>>
>> baseline: 'StringExtensions';
>>
>> repository: 'github://hernanmd/StringExtensions/repository';
>>
>> load.
>>
>>
>> Any idea what could be wrong?
>>
>>
>> Cheers,
>>
>>
>> Hernán
>>
>>
>>


crash.dmp
Description: Binary data


IceGitClone-execute.st
Description: Binary data


[Pharo-users] IceGenericError: Failed to connect to github.com: Interrupted system call

2019-06-09 Thread Hernán Morales Durand
Hi guys,


In Pharo 7.0.3 I get an Iceberg error while cloning a repository. I tried
to fix dependent repositories, I guess there is something weird in
Diacriticals (https://github.com/hernanmd/Diacriticals) however I have no
clue what's wrong there.


I can reproduce it in a clean image by evaluating:


Metacello new

baseline: 'StringExtensions';

repository: 'github://hernanmd/StringExtensions/repository';

load.


Any idea what could be wrong?


Cheers,


Hernán


Re: [Pharo-users] Pharo 7 minimal or headless

2019-05-12 Thread Hernán Morales Durand
Hi Esteban

I cannot see any minimal 7.0 image in https://get.pharo.org/64/ yet.
It should be accessible by doing?

wget -O- https://get.pharo.org/64/70-minimal | bash

Cheers,

Hernán




El jue., 9 may. 2019 a las 6:57, Esteban Lorenzano ()
escribió:

> Yeah, but do not use that place :)
> The minimal for 64bits was missing in get-files (I forget to add them
> before), but now the like are there.
>
> Esteban
>
> On 9 May 2019, at 10:24, Guillermo Polito 
> wrote:
>
> Hola Bruno,
>
> The full archive of Pharo7 images is in http://files.pharo.org/image/70/.
> There you'll find latest-minimal-[arch].zip for 64 and 32 bits.
>
> On Wed, May 8, 2019 at 7:03 PM BrunoBB  wrote:
>
>> Hi Esteban,
>>
>> I'm looking for Pharo 64 minimal (to use in Linux) but i can not find any
>> at
>> http://files.pharo.org/get-files/70/
>>
>> pharo-minimal.zip it seems a Pharo 32 image not sure if i can use these
>> files with a 64bit Pharo VM.
>>
>> regards,
>> bruno
>>
>>
>>
>> --
>> Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html
>>
>>
>
> --
>
> Guille Polito
> Research Engineer
>
>
> Centre de Recherche en Informatique, Signal et Automatique de Lille
> CRIStAL - UMR 9189
> French National Center for Scientific Research - *http://www.cnrs.fr
> *
>
> *Web:* *http://guillep.github.io* 
> *Phone: *+33 06 52 70 66 13
>
>
>


Re: [Pharo-users] How to make Metacello ignore package cache?

2019-04-26 Thread Hernán Morales Durand
I understand. I will create the BaselineOf.
Thank you Dale,

Cheers,

Hernán


El vie., 26 abr. 2019 a las 15:31, Dale Henrichs
() escribió:
>
> Hernán,
>
> The multiple retrying messages imply that Metacello/Monticello is not
> able to download the ConfigurationOf ... which points to another issue:
> a ConfigurationOf cannot really be used with a git repository ... a
> ConfigurationOf should only be used with a http:// repo  ... you should
> be using a BaselineOf with a git repository ...
>
> Dale
>
> On 4/26/19 11:11 AM, Hernán Morales Durand wrote:
> > Hi Dale,
> >
> > El vie., 26 abr. 2019 a las 15:12, Dale Henrichs
> > () escribió:
> >> I'm not exactly sure why you are getting the error, but the standard way
> >> to deal with a package-cache issue (or at least eliminate the
> >> package-cache as the real culprit) is to clear the package-cage in the
> >> Monticello browser ...
> > Ok, I will look for a way to do it programatically.
> >
> >> An alternative (or next step) would be to try the following:
> >>
> >> Metacello new
> >>   configuration: 'MyConfig';
> >>   repository: 'github://hernanmd/MyPackage/repository';
> >>   get
> >>
> >> the `get` forces a reload of ConfigurationOfMyConfig from the source
> >> repository ...
> >>
> >> If that doesn't work, please supply a complete Transcript of your
> >> Metacello `get` episode, so that I can try to figure out what is going
> >> wrong ...
> >
> > The Transcript after get is:
> >
> > ...RETRY->ConfigurationOfGADM
> > ...RETRY->ConfigurationOfGADM
> > ...FAILED->ConfigurationOfGADM
> >
> > This is the actual script I tried with the get:
> >
> > Metacello new
> >   configuration: 'GADM';
> >   repository: 'github://hernanmd/GADM/repository';
> >   get.
> >
> > For this repository : https://github.com/hernanmd/GADM
> >
> > Cheers,
> >
> > Hernán
> >
> >
> >> Dale
> >>
> >> On 4/26/19 10:40 AM, Hernán Morales Durand wrote:
> >>> Hi guys,
> >>>
> >>> Is there any way to tell Metacello to ignore the local package cache
> >>> after a failed load?
> >>>
> >>> Say I tried to load:
> >>>
> >>> Metacello new
> >>>   configuration: 'MyConfig';
> >>>   repository: 'github://hernanmd/MyPackage';
> >>>   load.
> >>>
> >>> Then I figure the "repository" path is missing and I add it:
> >>>
> >>> Metacello new
> >>>   configuration: 'MyConfig';
> >>>   repository: 'github://hernanmd/MyPackage/repository';
> >>>   load.
> >>>
> >>> And I get this exception: Could not resolve: ConfigurationOfMyConfig
> >>> [ConfigurationOfMyConfig] in
> >>> D:\Hernan\Pharo703\pharo-local\package-cache
> >>> https://github.com/hernanmd/MyPackage.git[master]
> >>>
> >>> It doesn't matter if I use #onConflictUseIncoming or
> >>>
> >>> MetacelloPlatform current defaultPackageCache flushCache.
> >>>
> >>> I cannot find a way to specify to ignore the cache.
> >>> Any ideas?
> >>>
> >>> Cheers,
> >>>
> >>> Hernán
> >>>
>



Re: [Pharo-users] How to make Metacello ignore package cache?

2019-04-26 Thread Hernán Morales Durand
Hi Dale,

El vie., 26 abr. 2019 a las 15:12, Dale Henrichs
() escribió:
>
> I'm not exactly sure why you are getting the error, but the standard way
> to deal with a package-cache issue (or at least eliminate the
> package-cache as the real culprit) is to clear the package-cage in the
> Monticello browser ...

Ok, I will look for a way to do it programatically.

>
> An alternative (or next step) would be to try the following:
>
> Metacello new
>  configuration: 'MyConfig';
>  repository: 'github://hernanmd/MyPackage/repository';
>  get
>
> the `get` forces a reload of ConfigurationOfMyConfig from the source
> repository ...
>
> If that doesn't work, please supply a complete Transcript of your
> Metacello `get` episode, so that I can try to figure out what is going
> wrong ...


The Transcript after get is:

...RETRY->ConfigurationOfGADM
...RETRY->ConfigurationOfGADM
...FAILED->ConfigurationOfGADM

This is the actual script I tried with the get:

Metacello new
 configuration: 'GADM';
 repository: 'github://hernanmd/GADM/repository';
 get.

For this repository : https://github.com/hernanmd/GADM

Cheers,

Hernán


>
> Dale
>
> On 4/26/19 10:40 AM, Hernán Morales Durand wrote:
> > Hi guys,
> >
> > Is there any way to tell Metacello to ignore the local package cache
> > after a failed load?
> >
> > Say I tried to load:
> >
> > Metacello new
> >  configuration: 'MyConfig';
> >  repository: 'github://hernanmd/MyPackage';
> >  load.
> >
> > Then I figure the "repository" path is missing and I add it:
> >
> > Metacello new
> >  configuration: 'MyConfig';
> >  repository: 'github://hernanmd/MyPackage/repository';
> >  load.
> >
> > And I get this exception: Could not resolve: ConfigurationOfMyConfig
> > [ConfigurationOfMyConfig] in
> > D:\Hernan\Pharo703\pharo-local\package-cache
> > https://github.com/hernanmd/MyPackage.git[master]
> >
> > It doesn't matter if I use #onConflictUseIncoming or
> >
> > MetacelloPlatform current defaultPackageCache flushCache.
> >
> > I cannot find a way to specify to ignore the cache.
> > Any ideas?
> >
> > Cheers,
> >
> > Hernán
> >
>



[Pharo-users] How to make Metacello ignore package cache?

2019-04-26 Thread Hernán Morales Durand
Hi guys,

Is there any way to tell Metacello to ignore the local package cache
after a failed load?

Say I tried to load:

Metacello new
configuration: 'MyConfig';
repository: 'github://hernanmd/MyPackage';
load.

Then I figure the "repository" path is missing and I add it:

Metacello new
configuration: 'MyConfig';
repository: 'github://hernanmd/MyPackage/repository';
load.

And I get this exception: Could not resolve: ConfigurationOfMyConfig
[ConfigurationOfMyConfig] in
D:\Hernan\Pharo703\pharo-local\package-cache
https://github.com/hernanmd/MyPackage.git[master]

It doesn't matter if I use #onConflictUseIncoming or

MetacelloPlatform current defaultPackageCache flushCache.

I cannot find a way to specify to ignore the cache.
Any ideas?

Cheers,

Hernán



Re: [Pharo-users] Pharo refactoring rewrite tool?

2019-03-18 Thread Hernán Morales Durand
Hi Tim,

Recently I've sent a PR to load MatchTool in P7, you may want to check it
out:

https://github.com/Uko/MatchTool

Cheers,

Hernán

El dom., 17 mar. 2019 11:35 p. m., Tim Mackinnon 
escribió:

> I recall there was a refactoring rewrite tool - but where is it in Pharo?
> Is it something you have to load separately? Or do you just copy some of
> the deprecated examples and do it manually? I thought there was something
> with a window where you typed in a rule and then it showed you what it
> would do? (Or was that only in Dolphin?)
>
> Thanks,
>
> Tim
>


Re: [Pharo-users] Calypso openOnGroup?

2019-03-15 Thread Hernán Morales Durand
Hello Denis,

It worked perfectly,
Thank you!

Cheers

Hernán

El vie., 15 mar. 2019 a las 19:08, Denis Kudriashov
() escribió:
>
> Hello Hernan.
>
> Try following example:
>
> ClyFullBrowser openWithState: [:browser |
> browser selectClass: Announcer atMethodTag: #initialization ]
>
>
> вт, 12 мар. 2019 г. в 02:43, Hernán Morales Durand :
>>
>> Hi,
>>
>> Is there any way to open a browser on a method group in Claypso?
>>
>> This was possible in Nautilus:
>>
>> Smalltalk tools browser
>> openOnCategory: #compiling
>> ofClass: Class
>>
>> Cheers,
>>
>> Hernán
>>



[Pharo-users] Calypso openOnGroup?

2019-03-11 Thread Hernán Morales Durand
Hi,

Is there any way to open a browser on a method group in Claypso?

This was possible in Nautilus:

Smalltalk tools browser
openOnCategory: #compiling
ofClass: Class

Cheers,

Hernán



Re: [Pharo-users] Alternative to NautilusMethodSelected in Calypso

2019-03-08 Thread Hernán Morales Durand
Hi Gustavo,

Is MacroRecorder available for Pharo 7?

Cheers,

Hernán

El mar., 4 dic. 2018 a las 14:47, Gustavo Santos
() escribió:
>
> Hello,
>
> I'm trying to upgrade MacroRecorder to Pharo7.
> I used NautilusClassSelected and NautilusMethodSelected announcements to 
> apply a macro in a given class or method right after the developer clicks on 
> the browser. Something like
>
> AbstractNautilusPlugin subclass: #MRNautilusPlugin ...
>
> registerTo: aModel
>   aModel announcer weak
> when: NautilusClassSelected  send: #entitySelected: to: self;
> when: NautilusMethodSelected send: #entitySelected: to: self.
>
> How can I do the same with Calypso?
>
> Cheers,
> --
> Gustavo Santos
> http://gustavojss.github.io/



Re: [Pharo-users] Parsing text to discover general data of interest (phone, email, address, ...)

2019-03-07 Thread Hernán Morales Durand
Hi Cédrick,

I wrote some years ago an interface to a named-entity recognizer:
https://80738163270632.blogspot.com/2015/02/stner-interface-to-stanford-named.html

I think that was Pharo 5, so you may want to check if there are load
problems in current Pharo.

The blogger post didn't parsed correctly the output but for the input:

StSocketNERClient new
 tagText: 'Argentina President Kirchner has been asked to testify in
court on the death of Alberto Nisman the crusading prosecutor who had
accused her of conspiring to cover up involvement of Iran'


output would be:

'Argentina President Kirchner
has been asked to testify in court on the death of Alberto
Nisman the crusading prosecutor who had accused her of
conspiring to cover up involvement of Iran'

Cheers,

Hernán

El jue., 7 mar. 2019 a las 6:53, Cédrick Béler () escribió:
>
> Hi all,
>
> I’ve often got the need to analyse some random unstructured text to discover 
> (structured) information (in email for instance), to extract :
> - emails
> - telephone numbers
> - addresses
> - events
> - person names (according to a list of known persons),
> - etc…
>
> Apple do it in email for instance (strangely, this is not generalized).
>
>
> So my questions are :
> - do we have something equivalent in Smalltalk/Pharo ? (I didn’t find)
> - if not, what strategy would you use ?
> => I do really stupid text analysis (substrings, finding @, …, parsing 
> according to the text structure when there is… kind of Soup parsing…)
> => I feel this is a job for PetitParser ? And would be a nice feet to the new 
> GToolkit.
>
> All ideas or suggestions are welcome ;-)
>
>
> TIA,
>
> Cédrick
>
>
>



Re: [Pharo-users] http://planet.smalltalk.org ?

2019-03-03 Thread Hernán Morales Durand
Hi Sven,

Me too I used to track a lot of interesting blogs out there. At one
time the main contact for the site was Coen de Roover :
http://soft.vub.ac.be/~cderoove/

Maybe someone already wrote him to ask?

Cheers,

Herrnán

El lun., 17 dic. 2018 a las 14:23, Sven Van Caekenberghe
() escribió:
>
> Anybody knows what happened to http://planet.smalltalk.org ?
> I find it quite handy to catch up with multiple blog posts / feeds.
>



Re: [Pharo-users] package extensions in Pharo 7.

2019-02-05 Thread Hernán Morales Durand
El mar., 5 feb. 2019 a las 8:07, Denis Kudriashov ()
escribió:

> Hi Paul.
>
> вс, 3 февр. 2019 г., 19:57 PAUL DEBRUICKER pdebr...@gmail.com:
>
>> Hi -
>>
>>
>> Is there a way to create the protocol, then convert it to an extension,
>> without adding a method to it between the time I create the protocol and
>> convert it to an extension?
>
>
> No.
> In Calypso there is no such thing as extension protocol. There is explicit
> packaging of methods. When you create method you can toggle extension
> checkbox in status bar and select a package where method should be created.
> Same procedure can be applied on existing method.
>
> I tried to avoid star convention when I designed Calypso.
>

Thank you for this, IMO the star was annoying

Cheers,

Hernán


Re: [Pharo-users] Github pharo-* organizations

2019-02-04 Thread Hernán Morales Durand
Hi Pierce,

I am currently writing a command-line tool which queries pharo repositories
using the GitHub API, and based on the repository tag. Maybe not exactly
what you asked for but it's a start. You can find the tool at:
https://github.com/hernanmd/pi

Cheers,

Hernán


El lun., 4 feb. 2019 a las 22:43, Pierce Ng ()
escribió:

> Hi all,
>
> Is there a definitive list of all the pharo-* organizations on GH? Like
> pharo-rdbms, pharo-nosql, pharo-vcs, ... Or, a way to query GH to find out?
>
> Pierce
>
>


Re: [Pharo-users] Running test

2019-02-04 Thread Hernán Morales Durand
Windows 8.1 is ok

Cheers,

Hernán


El lun., 4 feb. 2019 a las 18:46, Hilaire () escribió:

> Hi,
>
> I need some testing on Mac OS and Windows, Linux should be fine, of a
> new bundle for drgeo.
>
> It is there
> https://www.dropbox.com/s/z2acnw1yi77q4ps/DrGeo.app-19.03a.zip?dl=0
>
> I just need to know if it running or not.
>
> Thanks
>
> Hilaire
>
> --
> Dr. Geo
> http://drgeo.eu
>
>
>
>


Re: [Pharo-users] [vwnc] Falsehoods programmers believe about Smalltalk

2019-02-02 Thread Hernán Morales Durand
gt; Smalltalk currently can only be considered as niche
> language/environment/whatever the purists would like to call it, but has
> not caught the World. . .
>

True, but I'm not sure that catching the World is a reasonable goal. Making
life easier for those now working with Smalltalk as a means of living could
be more reasonable, at least for this age. It doesn't mean
current-generation smalltalkers hasn't learnt nothing or cannot share any
knowledge.

Cheers,

Hernán

[1]
https://medium.com/worm-capital/the-ibm-hall-of-shame-a-semi-complete-list-of-bribes-blunders-and-fraud-19e674a5b986



>
> My 0.01
>
> --
> Cesar Rabak
>
>
>




>
>
> On Fri, Feb 1, 2019 at 5:15 PM Hernán Morales Durand <
> hernan.mora...@gmail.com> wrote:
>
>> Added to the list.
>> Nice catch!
>>
>> Cheers,
>>
>> Hernán
>>
>>
>> El vie., 1 feb. 2019 a las 2:33, step...@heaveneverywhere.com (<
>> step...@heaveneverywhere.com>) escribió:
>>
>>>
>>> How about:
>>>
>>> Smalltalk is less efficient than "low-level" languages.
>>>
>>> Smalltalk can't do "real time."
>>>
>>> Garbage collection is less efficient than manual memory management.
>>>
>>> Garbage collection is really slow if you use complex data structures.
>>>
>>>
>>> stp
>>>
>>>
>>> --
>>>
>>> Stephen Travis Pope   Santa Barbara, California, USA
>>>
>>>   http://HeavenEverywhere.comhttp://FASTLabInc.com
>>>https://vimeo.com/user19434036/videos  
>>> *http://heaveneverywhere.com/Reflections
>>> <http://heaveneverywhere.com/Reflections>*
>>>
>>> --
>>>
>>>
>>>
>>> On Jan 28, 2019, at 5:22 AM, Reinout Heeck  wrote:
>>>
>>>
>>> Smalltalk is a programming language.
>>>
>>>
>>>
>>> R
>>>
>>> -
>>>
>>>
>>>
>>> On 20-1-2019 23:31, Hernán Morales Durand wrote:
>>>
>>> Hi there,
>>>
>>> I just created a GitHub repo to collect myths around Smalltalk-based
>>> technologies: Pharo, Squeak, VW, VAST, Smalltalk/X, GNU/ST, etc. in the
>>> spirit of the Falsehoods lists [1-4].
>>>
>>> This is just a draft now but please feel free to add falsehoods based on
>>> your own experiences. Examples are greatly appreciated.
>>>
>>> https://github.com/hernanmd/falsehoods_smalltalk
>>>
>>> Cheers,
>>>
>>> Hernán
>>>
>>> [1]
>>> https://infiniteundo.com/post/25326999628/falsehoods-programmers-believe-about-time
>>> [2]
>>> https://chiselapp.com/user/ttmrichter/repository/gng/doc/trunk/output/falsehoods.html
>>> [3]
>>> https://github.com/googlei18n/libphonenumber/blob/master/FALSEHOODS.md
>>> [4]
>>> https://meta-package-manager.readthedocs.io/en/develop/falsehoods.html
>>>
>>>
>>>


Re: [Pharo-users] Porting Github packages to Pharo 7

2019-02-01 Thread Hernán Morales Durand
Hi Tomo,

Nice to know I wasn't so wrong :)
Thank you for sharing your experience. Since we are few (than other techs)
it is important to communicate and let others know.
Cheers,

Hernán

El jue., 31 ene. 2019 a las 7:06, tomo ()
escribió:

> Hernan,
>
> > Yes, ideally my package will work on both versions, Pharo 6 and Pharo 7.
> > The first option was about splitting MyPackage into MyPackage-Common,
> > MyPackage-Pharo6 and
> > MyPackage-Pharo7 with corresponding methods/classes moved.
>
> In my project, I migrated MyPackage into Pharo 7, and create
> MyPackage-Pharo6 for compatibility.
> Then updated BaselineOf to conditionally load MyPackage-Pharo6.
> At some point, I will drop MyPackage-Pharo6 to make migration to Pharo 8
> easier :-)
>
> I haven't used branch or tag to support different platform versions.
> I'd prefer branch over tag if I want to keep maintaining codes for older
> platforms.
> I'd like to hear how people are dealing with this issue, too.
>
> Best Regards,
> ---
> tomo
>
>
>
> --
> Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html
>
>


Re: [Pharo-users] Porting Github packages to Pharo 7

2019-02-01 Thread Hernán Morales Durand
Yes I've concluded this is the "easiest" way.
Sadly it is hard to automate the porting.

Thank you Guille.


El jue., 31 ene. 2019 a las 6:49, Guillermo Polito (<
guillermopol...@gmail.com>) escribió:

> Well, I've said it somewhere in the mail, probably got lost in all my
> blablbla, so I'll summarize.
>
>  - I use tags to identify releases.
>  - A same release works in Pharo6 and Pharo7
>  - In the baseline I have defined some conditional package that is loaded
> in Pharo6 that provides compatibility from Pharo6 to Pharo7.
>  Of course, depending on the change you're doing you may want to have
> one package per platform besides the core.
>
> When I was talking about a single branch I was talking about the so-called
> master branch, not about creating a new branch (which was case 2)
>
> On Thu, Jan 31, 2019 at 10:29 AM Hernán Morales Durand <
> hernan.mora...@gmail.com> wrote:
>
>> Hi Guillermo
>>
>> El jue., 31 ene. 2019 a las 6:08, Guillermo Polito (<
>> guillermopol...@gmail.com>) escribió:
>>
>>> Hi Hernán,
>>>
>>> On Thu, Jan 31, 2019 at 8:20 AM Hernán Morales Durand <
>>> hernan.mora...@gmail.com> wrote:
>>>
>>>> I would like your advice on this: What's the effortless way to migrate
>>>> Github repository from Pharo 6 to Pharo 7?
>>>>
>>>
>>> Can you give us some more detail? Do you already have your project in
>>> github working for Pharo6? Or is it in Smalltalkhub and you are willing to
>>> move it to github?
>>>
>>>
>> Most of my packages are working on Pharo 6 already, and they are on
>> GitHub.
>>
>>
>>
>>> I'll assume the first below :)
>>>
>>>
>>>>
>>>> I thought in the following solutions:
>>>>
>>>> 1) In a Pharo 6 image modify my BaselineOf, add & push a new package
>>>> MyPackage-Pharo6, then load it into a Pharo 7 image, create
>>>> MyPackage-Pharo7 and port as needed. The same Metacello installation script
>>>> is preserved for all versions.
>>>>
>>>> 2) Tag repository as x.x in a Pharo 6 image, load my package & do port
>>>> in a Pharo 7 image and push to master. Previous Pharo 6 version could be
>>>> loaded referring to a tag (or branch maybe?) in the Metacello installation
>>>> script.
>>>>
>>>
>>> Well, it depends on what you want to provide as "support".
>>> - Do you want your package to keep working on both versions?
>>>
>>
>> Yes, ideally my package will work on both versions, Pharo 6 and Pharo 7.
>> The first option was about splitting MyPackage into MyPackage-Common,
>> MyPackage-Pharo6 and MyPackage-Pharo7 with corresponding methods/classes
>> moved.
>>
>>
>>> - Do you want your new features to be available also in the old version?
>>>
>>>
>> I'm not really interested in backward compatibiilty.
>>
>>
>>> Case 1) Usually I try (if context agrees :) to keep a single branch. And
>>> I try that my project in that branch is compatible with both Pharo
>>> versions. Having a single branch if possible removes part of the
>>> bureaucracy of thinking about backports, patches, and so on...
>>> Releases are marked as tags, but they are shared between the different
>>> platforms.
>>>
>>>
>> You're talking about branches but I've used branches for a different
>> purpose (providing features for example). Wouldn't be more appropriate to
>> use tags in this case?
>>
>>
>>> We were able to do it with Iceberg for a long time (and it is an example
>>> that relies on Spec, File stuff, FFI..).
>>> We have lost that compatibility in the last weeks because we made a fix
>>> for win64 that was not compatible with Pharo6, but I'm thinking in getting
>>> that compatibility back at lest for Iceberg 1.5.*.
>>>
>>>
>> I will check those Baselines because I need to see examples of how does
>> it work.
>>
>>
>>> To keep a single branch compatible with many Pharo versions there is no
>>> magic:
>>>  1) we have a forward compatibility package to Pharo 7. The idea is that
>>> we write code for Pharo7 but in Pharo6 we can load a package with some
>>> extensions/additions that make it compatible with Pharo7.
>>>  2) we try to use compatible APIs. For example, we use FileSystem as
>>> much as possible. Another example is that Iceberg relies a lot in the Path
>>

Re: [Pharo-users] Opening a System Browser

2019-01-31 Thread Hernán Morales Durand
Hi David,

You can open the browser on a method using #openOnMethod:

Smalltalk tools browser openOnMethod: (Integer>>#factorial)

Cheers,

Hernán


El jue., 31 ene. 2019 a las 13:23, David Richards (<
david.i.richards@gmail.com>) escribió:

> Thanks Hernán.
>
>   Smalltalk tools browser open.
>
> This code expression is helpful to see and understand.
>
> My question goes further however -- to how we can open the browser to
> display a specified method of a specified class (e.g. the 'factorial'
> method of class 'Integer').
>
> David
>
> On Thu, 31 Jan 2019 at 07:10, Hernán Morales Durand <
> hernan.mora...@gmail.com> wrote:
>
>> Hi David,
>>
>> This is the way:
>>
>> Smalltalk tools browser open.
>>
>> Cheers,
>>
>> Hernán
>>
>> El jue., 31 ene. 2019 a las 8:57, David Richards (<
>> david.i.richards@gmail.com>) escribió:
>>
>>> From 2018-09-29-UpdatedPharoByExample.pdf page 20:
>>>
>>> [image: image.png]
>>>
>>> How to do this with Calypso?
>>>
>>> Smalltalk tools openClassBrowser ...?...
>>>
>>> Thanks.
>>>
>>


Re: [Pharo-users] Opening a System Browser

2019-01-31 Thread Hernán Morales Durand
Hi David,

This is the way:

Smalltalk tools browser open.

Cheers,

Hernán

El jue., 31 ene. 2019 a las 8:57, David Richards (<
david.i.richards@gmail.com>) escribió:

> From 2018-09-29-UpdatedPharoByExample.pdf page 20:
>
> [image: image.png]
>
> How to do this with Calypso?
>
> Smalltalk tools openClassBrowser ...?...
>
> Thanks.
>


Re: [Pharo-users] Porting Github packages to Pharo 7

2019-01-31 Thread Hernán Morales Durand
Hi Guillermo

El jue., 31 ene. 2019 a las 6:08, Guillermo Polito (<
guillermopol...@gmail.com>) escribió:

> Hi Hernán,
>
> On Thu, Jan 31, 2019 at 8:20 AM Hernán Morales Durand <
> hernan.mora...@gmail.com> wrote:
>
>> I would like your advice on this: What's the effortless way to migrate
>> Github repository from Pharo 6 to Pharo 7?
>>
>
> Can you give us some more detail? Do you already have your project in
> github working for Pharo6? Or is it in Smalltalkhub and you are willing to
> move it to github?
>
>
Most of my packages are working on Pharo 6 already, and they are on GitHub.



> I'll assume the first below :)
>
>
>>
>> I thought in the following solutions:
>>
>> 1) In a Pharo 6 image modify my BaselineOf, add & push a new package
>> MyPackage-Pharo6, then load it into a Pharo 7 image, create
>> MyPackage-Pharo7 and port as needed. The same Metacello installation script
>> is preserved for all versions.
>>
>> 2) Tag repository as x.x in a Pharo 6 image, load my package & do port in
>> a Pharo 7 image and push to master. Previous Pharo 6 version could be
>> loaded referring to a tag (or branch maybe?) in the Metacello installation
>> script.
>>
>
> Well, it depends on what you want to provide as "support".
> - Do you want your package to keep working on both versions?
>

Yes, ideally my package will work on both versions, Pharo 6 and Pharo 7.
The first option was about splitting MyPackage into MyPackage-Common,
MyPackage-Pharo6 and MyPackage-Pharo7 with corresponding methods/classes
moved.


> - Do you want your new features to be available also in the old version?
>
>
I'm not really interested in backward compatibiilty.


> Case 1) Usually I try (if context agrees :) to keep a single branch. And I
> try that my project in that branch is compatible with both Pharo versions.
> Having a single branch if possible removes part of the bureaucracy of
> thinking about backports, patches, and so on...
> Releases are marked as tags, but they are shared between the different
> platforms.
>
>
You're talking about branches but I've used branches for a different
purpose (providing features for example). Wouldn't be more appropriate to
use tags in this case?


> We were able to do it with Iceberg for a long time (and it is an example
> that relies on Spec, File stuff, FFI..).
> We have lost that compatibility in the last weeks because we made a fix
> for win64 that was not compatible with Pharo6, but I'm thinking in getting
> that compatibility back at lest for Iceberg 1.5.*.
>
>
I will check those Baselines because I need to see examples of how does it
work.


> To keep a single branch compatible with many Pharo versions there is no
> magic:
>  1) we have a forward compatibility package to Pharo 7. The idea is that
> we write code for Pharo7 but in Pharo6 we can load a package with some
> extensions/additions that make it compatible with Pharo7.
>  2) we try to use compatible APIs. For example, we use FileSystem as much
> as possible. Another example is that Iceberg relies a lot in the Path class
> to manipulate the directory tree, and the nicest API of that class changed
> a lot so for simplicity we used the low level API that is a bit uglier and
> verbose, but compatible.
>
> Case 2) At the same time, just to set an example, we were thinking version
> 1.5.* was going to be the last iceberg version supported for Pharo6, so
> pharo7 and 8 were going to use 1.6.*. This means we will have two different
> versions running side by side.
>
> If we want to continue applying patches and critical bugfixes in the 1.5.*
> version, we should have two branches.
> Notice that here I'm assuming that my 1.5.* branch will move much more
> slowly than 1.6.*, since no real active development will be done with it.
>
>
Thank you Guillermo



> Probably other people can share their workflows.
>
> HTH,
> Guille
>
>
>> Any recommendations? Alternative paths?
>>
>> Cheers,
>>
>> Hernán
>>
>>
>>
>>
>
> --
>
>
>
> Guille Polito
>
> Research Engineer
>
> Centre de Recherche en Informatique, Signal et Automatique de Lille
>
> CRIStAL - UMR 9189
>
> French National Center for Scientific Research - *http://www.cnrs.fr
> <http://www.cnrs.fr>*
>
>
> *Web:* *http://guillep.github.io* <http://guillep.github.io>
>
> *Phone: *+33 06 52 70 66 13
>


[Pharo-users] Porting Github packages to Pharo 7

2019-01-30 Thread Hernán Morales Durand
I would like your advice on this: What's the effortless way to migrate
Github repository from Pharo 6 to Pharo 7?

I thought in the following solutions:

1) In a Pharo 6 image modify my BaselineOf, add & push a new package
MyPackage-Pharo6, then load it into a Pharo 7 image, create
MyPackage-Pharo7 and port as needed. The same Metacello installation script
is preserved for all versions.

2) Tag repository as x.x in a Pharo 6 image, load my package & do port in a
Pharo 7 image and push to master. Previous Pharo 6 version could be loaded
referring to a tag (or branch maybe?) in the Metacello installation script.

Any recommendations? Alternative paths?

Cheers,

Hernán


Re: [Pharo-users] Instance of ByteArray did not understand #isByteString in ZnUTF8Encoder

2019-01-26 Thread Hernán Morales Durand
Hi Sven,

Yes, your examples work in Pharo 7, however I also wanted a progress bar,
and two exception handlers:

1) Resume when my files are too large (ZnEntityTooLarge).
2) When download failed display an error message.

Now for 1) I consider to wrap the whole download code - because I don't
like #isKindOf: - into this:

ZnMaximumEntitySize value: someMaxSize during: [ ... ].

I changed my code to use #downloadTo:
Thank you for the suggestion!!

Cheers,

Hernán

El sáb., 26 ene. 2019 a las 19:05, Sven Van Caekenberghe ()
escribió:

> BTW, ZTimezone in ZTimestamp does something similar to what I guess you
> want to do:
>
> downloadFallbackZoneinfoDataset
> "Download a fallback copy of the zoneinfo dataset and return its
> location.
> See #fallbackZoneinfoDatasetURL for more info and a warning"
>
> | zipLocation zoneinfoLocation |
> zipLocation := self fallbackZoneinfoDatasetURL file
> asFileReference.
> zipLocation ensureDelete.
> ZnClient new
> url: self fallbackZoneinfoDatasetURL;
> downloadTo: zipLocation;
> close.
> zoneinfoLocation := zipLocation parent / 'zoneinfo'.
> zoneinfoLocation ensureDeleteAll.
> ZipArchive new
> readFrom: zipLocation;
> extractAllTo: zoneinfoLocation parent;
> close.
> ^ zoneinfoLocation
>
> where
>
> fallbackZoneinfoDatasetURL
> "The URL to the ZIP archive zoneinfo.zip which is offered as a
> fallback for
> systems (such as Windows) that do no have their own copy of this
> data.
> Note that it is highly recommended that you use such a OS
> maintained dataset,
> as this data is changed (being added to) each year."
>
> ^ '
> https://github.com/svenvc/ztimestamp/raw/master/rsrc/zoneinfo.zip' asUrl
>
> > On 26 Jan 2019, at 23:00, Sven Van Caekenberghe  wrote:
> >
> > Hmm, the following all work for me (in Pharo 7.0.1 on macOS):
> >
> > ZnClient new
> >   url: '
> https://github.com/biosmalltalk/biopharo/raw/develop/test_files/BioSmalltalkTestFiles.zip
> ';
> >   get;
> >   yourself.
> >
> > ZnClient new
> >   url: '
> https://github.com/biosmalltalk/biopharo/raw/develop/test_files/BioSmalltalkTestFiles.zip
> ';
> >   get;
> >   contents.
> >
> > ZnClient new
> >   get: '
> https://github.com/biosmalltalk/biopharo/raw/develop/test_files/BioSmalltalkTestFiles.zip
> '.
> >
> > ZnClient new
> >   url: '
> https://github.com/biosmalltalk/biopharo/raw/develop/test_files/BioSmalltalkTestFiles.zip
> ';
> >   downloadTo: '/tmp'.
> >
> > $ ls -lah /tmp/BioSmalltalkTestFiles.zip
> > -rw-r--r--@ 1 sven  wheel   5.3M Jan 26 22:57
> /tmp/BioSmalltalkTestFiles.zip
> >
> > $ file /tmp/BioSmalltalkTestFiles.zip
> > /tmp/BioSmalltalkTestFiles.zip: Zip archive data, at least v2.0 to
> extract
> >
> >> On 26 Jan 2019, at 20:36, Hernán Morales Durand <
> hernan.mora...@gmail.com> wrote:
> >>
> >> Hi there,
> >>
> >> In Pharo 7.0 I've encountered an error related with the new streams
> changes (
> https://github.com/pharo-open-documentation/pharo-wiki/blob/master/Migration/MigrationToPharo7.md)
> while downloading a zip file. Problem is ZnUTF8Encoder expects a String,
> but my code which worked in Pharo 6 provides a ByteArray. I've isolated it
> in a reproducible way:
> >>
> >> | webClient resp |
> >> webClient := ZnClient new.
> >> UIManager default informUserDuring: [ :bar |
> >>bar label: 'Downloading resources for ' , self class printString.
> >>[ webClient
> >>signalProgress: true;
> >>get: '
> https://github.com/biosmalltalk/biopharo/raw/develop/test_files/BioSmalltalkTestFiles.zip'
> ]
> >>on: HTTPProgress , ZnEntityTooLarge
> >>do: [ : ex |
> >>(ex isKindOf: ZnEntityTooLarge)
> >>ifTrue: [ ex resume ]
> >>ifFalse: [
> >>| progress |
> >>progress := ex.
> >>progress isEmpty
> >>ifFalse: [
> >>bar current: progress percentage.
> >>progress total ifNotNil: [ :aTotalNumber | bar
> label: 'Downloading ' ] ].
> >>progress resume ] ] ].
> >> (resp := webClient response) isSuccess
> >>ifTrue: [ 'output2.zip' asFileReference writeStreamDo: [ :
> stream | stre

[Pharo-users] Instance of ByteArray did not understand #isByteString in ZnUTF8Encoder

2019-01-26 Thread Hernán Morales Durand
Hi there,

In Pharo 7.0 I've encountered an error related with the new streams changes
(
https://github.com/pharo-open-documentation/pharo-wiki/blob/master/Migration/MigrationToPharo7.md)
while downloading a zip file. Problem is ZnUTF8Encoder expects a String,
but my code which worked in Pharo 6 provides a ByteArray. I've isolated it
in a reproducible way:

| webClient resp |
webClient := ZnClient new.
UIManager default informUserDuring: [ :bar |
bar label: 'Downloading resources for ' , self class printString.
[ webClient
signalProgress: true;
get: '
https://github.com/biosmalltalk/biopharo/raw/develop/test_files/BioSmalltalkTestFiles.zip'
]
on: HTTPProgress , ZnEntityTooLarge
do: [ : ex |
(ex isKindOf: ZnEntityTooLarge)
ifTrue: [ ex resume ]
ifFalse: [
| progress |
progress := ex.
progress isEmpty
ifFalse: [
bar current: progress percentage.
progress total ifNotNil: [ :aTotalNumber | bar
label: 'Downloading ' ] ].
progress resume ] ] ].
(resp := webClient response) isSuccess
ifTrue: [ 'output2.zip' asFileReference writeStreamDo: [ : stream |
stream nextPutAll: resp contents ] ]
ifFalse: [ self error: 'Cannot download resource files' ].

I also tried using #writeOn: on the response, but that also wrote the
response header:

self response writeOn: 'test1.zip' asFileReference writeStream.
self response writeOn: 'test2.zip' asFileReference binaryWriteStream.


HTTP/1.1 200 OK
Via: 1.1 varnish
Strict-Transport-Security: max-age=31536000
...

PK¸  D   BioSmalltalkTestFiles/PK ½U?+*8!"   K  /
BioSmalltalkTestFiles/A4A7DS6V01S-Alignment.xmlíœks›H †¿à ¯èà ‡©Ã
"’¹_  ¦: 0 R$`ðjSS.,a›

Any suggestion?

Cheers,

Hernán


Re: [Pharo-users] [VIDEO TUTORIAL] How to use external code editors to code in Pharo

2019-01-26 Thread Hernán Morales Durand
Kid you got my whole point wrong, I never said a word about IDE.

Cheers,

Hernán


El vie., 25 ene. 2019 a las 4:12, Dimitris Chloupis ()
escribió:

> I think you got this the wrong way
>
> Sure emacs and vim are very popular when compared to Pharo.
> When compared to IDEs oh boy , that's another story.
> There is a reason why their hardcore user are so desperate to call them
> IDEs and is not because they like IDEs, they dont.
> They hate IDEs.
>
> Text based coding, has lost  no my bad , let me correct this, text
> coding never stood chance. Smalltalk was like a nuclear bomb that when it
> landed it left nothing in its path,
> There is no doubt that nowdays IDEs dominating to a vast degree. Obviously
> big guns on top are Visual Studio (not Code) and Xcode by far for obvious
> reasons.
>
> Even in the case of my favorite IDE , Delphii its really amazing that even
> though its company has long disappeared, the all mighty Borland which one
> was the equivalent of Sun/Oracle.
> With only diffirent that obviously they were innovator. Even though
> outside Delphi absolutely none talks about Delphi.
> Delphi is surprisingly strong. Actually Delphis popularity is an
> undeniable proof how massively successful Smalltalk has been in its
> visual paradigm. Its company went to bankruptcy and the language was
> bought by a pretty much , even today, unknown company. The impact was that
> it went from 4th most popular to 12th most popular.
> Delphi even today is a formidable force for the Windows platform battling
> Go and freaking Swift who has the support of the most powerful company on
> the planet, Apple.There is no doubt in my mind
> that if Delphi was not such a massively loved IDE , being closed source
> which is a taboo for todays coding standards especially for a programming
> language, it would have been long dead.
>
> And lets not begin with scripting language which are basically dead.
> Python for example may be the 3rd most popular programming language but
> scripting wise has pretty much died.
> When it comes to the customisation of super advanced programs , the users
> has spoken loud and clear. They want visual coding and NOT text coding.
> 3 extremely complex fields , 3d graphics , Music and game development are
> dominated by Visual Coding languages. In Blender we offer both Python and
> Visual coding,
> guess what the users pick.
>
> Essentially one type of Visual Coding , node based visual coding.
>
> Also the time where visual coding was just for the users and not for the
> pros is long gone too after the massive success of Unreal's Blueprints.
> Which basically can do everything C++ can.
> Unreal's Blueprints is not even the first example of a visual language
> that will give a text language a run for its money. Softimage (3d app) ICE
> has been doing high performance coding decades ago.
> In music software we even have the insanity of visual language going down
> to low level, an I am not talking C++ or C , I mean real low level, old
> school Assembly code. Again decades ago.
>
> The users have spoken loud and clear and they have clearly stated they
> have no interest into investing the vast amount of wasted time that text
> coding requires.
>
> Even to learn how to code is dominated by Scratch. Just think about it, a
> language for kids dominates programming education.
> If you told that to a coder or even a user 20 years ago, he would have
> called you crazy and for a good reason.
>
> Text coding is only getting less and less popular by the year. I have no
> doubt at some point will completely disappear as did Assembly.
>
> So the biggest mistake of Smalltalk was not that it supported visual coding
>
> it was that it did not go visual coding all the way.
>
> It will have saved us the trouble of not being able to convince people to
> learn coding.
> Because people do not want to learn coding,
> And frankly I do not blame them.
>
> Visual coding is the only future of coding and Emac and Vim are relics of
> a past that has long gone.
> A despair attempt at nostalgia.
> On Fri, Jan 25, 2019 at 1:09 AM Hernán Morales Durand <
> hernan.mora...@gmail.com> wrote:
>
>> El jue., 24 ene. 2019 a las 13:18, Sven Van Caekenberghe ()
>> escribió:
>>
>>>
>>>
>>> > On 24 Jan 2019, at 17:04, K K Subbu  wrote:
>>> >
>>> > On 24/01/19 7:23 PM, Sven Van Caekenberghe wrote:
>>> >> Everybody is of course totally free to do whatever they want, but
>>> >> really, why the hell would you want to do that ?
>>> > Because text has many uses other than just feeding into a compiler for
>>> translation to machine code? People who come from Unix/Linux 

Re: [Pharo-users] [VIDEO TUTORIAL] How to use external code editors to code in Pharo

2019-01-24 Thread Hernán Morales Durand
El jue., 24 ene. 2019 a las 13:18, Sven Van Caekenberghe ()
escribió:

>
>
> > On 24 Jan 2019, at 17:04, K K Subbu  wrote:
> >
> > On 24/01/19 7:23 PM, Sven Van Caekenberghe wrote:
> >> Everybody is of course totally free to do whatever they want, but
> >> really, why the hell would you want to do that ?
> > Because text has many uses other than just feeding into a compiler for
> translation to machine code? People who come from Unix/Linux world are used
> to using a rich collection of tools that deal with text in various ways.
>
> I am myself a server/linux guy, an emacs user, I know what is all possible
> and what the unix philosophy is.
>
> I also know how to integrate Pharo into that world, and this is super
> important.
>
> >> You lose so much by doing that, I do not even know where to start.
> >
> > Live coding (i.e. coding in the presence of instances) is undoubtedly
> more powerful than edit-compile-run cycle. Text is used to direct IDE to
> edit live objects. But text has many more uses than just issuing commands.
> If beginners start using vim just to edit code due to established habits,
> they will soon realize the ease of live coding and remain in IDE. This is a
> self-correcting error.
>
> Well, I don't think so.
>
> The users that you are going to attract in this way (the ones that don't
> want to leave their own IDE/editor), will look at textual Pharo and find it
> very strange and ill suited to textual editing (and they are absolutely
> right), they will not discover the power, will not learn (from this
> experience alone) what object design/programming/power is, and will ask for
> more (e.g. give me C style compiler errors, better/easier structure of the
> file, fixed the !! escape issue, etc, ...).
>
>
We should admit for once text-based programming already won for this age.
Want a nice proof? Check Mr. Robot series. That's how a new generation of
devs is getting it. It doesn't matter if we have 30 years of experience
supporting exploratory UI is the best way, not even if we are fully
convinced of it. Probably it's time to invert the burden of proof, and let
people decide how they want to get into Pharo. If they want an
Objective-Smalltalk mode, let people live and die with it.

And I love the Class Browser, but we cannot assume every coder has
developed an exploratory mindset. Just ready to jump into a world of new
tools. "Forcing" on developing it through tools isn't actually nice
attitude neither. And there are really good devs out there, it may just
happen that they don't want a shock therapy as someone told above. Or they
don't have the time+energy for now. Let people themselves discover the
right tools for them, or stay where they want to.

So IMHO until someone really sits down and figure out a cool Pharo REPL, we
will get the same print me "Hello World" trolls in forums.

Cheers,

Hernán


> >> Editing a .st file has always been possible, it is masochism.Vim is
> much more than just a typewriter. It can leverage a whole set of
> > text-based tools. One could use it to auto generate methods, clean them
> up and then file into Pharo.
> >
> > Regards .. Subbu
> >
>
>
>


[Pharo-users] Falsehoods programmers believe about Smalltalk

2019-01-20 Thread Hernán Morales Durand
Hi there,

I just created a GitHub repo to collect myths around Smalltalk-based
technologies: Pharo, Squeak, VW, VAST, Smalltalk/X, GNU/ST, etc. in the
spirit of the Falsehoods lists [1-4].

This is just a draft now but please feel free to add falsehoods based on
your own experiences. Examples are greatly appreciated.

https://github.com/hernanmd/falsehoods_smalltalk

Cheers,

Hernán

[1]
https://infiniteundo.com/post/25326999628/falsehoods-programmers-believe-about-time
[2]
https://chiselapp.com/user/ttmrichter/repository/gng/doc/trunk/output/falsehoods.html
[3] https://github.com/googlei18n/libphonenumber/blob/master/FALSEHOODS.md
[4] https://meta-package-manager.readthedocs.io/en/develop/falsehoods.html


Re: [Pharo-users] Library to use multi-core in Pharo?

2019-01-09 Thread Hernán Morales Durand
Hi Alex,

I think you could launch jobs using GNU parallel, otherwise for shared
memory parallelism OpenMP is a common choice.
There is an old thread:
http://forum.world.st/NativeBoost-and-OpenMP-td4837865.html but no library
AFAIK

Cheers,

Hernán


El mié., 9 ene. 2019 a las 16:56, Alexandre Bergel via Pharo-users (<
pharo-users@lists.pharo.org>) escribió:

> Hi!
>
> Is there an effort to easily use multi-core or native processes in Pharo?
> I am thinking about a library that offer a construct like:
>
> future := Runner runInDifferentProcess: [ “This block is run in a
> different OS process” ]
>
> That would save the image under a different name, use OSSubProcess to
> launch a new Pharo with no UI.
>
> Is there a library available?
>
> Cheers,
> Alexandre
> --
> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
> Alexandre Bergel  http://www.bergel.eu
> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>
>
>
>


Re: [Pharo-users] how to use indexes to copy a substring out of a string

2018-12-29 Thread Hernán Morales Durand via Pharo-users
--- Begin Message ---
Hi Roelof

You may have a look at my StringExtensions package at
https://github.com/hernanmd/StringExtensions
I wrote several algorithms for working with substrings like:

https://github.com/hernanmd/StringExtensions/blob/master/repository/StringExtensions.package/String.extension/instance/indexesOfMotif..st
https://github.com/hernanmd/StringExtensions/blob/master/repository/StringExtensions.package/String.extension/instance/indicesOfSubstringOverlaps..st

Some of them used in https://github.com/hernanmd/BioSmalltalk where
you can find also algorithms for k-mer counting and clump finding:

https://github.com/hernanmd/BioSmalltalk/blob/master/repository/BioTools.package/BioSequence.class/instance/clumpFindK.length.times..st
https://github.com/hernanmd/BioSmalltalk/blob/master/repository/BioTools.package/BioSequence.class/instance/kmersCount.mismatches..st

for the Bio repo just consider a Sequence like a more advanced String.

Cheers,

Hernán

El sáb., 29 dic. 2018 a las 13:29, Roelof Wobben () escribió:
>
> Hello,
>
> Still working on AdventOfCode
>
> Im struggeling to see how this can be solved.
>
> Now, a nice string is one with all of the following properties:
>
> It contains a pair of any two letters that appears at least twice in the 
> string without overlapping, like xyxy (xy) or aabcdefgaa (aa), but not like 
> aaa (aa, but it overlaps).
> It contains at least one letter which repeats with exactly one letter between 
> them, like xyx, abcdefeghi (efe), or even aaa.
>
> my game plan was this
>
> 1) group the characters and filter everything out which has a count not equal 
> to two
>
> 2) find the indexes of the characters and with the indexes use a copy method 
> so I have a substring out of it
>
> 3) do the same with the substring so again 1 and 2
>
> but how can I make 2 work.
>
> Roelof
>
>

--- End Message ---


Re: [Pharo-users] OpenGL minimum working example?

2018-11-12 Thread Hernán Morales Durand
Hello Tomo,

Thank you, very interesting project!
BTW to load Jun4Pharo with UFFI OpenGL the expression is:

Gofer new
smalltalkhubUser: 'tomooda' project: 'Jun4Pharo';
configurationOf: #Jun;
load.
(Smalltalk at: #ConfigurationOfJun) project development load: #('Core').

There are only a few warnings during installation:

This package depends on the following classes:
  TabActionButton
  NewListRenderer
  NewList
  Tab
  TabBar
You must resolve these dependencies before you will be able to load
these definitions:
  NewList>>#drawOnAthensCanvas:
  NewListRenderer>>#drawOnAthensCanvas:
  NewListRenderer>>#drawSubmorphsOnAthensCanvas:
  Tab>>#createClosedPolygonPathFrom:on:
  Tab>>#createLinesPathFrom:on:
  Tab>>#drawOnAthensCanvas:
  TabActionButton>>#drawOnAthensCanvas:
  TabBar>>#drawLinesOnAthensCanvas:
  TabBar>>#drawLinesWithSelection:
  TabBar>>#drawSubmorphsOnAthensCanvas:

Most examples works also on Windows on Pharo 7. However the UFFI
OpenGL freezes the image if launched on full-screen.

Cheers,

Hernán


El lun., 12 nov. 2018 a las 20:41, Tomohiro Oda
() escribió:
>
> Hello Hernan,
>
> I tested the code only on Mac.
> ---
> tomo
>
> 2018/11/13(Tue) 8:27 Tomohiro Oda  wrote:
> >
> > Hello Hernan,
> >
> > I have partially working code at
> > http://smalltalkhub.com/#!/~tomooda/Jun4Pharo
> >
> > My code still have two problems that
> > * depending on resolution, projection matrix can't be properly set, and
> > * it freezes pharo when switching to fullscreen
> >
> > Best Regards,
> > ---
> > tomo
>



[Pharo-users] OpenGL minimum working example?

2018-11-12 Thread Hernán Morales Durand
Hi.

I tried to get an OpenGL MWE from
https://github.com/ronsaldo/uffi-opengl in both Windows 8.1 and MacOS
without luck. What I tried so far is to render a simple figure in a
new window, adding this method to UFFIOpenGLOffscreenSamples:

>>sample2

" self new sample2
"

| context gl fb |
context := UFFIOpenGLContext new.
gl := context gl.
fb := context offscreenBufferExtent: 300@300.
context asCurrentDo: [
fb activate.
gl
" loadIdentity;"
clear: GL_COLOR_BUFFER_BIT;
begin: GL_QUADS;
color3f_red: 1.0 green: 0.0 blue: 0.0;
vertex3f_x: 0.0 y: 0.0 z: 0.0;
vertex3f_x: 0.5 y: 0.0 z: 0.0;
vertex3f_x: 0.5 y: 0.5 z: 0.0;
vertex3f_x: 0.0 y: 0.5 z: 0.0;
end;
flush ].
fb asForm asMorph openInWindow.

However the result is that VM hangs in both platforms.
Any advice what I'm missing?

Cheers,

Hernán



Re: [Pharo-users] library to chain select:/collect:/ ... via cascade

2018-10-17 Thread Hernán Morales Durand
Hi Peter,

Have a look at:

http://smalltalkhub.com/#!/~zeroflag/Chain

As an alternative you may try the Specification Pattern

http://smalltalkhub.com/#!/~MassimoNocentini/SpecificationPattern

Cheers,

Hernán



El mié., 17 oct. 2018 a las 4:14, Peter Uhnak () escribió:
>
> Hi,
>
> is there some library that will allow me to chain select:/collect:/... via 
> cascade?
>
> E.g.
>
> #(12 7 'a' nil #(0)) query reject: #isNil; select: #isNumber; collect: 
> #squared; select: #even?
>
> The point is to not have to write billion parentheses when building a more 
> complex query.
>
> I imagine this would be pretty easy to write, but figured I ask first.
>
> Thanks,
> Peter



  1   2   3   4   5   >