Rocksolid Light

News from da outaworlds

mail  files  register  groups  login

Message-ID:  

BOFH excuse #350: paradigm shift...without a clutch


comp / comp.lang.tcl / Re: how to use diagram-viewer and the diagram pkg

SubjectAuthor
* how to use diagram-viewer and the diagram pkgMark Summerfield
`* Re: how to use diagram-viewer and the diagram pkgMark Summerfield
 `* Re: how to use diagram-viewer and the diagram pkgAndreas Leitgeb
  `* Re: how to use diagram-viewer and the diagram pkgHarald Oehlmann
   +- Re: how to use diagram-viewer and the diagram pkgMark Summerfield
   `- Re: how to use diagram-viewer and the diagram pkgAndreas Leitgeb

1
Subject: how to use diagram-viewer and the diagram pkg
From: Mark Summerfield
Newsgroups: comp.lang.tcl
Date: Wed, 17 Jul 2024 07:33 UTC
Path: eternal-september.org!news.eternal-september.org!feeder3.eternal-september.org!border-3.nntp.ord.giganews.com!border-1.nntp.ord.giganews.com!nntp.giganews.com!Xl.tags.giganews.com!local-1.nntp.ord.giganews.com!nntp.brightview.co.uk!news.brightview.co.uk.POSTED!not-for-mail
NNTP-Posting-Date: Wed, 17 Jul 2024 07:33:22 +0000
From: mark@qtrac.eu (Mark Summerfield)
Subject: how to use diagram-viewer and the diagram pkg
Newsgroups: comp.lang.tcl
MIME-Version: 1.0
User-Agent: Pan/0.154 (Izium; 517acf4)
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Message-ID: <N12dnfwNvY5f7gr7nZ2dnZfqnPadnZ2d@brightview.co.uk>
Date: Wed, 17 Jul 2024 07:33:22 +0000
Lines: 24
X-Usenet-Provider: http://www.giganews.com
X-Trace: sv3-DAt1TrysmXBVFc7X2Tiq4PfQ56SZwJxidhoMF5vbe2nNtymnJCWM1fnw5EWaBiS13ddhzbhJJLxqj3K!WPEV0PQ/ITth44/vvyOZY/yOSjruJUkRZAlwYepsktlG3LQLdWMoJLPn9ZNQP63SXdLURQtI96KQ!8ZOGEN4xZ3hHMN7lAxVXDMKjvQ==
X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers
X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly
X-Postfilter: 1.3.40
View all headers

I would like to try out the diagram-viewer app and the diagram pkg.
I am using Tcl/Tk 9.0b2 on Linux.

Given file /tmp/a.dia (copied from the tclwiki):

box A
arrow "" 40
circle B
direction SE

I tried this at the command line:

$ wish9 ~/opt/tcl9/bin/diagram-viewer show /tmp/a.dia
Creating safe environment, please wait...
/home/mark/opt/tcl9/bin/diagram-viewer: can't find package diagram
$ wish9
% package require diagram
1

As you can see, diagram-viewer can't find the diagram package even though
it is there.

Nor can I find any other examples of the diagram language nor what file
extension one should use.

Subject: Re: how to use diagram-viewer and the diagram pkg
From: Mark Summerfield
Newsgroups: comp.lang.tcl
Date: Wed, 17 Jul 2024 07:35 UTC
References: 1
Path: eternal-september.org!news.eternal-september.org!feeder3.eternal-september.org!border-1.nntp.ord.giganews.com!local-4.nntp.ord.giganews.com!border-4.nntp.ord.giganews.com!nntp.giganews.com!Xl.tags.giganews.com!local-2.nntp.ord.giganews.com!nntp.brightview.co.uk!news.brightview.co.uk.POSTED!not-for-mail
NNTP-Posting-Date: Wed, 17 Jul 2024 07:35:54 +0000
From: mark@qtrac.eu (Mark Summerfield)
Subject: Re: how to use diagram-viewer and the diagram pkg
Newsgroups: comp.lang.tcl
References: <N12dnfwNvY5f7gr7nZ2dnZfqnPadnZ2d@brightview.co.uk>
MIME-Version: 1.0
User-Agent: Pan/0.154 (Izium; 517acf4)
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Message-ID: <N12dnf8NvY7H6Qr7nZ2dnZfqnPYAAAAA@brightview.co.uk>
Date: Wed, 17 Jul 2024 07:35:54 +0000
Lines: 37
X-Usenet-Provider: http://www.giganews.com
X-Trace: sv3-r6taCOdaFnM/DW8WapQyS4az8M3t9E9TNuftPxjuO/o0BnGNjysN6d0MhdU/IAqxfZhPgYzTTpFayVb!pZyCXa1SN6o2c0jAjtwyQ2IgfS22MqjHu8ADsU9zChBiltNkw9HI/6iLrIPz1I0fTcNZitp0NGz9!LpQoLo+Cs6EiECQMXmR/6/2gPQ==
X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers
X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly
X-Postfilter: 1.3.40
View all headers

On Wed, 17 Jul 2024 07:33:22 +0000, Mark Summerfield wrote:

> I would like to try out the diagram-viewer app and the diagram pkg.
> I am using Tcl/Tk 9.0b2 on Linux.
[snip]
> As you can see, diagram-viewer can't find the diagram package even
> though it is there.
>
> Nor can I find any other examples of the diagram language nor what file
> extension one should use.

Sorry, keep forgetting that the Pan newsreader's editor eats (selected)
newlines:

The file /tmp/a.dia is (with no blank lines):

box A

arrow "" 40

circle B

direction SE

And the console interaction (again with no blank lines):

$ wish9 ~/opt/tcl9/bin/diagram-viewer show /tmp/a.dia

Creating safe environment, please wait...

/home/mark/opt/tcl9/bin/diagram-viewer: can't find package diagram

$ wish9

% package require diagram

1

Subject: Re: how to use diagram-viewer and the diagram pkg
From: Andreas Leitgeb
Newsgroups: comp.lang.tcl
Organization: A noiseless patient Spider
Date: Wed, 17 Jul 2024 08:15 UTC
References: 1 2
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: avl@logic.at (Andreas Leitgeb)
Newsgroups: comp.lang.tcl
Subject: Re: how to use diagram-viewer and the diagram pkg
Date: Wed, 17 Jul 2024 08:15:36 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 20
Message-ID: <slrnv9evd8.1l9n7.avl@logic.at>
References: <N12dnfwNvY5f7gr7nZ2dnZfqnPadnZ2d@brightview.co.uk>
<N12dnf8NvY7H6Qr7nZ2dnZfqnPYAAAAA@brightview.co.uk>
Reply-To: avl@logic.at
Injection-Date: Wed, 17 Jul 2024 10:15:36 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="27f5daf1c0338e6034a2765519da7d32";
logging-data="1841433"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18Nl33uzKhbe5usTSequAP9"
User-Agent: slrn/1.0.3 (Linux)
Cancel-Lock: sha1:eM2gHhN7NeqnxxekXwT7k8zE1r8=
View all headers

Mark Summerfield <mark@qtrac.eu> wrote:
> $ wish9 ~/opt/tcl9/bin/diagram-viewer show /tmp/a.dia
> Creating safe environment, please wait...
> /home/mark/opt/tcl9/bin/diagram-viewer: can't find package diagram
> $ wish9
> % package require diagram
> 1

The "Creating safe environment, please wait..." might be the key here.
Check what the diagram viewer does after emitting that line, and see
if you can still "package require diagram" in that context.

If the "safe environment" is related to a safe interpreter,
you might need to add more code to the diagram-viewer to
allow the safe interp to load that particular package.

If I had it in my head, I'd write it - I hope someone else
can describe the extra "magic" needed to enable a package
in a safe interp.

Subject: Re: how to use diagram-viewer and the diagram pkg
From: Harald Oehlmann
Newsgroups: comp.lang.tcl
Organization: A noiseless patient Spider
Date: Wed, 17 Jul 2024 11:16 UTC
References: 1 2 3
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: wortkarg3@yahoo.com (Harald Oehlmann)
Newsgroups: comp.lang.tcl
Subject: Re: how to use diagram-viewer and the diagram pkg
Date: Wed, 17 Jul 2024 13:16:04 +0200
Organization: A noiseless patient Spider
Lines: 27
Message-ID: <v7895k$1nju1$1@dont-email.me>
References: <N12dnfwNvY5f7gr7nZ2dnZfqnPadnZ2d@brightview.co.uk>
<N12dnf8NvY7H6Qr7nZ2dnZfqnPYAAAAA@brightview.co.uk>
<slrnv9evd8.1l9n7.avl@logic.at>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 17 Jul 2024 13:16:04 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="ecb0065664aaca7c73ef535440a93108";
logging-data="1822657"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+vX295H3VQDGsQAAWe1bNe"
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:eq/8NzizKinxJ4LyZFjaJp5sYRE=
In-Reply-To: <slrnv9evd8.1l9n7.avl@logic.at>
Content-Language: en-GB
View all headers

Am 17.07.2024 um 10:15 schrieb Andreas Leitgeb:
> Mark Summerfield <mark@qtrac.eu> wrote:
>> $ wish9 ~/opt/tcl9/bin/diagram-viewer show /tmp/a.dia
>> Creating safe environment, please wait...
>> /home/mark/opt/tcl9/bin/diagram-viewer: can't find package diagram
>> $ wish9
>> % package require diagram
>> 1
>
> The "Creating safe environment, please wait..." might be the key here.
> Check what the diagram viewer does after emitting that line, and see
> if you can still "package require diagram" in that context.
>
> If the "safe environment" is related to a safe interpreter,
> you might need to add more code to the diagram-viewer to
> allow the safe interp to load that particular package.
>
> If I had it in my head, I'd write it - I hope someone else
> can describe the extra "magic" needed to enable a package
> in a safe interp.
>

May you identify the "pckIndex.tcl" file of the package and post it here?
It may contain code to exclude TCL9...

Take care,
Harald

Subject: Re: how to use diagram-viewer and the diagram pkg
From: Mark Summerfield
Newsgroups: comp.lang.tcl
Date: Fri, 19 Jul 2024 07:22 UTC
References: 1 2 3 4
Path: eternal-september.org!news.eternal-september.org!feeder3.eternal-september.org!border-4.nntp.ord.giganews.com!nntp.giganews.com!Xl.tags.giganews.com!local-1.nntp.ord.giganews.com!nntp.brightview.co.uk!news.brightview.co.uk.POSTED!not-for-mail
NNTP-Posting-Date: Fri, 19 Jul 2024 07:22:06 +0000
From: mark@qtrac.eu (Mark Summerfield)
Subject: Re: how to use diagram-viewer and the diagram pkg
Newsgroups: comp.lang.tcl
References: <N12dnfwNvY5f7gr7nZ2dnZfqnPadnZ2d@brightview.co.uk>
<N12dnf8NvY7H6Qr7nZ2dnZfqnPYAAAAA@brightview.co.uk>
<slrnv9evd8.1l9n7.avl@logic.at> <v7895k$1nju1$1@dont-email.me>
MIME-Version: 1.0
User-Agent: Pan/0.154 (Izium; 517acf4)
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Message-ID: <bqmcndVG65CDiQf7nZ2dnZfqn_adnZ2d@brightview.co.uk>
Date: Fri, 19 Jul 2024 07:22:06 +0000
Lines: 15
X-Usenet-Provider: http://www.giganews.com
X-Trace: sv3-N9J6eXGdFnArAM/auTogofL//D8PHvAQHzz6dR6m20hqGFSnzdBegYQ4kRQy7TqYcSpV5ON3L//cypy!g47CVeT1fVMP3HmNuJrq9cM/w7+cF2PDfUrl6srOqPtLbSQp72L0mbdkueZESsybSbyiFZ/mey7q!7j9TvNYMdI3QMQhwpY6sNYZtDw==
X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers
X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly
X-Postfilter: 1.3.40
View all headers

On Wed, 17 Jul 2024 13:16:04 +0200, Harald Oehlmann wrote:
[snip]
> May you identify the "pckIndex.tcl" file of the package and post it
> here?
> It may contain code to exclude TCL9...

I installed Tcl 9.0b2 in ~/opt/tcl9, then installed Tk 9.0b2 in the same
place then installed the trunk versions of Tcllib and Tklib using their
installers run using wish9 (my link to ~/opt/tcl9/bin/wish9.0).

The diagram-viewer was installed by this process in ~/opt/tcl9/bin and
that dir has no pkgIndex.tcl file.

In other words I just did a standard install.

Subject: Re: how to use diagram-viewer and the diagram pkg
From: Andreas Leitgeb
Newsgroups: comp.lang.tcl
Organization: A noiseless patient Spider
Date: Fri, 19 Jul 2024 12:26 UTC
References: 1 2 3 4
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: avl@logic.at (Andreas Leitgeb)
Newsgroups: comp.lang.tcl
Subject: Re: how to use diagram-viewer and the diagram pkg
Date: Fri, 19 Jul 2024 12:26:50 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 31
Message-ID: <slrnv9kmsa.1l9n7.avl@logic.at>
References: <N12dnfwNvY5f7gr7nZ2dnZfqnPadnZ2d@brightview.co.uk>
<N12dnf8NvY7H6Qr7nZ2dnZfqnPYAAAAA@brightview.co.uk>
<slrnv9evd8.1l9n7.avl@logic.at> <v7895k$1nju1$1@dont-email.me>
Reply-To: avl@logic.at
Injection-Date: Fri, 19 Jul 2024 14:26:50 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="39a8c58c182f8f217037911c33ead0a7";
logging-data="3141450"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/9RPnJ3kfgvQvg6NEaMqXS"
User-Agent: slrn/1.0.3 (Linux)
Cancel-Lock: sha1:zTE6P0c7idZYNmR/IHQaCkSjUPM=
View all headers

Harald Oehlmann <wortkarg3@yahoo.com> wrote:
> Am 17.07.2024 um 10:15 schrieb Andreas Leitgeb:
>> Mark Summerfield <mark@qtrac.eu> wrote:
>>> $ wish9 ~/opt/tcl9/bin/diagram-viewer show /tmp/a.dia
>>> Creating safe environment, please wait...
>>> /home/mark/opt/tcl9/bin/diagram-viewer: can't find package diagram
>>> $ wish9
>>> % package require diagram
>>> 1
>>
>> The "Creating safe environment, please wait..." might be the key here.
>> Check what the diagram viewer does after emitting that line, and see
>> if you can still "package require diagram" in that context.
>>
>> If the "safe environment" is related to a safe interpreter,
>> you might need to add more code to the diagram-viewer to
>> allow the safe interp to load that particular package.
>>
>> If I had it in my head, I'd write it - I hope someone else
>> can describe the extra "magic" needed to enable a package
>> in a safe interp.
>
> May you identify the "pckIndex.tcl" file of the package and post it here?
> It may contain code to exclude TCL9...

I think we can exclude that possibility, because the package apparently
does load successfully in an interactive wish9.

Mark, if you skipped a few post and just read the last one, consider
what I wrote about safe interpreters.

1

rocksolid light 0.9.8
clearnet tor