<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Hi Christian,<br>
<br>
On 3/3/2024 11:13 AM, Christian Haider via Cuis-dev wrote:
<blockquote
cite="mid:01af01da6d74$f6cd1400$e4673c00$@christianhaider.de"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
<meta name="Generator" content="Microsoft Word 15 (filtered
medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
font-size:11.0pt;
font-family:"Calibri",sans-serif;
mso-ligatures:standardcontextual;
mso-fareast-language:EN-US;}
span.E-MailFormatvorlage17
{mso-style-type:personal-compose;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
mso-fareast-language:EN-US;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:70.85pt 70.85pt 2.0cm 70.85pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
<div class="WordSection1">
<p class="MsoNormal">Hi all,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span lang="EN-US">I am getting a bit into
Cuis with trying to port some Values stuff.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">One oddity I found is
that literal arrays have an extra space in their
#storeString :<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">#(1 2 3) storeString
-> ‘#(1 2 3 )’<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">#($a 42 ‘abc’)
storeString -> ‘#($a 42 ‘abc’ )’<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">In contrast,
#printString behaves as expected (without trailing blank):<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">#(1 2 3) printString
-> ‘#(1 2 3)’<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">#($a 42 ‘abc’)
printString -> ‘#($a 42 ‘abc’)’<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Could the implementation
be changed to something like:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Array>>storeOn:
aStream <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> "Use the
literal form if possible."<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> self
isLiteral<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">
ifTrue: [<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">
aStream nextPut: $#; nextPut: $(.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">
self do: [ :element | element storeOn: aStream] separatedBy:
[aStream space].<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">
aStream nextPut: $)]<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">
ifFalse: [super storeOn: aStream]<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">With this change, all
tests (1955) from the BaseImageTests package pass, but I
don’t know if other code depends on this.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">This would allow me to
drop an ugly work-around in the Values code.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Happy hacking,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Christian<o:p></o:p></span></p>
</div>
</blockquote>
<br>
While I think that it would be better not to depend on such details,
I agree that your version is better and nicer.<br>
<br>
Just pushed it as an update.<br>
<br>
Thanks,<br>
<pre class="moz-signature" cols="72">--
Juan Vuletich
cuis.st
github.com/jvuletich
researchgate.net/profile/Juan-Vuletich
independent.academia.edu/JuanVuletich
patents.justia.com/inventor/juan-manuel-vuletich
linkedin.com/in/juan-vuletich-75611b3
twitter.com/JuanVuletich</pre>
</body>
</html>