[Cuis-dev] Proposal. make Utils setAuthor scriptable

Gerald Klix cuis.01 at klix.ch
Thu Aug 5 02:51:39 PDT 2021


Hi Nicola,

On 8/5/21 10:21 AM, Nicola Mingotti via Cuis-dev wrote:
> 
> Hi Gerald,
> 
> Oh, cool, I did not know about 'classPool' , that goes into my notes ;)
> Thank you !
While are at it, it probably makes sense to add a note
about #instVarNamed: #instVarNamed:put:. These methods/messages
lend themselves to similar hacks.
> 
> I noticed your Cy-d-Fect, by heart, that is the AlissaHacker and 
> LouisReasoner brother ;)
> One of the greatest technical book I red, about 20y ago.
Oh yes and as important as that and less noticed:
Its German translation is as good as the English original,
which is rarely the case for that sort of book.
> 
> Can you give me a very short description of what Haver does ?
> I see it is related to modules, as used in Python .
In a nutshell:
It's Cuis with Modules.


Long story:

It consists of a Cuis patch
(https://hg.sr.ht/~cy-de-fect/HaverOnCuis/browse/environments/coreChanges)
and some packages that add environments and
environment local symbols to Cuis.
This part of the system provides the basis
for adding arbitrary environment/module
systems to Cuis. It also comes with
two simple environment implementations
that may serve as an example and are used to bootstrap
Haver's module system. (There is a Modules>#Modules module)
See: https://hg.sr.ht/~cy-de-fect/HaverOnCuis/browse/environments

The module implementation has
some superficial similarity with Python's modules.
Haver actually provides as simplified version of R6RS' module system.
I left out some esoteric features like prefixing imported symbols.
OTH I added named groups/sets of exported symbols I dubbed "interfaces".
Another difference to Scheme's module system is the fact
that exported symbols don't need to be read-only.
If you bind an exported symbol to a new value,
every importing module will see the change.
Discovering the implementation details is left to
the reader as an exercise :»]

> I see it is an 
> extension to Cuis, not a fork.
> What problem does it solve ? [ feel free to compare to Python, i am 
> familiar with it]
I wanted a module system like those in common programming
languages like Python/Java/Module(2|3), while making still possible
to implement Environments as they exist (and being ignored
most of the time) in Squeak.
> I can't dive into it right now, but just to know what can be done ;)
I the course of implementing the Module tools
(https://hg.sr.ht/~cy-de-fect/HaverOnCuis/browse/haver/modules)
I also implemented some UI/actions stuff to make thinks easier
for me:
https://hg.sr.ht/~cy-de-fect/HaverOnCuis/browse/haver/actions
https://hg.sr.ht/~cy-de-fect/HaverOnCuis/browse/haver/ui

There are also tools to repackage Cuis/Haver into a ZIP-file:
https://hg.sr.ht/~cy-de-fect/HaverOnCuis/browse/haver/packaging

Various experiments like:

In memory transactions:
https://hg.sr.ht/~cy-de-fect/HaverOnCuis/browse/haver/transactions

The beginning of an OODB/object-store:
https://hg.sr.ht/~cy-de-fect/HaverOnCuis/browse/haver/db

and other sundry stuff.

I also added themes, especially for syntax/highlighting
that makes reading code easier (for me).
Some hacks have the same purpose:
https://hg.sr.ht/~cy-de-fect/HaverOnCuis/browse/haver/Haverize.pck.st#L390


HTH and Best Regards,

Gerald


> 
> 
> bye
> Nicola
> 
> 
> 
> 
> 
> 
> 
> On 8/5/21 8:41 AM, Gerald Klix wrote:
>> Yeah that would be nice.
>> In the meanwhile you can hack around that missing method this way:
>>
>> --- snip ---
>>     Utilities classPool
>>         at: #AuthorName  put: 'Gerald Klix (Haver)';
>>         at: #AuthorInitials put: 'KLG'.
>> --- snap ---
>>
>> Taken from:
>> https://hg.sr.ht/~cy-de-fect/HaverOnCuis/browse/haver/Haverize.pck.st?rev=tip#L77 
>>
>>
>>
>> HTH and Best Regards,
>>
>> Gerald
>>
>>
>> On 8/5/21 12:03 AM, Nicola Mingotti via Cuis-dev wrote:
>>> Hi,
>>>
>>> I would like to set my initials and user name from
>>> the script .st file at image boot.
>>>
>>> As far as I can say, these values are stored into Utils
>>> class variables and the only way to set them is using 'setAuthor'
>>> which require graphical interaction.
>>>
>>> Is there another way to set them ?
>>>
>>> If not, I propose you to implement a method 'setAuthorName: aString 
>>> initials: aString'.
>>>
>>> Let me know what you think.
>>>
>>> Bye
>>> Nicola
>>>
>>>
>>>
>>>
> 


More information about the Cuis-dev mailing list