Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

auto-update engine

 [1/11] from: maarten:koopmans:surfnet:nl at: 12-Feb-2003 21:28


Hi all, I remember somebody posting an auto-upadte engine (Gabriele, Graham) ? If so, can you send it to me (and can I use it in a commercial app)? If not, I'll try to make a rounder wheel ;-) --Maarten

 [2/11] from: petr:krenzelok:trz:cz at: 12-Feb-2003 23:14


Maarten Koopmans wrote:
> Hi all, > > I remember somebody posting an auto-upadte engine (Gabriele, Graham) ? > If so, can you send it to me (and can I use it in a commercial app)? > > If not, I'll try to make a rounder wheel ;-)
why not to post it here or link to it, including license agreement to its usage? Maybe more ppl would find it usefull :-) -pekr-

 [3/11] from: g::santilli::tiscalinet::it at: 13-Feb-2003 1:29


Hi Petr, On Wednesday, February 12, 2003, 11:14:16 PM, you wrote: PK> why not to post it here or link to it, including license agreement to PK> its usage? Maybe more ppl would find it usefull :-) It is so simple... patch: compress new-version xor head clear skip old-version length? new-version patch: to-binary decompress patch new-version: patch xor head clear skip old-version length? patch (Now you wanna me to "license" that? ;-) Regards, Gabriele. -- Gabriele Santilli <[g--santilli--tiscalinet--it]> -- REBOL Programmer Amigan -- AGI L'Aquila -- REB: http://web.tiscali.it/rebol/index.r

 [4/11] from: gchiu:compkarori at: 13-Feb-2003 21:59


On Thu, 13 Feb 2003 01:29:21 +0100 Gabriele Santilli <[g--santilli--tiscalinet--it]> wrote:
>It is so simple... > > patch: compress new-version xor head clear skip >old-version length? new-version > > patch: to-binary decompress patch > new-version: patch xor head clear skip old-version >length? patch >
Maarten, this is the code I posted last year: http://www.escribe.com/internet/rebol/m27638.html I just added md5's to check that the right binary was created, and that the patch itself was not corrupted. -- Graham Chiu http://www.compkarori.com/cerebrus

 [5/11] from: atruter:labyrinth:au at: 14-Feb-2003 9:32


Hi Gabriele,
> patch: compress new-version xor head clear skip old-version length? new- > version > > patch: to-binary decompress patch > new-version: patch xor head clear skip old-version length? patch
these look like good candidates for the "one-liners" section. Perhaps a Make Patch and "Apply Patch" entry? Regards, Ashley

 [6/11] from: g:santilli:tiscalinet:it at: 14-Feb-2003 1:22


Hi Ashley, On Thursday, February 13, 2003, 11:32:35 PM, you wrote: AT> these look like good candidates for the "one-liners" section. Perhaps a AT> "Make Patch" and "Apply Patch" entry? Hmm, maybe, but they are only useful when you are using Encap since the first 500k of the exe are equal. So I wouldn't want to show them to the world as a generic patch system. :-) Feel free to add them if you think it would be nice to show. Regards, Gabriele. -- Gabriele Santilli <[g--santilli--tiscalinet--it]> -- REBOL Programmer Amigan -- AGI L'Aquila -- REB: http://web.tiscali.it/rebol/index.r

 [7/11] from: antonr:iinet:au at: 15-Feb-2003 21:05


That's very interesting. You can use xor directly on images too. I tried today to make a movie system with a key frame and diffs for the rest, calculated with xor, and it works, but I concluded that using rebol's built in 'compress is not as good as the dedicated compression used by other programs (such as RADTools Bink Converter, which is what I used to create compressed png's). That doesn't mean the fight is over yet. I could save my diff images, then resave them using an external tool like Bink. Rebol's png's seem quite large, so I assume they are saved simply with no compression. Anton.

 [8/11] from: sunandadh:aol at: 15-Feb-2003 12:52


Gabriele:
> Hmm, maybe, but they are only useful when you are using Encap > since the first 500k of the exe are equal. So I wouldn't want to > show them to the world as a generic patch system. :-)
What the rest of us need (possibly -- see end) is a process that will compare Version 1 source with Version 2 source and ship a delta that consists only of the edit instructions to change V1 into V2. A simple algorithm that treated source as separate lines would take the following program and produce a three-line delta file: ======original program====== rebol [] a-func: func [p1 p2][ return p1 * p2 ] print "version 1" print "this is the first beta. May not work very well" print a-func 5 6 =====new version ====== rebol [] a-func: func [p1 p2][ return p1 + p2 ] print a-func 5 6 ======change file====== d [4 5] R 3 " return p1 + p2" I 2 "" A more sophisticated program that looked for runs of identical strings would produce a different (and in this case, shorter) delta file. Such algorithms exist and are easy to implement in Rebol. They are a good way of seeing what has changed between any two versions of a program; and are commonly used in source library management programs to hold only the difference between successive checked-in versions. A full distribution process would also have to handle adding new and deleting old scripts. But before any of us write such a thing, I wonder how many of us have Rebol applications that are so large they need such a distribution method? Sunanda.

 [9/11] from: g:santilli:tiscalinet:it at: 15-Feb-2003 20:21


Hi Sunanda, On Saturday, February 15, 2003, 6:52:54 PM, you wrote: Sac> What the rest of us need (possibly -- see end) is a process that will compare Sac> Version 1 source with Version 2 source and ship a delta that consists only of Sac> the edit instructions to change V1 into V2. Gregg has that (maybe not finished, but it works IIRC). However, a diff program usually does not work on binaries, so would not be useful for encapped programs. Regards, Gabriele. -- Gabriele Santilli <[g--santilli--tiscalinet--it]> -- REBOL Programmer Amigan -- AGI L'Aquila -- REB: http://web.tiscali.it/rebol/index.r

 [10/11] from: greggirwin:mindspring at: 15-Feb-2003 14:07


Hi SunandaDH, Sac> What the rest of us need (possibly -- see end) is a process that will compare Sac> Version 1 source with Version 2 source and ship a delta that consists only of Sac> the edit instructions to change V1 into V2. As Gabriele said, I've tackled this one, as has Volker. I haven't taken the time to analyze Volker's algorithm in any depth, so I'll let him speak to that if he wants. I implemented a DIFF system using the well-known longest-common-subsequence (LCS) algorithm at its core. It produces a block of commands that you DO against the original version to create the new version. It all works, but has some things I'd like to improve - which is why I haven't released it beyond a couple IOS servers for feedback. The biggest problem is that it's SLOOOOOW to create DIFFs. For small files, diff'ing on lines, it's probably fast enough, but not fast enough for byte DIFFs on EXEs. The way it works, you should be able to diff on any lexical unit you want (e.g. functions, blocks, etc.), but that's one of the things I need to delve into more. The big advantage there is that going to larger units means it will run faster because it's the number of items it has to compare that kills the speed. To be really useful, though, you need a good storage/repository system and that's something I haven't spent any time on yet. -- Gregg

 [11/11] from: sunandadh:aol at: 16-Feb-2003 4:05


Gregg:
> As Gabriele said, I've tackled this one, as has Volker. I haven't > taken the time to analyze Volker's algorithm in any depth, so I'll let
<<quoted lines omitted: 4>>
> I'd like to improve - which is why I haven't released it beyond a > couple IOS servers for feedback.
Thanks for the info. I guess it doesn't have to be fast for application distribution as it need only run once per release. But if you are aiming to compare (say) Word documents then speed will definitely help. Maybe a DIFF against two Rebol console memory dumps will finally settle the question of whether things are equal?, same?, identical?, equivalent?, distinct?, distinguishable?, comparable?, similar?, confusable? or dead-ringer? Sunanda.

Notes
  • Quoted lines have been omitted from some messages.
    View the message alone to see the lines that have been omitted