Omnimaga

Calculator Community => TI Calculators => TI-BASIC => Topic started by: Eeems on December 16, 2009, 06:55:08 pm

Title: [idea] Celtic III patching
Post by: Eeems on December 16, 2009, 06:55:08 pm
What if, instead of releasing te whole program for a small oneline bug edit, why don't we create the framework of a patching lib, using Celtic III. The patch will include all the changes, and the patching program will interpret it. It will be able to delete, replace and insert lines. So instead of having to re-send the ahold program you can just use the patch, and if it's a one line fix, you can manuely do it by making the patch yourself, so no cable is needed.
So what do you guys think? Comments, suggestion?
Title: Re: [idea] Celtic III patching
Post by: simplethinker on December 16, 2009, 07:39:43 pm
If you mean doing this on-calc, then things could get horribly messy.  Even if the change only adds/removes a single byte, it could (most likely would) mess up every single label after it (which are just addresses), so the patching program would have to modify nearly every single jump instruction in the code.

Compiling Celtic3 actually isn't that bad, so if we know what needs to be changed we can easily apply it and then recompile, and then send the whole app to the calc ;)
Title: Re: [idea] Celtic III patching
Post by: Eeems on December 16, 2009, 08:08:30 pm
No I meant using Celtic III to make a patching system for basic programs
Title: Re: [idea] Celtic III patching
Post by: simplethinker on December 16, 2009, 08:19:47 pm
No I meant using Celtic III to make a patching system for basic programs
Ah... then nevermind ::)

It sounds like a good idea then :)
Title: Re: [idea] Celtic III patching
Post by: Eeems on December 16, 2009, 09:46:22 pm
Ah. Thanks! Well hopefully when I get my calc back I can implement it.
Title: Re: [idea] Celtic III patching
Post by: Silver Shadow on December 17, 2009, 01:40:42 pm
Actually, I think that its easier to send a program in replacement on the calc instead of sending and then running another program to modify the one you want to update.
Title: Re: [idea] Celtic III patching
Post by: Eeems on December 17, 2009, 05:08:45 pm
Well for a tiny change, this would be easier. Or for very large programs. So if you need to change line 300 in a program, you just run the thing and it changes it faster then manuelly changing it or sending the updated program.
Title: Re: [idea] Celtic III patching
Post by: Galandros on December 18, 2009, 05:48:06 am
Seems a good idea.

But this will be most used to large programs that need a one line edited like sometimes happens when someone releases a beta.
For someone that sends for the first time, we should have the program fixed (sending buggy program plus patcher bloats a bit).
Title: Re: [idea] Celtic III patching
Post by: Eeems on December 18, 2009, 10:08:41 am
Yeah, well the patched probably won't be that large, and it can be used for any program. So it can be something you just keep on yout calc.
Title: Re: [idea] Celtic III patching
Post by: simplethinker on December 18, 2009, 12:43:06 pm
What would happen if there are two changes?  Most likely, the first change would alter the position of the second one, and it might be that not everyone had implemented the first fix in the first place.

The only way I can think to do it is have the program keep track of whether it did the previous change(s) (maybe in an appVar?) and then if you hadn't, the program would implement all the previous ones first.  The problem is that with each new patch, you'd have to send the information for every previous one.
Title: Re: [idea] Celtic III patching
Post by: Galandros on December 18, 2009, 03:41:57 pm
What would happen if there are two changes?  Most likely, the first change would alter the position of the second one, and it might be that not everyone had implemented the first fix in the first place.

The only way I can think to do it is have the program keep track of whether it did the previous change(s) (maybe in an appVar?) and then if you hadn't, the program would implement all the previous ones first.  The problem is that with each new patch, you'd have to send the information for every previous one.
I think the patch would be used as a one time and temporary solution to betas and releases on a community forum. But good point about multiple patches.
Title: Re: [idea] Celtic III patching
Post by: Eeems on December 18, 2009, 06:06:20 pm
I think the patch would be used as a one time and temporary solution to betas and releases on a community forum. But good point about multiple patches.
ditto

and I guess at each major change/release they would release the good version so you wouldn't have to worry about it
Title: Re: [idea] Celtic III patching
Post by: miotatsu on December 18, 2009, 07:26:12 pm
theres an easy solution to that, rather than keeping track of all patches just do this: store a patch number,and each new patch would have a variable that would be read, it will only allow you to patch it if the number is one higher, that way it forces you to patch in order and not skip any patches, which completely solves the problem :{D the only thing about this solution is you need to make sure whatever you use to store the patch var in doesnt get deleted, if it does everything would get mucked up
Title: Re: [idea] Celtic III patching
Post by: Eeems on December 18, 2009, 07:36:00 pm
well there could be a version number on the first line of the program, and a patched to number and it could have a simple check for that
Title: Re: [idea] Celtic III patching
Post by: Builderboy on December 20, 2009, 12:16:37 pm
Hmmmmm, I'm not seeing the benefit here.  On one hand, there is a faulty program, so you release the same program but fixed.  All the user has to do it send it to his/her calculator and they are done!

On the other hand, with these patches, not only do they have to have CelticIII on their calc, but after they send in the patch, they have to run it and/or deal with version numbers.  Seems to me just sending the fixed version would take a lot less time and effort on both ends, for the programer and for the user.
Title: Re: [idea] Celtic III patching
Post by: DJ Omnimaga on December 20, 2009, 01:03:39 pm
true, if i get a bug fix update, I just redownload the necessary files
Title: Re: [idea] Celtic III patching
Post by: Eeems on December 20, 2009, 06:23:43 pm
but if all you have to do is fix one line, then you can run the program and it will take less time then resending the whole huge program...so all you have to do is change if A=10 on line 400 to if A=11 then this would be way quicker
it probably would be way slower for huge patches, but for smaller patches it would be very nice
and this would be intended for programs that use Celtic III