This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
chiloxsan's profile picture

[1.6] A built-in package manager.

Started by chiloxsan, 17 July 2013 - 03:40 AM
chiloxsan #1
Posted 17 July 2013 - 05:40 AM
Hello,

I'd like to make the suggestion of a built-in package manager (think apt-get) that would allow for users of the mod to quickly install large, multi-file programs that would be tedious to put on Pastebin.

This would be useful for new users of the mod (if they want to download some application for their turtle to quickly farm or mine) as well as advanced users (quickly deploying network infrastructure would be easier). A built-in package manager can also serve other purposes, like finding new applications in-game, updating existing applications, installing applications that require dependencies, the list goes on and on.

However, if this is implemented properly, the default computer filesystem would have to be heavily redesigned. For example, programs and non-essential APIs would be put into their own packages that come preinstalled with the computer. The filesystem would change from a single 'rom' directory to a system directory of some type, where inside the package database, programs and APIs would be stored. Hopefully, the 'rom' directory will not exist, and the whole entire ComputerCraft Lua base system would be modular.

Also, repository hosting would also have to be accounted for. Since ComputerCraft programs and other user-distributed files are mostly text, a repository can consist of a file (or files) that consists of a list of package names, versions and Pastebin codes. This solution means that hosting size and bandwidth used would be relatively low, since actual program hosting is done on Pastebin and not the repository server.

Ideally, the default repository would be hosted by the ComputerCraft team, and posting a package to the repository would consist of:
  1. Going to a package submission page.
  2. Entering a title, description and possibly other details.
  3. Adding the Pastebin codes and where they would be installed on the filesystem (maybe in the system directory mentioned earlier.)
  4. Submitting the form.
  5. The user receives an access string access string of some type (a 256 char base64?), that can be used to update the package data at a later date.
This suggestion creates a lot of problems, but I'm sure that if implemented would make for a more modular ComputerCraft experience.
ChunLing #2
Posted 17 July 2013 - 08:01 AM
Exactly what benefits does this have over simply using the http API to write an installer?
Tiin57 #3
Posted 17 July 2013 - 09:44 AM
If I recall correctly, this has already been denied.
chiloxsan #4
Posted 18 July 2013 - 02:54 AM
Exactly what benefits does this have over simply using the http API to write an installer?

Benefits of a package manager over an installer include installing multiple applications quickly, updating all the applications on a system automatically, and uninstalling applications cleanly. Having a package management system installed by default provides a standard that anybody in the ComputerCraft community can use to distribute their applications and APIs faster than currently possible with an installer.

Over time, users will be able to find applications quicker by not having to leave the game, search for the application and Pastebin code, run the installer, etc. Instead applications can be found and installed quickly and easily by running a simple command like 'pkgman install [application-name-here]'
Negi #5
Posted 18 July 2013 - 03:56 AM
I think this fall under enhancements, since you can do that only in pure Lua, and no one complained about the actual system, with pastebin and codes on the forum, so why change ? And there's ac-get, you just have to create your one repo for sharing your programs, and then invite your users to install it.
chiloxsan #6
Posted 18 July 2013 - 04:12 AM
I think this fall under enhancements, since you can do that only in pure Lua, and no one complained about the actual system, with pastebin and codes on the forum, so why change ? And there's ac-get, you just have to create your one repo for sharing your programs, and then invite your users to install it.

The point of including a package manager by default is to provide a standard for everyone to use and to make it easier for users to install and update applications, not to create just another package manager.

The current system of updating programs requires an updater/installer for every application installed. With a package manager, a user would simply run a command and have all the packages on his/her system updated.
Engineer #7
Posted 18 July 2013 - 07:50 AM
I really dont see the point of this, because we already have pastebin….That is already easy to use and etc.
You can write a package manager yourself, and hope that it gets included. But thta is most-likely not going to happen
Cranium #8
Posted 18 July 2013 - 09:10 AM
Yeah, this is definitely something you can write yourself.
It's actually not that hard to do, especially if you are dealing with the Pastebin API. I've made a decent downloader myself(shameless self plug), and it was really easy to do using the Pastebin API.

At any rate, I'm going to go ahead and lock this, seeing as how you can do this yourself with the tools available.