[Cuis-dev] Some questions on The Cuis Book & other questions

Hilaire Fernandes hfern at free.fr
Tue Feb 21 12:56:40 PST 2023


Hi Ignacio,

Thanks for your feedback!

Le 21/02/2023 à 13:25, Ignacio Sniechowski via Cuis-dev a écrit :
> /"Note.We wrote earlier a string is a collection of characters. It is 
> true for byte string, where each character is encoded with a byte – a 
> byte string. However since 2023, the default string format for 
> Cuis-Smalltalk is Unicode (UTF-8) where each character can be encoded 
> with 1, 2, 3 or 4 bytes. Therefore it is immutable and can not be 
> indexed, it can be converted as byte string with the 
> message#asByteString."/
>
> From here I understand that the first example should not work, unless 
> -which is probably the case here- I'm misunderstanding the  part 
> "Therefore, it is immutable and *can not be indexed*, it can be 
> converted..."
>
> 'Hello' at: 1⇒$H
> 'Hello' asByteString at: 5⇒$o
>
Yep, the sentence is not really accurate. Will it be better as "it is 
immutable and *can not be indexed properly"?
*

And a better example to expose it:

'sur' at: 3 $r
'sûr' at: 3 $^ (unicode code point value 770)

Advice please, so I can update the book accordingly.


> The other question is related to shortcuts in SmalltalkEditor, I find 
> the shortcut Cmd - " very useful for quoting results of chunks of code 
> in the workspace. This works when the keyboard is in

Is your host a Mac, I guess so as mentioned Cmd.

Could be an issue related to the VM. Om my Linux box with an us 
international keyboard, I can comment chunk of code with the keyboard 
combinaision Ctrl-Alt-Shift-["] (on my setup I have to do Alt-Shift to 
access directly the " character, otherwise it will try to compose with 
other character latter on.

May be take a look at your VM options.

Hilaire

-- 
GNU Dr. Geo
http://drgeo.eu
http://blog.drgeo.eu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20230221/32a920c4/attachment.htm>


More information about the Cuis-dev mailing list