The State of the (f)Art

Thursday, 03 June, Year 13 d.Tr. | Author: Mircea Popescu

As previously hinted, we here at Minigame Suprlabs are undergoing a complete rewrite of... well, everything, really.

The trouble started with glaring inadequacy in [the shockingly, vanishingly little that's] leftover [of erstwhile] republican infrastructure : a very angry engineer reported that she's now stuck going through and reviewing previously-thought-good matter.i

I needn't explain (I hope!) that this is the only impermissible delivery of any ideal systemii ; the concrete instantiation of catastrophe presented itself as this situation whereby if a latter vpatch brings any one file in the codebase to a state from which an earlier vpatch removed itiii, thus creating in practice a situation vaguely similar to conceptual cyclicity, the version of V implementation we were using (v.sh) dies late.iv

So... yeah, we're temporarily delayed in working for Eulora (in the sense of, sinking time into the delays imposed by other spurious portions of code badly written by morons so as to either not do or not correctly do other things peripheral to Eulora itself) because we're stuck rewriting V. I don't intend to release the result ; but it involves an ada-rewrite of the ancient commontools diff as well as a review of how hashes and signatures work.

Specifically as to the proper formulation of a V tree : each file is identified by a complex construction. First, a keccak hash of a convenient length is calculated upon the file. Then that result is OAEP-padded, and decryptedv by the RSA key of the original author. That item is stored as the file's "hash" (in lieu of what stood for a hash before). Interested users can verify that indeed the given file is the file that the author had intended (as long as they have his public key) ; and "collisions" of any kind or sort are no longer possible. The arrangement also introduces a dichotomy between signatures, distinguishing the first (ie, auctorial) signature of every patch, which also establishes the hashes ; and the ulterior, which merely control its running on whatever machines recognize them.

Specifically as to the rewrite of diff... oh, where do I begin. Here, let's begin with gnat :

/* st_size may be 32 bits, or 64 bits which is converted to long. We don't return a useful value for files larger than 2 gigabytes in either case. */

How's that grab ya ? How about the whole implementation of Myers' lcs being found in an .h file ? Oh but don't believe me, don't take my word for it -- go, shallow out them bugs, fly-eyes! I'm not even going to tell you it's diffseq.h. How about the context.c / util.c analyze-output back and forth ? How about...

It's truly not worth anybody's time ; Eulora's own V's diff will bypass gnat for I/O to talk directly with the system calls gnat ineptly wraps ; will read files and cut them up by LF ; will calculate the keccak hash of every line as padded with now()vi and of length equal to the longest line seen ; will do the whole rest of what diff now does but correctly -- because we're people over here, not whatever the fuck it is you are. Fly-eyes.

Oh, in lieu of PS :

diana_coman ma rog, fixat probabil ca nu vad de ce sa zic de fiecare data ca "-uNr" ci e mereu aia si gata
diana_coman ori vrei si acolo variatiile pastrate ca-cate linii de context si din astea ori ce/cum?
mircea_popescu tu....

diana_coman intreb, lol
diana_coman nu tin minte veci sa fi avut nevoie ca mai multe /mai patrate
diana_coman ma rog, nu e vreo nenorocire de pastrat in sensul ca e o constanta si aia e
diana_coman da' are ea ceva implicatii la rezultat pt ca practic *dupa aia* se aleg "hunks" alea
mircea_popescu gen concret, @@ -0,0 +1,4 @@ de asta vb ?

diana_coman nu
diana_coman ma rog, ala e din implicatii cum ziceam
mircea_popescu asa

diana_coman in patch ai inainte si dupa liniile insert/deleted (deci alea cu + -) si niste linii de nu-s schimbate
diana_coman pt context, exact cum zice
mircea_popescu da.

diana_coman ei, alea default sunt 3 imi pare
diana_coman ceea ce mi s-a parut mereu perfect ok
mircea_popescu ah, la AIA te referi. ca daca sa fie 3
mircea_popescu sa fie 3, ce plm.

diana_coman da
mircea_popescu io credeam ca vrei sa scoti conceptul sau nush ce ca nu pricepeam

diana_coman teoretic poti "optiune" cate sa fie
diana_coman nu, contexul e util, totusi
mircea_popescu noa lasa. 3 e numar magic ca atitea pizde fut io intr-o seara si gata, e in diff.

diana_coman aia e, ca na, e o constanta, nu ma doare mana sa il pun s-o citeasca din fisier daca e
mircea_popescu nu nu, lasa sa nu mai tot citeasca atita.

diana_coman insa faza e ca schimbarile sunt apoi grupate dupa asta si na, are efecte ce nu-mi par musai de dorit
mircea_popescu gen ?

diana_coman gen daca vrei mai mult context, atunci iti va grupa intr-un "hunk" mai multe pt ca ...n-are de unde sa-ti dea context
mircea_popescu si ?

diana_coman find_hunk al lui aia face: se uita ca-care-i ultima schimbare dupa care are macar atatea linii de context
mircea_popescu a, dar stai. a) noi nu vrem mai mult context ; b) doua linii la fel nu sparg un hunk ce plm.

diana_coman mie ca utilizator de patchuir imi pare idioata faza ca nu vreau sa se schimbe3
diana_coman de aia am zis: 3 si fix imi pare foarte ok
mircea_popescu nici nu mi se pare posibil. 3 vesnic, si cine nu foloseste 3 e un copil lachios de-ala cu net free de la gayromeo si nici nu ii citim patchurile
mircea_popescu ce plm, optiuni acuma ?! sa se duca.

diana_coman ce ziceam dinsus posibil neclar e ca de aia nu vreau sa fie variabila ci prefer sa fie constanta
diana_coman asa, lol
mircea_popescu pai nu doar ca sa fie constanta ci ca sa fie 3.
diana_coman da
mircea_popescu e numar magic, ca si cum ar vrea acuma sa fie alt e.
diana_coman bun atunci; restul ca si format imi pare ok, nu vad deocamdata probleme

———

  1. May 24 13:15:54 diana_coman imi cam vine sa arunc tot vtools si v.sh si tot, ca practic la asa ceva nu vad ce sens are, bine ca am facut ditai vtree cu ele ca sa am acum unde vana erori si altminteri sa stau apoi ce, sa fac verificare de mana la fiecare fisier la fiecare press?

    []

  2. I am not kidding -- any ideal system. That's how religions end. []
  3. Technically, reproducing a hash previously seen. []
  4. The issue was only discovered with patch 42 -- coincidentally it's 42, what can I tell you -- but the actual problem in fact occurred much earlier.

    You see, at patch 16 a file --- call it f1 -- was transformed into f2. Then, at patch 21, f2 was transformed back into f1. This'd be a "cycle" in principle, very strictly regarding the matter. Finally, at patch 42 f1 was again transformed, this time into f3, at which very late point pressing became impossible (because "conflicting leaves selected", meaning V thinks it can't decide which f1 is being transformed). Needless to say v.sh mentions 16 and 42 but omits 21, and doesn't deign to indicate which hashes are involved, and in general... what, that'd be error reporting, god help us.

    Such perfectly naturally arising situation leaves the user quite stranded. Irrecoverably so if any manner of rights, codebase partitioning, or practically speaking any management tools whatsoever at all are deployed ; but even if one entirely owns the codebase in maximal extension for both time and space it's still a royal pain in the butt to chase down dubiously referenced problems through lengthy, heavy trees. In our particular case intervening file movements and other realia greatly compounded the already substantial difficulty involved -- entirely spurious, entirely "self"-created difficulty.

    It is mindboggling that this problem had to sit undisturbed for five years, that it got to lurk patiently in the shadows for Minigame to step on it (but then again, given the historical quality of NSA deliveries, it should perhaps come as no surprise) ; but then again, given the entirely spurious nature of the "republic" I naively attempted to spur out of a bunch of spurious worms... nobody did anything, and would have happily continued to "do" so, preferably forever. How's anyone to find any problem, when that "anyone" is to come out of a set that consists of no-one doing nothing ? Hm ?

    Even more infuriating, the flow assemblage flows ; it's merely the pressing portion that fails to press, being more strict (but not sufficiently strict to live up to its -- as it turns out, practically impossible -- ideals of strictness). This I deeem symptomatic of the very sort of minds that sprout this sort of junk : very "high minded" "standards", of such unreachably impossible heights as to come by very far beyond anything that can in practice be supported, predictably constructed out of the sad simplicity of five seconds' considerations on an 8 bit processor with maybe three registers ; then, unprincipled exceptions, unreviewed (in preference of adjusting the standards to sanity) ; and then complete paralysis randomly downstream, for no approachable cause. That's how these subsistence cocksuckers think they're just as good as people who have money, that's how they actually have the unmitigable audacity to discuss "privilege" as an ethical negative, that's how they end up driving "electric" cars and doing all the rest of the inane shit they're doing -- in the brief interludes between "lockdowns", bien sur.

    More practically speaking, if this machinery won't be able to press once a file is returned to its previous state, if there's two categories of files, type one which can be touched and type two which must remain untouched for all time, then why the fuck doesn't it say something, somewhere, preferably at any point prior to coincidental contradiction of its incorrectly if implicitly held, untenable presuppositions ? And what am I to say to the worker who says to me "you know, I checked if it presses at every juncture" ?

    Cursory review of "alternative implementations" as "available" (perhaps better described as some kind or other of nostalgia file ; an assorted jumble of unmaintained half-implementations quite directly similar to an old actress' collection of pre-war fashionable hats, presumably free of moths to the degree you don't go checking, sad abandonalia whose only raison d'etre was some people seeking group acceptance as cheap as could be had at some point in the ever more distant past) yielded exactly what one'd expect on the strenght of the foregoing -- v.py dies early (if unhelpfully, failing to even name the file in question) but depends on a python repackaging of gnupg which isn't, for some reason nobody can be arsed to chase, availabe on the system in question ; v.pl takes longer to not come to any definite return than anyone had in practice patience for, and... well, that'd be it.

    Good riddance -- and yes I very much meant subsistence cocksucker as in the offspring of subsistence farmers meanwhile gone to "town". []

  5. Aka "signed". []
  6. So that collisions are reduced from killers to mere irreproducible events. []
Category: S.MG
Comments feed : RSS 2.0. Leave your own comment below, or send a trackback.

2 Responses

  1. [...] as needed until all is clear indeed and without remainder. Since I did exactly this, given that it had to be done, here's the extracted map of calls (page numbers are based on my printing of the code so take them [...]

  2. [...] there is still work to do4 on the remaining bits and parts required for a full SMG-V, I won't attempt just yet a full list of all the cleanups, changes and additions. Nevertheless, [...]

Add your cents! »
    If this is your first comment, it will wait to be approved. This usually takes a few hours. Subsequent comments are not delayed.