Re: [Pharo-users] Need help putting my Pharo package under source control

2020-05-12 Thread MichaelKentBurns via Pharo-users
--- Begin Message ---
I'm reading the Managing Code booklet.

I'm on page 51 figure 5-6.
I put in my details for my repository (
https://github.com/MichaelKentBurns/FredsLunch-Pharo-iceberg.git ).
when I poke OK I get an exception window.
see image below...

Is there an easier way to capture the exception than a screenshot?

 




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

--- End Message ---


Re: [Pharo-users] FFI and absolute path to dll

2020-05-12 Thread Trygve Reenskaug

At some point in the history of Win 7, MS changed the rules for file lookup

   /Standard Search Order for Desktop Applications/
   /The standard DLL search order used by the system /
   /depends on whether safe DLL search mode is enabled or disabled./
   /Safe DLL search mode places the user's current directory later in
   the search order./

At some point, MS enabled safe DLL search mode as default. It is now 
part of the Windows security barrier, and I dare not change it. A 
program I had scheduled to start every day stopped working when I moved 
the program to a new computer with a new edition of Windows. I'm hoping 
the creator of the program will fix the problem. In the mean time, I 
have to remember to start the program manually every morning. This 
applies to Win7 and Win 10.


Hope this helps even if it doesn't solve the problem.
--Trygve

On 12.05.2020 21:04, ASAM wrote:

Hello,
I'm using Pharo 8 64bit on Windows 10 64bit.
I am trying to access a 32bit dll via a relative path.

I'm desperate. I've been reading the document
(http://books.pharo.org/booklet-uffi/pdf/2020-02-12-uFFI-V1.0.1) all the
time up and down but I can't find an example of absolute path and Windows.

If e.g. my.dll file would be stored here.

C:\Program Files (x86)\GALEP5\my.dll

then what should the method win32ModuleName return?

Another question came to me while reading the document.
It is actually important to know whether the DLL was generated as cdecl or
stdcall?
The dll i try to call use stdcall.

I would be very happy if someone helps me.
I can no longer see the message "External module not found" :-)

Thanks a lot!



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



--

/The essence of object orientation is that objects collaborateto achieve 
a goal. /

Trygve Reenskaug mailto: tryg...@ifi.uio.no 
Morgedalsvn. 5A http://folk.uio.no/trygver/
N-0378 Oslo http://fullOO.info
Norway Tel: (+47) 468 58 625



Re: [Pharo-users] FFI and absolute path to dll

2020-05-12 Thread Richard Sargent
On Tue, May 12, 2020, 12:05 ASAM  wrote:

> Hello,
> I'm using Pharo 8 64bit on Windows 10 64bit.
> I am trying to access a 32bit dll via a relative path.
>

Generally, a 64-bit program will only load a 64-bit DLL. It may be
possible, but it will likely be far easier to use the 32-bit Pharo
implementation.


> I'm desperate. I've been reading the document
> (http://books.pharo.org/booklet-uffi/pdf/2020-02-12-uFFI-V1.0.1) all the
> time up and down but I can't find an example of absolute path and Windows.
>
> If e.g. my.dll file would be stored here.
>
> C:\Program Files (x86)\GALEP5\my.dll
>
> then what should the method win32ModuleName return?
>
> Another question came to me while reading the document.
> It is actually important to know whether the DLL was generated as cdecl or
> stdcall?
> The dll i try to call use stdcall.
>
> I would be very happy if someone helps me.
> I can no longer see the message "External module not found" :-)
>
> Thanks a lot!
>
>
>
> --
> Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html
>
>


[Pharo-users] FFI and absolute path to dll

2020-05-12 Thread ASAM
Hello, 
I'm using Pharo 8 64bit on Windows 10 64bit. 
I am trying to access a 32bit dll via a relative path.

I'm desperate. I've been reading the document
(http://books.pharo.org/booklet-uffi/pdf/2020-02-12-uFFI-V1.0.1) all the
time up and down but I can't find an example of absolute path and Windows.

If e.g. my.dll file would be stored here.

C:\Program Files (x86)\GALEP5\my.dll

then what should the method win32ModuleName return?

Another question came to me while reading the document.
It is actually important to know whether the DLL was generated as cdecl or
stdcall?
The dll i try to call use stdcall.

I would be very happy if someone helps me.
I can no longer see the message "External module not found" :-)

Thanks a lot!



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



Re: [Pharo-users] Need help putting my Pharo package under source control

2020-05-12 Thread tbrunz
This is the way to get the latest version of any of the booklets, their "work
in progress" (WIP) versions.

https://books.pharo.org/ lists most of the books on a splashy page that
shows cover art, etc., but their versions can be behind the WIP versions.

My experience has been that the WIP versions are preferable.  (Note that not
all booklets that are "in progress" have been submitted to the build process
and resulted in a WIP document  In these cases, you have the option of
cloning the repository and examining each chapter file.)

-t



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



Re: [Pharo-users] Need help putting my Pharo package under source control

2020-05-12 Thread tbrunz
Sorry about that... You should end up on a GitHub "Releases" page for each
document.

In the section for the top-most release, you should see an "> Assets (3)"
control.  Click the arrow to open it. 

It should then list a PDF, a ZIP, and a '.tar.gz' document.  You probably
want the PDF, which you can read on the screen and/or print out.

Download the document to your system by clicking on its link.

-t




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



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

2020-05-12 Thread Torsten Bergmann
Hi Sven,

I added spotter search now. I prefixed the github spotter entries additionally 
with the user name (owner).
This way you will be able to quickly find tagged public projects by keying in 
the project and/or username.

See attached picture for an example.

Catalog loading is possible via spotter too.

Have fun
T.

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


Re: [Pharo-users] Need help putting my Pharo package under source control

2020-05-12 Thread MichaelKentBurns via Pharo-users
--- Begin Message ---
Thank you for your answer.
The links provided lead me to the project which is nice, but I was not able
to find a fully rendered document. Can you point me at it?



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

--- End Message ---


Re: [Pharo-users] Uptime

2020-05-12 Thread Cédrick Béler
Clearly amazing 😉 

Is it the setup you use ?

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

Cheers,
Cedrick

PS: btw Sven, we (with a group of students did a naive and simple url shortener 
that would fit nicely to default zinc demos ;-)

Here is the script for accessing registered urls (sweet):

server := (ZnServer startDefaultOn: )
   onRequestRespond: [ :request |  | key |
   
   key := request requestLine uri segments last.
   dataBase at: key
ifPresent: [:val |  ZnResponse redirect: val ]   
ifAbsent: [ZnResponse badRequest: request].
  ].



> Le 12 mai 2020 à 10:06, Sven Van Caekenberghe  a écrit :
> 
> Hi,
> 
> So here is a little anecdote from the real world. I was planning to update 
> the OS on my Linux server, from Ubuntu 18.04 LTS to 20.04 LTS (Long Term 
> Support). This small (Digital Ocean, 1GB RAM, 1 Core) cloud server runs 3 
> Pharo images with public facing web sites.
> 
> The machine itself reports:
> 
> $ uptime
> 12:37:50 up 530 days, 21:46,  1 user,  load average: 0.02, 0.04, 0.01
> 
> which means it hasn't been powered down or didn't restart in 530 days.
> 
> I was surprised to discover that 2 of the Pharo images on that machine did 
> just as well:
> 
> $ ./repl.sh 
> Connecting to Telnet REPL at locahost:41011
> Trying 127.0.0.1...
> Connected to localhost.
> Escape character is '^]'.
> Neo Console 
> Pharo-7.0+alpha.build.660.sha.2eb9bd2f41e7b0bd8f9f4190906910f83c178ab1 (32 
> Bit)
> pharo> get system.uptime
> 405 days 20 hours 29 minutes
> pharo> quit
> Bye!
> 
> $ ./repl.sh 
> Connecting to Telnet REPL at locahost:41001
> Trying 127.0.0.1...
> Connected to localhost.
> Escape character is '^]'.
> Neo Console Pharo4.0 of 18 March 2013 update 40620
>> get system.uptime
> 530 days 21 hours 44 minutes
>> quit
> Bye!
> 
> So both Pharo 7 and Pharo 4 kept on doing their jobs for a very long time. I 
> think this is a testament to the stability of Pharo and to what is possible.
> 
> Regards,
> 
> Sven
> 
> --
> Sven Van Caekenberghe
> Proudly supporting Pharo
> http://pharo.org
> http://association.pharo.org
> http://consortium.pharo.org
> 
> 


[Pharo-users] Uptime

2020-05-12 Thread Sven Van Caekenberghe
Hi,

So here is a little anecdote from the real world. I was planning to update the 
OS on my Linux server, from Ubuntu 18.04 LTS to 20.04 LTS (Long Term Support). 
This small (Digital Ocean, 1GB RAM, 1 Core) cloud server runs 3 Pharo images 
with public facing web sites.

The machine itself reports:

$ uptime
 12:37:50 up 530 days, 21:46,  1 user,  load average: 0.02, 0.04, 0.01

which means it hasn't been powered down or didn't restart in 530 days.

I was surprised to discover that 2 of the Pharo images on that machine did just 
as well:

$ ./repl.sh 
Connecting to Telnet REPL at locahost:41011
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
Neo Console 
Pharo-7.0+alpha.build.660.sha.2eb9bd2f41e7b0bd8f9f4190906910f83c178ab1 (32 Bit)
pharo> get system.uptime
405 days 20 hours 29 minutes
pharo> quit
Bye!

$ ./repl.sh 
Connecting to Telnet REPL at locahost:41001
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
Neo Console Pharo4.0 of 18 March 2013 update 40620
> get system.uptime
530 days 21 hours 44 minutes
> quit
Bye!

So both Pharo 7 and Pharo 4 kept on doing their jobs for a very long time. I 
think this is a testament to the stability of Pharo and to what is possible.

Regards,

Sven

--
Sven Van Caekenberghe
Proudly supporting Pharo
http://pharo.org
http://association.pharo.org
http://consortium.pharo.org




Re: [Pharo-users] mentor question 4

2020-05-12 Thread Richard Sargent
Richard, your diligence is awesome!

I'm left feeling that, generally, objects should not implement nor understand 
#asString. I realize there is a lot of room for debate on this subject.



On May 11, 2020 10:12:10 PM PDT, Richard O'Keefe  wrote:
>For what it's worth, here's a moderately thorough examination of
>several
>different Smalltalk systems.
>Let A = astc, D = Dolphin, G = GNU Smalltalk, Q = Squeak,
>S = ANSI standard, T = Strongtalk, V = VisualWorks, X = ST/X
>
>#asString
>
>ADGPQST!X  Character => String with: self
>ADGPQSTVX  String => self
>ADGPQSTVX  Symbol => String withAll: self
>.  Text/Paragraph, where provided, => underlying string.
>A-G-X  Collection => String withAll: self
>---PQ  Collection => self printString
>A  ByteArray => "decoded as Unicode"
>.DGPQ-TVX  ByteArray => "decoded as Latin1"
>ADG.Q..VX  Filename => "unparse (Filename, FilePath, whatever)
>AdgpQ.TVX  URI => "unparse (ZnUrl in P)
>Ad.PQ...X  UUID => "unparse (d, GUID equivalent)"
>.DGpq...X  Number => self displayString "or self printString, maybe via
>Object"
>...PQ...X  Object => self printString
>
>There's a rough consensus here:
> - if something *is* textual (Character, String, Symbol, Text,
>   Paragraph) #asString returns it as a normal string
> - if something is a parsed form of structured text (file name,
>   URI, UUID) its unparsed form is returned, converting it back
>   should yield an equal parsed form
> - if something is a byte array, it may be converted to a string
>   (the rule is to preserve the bytes, my library presumes byte
>   arrays are UTF8-encoded)
> - if numbers are accepted at all, their #printString is returned
> - if is none of the above, but has a #name or #title, that is
>   commonly the result.
>
>The open question is what converting an array of characters using
>#asString will do.  There is at least one Smalltalk out there
>where #(65 66 67) asString => 'ABC', but that's a step further
>than I personally want, though it is consistent with ByteArray.
>
>
>
>
>On Tue, 12 May 2020 at 11:16, Jerry Kott  wrote:
>
>> Hi all,
>>
>> I’ve been lurking so far, but I must add my voice here and agree with
>> Richard.
>>
>> The malleability of Smalltalk tempts people into implementing
>#asString,
>> #name, and similar semantically ambiguous method names. Like Richard,
>I
>> regretted every single time I (or someone else on my team before me)
>> decided to use these. It goes back to ’Smalltalk with Style’
>(probably the
>> best little red book you could ever own): write intention revealing
>code
>> whenever you can, and comment liberally when you can’t.
>>
>> *Jerry Kott*
>> This message has been digitally signed.
>> PGP Fingerprint:
>> A9181736DD2F1B6CC7CF9E51AC8514F48C0979A5
>>
>>
>>
>> On 11-05-2020, at 2:48 PM, Richard Sargent 
>wrote:
>>
>>
>>
>> On May 11, 2020 2:19:49 PM PDT, Richard O'Keefe 
>wrote:
>>
>> I was saying that I expected #($a $b $c) asString ==> 'abc'.
>>
>>
>> Over the years, I found myself being opposed to the idea that all
>objects
>> can sensibly have an #asString implementation. When it's been done,
>it
>> ultimately caused more problems than it solved.
>>
>> Consider $(48 49 50) asString. Do you expect it to give you a string
>with
>> all the digits? Or perhaps it's meant to interpret the elements as
>> byte-like things, as you would need for "String withAll:
>aCollection". So,
>> the numbers could be interpreted as codepoints, as they are in a
>ByteArray.
>>
>> But, what does "(Array with: Object new with: ProcessScheduler)
>asString"
>> mean?
>>
>> It seems to me that having all objects understand #asString leads to
>> confusion.
>>
>> If you want an array to print as its literal representation,
>implement
>> #printAsLiteral, so that your intention is clear.
>>
>>
>> If you want something that can be read back, that's what #storeString
>> is for,
>>
>> On Tue, 12 May 2020 at 01:28, Stéphane Ducasse
>>  wrote:
>>
>>
>>
>>
>> On 5 May 2020, at 16:16, Richard O'Keefe  wrote:
>>
>> By the way, while playing with this problem, I ran into a moderately
>> painful issue.
>>
>> There is a reason that Smalltalk has both #printString (to get a
>> printable representation of an object) and #asString (to convert a
>> sequence to another kind of sequence with the same elements.)  If I
>> *want* #printString, I know where to find it.  The definition in my
>> Smalltalk no reads
>>
>>   asString
>> "What should #($a $b $c) do?
>> - Blue Book, Inside Smalltalk, Apple Smalltalk-80:
>>   there is no #asString.
>> - ANSI, VW, Dolphin, CSOM:
>>   #asString is defined on characters and strings
>>   (and things like file names and URIs that are sort of
>>
>> strings),
>>
>>   so expect an error report.
>> - VisualAge Smalltalk:
>>   '($a $b $c)'
>> - Squeak and Pharo:
>>   '#($a $b $c)'
>> - GNU Smalltalk, Smalltalk/X, and astc:
>>   'abc'
>>  I don't intend any gratuitous incompatibility, but when there
>>  is