Automatic Script Updating... Discuss!

fronobulax

Developer
Staff member
By the client end do you mean on the Java or PHP side? I couldn't imagine it's that hard to do a quick check for a JSON/XML page on load, compare some strings, perhaps md5() some files for basic integrity checking and download updates from a HTTP connection for Java. I don't program Java, so I would be happy to be told it's not as easy as I think.

I'd be happy to make a PHP page that allows script makers to log in and upload new scripts, and then an api.php page which exports information about the version of the files that have been uploaded. Then the Java file could compare and offer the user an up or down-grade through a nice one-click screen on load.

I think it would transform and heavily increase the use of scripts, particularly the big support scripts, I'm thinking universal_recovery, newLife, etc. as well as the frequently updated turn-burners, my ascension script, the nemesis and basement ones, etc.

Java. I think the vision is that the functionality is embedded into KoLmafia although using it would presumably be a manual or an opt in automatic process. See comments above about reinventing the wheel as well as trusting files and URLs that are the source of downloads.

I'm interested in your comment about increasing script usage. Presumably a new ScriptManager tab or window in KoLmafia might trigger the interest of someone who doesn't know about or never visits kolmafia.us but I don't hear people complaining about the process of finding scripts, determining which ones to trust or keeping them updated.
 

Ethelred

Member
...

I'm interested in your comment about increasing script usage. Presumably a new ScriptManager tab or window in KoLmafia might trigger the interest of someone who doesn't know about or never visits kolmafia.us but I don't hear people complaining about the process of finding scripts, determining which ones to trust or keeping them updated.

I hear complaints about having to have an account and login in order to download scripts. Removing that restriction might promote more script use.
 

fewyn

Administrator
Staff member
There was a reason I required registration for downloads but I can't remember why, I think I'll remove it.
 

Bale

Minion
There was a reason I required registration for downloads but I can't remember why, I think I'll remove it.

It was because in those long gone days the forum was pretty empty, without the varied and excitable bunch that now post a storm of scripts and words every day. There were only a couple of dozen posts each week. You were desperately hoping that some people would bother to post once they took the trouble to register. I'm not entirely sure if your plan worked, or things just changed over time. Either way, it doesn't seem advantageous anymore since there's so many users, like me, who just won't shut up.
 

fewyn

Administrator
Staff member
It was because in those long gone days the forum was pretty empty, without the varied and excitable bunch that now post a storm of scripts and words every day. You were desperately hoping that some people would bother to post once they took the trouble to register. I'm not entirely sure if your plan worked, or things just changed over time. Either way, it doesn't seem advantageous anymore since there's so many users, like me, who just won't shut up.

=p Well I've removed requiring being logged in to download stuff so HAVE AT IT!
 

bumcheekcity

Active member
If we don't have to be logged in to download, then we could just download and update from the mafia forums themselves, and wouldn't need a third party server.

I have had people tell me they're too lazy to keep scripts updated, mine as well as others, when they have about 10 of them. I've got probably about 20 going at any one time, and it seems like they always need updating.
 

fronobulax

Developer
Staff member
Thanks. Clearly, as expected, folks are in touch with different parts of the KoL community than I am.
 

xKiv

Active member
Aside: did we even think about "package management"? As in ... this new version of the script now requires a different script -> let's install that first -> oh no, we can't, it requires newer version of mafia!
 

fronobulax

Developer
Staff member
Aside: did we even think about "package management"? As in ... this new version of the script now requires a different script -> let's install that first -> oh no, we can't, it requires newer version of mafia!

We could but I don't think it would be beneficial. How many script authors truly understand which versions of other people's work are required? What if those other people have not opted in to a Script Repository? And so on...
 

Veracity

Developer
Staff member
I haven't commented, so far, because I use very few scripts - and those I do, I am perfectly happy to run whatever version I have that works. I have disabled version checking. Lots of people DO want to keep up-to-date, and having "official" support for that sounds like a fun project - for someone else. :)

If we are going to have KoLmafia-supported script updating, I want the scripts to be hosted on this site. I'd prefer that KoLmafia depend on only one third-party site for storing stuff. We do mallprices here. I seem to recall zarqon getting miffed at me when I said I wanted it here, rather than his server. However, if I am not mistaken, he hosts data maps for scripts on his server, and didn't his server go down for a few months? Additionally, he hosts a script registry. Should those move here, too?

(Maybe it's just me, but I don't really want stuff I depend on to be scattered about at the mercy of this-or-that web hoster. I'd just as soon have stuff on my own computer under my control. Stuff that is intended to be shared needs to be on a public site, of course, but if it's all related to KoLmafia, I'd rather that it be on ONE public site - this one. This has a lot to do with why I don't bother with an up-to-date BCC snapshot; I tried it, just to see what it looked like, but abandoned it, since I don't want it on bcc's private server, since I don't care if it's public, anyway. Just let me run an ASH script locally that generates an HTML file that I can store and look at locally.)
 

fewyn

Administrator
Staff member
I'm perfectly fine with hosting pretty much anything, I have zero issues with it especially since I last beefed up the VPS I run the site on so I have plenty of bandwidth and stuff now.
 

zarqon

Well-known member
I've just discovered this thread and am watching it with interest. I must add something to the mix: I would be in favor of a solution which was built in to mafia, but if I need to download an SVN client, I wouldn't be able to update scripts from work or on the go using my phone's browser. I have increasingly less time at home, so that's a pretty big consideration for me.

@Veracity: I wasn't miffed, I was merely concerned that I would no longer be able to support it. Also, I must throw in a word of defense for my host so that blame may be properly applied: my host has never been down for more than a day. Some of my scripts have broken for a good deal longer than that, but that was my fault, not the server's. :)
 

fronobulax

Developer
Staff member
SVNKit which has a link upthread is supposedly a pure Java SVN client. If the standard JVM for KoLmafia is upgraded to 1.5 (vs. 1.4) and if I end up being the lead prototyper on this then I expect the results will be pure Java and will run anywhere KoLmafia will run without having to download anything besides the KoLmafia jar in order to run. I suppose I should start scoping out what features I would include in Release 1 and see what the reaction is. Obviously any SVN solution requires a server somewhere and I am hoping, also based upon upstream comments, that server would be at KoLmafia.us.
 

fronobulax

Developer
Staff member
This has happened.

Yep. I'm starting to look at it again. My first step will be to put out a detailed design spec, see if it scratches most itches, and is otherwise supportable, and then charge ahead. Since my recent score is 0-2 on implementing things that seem like a good idea to both me and the community, after the fact, I'd like to get consensus first.
 
Top