[Pharo-users] Smallscript - A Smalltalk-Inspired Scripting Language

2023-12-01 Thread Craig Johnson

for those who are interested.

https://www.codeproject.com/Articles/5373567/Smallscript-A-Smalltalk-Inspired-Scripting-Languag



[Pharo-users] Re: Personal wiki / information manager

2023-06-26 Thread Craig Johnson

Hi Siemen,

I'm in CAT time, which is the same as CEST at the moment.  Let's wait a 
bit to see if others jump-in.


Craig


On 2023/06/26 14:29, Siemen Baader wrote:

Hi Craig,

On Mon, Jun 26, 2023 at 12:48 PM Craig Johnson  wrote:


I'd be interested in joining you on this journey.  I'm a complete
novice
to Pharo, but will be willing to help where I can.


that's great to hear! Lets see what people on this list chips in with 
to build on top of, and then perhaps we should have an online meeting 
and hash it out how to proceed. I'm in the CEST time zone. And you?


cheers
Siemen


[Pharo-users] Re: Personal wiki / information manager

2023-06-26 Thread Craig Johnson

Hi Siemen,


I'd be interested in joining you on this journey.  I'm a complete novice 
to Pharo, but will be willing to help where I can.



Craig

On 2023/06/26 12:41, siemenbaa...@gmail.com wrote:


Hi everyone,

(thread at 
http://forum.world.st/Personal-wiki-information-manager-td4839150i20.html, 
if it does not come across via email.. )



how did things go with the orgMode and GTD / PIM projects? It seems 
like the orgMode parser never was ported to Pharo 6 and later: 
https://github.com/JurajKubelka/OrgMode


Also, was Trentor ever completed and published, Evan?

I'm interested in building and using a Pharo based GTD system and 
would like to use OrgMode files as the database so I can still use the 
OrgMode ecosystem with its how-tos and mobile apps etc. And then 
gradually transition to Pharo.


Is anyone else interested?

cheers,
Siemen

(I tried to post this via forum.world.st first, but the message didn’t 
make it to the mailing list. It seems like Nabble does not do this 
anymore.. ?)




[Pharo-users] Re: [ANN] Pharo Launcher 3.0 released!

2022-04-15 Thread craig
 

Renaud, 

I experienced the same issue. I assumed that I did something wrong so
did-not report it. 

I installed PL 3.0 over the previous version and I think that this this
broke the VM somehow. 

To fix this, I uninstalled Pharo-Launcher, cleaned out everything in
%userprofile%AppDataLocalPharoLauncher, reinstalled it, and now it works
again. 

Craig 

On 2022-04-15 04:12, Renaud de Villemeur via Pharo-users wrote: 

> Thanks for the update. The Pharo Launcher is a really valuable tool. 
> 
> I experience some issue on windows (windows 11 pro). The launcher doesn't 
> show up. 
> I double click on the icon, and no window appears. I can however see that the 
> process is running in the task manager. I can open the launcher image from 
> the local install of pharo VM 100-x64 (installed using Pharo Launcher 2.4, 
> last update 2022-03-20), and the launcher is working great that way. 
> 
> Are you using a special build of the VM ? 
> 
> Thanks 
> Renaud 
> 
> Apr 14, 2022, 08:26 by christophe.dema...@inria.fr: 
> 
>> Hi all, 
>> 
>> Pharo Launcher 3.0 has just been released! It is available from 
>> http://pharo.org/download [1]. 
>> It is based on latest Spec2 and Pharo 10 image. 
>> 
>> It now comes with a native Apple Silicon version and Mac OS packages are 
>> notarized. 
>> Big thanks to all contributors, including issue reports. 
>> 
>> Here is the changelog: 
>> Pharo Launcher v3.0 
>> 
>> New features: 
>> 
>> * Full rewrite of the UI using Spec 2 and Pharo 10
>> * Pharo Launcher can now run natively on Apple Silicon #544 [2]
>> * Pharo Launcher is now signed with a Mac Os developper account and 
>> notarized #529 [3]
>> * Windows "portable" package (only an archive without installer) #534 [4]
>> 
>> Improvements: 
>> 
>> * While importing image .sources and .version are not moved #543 [5]
>> * recreate the image does not re apply the script if one is provided #536 
>> [6] (thanks to @hogoww [7])
>> * Save keybind for scripts #545 [8] (thanks to @hogoww [7] and @Inao0 [9])
>> 
>> Bug fixes: 
>> 
>> * GitHub releases artefacts download were not always working #535 [10]
>> * "Basic launch" does not do its job in Pharo 10 #540 [11]
>> * Proxy settings not applied through settings screen #541 [12]
>> 
>> Regards, 
>> The Pharo team.
 

Links:
--
[1] http://pharo.org/download
[2] https://github.com/pharo-project/pharo-launcher/issues/544
[3] https://github.com/pharo-project/pharo-launcher/issues/529
[4] https://github.com/pharo-project/pharo-launcher/issues/534
[5] https://github.com/pharo-project/pharo-launcher/issues/543
[6] https://github.com/pharo-project/pharo-launcher/issues/536
[7] https://github.com/hogoww
[8] https://github.com/pharo-project/pharo-launcher/pull/545
[9] https://github.com/Inao0
[10] https://github.com/pharo-project/pharo-launcher/issues/535
[11] https://github.com/pharo-project/pharo-launcher/issues/540
[12] https://github.com/pharo-project/pharo-launcher/issues/541


[Pharo-users] Re: Illegal Leading Byte

2022-03-04 Thread craig

Hi Sven,

Thanks for the answer.

 #windows1252 did the trick.

Thanks again.

Craig



We support more than 80 different character encoders. Of course, you
should first know what encoder is being used, after that, it is easy
to use a different encoder. Consider:

'/tmp/foo.txt' asFileReference readStreamEncoded: #utf8 do: [ :in | in
upToEnd ].

'/tmp/foo.txt' asFileReference readStreamEncoded: #windows1252 do: [
:in | in upToEnd ].

'/tmp/foo.txt' asFileReference readStreamEncoded: #latin1 do: [ :in |
in upToEnd ].

ZnCharacterEncoder knownEncodingIdentifiers.

#windows1252 asZnCharacterEncoder.

If you could post a small example of your file, I could try to help.
It will probably be #windows1252 or #latin1.

HTH,

Sven




[Pharo-users] Illegal Leading Byte

2022-03-03 Thread craig
 

Hi Guys, 

I'm reading a text file which is supposed to be ASCII encoded. This file
contains a list of filepaths and was created by a Python program. 

Well, it turns-out that file names on Windows can contain illegal UTF-8
characters. This causes ZnUTF8Encoder to signal 'Illegal leading byte
for utf-8 encoding' and crash the program. 

I would like to handle this situation more elegantly, is there a more
appropriate code-page to use for the Windows filesystem? 

Craig 

[Pharo-users] Private Methods

2021-08-17 Thread Craig Johnson

Hi All,


Just a newb off-the-wall question.

Is there any good reason why we can't create a true private method in a 
Pharo class by putting that method inside an instance or class variable 
as a lambda (block).



This would reduce one of my biggest bugbears with Pharo, namely the 
pollution of the global namespace with every single message name in the 
entire system.




Craig


[Pharo-users] File-in Issue - Pharo 9

2021-08-15 Thread Craig Johnson

Hi All,


I just filed-out a small project that I playing with, and refreshed the 
image.  The new image cannot file-in the package from the File Browser.


"Instance of RubSmalltalkEditor did not understand #fileItIn".


Is there another way to file-in the package?


Thanks


Craig


[Pharo-users] Re: Opening presentation of the JPL Open Developer seminar series

2020-12-08 Thread Craig Latta



> Great ! What is the time zone?

 UTC-8


-C

--
Craig Latta :: research computer scientist
Black Page Digital :: Berkeley, California
663137D7940BF5C0AFC  1349FB2ADA32C4D5314CE


Re: [Pharo-users] Pharo at JPL

2020-08-29 Thread Craig Latta


 Good luck, Ted, and congratulations!


-C

--
Craig Latta
Black Page Digital
Berkeley, California
blackpagedigital.com
https://caffeine.js.org






[Pharo-users] browsing references to elements of Undeclared?

2020-05-27 Thread Craig Latta


Hi all--

 In various Smalltalks, I'm used to being able to open an inspector
on the Undeclared dictionary, then selecting an element and browsing
references to it. I don't seem to see that functionality in Pharo 8. Is
there an equivalent?


 thanks!
 Craig

--
Craig Latta
Black Page Digital
Amsterdam :: San Francisco
cr...@blackpagedigital.com
+31   6 2757 7177
+ 1 415  287 3547



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

2020-05-06 Thread Craig Latta


Hi Paul--

> I wonder if you had or could make something like this:
>
> https://jgthms.com/web-design-in-4-minutes/
>
> that shows the value of caffeine in a way being placed into the
> default dev environment + readme doesn't.

 Yes indeed, I expect to produce such material.

> It seems like your work would be really useful to me as a person that
> writes web apps in Smalltalk but I have no idea what "extra" I can do
> with it.

 The extra thing is writing web apps in a livecoding style, from
within a web browser. I wanted this for my own web app development, as
an alternative to the mainstream edit-build-run cycle.

> I've watched the youtube presentation and navigated through the
> impress presentation on your site and it too quickly introduces tons
> of concepts of what you can do but nothing about why anyone should
> want to do those things or how to put them together into something a
> user would use once a developer has made something.

 Right, that presentation is just a bunch of demos of works in
progress, showing some things that are possible. They're meant to
inspire the viewer to imagine what she might do with those abilities,
rather than convince the viewer to adopt anything yet.

> I also think the dynamic nature of what you're making is cool but it
> seems like it adds another level of difficulty in making things
> comprehensible to/usable for/accessible by end users.

 Ultimately, I think making most of the external tools and build
steps unnecessary, and enabling direct manipulation, will make things
more comprehensible.

> Its clear something is there I just have no idea how to unlock the
> value for myself or current users and/or theoretical future users.

 I think it's just the classic value proposition of having a runtime
environment in which further development and debugging can occur. For
me, the greatest value is being to fix a problem at a point that took a
long time to reach, then just continuing the usage session (retaining
all that built-up state) rather than starting over. In highly
interactive environments like VR, this is critical.


-C

--
Craig Latta
Black Page Digital
Amsterdam :: San Francisco
cr...@blackpagedigital.com
+31   6 2757 7177
+ 1 415  287 3547




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

2020-05-05 Thread Craig Latta


> [Caffeine is] something very different from a standard single-page Web
> app showing standard HTML elements and no IDE in sight, in exchange
> for a small footprint.

 It depends what you do with it. Caffeine can interact with the web
browser and other JavaScript frameworks just as any JS framework can. I
have other demos showing mainstream SPAs and UIs, using WebComponents,
VueJS, plain old DOM elements, etc.


-C

--
Craig Latta
Black Page Digital
Amsterdam :: San Francisco
cr...@blackpagedigital.com
+31   6 2757 7177
+ 1 415  287 3547




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

2020-05-05 Thread Craig Latta


Hi Konrad--

> ...Even better, a standalone application that could be hosted on
> a plain static server, since all the code would run client-side.

 E.g., https://caffeine.js.org/3d


-C

--
Craig Latta
Black Page Digital
Amsterdam :: San Francisco
cr...@blackpagedigital.com
+31   6 2757 7177
+ 1 415  287 3547




Re: [Pharo-users] Reminder: Smalltalk Webcamp, 22nd of October

2019-09-24 Thread Craig Latta


Hi Johan--

 Looking forward to it!


-C

***

 On 23/9/19 19:57, Johan Brichau wrote:

> Hi,
>
> Are you doing Web development with Smalltalk? Then this meeting is for
you.
> We organise an informal meetup on Smalltalk Web Technologies at the
> Yesplan offices.
>
> ===
> Smalltalk WebCamp
> ---
> Date: Tuesday October 22nd, 2019 (9h30 -> 18h00)
> Location: Yesplan offices in Gent, Belgium. (www.yesplan.be
> <http://www.yesplan.be/>)
> ===
>
> This is an un-conference: everyone is invited to actively participate by
> presenting their project.
> Come and share your web development experience with Smalltalk.
> Wether you are doing Seaside, Teapot, PharoJS, Amber, SqueakJs, Zinc
> REST, … or anything else that involves Smalltalk and web technologies:
> come and share your experience!
>
> We provide ample time to discuss and collaborate on topics, meet people
> and have a beer in the evening.
>
> Attendance is free, but please register before October 15th if you are
> attending, so we can plan accordingly.
> Registration
> link: https://www.eventbrite.com/e/smalltalk-webcamp-tickets-69185265993
>
> At this time, there are 9 participants, excluding the Yesplan team.
>
> Questions? Please send me an email.
>
> Best regards
> Johan Brichau
> jo...@yesplan.be <mailto:jo...@yesplan.be>

--
Craig Latta
Black Page Digital
Amsterdam :: San Francisco
cr...@blackpagedigital.com
+31   6 2757 7177
+ 1 415  287 3547



Re: [Pharo-users] pharo for ios and android

2019-09-22 Thread Craig Latta


Hi Richard--

> I see there is a caffeine.js.org/pharo... I'm trying it but it takes
> rather longer to start than the Squeak page.

 Ah, I recently condensed the changes file of the Squeak version, so
the first download is much faster. I also think the Pharo 6 image I was
using is much larger than the Squeak one, for some reason. I intend to
update the Pharo image to version 8 soon, anyway.

> By the way, I'm using Firefox on Ubuntu, so what do I type to get, for
> example, "print it"? Ctrl-P is captured by Firefox.

 You should be able to use the normal meta key for your host
platform, it's a bug in the supporting page code in
.../js/squeakjs/squeak.js if not. We can handle command key events
ourselves and then call .preventDefault() on them, to keep the web
browser from chiming in. It should be that Smalltalk handles all of them
except for copy/cut/paste/reload.

 Thanks for checking it out!


-C

--
Craig Latta
Black Page Digital
Amsterdam :: San Francisco
cr...@blackpagedigital.com
+31   6 2757 7177
+ 1 415  287 3547



Re: [Pharo-users] pharo for ios and android

2019-09-21 Thread Craig Latta


Hi--

> Craig Latta runs Smalltalk images on the javascript vm written by Bert
> Freudenberg. Search for Caffeine

 Yes, https://caffeine.js.org is my main development system these
days, and it runs nicely on my iPhone (or any device, with any web
browser). Caffeine is the https://squeak.js.org virtual machine (which
can run Squeak, Pharo, and Cuis) with Web platform and frameworks support.


 thanks,

-C

--
Craig Latta
Black Page Digital
Amsterdam :: San Francisco
cr...@blackpagedigital.com
+31   6 2757 7177
+ 1 415  287 3547



[Pharo-users] MSWindows Keymapping

2019-03-13 Thread Craig Johnson
Hi All,

 

I'm primarily a Windows user and I am finding the default key mapping very
un-windows and it's preventing me from becoming immersed in the environment.
Because I'm constantly having to reach for the mouse to switch windows etc.

 

How easy would it be to change the key mapping to something that I'm more
used to?

 

 

Craig

 

 



Re: [Pharo-users] Noob Question - slicing

2019-03-07 Thread Craig Johnson
From: Pharo-users [mailto:pharo-users-boun...@lists.pharo.org] On Behalf Of K K 
Subbu
Sent: Wednesday, 06 March 2019 16:45
To: pharo-users@lists.pharo.org
Subject: Re: [Pharo-users] Noob Question - slicing


> '1234567890' copyFrom: 5 to: 8 "5678"
>
> Page 207 in Updated Pharo by Example book explains more on substrings.
>
> HTH .. Subbu

Thank you for this, it is perfectly clear.

I disregarded the Pharo-by-Example linked from the Pharo.org page, because when 
I tried to use examples in that book to read text files, I found that the 
examples did not work under Pharo V7.  The book is for Pharo 5.

My mistake.

If there's a later version of that book available, I'd love to know.

Craig




[Pharo-users] Noob Question - slicing

2019-03-05 Thread Craig Johnson
Hi All,

 

I was trying to figure an elegant way to slice strings (Python style), and came 
up empty.

 

What is the simplest way to copy characters between positions 4 and 8 from a 
string in Pharo?

 

Craig



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

2019-01-24 Thread Craig



-Original Message-
From: Pharo-users [mailto:pharo-users-boun...@lists.pharo.org] On Behalf Of
Sven Van Caekenberghe
Sent: Thursday, 24 January 2019 15:53
To: Any question about pharo is welcome
Subject: Re: [Pharo-users] [VIDEO TUTORIAL] How to use external code editors
to code in Pharo



>Everybody is of course totally free to do whatever they want, but really,
why the hell would you want to do that ?
>
>You lose so much by doing that, I do not even know where to start.
>
>A big part of what makes Pharo (or any Smalltalk) special is the IDE
written in itself.
>
>Editing a .st file has always been possible, it is masochism.
>
>There is for example https://github.com/dmatveev/shampoo-emacs which
already makes a bit more sense (but even then).
>
>Really, why do you think all these big IDE environments exist in the first
place ?
>
>Sven

Having the entire class in one text file so that you can see all of the
functionality without a ridiculous amount of  clicking around is a huge
bonus.
Especially for those of us that come from a C#/Java environment.  Also,
VS-Code provides a nice self-learning code completion mechanism,
so you don't lose auto-completion.

Win-win.

Craig





Re: [Pharo-users] Glorp with P3

2018-10-10 Thread Craig
Sven,

I just ported everything to Pharo 7.0 and the problem disappeared.

Craig


-Original Message-
From: Pharo-users [mailto:pharo-users-boun...@lists.pharo.org] On Behalf Of 
Sven Van Caekenberghe
Sent: Wednesday, 10 October 2018 11:13
To: Any question about pharo is welcome
Subject: Re: [Pharo-users] Glorp with P3

Craig,

I tried in a clean 
Pharo-7.0.0+alpha.build.1276.sha.6c09bd43bb0d76c18958c720649aaf6834870bb5 (64 
Bit).

Load expression (as per https://github.com/svenvc/P3), which also loads Glorp 
itself:

  Metacello new
baseline: 'P3';
repository: 'github://svenvc/P3';
load: 'glorp'.

Transcript log:

Fetched -> BaselineOfP3-CompatibleUserName.1539011881 --- 
g...@github.com:svenvc/P3.git[master] --- g...@github.com:svenvc/P3.git[master]
Loaded -> BaselineOfP3-CompatibleUserName.1539011881 --- 
g...@github.com:svenvc/P3.git[master] --- g...@github.com:svenvc/P3.git[master]
Loading baseline of BaselineOfP3...
Fetched -> BaselineOfZTimestamp-CompatibleUserName.1538577426 --- 
g...@github.com:svenvc/ztimestamp.git[master] --- 
g...@github.com:svenvc/ztimestamp.git[master]
Loaded -> BaselineOfZTimestamp-CompatibleUserName.1538577426 --- 
g...@github.com:svenvc/ztimestamp.git[master] --- 
g...@github.com:svenvc/ztimestamp.git[master]
Fetched -> BaselineOfNeoJSON-CompatibleUserName.1538429427 --- 
g...@github.com:svenvc/NeoJSON.git[master] --- 
g...@github.com:svenvc/NeoJSON.git[master]
Loaded -> BaselineOfNeoJSON-CompatibleUserName.1538429427 --- 
g...@github.com:svenvc/NeoJSON.git[master] --- 
g...@github.com:svenvc/NeoJSON.git[master]
...RETRY->ConfigurationOfGlorp
Fetched -> ConfigurationOfGlorp-StephanEggermont.62 --- 
http://smalltalkhub.com/mc/DBXTalk/Configurations/main/ --- 
http://smalltalkhub.com/mc/DBXTalk/Configurations/main/
Loaded -> ConfigurationOfGlorp-StephanEggermont.62 --- 
http://smalltalkhub.com/mc/DBXTalk/Configurations/main/ --- 
http://smalltalkhub.com/mc/DBXTalk/Configurations/main/
Project: NeoJSON baseline
Fetched -> Neo-JSON-Core-CompatibleUserName.1538429427 --- 
g...@github.com:svenvc/NeoJSON.git[master] --- 
g...@github.com:svenvc/NeoJSON.git[master]
Fetched -> Neo-JSON-Tests-CompatibleUserName.1538429427 --- 
g...@github.com:svenvc/NeoJSON.git[master] --- 
g...@github.com:svenvc/NeoJSON.git[master]
Fetched -> Neo-JSON-Pharo-Core-CompatibleUserName.1538429427 --- 
g...@github.com:svenvc/NeoJSON.git[master] --- 
g...@github.com:svenvc/NeoJSON.git[master]
Fetched -> Neo-JSON-Pharo-Tests-CompatibleUserName.1538429427 --- 
g...@github.com:svenvc/NeoJSON.git[master] --- 
g...@github.com:svenvc/NeoJSON.git[master]
Project: ZTimestamp baseline
Fetched -> ZTimestamp-CompatibleUserName.1538577426 --- 
g...@github.com:svenvc/ztimestamp.git[master] --- 
g...@github.com:svenvc/ztimestamp.git[master]
Project: Glorp stable [2.0.1]
Fetched -> Glorp-HerbyVojcik.127 --- 
http://smalltalkhub.com/mc/DBXTalk/Glorp/main/ --- 
http://smalltalkhub.com/mc/DBXTalk/Glorp/main/
Fetched -> Glorp-Tests-PierceNg.21 --- 
http://smalltalkhub.com/mc/DBXTalk/Glorp/main/ --- 
http://smalltalkhub.com/mc/DBXTalk/Glorp/main/
Fetched -> P3-CompatibleUserName.1539011881 --- 
g...@github.com:svenvc/P3.git[master] --- g...@github.com:svenvc/P3.git[master]
Fetched -> P3-Glorp-CompatibleUserName.1539011881 --- 
g...@github.com:svenvc/P3.git[master] --- g...@github.com:svenvc/P3.git[master]
Loaded -> Neo-JSON-Core-CompatibleUserName.1538429427 --- 
g...@github.com:svenvc/NeoJSON.git[master] --- cache
Loaded -> Neo-JSON-Tests-CompatibleUserName.1538429427 --- 
g...@github.com:svenvc/NeoJSON.git[master] --- cache
Loaded -> Neo-JSON-Pharo-Core-CompatibleUserName.1538429427 --- 
g...@github.com:svenvc/NeoJSON.git[master] --- cache
Loaded -> Neo-JSON-Pharo-Tests-CompatibleUserName.1538429427 --- 
g...@github.com:svenvc/NeoJSON.git[master] --- cache
Loaded -> ZTimestamp-CompatibleUserName.1538577426 --- 
g...@github.com:svenvc/ztimestamp.git[master] --- cache
Starting atomic load
MessageArchiver class>>inspectorClass (EyeProtoInspector is Undeclared) 

Dialect class>>reset (identitySetClass is Undeclared) 

DB2Sequence>>name: (DB2Platform is Undeclared) 

Loaded -> Glorp-HerbyVojcik.127 --- 
http://smalltalkhub.com/mc/DBXTalk/Glorp/main/ --- cache
Loaded -> Glorp-Tests-PierceNg.21 --- 
http://smalltalkhub.com/mc/DBXTalk/Glorp/main/ --- cache
Finished atomic load
Evaluated -> 2.0.1 [ConfigurationOfGlorp] >> resetDialect
Loaded -> P3-CompatibleUserName.1539011881 --- 
g...@github.com:svenvc/P3.git[master] --- cache
Loaded -> P3-Glorp-CompatibleUserName.1539011881 --- 
g...@github.com:svenvc/P3.git[master] --- cache
...finished baseline

Then set the driver using:

  PharoDatabaseAccessor DefaultDriver: P3DatabaseDriver.

Next configure the unit tests (login resource) via:

  GlorpDatabaseLoginResource defaultLogin: (Login new
datab

Re: [Pharo-users] Glorp with P3

2018-10-10 Thread Craig
Hi Sven,

Thanks for the support.

I'm using Pharo 6.1 - 32bit stable.

Craig

-Original Message-
From: Pharo-users [mailto:pharo-users-boun...@lists.pharo.org] On Behalf Of 
Sven Van Caekenberghe
Sent: Wednesday, 10 October 2018 08:56
To: Any question about pharo is welcome
Subject: Re: [Pharo-users] Glorp with P3

Hi Craig,

Last time I checked, this worked fine. I'll try again later today, what version 
of Pharo are you using ?

Sven

> On 9 Oct 2018, at 15:43, Craig  wrote:
> 
> Hi All,
>  
> I installed Glorp with P3 using the snippet on the P3 Github page.
>  
> P3 seems to be working fine.  The tests are Ok.  While working through the 
> Glorp book, I got as far as “session createTables” and then got a debugger 
> window.
>  
> It seems that the SQL is being sent to a variable in the 
> PharoDatabaseAccessor class  - “databaseDriver” which is never initialised.
>  
> Anybody able to assist with this?
>  
> Craig






[Pharo-users] Glorp with P3

2018-10-09 Thread Craig
Hi All,

 

I installed Glorp with P3 using the snippet on the P3 Github page.

 

P3 seems to be working fine.  The tests are Ok.  While working through the
Glorp book, I got as far as "session createTables" and then got a debugger
window.

 

It seems that the SQL is being sent to a variable in the
PharoDatabaseAccessor class  - "databaseDriver" which is never initialised.

 

Anybody able to assist with this?

 

Craig



Re: [Pharo-users] GTDocument how to

2018-09-28 Thread Craig
Hi,

I have found that moving the image and changes files onto a RAMdisk makes a 
huge difference to the install time of large packages.

Give it a try.

Craig

-Original Message-
From: Pharo-users [mailto:pharo-users-boun...@lists.pharo.org] On Behalf Of Tim 
Mackinnon
Sent: Friday, 28 September 2018 19:53
To: Any question about pharo is welcome
Subject: Re: [Pharo-users] GTDocument how to

When I installed GTDocumenter into a clean P61 image it took a really long time 
(like 20+ mins), so it may be something you have to wait out.

It does beg the question why it takes so long? Actually all of our code loading 
is quite slow compared to other languages that load a lot more code. Not sure 
if if it’s ever been optimised ?

Tim

Sent from my iPhone

> On 28 Sep 2018, at 05:58, Hilaire  wrote:
> 
>> Le 27/09/2018 à 16:52, Juraj Kubelka via Pharo-users a écrit :
>> 
>>> On Sep 27, 2018, at 10:41, Hilaire
>>> >> <mailto:hila...@drgeo.eu>> wrote:
>>> 
>>> Thanks for the tips. Where should be key in this text?
>> 
>> What do you mean? You can edit the text as you wish.
> 
> Do not forget, what is obvious for one may not be for another. I could
> write a book full of anecdotes with obvious features in DrGeo not so
> obvious for a newbie.
> 
> So you write this text in playground and inspect?
> 
>> 
>> By evaluating and inspecting: 
>> 
>> -=-=-=-
>> GtDocumenter editorForText: 'This is a Dr. Geo tutorial. Evaluate the
>> following script:
>> 
>> [[[
>> "A Dr. Geo script that returns DrGeo canvas” 
>> ]]]
>> 
>> Extensions are done using  pragmas.
>> '
>> -=-=-=-
>> 
>> I have a text editor in an inspector where I can edit the Documenter
>> content. 
>> 
>> 
>> Do you have the same?
> 
> No, never saw that. I installed from:
> Metacello new
>baseline: 'GToolkit';
>repository: 'github://feenkcom/gtoolkit/src';
>load.
> 
>> 
>>> 
>>> I went installing DrGeo along Documenter in P6.1, but it is stalled when
>>> installing XML dependecies (a bit old, true).
>>> 
>>> Conflict with XML? or Issue with DrGeo on P6.1, may be both.
>> 
>> How can I install DrGeo? I do not see a Monticello script on the
>> DrGeo.eu <http://DrGeo.eu> web page.
> 
> I am afraid it is a bit tedious at first as it is not github based, but
> Launchpad.
> Read INSTALL file for full instruction:
> https://bazaar.launchpad.net/~drgeo-developers/drgeo/trunk/view/head:/src/INSTALL
> 
>> 
>>> 
>>> This is so fragile.
>> 
>> Keep in mind that GToolkit, including Documenter, is in alpha version.
> 
> I did not have GToolkit in mind when I wrote fragile, more likely the
> whole Smalltalk things. As I wrote in my previous email, my issue was
> when installing DrGeo on a P6.1 image with GToolkit already installed. I
> am not sure about why the process was hanging when installing XML's Dr.
> Geo requirement. The image is then frozen
>  Ok may be I can't install DrGeo on P6.1, I still have error
> (screenshot). In the other I failed to installing GToolkit on P7.
> 
> Hilaire
> 
> -- 
> Dr. Geo
> http://drgeo.eu
> 
> 






Re: [Pharo-users] Status of Caffeine

2018-07-20 Thread Craig Latta


> What about the UI lag and the occasional spinner that blocks the UI,
> is this related to the debugging protocol (I see that the IDEs are
> loaded in iframes) that will go away when run from local, or is this
> something that can be optimized away?

 That's just the speed of Morphic. The VM is set up to display the
spinner whenever anything takes more than a certain amount of time (one
alternative is to just turn it off :). While Morphic in SqueakJS has
gotten a lot faster since the first release, just because JavaScript
engines have gotten faster, I was still motivated to explore
alternatives. That's why I experimented with animated HTML wireframes,
morphic.js from Snap, and using a separate HMTL5 canvas for each morph.

 All three of these approaches are much faster than traditional
Morphic. However, the traditional Morphic UI has the appeal that it's
pixel-portable between the Web and native apps.


 thanks again,

-C

--
Craig Latta
Black Page Digital
Amsterdam :: San Francisco
cr...@blackpagedigital.com
+31   6 2757 7177 (SMS ok)
+ 1 415  287 3547 (no SMS)



Re: [Pharo-users] Status of Caffeine

2018-07-19 Thread Craig Latta


> The minimal example seems to load fast enough. Do you think there is a
> potential to slim it down even further for a production system that
> uses the DOM as its UI, ie remove morphic and others and use the image
> in headless mode?

 Certainly. I've done some experiments with "animated wireframes"
for the development tools. See [1]. I can compose UIs in HTML, then read
them into SqueakJS and give them behavior by giving them DOM event
handlers written in Smalltalk.

> Thanks for the offer to work together on the Pharo port. It is too
> early for me to commit to that, but I definitely like the idea. Right
> now I'm just checking out. I'd like to use Pharo's (or Squak's)
> interactive development workflow to develop single page web apps and
> mobile apps in a reliable manner.

 Yes, I've found it to be a very productive environment. It's great
to be able to debug things in situ, in the DOM environment.

> Is there a way to run the IDE in a separate window from the actual
> application, so that the UI would behave as in production during
> development? I'm especially thinking of responsive web applications
> here.

 Yes; I've also built an interface to the Google remote debugging
protocol, so (in Chrome) I can run SqueakJS in one browser window, and
control whatever's going on in any other browser window.

> (If not then perhaps putting them into divs next to each other might
> be a decent workaround)

 Yeah, this is what I did in the first Caffeine demo[2]. When I want
the Smalltalk IDE to disappear I just set the opacity of its div to zero
and its pointer-events to none. This approach works across all browsers.


 thanks,

-C

[1] https://tinyurl.com/y9ngn363 (github.com)
[2] https://caffeine.js.org

--
Craig Latta
Black Page Digital
Amsterdam :: San Francisco
cr...@blackpagedigital.com
+31   6 2757 7177 (SMS ok)
+ 1 415  287 3547 (no SMS)



Re: [Pharo-users] Status of Caffeine

2018-07-19 Thread Craig Latta


Hi Erik--

> I read in some of the more recent issues that on some mobile devices
> (based on iOS) the page reloads after switching apps and/or locking
> the device. This will loose any data currently in the Caffeine app.
> Craig is working on a solution based on WebWorkers. This probably
> means: not production ready for mobiles yet.

 It turns out splitting the app over multiple processes is only
necessary on iOS 12, which has more severe memory limits. iOS 12 doesn't
support OffscreenCanvases in web workers yet, or 2d contexts for OCs, so
for now I'm just back in iOS 11, where everything works in one big
process (Squeak + A-Frame).


 thanks,

-C

--
Craig Latta
Black Page Digital
Amsterdam :: San Francisco
cr...@blackpagedigital.com
+31   6 2757 7177 (SMS ok)
+ 1 415  287 3547 (no SMS)



Re: [Pharo-users] Status of Caffeine

2018-07-19 Thread Craig Latta




Hi Siemen--

> What is the status of Caffeine now - is it production-ready with
> Pharo, and how large is a minimal (not development) image with
> everything required to run a production system - i.e. what would be
> the load time of a Caffeine web app?

 I'm using Caffeine in production with Squeak; there are a few bugs
to deal with in Pharo. Would you like to work together on it?

 A minimal system is a few hundred kilobytes, depending on the
application. The VR app I'm doing now is fairly large and loads in 10
seconds. A small app should take about two seconds. The mini image demo
at [1] is a good approximation.

 Please feel free to join in on Caffeine issues, at [2].


 thanks,

-C

[1] https://squeak.js.org/demo/simple.html#fullscreen
[2] https://github.com/ccrraaiigg/ccrraaiigg.github.io/issues

--
Craig Latta
Black Page Digital
Amsterdam :: San Francisco
cr...@blackpagedigital.com
+31   6 2757 7177 (SMS ok)
+ 1 415  287 3547 (no SMS)




Re: [Pharo-users] Standalone HTML Model (livecoded)

2017-09-18 Thread Craig Latta

 I wrote:

> I wasn't aware that one can livecode JS objects with PharoJS, only
> that PharoJS generates JS source which eventually runs in a browser.
> Can you give an example?

 Well, I evaluated the PharoJS playground expressions, and browsed
around the proxy support in the index.js that gets installed in a web
browser. I could inject the PjLoadForTest class into the web browser and
invoke its JS functions via Smalltalk messages from Pharo. I could send
#at:put: to the exposed "window" proxy of the web browser (as long as
the arguments were JS literals or proxies), and I could also inspect the
"document" proxy, but I got an exception when I tried to invoke
document.getElementWithId (via "bridge evalBlock: [document
getElementById: 'someID']"). Are arbitrary JS messages supposed to work?

 There isn't much exception handling support beyond relaying JS
error messages. (I guess one way to go would be to use the Chrome
Debugging Protocol.) I didn't see how to refer to Smalltalk objects from
JS (only JS objects from Smalltalk), so it seems the only Smalltalk
blocks one can use as JS callback functions are those which only use
objects and functions in JS-land.

 This might be okay for smoke-testing PharoJS apps, but I think the
kind of interactive DOM object sketching I mentioned before would be
uncomfortable.


-C

--
Craig Latta
Black Page Digital
Amsterdam :: San Francisco
cr...@blackpagedigital.com
+31   6 2757 7177 (SMS ok)
+ 1 415  287 3547 (no SMS)



Re: [Pharo-users] Standalone HTML Model

2017-09-18 Thread Craig Latta

Hi Norbert--

> > In Pharo on the SqueakJS virtual machine in a web browser[1], I
> > sketch with live DOM objects, and write them out as HTML. This way,
> > the DSL is the actual JavaScript DOM API which is sitting in the web
> > browser anyway, although driven with Smalltalk messages over the JS
> > bridge. I'm also assured that everything I do with the DOM objects
> > is legitimate, and I can handle DOM API errors live in Smalltalk.
>
> Sure you can do the same with PharoJS.

 Really? I wasn't aware that one can livecode JS objects with
PharoJS, only that PharoJS generates JS source which eventually runs in
a browser. Can you give an example?

> But there are scenarios where you want to have DOM actions without
> having a browser.

 Oh, it wasn't clear to me that this was one of Sean's requirements.


 thanks,

-C

--
Craig Latta
Black Page Digital
Amsterdam :: San Francisco
cr...@blackpagedigital.com
+31   6 2757 7177 (SMS ok)
+ 1 415  287 3547 (no SMS)



Re: [Pharo-users] Standalone HTML Model

2017-09-18 Thread Craig Latta

Hi Sean--

> I'd like to create HTML via a DSL, like Seaside's canvas builder, but
> without loading a whole web framework. Any ideas?

 In Pharo on the SqueakJS virtual machine in a web browser[1], I
sketch with live DOM objects, and write them out as HTML. This way, the
DSL is the actual JavaScript DOM API which is sitting in the web browser
anyway, although driven with Smalltalk messages over the JS bridge. I'm
also assured that everything I do with the DOM objects is legitimate,
and I can handle DOM API errors live in Smalltalk.


-C

[1] https://caffeine.js.org/pharo

--
Craig Latta
Black Page Digital
Amsterdam :: San Francisco
cr...@blackpagedigital.com
+31   6 2757 7177 (SMS ok)
+ 1 415  287 3547 (no SMS)



Re: [Pharo-users] Minimizing an Application

2017-08-25 Thread Craig Latta

Hi--

> > > ...10mbs which is the size pharo image can be reduced to is
> > > nothing for todays TBs hard drives and GBs flash drives and
> > > online storage. Unless you do an embedded app and 10 mbs are huge
> > > for your limited storage.
> >
> > Or you want to minimize initial startup time, including the time it
> > takes to transmit the entire system over the net.
>
> ...transmitting the entire image would be necessary only in the case
> you want to install it remotely and that remote location has no
> immediate access to the installation.

 Yes, that's what I meant by "initial startup".


-C

--
Craig Latta
Black Page Digital
Amsterdam :: San Francisco
cr...@blackpagedigital.com
voice through 2017-09-12:
+ 1 510 833 5799 (SMS ok)
+31  20 893 2796 (no SMS)




Re: [Pharo-users] Minimizing an Application

2017-08-24 Thread Craig Latta

> ...10mbs which is the size pharo image can be reduced to is nothing
> for todays TBs hard drives and GBs flash drives and online storage.
> Unless you do an embedded app and 10 mbs are huge for your limited
> storage.

 Or you want to minimize initial startup time, including the time it
takes to transmit the entire system over the net.


-C

--
Craig Latta
Black Page Digital
Amsterdam :: San Francisco
cr...@blackpagedigital.com
voice through 2017-09-12:
+ 1 510 833 5799 (SMS ok)
+31  20 893 2796 (no SMS)




Re: [Pharo-users] Pharo on the SqueakJS virtual machine

2017-08-20 Thread Craig Latta

Hi Torsten--

> > The next big step is getting a WebAssembly version of Cog running.
>
> Anyone known already to work on such a beast?

 Yes, I'm working on it.

> Another path could be to run on a Linux booting in the browser:
>
> https://bellard.org/jslinux

     Blech! :)


-C

--
Craig Latta
Black Page Digital
Amsterdam :: San Francisco
cr...@blackpagedigital.com
voice through 2017-09-12:
+ 1 510 833 5799 (SMS ok)
+31  20 893 2796 (no SMS)




Re: [Pharo-users] Pharo on the SqueakJS virtual machine

2017-08-20 Thread Craig Latta

Hi Sean--

> > https://tinyurl.com/y727fz4a
>
> Cool!
>
> A few things:
> - There is a very noticeable lag (e.g. ~5 seconds to open an "About"
> window). Any idea what it would take to deliver performance levels
> that feel more native?

 The next big step is getting a WebAssembly version of Cog running.
Until then, we're riding the performance improvements in the web browser
JavaScript engines. At the moment, Chrome seems a lot faster than the
others. Bert's just-in-time translation of compiled methods to JS (which
the web browser's JS engine then translates to native code) helped a lot.

> - I wonder how Tether compares to Denis' Seamless

 I think Tether's serialization takes more advantage of the fact
that the participants are live Smalltalk systems with many of the same
objects already in all locations. Tether also attempts to allow remote
messages with parameters from multiple object memories (e.g., in a
context on machine A, a message is sent to an object on B, with
parameters on C and D).

> - I was going to ask the same question for Naiad vs Epicea, but after
> reading on your blog, it seems Naiad is much more ambitious than
> simply tracking changes

 Yes, Naiad is ultimately a deployment vehicle, enabling the
accurate construction and deconstruction of systems. I want a coherent
way to release apps and work in teams, livecoding all the time.

> - I got a few errors off the bat
>   - UnixResolver>>#cantFindOriginError from #getEnvViaFFI
>   - "The primitiveFetchMourner is missing. Please upgrade your virtual
> machine..."

 Mm, I haven't delved into any of the non-fatal Pharo errors yet. :)


 thanks!

-C

--
Craig Latta
Black Page Digital
Amsterdam :: San Francisco
cr...@blackpagedigital.com
voice through 2017-09-12:
+ 1 510 833 5799 (SMS ok)
+31  20 893 2796 (no SMS)




Re: [Pharo-users] Pharo on the SqueakJS virtual machine

2017-06-29 Thread Craig Latta

 Well, that didn't take as long as I thought. :)  Probably due to
progress Bert made since we looked at it at ESUG 2016.

 For more details, see https://tinyurl.com/y727fz4a
(thiscontext.com). Let the bugfixing begin. :)


 thanks again,

-C

--
Craig Latta
Black Page Digital
Amsterdam :: San Francisco
cr...@blackpagedigital.com
+31   6 2757 7177 (SMS ok)
+ 1 415  287 3547 (no SMS)



Re: [Pharo-users] Pharo on the SqueakJS virtual machine (was "PharoJS")

2017-06-29 Thread Craig Latta

Hi Aik-Siong--

> Great news for Pharo. I presume it will be after you are done with
> Squeak running on SqueakJS.

 Now that I've gotten a release of Caffeine out[1], and written some
blog posts about it[2], I've turned my attention to Pharo in web
browsers. I also want Squeak and Pharo in web browsers to communicate
with their native counterparts, and with other Smalltalks. My goal is a
federation of live collaborating Smalltalk nodes on the net. I also have
SqueakJS controlling and reprogramming NodeJS instances.

> Do you have a roadmap?

 Bert and I worked on it a bit at ESUG 2016, and it was going
alright. Very conservatively, I expect to have it finished this year
sometime.

> How will WebAssembly help or not with project?

 I think WebAssembly will enable us to run Cog, with the usual web
security compromises. That's also something I'm interested in working
on. It may make the SqueakJS virtual machine obsolete.


 thanks,

-C

[1] https://caffeine.js.org
[2] https://thiscontext.com

--
Craig Latta
Black Page Digital
Amsterdam :: San Francisco
cr...@blackpagedigital.com
+31   6 2757 7177 (SMS ok)
+ 1 415  287 3547 (no SMS)



Re: [Pharo-users] PharoJS

2017-06-27 Thread Craig Latta

Hi--

 Aik-Siong writes:

> Craig Latta is doing something interesting[1] with SqueakJS which is
> an optimized Smalltalk VM in JavaScript and HTML5. It is supposedly
> able to run Smalltalk fast inside the browser and access the
> JavaScript world freely. I think this route will benefit greatly from
> WebAssembly.

 I'm also making it run Pharo.


 thanks,

-C

[1] https://caffeine.js.org

--
Craig Latta
Black Page Digital
Amsterdam :: San Francisco
cr...@blackpagedigital.com
+31   6 2757 7177 (SMS ok)
+ 1 415  287 3547 (no SMS)



Re: [Pharo-users] Rocket Chat - An open source alternative to Slack

2015-12-17 Thread Craig Johnson
The windows client is a b***h to work with.  The channel list is very 
long and unordered, and there's no search.


Craig

On 2015/12/17 08:20 AM, John Pfersich wrote:

I set up a public #pharo channel. Join it!

Sent from my iPad

On Dec 16, 2015, at 02:04, Dimitris Chloupis <mailto:kilon.al...@gmail.com>> wrote:


So since Slack has been so successful for our community , far more 
that IRC has been in terms of participation and useful discussions 
(at least the 2 years I have been around)


it made me wonder if I could find an open source alternative to Slack 
that is at least as good as it if not better without a very different 
workflow (so we have to learn everything from zero) all the big pros 
and something that could easily interface with Pharo.


Ladies and gentlemen meet Rocket Chat

https://rocket.chat/

The good news about Rocket chat is that it seems to have all the pros 
of Slack like close integration with tweeter, github etc etc . It has 
clients for all OS and mobile devices. But not the big cons like the 
10.000 messages limit ( which we have long exceeded). Its open source 
and most importantly written in javascript and we know that pharo can 
interface with javascript in many diffirent ways .


Hosted on Github and deployable with open source technologies.

And even its license is MIT.

The reviews I have read about it are very positive.

So what do you think ?




Re: [Pharo-users] PharoJS Status

2015-12-02 Thread craig
 

Hi Sebastian, 

I did get the JbDemoApplication to run in the browser. The concepts seem
simple enough. Thank you for your assistance. 

The next step for me was to run 

"JbSmalltalkToJavaScriptExporter exportClasses: {JbDemoApplication.
JbApplication} packages: #() inNewFileNamed: 'demo.js'" 

to see the generated javascript. However, I cannot get the generated
code to run. 

I'll take look another look and see what's going on tomorrow. 

Craig 

On 2015-12-01 00:21, Sebastian Heidbrink wrote: 

> Hi Craig,
> 
> First you should check the tests and run them 1 by 1.
> Your default browser should open and you should see a PharoJS logo following 
> a websocket log.
> If that is working correctly then you have loaded all needed sources and your 
> image should be fine.
> 
> There is general problem with the JSWorkspace and JSPlayground. If timeouts 
> occur then it seems as if the image is busted and no PharoJS code works 
> anymore.
> In my case it usually helps to just start one of the interactive unit tests 
> or to close and open the image.
> 
> Please read the class comments of JBBridge and other documented classes. This 
> will give you a better understanding of how PharoJS actually works.
> 
> If you "doit" a "JbDemoApplication start" then your default web browser 
> should open and you should see a green rectangle asking you to click on it.
> You can put a "self halt" into the "setupDOM" method and especially into the 
> callback handler blocks, see what it does,... you can debug the JS app 
> within Pharo and the app changes live in the browser
> 
> There is also the class "JbBrowserExamples" which has two scripts on the 
> class side. Copy them into a JSPlayground and inspect them.
> The action should take place in the browser opened while you opened the 
> JSPlayground.
> But be aware! Those scripts do not stop the websocket nor the proxy and it 
> usually does not take long until you have to restart/reset the image
> 
> I hope that helps a little?!
> 
> Sebastian
 

Re: [Pharo-users] PharoJS Status

2015-11-30 Thread craig
 

Can the people that have it working provide some tips please. 

I have the pink PharoJS workspace open, am I correct in understanding
that the results of any evaluation is this workspace should show-up in
the browser? At this point nothing shows-up in the browser. 

Craig 

On 2015-11-30 21:16, craig wrote: 

> I just loaded PharoJS into a fresh v5 image, and I also had the DNU message 
> until I loaded the NewExternalWebBrowser package. 
> 
> Craig 
> 
> Sent from Samsung Mobile 
> 
>  Original message 
> From: Noury Bouraqadi 
> Date:2015/11/30 5:48 PM (GMT+02:00) 
> To: Any question about pharo is welcome 
> Subject: Re: [Pharo-users] PharoJS Status 
> 
> Just tested with a fresh image and it worked. 
> 
> Noury
> 
>> On 30 Nov 2015, at 16:37, Andy Burnett  
>> wrote: 
>> 
>>>>> Craig said
>> Hi All,
>> 
>> I'd like to start messing around with PharoJS. Can anybody tell what
>> the status is? (Stable, broken, etc.)
>> 
>> And, which Pharo version should I use for this?
>> <<< 
>> 
>> I have just started playing with it. I have had some difficulty getting a 
>> running image. Following the instructions - should - work, but I found that 
>> I needed to install the NewExternalWebBrowser package separately before it 
>> would run. 
>> Cheers 
>> Andy
 

Re: [Pharo-users] PharoJS Status

2015-11-30 Thread craig
I just loaded PharoJS into a fresh v5 image,  and I also had the DNU message 
until I loaded the NewExternalWebBrowser package. 

Craig

Sent from Samsung Mobile

 Original message 
From: Noury Bouraqadi  
Date:2015/11/30  5:48 PM  (GMT+02:00) 
To: Any question about pharo is welcome  
Subject: Re: [Pharo-users] PharoJS Status 

Just tested with a fresh image and it worked.

Noury
On 30 Nov 2015, at 16:37, Andy Burnett  wrote:

>>> Craig said
Hi All,

I'd like to start messing around with PharoJS.  Can anybody tell what
the status is?  (Stable, broken, etc.)

And, which Pharo version should I use for this?
<<<

I have just started playing with it. I have had some difficulty getting a 
running image. Following the instructions - should - work, but I found that I 
needed to install the NewExternalWebBrowser package separately before it would 
run.
Cheers
Andy



[Pharo-users] PharoJS Status

2015-11-30 Thread Craig Johnson

Hi All,

I'd like to start messing around with PharoJS.  Can anybody tell what 
the status is?  (Stable, broken, etc.)


And, which Pharo version should I use for this?

Craig





Re: [Pharo-users] Accessors vs instance variables

2015-10-02 Thread Craig Johnson

Hi,

This is a bugbear for me.
On 2015/09/30 09:35 PM, Lyn Headley wrote:

Hello,

As I understand it, in Smalltalk, the instance variables of a class C 
are "protected" - able to be referenced by methods of C or its 
subclasses, but not by other objects. This is a useful feature as it 
clearly points out which pieces of data are not available to other 
objects, and thereby simplifies code.


However, I am often unsure of whether to use this feature or not, as 
it conflicts in my mind with the practice of using accessor methods. I 
like accessor methods because they make it easy to change behavior 
later -- If I have a dozen calls to an accessor method, then I only 
need to change it in one place. If these were instance variable 
references, I would have to do more work. The disadvantage of accessor 
methods is that they obscure the protected status of data -- it 
becomes unclear how protected an instance variable is meant to be. 
(Accessors also make it harder for me to find users of the data when 
browsing, when there are senders from totally unrelated classes, 
although I suspect I have just not figured out how to browse scoped in 
the right way for this).


It occurs to me that a tool could be (easily?) developed that would 
solve this problem. It would take existing variable references and 
turn them into calls to accessor methods. That way, I could have 
protection when I want it, and easy ability to change code as well. 
Does something like this exist, or is it feasible to build?


How do others think about this issue?

-Lyn

I'm old-school OO and don't like accessor methods at all.  They break 
encapsulation, they cloud the object interface, and most importantly 
they allow bugs to be introduced by undocumented modification of the 
object's internal state.


Nobody has shown me a good reason for their existence and I never use 
them except where I'm forced to use them in Spec and Glorp.


Craig

PS:  I'm forced to use them in C# as well (my day job).  Because in C# 
it's only way to promote a local variable to a property which is 
required by most frameworks.




Re: [Pharo-users] FileLocator problem?

2015-07-30 Thread Craig Johnson


On 2015/07/30 11:43 AM, PBKResearch wrote:


Hello

Out of curiosity I tried to run the snippet which Alexandre Bergel 
posted yesterday under the name ‘Script of the day’. It failed, but 
nothing to do with the script itself. The problem is that it fails on 
the line: ‘FileLocator documents allChildren.’ The debugger message is 
“Directory does not exist: Path ‘C:’ /  ‘Users’ / ‘Peter’ / 
‘Documents’ / ‘My Music’.” Tracing through the debugger output, I 
conclude that the same error will arise with the directories ‘My 
Pictures’ and ‘My Videos’. One thing these directories have in common 
is that they are empty, so as a test I copied a small text file into 
‘My Music’, but this made no difference.


I have a vague recollection that ‘My Music’ etc., although presented 
by Windows as conventional directories, are in fact some sort of 
pseudo-directories constructed as required by Windows Explorer, but I 
am not too sure about this. Could this be an explanation of the problem?


Yup you are correct.  The actual directory will be "C: / 
Users/Peter/Music" on windows 7.


Craig


Re: [Pharo-users] Slow compilation on one of my Windows PCs

2015-06-30 Thread Craig Johnson



On 2015/06/30 07:42 PM, Peter Uhnák wrote:

Debian (host) "'4,855 per second'"

Ubuntu (vbox) "'4,709 per second'"

Win XP (vbox) "'504.099 per second'"

My my Win 7 (host) ( i7 CPU @ 2.10GHz)
=> 862.000 per second

Still a far cry from what the Linux boxes do.  I'm watching with interest.

Craig



Re: [Pharo-users] Detecting image (pharo process) hang?

2015-06-03 Thread Craig Johnson

On 03-06-15 12:07, David wrote:

That could work, but can be time expensive. I already have seaside
installed (and I am using that) so I may try that.

The only problem I see if that if the image is stalled, it can pass
more time than desired until it times out the http connection.

Use threads, one to start the session and set a flag on receiving a response
and a second to watch for the flag.  If there's no flag after a second, 
the VM

is a gonner.

Craig



Re: [Pharo-users] Pharo Image Freeze (was Pharo 4 Image Freeze)

2015-06-02 Thread Craig Johnson

Ok

Case 15669 
<https://pharo.fogbugz.com/f/cases/15669/Exception-inside-debugger-causes-lockup> 
opened.


Craig

On 2015/06/02 10:30 AM, Esteban Lorenzano wrote:

yes please
and we’ll backport as soon as we have a fix.

thanks!


On 02 Jun 2015, at 08:25, Craig Johnson  wrote:

2015-06-01 23:44 GMT+02:00*Nicolai Hess*  nicolaihess at web.de  
<mailto:pharo-users%40lists.pharo.org?Subject=Re%3A%20%5BPharo-users%5D%20Pharo%204%20Image%20Freeze&In-Reply-To=%3CCAPED3ST3NWZD1UjO%3DLCz21KJVLy88KkHG7nT70Uy0e7_Tyt2mw%40mail.gmail.com%3E>:
/
/> This worked until pharo 40245

-> it looks like phase4 in issue
11996 <https://pharo.fogbugz.com/default.asp?11996>
Wrong exception handler problem

introduced this behaviour.


Thanks Nicolai.  I see that it's still an issue in Pharo 5.
I can try to create a new bug report if that Ok with the community.

Craig









[Pharo-users] Pharo Image Freeze (was Pharo 4 Image Freeze)

2015-06-01 Thread Craig Johnson

2015-06-01 23:44 GMT+02:00*Nicolai Hess*  nicolaihess at web.de  
<mailto:pharo-users%40lists.pharo.org?Subject=Re%3A%20%5BPharo-users%5D%20Pharo%204%20Image%20Freeze&In-Reply-To=%3CCAPED3ST3NWZD1UjO%3DLCz21KJVLy88KkHG7nT70Uy0e7_Tyt2mw%40mail.gmail.com%3E>:
/
/> This worked until pharo 40245

-> it looks like phase4 in issue
11996 <https://pharo.fogbugz.com/default.asp?11996>
Wrong exception handler problem

introduced this behaviour.



Thanks Nicolai.  I see that it's still an issue in Pharo 5.
I can try to create a new bug report if that Ok with the community.

Craig





Re: [Pharo-users] Pharo 4 Image Freeze

2015-06-01 Thread Craig Johnson

Sure thing.

To see the bug, file the code below into a clean image and run the 
example.  The when the debugger pops, step over each line in the 
method.  I'm doing this on a Windows OS.


Object subclass: #Cooler
instanceVariableNames: ''
classVariableNames: ''
poolDictionaries: ''
category: 'ImageFreeze'!

!Cooler methodsFor: 'as yet unclassified' stamp: 'CraigJohnson 6/1/2015 
23:31'!

runMe
|  a |
self halt.
self except.
a := 1.! !

"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- "!

Cooler class
instanceVariableNames: ''!

!Cooler class methodsFor: 'as yet unclassified' stamp: 'CraigJohnson 
6/1/2015 23:16'!

example
self new runMe ! !



On 2015/06/01 11:00 PM, Esteban Lorenzano wrote:

well… pharo4 is not a beta :)
weird that no one else reports same bug… can you give us a way to reproduce the 
problem? Instead telling you which image does not have a problem I was not 
aware, I would like more to give you a bugfix :)

Esteban


On 01 Jun 2015, at 22:31, Craig Johnson  wrote:


Hi All,

I'm getting tired of Pharo 4 beta freezing.  It happens whenever a exception 
occurs while in the debugger.

Funny that I don't remember any of the Pharo 4 development images freezing.

Which image can I use that won't do this?

Craig








[Pharo-users] Pharo 4 Image Freeze

2015-06-01 Thread Craig Johnson


Hi All,

I'm getting tired of Pharo 4 beta freezing.  It happens whenever a 
exception occurs while in the debugger.


Funny that I don't remember any of the Pharo 4 development images freezing.

Which image can I use that won't do this?

Craig



Re: [Pharo-users] Alt-tab between windows

2015-05-19 Thread Craig Johnson



2015-05-19 11:41 GMT-03:00 Avdi Grimm :

It took thousands of programmers decades of work in many different languages
to create this variety. I'd hate to see the smaller Pharo community pour
tons of effort into re-inventing these solutions.

Which is why I'm suggesting that it may be more helpful to re-frame the
problem. General purpose window management is a problem that has been solved
many times over. Do you really want to do it yet again? I suspect that with
some careful examination of Pharo coding workflows, you could find a way to
obviate the need for zillions of windows, and solve a simpler problem
instead.

Some ramblings:
1. I quite like the way the alt-browser allows you to navigate through 
your code by clicking on
methods and classes in a tree to see the code in the right-hand 
pane.  Take that one step further by
having the browser open a tab for each method that you click on, or 
switch to the tab -
if there is one open already, and you will have taken a giant step 
towards most modern

IDEs[1].

2. One way to solve the alt-tab issue is to use the OS 's window 
manager, instead of managing the
windows in the image.  This also has the added benefit of 
incorporating the OS window manager's
features and look and feel into Pharo for free.  The ability to 
drag a tab out of the image window
onto it's own display in a multi-headed setup would be very welcome 
to me.


Craig

1. My reference points here are M/S Visual Studio which I use daily and 
Netbeans which I use for

mobile(Andriod) work.



Re: [Pharo-users] Spec - Columns Containing Rows Containing Columns

2015-05-19 Thread Craig Johnson

and... it works.

Thanks to all who replied.  Putting the two columns into a RowLayout worked.

Craig

On 2015/05/19 07:41 PM, Nicolai Hess wrote:

I just saw there is are
SpecColumnLayout
SpecRowLayout

classes. So you can use


defaultSpec


^SpecRowLayout composed
newColumn: [ :tcol |
   tcol newRow:[:trow | trow add: #lblFolder ] height: 30.
];

newColumn: [ :tcol |
tcol newRow:[:trow |
trow newColumn: [ :tcol2 | tcol2 add: #ddlfolder];
 newColumn: [ :tcol2 | tcol2 add: #txtFolder].
] height: 30.
].





[Pharo-users] Spec - Columns Containing Rows Containing Columns

2015-05-19 Thread Craig Johnson

Hi,

Spec has me tearing my hair out again.

I'm using a composed layout with two columns in it.  In the second 
column I'd like to place some rows which in turn contain columns.


There does not seem to be any way to do this.  Everthing that I try only 
renders one of the two main columns.

Guidance would be spreciated.

defaultSpec


^SpecLayout composed
newColumn: [ :tcol |
   tcol newRow:[:trow | trow add: #lblFolder ] height: 30.
];

newColumn: [ :tcol |
tcol newRow:[:trow |
trow newColumn: [ :tcol2 | tcol2 add: #ddlfolder];
 newColumn: [ :tcol2 | tcol2 add: #txtFolder].
] height: 30.
].


[Pharo-users] Halo Menu On Spec Tree Node

2015-05-06 Thread Craig Johnson

Hi All,

I had an issue - when I opened a Halo on a Spec tree node in the UI and 
select the menu Icon, I got a DNU message.  However if I selected a 
normal Morph, the menu Icon worked fine.


I'm using Pharo 4.0 released version.

Fixed this by changing TreeModel>>iconFor to:
iconFor: aNode
^ iconBlock value cull: aNode content*s* cull: aNode



Craig




Re: [Pharo-users] Spec help in HelpBrowser

2015-02-16 Thread Craig
From: nacho
>
>If you are interested in having some Spec documentation in the image. 
>I'm preparing some help for the HelpBrowser. It is mainly taken from 
>the Spec chapter that it's being written.
>However if you want to take a look:
...

Well done Nacho, I like this a lot.  What you have started with is
going to be useful to newbies.  What I'd love to see is the next logical 
step of documentation of the more commonly used widgets.

Craig








Re: [Pharo-users] Learning Spec

2015-02-15 Thread Craig
Sven,

Thanks for this, I was unaware of the MultiColumnListModel.  I notice that 
setting colors has no effect here either.
I remember from the video that overriding theme colors is still an issue in 
Spec, but I can move forward.

Craig

-Original Message-
From: Pharo-users [mailto:pharo-users-boun...@lists.pharo.org] On Behalf Of 
Sven Van Caekenberghe
Sent: 16 February 2015 12:30 AM
To: Any question about pharo is welcome
Subject: Re: [Pharo-users] Learning Spec

This is the easiest way that I know to show a simple table.

MultiColumnListModel new
  items: #(('x coordinate' 'y coordinate' 'z coordinate')(1 2 3)(4 5 6)(7 8 9));
  displayBlock: [ :x | x collect: #asString ];
  setSelectedIndex: 2;
  title: 'My table';
  openWithSpec.

> On 15 Feb 2015, at 22:36, Craig  wrote:
> 
> Hi Sven,
> 
> I count myself as a beginner with Pharo, although I've been dabbling with 
> Pharo UI choices for a few months now.
> Like Sebastian, I wrote Spec off as too immature for prime-time, but I 
> too come from the commercial world, so maybe my expectations were unrealistic.
> 
> So I took the time to learn Spec.  My very first requirement is to display 
> some data in a grid or table like manner, so I took a look at the TreeModel, 
> and tried to adapt one of the examples to fit.  However, whenever I try to 
> add a third column to the model, I get a "Subscript Out of Bounds".
> I also tried to change the oddRowColor, but it had no effect.
> 
> I hope that is specific enough for you.
> 
> Craig
> 
> -Original Message-
> From: Pharo-users [mailto:pharo-users-boun...@lists.pharo.org] On 
> Behalf Of Sven Van Caekenberghe
> Sent: 13 February 2015 11:12 AM
> To: Any question about pharo is welcome
> Subject: [Pharo-users] Learning Spec
> 
> Hi,
> 
> 
> From now on it is forbidden to complain about Spec in general, unspecific 
> terms unless you have taken the time to learn about it. Here is a guide to 
> documentation about Spec, most recent first.
> 
> 
> There is an excellent presentation by Johan Fabry did during the last Pharo 
> Days, 'Using Spec to Build a UI'. *MUST WATCH* (the video is not yet fully 
> public, but soon will be, the link should work though):
> 
>  http://youtu.be/OL23s9ZUIR0?list=PL4actYd6bfnz98ngrKALwwStl3C3odEKG
> 
> The slides are also not yet available, but soon will be (the talk is much 
> better that the slides on their own).
> 
> 
> This draft chapter 'Spec: a framework for describing user interfaces' for an 
> upcoming book:
> 
>  
> https://ci.inria.fr/pharo-contribution/view/Books/job/PharoBookWorkInP
> rogress/lastSuccessfulBuild/artifact/Spec/Spec.pier.html
> 
> 
> Look in the image.
> 
> Browse the hierarchy below AbstractWidgetModel in the category 
> Spec-Core-Widgets in Pharo 4, look at the protocols called 'protocol' & 
> 'protocol-events' mainly. Look for references to each class. Trace senders of 
> methods until you arrive at examples. Study the examples, play with them, 
> change them.
> 
> The UI of most tools in Pharo is also implemented using Spec. Browse the 
> hierarchy below ComposableModel to find them. (Komitter, Versionner, Critics, 
> Metacello, the old Eye Inspectors, ..). Watch and learn.
> 
> 
> The cool Spec website:
> 
>  http://spec.st
> 
> 
> Read some cool articles like:
> 
> https://medium.com/concerning-pharo/rediscovering-the-ux-of-the-legend
> ary-hp-35-scientific-pocket-calculator-d1d497ece999
> 
> See the section 'HP35CalculatorModel' for the Spec part.
> 
> 
> The following papers (some older ones refer to API that has changed):
> 
> 'Seamless Composition and Reuse of Customizable User Interfaces with Spec'
> 
>  http://rmod.lille.inria.fr/archives/papers/Ryse13a-SCICO-Spec.pdf
> 
> 'Spec - A Framework for the Specification and Reuse of UIs and their Models'
> 
>  
> http://rmod.lille.inria.fr/archives/papers/Ryse12b-Spec-IWST12-Final.p
> df
> 
> 'Spec – Technical Report'
> 
>  
> http://rmod.lille.inria.fr/archives/reports/Ryse12a-SpecTechReport.pdf
> 
> 
> Use the image to build a couple of simple UIs using Spec. You will be 
> surprised to learn that it is not that difficult. Just go with the flow, 
> don't try to enforce your world view on it, wait until you are further along.
> 
> 
> Have fun !
> 
> 
> Sven
> 
> 
> PS: Once you have done all the above, you are most welcome to help improve 
> Spec by discussing specific, concrete issues.
> 
> 
> --
> Sven Van Caekenberghe
> Proudly supporting Pharo
> http://pharo.org
> http://association.pharo.org
> http://consortium.pharo.org
> 
> 
> 





Re: [Pharo-users] Learning Spec

2015-02-15 Thread Craig
Nicolai,

 

This code works perfectly.

 

This is pretty-much exactly what I did.  Except that I left the m openWithSpec 
message send where it was in the example, just before instantiating the 
columns.  (see below)

The example clearly needs updating.

 

The way that you did it makes perfect sense, thank you.

 

Craig

 

From: Pharo-users [mailto:pharo-users-boun...@lists.pharo.org] On Behalf Of 
Nicolai Hess
Sent: 16 February 2015 01:03 AM
To: Any question about pharo is welcome
Subject: Re: [Pharo-users] Learning Spec

 

Another example, (modified TreeModel example)

|r m col1 col2 col3|
r := FileLocator vmDirectory.
m := TreeModel new.
m roots: r allFiles.
m rootNodeHolder: [ :item | 
TreeNodeModel new
content: item;
icon: Smalltalk ui icons smallLeftFlushIcon
];
title: r fullName.

  m openWithSpec.


col1 := TreeColumnModel new
displayBlock: [ :node | node content basename ];
headerLabel:'Name'.
col2 := TreeColumnModel new
displayBlock: [ :node | node content creationTime ];
headerLabel:'Time'.
col3 := TreeColumnModel new
displayBlock: [ :node | node content permissions];
headerLabel:'Permissions'.
m columns: {col1. col2 . col3}.




2015-02-15 23:30 GMT+01:00 Sven Van Caekenberghe :

This is the easiest way that I know to show a simple table.

MultiColumnListModel new
  items: #(('x coordinate' 'y coordinate' 'z coordinate')(1 2 3)(4 5 6)(7 8 9));
  displayBlock: [ :x | x collect: #asString ];
  setSelectedIndex: 2;
  title: 'My table';
  openWithSpec.


> On 15 Feb 2015, at 22:36, Craig  wrote:
>
> Hi Sven,
>
> I count myself as a beginner with Pharo, although I've been dabbling with 
> Pharo UI choices for a few months now.
> Like Sebastian, I wrote Spec off as too immature for prime-time, but I too 
> come from the commercial
> world, so maybe my expectations were unrealistic.
>
> So I took the time to learn Spec.  My very first requirement is to display 
> some data in a grid or table like manner, so I took a look at the TreeModel, 
> and tried to adapt one of the examples to fit.  However, whenever I try to 
> add a third column to the model, I get a "Subscript Out of Bounds".
> I also tried to change the oddRowColor, but it had no effect.
>
> I hope that is specific enough for you.
>
> Craig
>
> -Original Message-
> From: Pharo-users [mailto:pharo-users-boun...@lists.pharo.org] On Behalf Of 
> Sven Van Caekenberghe
> Sent: 13 February 2015 11:12 AM
> To: Any question about pharo is welcome
> Subject: [Pharo-users] Learning Spec
>
> Hi,
>
>
> From now on it is forbidden to complain about Spec in general, unspecific 
> terms unless you have taken the time to learn about it. Here is a guide to 
> documentation about Spec, most recent first.
>
>
> There is an excellent presentation by Johan Fabry did during the last Pharo 
> Days, 'Using Spec to Build a UI'. *MUST WATCH* (the video is not yet fully 
> public, but soon will be, the link should work though):
>
>  http://youtu.be/OL23s9ZUIR0?list=PL4actYd6bfnz98ngrKALwwStl3C3odEKG
>
> The slides are also not yet available, but soon will be (the talk is much 
> better that the slides on their own).
>
>
> This draft chapter 'Spec: a framework for describing user interfaces' for an 
> upcoming book:
>
>  
> https://ci.inria.fr/pharo-contribution/view/Books/job/PharoBookWorkInProgress/lastSuccessfulBuild/artifact/Spec/Spec.pier.html
>
>
> Look in the image.
>
> Browse the hierarchy below AbstractWidgetModel in the category 
> Spec-Core-Widgets in Pharo 4, look at the protocols called 'protocol' & 
> 'protocol-events' mainly. Look for references to each class. Trace senders of 
> methods until you arrive at examples. Study the examples, play with them, 
> change them.
>
> The UI of most tools in Pharo is also implemented using Spec. Browse the 
> hierarchy below ComposableModel to find them. (Komitter, Versionner, Critics, 
> Metacello, the old Eye Inspectors, ..). Watch and learn.
>
>
> The cool Spec website:
>
>  http://spec.st
>
>
> Read some cool articles like:
>
> https://medium.com/concerning-pharo/rediscovering-the-ux-of-the-legendary-hp-35-scientific-pocket-calculator-d1d497ece999
>
> See the section 'HP35CalculatorModel' for the Spec part.
>
>
> The following papers (some older ones refer to API that has changed):
>
> 'Seamless Composition and Reuse of Customizable User Interfaces with Spec'
>
>  http://rmod.lille.inria.fr/archives/papers/Ryse13a-SCICO-Spec.pdf
>
> 'Spec - A Framework for the Specification and 

Re: [Pharo-users] Learning Spec

2015-02-15 Thread Craig
Hi Sven,

I count myself as a beginner with Pharo, although I've been dabbling with Pharo 
UI choices for a few months now.
Like Sebastian, I wrote Spec off as too immature for prime-time, but I too come 
from the commercial
world, so maybe my expectations were unrealistic.

So I took the time to learn Spec.  My very first requirement is to display some 
data in a grid or table like manner, so I took a look at the TreeModel, and 
tried to adapt one of the examples to fit.  However, whenever I try to add a 
third column to the model, I get a "Subscript Out of Bounds".
I also tried to change the oddRowColor, but it had no effect.

I hope that is specific enough for you.

Craig

-Original Message-
From: Pharo-users [mailto:pharo-users-boun...@lists.pharo.org] On Behalf Of 
Sven Van Caekenberghe
Sent: 13 February 2015 11:12 AM
To: Any question about pharo is welcome
Subject: [Pharo-users] Learning Spec

Hi,


>From now on it is forbidden to complain about Spec in general, unspecific 
>terms unless you have taken the time to learn about it. Here is a guide to 
>documentation about Spec, most recent first.


There is an excellent presentation by Johan Fabry did during the last Pharo 
Days, 'Using Spec to Build a UI'. *MUST WATCH* (the video is not yet fully 
public, but soon will be, the link should work though):

  http://youtu.be/OL23s9ZUIR0?list=PL4actYd6bfnz98ngrKALwwStl3C3odEKG

The slides are also not yet available, but soon will be (the talk is much 
better that the slides on their own).


This draft chapter 'Spec: a framework for describing user interfaces' for an 
upcoming book:

  
https://ci.inria.fr/pharo-contribution/view/Books/job/PharoBookWorkInProgress/lastSuccessfulBuild/artifact/Spec/Spec.pier.html


Look in the image.

Browse the hierarchy below AbstractWidgetModel in the category 
Spec-Core-Widgets in Pharo 4, look at the protocols called 'protocol' & 
'protocol-events' mainly. Look for references to each class. Trace senders of 
methods until you arrive at examples. Study the examples, play with them, 
change them.

The UI of most tools in Pharo is also implemented using Spec. Browse the 
hierarchy below ComposableModel to find them. (Komitter, Versionner, Critics, 
Metacello, the old Eye Inspectors, ..). Watch and learn.


The cool Spec website:

  http://spec.st


Read some cool articles like:

https://medium.com/concerning-pharo/rediscovering-the-ux-of-the-legendary-hp-35-scientific-pocket-calculator-d1d497ece999

See the section 'HP35CalculatorModel' for the Spec part.


The following papers (some older ones refer to API that has changed):

'Seamless Composition and Reuse of Customizable User Interfaces with Spec'

  http://rmod.lille.inria.fr/archives/papers/Ryse13a-SCICO-Spec.pdf

'Spec - A Framework for the Specification and Reuse of UIs and their Models'

  http://rmod.lille.inria.fr/archives/papers/Ryse12b-Spec-IWST12-Final.pdf

'Spec – Technical Report'

  http://rmod.lille.inria.fr/archives/reports/Ryse12a-SpecTechReport.pdf


Use the image to build a couple of simple UIs using Spec. You will be surprised 
to learn that it is not that difficult. Just go with the flow, don't try to 
enforce your world view on it, wait until you are further along.


Have fun !


Sven


PS: Once you have done all the above, you are most welcome to help improve Spec 
by discussing specific, concrete issues.


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





Re: [Pharo-users] Installing GToolkit

2015-02-03 Thread Craig
Ahh Ok – I looked for the debugger and when I didn’t find it, I assumed that 
none of the toolkit was there.

 

Sorry to bother.

 

Craig

 

From: Pharo-users [mailto:pharo-users-boun...@lists.pharo.org] On Behalf Of 
Marcus Denker
Sent: 03 February 2015 09:56 PM
To: Any question about pharo is welcome
Subject: Re: [Pharo-users] Installing GToolkit

 

 

On 03 Feb 2015, at 20:50, Craig  wrote:

 

Anybody got any ideas if and when GToolkit will be available on Pharo 4?

 

 

We are shipping with it since some time before christmas.



Re: [Pharo-users] Installing GToolkit

2015-02-03 Thread Craig
Anybody got any ideas if and when GToolkit will be available on Pharo 4?

 

Just Asking

 

Craig

 

 

From: Pharo-users [mailto:pharo-users-boun...@lists.pharo.org] On Behalf Of 
Tudor Girba
Sent: 05 October 2014 08:19 AM
To: Any question about pharo is welcome
Subject: Re: [Pharo-users] Installing GToolkit

 

Hi Evan,

 

The instructions are a bit wrong. It should be "activateWithoutSaving" instead 
of "activate".

 

The GTImageSetupCommandLineHandler does more default settings. Just take a look 
at the activateWithoutSaving method and pick what you want, or use the script 
that Phil suggested only to install the tools.

 

But, what do you mean when you say that the Playground is not working?

 

Cheers,

Doru

On Sat, Oct 4, 2014 at 8:07 PM, Evan Donahue  wrote:

Hello,





Re: [Pharo-users] Glorp on Pharo 4

2015-01-22 Thread Craig
Sven,

It took a bit, but I figured it out.

If you try to login with a login that has previously been used, then you get
this DNU message.

I was following your "reddit-st-in-10-cool-pharo-classes" and it happened
when I ran the first test.
This was the second time that the DefaultLogin was used (it was lazily
initialised by the create tables call).
When I nill-ed out the DefaultLogin the tests all passed.

Craig


-Original Message-
From: Pharo-users [mailto:pharo-users-boun...@lists.pharo.org] On Behalf Of
Sven Van Caekenberghe
Sent: 22 January 2015 10:19 AM
To: Any question about pharo is welcome
Subject: Re: [Pharo-users] Glorp on Pharo 4

A comma is indeed a (binary) message. It concatenates two Collections, like
Strings.

Please provide more details on how you try to connect and what error you
get, exactly.

> On 22 Jan 2015, at 08:26, Craig  wrote:
> 
> From: Sven Van Caekenberghe
> Sent: 22 January 2015 08:37 AM
> 
>> What exactly do you mean ?
>> 
>> Reading the link above that seems to be correct, at first glance, 
>> maybe I
> don't see it.
> 
> Sven,
> 
> Forgive me, I'm new to Pharo, but I'm sure that in Pharo you don't use 
> commas to separate parameters in a message.  I don't know of any 
> syntactical significance of the comma.
> I saw this after I got the ", does not understand connectionArgs" 
> message when trying to connect to my Postgres database.  I take this 
> to mean that Pharo tried to send the connectionArgs message to the ',' 
> ByteString.
> 
> Craig
> 
> 





Re: [Pharo-users] Glorp on Pharo 4

2015-01-21 Thread Craig
From: Sven Van Caekenberghe
Sent: 22 January 2015 08:37 AM

> What exactly do you mean ?
>
> Reading the link above that seems to be correct, at first glance, maybe I
don't see it.

Sven,

Forgive me, I'm new to Pharo, but I'm sure that in Pharo you don't use
commas to separate parameters in a 
message.  I don't know of any syntactical significance of the comma.
I saw this after I got the ", does not understand connectionArgs" message
when trying to connect to my 
Postgres database.  I take this to mean that Pharo tried to send the
connectionArgs message to the 
',' ByteString.

Craig




Re: [Pharo-users] Glorp on Pharo 4

2015-01-21 Thread Craig
From:  Sven Van Caekenberghe
Sent: 20 January 2015 01:40 PM

> Using Glorp on top of the PostgresV2 driver (which uses just a network
connection and no native code nor plugin) 
> should work on all platforms. Of course, you still have to install
Postgres itself, but it can run on another machine too.
>
> HTH,
>
> Sven
Sven,

I just ran into an issue in the Postgres V2 driver, which I guess is a
porting error.  See below and note the commas ",".

PGConnection>>stSendingMD5Password: event 
"MD5 authentication as explain in
http://archives.postgresql.org/pgsql-novice/2003-05/msg00305.php";
| hashedCredentials hashedMessage |

hashedCredentials := (MD5 hashMessage: (connectionArgs password,
connectionArgs userName)) hex asLowercase.
hashedMessage := 'md5', (MD5 hashMessage: (hashedCredentials, event
salt asString)) hex asLowercase.

selfsendPacket: (PGPasswordPacket password: hashedMessage) on:
socket.




Re: [Pharo-users] Glorp on Pharo 4

2015-01-20 Thread Craig


-Original Message-
From: Sven Van Caekenberghe
Sent: 20 January 2015 01:40 PM


Hi Sven,

> Using Glorp on top of the PostgresV2 driver (which uses just a network
connection 
> and no native code nor plugin) should work on all platforms. Of course,
you still
> have to install Postgres itself, but it can run on another machine too.

Thanks for the pointer.  It took quite a bit of scratching around, but I now
have a working 
Postgres Glorp driver, so I can use either RDBMS.

Thank-you for taking the trouble to respond to my questions.

Craig




Re: [Pharo-users] Glorp on Pharo 4

2015-01-20 Thread Craig
Thanks Torsten,

The guide worked right out of the box.

Many thanks for your help.

Craig

-Original Message-
From: Torsten Bergmann [mailto:asta...@gmx.de] 
Sent: 20 January 2015 11:42 AM
To: cr...@hivemind.net; Any question about pharo is welcome
Subject: Glorp on Pharo 4

Hi Craig,

see below a quick guide. Tell me when it works.
Someone should do a video from that...
 
Thanks
Torsten


For Windows:

- go to http://www.sqlite.org/download.html and retrieve 
sqlite-dll-win32-x86-3080800.zip
- copy the included sqlite3.dll to the folder where your virtual machine 
(Pharo.exe) resides so it can be found by the NativeBoost wrapper later
  (as an alternative you can have in any folder that is accessible via PATH 
environment variable)

- open a fresh Pharo4.0 image (here I use latest update: #40451 image)
- load from ConfigurationBrowser: "Glorp"
- load from ConfigurationBrowser: "NBSQLite3"
- then open Monticello browser and select the repo for NBSQLite3, open it and
  load additionally "NBSQLite3-Glorp-TorstenBergmann.3"
- create a package "Killerapp-Core" using Nautilus system browser
- create a tag "Model" in this new package using Nautilus system browser
- create a class 
 
  Object subclass: #KillerAppUser
 instanceVariableNames: 'id username'
 classVariableNames: ''
 category: 'Killerapp-Core-Model'
 
- click on the class in Nautilus browser and select "Refactoring" -> "Class 
Refactoring"
  and "Generate Accessors" to create accessor methods for the instance variables

- create a package "Killerapp-Persistence" using Nautilus system browser
- create a tag "Mappings" in this new package using Nautilus system browser

  DescriptorSystem subclass: #KillerAppDatabaseDescriptor
   instanceVariableNames: ''
   classVariableNames: ''
   category: 'Killerapp-Persistence-Mappings'

- implement an instance side method in method category 'accessing'

allTableNames
 ^ #('KILLERAPP_USER')  
   
- create an instance side method in category 'mapping-classes'

   constructAllClasses
  ^ super constructAllClasses
  add: KillerAppUser;
  yourself
  
  
- implement an instance side method in method category 'mapping - classes'

classModelForKillerAppUser: aClassModel
#(#id #username) do: [ :each |
aClassModel newAttributeNamed: each ]   
  
- create an instance side method in method category 'mapping - descriptors'

   descriptorForKillerAppUser: aDescriptor

  | table |
  table := self tableNamed: 'KILLERAPP_USER'.
  aDescriptor table: table.
  #(id username) do: [ :each |
(aDescriptor newMapping: DirectMapping) 
from: each to: (table fieldNamed: each) 
]


- implement an instance side method in method category 'mapping - tables'

tableForKILLERAPP_USER: aTable
"Define the table KILLERAPP_USER"
(aTable createFieldNamed: 'ID' type: platform sequence) 
isUnique: true; 
bePrimaryKey.   
(aTable createFieldNamed: 'USERNAME' type: (platform varchar: 
20))
isUnique: true;
beNullable: false.  

By having the descriptions set up you can now play with Glorp:

   |login accessor session|
   login := Login new.
   login host: ''.
   login databaseName: 'C:\db\killerapp.db'.
   login database: SQLite3Platform new.
   accessor := NBSQLite3DatabaseAccessor forLogin: login.
   accessor loginIfError: [ self error: 'unable to connect' ].
   session := GlorpSession new.
   session system: (KillerAppDatabaseDescriptor forPlatform: login database).
   session accessor: accessor.

   "Create all tables (only to be done once)"
   session createTables.

   "Create a new user"
   session inUnitOfWorkDo: [ 
  user := (KillerAppUser new)
  username: 'admin'.
  session register: user ].

Then you can use a tool like "SQLiteStudio" to open the database and check what 
is in the tables...







Re: [Pharo-users] Glorp on Pharo 4

2015-01-19 Thread Craig
Torsten,

Can you tell me which packages you needed, and what you did  to get this 
working?  I've been trying to get it working with Postgres, but I'm not married 
to the database engine.

Craig

-Original Message-
From: Pharo-users [mailto:pharo-users-boun...@lists.pharo.org] On Behalf Of 
Torsten Bergmann
Sent: 19 January 2015 11:04 PM
To: Any question about pharo is welcome
Subject: [Pharo-users] Glorp on Pharo 4

Hi Craig,

I've Glorp working with Pharo 4 and NBSQlite3 now without any problem.
That's why it is now also in the config browser.

As you see from the repo I restructured a bit the "Glorp" package t to conn dig 
deeper into it and hopefully find the time updating the port once I have access 
to the VW code. Will update the config in the next available time slot.

According to Alan Glorp is now relicensed to MIT thanks to Nial Ross and it 
would make sense to bring the Pharo port up to date.

Thanks
T.




[Pharo-users] Glorp on Pharo 4

2015-01-19 Thread Craig
Hi All,

I see that Sven is active on this list.  I've tried to use his excellent
tutorial on his "concerning-pharo" blog to understand Glorp and to get my
own instance of the demo app running on Pharo 4 and Postgres.

I have not burnt a lot of time on this yet, but I would like to know if this
combination of technologies is known to work anywhere.  I have not yet got
it working.

Craig






Re: [Pharo-users] Alternate browser

2014-12-03 Thread Craig Johnson
> I'm cleaning up a lot of small issues I had with it as I write (mostly 
> refreshing/deselection issues 
> when redefining/renaming classes).
>
> I'm done with the pharo3.0 branch on github; I'm now merging those into the 
> pharo4.0 branch with git 
> (i.e. merging with git on the command line without Monticello merge).
>
> Just tell how it goes for you; even if this is not the browser you like, 
> your feedback will tell us where we can improve.

Thierry

A few comments on my side.  Running AltBrowser Stable in Pharo 4 under Windows.
* In the code pane - the short-cut key - Meta-S for Save - resets the dirty 
code indicator, but does not actually save the code, using the context menu 
does.
* Trying to open the Window Menu causes a warning - 
"MenuMorph>>add:target:action: is depreciated"

Craig






Re: [Pharo-users] Alternate browser

2014-11-27 Thread Craig
Thanks Sven,

Never mind.  I just installed the September 25 VM and AltBrowser now works just 
fine :)

Craig

-Original Message-
From: Craig [mailto:cr...@hivemind.net] 
Sent: 27 November 2014 10:11 AM
To: 'Any question about pharo is welcome'
Subject: RE: [Pharo-users] Alternate browser

Hi Sven,

My VM is Cog VM 4.0.0 (release)

Craig

-Original Message-
From: Pharo-users [mailto:pharo-users-boun...@lists.pharo.org] On Behalf Of 
Sven Van Caekenberghe
Sent: 27 November 2014 10:06 AM
To: Any question about pharo is welcome
Subject: Re: [Pharo-users] Alternate browser

You do not have to install anything extra inside the image, Zodiac is a 
standard part of Pharo.

But, as the error says 'plugin missing', you do need to use a VM with the SSL 
plugin, like a normal Pharo VM.

Which VM/platform are you using ?




Re: [Pharo-users] Alternate browser

2014-11-27 Thread Craig
Hi Sven,

My VM is Cog VM 4.0.0 (release)

Craig

-Original Message-
From: Pharo-users [mailto:pharo-users-boun...@lists.pharo.org] On Behalf Of 
Sven Van Caekenberghe
Sent: 27 November 2014 10:06 AM
To: Any question about pharo is welcome
Subject: Re: [Pharo-users] Alternate browser

You do not have to install anything extra inside the image, Zodiac is a 
standard part of Pharo.

But, as the error says 'plugin missing', you do need to use a VM with the SSL 
plugin, like a normal Pharo VM.

Which VM/platform are you using ?




Re: [Pharo-users] Alternate browser

2014-11-26 Thread Craig
So, I would like to look at AltBrowser, but when I try to install it in a Pharo 
4 image I get an exception “ZdcPluginMissing: SSL/TLS plugin initialization 
failed”  Any ideas on where to find it?

 

I’ve already tried installing Zodiac, Zinc-Zodiac and SqueakSSL and still no 
plugin.

 

Craig

 

 

 

From: Pharo-users [mailto:pharo-users-boun...@lists.pharo.org] On Behalf Of 
kilon alios
Sent: 27 November 2014 12:28 AM
To: Any question about pharo is welcome
Subject: Re: [Pharo-users] Alternate browser

 

"Kilon is looking to see if he can build one. I believe he can :)"

 

I wont be building one from scratch , I like your AltBrowser too much to do 
that. You basically took the 4 panels of the System Browser and reduced them to 
2 panels. My goal will be to reduce them to one panel .For that to happens I 
already forked your browser and I will adding small changes here and there. 

 

I am also interested how to make text code more visual, think of it like adding 
halos to code itself. I am very interested into visual coding. Other ideas I 
have is dynamic documentation inside the same panel and also the ability to tag 
methods and classes for easier browsing. So mine will be just an extension to 
yours. One step at a time and see where it takes me. 



Re: [Pharo-users] Package Browser

2014-10-22 Thread Craig
Hans,

Welcome to Pharo.

The simplest way that I've found to do this is to "File Out" the class.  Simply 
right-click on the class and select file-out  This gives you a text file on the 
disk which you can open in a normal text editor and print.  Look for a new file 
in the same directory as your image called .st.

Craig


-Original Message-
From: Pharo-users [mailto:pharo-users-boun...@lists.pharo.org] On Behalf Of 
Hans Schueren
Sent: 22 October 2014 11:49 AM
To: pharo-users@lists.pharo.org
Subject: [Pharo-users] Package Browser

Hallo fellows,

i have just started with smalltalk programming Pharo.

Could you help me in one question please ?

Its simple :

After already performed a own NEW CLASS in the class browser ,

it is very convenient to PRINT OUT the complete Class ,

together with protokoll and methods in a  LIST FORM ,

in HARD COPY on a Printer.


Just to "have" the class and see it on real paper.


I couldnt find any advice in books or help.




regards

Hans









Re: [Pharo-users] GUI Frameworks Choice

2014-10-19 Thread Craig
From: stepharo

>Hi craig
>
>The examples are in the class WidgetExample or ExampleWidget. Now we are not 
>happy from a design point of view of having all these widgets creation on 
>UITheme.
>You can also use Spec. There is a draft of chapters on 
>https://ci.inria.fr/pharo-contribution/job/PharoForTheEnterprise/838/artifact/
>
>Stef


Thanks Stef, this documentation will make it lot easier to use Spec.

Craig








[Pharo-users] GUI Frameworks Choice

2014-10-17 Thread Craig
Hi All,

I'm new to Pharo although not to Smalltalk.  I did dabble with Dolphin about 20 
years ago, when it was first being developed, and did some quite cool stuff.

This time around I chose Pharo because I feel that Dolphin has strayed from the 
pure OO model that I enjoyed back then.

I've chosen a fairly ambitious GUI project as my Pharo primer.  The problem is 
- which GUI framework to use.  The GUI that I want to build will be static but 
complex with a menu, 2 toolbars, 20 odd toolbar buttons, and 3 (dockable?) 
windows, containing Trees, lists and text editors.

Any suggestions on which GUI framework would suit?

I thought about using PolyMorph, but I cannot find the examples in my Pharo 3 
image.

Craig