Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

"An open mind has but one disadvantage: it collects dirt." -- a saying at RPI


devel / comp.lang.perl.misc / Strange problem with print

SubjectAuthor
* Strange problem with printgamo
`* Re: Strange problem with printBen Bacarisse
 `* Re: Strange problem with printgamo
  `* Re: Strange problem with print$Bill
   `* Re: Strange problem with printgamo
    `* Re: Strange problem with printBen Bacarisse
     `- Re: Strange problem with printgamo

1
Strange problem with print

<s8bjcn$c9s$1@gioia.aioe.org>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=118&group=comp.lang.perl.misc#118

  copy link   Newsgroups: comp.lang.perl.misc
Path: i2pn2.org!i2pn.org!aioe.org!3dNlfFrUrV68GduPD6l6+A.user.gioia.aioe.org.POSTED!not-for-mail
From: gamo@telecable.es (gamo)
Newsgroups: comp.lang.perl.misc
Subject: Strange problem with print
Date: Sat, 22 May 2021 20:43:36 +0200
Organization: Aioe.org NNTP Server
Lines: 38
Message-ID: <s8bjcn$c9s$1@gioia.aioe.org>
NNTP-Posting-Host: 3dNlfFrUrV68GduPD6l6+A.user.gioia.aioe.org
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: abuse@aioe.org
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101
Thunderbird/78.8.1
X-Mozilla-News-Host: news://news.aioe.org
X-Notice: Filtered by postfilter v. 0.9.2
Content-Language: es-CO
 by: gamo - Sat, 22 May 2021 18:43 UTC

I have a program like this:

#!/usr/bin/perl -w

$|=1;

while (1){
blah();
if ($success){
localsearch();
report(); # this is OK
}
}

exit 1;

sub report {
system "clear";
print "this $value \n";
print FILE "this $value \n";
return;
}

sub localsearch {
doimprove();
report(); # this is not OK, doesn't seems to work
return;
}

Do you have an explanation to that bahavior?
Thanks!

--
http://gamo.sdf-eu.org/
perl -E 'say "Want a reverse joke? Yes? Begin to laugh.";'

Re: Strange problem with print

<874keuqyci.fsf@bsb.me.uk>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=119&group=comp.lang.perl.misc#119

  copy link   Newsgroups: comp.lang.perl.misc
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: ben.usenet@bsb.me.uk (Ben Bacarisse)
Newsgroups: comp.lang.perl.misc
Subject: Re: Strange problem with print
Date: Sat, 22 May 2021 21:59:09 +0100
Organization: A noiseless patient Spider
Lines: 40
Message-ID: <874keuqyci.fsf@bsb.me.uk>
References: <s8bjcn$c9s$1@gioia.aioe.org>
Mime-Version: 1.0
Content-Type: text/plain
Injection-Info: reader02.eternal-september.org; posting-host="29b02a2ca22c8631c9ed5a55e14384e4";
logging-data="9251"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19CyB6jCXDPMA/xXYCpw85JBe6K9+7siVQ="
Cancel-Lock: sha1:sSQ2Jgs2zOSf4uhjRnd5IJhGydM=
sha1:tMNSQrB5ghEIT3aecc55Pelay8E=
X-BSB-Auth: 1.9aee5fb23f8481067ab4.20210522215909BST.874keuqyci.fsf@bsb.me.uk
 by: Ben Bacarisse - Sat, 22 May 2021 20:59 UTC

gamo <gamo@telecable.es> writes:

> I have a program like this:
>
> #!/usr/bin/perl -w
>
> $|=1;
>
> while (1){
> blah();
> if ($success){
> localsearch();
> report(); # this is OK
> }
> }
>
> exit 1;
>
> sub report {
> system "clear";
> print "this $value \n";
> print FILE "this $value \n";
> return;
> }
>
> sub localsearch {
> doimprove();
> report(); # this is not OK, doesn't seems to work
> return;
> }
>
> Do you have an explanation to that bahavior?

Something is wrong in a part of the program you are not showing us.

Post as short a complete example as you can and trt to say what you mean
by doesn't seem to work.

--
Ben.

Re: Strange problem with print

<s8c28i$f0m$1@gioia.aioe.org>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=120&group=comp.lang.perl.misc#120

  copy link   Newsgroups: comp.lang.perl.misc
Path: i2pn2.org!i2pn.org!aioe.org!3dNlfFrUrV68GduPD6l6+A.user.gioia.aioe.org.POSTED!not-for-mail
From: gamo@telecable.es (gamo)
Newsgroups: comp.lang.perl.misc
Subject: Re: Strange problem with print
Date: Sun, 23 May 2021 00:57:24 +0200
Organization: Aioe.org NNTP Server
Lines: 46
Message-ID: <s8c28i$f0m$1@gioia.aioe.org>
References: <s8bjcn$c9s$1@gioia.aioe.org> <874keuqyci.fsf@bsb.me.uk>
NNTP-Posting-Host: 3dNlfFrUrV68GduPD6l6+A.user.gioia.aioe.org
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Complaints-To: abuse@aioe.org
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101
Thunderbird/78.8.1
X-Notice: Filtered by postfilter v. 0.9.2
Content-Language: es-CO
 by: gamo - Sat, 22 May 2021 22:57 UTC

El 22/5/21 a las 22:59, Ben Bacarisse escribió:
> gamo <gamo@telecable.es> writes:
>
>> I have a program like this:
>>
>> #!/usr/bin/perl -w
>>
>> $|=1;
>>
>> while (1){
>> blah();
>> if ($success){
>> localsearch();
>> report(); # this is OK
>> }
>> }
>>
>> exit 1;
>>
>> sub report {
>> system "clear";
>> print "this $value \n";
>> print FILE "this $value \n";
>> return;
>> }
>>
>> sub localsearch {
>> doimprove();
>> report(); # this is not OK, doesn't seems to work
>> return;
>> }
>>
>> Do you have an explanation to that bahavior?
>
> Something is wrong in a part of the program you are not showing us.
>
> Post as short a complete example as you can and trt to say what you mean
> by doesn't seem to work.
>

Sorry Ben, but I think I wrote the basic structure and the result is
that the screen does not blink at the spected rate.

--
http://gamo.sdf-eu.org/
perl -E 'say "User error. Insert another user.";'

Re: Strange problem with print

<s8c4v3$9bo$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=121&group=comp.lang.perl.misc#121

  copy link   Newsgroups: comp.lang.perl.misc
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: UNews2Bill@RemovEgmail.com ($Bill)
Newsgroups: comp.lang.perl.misc
Subject: Re: Strange problem with print
Date: Sat, 22 May 2021 16:43:31 -0700
Organization: A noiseless patient Spider
Lines: 13
Message-ID: <s8c4v3$9bo$1@dont-email.me>
References: <s8bjcn$c9s$1@gioia.aioe.org> <874keuqyci.fsf@bsb.me.uk>
<s8c28i$f0m$1@gioia.aioe.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=windows-1252; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sat, 22 May 2021 23:43:31 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="9cf09a8dac55183549362cc67b02a8c3";
logging-data="9592"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18GrJVVxDqDY1zrK2557wK/fVsztFdLmyk="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101
Thunderbird/78.10.1
Cancel-Lock: sha1:oh7zhZPlM0dZunS5TJzx3TaE6gM=
In-Reply-To: <s8c28i$f0m$1@gioia.aioe.org>
Content-Language: en-US
 by: $Bill - Sat, 22 May 2021 23:43 UTC

On 05/22/2021 15:57, gamo wrote:
>
> Sorry Ben, but I think I wrote the basic structure and the result is
> that the screen does not blink at the spected rate.

If he can't run it (insufficient code provided), how do you expect him to
debug it for you?

You need to provide the smallest running and failing example possible.
In the process of creating that, you'll probably fix it yourself. ;)

Re: Strange problem with print

<s8c6ge$1o18$1@gioia.aioe.org>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=122&group=comp.lang.perl.misc#122

  copy link   Newsgroups: comp.lang.perl.misc
Path: i2pn2.org!i2pn.org!aioe.org!3dNlfFrUrV68GduPD6l6+A.user.gioia.aioe.org.POSTED!not-for-mail
From: gamo@telecable.es (gamo)
Newsgroups: comp.lang.perl.misc
Subject: Re: Strange problem with print
Date: Sun, 23 May 2021 02:09:52 +0200
Organization: Aioe.org NNTP Server
Lines: 27
Message-ID: <s8c6ge$1o18$1@gioia.aioe.org>
References: <s8bjcn$c9s$1@gioia.aioe.org> <874keuqyci.fsf@bsb.me.uk>
<s8c28i$f0m$1@gioia.aioe.org> <s8c4v3$9bo$1@dont-email.me>
NNTP-Posting-Host: 3dNlfFrUrV68GduPD6l6+A.user.gioia.aioe.org
Mime-Version: 1.0
Content-Type: text/plain; charset=windows-1252; format=flowed
Content-Transfer-Encoding: 8bit
X-Complaints-To: abuse@aioe.org
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101
Thunderbird/78.8.1
X-Notice: Filtered by postfilter v. 0.9.2
Content-Language: es-CO
 by: gamo - Sun, 23 May 2021 00:09 UTC

El 23/5/21 a las 1:43, $Bill escribió:
> On 05/22/2021 15:57, gamo wrote:
>>
>> Sorry Ben, but I think I wrote the basic structure and the result is
>> that the screen does not blink at the spected rate.
>
> If he can't run it (insufficient code provided), how do you expect him to
> debug it for you?
>
> You need to provide the smallest running and failing example possible.
> In the process of creating that, you'll probably fix it yourself.  ;)
>
>
>

Thanks, Bill, that's a good idea, but I could go the other way around
trying to find a replacement to

system "clear";

which I think is the weak point of the chain, and see what happens.

;)

--
http://gamo.sdf-eu.org/
perl -E 'say "Error: The temperature entered is below absolute zero.";'

Re: Strange problem with print

<878s46p7uu.fsf@bsb.me.uk>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=123&group=comp.lang.perl.misc#123

  copy link   Newsgroups: comp.lang.perl.misc
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: ben.usenet@bsb.me.uk (Ben Bacarisse)
Newsgroups: comp.lang.perl.misc
Subject: Re: Strange problem with print
Date: Sun, 23 May 2021 02:16:41 +0100
Organization: A noiseless patient Spider
Lines: 35
Message-ID: <878s46p7uu.fsf@bsb.me.uk>
References: <s8bjcn$c9s$1@gioia.aioe.org> <874keuqyci.fsf@bsb.me.uk>
<s8c28i$f0m$1@gioia.aioe.org> <s8c4v3$9bo$1@dont-email.me>
<s8c6ge$1o18$1@gioia.aioe.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
Injection-Info: reader02.eternal-september.org; posting-host="b75c751656c1abd629ec2397b9c7529b";
logging-data="31581"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+l4B1yJmVwQ0D//VNCHpLALBb7PsezpuI="
Cancel-Lock: sha1:LYLDwrCWFhXDQ+ias10GV3DW1JQ=
sha1:ZnULyb4dc+IwdFGrrOmm3PKf0Vg=
X-BSB-Auth: 1.65218fa3f42486d3c018.20210523021641BST.878s46p7uu.fsf@bsb.me.uk
 by: Ben Bacarisse - Sun, 23 May 2021 01:16 UTC

gamo <gamo@telecable.es> writes:

> El 23/5/21 a las 1:43, $Bill escribió:
>> On 05/22/2021 15:57, gamo wrote:
>>>
>>> Sorry Ben, but I think I wrote the basic structure and the result is
>>> that the screen does not blink at the spected rate.
>>
>> If he can't run it (insufficient code provided), how do you expect him to
>> debug it for you?
>>
>> You need to provide the smallest running and failing example possible.
>> In the process of creating that, you'll probably fix it yourself.  ;)
>
> Thanks, Bill, that's a good idea, but I could go the other way around
> trying to find a replacement to
>
> system "clear";
>
> which I think is the weak point of the chain, and see what happens.

You may be able to capture the control sequence that clear uses so you
don't have to run a command every time:

my $cls = `clear`;
....
print $cls, "this $value\n";

or you can use $cls = `tput clear` if you have the tput command.

But I imagine the problem is to do with the timing since you are
probably relying on a software emulation of a terminal.

--
Ben.

Re: Strange problem with print

<s8cbhj$17i8$1@gioia.aioe.org>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=124&group=comp.lang.perl.misc#124

  copy link   Newsgroups: comp.lang.perl.misc
Path: i2pn2.org!i2pn.org!aioe.org!3dNlfFrUrV68GduPD6l6+A.user.gioia.aioe.org.POSTED!not-for-mail
From: gamo@telecable.es (gamo)
Newsgroups: comp.lang.perl.misc
Subject: Re: Strange problem with print
Date: Sun, 23 May 2021 03:35:50 +0200
Organization: Aioe.org NNTP Server
Lines: 29
Message-ID: <s8cbhj$17i8$1@gioia.aioe.org>
References: <s8bjcn$c9s$1@gioia.aioe.org> <874keuqyci.fsf@bsb.me.uk>
<s8c28i$f0m$1@gioia.aioe.org> <s8c4v3$9bo$1@dont-email.me>
<s8c6ge$1o18$1@gioia.aioe.org> <878s46p7uu.fsf@bsb.me.uk>
NNTP-Posting-Host: 3dNlfFrUrV68GduPD6l6+A.user.gioia.aioe.org
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Complaints-To: abuse@aioe.org
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101
Thunderbird/78.8.1
Content-Language: es-CO
X-Notice: Filtered by postfilter v. 0.9.2
 by: gamo - Sun, 23 May 2021 01:35 UTC

El 23/5/21 a las 3:16, Ben Bacarisse escribió:
>> Thanks, Bill, that's a good idea, but I could go the other way around
>> trying to find a replacement to
>>
>> system "clear";
>>
>> which I think is the weak point of the chain, and see what happens.
> You may be able to capture the control sequence that clear uses so you
> don't have to run a command every time:
>
> my $cls = `clear`;
> ...
> print $cls, "this $value\n";
>
> or you can use $cls = `tput clear` if you have the tput command.
>
> But I imagine the problem is to do with the timing since you are
> probably relying on a software emulation of a terminal.
>

I found a good alternative that does the job with no blink at all:

printf "\033c";

Thanks!

--
http://gamo.sdf-eu.org/
perl -E 'say "free + return give me the setence: FISH RAM";'


devel / comp.lang.perl.misc / Strange problem with print

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor