• ANNOUNCE: cookit v2.2.0

    From Konstantin Kushnir@chpock@gmail.com to comp.lang.tcl on Fri Sep 27 17:56:48 2024
    From Newsgroup: comp.lang.tcl

    Hi Everyone!

    I am pleased to announce version 2.2.0 of cookit - tclkit-like Tcl
    runtime environment with Tcl 8.6.15 and Tcl 9.0.0 with a focus on a
    balance between functionality and executable size

    Homepage and downloads are on github: https://github.com/chpock/cookit

    Here is just a basic description of it. All details can be found on the
    website home page.

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

    =====================================================================

    Cookit is a Tcl/Tk runtime environment similar to tclkit with a focus
    on a balance between functionality and executable size. It allows using
    Tcl/Tk in both console mode and graphical mode to run Tcl scripts, as
    well as packaging applications into a single executable without
    external dependencies.

    Cookit is a single executable file that contains:

    * Tcl/Tk version 8.6.15 (with Threads enabled) or 9.0.0
    * Statically linked packages: cookfs, tclvfs, Threads, tclmtls, tdom,
    twapi (for Windows platform)
    * Other packages: tkcon

    Supported platforms:

    * Linux x86 / x86_64
    * Windows x86 / x86_64
    * macOS x86_64

    This means that Cookit can be easily and simply used to develop both
    console and GUI applications, which can be multi-threaded, send HTTPS
    requests to third-party services, process the received JSON/XML
    response with tdom. For debugging in GUI mode a convenient and uniform
    on all platforms console tkcon is available. After development, the
    application can be packaged into a single executable file without
    dependencies and used in other environments as a standalone application.

    It can also be used as a replacement for tclsh/wish.

    At the same time, the executable file has minimal size.

    * for Linux platform: executable file without Tk - about 1.1MB,
    executable file with Tk - about 1.7MB
    * for Windows platform: executable without Tk - about 1.5MB,
    executable with Tk - about 2MB.

    This is an amazing size considering the ability to create GUI
    applications with support for SSL/TLS connections, work with JSON/XML documents, extensive access to WinAPI using twapi on Windows platform.
    In normal installations, only the size of the OpenSSL library will be 2
    times larger.

    As a use case, consider an internal installer that works in both
    console and GUI mode and contains the same code for all platforms. This installer uses the REST GitHub API via HTTPS to get information about
    the latest available release, uses tdom to parse the JSON response,
    downloads a platform-appropriate tar.gz archive from GitHub releases
    using HTTPS, mounts the resulting tar.gz archive using tclvfs and
    extracts the necessary files to the destination directory.
    --
    Best regards,
    Konstantin Kushnir
    --- Synchronet 3.20a-Linux NewsLink 1.114
  • From Ashok@apnmbx-public@yahoo.com to comp.lang.tcl on Sat Sep 28 09:04:39 2024
    From Newsgroup: comp.lang.tcl

    Looking quite exciting and plan to check it out over the weekend.

    Some initial questions -

    - Am I right that because the packages (tdom, twapi) are statically
    linked, the shared libraries do not need to be written to disk before
    loading? That would be a big win.
    - It would be nice to have sqlite3, if not TDBC.
    - I did not understand the section about the installer. If it is a
    single file exe, why the installer?
    - The wiki cookit page references the old repository.

    /Ashok

    On 9/27/2024 8:26 PM, Konstantin Kushnir wrote:
    Hi Everyone!

    I am pleased to announce version 2.2.0 of cookit - tclkit-like Tcl
    runtime environment with Tcl 8.6.15 and Tcl 9.0.0 with a focus on a
    balance between functionality and executable size

    Homepage and downloads are on github: https://github.com/chpock/cookit

    Here is just a basic description of it. All details can be found on the website home page.

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

    =====================================================================

    Cookit is a Tcl/Tk runtime environment similar to tclkit with a focus
    on a balance between functionality and executable size. It allows using Tcl/Tk in both console mode and graphical mode to run Tcl scripts, as
    well as packaging applications into a single executable without
    external dependencies.

    Cookit is a single executable file that contains:

    * Tcl/Tk version 8.6.15 (with Threads enabled) or 9.0.0
    * Statically linked packages: cookfs, tclvfs, Threads, tclmtls, tdom,
    twapi (for Windows platform)
    * Other packages: tkcon

    Supported platforms:

    * Linux x86 / x86_64
    * Windows x86 / x86_64
    * macOS x86_64

    This means that Cookit can be easily and simply used to develop both
    console and GUI applications, which can be multi-threaded, send HTTPS requests to third-party services, process the received JSON/XML
    response with tdom. For debugging in GUI mode a convenient and uniform
    on all platforms console tkcon is available. After development, the application can be packaged into a single executable file without dependencies and used in other environments as a standalone application.

    It can also be used as a replacement for tclsh/wish.

    At the same time, the executable file has minimal size.

    * for Linux platform: executable file without Tk - about 1.1MB,
    executable file with Tk - about 1.7MB
    * for Windows platform: executable without Tk - about 1.5MB,
    executable with Tk - about 2MB.

    This is an amazing size considering the ability to create GUI
    applications with support for SSL/TLS connections, work with JSON/XML documents, extensive access to WinAPI using twapi on Windows platform.
    In normal installations, only the size of the OpenSSL library will be 2
    times larger.

    As a use case, consider an internal installer that works in both
    console and GUI mode and contains the same code for all platforms. This installer uses the REST GitHub API via HTTPS to get information about
    the latest available release, uses tdom to parse the JSON response,
    downloads a platform-appropriate tar.gz archive from GitHub releases
    using HTTPS, mounts the resulting tar.gz archive using tclvfs and
    extracts the necessary files to the destination directory.


    --- Synchronet 3.20a-Linux NewsLink 1.114
  • From Konstantin Kushnir@chpock@gmail.com to comp.lang.tcl on Sat Sep 28 16:11:36 2024
    From Newsgroup: comp.lang.tcl

    On Sat, 28 Sep 2024 09:04:39 +0530
    Ashok <apnmbx-public@yahoo.com> wrote:

    Looking quite exciting and plan to check it out over the weekend.

    Some initial questions -

    - Am I right that because the packages (tdom, twapi) are statically
    linked, the shared libraries do not need to be written to disk before loading? That would be a big win.

    This is true for Windows platform. Everything is statically linked
    there, and there are no dlls. However, packages with shared library can
    of course be added to a wrapped application and loaded during runtime.

    This is partly true for Unix. Everything except Tk is statically linked
    on Linux/macOS. Tk built as a shared library for Unix, stored in vfs
    and can be loaded by usual "package require Tk". This is to avoid hard dependencies in executable on GUI libraries and to be able to work both
    in an environment where the GUI is present and not present. It is
    possible to write something like:

    if { [catch { package require Tk }] } {
    # we have GUI and let's show our windows
    } else {
    # we don't have GUI and let's continue in console mode
    }

    - It would be nice to have sqlite3, if not TDBC.

    I agree. sqlite3 is widely used in modern software as a structured
    storage for local data and this feature can be useful. From other side,
    the goal is to keep a balance between executable size and features.

    I will try to find out the best option for including sqlite3.

    - I did not understand the section about the installer. If it is a
    single file exe, why the installer?

    There are multiple standalone cookits: with Tk/without Tk, with
    Tcl8/Tcl9. Installer downloads an archive with all these variants
    and extracts them to local directory in one shot.

    There are also minor features like setting PATH on Windows, ability to
    install using the single command.

    Basically, installer is one of cookit builds, but on Windows it
    contains Tcl script of a few lines, and on Unix it is wrapped in a
    shell script: https://github.com/chpock/cookit/blob/cc041f21aff1247e7000a1497ce76819695725df/release.sh#L47-L65

    - The wiki cookit page references the old repository.

    Wiki references another project from original cookfs/cookit authors. Unfortunatelly, that project is dead now.

    My project is based on similar ideas, and I could not find a better
    name than cookit. Thus, I just shamefacedly stole this name. I hope
    this does not cause too much confusion. The old project is cookit 1.x,
    but the project in this thread is cookit 2.x.
    --
    Best regards,
    Konstantin Kushnir
    --- Synchronet 3.20a-Linux NewsLink 1.114
  • From Manfred Stelzhammer@manfred@antispam.at to comp.lang.tcl on Sun Sep 29 19:16:44 2024
    From Newsgroup: comp.lang.tcl

    Hi

    I tryed cookit with tcl/tk 9.0

    It doesn't look like native tck/tk 9.0.
    I tryed it with a ttk::button.
    The button is little bit smaller and the characters are smaller too.

    Who can I get the native look?

    regards

    Manfred

    Am 27.09.24 um 16:56 schrieb Konstantin Kushnir:
    Hi Everyone!

    I am pleased to announce version 2.2.0 of cookit - tclkit-like Tcl
    runtime environment with Tcl 8.6.15 and Tcl 9.0.0 with a focus on a
    balance between functionality and executable size

    Homepage and downloads are on github: https://github.com/chpock/cookit

    Here is just a basic description of it. All details can be found on the website home page.

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

    =====================================================================

    Cookit is a Tcl/Tk runtime environment similar to tclkit with a focus
    on a balance between functionality and executable size. It allows using Tcl/Tk in both console mode and graphical mode to run Tcl scripts, as
    well as packaging applications into a single executable without
    external dependencies.

    Cookit is a single executable file that contains:

    * Tcl/Tk version 8.6.15 (with Threads enabled) or 9.0.0
    * Statically linked packages: cookfs, tclvfs, Threads, tclmtls, tdom,
    twapi (for Windows platform)
    * Other packages: tkcon

    Supported platforms:

    * Linux x86 / x86_64
    * Windows x86 / x86_64
    * macOS x86_64

    This means that Cookit can be easily and simply used to develop both
    console and GUI applications, which can be multi-threaded, send HTTPS requests to third-party services, process the received JSON/XML
    response with tdom. For debugging in GUI mode a convenient and uniform
    on all platforms console tkcon is available. After development, the application can be packaged into a single executable file without dependencies and used in other environments as a standalone application.

    It can also be used as a replacement for tclsh/wish.

    At the same time, the executable file has minimal size.

    * for Linux platform: executable file without Tk - about 1.1MB,
    executable file with Tk - about 1.7MB
    * for Windows platform: executable without Tk - about 1.5MB,
    executable with Tk - about 2MB.

    This is an amazing size considering the ability to create GUI
    applications with support for SSL/TLS connections, work with JSON/XML documents, extensive access to WinAPI using twapi on Windows platform.
    In normal installations, only the size of the OpenSSL library will be 2
    times larger.

    As a use case, consider an internal installer that works in both
    console and GUI mode and contains the same code for all platforms. This installer uses the REST GitHub API via HTTPS to get information about
    the latest available release, uses tdom to parse the JSON response,
    downloads a platform-appropriate tar.gz archive from GitHub releases
    using HTTPS, mounts the resulting tar.gz archive using tclvfs and
    extracts the necessary files to the destination directory.


    --- Synchronet 3.20a-Linux NewsLink 1.114
  • From Losko@xefog66666@dxice.com to comp.lang.tcl on Mon Sep 30 10:35:59 2024
    From Newsgroup: comp.lang.tcl

    Hi, great news.
    Just one question: is unwrappable or not?
    Reading the docs I can't see an option to unwrap the cookit, Can you confirm? And... that would be ok from my point of view, better than tclkits/starkits. What about the "safety" of the code obfuscation?
    Bye.
    --- Synchronet 3.20a-Linux NewsLink 1.114
  • From Konstantin Kushnir@chpock@gmail.com to comp.lang.tcl on Mon Sep 30 15:56:14 2024
    From Newsgroup: comp.lang.tcl

    On Mon, 30 Sep 2024 10:35:59 -0000 (UTC)
    Losko <xefog66666@dxice.com> wrote:

    Just one question: is unwrappable or not?
    Reading the docs I can't see an option to unwrap the cookit, Can you confirm? And... that would be ok from my point of view, better than tclkits/starkits. What about the "safety" of the code obfuscation?

    As for now, there is no any code obfuscation. Despite the fact that
    there is no unwrap option there, but it is possible get files from the
    archive in many ways. Tcl runtime and other code in it is packaged
    using cookfs ( https://github.com/chpock/cookfs ). Thus it is possible
    to mount executable/archive in Tcl interpretator as VFS and perform any manipulations with files. There is also a simple cookbox utility that demonstrates the capabilities of cookfs and allows to work with
    cookfs archives with an interface similar to the tar command: https://github.com/chpock/cookbox

    However, cookfs provides strong encryption using password (here is the annoucement for that: https://www.rocksolidbbs.com/devel/article-flat.php?id=24392&group=comp.lang.tcl#24392
    )

    Thus, using cookit+cookfs, it is possible to build not obfuscated
    applications, but really safe secure applications.
    --
    Best regards,
    Konstantin Kushnir
    --- Synchronet 3.20a-Linux NewsLink 1.114