• kit improvement suggestion

    From saito@saitology9@gmail.com to comp.lang.tcl on Fri Aug 8 12:29:05 2025
    From Newsgroup: comp.lang.tcl

    I recently built a custom tclkit and wrapped it. I noticed that when it
    runs, it extracts its dll's and other stuff. This is fine.

    However, it turns out that it does this each and every time you run it.
    This seems excessive. It adds to the startup time, it wastes space and
    it creates lots of duplicate folders.

    I wonder if tclkit could be enhanced in a simple way that keeps the
    benefits and avoids the negatives: use the wrapped kit name, or some
    hash of it, and use that as the folder name where to extract the dll's.
    If it exists, skip the file extract/copy/save operation. Otherwise, it
    means it is the first time the app is running, and it can extract the files.


    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From ted@loft.tnolan.com (Ted Nolan@tednolan to comp.lang.tcl on Fri Aug 8 16:43:53 2025
    From Newsgroup: comp.lang.tcl

    In article <10758ki$qa80$1@dont-email.me>, saito <saitology9@gmail.com> wrote: >I recently built a custom tclkit and wrapped it. I noticed that when it >runs, it extracts its dll's and other stuff. This is fine.

    However, it turns out that it does this each and every time you run it.
    This seems excessive. It adds to the startup time, it wastes space and
    it creates lots of duplicate folders.

    I wonder if tclkit could be enhanced in a simple way that keeps the
    benefits and avoids the negatives: use the wrapped kit name, or some
    hash of it, and use that as the folder name where to extract the dll's.
    If it exists, skip the file extract/copy/save operation. Otherwise, it
    means it is the first time the app is running, and it can extract the files.



    That seems like it would leave you open to a number of issues. Security obviously, but maybe you have a shared filesystem and last time you
    ran the ubuntu version of the kit and this time you ran the redhat
    one and their dlls are complied against different glibc versions or whatever. --
    columbiaclosings.com
    What's not in Columbia anymore..
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Robert Heller@heller@deepsoft.com to comp.lang.tcl on Fri Aug 8 16:47:34 2025
    From Newsgroup: comp.lang.tcl

    There really isn't any sensible way to do this. There really isn't to be certain that the extracted dlls/sos are really the correct ones.
    The startup cost is probably small. I don't know about MS-Windows specificly, but I believe under Linux, the extracted so files are marked for deletion on program exit. I think under Linux, the so files are extracted to /tmp, which
    on most modern Linuxes is a RAMDISK (eg it is gone on reboot), I don't know why there would be duplicate directories, unless it is another MS-Windows "weirdness".
    At Fri, 8 Aug 2025 12:29:05 -0400 saito <saitology9@gmail.com> wrote:

    I recently built a custom tclkit and wrapped it. I noticed that when it runs, it extracts its dll's and other stuff. This is fine.

    However, it turns out that it does this each and every time you run it.
    This seems excessive. It adds to the startup time, it wastes space and
    it creates lots of duplicate folders.

    I wonder if tclkit could be enhanced in a simple way that keeps the
    benefits and avoids the negatives: use the wrapped kit name, or some
    hash of it, and use that as the folder name where to extract the dll's.
    If it exists, skip the file extract/copy/save operation. Otherwise, it
    means it is the first time the app is running, and it can extract the files.




    --
    Robert Heller -- Cell: 413-658-7953 GV: 978-633-5364
    Deepwoods Software -- Custom Software Services
    http://www.deepsoft.com/ -- Linux Administration Services
    heller@deepsoft.com -- Webhosting Services
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From saito@saitology9@gmail.com to comp.lang.tcl on Fri Aug 8 13:05:32 2025
    From Newsgroup: comp.lang.tcl

    On 8/8/2025 12:43 PM, Ted Nolan <tednolan> wrote:

    That seems like it would leave you open to a number of issues. Security obviously, but maybe you have a shared filesystem and last time you
    ran the ubuntu version of the kit and this time you ran the redhat
    one and their dlls are complied against different glibc versions or whatever.

    You can compare dll file info one by one, including their checksums.

    The shared file system scenario seems interesting and limited to Linux.
    Is it common? In any case, it is easy to address it: just include user
    name somehow in the folder name. I doubt the same user would be using
    multiple Linux versions at the same time.


    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From saito@saitology9@gmail.com to comp.lang.tcl on Fri Aug 8 13:12:34 2025
    From Newsgroup: comp.lang.tcl

    On 8/8/2025 12:47 PM, Robert Heller wrote:
    There really isn't any sensible way to do this. There really isn't to be certain that the extracted dlls/sos are really the correct ones.


    Each kit will have a prefixed folder name for extraction, perhaps
    composed of app name/version/etc. This removes the confusion.


    The startup cost is probably small. I don't know about MS-Windows specificly, but I believe under Linux, the extracted so files are marked for deletion on program exit. I think under Linux, the so files are extracted to /tmp, which on most modern Linuxes is a RAMDISK (eg it is gone on reboot), I don't know why there would be duplicate directories, unless it is another MS-Windows "weirdness".


    For windows, they seem to stay around. I just deleted dozens of them
    manually. The startup cost is probably negligible in many cases but I
    know some places where they have set policies so that file operations
    are monitored, checked and approved by firewalls and stuff so the
    startup can be costly.
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Robert Heller@heller@deepsoft.com to comp.lang.tcl on Fri Aug 8 17:17:36 2025
    From Newsgroup: comp.lang.tcl

    At Fri, 8 Aug 2025 13:05:32 -0400 saito <saitology9@gmail.com> wrote:

    On 8/8/2025 12:43 PM, Ted Nolan <tednolan> wrote:

    That seems like it would leave you open to a number of issues. Security obviously, but maybe you have a shared filesystem and last time you
    ran the ubuntu version of the kit and this time you ran the redhat
    one and their dlls are complied against different glibc versions or whatever.

    You can compare dll file info one by one, including their checksums.

    The shared file system scenario seems interesting and limited to Linux.
    Is it common? In any case, it is easy to address it: just include user
    name somehow in the folder name. I doubt the same user would be using multiple Linux versions at the same time.
    (Same user name on different systems is very common in the Linux / UNIX
    world. Using the host name *might* be better...)
    Both MS-Windows and MacOSX support "shared" file systems as well as Linux. MacOSX and Linux both support at least two flavors of file sharing.
    Also there are now various cloud file sharing options as well.
    I am not sure file sharing is really an issue anyway. Under Linux (and probably MacOSX) there is almost never going to be a reason to "share" /tmp...




    --
    Robert Heller -- Cell: 413-658-7953 GV: 978-633-5364
    Deepwoods Software -- Custom Software Services
    http://www.deepsoft.com/ -- Linux Administration Services
    heller@deepsoft.com -- Webhosting Services
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From saito@saitology9@gmail.com to comp.lang.tcl on Fri Aug 8 13:24:44 2025
    From Newsgroup: comp.lang.tcl

    On 8/8/2025 1:17 PM, Robert Heller wrote:

    I am not sure file sharing is really an issue anyway. Under Linux (and probably MacOSX) there is almost never going to be a reason to "share" /tmp...


    This is a good point. Even on windows, the kit files are placed in the
    user's own temp folder hierarchy so it seems doable :-)

    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Harald Oehlmann@wortkarg3@yahoo.com to comp.lang.tcl on Sat Aug 9 16:24:26 2025
    From Newsgroup: comp.lang.tcl

    Am 08.08.2025 um 18:29 schrieb saito:
    I recently built a custom tclkit and wrapped it.  I noticed that when it runs, it extracts its dll's and other stuff.  This is fine.

    However, it turns out that it does this each and every time you run it.
    This seems excessive. It adds to the startup time, it wastes space and
    it creates lots of duplicate folders.

    I wonder if tclkit could be enhanced in a simple way that keeps the
    benefits and avoids the negatives: use the wrapped kit name, or some
    hash of it, and use that as the folder name where to extract the dll's.
    If it exists, skip the file extract/copy/save operation. Otherwise, it
    means it is the first time the app is running, and it can extract the
    files.


    Dear Saito,
    this is an open issue since at least 20 years.
    This is starkit technology by JC Wipfler.

    We had last year a heavy discussion on this point, if dlls may be memory loaded.
    A side aspect of it is this TIP:

    https://core.tcl-lang.org/tips/doc/trunk/tip/709.md

    On the core, we decided to not put any dlls in the zip on Windows, so
    the dde and registry dlls are not included.

    Another manifestation was this widthdrawn TIP: https://core.tcl-lang.org/tips/doc/trunk/tip/702.md

    I just want to day, that a lot of discussion already took place and
    there is no satisfactory solution jet. So, any solution welcome!

    On the practical side, you may follow the solution I use and presented here: https://wiki.tcl-lang.org/page/Single+file+applications+in+Tcl+9
    I also used it for starkits.

    Take care,
    Harald

    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From saito@saitology9@gmail.com to comp.lang.tcl on Sat Aug 9 18:10:29 2025
    From Newsgroup: comp.lang.tcl

    On 8/9/2025 10:24 AM, Harald Oehlmann wrote:

    this is an open issue since at least 20 years.
    This is starkit technology by JC Wipfler.

    We had last year a heavy discussion on this point, if dlls may be memory loaded.
    A side aspect of it is this TIP:


    ...

    On the practical side, you may follow the solution I use and presented
    here:
    https://wiki.tcl-lang.org/page/Single+file+applications+in+Tcl+9
    I also used it for starkits.


    Thank you for the info. So there is a long history behind it. I will
    keep an eye on these developments. I think it is important because it simplifies deployment issues.



    --- Synchronet 3.21a-Linux NewsLink 1.2