Rocksolid Light

News from da outaworlds

mail  files  register  groups  login

Message-ID:  

BOFH excuse #70: nesting roaches shorted out the ether cable


comp / comp.unix.questions / Re: xterm rlwrap sbcl

SubjectAuthor
* xterm rlwrap sbclSalvador Mirzo
+* Re: xterm rlwrap sbclLawrence D'Oliveiro
|+* Re: xterm rlwrap sbclPaul
||`* Re: xterm rlwrap sbclSalvador Mirzo
|| `* Re: xterm rlwrap sbclPaul
||  +- Re: xterm rlwrap sbclGrant Taylor
||  `* Re: xterm rlwrap sbclSalvador Mirzo
||   `* Re: xterm rlwrap sbclSalvador Mirzo
||    `* Re: xterm rlwrap sbclPaul
||     `- Re: xterm rlwrap sbclSalvador Mirzo
|`- Re: xterm rlwrap sbclSalvador Mirzo
+* Re: xterm rlwrap sbclOregonian Haruspex
|`- Re: xterm rlwrap sbclPaul
+* Re: xterm rlwrap sbclEli the Bearded
|`- Re: xterm rlwrap sbclSalvador Mirzo
`* Re: xterm rlwrap sbclBozo User
 `- Re: xterm rlwrap sbclSalvador Mirzo

1
Subject: xterm rlwrap sbcl
From: Salvador Mirzo
Newsgroups: comp.unix.programmer, comp.unix.questions, comp.misc
Followup: comp.unix.questions
Organization: A noiseless patient Spider
Date: Thu, 12 Dec 2024 01:22 UTC
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: smirzo@example.com (Salvador Mirzo)
Newsgroups: comp.unix.programmer,comp.unix.questions,comp.misc
Subject: xterm rlwrap sbcl
Followup-To: comp.unix.questions
Date: Wed, 11 Dec 2024 22:22:28 -0300
Organization: A noiseless patient Spider
Lines: 46
Message-ID: <87frmtofu3.fsf@example.com>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Date: Thu, 12 Dec 2024 02:22:46 +0100 (CET)
Injection-Info: dont-email.me; posting-host="e88128b70b601236abbe8acbed1b8eee";
logging-data="1912341"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+5k8AeQXsUUCVPV6dsMnPJ7d3gi25ePas="
Cancel-Lock: sha1:r0hhCSw/9MNUjxluVUGWzNgznmU=
sha1:lETxUHAMnpEzp6A1tcJ21gJSxDk=
View all headers

I know next to nothing about terminals. My .profile says TERM=xterm.

$ echo $TERM
xterm

I really am running PuTTY on Windows and logging in to a FreeBSD system.

When I invoke ``rlwrap sbcl'', I get a little bug:

--8<-------------------------------------------------------->8---
$ rlwrap sbcl
This is SBCL 2.4.9, an implementation of ANSI Common Lisp.
More information about SBCL is available at <http://www.sbcl.org/>.

SBCL is free software, provided as is, with absolutely no warranty.
It is mostly in the public domain; some portions are provided under
BSD-style licenses. See the CREDITS and COPYING files in the
distribution for more information.
* (f(format t "hello~%")
hello
NIL
--8<-------------------------------------------------------->8---

Of course, I typed

(format t "hello~%")

but we end up seeing

(f(format t "hello~%")

If I type

(write-string "hello")

we end up with

* (w(write-string "hello")
hello
"hello"

You get the idea. This doesn't happen with other programs. It seems to
be something specific to sbcl, though I could hardly believe that sbcl
is guilty of anything here.

Any remedies?

Subject: Re: xterm rlwrap sbcl
From: Lawrence D'Oliv
Newsgroups: comp.unix.questions
Organization: A noiseless patient Spider
Date: Thu, 12 Dec 2024 06:05 UTC
References: 1
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: ldo@nz.invalid (Lawrence D'Oliveiro)
Newsgroups: comp.unix.questions
Subject: Re: xterm rlwrap sbcl
Date: Thu, 12 Dec 2024 06:05:44 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 42
Message-ID: <vjdufn$20g9u$1@dont-email.me>
References: <87frmtofu3.fsf@example.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Thu, 12 Dec 2024 07:05:44 +0100 (CET)
Injection-Info: dont-email.me; posting-host="f089114b1739cee2d645e6e434e62749";
logging-data="2113854"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX197IlLDvgc40/VNrxF2LVOm"
User-Agent: Pan/0.161 (Chasiv Yar; )
Cancel-Lock: sha1:+c554rvZsZ5XHB3aldvm2QzeMQU=
View all headers

On Wed, 11 Dec 2024 22:22:28 -0300, Salvador Mirzo wrote:

> $ echo $TERM
> xterm

Same here.

> I really am running PuTTY on Windows and logging in to a FreeBSD system.

I am running KDE Konsole on Linux to access a local shell.

> Of course, I typed
>
> (format t "hello~%")
>
> but we end up seeing
>
> (f(format t "hello~%")

My terminal window shows:

* (format t "hello~%")
hello
NIL

> If I type
>
> (write-string "hello")
>
> we end up with
>
> * (w(write-string "hello")
> hello
> "hello"

My terminal window shows:

* (write-string "hello")
hello
"hello"

Most likely suspect: Windows is the weakest link.

Subject: Re: xterm rlwrap sbcl
From: Paul
Newsgroups: comp.unix.questions
Organization: A noiseless patient Spider
Date: Thu, 12 Dec 2024 12:20 UTC
References: 1 2
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: nospam@needed.invalid (Paul)
Newsgroups: comp.unix.questions
Subject: Re: xterm rlwrap sbcl
Date: Thu, 12 Dec 2024 07:20:17 -0500
Organization: A noiseless patient Spider
Lines: 64
Message-ID: <vjeke1$24hao$1@dont-email.me>
References: <87frmtofu3.fsf@example.com> <vjdufn$20g9u$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
Injection-Date: Thu, 12 Dec 2024 13:20:21 +0100 (CET)
Injection-Info: dont-email.me; posting-host="6f8af7da0feb519e94ec411dfa2d5523";
logging-data="2245976"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+qeGIZQxt9b9s+gR4PaLPEZi04phrgJPg="
User-Agent: Ratcatcher/2.0.0.25 (Windows/20130802)
Cancel-Lock: sha1:eqX7WvqEzkQBHDqkDbaupQECjmM=
Content-Language: en-US
In-Reply-To: <vjdufn$20g9u$1@dont-email.me>
View all headers

On Thu, 12/12/2024 1:05 AM, Lawrence D'Oliveiro wrote:
> On Wed, 11 Dec 2024 22:22:28 -0300, Salvador Mirzo wrote:
>
>> $ echo $TERM
>> xterm
>
> Same here.
>
>> I really am running PuTTY on Windows and logging in to a FreeBSD system.
>
> I am running KDE Konsole on Linux to access a local shell.
>
>> Of course, I typed
>>
>> (format t "hello~%")
>>
>> but we end up seeing
>>
>> (f(format t "hello~%")
>
> My terminal window shows:
>
> * (format t "hello~%")
> hello
> NIL
>
>> If I type
>>
>> (write-string "hello")
>>
>> we end up with
>>
>> * (w(write-string "hello")
>> hello
>> "hello"
>
> My terminal window shows:
>
> * (write-string "hello")
> hello
> "hello"
>
> Most likely suspect: Windows is the weakest link.
>

This is the easiest thing I could wire up as a simulation
for those at home. Since I don't know a thing about LISP,
I can't very well address that part of the problem.

[Picture]

https://i.postimg.cc/9FVtm0S5/putty-ssh-session-overview.gif

The $TERM declaration and the color capability,
don't exactly match in my copy of PuTTY. The distortion
seen by the OP does not look like wrongly emitted
color codes, which could make more of a mess.
PuTTY is not declaring "xterm-256color" as the term type.

[Picture]

https://i.postimg.cc/QMtZRXsc/putty-settings.gif

Paul

Subject: Re: xterm rlwrap sbcl
From: Salvador Mirzo
Newsgroups: comp.unix.questions
Organization: A noiseless patient Spider
Date: Thu, 12 Dec 2024 16:00 UTC
References: 1 2 3
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: smirzo@example.com (Salvador Mirzo)
Newsgroups: comp.unix.questions
Subject: Re: xterm rlwrap sbcl
Date: Thu, 12 Dec 2024 13:00:30 -0300
Organization: A noiseless patient Spider
Lines: 89
Message-ID: <874j383n8h.fsf@example.com>
References: <87frmtofu3.fsf@example.com> <vjdufn$20g9u$1@dont-email.me>
<vjeke1$24hao$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Date: Thu, 12 Dec 2024 17:00:31 +0100 (CET)
Injection-Info: dont-email.me; posting-host="752c9c2a49550cd354fc63395edef8c0";
logging-data="4102702"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+OY0D5wDLhH/gd3GBFrm1sL2bHoS2DCxQ="
Cancel-Lock: sha1:NiG3SDvHT+eknm0PauO5SHdh+Gk=
sha1:fGrqP64TsJFG9njZ7G3cYfjyLJA=
View all headers

Paul <nospam@needed.invalid> writes:

> On Thu, 12/12/2024 1:05 AM, Lawrence D'Oliveiro wrote:
>> On Wed, 11 Dec 2024 22:22:28 -0300, Salvador Mirzo wrote:
>>
>>> $ echo $TERM
>>> xterm
>>
>> Same here.
>>
>>> I really am running PuTTY on Windows and logging in to a FreeBSD system.
>>
>> I am running KDE Konsole on Linux to access a local shell.
>>
>>> Of course, I typed
>>>
>>> (format t "hello~%")
>>>
>>> but we end up seeing
>>>
>>> (f(format t "hello~%")
>>
>> My terminal window shows:
>>
>> * (format t "hello~%")
>> hello
>> NIL
>>
>>> If I type
>>>
>>> (write-string "hello")
>>>
>>> we end up with
>>>
>>> * (w(write-string "hello")
>>> hello
>>> "hello"
>>
>> My terminal window shows:
>>
>> * (write-string "hello")
>> hello
>> "hello"
>>
>> Most likely suspect: Windows is the weakest link.
>>
>
> This is the easiest thing I could wire up as a simulation
> for those at home. Since I don't know a thing about LISP,
> I can't very well address that part of the problem.
>
> [Picture]
>
> https://i.postimg.cc/9FVtm0S5/putty-ssh-session-overview.gif
>
> The $TERM declaration and the color capability,
> don't exactly match in my copy of PuTTY. The distortion
> seen by the OP does not look like wrongly emitted
> color codes, which could make more of a mess.
> PuTTY is not declaring "xterm-256color" as the term type.
>
> [Picture]
>
> https://i.postimg.cc/QMtZRXsc/putty-settings.gif

I believe this is a FreeBSD thing. Using the same PuTTY and the same
Windows, but loging in on a GNU Debian system, I don't see any problems:

--8<-------------------------------------------------------->8---
%uname -a
Linux kontesti.me 6.2.9-x86_64-linode160 #1 SMP PREEMPT_DYNAMIC Wed Apr 5 15:30:32 EDT 2023 x86_64 GNU/Linux
%sbcl --version

SBCL 1.2.4.debian
%echo $TERM
xterm

%rlwrap sbcl
This is SBCL 1.2.4.debian, an implementation of ANSI Common Lisp.
More information about SBCL is available at <http://www.sbcl.org/>.

SBCL is free software, provided as is, with absolutely no warranty.
It is mostly in the public domain; some portions are provided under
BSD-style licenses. See the CREDITS and COPYING files in the
distribution for more information.
* (format t "hello~%")
hello
NIL
--8<-------------------------------------------------------->8---

Subject: Re: xterm rlwrap sbcl
From: Paul
Newsgroups: comp.unix.questions
Organization: A noiseless patient Spider
Date: Thu, 12 Dec 2024 23:57 UTC
References: 1 2 3 4
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: nospam@needed.invalid (Paul)
Newsgroups: comp.unix.questions
Subject: Re: xterm rlwrap sbcl
Date: Thu, 12 Dec 2024 18:57:45 -0500
Organization: A noiseless patient Spider
Lines: 109
Message-ID: <vjft9r$30pgt$1@dont-email.me>
References: <87frmtofu3.fsf@example.com> <vjdufn$20g9u$1@dont-email.me>
<vjeke1$24hao$1@dont-email.me> <874j383n8h.fsf@example.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
Injection-Date: Fri, 13 Dec 2024 00:57:52 +0100 (CET)
Injection-Info: dont-email.me; posting-host="ef94d2dca65e449f280bda5eb24e0316";
logging-data="3171869"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/x2yybgWgOTpxv0Tq5t2X9u3/OZ0MLBTI="
User-Agent: Ratcatcher/2.0.0.25 (Windows/20130802)
Cancel-Lock: sha1:mUG9amWHIPYE4UZ558GvBowQvVE=
Content-Language: en-US
In-Reply-To: <874j383n8h.fsf@example.com>
View all headers

On Thu, 12/12/2024 11:00 AM, Salvador Mirzo wrote:
> Paul <nospam@needed.invalid> writes:
>
>> On Thu, 12/12/2024 1:05 AM, Lawrence D'Oliveiro wrote:
>>> On Wed, 11 Dec 2024 22:22:28 -0300, Salvador Mirzo wrote:
>>>
>>>> $ echo $TERM
>>>> xterm
>>>
>>> Same here.
>>>
>>>> I really am running PuTTY on Windows and logging in to a FreeBSD system.
>>>
>>> I am running KDE Konsole on Linux to access a local shell.
>>>
>>>> Of course, I typed
>>>>
>>>> (format t "hello~%")
>>>>
>>>> but we end up seeing
>>>>
>>>> (f(format t "hello~%")
>>>
>>> My terminal window shows:
>>>
>>> * (format t "hello~%")
>>> hello
>>> NIL
>>>
>>>> If I type
>>>>
>>>> (write-string "hello")
>>>>
>>>> we end up with
>>>>
>>>> * (w(write-string "hello")
>>>> hello
>>>> "hello"
>>>
>>> My terminal window shows:
>>>
>>> * (write-string "hello")
>>> hello
>>> "hello"
>>>
>>> Most likely suspect: Windows is the weakest link.
>>>
>>
>> This is the easiest thing I could wire up as a simulation
>> for those at home. Since I don't know a thing about LISP,
>> I can't very well address that part of the problem.
>>
>> [Picture]
>>
>> https://i.postimg.cc/9FVtm0S5/putty-ssh-session-overview.gif
>>
>> The $TERM declaration and the color capability,
>> don't exactly match in my copy of PuTTY. The distortion
>> seen by the OP does not look like wrongly emitted
>> color codes, which could make more of a mess.
>> PuTTY is not declaring "xterm-256color" as the term type.
>>
>> [Picture]
>>
>> https://i.postimg.cc/QMtZRXsc/putty-settings.gif
>
> I believe this is a FreeBSD thing. Using the same PuTTY and the same
> Windows, but loging in on a GNU Debian system, I don't see any problems:
>
> --8<-------------------------------------------------------->8---
> %uname -a
> Linux kontesti.me 6.2.9-x86_64-linode160 #1 SMP PREEMPT_DYNAMIC Wed Apr 5 15:30:32 EDT 2023 x86_64 GNU/Linux
> %sbcl --version
>
> SBCL 1.2.4.debian
> %echo $TERM
> xterm
>
> %rlwrap sbcl
> This is SBCL 1.2.4.debian, an implementation of ANSI Common Lisp.
> More information about SBCL is available at <http://www.sbcl.org/>.
>
> SBCL is free software, provided as is, with absolutely no warranty.
> It is mostly in the public domain; some portions are provided under
> BSD-style licenses. See the CREDITS and COPYING files in the
> distribution for more information.
> * (format t "hello~%")
> hello
> NIL
> --8<-------------------------------------------------------->8---
>

I set up a FreeBSD 14.2 VM and at least in terms of termcap,
and $TERM ("xterm"), the results so far look the same as with
my attempt on Linux Mint VM.

The contents of the prompt definition on the freebsd account are the default:

$TERM "xterm"
$PS1 \u@\h:\w \$

And I doubt a locale definition could make that sort of pattern.
It sorta looks like a terminal "echo" problem but why does it only
happen for the first few characters of a line ?

Paul

Paul

Subject: Re: xterm rlwrap sbcl
From: Oregonian Haruspex
Newsgroups: comp.misc, comp.unix.programmer, comp.unix.questions
Followup: comp.unix.questions
Organization: A noiseless patient Spider
Date: Fri, 13 Dec 2024 07:03 UTC
References: 1
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: no_email@invalid.invalid (Oregonian Haruspex)
Newsgroups: comp.misc,comp.unix.programmer,comp.unix.questions
Subject: Re: xterm rlwrap sbcl
Followup-To: comp.unix.questions
Date: Fri, 13 Dec 2024 07:03:41 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 51
Message-ID: <vjgm8c$3999k$1@dont-email.me>
References: <87frmtofu3.fsf@example.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Fri, 13 Dec 2024 08:03:41 +0100 (CET)
Injection-Info: dont-email.me; posting-host="0fd1c0dd37bf7929aac0adce1ecefb9d";
logging-data="3450164"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/i71kxA3n/vTecjCoAHip2"
User-Agent: NewsTap/5.5 (iPad)
Cancel-Lock: sha1:tNbnrTraddRgaZ3ne16RMhGeC+E=
sha1:st9njsKfzM8dhPQDdQ4FJ7Hr+8Q=
View all headers

Salvador Mirzo <smirzo@example.com> wrote:
> I know next to nothing about terminals. My .profile says TERM=xterm.
>
> $ echo $TERM
> xterm
>
> I really am running PuTTY on Windows and logging in to a FreeBSD system.
>
> When I invoke ``rlwrap sbcl'', I get a little bug:
>
> --8<-------------------------------------------------------->8---
> $ rlwrap sbcl
> This is SBCL 2.4.9, an implementation of ANSI Common Lisp.
> More information about SBCL is available at <http://www.sbcl.org/>.
>
> SBCL is free software, provided as is, with absolutely no warranty.
> It is mostly in the public domain; some portions are provided under
> BSD-style licenses. See the CREDITS and COPYING files in the
> distribution for more information.
> * (f(format t "hello~%")
> hello
> NIL
> --8<-------------------------------------------------------->8---
>
> Of course, I typed
>
> (format t "hello~%")
>
> but we end up seeing
>
> (f(format t "hello~%")
>
> If I type
>
> (write-string "hello")
>
> we end up with
>
> * (w(write-string "hello")
> hello
> "hello"
>
> You get the idea. This doesn't happen with other programs. It seems to
> be something specific to sbcl, though I could hardly believe that sbcl
> is guilty of anything here.
>
> Any remedies?
>

What terminal emulations does Putty support? Try vt100.

Subject: Re: xterm rlwrap sbcl
From: Grant Taylor
Newsgroups: comp.unix.questions
Organization: TNet Consulting
Date: Fri, 13 Dec 2024 02:40 UTC
References: 1 2 3 4 5
Path: eternal-september.org!news.eternal-september.org!feeder3.eternal-september.org!tncsrv06.tnetconsulting.net!tncsrv09.home.tnetconsulting.net!.POSTED.198.18.1.11!not-for-mail
From: gtaylor@tnetconsulting.net (Grant Taylor)
Newsgroups: comp.unix.questions
Subject: Re: xterm rlwrap sbcl
Date: Thu, 12 Dec 2024 20:40:48 -0600
Organization: TNet Consulting
Message-ID: <vjg6rg$djr$1@tncsrv09.home.tnetconsulting.net>
References: <87frmtofu3.fsf@example.com> <vjdufn$20g9u$1@dont-email.me>
<vjeke1$24hao$1@dont-email.me> <874j383n8h.fsf@example.com>
<vjft9r$30pgt$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Fri, 13 Dec 2024 02:40:48 -0000 (UTC)
Injection-Info: tncsrv09.home.tnetconsulting.net; posting-host="198.18.1.11";
logging-data="13947"; mail-complaints-to="newsmaster@tnetconsulting.net"
User-Agent: Mozilla Thunderbird
Content-Language: en-US
In-Reply-To: <vjft9r$30pgt$1@dont-email.me>
View all headers

On 12/12/24 17:57, Paul wrote:
> why does it only happen for the first few characters of a line ?

It might not only be the first few characters of the line.

I've run into something like this in the past where the line was
effectively printed twice, over itself, with the second time shifted by
some number of characters to the right. So it looks like the first few
(?) characters are duplicated when in fact the entire line is repeated,
just offset and overwriting most of the line.

You can usually tell if something like this is happening by redirecting
STDOUT to a file or a utility like xxd and looking at the output.

I don't remember what the cause of this was, but once I found out what
was happening, I think it was fairly obvious where the problem was in
that instance.

--
Grant. . . .

Subject: Re: xterm rlwrap sbcl
From: Eli the Bearded
Newsgroups: comp.unix.questions
Organization: Some absurd concept
Date: Fri, 13 Dec 2024 03:06 UTC
References: 1
Path: eternal-september.org!news.eternal-september.org!feeder3.eternal-september.org!panix!.POSTED.panix5.panix.com!qz!not-for-mail
From: *@eli.users.panix.com (Eli the Bearded)
Newsgroups: comp.unix.questions
Subject: Re: xterm rlwrap sbcl
Date: Fri, 13 Dec 2024 03:06:06 -0000 (UTC)
Organization: Some absurd concept
Message-ID: <eli$2412122205@qaz.wtf>
References: <87frmtofu3.fsf@example.com>
Injection-Date: Fri, 13 Dec 2024 03:06:06 -0000 (UTC)
Injection-Info: reader2.panix.com; posting-host="panix5.panix.com:166.84.1.5";
logging-data="10687"; mail-complaints-to="abuse@panix.com"
User-Agent: Vectrex rn 2.1 (beta)
X-Liz: It's actually happened, the entire Internet is a massive game of Redcode
X-Motto: "Erosion of rights never seems to reverse itself." -- kenny@panix
X-US-Congress: Moronic Fucks.
X-Attribution: EtB
XFrom: is a real address
Encrypted: double rot-13
View all headers

In comp.unix.questions, Salvador Mirzo <smirzo@example.com> wrote:
> I know next to nothing about terminals. My .profile says TERM=xterm.
>
> $ echo $TERM
> xterm
>
> I really am running PuTTY on Windows and logging in to a FreeBSD system.

It sounds to me like the terminal definition (terminfo or termcap as
appropriate to FreeBSD) disagrees with the terminal implementation
(Putty here). This is a not uncommon thing to happen.

I would first see if there are Putty preferences that fix this.

Second see if it could be fixed with an intermediary that grabs terminal
output from the shell programs and rewrites before it gets to Putty.
Tools like tmux or screen will do that.

Third I'd try to fix the terminal definition. Using script to capture
the output of the terminal programs with all terminal escape codes
intact, I'd examine that output to look for cause of the bad formatting
and then search the terminal definition (terminfo or termcap) for the
terminal "capability" that causes the issue and fix or remove it.

Most capabilities are "nice to haves" instead of "required" so just
removing them doesn't break things. But editing those definitions is
not for the faint of heart. That's why the intermediary programs
rewriting things "works".

Elijah
------
got into customizing termcaps with the Televideo 925 (TERM=tvi-925)

Subject: Re: xterm rlwrap sbcl
From: Paul
Newsgroups: comp.unix.questions
Organization: A noiseless patient Spider
Date: Fri, 13 Dec 2024 08:22 UTC
References: 1 2
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: nospam@needed.invalid (Paul)
Newsgroups: comp.unix.questions
Subject: Re: xterm rlwrap sbcl
Date: Fri, 13 Dec 2024 03:22:31 -0500
Organization: A noiseless patient Spider
Lines: 64
Message-ID: <vjgqs7$3a8q8$1@dont-email.me>
References: <87frmtofu3.fsf@example.com> <vjgm8c$3999k$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
Injection-Date: Fri, 13 Dec 2024 09:22:32 +0100 (CET)
Injection-Info: dont-email.me; posting-host="ef94d2dca65e449f280bda5eb24e0316";
logging-data="3482440"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+aeyDA7jLY/15Lijl+DqIZh6HprAsO8TE="
User-Agent: Ratcatcher/2.0.0.25 (Windows/20130802)
Cancel-Lock: sha1:zXQQzTk4PHR6GW3ARaXtnoQQkEY=
In-Reply-To: <vjgm8c$3999k$1@dont-email.me>
Content-Language: en-US
View all headers

On Fri, 12/13/2024 2:03 AM, Oregonian Haruspex wrote:
> Salvador Mirzo <smirzo@example.com> wrote:
>> I know next to nothing about terminals. My .profile says TERM=xterm.
>>
>> $ echo $TERM
>> xterm
>>
>> I really am running PuTTY on Windows and logging in to a FreeBSD system.
>>
>> When I invoke ``rlwrap sbcl'', I get a little bug:
>>
>> --8<-------------------------------------------------------->8---
>> $ rlwrap sbcl
>> This is SBCL 2.4.9, an implementation of ANSI Common Lisp.
>> More information about SBCL is available at <http://www.sbcl.org/>.
>>
>> SBCL is free software, provided as is, with absolutely no warranty.
>> It is mostly in the public domain; some portions are provided under
>> BSD-style licenses. See the CREDITS and COPYING files in the
>> distribution for more information.
>> * (f(format t "hello~%")
>> hello
>> NIL
>> --8<-------------------------------------------------------->8---
>>
>> Of course, I typed
>>
>> (format t "hello~%")
>>
>> but we end up seeing
>>
>> (f(format t "hello~%")
>>
>> If I type
>>
>> (write-string "hello")
>>
>> we end up with
>>
>> * (w(write-string "hello")
>> hello
>> "hello"
>>
>> You get the idea. This doesn't happen with other programs. It seems to
>> be something specific to sbcl, though I could hardly believe that sbcl
>> is guilty of anything here.
>>
>> Any remedies?
>>
>
> What terminal emulations does Putty support? Try vt100.
>

OK, I found a dialog to change it from "xterm".

[Picture]

https://i.postimg.cc/Pqm5L2LS/Putty-Set-Terminal.gif

Since the connection is SSH over Ethernet, the "baud-rate"
would be mostly irrelevant.

Paul

Subject: Re: xterm rlwrap sbcl
From: Salvador Mirzo
Newsgroups: comp.unix.questions
Organization: A noiseless patient Spider
Date: Fri, 13 Dec 2024 23:40 UTC
References: 1 2 3 4 5
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: smirzo@example.com (Salvador Mirzo)
Newsgroups: comp.unix.questions
Subject: Re: xterm rlwrap sbcl
Date: Fri, 13 Dec 2024 20:40:46 -0300
Organization: A noiseless patient Spider
Lines: 155
Message-ID: <87a5czgni9.fsf@example.com>
References: <87frmtofu3.fsf@example.com> <vjdufn$20g9u$1@dont-email.me>
<vjeke1$24hao$1@dont-email.me> <874j383n8h.fsf@example.com>
<vjft9r$30pgt$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Date: Sat, 14 Dec 2024 00:40:48 +0100 (CET)
Injection-Info: dont-email.me; posting-host="389907832bffe20862f78b207653d4e2";
logging-data="3854757"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/9tnXRnVd4KacsHS0vIpPLnVMKXt8e34g="
Cancel-Lock: sha1:/y/Y4ftMwouhQezY3WAsIORCGEI=
sha1:6dIPZ/KKGqonTHhGezrdL3kEHDk=
View all headers

Paul <nospam@needed.invalid> writes:

> On Thu, 12/12/2024 11:00 AM, Salvador Mirzo wrote:
>> Paul <nospam@needed.invalid> writes:
>>
>>> On Thu, 12/12/2024 1:05 AM, Lawrence D'Oliveiro wrote:
>>>> On Wed, 11 Dec 2024 22:22:28 -0300, Salvador Mirzo wrote:
>>>>
>>>>> $ echo $TERM
>>>>> xterm
>>>>
>>>> Same here.
>>>>
>>>>> I really am running PuTTY on Windows and logging in to a FreeBSD system.
>>>>
>>>> I am running KDE Konsole on Linux to access a local shell.
>>>>
>>>>> Of course, I typed
>>>>>
>>>>> (format t "hello~%")
>>>>>
>>>>> but we end up seeing
>>>>>
>>>>> (f(format t "hello~%")
>>>>
>>>> My terminal window shows:
>>>>
>>>> * (format t "hello~%")
>>>> hello
>>>> NIL
>>>>
>>>>> If I type
>>>>>
>>>>> (write-string "hello")
>>>>>
>>>>> we end up with
>>>>>
>>>>> * (w(write-string "hello")
>>>>> hello
>>>>> "hello"
>>>>
>>>> My terminal window shows:
>>>>
>>>> * (write-string "hello")
>>>> hello
>>>> "hello"
>>>>
>>>> Most likely suspect: Windows is the weakest link.
>>>>
>>>
>>> This is the easiest thing I could wire up as a simulation
>>> for those at home. Since I don't know a thing about LISP,
>>> I can't very well address that part of the problem.
>>>
>>> [Picture]
>>>
>>> https://i.postimg.cc/9FVtm0S5/putty-ssh-session-overview.gif
>>>
>>> The $TERM declaration and the color capability,
>>> don't exactly match in my copy of PuTTY. The distortion
>>> seen by the OP does not look like wrongly emitted
>>> color codes, which could make more of a mess.
>>> PuTTY is not declaring "xterm-256color" as the term type.
>>>
>>> [Picture]
>>>
>>> https://i.postimg.cc/QMtZRXsc/putty-settings.gif
>>
>> I believe this is a FreeBSD thing. Using the same PuTTY and the same
>> Windows, but loging in on a GNU Debian system, I don't see any problems:
>>
>> --8<-------------------------------------------------------->8---
>> %uname -a
>> Linux kontesti.me 6.2.9-x86_64-linode160 #1 SMP PREEMPT_DYNAMIC Wed
>> Apr 5 15:30:32 EDT 2023 x86_64 GNU/Linux
>> %sbcl --version
>>
>> SBCL 1.2.4.debian
>> %echo $TERM
>> xterm
>>
>> %rlwrap sbcl
>> This is SBCL 1.2.4.debian, an implementation of ANSI Common Lisp.
>> More information about SBCL is available at <http://www.sbcl.org/>.
>>
>> SBCL is free software, provided as is, with absolutely no warranty.
>> It is mostly in the public domain; some portions are provided under
>> BSD-style licenses. See the CREDITS and COPYING files in the
>> distribution for more information.
>> * (format t "hello~%")
>> hello
>> NIL
>> --8<-------------------------------------------------------->8---
>>
>
> I set up a FreeBSD 14.2 VM and at least in terms of termcap,
> and $TERM ("xterm"), the results so far look the same as with
> my attempt on Linux Mint VM.
>
> The contents of the prompt definition on the freebsd account are the default:
>
> $TERM "xterm"
> $PS1 \u@\h:\w \$
>
> And I doubt a locale definition could make that sort of pattern.
> It sorta looks like a terminal "echo" problem but why does it only
> happen for the first few characters of a line ?

Hey, I also have a FreeBSD 14.2, but I also have a FreeBSD 14.1. It
turns out the problem does not happen on the FreeBSD 14.2:

$ echo $TERM
xterm

$ uname -a
FreeBSD b 14.2-RC1 FreeBSD 14.2-RC1 releng/14.2-n269505-5395ddd7aa13 GENERIC amd64

$ sbcl
This is SBCL 2.4.9, an implementation of ANSI Common Lisp.
More information about SBCL is available at <http://www.sbcl.org/>.

SBCL is free software, provided as is, with absolutely no warranty.
It is mostly in the public domain; some portions are provided under
BSD-style licenses. See the CREDITS and COPYING files in the
distribution for more information.
* (format t "hello~%")
hello
NIL
*

But, as you know already, here's what happens on FreeBSD 14.1:

$ echo $TERM
xterm

$ uname -a
FreeBSD my.domain 14.1-RELEASE-p5 FreeBSD 14.1-RELEASE-p5 GENERIC amd64

$ sbcl
This is SBCL 2.4.9, an implementation of ANSI Common Lisp.
More information about SBCL is available at <http://www.sbcl.org/>.

SBCL is free software, provided as is, with absolutely no warranty.
It is mostly in the public domain; some portions are provided under
BSD-style licenses. See the CREDITS and COPYING files in the
distribution for more information.
* (format t "hello~%")
hello
NIL
*

What? It stopped doing it. What in the world is going on? This was
not a on-and-off thing; it was always doing it. I did not even set
anything new on my PuTTY configuration or anything. I'm very puzzled
now.

Subject: Re: xterm rlwrap sbcl
From: Salvador Mirzo
Newsgroups: comp.unix.questions
Organization: A noiseless patient Spider
Date: Fri, 13 Dec 2024 23:49 UTC
References: 1 2 3 4 5 6
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: smirzo@example.com (Salvador Mirzo)
Newsgroups: comp.unix.questions
Subject: Re: xterm rlwrap sbcl
Date: Fri, 13 Dec 2024 20:49:06 -0300
Organization: A noiseless patient Spider
Lines: 201
Message-ID: <87y10jf8jx.fsf@example.com>
References: <87frmtofu3.fsf@example.com> <vjdufn$20g9u$1@dont-email.me>
<vjeke1$24hao$1@dont-email.me> <874j383n8h.fsf@example.com>
<vjft9r$30pgt$1@dont-email.me> <87a5czgni9.fsf@example.com>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Date: Sat, 14 Dec 2024 00:49:08 +0100 (CET)
Injection-Info: dont-email.me; posting-host="389907832bffe20862f78b207653d4e2";
logging-data="3854757"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/Dute2ueKrWBuKRiqEJRGIy2ooJ5m72Rc="
Cancel-Lock: sha1:wtnOFaiammJeJ/W9Hhye2txdn0U=
sha1:JiwXjYV5LDhLvB9cnk3dKC627Qk=
View all headers

Salvador Mirzo <smirzo@example.com> writes:

> Paul <nospam@needed.invalid> writes:
>
>> On Thu, 12/12/2024 11:00 AM, Salvador Mirzo wrote:
>>> Paul <nospam@needed.invalid> writes:
>>>
>>>> On Thu, 12/12/2024 1:05 AM, Lawrence D'Oliveiro wrote:
>>>>> On Wed, 11 Dec 2024 22:22:28 -0300, Salvador Mirzo wrote:
>>>>>
>>>>>> $ echo $TERM
>>>>>> xterm
>>>>>
>>>>> Same here.
>>>>>
>>>>>> I really am running PuTTY on Windows and logging in to a FreeBSD system.
>>>>>
>>>>> I am running KDE Konsole on Linux to access a local shell.
>>>>>
>>>>>> Of course, I typed
>>>>>>
>>>>>> (format t "hello~%")
>>>>>>
>>>>>> but we end up seeing
>>>>>>
>>>>>> (f(format t "hello~%")
>>>>>
>>>>> My terminal window shows:
>>>>>
>>>>> * (format t "hello~%")
>>>>> hello
>>>>> NIL
>>>>>
>>>>>> If I type
>>>>>>
>>>>>> (write-string "hello")
>>>>>>
>>>>>> we end up with
>>>>>>
>>>>>> * (w(write-string "hello")
>>>>>> hello
>>>>>> "hello"
>>>>>
>>>>> My terminal window shows:
>>>>>
>>>>> * (write-string "hello")
>>>>> hello
>>>>> "hello"
>>>>>
>>>>> Most likely suspect: Windows is the weakest link.
>>>>>
>>>>
>>>> This is the easiest thing I could wire up as a simulation
>>>> for those at home. Since I don't know a thing about LISP,
>>>> I can't very well address that part of the problem.
>>>>
>>>> [Picture]
>>>>
>>>> https://i.postimg.cc/9FVtm0S5/putty-ssh-session-overview.gif
>>>>
>>>> The $TERM declaration and the color capability,
>>>> don't exactly match in my copy of PuTTY. The distortion
>>>> seen by the OP does not look like wrongly emitted
>>>> color codes, which could make more of a mess.
>>>> PuTTY is not declaring "xterm-256color" as the term type.
>>>>
>>>> [Picture]
>>>>
>>>> https://i.postimg.cc/QMtZRXsc/putty-settings.gif
>>>
>>> I believe this is a FreeBSD thing. Using the same PuTTY and the same
>>> Windows, but loging in on a GNU Debian system, I don't see any problems:
>>>
>>> --8<-------------------------------------------------------->8---
>>> %uname -a
>>> Linux kontesti.me 6.2.9-x86_64-linode160 #1 SMP PREEMPT_DYNAMIC Wed
>>> Apr 5 15:30:32 EDT 2023 x86_64 GNU/Linux
>>> %sbcl --version
>>>
>>> SBCL 1.2.4.debian
>>> %echo $TERM
>>> xterm
>>>
>>> %rlwrap sbcl
>>> This is SBCL 1.2.4.debian, an implementation of ANSI Common Lisp.
>>> More information about SBCL is available at <http://www.sbcl.org/>.
>>>
>>> SBCL is free software, provided as is, with absolutely no warranty.
>>> It is mostly in the public domain; some portions are provided under
>>> BSD-style licenses. See the CREDITS and COPYING files in the
>>> distribution for more information.
>>> * (format t "hello~%")
>>> hello
>>> NIL
>>> --8<-------------------------------------------------------->8---
>>>
>>
>> I set up a FreeBSD 14.2 VM and at least in terms of termcap,
>> and $TERM ("xterm"), the results so far look the same as with
>> my attempt on Linux Mint VM.
>>
>> The contents of the prompt definition on the freebsd account are the default:
>>
>> $TERM "xterm"
>> $PS1 \u@\h:\w \$
>>
>> And I doubt a locale definition could make that sort of pattern.
>> It sorta looks like a terminal "echo" problem but why does it only
>> happen for the first few characters of a line ?
>
> Hey, I also have a FreeBSD 14.2, but I also have a FreeBSD 14.1. It
> turns out the problem does not happen on the FreeBSD 14.2:
>
> $ echo $TERM
> xterm
>
> $ uname -a
> FreeBSD b 14.2-RC1 FreeBSD 14.2-RC1 releng/14.2-n269505-5395ddd7aa13
> GENERIC amd64
>
> $ sbcl
> This is SBCL 2.4.9, an implementation of ANSI Common Lisp.
> More information about SBCL is available at <http://www.sbcl.org/>.
>
> SBCL is free software, provided as is, with absolutely no warranty.
> It is mostly in the public domain; some portions are provided under
> BSD-style licenses. See the CREDITS and COPYING files in the
> distribution for more information.
> * (format t "hello~%")
> hello
> NIL
> *
>
> But, as you know already, here's what happens on FreeBSD 14.1:
>
> $ echo $TERM
> xterm
>
> $ uname -a
> FreeBSD my.domain 14.1-RELEASE-p5 FreeBSD 14.1-RELEASE-p5 GENERIC amd64
>
> $ sbcl
> This is SBCL 2.4.9, an implementation of ANSI Common Lisp.
> More information about SBCL is available at <http://www.sbcl.org/>.
>
> SBCL is free software, provided as is, with absolutely no warranty.
> It is mostly in the public domain; some portions are provided under
> BSD-style licenses. See the CREDITS and COPYING files in the
> distribution for more information.
> * (format t "hello~%")
> hello
> NIL
> *
>
> What? It stopped doing it. What in the world is going on? This was
> not a on-and-off thing; it was always doing it. I did not even set
> anything new on my PuTTY configuration or anything. I'm very puzzled
> now.

Sorry! I forgot I have to use rlwrap. So the problem is related to the
rlwrap then. That was not clear to me yet. So, with rlwrap I see the
behavior on both FreeBSD 14.1 and 14.2:

$ uname -a
FreeBSD b 14.2-RC1 FreeBSD 14.2-RC1 releng/14.2-n269505-5395ddd7aa13 GENERIC amd64

$ rlwrap sbcl
This is SBCL 2.4.9, an implementation of ANSI Common Lisp.
More information about SBCL is available at <http://www.sbcl.org/>.

SBCL is free software, provided as is, with absolutely no warranty.
It is mostly in the public domain; some portions are provided under
BSD-style licenses. See the CREDITS and COPYING files in the
distribution for more information.
* (f(format t "hello~%")
hello
NIL
*

Same thing on FreeBSD 14.1. (So, make sure you're using rlwrap.)

Someone (maybe you) suggested I should change my PuTTY terminal-type
string to vt100. I did. Same result:

$ uname -a
FreeBSD my.domain 14.1-RELEASE-p5 FreeBSD 14.1-RELEASE-p5 GENERIC amd64

$ echo $TERM
vt100

$ rlwrap sbcl
This is SBCL 2.4.9, an implementation of ANSI Common Lisp.
More information about SBCL is available at <http://www.sbcl.org/>.

SBCL is free software, provided as is, with absolutely no warranty.
It is mostly in the public domain; some portions are provided under
BSD-style licenses. See the CREDITS and COPYING files in the
distribution for more information.
* (f(format t "hello~%")
hello
NIL

Subject: Re: xterm rlwrap sbcl
From: Salvador Mirzo
Newsgroups: comp.unix.questions
Organization: A noiseless patient Spider
Date: Fri, 13 Dec 2024 23:59 UTC
References: 1 2
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: smirzo@example.com (Salvador Mirzo)
Newsgroups: comp.unix.questions
Subject: Re: xterm rlwrap sbcl
Date: Fri, 13 Dec 2024 20:59:25 -0300
Organization: A noiseless patient Spider
Lines: 62
Message-ID: <87o71ff82q.fsf@example.com>
References: <87frmtofu3.fsf@example.com> <eli$2412122205@qaz.wtf>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Date: Sat, 14 Dec 2024 00:59:27 +0100 (CET)
Injection-Info: dont-email.me; posting-host="389907832bffe20862f78b207653d4e2";
logging-data="3854757"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18m0iEuf8u3h+PFQZpFktJRo67RFlrjpSs="
Cancel-Lock: sha1:Qd2l7DrfGNTLQ2M8zQA7QWGV6mQ=
sha1:HcWcaMVz6rqWDu1UuafpagB7gcM=
View all headers

Eli the Bearded <*@eli.users.panix.com> writes:

> In comp.unix.questions, Salvador Mirzo <smirzo@example.com> wrote:
>> I know next to nothing about terminals. My .profile says TERM=xterm.
>>
>> $ echo $TERM
>> xterm
>>
>> I really am running PuTTY on Windows and logging in to a FreeBSD system.
>
> It sounds to me like the terminal definition (terminfo or termcap as
> appropriate to FreeBSD) disagrees with the terminal implementation
> (Putty here). This is a not uncommon thing to happen.
>
> I would first see if there are Putty preferences that fix this.

My trial-and-error was to set local echo to ``force off'' and local line
editing to ``force off'':

https://prnt.sc/e6SedO_IiHTX

No difference. (I also set the terminal-type string to vt100.)

I just installed the terminal Alacritty. I see the same behavior on it:

$ echo $TERM
xterm-256color

$ uname -a
FreeBSD my.domain 14.1-RELEASE-p5 FreeBSD 14.1-RELEASE-p5 GENERIC amd64

$ rlwrap sbcl
This is SBCL 2.4.9, an implementation of ANSI Common Lisp.
More information about SBCL is available at <http://www.sbcl.org/>.

SBCL is free software, provided as is, with absolutely no warranty.
It is mostly in the public domain; some portions are provided under
BSD-style licenses. See the CREDITS and COPYING files in the
distribution for more information.
* (f(format t "hello~%")
hello
NIL
*

> Second see if it could be fixed with an intermediary that grabs terminal
> output from the shell programs and rewrites before it gets to Putty.
> Tools like tmux or screen will do that.
>
> Third I'd try to fix the terminal definition. Using script to capture
> the output of the terminal programs with all terminal escape codes
> intact, I'd examine that output to look for cause of the bad formatting
> and then search the terminal definition (terminfo or termcap) for the
> terminal "capability" that causes the issue and fix or remove it.
>
> Most capabilities are "nice to haves" instead of "required" so just
> removing them doesn't break things. But editing those definitions is
> not for the faint of heart. That's why the intermediary programs
> rewriting things "works".

That's more technical than I could do right now on my own. If you have
the energy describe what it is that I must do in more details---what
software to use et cetera---I will do it. Thanks!

Subject: Re: xterm rlwrap sbcl
From: Paul
Newsgroups: comp.unix.questions
Organization: A noiseless patient Spider
Date: Sat, 14 Dec 2024 00:55 UTC
References: 1 2 3 4 5 6 7
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: nospam@needed.invalid (Paul)
Newsgroups: comp.unix.questions
Subject: Re: xterm rlwrap sbcl
Date: Fri, 13 Dec 2024 19:55:59 -0500
Organization: A noiseless patient Spider
Lines: 211
Message-ID: <vjil2v$3mbam$1@dont-email.me>
References: <87frmtofu3.fsf@example.com> <vjdufn$20g9u$1@dont-email.me>
<vjeke1$24hao$1@dont-email.me> <874j383n8h.fsf@example.com>
<vjft9r$30pgt$1@dont-email.me> <87a5czgni9.fsf@example.com>
<87y10jf8jx.fsf@example.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
Injection-Date: Sat, 14 Dec 2024 01:56:02 +0100 (CET)
Injection-Info: dont-email.me; posting-host="1a719e2b69cc6fb8f9090592a68ff32b";
logging-data="3878230"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19b0ZNwmrRKirMGAFb4ZlGIDOCMqH0lsm8="
User-Agent: Ratcatcher/2.0.0.25 (Windows/20130802)
Cancel-Lock: sha1:uZCp/UJdmlyx9Z8ZoYFguJaoz/c=
In-Reply-To: <87y10jf8jx.fsf@example.com>
Content-Language: en-US
View all headers

On Fri, 12/13/2024 6:49 PM, Salvador Mirzo wrote:
> Salvador Mirzo <smirzo@example.com> writes:
>
>> Paul <nospam@needed.invalid> writes:
>>
>>> On Thu, 12/12/2024 11:00 AM, Salvador Mirzo wrote:
>>>> Paul <nospam@needed.invalid> writes:
>>>>
>>>>> On Thu, 12/12/2024 1:05 AM, Lawrence D'Oliveiro wrote:
>>>>>> On Wed, 11 Dec 2024 22:22:28 -0300, Salvador Mirzo wrote:
>>>>>>
>>>>>>> $ echo $TERM
>>>>>>> xterm
>>>>>>
>>>>>> Same here.
>>>>>>
>>>>>>> I really am running PuTTY on Windows and logging in to a FreeBSD system.
>>>>>>
>>>>>> I am running KDE Konsole on Linux to access a local shell.
>>>>>>
>>>>>>> Of course, I typed
>>>>>>>
>>>>>>> (format t "hello~%")
>>>>>>>
>>>>>>> but we end up seeing
>>>>>>>
>>>>>>> (f(format t "hello~%")
>>>>>>
>>>>>> My terminal window shows:
>>>>>>
>>>>>> * (format t "hello~%")
>>>>>> hello
>>>>>> NIL
>>>>>>
>>>>>>> If I type
>>>>>>>
>>>>>>> (write-string "hello")
>>>>>>>
>>>>>>> we end up with
>>>>>>>
>>>>>>> * (w(write-string "hello")
>>>>>>> hello
>>>>>>> "hello"
>>>>>>
>>>>>> My terminal window shows:
>>>>>>
>>>>>> * (write-string "hello")
>>>>>> hello
>>>>>> "hello"
>>>>>>
>>>>>> Most likely suspect: Windows is the weakest link.
>>>>>>
>>>>>
>>>>> This is the easiest thing I could wire up as a simulation
>>>>> for those at home. Since I don't know a thing about LISP,
>>>>> I can't very well address that part of the problem.
>>>>>
>>>>> [Picture]
>>>>>
>>>>> https://i.postimg.cc/9FVtm0S5/putty-ssh-session-overview.gif
>>>>>
>>>>> The $TERM declaration and the color capability,
>>>>> don't exactly match in my copy of PuTTY. The distortion
>>>>> seen by the OP does not look like wrongly emitted
>>>>> color codes, which could make more of a mess.
>>>>> PuTTY is not declaring "xterm-256color" as the term type.
>>>>>
>>>>> [Picture]
>>>>>
>>>>> https://i.postimg.cc/QMtZRXsc/putty-settings.gif
>>>>
>>>> I believe this is a FreeBSD thing. Using the same PuTTY and the same
>>>> Windows, but loging in on a GNU Debian system, I don't see any problems:
>>>>
>>>> --8<-------------------------------------------------------->8---
>>>> %uname -a
>>>> Linux kontesti.me 6.2.9-x86_64-linode160 #1 SMP PREEMPT_DYNAMIC Wed
>>>> Apr 5 15:30:32 EDT 2023 x86_64 GNU/Linux
>>>> %sbcl --version
>>>>
>>>> SBCL 1.2.4.debian
>>>> %echo $TERM
>>>> xterm
>>>>
>>>> %rlwrap sbcl
>>>> This is SBCL 1.2.4.debian, an implementation of ANSI Common Lisp.
>>>> More information about SBCL is available at <http://www.sbcl.org/>.
>>>>
>>>> SBCL is free software, provided as is, with absolutely no warranty.
>>>> It is mostly in the public domain; some portions are provided under
>>>> BSD-style licenses. See the CREDITS and COPYING files in the
>>>> distribution for more information.
>>>> * (format t "hello~%")
>>>> hello
>>>> NIL
>>>> --8<-------------------------------------------------------->8---
>>>>
>>>
>>> I set up a FreeBSD 14.2 VM and at least in terms of termcap,
>>> and $TERM ("xterm"), the results so far look the same as with
>>> my attempt on Linux Mint VM.
>>>
>>> The contents of the prompt definition on the freebsd account are the default:
>>>
>>> $TERM "xterm"
>>> $PS1 \u@\h:\w \$
>>>
>>> And I doubt a locale definition could make that sort of pattern.
>>> It sorta looks like a terminal "echo" problem but why does it only
>>> happen for the first few characters of a line ?
>>
>> Hey, I also have a FreeBSD 14.2, but I also have a FreeBSD 14.1. It
>> turns out the problem does not happen on the FreeBSD 14.2:
>>
>> $ echo $TERM
>> xterm
>>
>> $ uname -a
>> FreeBSD b 14.2-RC1 FreeBSD 14.2-RC1 releng/14.2-n269505-5395ddd7aa13
>> GENERIC amd64
>>
>> $ sbcl
>> This is SBCL 2.4.9, an implementation of ANSI Common Lisp.
>> More information about SBCL is available at <http://www.sbcl.org/>.
>>
>> SBCL is free software, provided as is, with absolutely no warranty.
>> It is mostly in the public domain; some portions are provided under
>> BSD-style licenses. See the CREDITS and COPYING files in the
>> distribution for more information.
>> * (format t "hello~%")
>> hello
>> NIL
>> *
>>
>> But, as you know already, here's what happens on FreeBSD 14.1:
>>
>> $ echo $TERM
>> xterm
>>
>> $ uname -a
>> FreeBSD my.domain 14.1-RELEASE-p5 FreeBSD 14.1-RELEASE-p5 GENERIC amd64
>>
>> $ sbcl
>> This is SBCL 2.4.9, an implementation of ANSI Common Lisp.
>> More information about SBCL is available at <http://www.sbcl.org/>.
>>
>> SBCL is free software, provided as is, with absolutely no warranty.
>> It is mostly in the public domain; some portions are provided under
>> BSD-style licenses. See the CREDITS and COPYING files in the
>> distribution for more information.
>> * (format t "hello~%")
>> hello
>> NIL
>> *
>>
>> What? It stopped doing it. What in the world is going on? This was
>> not a on-and-off thing; it was always doing it. I did not even set
>> anything new on my PuTTY configuration or anything. I'm very puzzled
>> now.
>
> Sorry! I forgot I have to use rlwrap. So the problem is related to the
> rlwrap then. That was not clear to me yet. So, with rlwrap I see the
> behavior on both FreeBSD 14.1 and 14.2:
>
> $ uname -a
> FreeBSD b 14.2-RC1 FreeBSD 14.2-RC1 releng/14.2-n269505-5395ddd7aa13 GENERIC amd64
>
> $ rlwrap sbcl
> This is SBCL 2.4.9, an implementation of ANSI Common Lisp.
> More information about SBCL is available at <http://www.sbcl.org/>.
>
> SBCL is free software, provided as is, with absolutely no warranty.
> It is mostly in the public domain; some portions are provided under
> BSD-style licenses. See the CREDITS and COPYING files in the
> distribution for more information.
> * (f(format t "hello~%")
> hello
> NIL
> *
>
> Same thing on FreeBSD 14.1. (So, make sure you're using rlwrap.)
>
> Someone (maybe you) suggested I should change my PuTTY terminal-type
> string to vt100. I did. Same result:
>
> $ uname -a
> FreeBSD my.domain 14.1-RELEASE-p5 FreeBSD 14.1-RELEASE-p5 GENERIC amd64
>
> $ echo $TERM
> vt100
>
> $ rlwrap sbcl
> This is SBCL 2.4.9, an implementation of ANSI Common Lisp.
> More information about SBCL is available at <http://www.sbcl.org/>.
>
> SBCL is free software, provided as is, with absolutely no warranty.
> It is mostly in the public domain; some portions are provided under
> BSD-style licenses. See the CREDITS and COPYING files in the
> distribution for more information.
> * (f(format t "hello~%")
> hello
> NIL
>

The pattern is not suggestive of a $TERM problem, but it was
worth trying a change anyway.

Perhaps the rlwrap developer recognizes the pattern ?

Paul

Subject: Re: xterm rlwrap sbcl
From: Salvador Mirzo
Newsgroups: comp.unix.questions
Organization: A noiseless patient Spider
Date: Sat, 14 Dec 2024 21:51 UTC
References: 1 2 3 4 5 6 7 8
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: smirzo@example.com (Salvador Mirzo)
Newsgroups: comp.unix.questions
Subject: Re: xterm rlwrap sbcl
Date: Sat, 14 Dec 2024 18:51:48 -0300
Organization: A noiseless patient Spider
Lines: 38
Message-ID: <87cyhuexvv.fsf@example.com>
References: <87frmtofu3.fsf@example.com> <vjdufn$20g9u$1@dont-email.me>
<vjeke1$24hao$1@dont-email.me> <874j383n8h.fsf@example.com>
<vjft9r$30pgt$1@dont-email.me> <87a5czgni9.fsf@example.com>
<87y10jf8jx.fsf@example.com> <vjil2v$3mbam$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Date: Sat, 14 Dec 2024 22:51:49 +0100 (CET)
Injection-Info: dont-email.me; posting-host="fa1600981217bb2f11af234834e6a390";
logging-data="191228"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18ahdFLI1+Wd5v0PuAOMCAfo6HFhnKJjsc="
Cancel-Lock: sha1:FKK0+d2kS2qjgsK/5i6cAX239iY=
sha1:wAb6Lw9FP62eqQUIV9+A3cXJvaQ=
View all headers

Paul <nospam@needed.invalid> writes:

> On Fri, 12/13/2024 6:49 PM, Salvador Mirzo wrote:

[...]

>> Someone (maybe you) suggested I should change my PuTTY terminal-type
>> string to vt100. I did. Same result:
>>
>> $ uname -a
>> FreeBSD my.domain 14.1-RELEASE-p5 FreeBSD 14.1-RELEASE-p5 GENERIC amd64
>>
>> $ echo $TERM
>> vt100
>>
>> $ rlwrap sbcl
>> This is SBCL 2.4.9, an implementation of ANSI Common Lisp.
>> More information about SBCL is available at <http://www.sbcl.org/>.
>>
>> SBCL is free software, provided as is, with absolutely no warranty.
>> It is mostly in the public domain; some portions are provided under
>> BSD-style licenses. See the CREDITS and COPYING files in the
>> distribution for more information.
>> * (f(format t "hello~%")
>> hello
>> NIL
>>
>
> The pattern is not suggestive of a $TERM problem, but it was
> worth trying a change anyway.
>
> Perhaps the rlwrap developer recognizes the pattern ?

Good idea. I asked them at

https://github.com/hanslub42/rlwrap/issues/194

Thanks for your attention, Paul!

Subject: Re: xterm rlwrap sbcl
From: Salvador Mirzo
Newsgroups: comp.unix.questions
Organization: A noiseless patient Spider
Date: Thu, 26 Dec 2024 01:01 UTC
References: 1 2
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: smirzo@example.com (Salvador Mirzo)
Newsgroups: comp.unix.questions
Subject: Re: xterm rlwrap sbcl
Date: Wed, 25 Dec 2024 22:01:23 -0300
Organization: A noiseless patient Spider
Lines: 47
Message-ID: <868qs3i7fg.fsf@example.com>
References: <87frmtofu3.fsf@example.com> <vjdufn$20g9u$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Date: Thu, 26 Dec 2024 02:01:24 +0100 (CET)
Injection-Info: dont-email.me; posting-host="08a205749fbd3ff79d9e1350a0b6ddbd";
logging-data="2743969"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19qZPwhvL5wSNdawQiqJLSwylFpIF5/J3A="
Cancel-Lock: sha1:VFUHHkTLMs0mCTkAE/0rOA5Taxc=
sha1:rn1yLuadQO2I7RKkDvaMUYUhtRE=
View all headers

Lawrence D'Oliveiro <ldo@nz.invalid> writes:

> On Wed, 11 Dec 2024 22:22:28 -0300, Salvador Mirzo wrote:
>
>> $ echo $TERM
>> xterm
>
> Same here.
>
>> I really am running PuTTY on Windows and logging in to a FreeBSD system.
>
> I am running KDE Konsole on Linux to access a local shell.
>
>> Of course, I typed
>>
>> (format t "hello~%")
>>
>> but we end up seeing
>>
>> (f(format t "hello~%")
>
> My terminal window shows:
>
> * (format t "hello~%")
> hello
> NIL
>
>> If I type
>>
>> (write-string "hello")
>>
>> we end up with
>>
>> * (w(write-string "hello")
>> hello
>> "hello"
>
> My terminal window shows:
>
> * (write-string "hello")
> hello
> "hello"
>
> Most likely suspect: Windows is the weakest link.

I can reproduce the problem on an xterm running Xorg in the latest
version of FreeBSD. A picture: https://0x0.st/8rkK.png.

Subject: Re: xterm rlwrap sbcl
From: Bozo User
Newsgroups: comp.unix.questions
Organization: A noiseless patient Spider
Date: Sun, 12 Jan 2025 23:01 UTC
References: 1
Path: news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail
From: anthk@disroot.org (Bozo User)
Newsgroups: comp.unix.questions
Subject: Re: xterm rlwrap sbcl
Date: Sun, 12 Jan 2025 23:01:24 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 49
Message-ID: <vm1hk4$1etjc$4@dont-email.me>
References: <87frmtofu3.fsf@example.com>
Injection-Date: Mon, 13 Jan 2025 00:01:25 +0100 (CET)
Injection-Info: dont-email.me; posting-host="0d769781d0c9f62b1fc94ca3a2e1f783";
logging-data="1537644"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18HerbH25odlVC9yIySNUYU"
User-Agent: slrn/1.0.3 (Linux)
Cancel-Lock: sha1:qVzfA8gCgT0c/bD8vr/TgDCKA4U=
View all headers

On 2024-12-12, Salvador Mirzo <smirzo@example.com> wrote:
> I know next to nothing about terminals. My .profile says TERM=xterm.
>
> $ echo $TERM
> xterm
>
> I really am running PuTTY on Windows and logging in to a FreeBSD system.
>
> When I invoke ``rlwrap sbcl'', I get a little bug:
>
> --8<-------------------------------------------------------->8---
> $ rlwrap sbcl
> This is SBCL 2.4.9, an implementation of ANSI Common Lisp.
> More information about SBCL is available at <http://www.sbcl.org/>.
>
> SBCL is free software, provided as is, with absolutely no warranty.
> It is mostly in the public domain; some portions are provided under
> BSD-style licenses. See the CREDITS and COPYING files in the
> distribution for more information.
> * (f(format t "hello~%")
> hello
> NIL
> --8<-------------------------------------------------------->8---
>
> Of course, I typed
>
> (format t "hello~%")
>
> but we end up seeing
>
> (f(format t "hello~%")
>
> If I type
>
> (write-string "hello")
>
> we end up with
>
> * (w(write-string "hello")
> hello
> "hello"
>
> You get the idea. This doesn't happen with other programs. It seems to
> be something specific to sbcl, though I could hardly believe that sbcl
> is guilty of anything here.
>
> Any remedies?

You can try using vim+slimv, it's much better than a simple REPL

Subject: Re: xterm rlwrap sbcl
From: Salvador Mirzo
Newsgroups: comp.unix.questions
Organization: A noiseless patient Spider
Date: Mon, 13 Jan 2025 01:06 UTC
References: 1 2
Path: news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail
From: smirzo@example.com (Salvador Mirzo)
Newsgroups: comp.unix.questions
Subject: Re: xterm rlwrap sbcl
Date: Sun, 12 Jan 2025 22:06:44 -0300
Organization: A noiseless patient Spider
Lines: 75
Message-ID: <875xmj4j4r.fsf@example.com>
References: <87frmtofu3.fsf@example.com> <vm1hk4$1etjc$4@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Date: Mon, 13 Jan 2025 02:06:45 +0100 (CET)
Injection-Info: dont-email.me; posting-host="c3ae166e2847728764d0316db07aa256";
logging-data="1567373"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18qsLFUoOT/h2EFXYj2SN9pyIrg4UnaOk8="
Cancel-Lock: sha1:fo8xMl+ZpitslMRiqpkxcKL/cfk=
sha1:NYBCutcCFv3FGTWypx1KXvNBRi8=
View all headers

Bozo User <anthk@disroot.org> writes:

> On 2024-12-12, Salvador Mirzo <smirzo@example.com> wrote:
>> I know next to nothing about terminals. My .profile says TERM=xterm.
>>
>> $ echo $TERM
>> xterm
>>
>> I really am running PuTTY on Windows and logging in to a FreeBSD system.
>>
>> When I invoke ``rlwrap sbcl'', I get a little bug:
>>
>> --8<-------------------------------------------------------->8---
>> $ rlwrap sbcl
>> This is SBCL 2.4.9, an implementation of ANSI Common Lisp.
>> More information about SBCL is available at <http://www.sbcl.org/>.
>>
>> SBCL is free software, provided as is, with absolutely no warranty.
>> It is mostly in the public domain; some portions are provided under
>> BSD-style licenses. See the CREDITS and COPYING files in the
>> distribution for more information.
>> * (f(format t "hello~%")
>> hello
>> NIL
>> --8<-------------------------------------------------------->8---
>>
>> Of course, I typed
>>
>> (format t "hello~%")
>>
>> but we end up seeing
>>
>> (f(format t "hello~%")
>>
>> If I type
>>
>> (write-string "hello")
>>
>> we end up with
>>
>> * (w(write-string "hello")
>> hello
>> "hello"
>>
>> You get the idea. This doesn't happen with other programs. It seems to
>> be something specific to sbcl, though I could hardly believe that sbcl
>> is guilty of anything here.
>>
>> Any remedies?
>
> You can try using vim+slimv, it's much better than a simple REPL

Thanks! It turns out I replaced FreeBSD with OpenBSD and I cannot
reproduce the problem on the OpenBSD system. So, to me, personally, the
problem is eliminated---but there's something going on in FreeBSD, which
should be looked at. I have no intuition on the problem.

$ rlwrap sbcl
This is SBCL 2.4.8.openbsd.sbcl-2.4.8, an implementation of ANSI Common Lisp.
More information about SBCL is available at <http://www.sbcl.org/>.

SBCL is free software, provided as is, with absolutely no warranty.
It is mostly in the public domain; some portions are provided under
BSD-style licenses. See the CREDITS and COPYING files in the
distribution for more information.
* (format t "hello~%")
hello
NIL
*

$ uname -a
OpenBSD b.local 7.6 GENERIC.MP#338 amd64

$ rlwrap --version
rlwrap 0.46.1

1

rocksolid light 0.9.8
clearnet tor