[Pharo-users] Willow selections

2020-06-08 Thread Tomaž Turk

Hi,

when using selection components in Willow (like single and multiple 
selection lists), should #currentSelection and #currentSelectionIfNone: 
be called only within their own affordances? If I use these messages 
from onTrigger evaluate: of other components (e. g. buttons), then I 
don't get any selected object back.


Thanks and best wishes,
Tomaz



Re: [Pharo-users] Pharo on Chromebook

2020-06-08 Thread Stéphane Ducasse
Thanks Olivier 
You do not experiment UI glitches so this means that it probably depend on the 
OS version. 

S

> On 8 Jun 2020, at 09:22, olivier auverlot  wrote:
> 
> Hi,
> 
> The leaders of the Chromebooks are Asus, Acer and HP. I recommend you to 
> choose a recent model  with a powerfull x86 processor. Them support Chrome 
> apps, Android apps and Crostini for Linux apps. This last mode allows running 
> Pharo on Chrome OS. Avoid the low cost Chromebooks. The middle price for a 
> good computer is around 600-700 euros.
> 
> In my case, I own a HP x360 14 (i5, 8 Go ram, 64 Go SSD, tactile screen, very 
> good autonomy, backlight keyboard and very beautifull computer). 
> 
> The best vendor in France is Gowizyou that is a Google official partner 
> (https://gowizyou.com ). They are very serious and 
> work with administrations, schools, etc. You can buy online on the Gowizyou 
> store.
> 
> Best regards
> Olivier ;-)
> 
> Le lun. 8 juin 2020 à 07:58, Stéphane Ducasse  > a écrit :
> I think that we will have to buy one of such device.
> What would be a good choice?
> I know Olivier runs pharo on his without problem,
> @olivier which Chrome book do you suggest us to buy?
> 
> S.
> 
>> On 8 Jun 2020, at 00:40, tbrunz > > wrote:
>> 
>> Hi Pablo,
>> 
>> I'm seeing the same thing on a Chromebook "Pixelbook" Crostini (Linux)
>> container: 
>> 
>> Debian v9 ("stretch"), Linux kernel 4.9.0-12, recently updated.  The system
>> has 8GB RAM & 128GB SSD.
>> 
>> The ChromeOS version in 81.0.4044.141.
>> 
>> I'm running the latest Pharo Launcher, 2.0-2020.04.07, VM 5.0-202002121043.
>> 
>> Just opening Pharo Launcher, and without even launching an image, I'm seeing
>> the same tearing and rendering problems as Jan.  If I open the Settings
>> dialog, it partially renders, and when I try to move the window, I get the
>> tearing behavior.
>> 
>> And I was also able to run PL & images on this platform without problems in
>> the past.  (It's been at least a month since I tried running Pharo on a
>> Chromebook.)
>> 
>> -Ted
>> 
>> 
>> 
>> 
>> --
>> Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html 
>> 
>> 
> 
> 
> Stéphane Ducasse
> http://stephane.ducasse.free.fr  / 
> http://www.pharo.org  
> 03 59 35 87 52
> Assistant: Aurore Dalle 
> FAX 03 59 57 78 50
> TEL 03 59 35 86 16
> S. Ducasse - Inria
> 40, avenue Halley, 
> Parc Scientifique de la Haute Borne, Bât.A, Park Plaza
> Villeneuve d'Ascq 59650
> France
> 


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



Re: [Pharo-users] Pharo on Chromebook

2020-06-08 Thread teso...@gmail.com
Hi, I have tested with CloudReady (another variation of Chromium OS)
but I couldn't reproduce the error. Maybe there is a problem with the
latest version of Chrome OS (that of course is not the same).

On Mon, Jun 8, 2020 at 8:25 AM Stéphane Ducasse
 wrote:
>
> I think that we will have to buy one of such device.
> What would be a good choice?
> I know Olivier runs pharo on his without problem,
> @olivier which Chrome book do you suggest us to buy?
>
> S.
>
> On 8 Jun 2020, at 00:40, tbrunz  wrote:
>
> Hi Pablo,
>
> I'm seeing the same thing on a Chromebook "Pixelbook" Crostini (Linux)
> container:
>
> Debian v9 ("stretch"), Linux kernel 4.9.0-12, recently updated.  The system
> has 8GB RAM & 128GB SSD.
>
> The ChromeOS version in 81.0.4044.141.
>
> I'm running the latest Pharo Launcher, 2.0-2020.04.07, VM 5.0-202002121043.
>
> Just opening Pharo Launcher, and without even launching an image, I'm seeing
> the same tearing and rendering problems as Jan.  If I open the Settings
> dialog, it partially renders, and when I try to move the window, I get the
> tearing behavior.
>
> And I was also able to run PL & images on this platform without problems in
> the past.  (It's been at least a month since I tried running Pharo on a
> Chromebook.)
>
> -Ted
>
>
>
>
> --
> Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html
>
>
> 
> Stéphane Ducasse
> http://stephane.ducasse.free.fr / http://www.pharo.org
> 03 59 35 87 52
> Assistant: Aurore Dalle
> FAX 03 59 57 78 50
> TEL 03 59 35 86 16
> S. Ducasse - Inria
> 40, avenue Halley,
> Parc Scientifique de la Haute Borne, Bât.A, Park Plaza
> Villeneuve d'Ascq 59650
> France
>


-- 
Pablo Tesone.
teso...@gmail.com



[Pharo-users] Youtube REST API?

2020-06-08 Thread Stéphane Ducasse
Hello 

Does any of you already used the youtube REST API?

S.

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



Re: [Pharo-users] Willow selections

2020-06-08 Thread Gabriel Cotelli
Hi Tomaz,

First check that your selection component is not created in every render
cycle, so it can hold its state between calls. Usually components holding
state must be kept in instance variables in the containing component,
initialized once and rendered many times.

Second, the selection state needs to be serialized so it's available in the
server. Some affordances (like #determineBehaviorByEvaluating:) applied on
the selection component automatically serializes the content but others
not. You can check it by looking at the affordances you're using and
locating the WebInteractionCommand being applied. Each command responds to
#requiresSerialization indicating if it will automatically serialize the
content of the triggered component or not. (This deserves a better
explanation in the docs, I will create an issue to not forget).

In case you're using an affordance not doing automatic serialization or if
you want the state to be synchronized  when another component is triggered,
you need to use some of the serialization affordances (check
WebInteractionInterpreter). Depending on the interactivity level you want
is the serialization strategy you should use.

Now in your case it depends on what you are trying to accomplish. If you
want the selection to be available as soon as possible, you need to use
serializeIt or serializeWithHiddenInputs if no other affordance is doing
the automatic serialization when triggering the selection. If you want to
do fewer server calls (and for example just send everything on a single
call when a button is clicked) you need to serialize the form containing
the selection components when triggering the button.

Hope it helps.
Gabriel

On Mon, Jun 8, 2020 at 4:52 AM Tomaž Turk  wrote:

> Hi,
>
> when using selection components in Willow (like single and multiple
> selection lists), should #currentSelection and #currentSelectionIfNone: be
> called only within their own affordances? If I use these messages from
> onTrigger evaluate: of other components (e. g. buttons), then I don't get
> any selected object back.
>
> Thanks and best wishes,
> Tomaz
>
>
>


Re: [Pharo-users] Few newbie questoins about Pharo/Smalltalk capabilities

2020-06-08 Thread webwarrior
Well, one thing that might disappoint you in Pharo is UI libraries.
You'd assume that system that has UI as integral part and relies on it would
have excellent UI framework, but sadly that's not the case.
Old framework - Morphic - is outdated; it's buggy, poorly documented, and
its code is convoluted and hard to reason about. I'd say it has been
abandoned (not supported) for the most part.
New framework (actually 2 frameworks on top of each other) - Bloc/Brick - is
not ready yet. Well, at least actual UI library (Brick).

 
gustav_m wrote
> Also, as a hobby I'd like to try some (3.) generative art and (4.) agent
> based modeling. Is Pharo suitable for this kind of things?
> From what I saw and read it may be good choice for ABM, but some people
> cry
> about Smalltalk being slow. So maybe I'd be wiser to learn Processing (for
> 3) and NetLogo (for 4) instead. This would be unfortunate as these are two
> another technologies to learn.

Pharo's performance is somewhere between classic interpreters (CPython, Lua,
...) and state-of-the-art JIT compilers (JavaScript V8, LuaJIT, ...).
Whether it's slow is a matter of perspective.

But 2 important thing should be noted:

1. If you are doing graphics stuff, a large share of CPU time is spent
drawing graphic primitives, which is done using native library (e.g. Cairo)
and has little to do with language runtime's performance.

2. To optimize performance, profiler is the most important tool. Pharo has
built-in profiler that you can use for any code at any time (even profile
all stuff that's happening right now). Processing IDE, on the other hand,
doesn't even have a profiler.



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



Re: [Pharo-users] Willow selections

2020-06-08 Thread Tomaž Turk

Dear Gabriel,

thanks for the answer, it helps tremendously.

Best wishes,
Tomaž

[Pharo-users] Willow vs Seaside

2020-06-08 Thread Vitor Medina Cruz
Hello,

What's is the difference? Why should I use one or another?

Regards,
Vitor


[Pharo-users] PharoJS for Pharo 8 is out

2020-06-08 Thread Noury Bouraqadi
Thanks to Ivo Roefs and Dave Mason :-)

Noury




[Pharo-users] PharoJS now runs on Pharo 8 :-)

2020-06-08 Thread N. Bouraqadi
Thanks to Ivo Roefs and Dave Mason !

Noury



Re: [Pharo-users] Willow vs Seaside

2020-06-08 Thread Gabriel Cotelli
Hi Vitor,

Willow is built on top of Seaside and it aims to ease the creation of
interactive AJAX-based web applications. So if you're planning to do a lot
of partial page rendering via AJAX updates it's worth a try.
We're using it for several applications and the only full page refresh is
done on the first request reception, all the other interactions in the
application are handled by AJAX. One of its main features is to abstract
away a lot of the complexity of hand made AJAX calls.

You can take a look at the slides and videos of the last talk we do in the
subject to get an idea of when it's useful:
https://www.slideshare.net/FASTPresentations/willow-the-interaction-tour-by-maxi-tabacman

https://youtu.be/U6-JoPRcXHc

Feel free to ask any more questions here or on the discord channel.

Regards,
Gabriel

On Mon, Jun 8, 2020 at 12:42 PM Vitor Medina Cruz 
wrote:

> Hello,
>
> What's is the difference? Why should I use one or another?
>
> Regards,
> Vitor
>


Re: [Pharo-users] Pharo on Chromebook

2020-06-08 Thread tbrunz
No, it's not quite the same...  I've installed CloudReady on old
(non-Chromebook) systems myself, so I'm a little bit familiar with it and
what it can do.

However, I've never tried to run 'Crostini' in CloudReady, so I don't know
if that works, or (if it does), how well it parallels the implementation of
Crostini on Google Chromebooks.  I have read up some on how Google
implements a GUI interface to applications running in its Linux containers,
and it's not trivial.  (But it does work very well on Chromebooks -- you can
install a Linux app and have a clickable icon that appears just like any
other ChromeOS or Android app icon.)

And, yes, Crostini Linux containers give you a way to develop software on
Chromebooks!  Not only does Pharo work, but also other languages can be
installed.  (I'm running Pharo, Lua, and Lisp on my Pixelbook model.)

For those who are not familiar with CloudReady:  The company 'Neverware',
with Google's approval (and investment), took ChromeOS's open-source
foundation, Chromium OS, and built its own "Chromebook-like" version on top
of it called 'CloudReady'. 

It was designed for schools, to give their old PCs new life -- they can run
Google's 'G Suite for Education' while managing CloudReady PCs & laptops
with the 'Google Admin Console'.  Businesses, other organizations, and
individuals can use it too.  It's also free for individual users who don't
require Google Admin tools.

Like ChromeOS, CloudReady is updated every six weeks or so with security
fixes and new features.  And as with ChromeOS, to use CloudReady you must
have a Google account.  It not only runs on old WinTel systems, it runs on
Mac hardware as well.  

You can 'test drive' CloudReady on your system without installing it (or
wiping out your existing OS) by booting it from a USB thumb drive.  If you
decide you like it, you can later overwrite your system's OS by installing
it to disk.  Be aware that it will "take over" your entire drive and
restrict the ways you can access it.  (Crostini significantly opens up how
you can use your disk space, since it basically implements a full Linux file
system inside its container.)

Here's a recent, detailed article on CloudReady, which includes procedures
on how to make a bootable USB thumb drive, test drive it, and install it: 
https://www.zdnet.com/article/how-to-switch-from-windows-7-to-chrome-os-cloudready/

-t



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



Re: [Pharo-users] Pharo on Chromebook

2020-06-08 Thread tbrunz
It's important to get a Chromebook with an Intel CPU.  The ARM-based
Chromebooks cannot run Crostini, so they do not have the option of running
Linux containers -- so, no Pharo on ARM Chromebooks!

Also, it's important to get a later model, in order to get a Linux kernel
that supports containers on Chromebooks.  Google does NOT update the Linux
kernel in ChromeOS; it updates everything else, but not the kernel version. 
Be sure to get a model that is known to support Linux containers.

(The reason is that Google heavily modifies the Linux kernel to support
Chromebook hardware, and they don't have a good, automated system for
applying & testing their modifications to later kernel versions.  So.. no
kernel updates -- only packages & applications get updates.)

Newer Chromebook models have newer kernels; only newer kernels include
container support, enabling them to run Pharo.  But of course, since you
will, in effect, be running two OSes on the system, you will want a more
powerful CPU, more memory, and more SSD storage.

As Olivier correctly points out, you should get a middle-level or
upper-level Chromebook for this.  I have a Google Pixelbook (the lowest of 3
versions) and it runs everything smoothly.  His HP x360 14 is a very good
model as well.  Today there are many powerful Chromebooks to choose from. 
Just be aware of the considerations above.

One more thing:  Chromebooks not only run ChromeOS and "web apps", and now
run Android apps, and with Crostini run Linux apps, you can install Wine (or
Crossover) in Crostini and run Windows apps as well.  (Everything except Mac
apps.)

-t



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