Rocksolid Light

News from da outaworlds

mail  files  register  groups  login

Message-ID:  

Good day for a change of scene. Repaper the bedroom wall.


comp / comp.lang.tcl / ANNOUNCE: cookbox 1.0.0

SubjectAuthor
* ANNOUNCE: cookbox 1.0.0Konstantin Kushnir
`* Re: ANNOUNCE: cookbox 1.0.0Ashok
 `- Re: ANNOUNCE: cookbox 1.0.0Konstantin Kushnir

1
Subject: ANNOUNCE: cookbox 1.0.0
From: Konstantin Kushnir
Newsgroups: comp.lang.tcl
Organization: A noiseless patient Spider
Date: Sat, 3 Aug 2024 12:23 UTC
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: chpock@gmail.com (Konstantin Kushnir)
Newsgroups: comp.lang.tcl
Subject: ANNOUNCE: cookbox 1.0.0
Date: Sat, 3 Aug 2024 15:23:59 +0300
Organization: A noiseless patient Spider
Lines: 82
Message-ID: <20240803152359.f6527aa15ca061fd7b2fdcb7@gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Injection-Date: Sat, 03 Aug 2024 14:24:00 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="c7e2acba8762033ca8072cc2230c6185";
logging-data="2945207"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+XSUVREr+LhmZlcso+7aV+"
Cancel-Lock: sha1:rZmNSy+nr6373q8ZNWGl+ZYhA5o=
X-Newsreader: Sylpheed 3.7.0 (GTK+ 2.24.30; i686-pc-mingw32)
View all headers

Hi Everyone!

I'd like to announce a small example of practical use of the cookfs
package (https://github.com/chpock/cookfs) in applications.

Here is cookbox.

It is an utility to pack, unpack, view cookfs archives, and more...

The following examples are demonstrated in this utility:

* how to create a cookfs archive with Tcl runtime libraries/scripts and
application scripts during the build process
* how to use cookfs and build a single executable with Tcl interpreter,
Tcl runtime scripts, application scripts
* how to use cookfs from Tcl scripts to store data

The modes of packing, unpacking and viewing archives are similar to the
GNU tar utility and will most likely be very familiar to you. Tcl
hackers will be more interested in the additional modes:

Run interactive Tcl shell (-shell)
====

tclsh with TclReadLine is bundled and can be run interactively. For
example:

$ ./cookbox --shell
> set tcl_patchLevel
9.0b3
> puts "Hello world!"
Hello world!

> exit

Evaluate the provided script or file (--eval)
====

Using this option it is possible to execute a Tcl script from the
command line or a file. For example:

$ ./cookbox --eval 'puts "Hello world!"'
Hello world!

or

$ cat script.tcl
puts "Hello World!"
$ ./cookbox --eval -f script.tcl
Hello World!

Wrap files to an executable (--cookinize)
====

Using this option, it is possible to make an executable file from a Tcl
script. Use the file name main.tcl as it is this file in the archive
that runs automatically at startup. For example:

$ cat main.tcl
puts "Hello World!"
$ ./cookbox --cookinize -f myapplication main.tcl
$ ./myapplication
Hello World!

Analyze an archive (--analyze)
====

Using this option it is possible to check the content of an archive.
For example, in this case cookbox will show its own content:

$ ./cookbox --analyze -f cookbox
<here is an output of coobox archive content>

Full examples with details, build instructions and binaries for
platforms Linux, Windows, MacOS are available on the corresponding
github page: https://github.com/chpock/cookbox

Please fill free to check/build/use it. Any feedback is welcome!

--
Best regards,
Konstantin Kushnir

Subject: Re: ANNOUNCE: cookbox 1.0.0
From: Ashok
Newsgroups: comp.lang.tcl
Organization: A noiseless patient Spider
Date: Mon, 5 Aug 2024 11:42 UTC
References: 1
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: apnmbx-public@yahoo.com (Ashok)
Newsgroups: comp.lang.tcl
Subject: Re: ANNOUNCE: cookbox 1.0.0
Date: Mon, 5 Aug 2024 17:12:13 +0530
Organization: A noiseless patient Spider
Lines: 88
Message-ID: <v8qdqk$lc9u$2@dont-email.me>
References: <20240803152359.f6527aa15ca061fd7b2fdcb7@gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Mon, 05 Aug 2024 13:42:13 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="e154b0129f7226a5c4345a857ff24619";
logging-data="700734"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/cxtGg5AqKOr7v/gsukBjq"
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:JMLhB4Jd7T71O0yb1/BEAnxzWuY=
In-Reply-To: <20240803152359.f6527aa15ca061fd7b2fdcb7@gmail.com>
Content-Language: en-US
View all headers

Quite impressive for what is only supposed to be a demo!

When using --cookinize with Tcl 9.0 does it replace the ZIP that Tcl 9
attaches to the executable/shared library with its own archive?

/Ashok

On 8/3/2024 5:53 PM, Konstantin Kushnir wrote:
> Hi Everyone!
>
> I'd like to announce a small example of practical use of the cookfs
> package (https://github.com/chpock/cookfs) in applications.
>
> Here is cookbox.
>
> It is an utility to pack, unpack, view cookfs archives, and more...
>
> The following examples are demonstrated in this utility:
>
> * how to create a cookfs archive with Tcl runtime libraries/scripts and
> application scripts during the build process
> * how to use cookfs and build a single executable with Tcl interpreter,
> Tcl runtime scripts, application scripts
> * how to use cookfs from Tcl scripts to store data
>
> The modes of packing, unpacking and viewing archives are similar to the
> GNU tar utility and will most likely be very familiar to you. Tcl
> hackers will be more interested in the additional modes:
>
> Run interactive Tcl shell (-shell)
> ====
>
> tclsh with TclReadLine is bundled and can be run interactively. For
> example:
>
> $ ./cookbox --shell
>> set tcl_patchLevel
> 9.0b3
>> puts "Hello world!"
> Hello world!
>
>> exit
>
> Evaluate the provided script or file (--eval)
> ====
>
> Using this option it is possible to execute a Tcl script from the
> command line or a file. For example:
>
> $ ./cookbox --eval 'puts "Hello world!"'
> Hello world!
>
> or
>
> $ cat script.tcl
> puts "Hello World!"
> $ ./cookbox --eval -f script.tcl
> Hello World!
>
> Wrap files to an executable (--cookinize)
> ====
>
> Using this option, it is possible to make an executable file from a Tcl
> script. Use the file name main.tcl as it is this file in the archive
> that runs automatically at startup. For example:
>
> $ cat main.tcl
> puts "Hello World!"
> $ ./cookbox --cookinize -f myapplication main.tcl
> $ ./myapplication
> Hello World!
>
> Analyze an archive (--analyze)
> ====
>
> Using this option it is possible to check the content of an archive.
> For example, in this case cookbox will show its own content:
>
> $ ./cookbox --analyze -f cookbox
> <here is an output of coobox archive content>
>
> Full examples with details, build instructions and binaries for
> platforms Linux, Windows, MacOS are available on the corresponding
> github page: https://github.com/chpock/cookbox
>
> Please fill free to check/build/use it. Any feedback is welcome!
>

Subject: Re: ANNOUNCE: cookbox 1.0.0
From: Konstantin Kushnir
Newsgroups: comp.lang.tcl
Organization: A noiseless patient Spider
Date: Mon, 5 Aug 2024 21:46 UTC
References: 1 2
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: chpock@gmail.com (Konstantin Kushnir)
Newsgroups: comp.lang.tcl
Subject: Re: ANNOUNCE: cookbox 1.0.0
Date: Tue, 6 Aug 2024 00:46:13 +0300
Organization: A noiseless patient Spider
Lines: 17
Message-ID: <20240806004613.b88904543c50ae18f6df963f@gmail.com>
References: <20240803152359.f6527aa15ca061fd7b2fdcb7@gmail.com>
<v8qdqk$lc9u$2@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Injection-Date: Mon, 05 Aug 2024 23:46:14 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="b979ca8b403cfb199aca5c6c7ada2778";
logging-data="951186"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+hBp4crawYS8Eu0tr5dDzb"
Cancel-Lock: sha1:YznnSsBbGI3TVldIrqg9d76NbNM=
X-Newsreader: Sylpheed 3.7.0 (GTK+ 2.24.30; i686-pc-mingw32)
View all headers

On Mon, 5 Aug 2024 17:12:13 +0530
Ashok <apnmbx-public@yahoo.com> wrote:

> Quite impressive for what is only supposed to be a demo!

Thank you!

> When using --cookinize with Tcl 9.0 does it replace the ZIP that Tcl 9
> attaches to the executable/shared library with its own archive?

Yes, it is actually one aspect of the demo - how to use cookfs package
and cookfs archive as storage for Tcl runtime files. It can be used
just like zipfs in Tcl9, but with much more features and flexibility.

--
Best regards,
Konstantin Kushnir

1

rocksolid light 0.9.8
clearnet tor