Results 1 to 5 of 5

Thread: Package manager proposal for ThinBASIC

  1. #1
    Super Moderator Petr Schreiber's Avatar
    Join Date
    Aug 2005
    Location
    Brno - Czech Republic
    Posts
    7,128
    Rep Power
    732

    Package manager proposal for ThinBASIC

    Hi,

    I think it is time to start thinking about package manager for thinBasic.

    What is a package?
    Package is directory with code files adding functions and user defined types to the language. It may contain dependencies to other packages as well.

    Package could be a 3rd party binary module, set of thinBASIC code files adding some functionality (functions, user defined types) or combination of both.
    Good example of package would be for example custom GUI library.

    What is a package manager?
    Package manager is a mechanism allowing you to create, update, delete and re-use code packages.

    Creating a package means taking your code and submitting it to central repository, to be used by others.
    Updating a package means submitting an update version of already existing package to central package repository. Older versions would be kept.
    Deleting package means removing it from the repository - for example once you replace it with better solution.
    Re-using packages means being able to download existing packages in order to support your script.

    Package specification
    Packages could be referenced by their author and name. It would be nice to be able to specify version of the package I am interested in (to ensure consistency), but specification of version via <, >, =<, => should be possible too.

    The package specification file could be actually thinBASIC script, to allow flexibility.

    Why is this needed?
    While we can keep adding new and new modules to thinBASIC installation, it would be nice to keep the basic installation thin. To make it contain just the common modules which have general purpose.

    There is for example no point adding integration with OpenCL (GPGPU library) to native thinBASIC installation, but it would be great to make it easy for users to retrieve and use it.

    Package managers are something which all the major programming languages already offer - Ruby and Python are the notable mentions for nice implementations.

    Ok, Petr, gimme example!
    Imagine you are working on application using OpenCL (for number crunching) and GUI library by Rene for user interface.
    Instead of downloading the files and bloating your download with these, you could simply add such file to the script:

    package source "thinBasic.com"
    
    package get "PetrSchreiber.OpenCL" version "1.0 - 1.*" ' I am interested in any version from 1.x release, do not want anything from 2.x and later, as it could be backwards incompatible
    package get "ReneMiner.GUI"
    
    You could "fetch" the dependencies manually, via something like "thinpm fetch" or thinBasic would do it for you automatically during the first execution.

    What do we need now?
    It would be nice to discuss what the options in the package specification file would be, and we would also need to investigate how to solve the server side of package manager.

    Also, I would like to hear your opinion on the whole thing.

    I have good experience with this system from Ruby, as the precise version specification can easily resolve dependency hell by having the dependencies versioned. It reduces the initial download size by downloading really just the script and his package specification file.

    Further, if multiple scripts use the same dependency, it is placed just on one place and re-used.


    Let me know,
    Petr
    Last edited by Petr Schreiber; 20-01-2018 at 18:07.
    Learn 3D graphics with ThinBASIC, learn TBGL!
    Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB

  2. #2
    Hi Petr, this is suitable to update specific packages such as string builder or any specific updates to the language modules. i think it needs GitHub site with may be the Git command tool
    in fact my first experience is bad, it is when i have tried Go Lang, and i want to install Opengl , the instruction to install GL is something like this:
    go get -u github.com/go-gl/gl/v2.1/gl
    it ask me to install another thing called "Git" so i have installed Git-2.10.0-32-bit for winxp with dos prompt mode, and tried again, the Git connect with GitHub but then it failed to install gl due to error "stddef.h: No such file or directory".
    so there may be some troubles. but the idea is great of course, in fact it is natural since if i need to install a new hard disk i don't need to buy a whole new computer and so on.

  3. #3
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    57
    Posts
    8,777
    Rep Power
    10
    Great idea Petr.

    I'm working on thinAir and UI module at the moment because I want to release final 1.10.x version asap
    I will follow discussion.
    www.thinbasic.com | www.thinbasic.com/community/ | help.thinbasic.com
    Windows 10 Pro for Workstations 64bit - 32 GB - Intel(R) Xeon(R) W-10855M CPU @ 2.80GHz - NVIDIA Quadro RTX 3000

  4. #4
    Super Moderator Petr Schreiber's Avatar
    Join Date
    Aug 2005
    Location
    Brno - Czech Republic
    Posts
    7,128
    Rep Power
    732
    @Eros
    Sure thing, please feel more than welcomed to flood me with requests for testing. I want to help with 1.10.x

    @Primo
    I know golang. It is interesting in many aspects, but this is frustrating. I would not force anyone to install git, although I find it very useful. This is a bit unix approach and thinBasic comes from different world.

    The solution for thinBASIC could be about communicating with thinBASIC server via REST API, all you would need would be the internet connection.
    For distributing thinBASIC bundled EXEs, this process could be done during the EXE creation (optionally), to not bother user with dependancy on net connection for the released app.

    Before implementing it, I think discussion is needed. I can't wait for it - it would open whole new world of possibilities.


    Petr
    Learn 3D graphics with ThinBASIC, learn TBGL!
    Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB

  5. #5
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    57
    Posts
    8,777
    Rep Power
    10
    Petr,

    as an example of what you intend, can we say something like NotePad++ Plugin manager can be close to what you mean?
    https://notepad-plus-plus.org/resources.html
    https://bruderste.in/npp/pm/


    www.thinbasic.com | www.thinbasic.com/community/ | help.thinbasic.com
    Windows 10 Pro for Workstations 64bit - 32 GB - Intel(R) Xeon(R) W-10855M CPU @ 2.80GHz - NVIDIA Quadro RTX 3000

Similar Threads

  1. New benchmark proposal
    By Petr Schreiber in forum TBGL General
    Replies: 15
    Last Post: 10-11-2008, 03:08
  2. TBEM - Event manager module V1.10
    By Michael Hartlef in forum TBEM module - thinBasic Event Manager module
    Replies: 20
    Last Post: 19-10-2008, 07:34
  3. CO2 - proposal for a C like JIT compiler
    By Charles Pegge in forum Machine Code
    Replies: 13
    Last Post: 19-04-2008, 12:15

Members who have read this thread: 0

There are no members to list at the moment.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •