Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

It's currently a problem of access to gigabits through punybaud. -- J. C. R. Licklider


devel / comp.lang.tcl / Re: tcl::chan::memchan and truncate

SubjectAuthor
* tcl::chan::memchan and truncateaotto1968
`* Re: tcl::chan::memchan and truncateaotto1968
 `* Re: tcl::chan::memchan and truncateRich
  `- Re: tcl::chan::memchan and truncateChristian Werner

1
tcl::chan::memchan and truncate

<t6u5ik$o0d$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.tcl
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: aotto1968@t-online.de (aotto1968)
Newsgroups: comp.lang.tcl
Subject: tcl::chan::memchan and truncate
Date: Sat, 28 May 2022 23:52:20 +0200
Organization: A noiseless patient Spider
Lines: 33
Message-ID: <t6u5ik$o0d$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Sat, 28 May 2022 21:52:21 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="9301551373d2eafd95b90f18df955465";
logging-data="24589"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX194IJXZPjBK+oNAYMeQocpD2WOQT1tcdsE="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101
Thunderbird/91.9.1
Cancel-Lock: sha1:CxC7zPx0D0arcVQBejFI5TiLMTU=
Content-Language: en-US
 by: aotto1968 - Sat, 28 May 2022 21:52 UTC

hi

I replace some part of my code with tcl::chan::memchan and figure out
that there is an error:

error during truncate on "rc0": invalid argument
while executing
"chan truncate $FR 0"

It seems that tcl::chan::memchan does NOT support truncate.
but now I have a problem because I want to replace the
entire memchan space with new data and the new data is !! shorter !!
(in the example the FR is the tcl::chan::memchan)

chan truncate $FR 0 → error!

chan seek $FW 0
chan seek $FR 0
chan copy $FW $FR

without "truncate" the FR has now extra lines at the end.

question:

1) can I add an EOF character at the end of FR ?
2) is there an other way to "truncate" the memchan ?

https://core.tcl-lang.org/tcllib/doc/tcllib-1-18/embedded/www/tcllib/files/modules/virtchannel_base/tcllib_memchan.html

mfg AO

Re: tcl::chan::memchan and truncate

<t6v8pp$nfk$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.tcl
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: aotto1968@t-online.de (aotto1968)
Newsgroups: comp.lang.tcl
Subject: Re: tcl::chan::memchan and truncate
Date: Sun, 29 May 2022 09:53:28 +0200
Organization: A noiseless patient Spider
Lines: 22
Message-ID: <t6v8pp$nfk$1@dont-email.me>
References: <t6u5ik$o0d$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Sun, 29 May 2022 07:53:29 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="c96a560f1a895498340b7db57858d5d8";
logging-data="24052"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX187MUAG79muF/rZKg7Uu4ZrpfAhHWfM0uo="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101
Thunderbird/91.9.1
Cancel-Lock: sha1:s80Aj97AODA7cSBqz9rOzYPJv8s=
In-Reply-To: <t6u5ik$o0d$1@dont-email.me>
Content-Language: en-US
 by: aotto1968 - Sun, 29 May 2022 07:53 UTC

On 28.05.22 23:52, aotto1968 wrote:
~~
>
> without "truncate" the FR has now extra lines at the end.
>
> question:
>
> 1) can I add an EOF character at the end of FR ?
> 2) is there an other way to "truncate" the memchan ?
>
>
>
https://core.tcl-lang.org/tcllib/doc/tcllib-1-18/embedded/www/tcllib/files/modules/virtchannel_base/tcllib_memchan.html

There is a workaround to use "tcl::chan::variable VARNAME" and on
"trucate" to set this variable to ""

→ a lot of extra code required to simulate a missing "truncate"

mfg.

Re: tcl::chan::memchan and truncate

<t702o0$2ao$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.tcl
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: rich@example.invalid (Rich)
Newsgroups: comp.lang.tcl
Subject: Re: tcl::chan::memchan and truncate
Date: Sun, 29 May 2022 15:16:16 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 20
Message-ID: <t702o0$2ao$1@dont-email.me>
References: <t6u5ik$o0d$1@dont-email.me> <t6v8pp$nfk$1@dont-email.me>
Injection-Date: Sun, 29 May 2022 15:16:16 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="8845a62c78a5df6666e20572a36b8db9";
logging-data="2392"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX180uxhDN63aJZwiCTYn0Ajw"
User-Agent: tin/2.0.1-20111224 ("Achenvoir") (UNIX) (Linux/3.10.17 (x86_64))
Cancel-Lock: sha1:8ZGNdQgbEMAIez/MTbEw5BG9Fr4=
 by: Rich - Sun, 29 May 2022 15:16 UTC

aotto1968 <aotto1968@t-online.de> wrote:
> On 28.05.22 23:52, aotto1968 wrote:
> ~~
> >
> > without "truncate" the FR has now extra lines at the end.
> >
> https://core.tcl-lang.org/tcllib/doc/tcllib-1-18/embedded/www/tcllib/files/modules/virtchannel_base/tcllib_memchan.html
>
> There is a workaround to use "tcl::chan::variable VARNAME" and on
> "trucate" to set this variable to ""
>
> ? a lot of extra code required to simulate a missing "truncate"

memchan is part of Tcllib, which means you have the full source.

Fix the code to support truncate and submit a patch to the maintainer.

Which is rather the point of open source, if something /you/ need is
not present, /you/ have the ability to actually add it, fixing the
issue for yourself, and everyone else who might need it in the future.

Re: tcl::chan::memchan and truncate

<eb72a44a-c6a4-476f-942c-25827cfbde02n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.tcl
X-Received: by 2002:a05:6214:19c5:b0:462:563e:7c4b with SMTP id j5-20020a05621419c500b00462563e7c4bmr23808656qvc.46.1653840143118;
Sun, 29 May 2022 09:02:23 -0700 (PDT)
X-Received: by 2002:a05:6808:148b:b0:32b:9960:857f with SMTP id
e11-20020a056808148b00b0032b9960857fmr8064417oiw.201.1653840142884; Sun, 29
May 2022 09:02:22 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.tcl
Date: Sun, 29 May 2022 09:02:22 -0700 (PDT)
In-Reply-To: <t702o0$2ao$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=80.142.203.57; posting-account=wi8XUAkAAADhgxlOTzYRDqsuN4By_ngW
NNTP-Posting-Host: 80.142.203.57
References: <t6u5ik$o0d$1@dont-email.me> <t6v8pp$nfk$1@dont-email.me> <t702o0$2ao$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <eb72a44a-c6a4-476f-942c-25827cfbde02n@googlegroups.com>
Subject: Re: tcl::chan::memchan and truncate
From: undroidwish@gmail.com (Christian Werner)
Injection-Date: Sun, 29 May 2022 16:02:23 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 1328
 by: Christian Werner - Sun, 29 May 2022 16:02 UTC

There's already a ticket with a patch plus a branch with an implementation.
For further information start at https://core.tcl-lang.org/tcllib/tktview/1985a342552755d5aa4c

HTH,
Christian


devel / comp.lang.tcl / Re: tcl::chan::memchan and truncate

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor