Re: strings

Michał "phoe" Herda via Sbcl-help <[email protected]> Tue, 30 Jun 2026 07:55:35 +0200
Newsgroups gmane.lisp.steel-bank.general
Message-ID <[email protected]>
--===============4669437814600376640==
Content-Type: multipart/alternative;
 boundary="=_3694bcf5426d35dae7cb0d3ad5bb9077"

--=_3694bcf5426d35dae7cb0d3ad5bb9077
Content-Transfer-Encoding: 8bit
Content-Type: text/plain; charset=UTF-8;
 format=flowed

It should still be working. This is a compiler optimization note (most 
likely present due to OPTIMIZE SPEED), not a warning or an error.

The compiler is trying to optimize for a more performant case, but 
cannot infer if a string is a simple-base-string (for which an 
optimization exists), hence it produces a note for the programmer that 
_maybe_ further optimization is possible.

As for "what the hell is a simple-base string", see 
http://www.ai.mit.edu/projects/iiip/doc/CommonLISP/HyperSpec/Body/typ_simple-base-string.html

A string _is_ an array of letters - or characters. Specifically, it is 
specialized to hold characters only, and is one-dimensional.

Please feel free to play around with commercial Lisps - ACL and 
LispWorks both have free trial options.

W dniu 2026-06-30 07:45, Steve G napisał(a):

> TINFO> (compile-file "terminfo")
> ; compiling file "/home/steve/common-lisp/ed/terminfo.lisp" (written 30 
> JUN 2026 01:35:45 AM):
> 
> ; file: /home/steve/common-lisp/ed/terminfo.lisp
> ; in: DEFUN ANYNAME-TO-INFONAME
> ;     (SETQ TERMINAL-INFORMATION::NAME (SYMBOL-NAME 
> TERMINAL-INFORMATION::NAME))
> ;
> ; note: deleting unreachable code
> 
> ; in: DEFUN FULLNAME-TO-INFONAME
> ;     (STRING=
> ;      (TERMINAL-INFORMATION::TERMSEQ-FULLNAME (CAR 
> TERMINAL-INFORMATION::PTR))
> ;      TERMINAL-INFORMATION::FULLNAME)
> ;
> ; note: unable to
> ;   optimize
> ; due to type uncertainty:
> ;   The first argument is a STRING, not a SIMPLE-BASE-STRING.
> ;   The second argument is a STRING, not a SIMPLE-BASE-STRING.
> 
> this software was working before unicode, then it stopped working, then 
> it started working, and goto 1.
> 
> What the hell is a simple-base string?
> 
> string = vector of letters
> 
> simple-string = vector of letters with no offset and not adjustable
> 
> simple-base-string = every other month problem.
> 
> can someone tell me why string is not an appropriate type for the 
> vector "am".
> 
> Please do not tell me to use and array of letters, and I do not want 
> your ANSI answer; I want a real answer.
> 
> seriously I've been working on this program for years ; is it time to 
> try a commercial vendor?
> 
> _______________________________________________
> Sbcl-help mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/sbcl-help
--=_3694bcf5426d35dae7cb0d3ad5bb9077
Content-Transfer-Encoding: 8bit
Content-Type: text/html; charset=UTF-8

<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /></head><body style='font-size: 10pt; font-family: Verdana,Geneva,sans-serif'>
<p>It should still be working. This is a compiler optimization note (most likely present due to OPTIMIZE SPEED), not a warning or an error.</p>
<p>The compiler is trying to optimize for a more performant case, but cannot infer if a string is a simple-base-string (for which an optimization exists), hence it produces a note for the programmer that _maybe_ further optimization is possible.</p>
<p>As for "what the hell is a simple-base string", see <a href="http://www.ai.mit.edu/projects/iiip/doc/CommonLISP/HyperSpec/Body/typ_simple-base-string.html">http://www.ai.mit.edu/projects/iiip/doc/CommonLISP/HyperSpec/Body/typ_simple-base-string.html</a></p>
<p>A string _is_ an array of letters - or characters. Specifically, it is specialized to hold characters only, and is one-dimensional.</p>
<p>Please feel free to play around with commercial Lisps - ACL and LispWorks both have free trial options.</p>
<p id="reply-intro">W dniu 2026-06-30 07:45, Steve G napisał(a):</p>
<blockquote type="cite" style="padding: 0 0.4em; border-left: #1010ff 2px solid; margin: 0">
<div class="pre" style="margin: 0; padding: 0; font-family: monospace"><br />TINFO&gt; (compile-file "terminfo")<br />; compiling file "/home/steve/common-lisp/ed/terminfo.lisp" (written 30 JUN 2026 01:35:45 AM):<br /><br />; file: /home/steve/common-lisp/ed/terminfo.lisp<br />; in: DEFUN ANYNAME-TO-INFONAME<br />;&nbsp; &nbsp; &nbsp;(SETQ TERMINAL-INFORMATION::NAME (SYMBOL-NAME TERMINAL-INFORMATION::NAME))<br />;<br />; note: deleting unreachable code<br /><br />; in: DEFUN FULLNAME-TO-INFONAME<br />;&nbsp; &nbsp; &nbsp;(STRING=<br />;&nbsp; &nbsp; &nbsp; (TERMINAL-INFORMATION::TERMSEQ-FULLNAME (CAR TERMINAL-INFORMATION::PTR))<br />;&nbsp; &nbsp; &nbsp; TERMINAL-INFORMATION::FULLNAME)<br />;<br />; note: unable to<br />;&nbsp; &nbsp;optimize<br />; due to type uncertainty:<br />;&nbsp; &n
 bsp;The first argument is a STRING, not a SIMPLE-BASE-STRING.<br />;&nbsp; &nbsp;The second argument is a STRING, not a SIMPLE-BASE-STRING.<br /><br />this software was working before unicode, then 
 it stopped working, then it started working, and goto 1.<br /><br />What the hell is a simple-base string?<br /><br />string = vector of letters<br /><br />simple-string = vector of letters with no offset and not adjustable<br /><br />simple-base-string = every other month problem.<br /><br />can someone tell me why string is not an appropriate type for the vector "am".<br /><br />Please do not tell me to use and array of letters, and I do not want your ANSI answer; I want a real answer.<br /><br />seriously I've been working on this program for years ; is it time to try a commercial vendor?<br /><br /><br /></div>
<br />
<div class="pre" style="margin: 0; padding: 0; font-family: monospace">_______________________________________________<br />Sbcl-help mailing list<br /><a href="mailto:[email protected]">[email protected]</a><br /><a href="https://lists.sourceforge.net/lists/listinfo/sbcl-help" target="_blank" rel="noreferrer noopener">https://lists.sourceforge.net/lists/listinfo/sbcl-help</a></div>
</blockquote>
<p><br /></p>

</body></html>

--=_3694bcf5426d35dae7cb0d3ad5bb9077--


--===============4669437814600376640==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline


--===============4669437814600376640==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Sbcl-help mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sbcl-help

--===============4669437814600376640==--