text:
Talk:Understanding Darcs/Patch theory

Talk about the things in the book
The file Darcs-complex-undo.png has a typo in it and needs to be changed. I'm not really up with my MediaWiki skills, that's why I didn't do it. Anyway the bottom says B-sub-1, A-sub-1, and A-inverse. It should say B-sub-1, A-sub-1, and A-sub-1-inverse. -- jared jennings 01:37, 27 September 2007 (UTC)

 * Thanks! Fixed. -- Kowey 03:51, 27 September 2007 (UTC)

Vegas 04:58, 11 March 2007 (UTC)
Hey there. I just wanted to speak out a little bit in favor of your utilizing the same notation as the darcs documentation. I think that your exposition is a good bit clearer, and provides better examples of the various operations of the patch algebra. However, I think that your inversion of the composition operation ala FOSDEM 2006 is a little hinky, and complicates things for people who are going to be going back and forth between your stuff and the official documentation. Of course, as things stand, anyone who's going to even know that darcs exist probably has the cognitive firepower to switch back and forth betweeen the notations, but that may change.

 * Hi, thanks for your feedback! It's worth considering, especially since David seems to have abandoned the conflictors approach for something rather quite different anyway. I don't have time to look into it; maybe you'd be willing to put up an in progress banner of some kind and fix it?  Perhaps discuss it with Arjan first.  Best, -- Kowey 07:13, 11 March 2007 (UTC)

 * Oh, and you'd probably want to look into Ian's writeup which is much more down to business and probably clearer than what I've come up with :-) -- Kowey 07:15, 11 March 2007 (UTC)

Other stuff
This one:

 * One more important detail to note though! Context tells us why we can't simply flip AB into BA, but it does not mean that commutation itself depends on context. Whether or not AB commutes to some B1A1 is completely independent of the context that AB is in. Indeed, when we do the commutation, we get a composed patch which brings us from the same starting context to the same ending one. So, if we have {}^x{A^{z_1}}{B^y} (AB takes us from context x to y via z1), then commutation would give us {}^x{{B_1}^{z_2}}{{A_1}^y}. Either case, we go from the original context x to the final context y

seems hard to understand for me. Perhaps it's out of place at this early spot, anyway?

--Mikon

 * Thank-you very much for pointing this out! I have rewritten this paragraph.  Is it clearer now? -- Kowey 17:10, 18 October 2006 (UTC)

 * Thank you for making me feel needed. :) This paragraph seems more concrete now, but I will not understand it fully until I reformulate all this stuff in term of category theory (a perversion of mine). Then I will comment some more in a mortal-understandable language. --Mikon

 * I find the definition of commutation imprecise. Could you please answer the questions in point 15 in the "Loose remarks" section below? I also find the first excercise unclear: am I to say what the result of applying B_1 to the file (which file?) should be or what the diff unfified format of B_1 should be, or what? A_1 is described in a way I don't quite know how to follow ("It adds "beer" to line 3 of the shopping list"). I guess sometimes a diff listing would be easier for me to understand that pictures with a natural language descriptions...

 * Hmm! I think this is worth a post on the darcs-conflicts mailing list.
 * For now the only use of my reformulation is that I understand much more of the theory and I know at which points I get lost in the descriptions and why (BTW, one of the reasons is surely that I'm yet to install darcs for the first time or see an actual darcs patch (are they just some diff outputs?) or read a darcs user manual of any kind). However, at some point the reformulation may (or may not) give something for free, like a category theory lemma applied to category Repo giving an interesting patches property for free, or an elegant proof of such, or some systematization or a natural class of extensions.

 * I'm unfortunately not a very mathy guy and not much of a computer scientist at that, but I have added the category theory reformulation to my reading list and will get back to you!

 * You are brave! :) But I really don't intend to force anybody to learn category theory to be able to undestand me, so let me translate point 15 back to your language and let's see if the answer is simple to provide then:

 * the commutation of patches X and Y seems to be described in the text as the existence of such X' and Y' that: for each starting context o, XY appplied in this context produce the same file contents as Y'X', X the same as X' and Y the same as Y'; is it correct? Or is the context o actually fixed in some of the equalities (then it's easier to find a commutation), e.g. we only need to find X' and Y' for one particular o?

 * I guess an example or two would answer my questions, but between me and the examples there is the paragraph I complained about at the top of this page. I guess a part of this paragraph may end up in the definition of commutation and a part is totally trivial once the definition is precise, so I'll stop here and wait to see what happens. :) (Writing mathematical texts is a nightmare and I know what I'm talking about.)

 * Incidentally, one of my more mathy friends was really excited for a couple of days, trying to formulate patch theory in a sequent calculus (uhh... I think that's what he said), but then he got bored and wandered away.

 * Interesting. An operational semantics (big steps) for the patch transformations? Or some logical calculus for reasoning about patch relations? Both are a bit too unstructured and untyped for my taste...

 * For the exercise, I was expecting a natural language description, like patch B_1 adds beer to line... X of the file. Perhaps I should just reformulate it "to what line of file shplst does patch B_1 add beer?".  Another problem is that I don't really define "add to line X".  Perhaps "insert before line X" would be better. -- Kowey 05:40, 19 October 2006 (UTC)

 * Really great ideas (X is a number, I presume?). Let me see if I now understand the excercise... Yes, now I get it and I can even solve it. :) (BTW, I find myself knotting my tongue on "shplst" whenever I encounter it, perhaps "shop.lst" or better just "shop_list" would be acceptable for you?) --Mikon

(Resetting indents). Thanks for the idea. I'll use something like "s_list" so that it will fit.

Also, context is irrelvant for commutation. You should be able to commute (or not) any two patches based only on the information within the patches themselves.

 * OK. That clarifies things a lot. I'll try to understand the definition and the subsequent remark again, now.

As for X and X' being the same,

 * I meant: "X appplied in any context produces the same file contents as X' applied in the same context" --- quantification by contexts again. And a similar question for Y and Y'. (I see that in the example just after the definition of commutation, X' is exactly equal to X, while Y' produces different file contents than Y, for most arguments. But if we change the format of patches in that example from "put pasta after line 5" to "put pasta after cookies" then Y' is equal to Y. Hmmm. What would be the case is real darcs?)

it depends on your perspective. I assume you mean modulo the effects of commutation (line number, file name shifts, etc), in which case, yes.

 * I meant the weakest of the common equalities of function-like objects, the so called extensional equality. I ask if the two operations (patches) give the same effects for the same arguments (file contents). I do not ask about equality of textual representations of the operations (e.g. diff outputs). I'm well aware the representations are likely to be changed all the time. Anyway, I want to know what "are intended to perform the same change" precisely means. --Mikon

Finally, regarding my math-friend's work, I do not have any idea whatsover. I saw inference rules and big gammas, but don't remember what he was getting at. Perhaps now that I understand patch theory better, I can see better what he was aiming for, but for now I can only shrug my shoulders. (That being said, I would tend to lean to the latter more than the former) -- Kowey 17:07, 22 October 2006 (UTC)

The section "The complex undo revisited" suggests the commutation is really about finding such Y' that XY is extensionally equal to Y'X and that's all (gives the same results in all contexts). This is a totally different mathematical operation, but it's precisely defined and it's possible to perform more often. I probably miss something, because I cannot deduce anything else about commutation from all three chapters about patch theory. --Mikon

I think calling the result context "ab" in section "Parallel patches" is misleading --- it looks like two context composed; "c" may be a better idea. Point 4. of section Performing the merge is hard to understand for me (in particular, "these patches" is hard to dereference). In point 5. it may be worthwile to expain that "ditching" is doable just as a sequential composition with B_1 --- it is not yet another patch manipulation operation (in general, "ditching" (or factorization) is nontrivial in algebras, categories, optimizing compilers, optimizing source code management systems, etc.). --Mikon

The claim that merging is symmetric does not follow either from the original construction, which uses the imprecisely defined "commutation" notion, nor from my (currently abandoned) construction, which uses a weaker (probably) notion. Or perhaps the symmetry of merging is not a property of the construction but an assumption on the form of patches, just as the existence of reverse patches? --Mikon

As far as I can tell from section "Forced commutation" the forced commutation of X and Y is just X and Y. What am I missing? If I'm right, why not just say that? --Mikon

 * Sorry, I keep meaning to answer your questions (and then wandering off and forgetting about them). Perhaps you should start interacting with the guys on the darcs-conflicts list?  That might be a more comfortabel venue for this :-) I'll re-read your questions later and get back in the meantime. -- Kowey 17:25, 28 October 2006 (UTC)

 * No problem. Thank you again for the wikibook. When I have something ready I will start advertising. :)

For a more formal description of the things in this section of the book see also: []. And there's an alternative definition of patch theory using multisets of immutable patches here: []. I don't know enough of category theory to make any comments but above links might be helpful material to compare with. -- arjan

 * Thank you! Wow, you are, presumably, the guy who adds beer to shopping lists! :) The server of the first link is currently down, but the authors of the second link seem like they would know what they are doing. This theory is more difficult than I thought. Every two-line categorical definition I throw at it ends up short of capturing the behaviour of Darcs (as I guess it works). If I had some more time this might actually get quite interesting. Anyway, time to try three-line definitions... --Mikon

 * OK, the server in the first link now works --- nice paper, too... --Mikon

Answering questions
Hi, here are mostly non-answers to your questions in case you're interested. You've probably got what you need from the paper, but here's my take, just in case. Note that I probably will not be able to answer any more, judging from my inability to keep up with my previous promises! Perhaps Ian would be willing to help.

 * 1) What does "intended to perform the same change" precisely mean?
 * 2) * The idea of XY and Y'X' being extensionally equivalent (where $$XY \leftrightarrow Y'X'$$) sounds right. Informally, if you unrecorded Y and X and then re-recorded it into one big patch Z, this patch would be exactly the same as if you had unrecorded X' and Y' and re-recorded that.
 * 3) The claim that merging is symmetric does not follow either from the original construction, which uses the imprecisely defined "commutation" notion, nor from my old constructions, which use a weaker (probably) notion. Or perhaps the symmetry of merging is not a property of the construction but an assumption on the form of patches, just as the existence of reverse patches?
 * 4) * Sorry, sort of a non-answer here. For merging, all we say is that AB' performs the same change (see above) as BA', where $$A^{-1} B \leftrightarrow B' A^{-1}{'} $$ and $$B^{-1}A \leftrightarrow A' B^{-1}{'}$$.  Surely we can work something out from the notion of commutation.  Perhaps there is some missing link re: how inverse patches are supposed to behave wrt to commutation?  Some relationship between $$A{'}^{-1}$$ and $$A^{-1}{'}$$
 * 5) As far as I can tell from section "Forced commutation" the forced commutation of X and Y is just X and Y. What am I missing? If I'm right, why not just say that?
 * 6) * Hmm... that does sound right. I guess the reason is just to keep in mind that Y' is still "supposed" to be Y and X' is supposed to be X even if their effects are quite the opposite.  Can't help you here.  I need to learn this stuff better, myself.

Sorry, I'm going to have to throw my hands up here and leave the discussion to the more mathematically minded. Am going to read Ian's paper. Best wishes.

-- Kowey 16:38, 14 November 2006 (UTC)

Thank you very much for the answers. I've only skimmed the two papers, searching in vain for category theory inside. I may some day compare their results to mine (when I have any), but for now I think I've grasped enough understanding from the examples in your book to be able to formalize this myself.

I think my questions show what a mathematically-minded person may have trouble with when reading about patch theory. If the troubles are in the theory, in its language or just in your book is still unclear to me. During the time I've spent on reformulation I've learned that the patch interactions are by far not trivial, despite my first impression, so indeed often the only thing one can say is "any operation with the following properties is called commutation/inverse/merge/etc." and not "we define commutation (inverse/merge/etc.) of patches A and B to be the following...". Not only I failed to provide constructions for many notions, but I even failed to uniquely determine them by axioms. And quite possibly this is just how it has to be.

I guess the mixup between "axioms" and "definitions" may be the main problem with this book and some earlier descriptions of patch theory. Mathematically-minded persons are inclined to read "definition" and "uniquely determined" even between the lines, so they really need a clear statement at the beginning that you only describe important properties of a particular construction (code), in the hope the properties will hold also for others. Also, any use of the word "definition", unless it's really a definition (a description that uniquely determines a mathematical object), should be avoided.

After all, I think the pictures you have in your presentation are a good idea, perhaps with a change in their descriptions from "add to line X" to "insert before line X". Also, a single example of a Darcs patch file head to head with a picture would be helpful (though probably earlier in your book you already have one). Thank you again. Frankly, if I were you, I'd stop writing these chapters, until there is something stable to write about. :)

--Mikon 15:13, 15 November 2006 (UTC)

Admin stuff
Oh by the way, i have updated the diagrams/text to incorporate your advice re: shplst and ab context; also, i think i am going to postpone learning about your work below until you're somewhat satisfied with it. Speaking of which, you might consider creating a wikibooks account just so that your contributions are attributed -- Kowey 16:38, 14 November 2006 (UTC)

Category Theory Musings
(Category theory nerds only, the occasional mathematics foundations or computer science foundations specialist will be tolerated.)

If you do not mind I will reserve this part of the discussion page for a reformulation of the patches theory in terms of category theory, which seems necessary for me to understand this. Let's hope it will prove any better than a pure set theory approach... Please comment using indents inside the text or using item numbers at the end of this page. --Mikon

Unfortunately, I won't have time to work on this in the foreseeable future, so a few parting thoughts: 1. Unfortunately the categorical reformulation does not work so far (see the TODOs, and much more is needed). 2. The reformulation would be much easier for a system like A Principled Approach to Version Control, which is strict and 'constructive' instead of axiomatic. 3. The elegance of category theory aside, my main goal was to systematically construct the semantics of the patches theory, as opposed to the original ad-hoc axiomatic approach. So A Principled Approach to Version Control beats me to it, though for a significantly different theory. 4. Perhaps, since we don't describe the quantum mechanics or any other given physical system that holds us hostage, it would be wiser to change the Darcs code to fit an elegant, strict, carefully constructed theory, instead of trying to formalize and prove properties of such a complex and changing system as the current Darcs? 5. See Darcs Patch Theory (more or less) for what I mean by 'complex system'. I suspect only a quarter of this complexity is inevitable, which is still impressive. 6. So Long, and Thanks for All the Fun. --Mikon (talk) 18:23, 1 January 2009 (UTC)

What is a category?
Before I describe the category of patches, here is the definition of a category (somewhat edited part of the Wikipedia article at http://en.wikipedia.org/wiki/Category_%28mathematics%29#Definition).
 * 1) A category C consists of
 * 2) * a class ob(C) of objects:
 * 3) * a class hom(C) of morphisms. Each morphism f has a unique source object a and target object b where a and b are in ob(C). We write f: a -> b, and we say "f is a morphism from a to b".
 * 4) * for every object x, a morphism idx : x -> x called the identity morphism for x.
 * 5) * for every three objects a, b and c, a binary operation hom(a, b) x hom(b, c) -> hom(a, c) called composition of morphisms; the composition of f : a -> b and g : b -> c is written as f;g (some authors use other notation).
 * 6) such that the following axioms hold:
 * 7) * (associativity) if f : a -> b, g : b -> c and h : c -> d then f ; (g ; h) = (f ; g) ; h, and
 * 8) * (identity) for every morphism f : a -> b, we have ida ; f = f = f ; idb.
 * 9) Examples of categories (from the same Wikipedia article):
 * 10) *The category Set of all sets together with functions between sets, where composition is the usual function composition and identity is the identity function.
 * 11) *The category consisting of all groups with group homomorphisms (this is a subcategory of Set, in particular composition and identity is the same as in Set).
 * 12) *Any monoid (algebra with a composition and identity operations, e.g., the monoid of character strings with string concatenation and empty string) forms a category with a single object x (e.g., the set of all strings). The morphisms from x to x are precisely the elements of the monoid, and the categorical composition of morphisms is given by the monoid operation.

A category of repositories and patches

 * 1) Repo is a category representing repositories and patches. It is a subcategory of Set (at least until we need to add some additional artificial morphisms) and has some additional structure and properties we will formally present below. We will call the objects of Repo repos (from "repositories") and we will call the morphisms of Repo patches (they are abstractions of context-less patches of Darcs).
 * 2) a repo that belongs to ob(Repo) is the set of all possible states of a repository (the states are determined by contents and permissions of files and directories which exist in the given repository, etc.); for simplicity we identify single-file repositories with files, etc.; we often abbreviate "set of all possible states of file N" to "N", etc.
 * 3) patches that belong to hom(Repo) are functions between sets of states. Not every such function needs to belong to hom(Repo) (that is, the category needs not be a full subcategory of Set), e.g. we may want a Repo modelling only repositories with hunk patches. The domain of a patch is the domain of the function (e.g. the set of states of a file it "reads" the contents to be changed from); the codomain of a patch is the codomain of the function (e.g. the file it "writes" the modified contents to).
 * 4) As in all subcategories of Cat, identity in Repo is the identity function and the composition f ; g of two patches f and g is the composition of functions (applying patch f first and then patch g).
 * 5) Just by Repo being a category we have the following properties:
 * 6) * patch composition is a function (the result of applying a patch depends only on the starting repository state)
 * 7) * patch composition is associative (compacting consecutive patches into a single patch does not change the outcome repository state)

Comments:

It seems to me that with definition 2, Repo contains only a single element since given any set of files, permissions etc. there is a morphism that maps it to any other set of files, permissions etc. Nullstring (talk) 18:32, 9 January 2008 (UTC)

 * Bad wording on my part. Thanks, fixed.

For example, there is a patch that maps version 2.6.1 of the Linux kernel source code to version 2.0.1 of the Firefox source code.

 * Yes, it is a function between the set of all states of files and directories as in kernel 2.6.1 and the set of all states of files and directories as in Firefox 2.0.1. The function can be applied also to some other versions of the Linux kernel, but only the very close ones, where no files and directories are added or removed.

If I'm correct here, then either the set of morphisms is trivial, or ob(Repo) should really contain repository states rather than sets of repository states.

 * Nope, that would be too limiting. My idea was half-way between that and one huge object containing everything: for each directory and file structure you have one object that contains every possible state of files and directories (and whatever else is a part of the repository).

Another way to go (which I haven't thought through) might be to have ob(Repo) consist of pairs (product, repo) so that repository states are tied to the products they represent. This maps well to the way we use repositories, but I don't know how well it maps out mathematically. Nullstring (talk) 18:32, 9 January 2008 (UTC)

 * Unfortunately I don't know (or remember) what 'product' is (and I use the term for a different, standard concept below). Anyway, I don't think such small objects would be useful and one of my aims was to abstract the context of patches so that they are applicable when reasonable, instead of always (as a standard diff output is, though you may get an error) or only for a particular single snapshot of a repository, as Darcs patches are (sometimes) defined. My choice of the "reasonable" circumstances was when the structure of the repository agrees (the directory and file structure, etc.). --Mikon (talk) 19:35, 1 January 2009 (UTC)

Required additional structure

 * 1) Repo has finite products (patches can read from many files, directories and produce the state of many aggregated repos). In particular, Repo has a product of the empty family of repos, which is called a terminal object 1. The terminal object can be imagined as a file that is guaranteed to be always empty (say, /dev/null; in fact any permanently unmodifiable file or directory would do, since it has a one-element set of possible states). For any repo b there is exactly one patch !_b : b -> 1 --- the patch that reads the contents from repo b and writes nothing to 1 (but does not change b). A particular state of a given repository a can be represented as a patch o : 1 -> a that reads from /dev/null and produces at once a fully determined state (contents, etc.) of a.
 * 2) A concrete inverse of patch f : a -> b in context o : 1 -> a is a patch g : b -> a, such that o ; f ; g = o. Concrete inverses always exist; for example, the morphism !_b ; o (the constant function always giving the element represented by o) is a concrete inverse for any f in context o. A right inverse of f : a -> b is a patch $$f^r$$ : b -> a such that $$f ; f^r = id_a$$. If a right inverse of f exists, it is also a concrete inverse of f in any context. The concrete inverses have no role in our subsequent definitions, but they are quite important for source control.
 * 3) A merge of a pair of patches f : a -> b and g : a -> b is a pair of patches f': b -> b, g': a -> a such that f ; g' = g ; f'. The patch f ; g' is then ambigously called the merge morphism, or just the merge. For example, any manually chosen repo state s : 1 -> b gives rise to a merge f ; !_b ; s = g ; !_b ; s.
 * 4) (TODO: Verify for hunk patches.) We call a merge of f : a -> b and g : a -> b the most general merge and denote it's components m1(f, g): b -> b, m2(f, g): b -> b and the corresponding merge morphism m(f, g) : a -> b, iff for every merge f', g' of f and g:
 * 5) * (*) there exist h1, h2 : b -> b such that f' = m1(f, g) ; h1 and g' = m2(f, g) ; h2
 * 6) * (**) and for any h1, h2 : b -> c, if m1(f, g) ; h1 = m1(f, g) ; h2 then f' ; h1 = f' ; h2 and if m2(f, g) ; h1 = m2(f, g) ; h2 then g' ; h1 = g' ; h2.
 * 7) If the most general merge of f and g does not exist, we say that there is a conflict between f and g or that f and g are conflicting patches.

Properties that follow

 * 1) If g is a concrete inverse of f in context o then f is a concrete inverse of g in context o ; f ("an inverse of an inverse is the original"). Proof: we have to show that (o ; f) ; g ; f = o ; f. This trivially follows from g being the inverse: o ; f ; g = o.
 * 2) TODO: The most general merge is unique. Proof: let f1, g1 and f2, g2 be the most general merges of f and g. From (*) we know that there are h1, h2 such that f1 = f2 ; h2, f2 = f1 ; h1. So f1 = f2 ; h2 = f1 ; h1 ; h2, so by (**) f2 = f2 ; h1 ; h2, so f1 = f1 ; h1 ; h1 ; h2 ; h2. Hmmm, too weak? Oops, I don't use the fact they are merges... I need some more examples.
 * 3) The most general merge of a pair of identical morphisms is a pair of identities. Proof: let the merged morhism be called f. Obviously the pair of identities is a merge of f, f. Let f', g' be a merge of f, f. For (*) put h1 = f' and h2 = g'. For (**) notice that id_b ; h1 = id_b ; h2 implies that h1 = h2 and so f' ; h1 = f' ; h2 and similarly for g'.
 * 4) The most general merge operation is not symmetric, but if f', g' is a merge of f, g then g', f' is a merge of g, f and analogously for the most general merges. Proof: the corresponding definitions are invariant under the exchange of f for g and f' for g' and m1(f, g) for m2(f, g).
 * 5) The relation of not having a conflict is reflexive and symmetric, but not transitive. Proof: two of the above facts and an easy example.
 * 6) TODO: the most general merge operation is associative
 * 7) TODO: a merge of a composition is ...

Examples encoded in the new formalism
In our examples let us fix a one-file repository and focus on hunk patches, that is patches adding or removing lines (given by line number and content) and acting as identities if that cannot be done.

 * 1) Two different patches (repository imports, rather) f, g : 1 -> b need not be in conflict. For example, if there are only two morphisms from b to b in the Repo at hand: identity and h = 1_b ; f : b -> b then h, h is the only merge and so the most general merge.
 * 2) Let patch f insert line "beer" before line 3 of the file and act as identity if the contents of the file has less than 2 lines. Then $$f^r$$ that removes line 3 with "beer" in it or acts as identity if such line does not exist, is a right inverse of f. $$f^r$$ is a concrete inverse of f in all contexts. In Repo with all functions as patches (as opposed to only hunk patches) another concrete inverse of f in context o is the function g, such that g(f(o)) = o and g(x) = x for x <> o. A concrete inverse of $$f^r$$ in context o ; f, for any context o, is f; a concrete inverse of $$f^r$$ in any other contexts is the identity.
 * 3) Let g insert line "pasta" before line 5 of the file and act as identity if the contents of the file has less than 4 lines. Let the right inverse of g which is also a concrete inverse of g among hunk patches be called $$g^r$$. Note that right inverses of $$f^r$$ and $$g^r$$ do not exist. Also, left inverses of g and f do not exist and so inverses of f and g do not exist (the functions are not surjective).
 * 4) The following definition may or may not be useless for our formalism, but we use it in the old examples below:
 * 5) * A left conjugation of patch f : b -> b by patch g : a -> b is such a patch l(f, g) : a -> a that g ; f = l(f, g) ; g. A right conjugation of patch f : a -> a by patch g : a -> b is such a patch r(f, g) : b -> b that f ; g = g ; r(f, g). The conjugations needn't be unique, so we assume a choice of them for our notation. Note that if a left inverse $$g^l$$ of g exists then l(f, g), as well as r(f, $$g^l$$) exist (e.g., g ; f ; $$g^l$$) and if $$g^r$$ exists then r(f, g), as well as l(f, $$g^r$$) exist (e.g., $$g^r$$ ; f ; g). However, if the inverses do not exist, the conjugations may exist nevertheless.
 * 6) l(g, f) and r(g, $$f^r$$) exist and insert line "pasta" before line 4, l(f, g) and r(f, $$g^r$$) do not exist (adding "pasta" would be done at a wrong line), r(f, g) and l(f, $$g^r$$) exist and are probably unique: $$g^r$$ ; f ; g, r(g, f) and l(g, $$f^r$$) may be set to be equal to $$f^r$$ ; g ; f, but can also be chosen to just insert "pasta" before line 6 --- both choices are good for the merge. The result of m(f, g) has "beer" as line 3 and "pasta" as line 6. So, then m(f, g) = f ; r(g, f) =  g ; f (but g ; r(f, g) is wrong!).
 * 7) We now try to merge $$f^r$$ and $$g^r$$. The composition $$f^r$$ ; $$g^r$$ results in lines 3 and 6 of the original file removed (if both contained "beer") and $$g^r$$ ; $$f^r$$ results in lines 5 and 3 removed. Intuitively the latter is m($$f^r$$, $$g^r$$). Since the left inverse of $$g^r$$ is g, we can set l($$f^r$$, $$g^r$$) = $$g^r$$ ; $$f^r$$ ; g and l($$g^r$$, $$f^r$$) = $$f^r$$ ; $$g^r$$ ; f, but neither seems helpful for the merge. r($$f^r$$, $$g^r$$) does not seem to exist ("pasta" is possibly removed from wrong line and cannot be just readded because it might have been absent from the original file), r($$g^r$$, $$f^r$$) removes "pasta" from line 6 (and seems to be unique). So m($$f^r$$, $$g^r$$) = $$f^r$$ ; r($$g^r$$, $$f^r$$) = $$g^r$$ ; $$f^r$$.
 * 8) Let f' insert line "beer" before line 10 of the file and act as identity if the contents of the file has less than 9 lines. Let h = f ; f' so that its result has "beer" as lines 3 and 10 (inserted before lines 3 and 9 of the original file). Note that h is no longer a hunk patch. The result of $$h^r$$ has lines 3 and 10 with "beer" in them removed, if such lines exist.
 * 9) Let us try to merge h and g. Note that in this case neither h ; g nor g ; h is m(h, g); this implies that also g ; r(h, g) and h ; r(g, h) are not the merge morphism. Neither l(g, h) nor l(h, g) exist. The result of m(h, g) has "beer" as line 3 and 11 and "pasta" as line 6. m(h, g) = g ; f' ; f = h ; r(g, f). TODO: try to express m(h, g) in terms of m(f, g), m(f', g), etc.
 * 10) Let h' = f' ; f. The result of m(h', g) has "beer" as line 3 and 12 and "pasta" as line 6. m(h', g) = f' ; g ; f.
 * 11) m($$h^r$$, $$g^r$$) = $$f'^r$$ ; $$g^r$$ ; $$f^r$$, m($$h^r$$, g) = $$f'^r$$ ; g ; $$f^r$$, m($$h'^r$$, g) cannot be expressed as a composition of the three (so it's not always the case that merges of compositions of hunks are compositions of the very hunks), m($$h'^r$$, $$g^r$$) is almost equal to $$g^r$$ ; $$f'^r$$ ; $$f^r$$, but if the original file has no "pasta" at line 5, "beer" will be removed from line 10 of the original file, instead of line 11.
 * 12) Let k = $$f^r$$; f'. Notice that k has no right nor left inverses. TODO: try to merge k with everything.

Loose remarks documenting the process of reformulation
Most of the following uses a naming style, I've abandoned (file names instead of repos, etc.).

 * 1) let's start with a simple case of repositories with no directories, no file permissions, only a fixed collection of named files, which furthermore cannot be deleted nor renamed
 * 2) let's identify the set of all possible file contents with the set of all sequences of characters; let's say the set of all patches is a subset of the set of functions on character sequences (or, instead of functions, we may talk of representations of functions, e.g. in various diff formats); let's identify the files governed by the repository (or the file descriptors in the filesystem) with their filenames
 * 3) we seem to operate in a category P, where filenames are objects of P and patches are morphisms of P
 * 4) the domain of patch A is the filename N (the location on the hard disk, or the file descriptor in the filesystem) from which the patch "reads" the contents to be changed; the codomain of A is the filename M to which A "writes" the modified contents; we write this A : N -> M; usually N and M will be the same filename
 * 5) identity on filename N in P (called id_N, or id in short), is the identity (empty) patch that operates on N by not changing it
 * 6) composition of patches A and B in P, is the "sequence" AB (I like this diagrammatical notation) of patches A and B; for now let's gloss over any other cases than A and B both operating on the same file N
 * 7) P is (roughly) a subcategory of the category of sets and functions (called Set) and it seems easy to make it a full subcategory, close it under products and coproducts and perhaps recover even more of the Set properties, but let's forget it until we need the other properties
 * 8) we need to close P under finite products:
 * 9) * for filenames N_1, N_2, ..., N_k let N_1 x N_2 x ... x N_k be an object of our category (it can be identified with a huge reserved space on hard disk under the name "N_1xN_2x...xN_k" able to hold the contents of k files)
 * 10) * let pi_n : N_1 x N_2 x ... x N_k -> N_n be a projection patch, that is, a patch that given a contents of k files produces the contents of the n-th file;
 * 11) * for patches A_1, A_2, ..., A_k, such that A_n : M -> N_n, there exists exactly one patch  : N -> N_1 x N_2 x ... x N_k such that  pi_n (composition) is equal to A_n; the  patch can be identified with the function that given contents of file M produces, e.g., the concatenation of results of patches N_1, N_2, ..., N_k on that content
 * 12) now that P is closed under products, P, in particular, it has a product of the empty family of file names, which is called a terminal object 1
 * 13) the terminal object can be imagined as a file that is guaranteed to be always empty (say, /dev/null); for any filename N there is exactly one patch !_N : N -> 1 --- the patch that reads the contents from file N and writes nothing to 1 (but does not change N)
 * 14) now we are ready for the first important discovery: contexts are patches with domain 1
 * 15) under this formulation, $${}^oA^aB^bC^c$$ reads c = oABC, or more precisely: o : 1 -> N, A : N -> N_1, a = oA : 1 -> N_1, B : N_1 -> N_2, b = oAB : 1 -> N_2, C : N_2 -> N_3, c = oABC : 1 -> N_3
 * 16) the categorical inverse of a morphism A, that is, the only morphism B such that AB = id and BA = id, is just the patch inverse $$A^{-1}$$; the $${}^{o}A^{a}{A^{-1}}^{o}$$ condition about contexts trivially holds, when translated to the categorical notation
 * 17) I see from the patch theory text that the set of morphisms of P must be such that every morphism A : N -> N has the inverse; so every endomorphism in P is an isomorphism; obviously other morphisms needn't be isomorphisms, e.g. if all the morphisms between 1 and  other file names are isomorphisms, then all files in the repository are empty (or at least not modifiable at all)! set-theoretically, the isomorphism condition means that every patch A : N -> N (function on character sequences) has to be a bijection
 * 18) the commutation of patches X and Y seems to be described in the text as the existence of such X' and Y' that: for each o : 1 -> N, oXY = oY'X', oX = oX' and oY = oY'; is it correct? Or is the context o actually fixed in some of the equalities (then it's easier to find a commutation)? (see the translation of this paragraph to the human language at the beginning of the talk page)
 * 19) examples suggest commutation is something different than proposed above (and it seems fortunate, because otherwise commutation would be very hard to obtain for some global context sensitive formats of patches); I now have to wait for some more input to choose an appropriate definition
 * 20) Hmmm. I'll assume the following definition of commutation and try to work from this onward, looking out for problems: the commutation of patches X and Y is such a patch Y' that for each o : 1 -> N, oXY = oY'X. (Yes, there are problems --- I also need the other, symmetric definition of commutation...)
 * 21) it seems from the description in section "Parallel patches" that a pair of parallel patches is a triple o : 1 -> a, A : a -> b, B : a -> c. What is a merge of such parallel patches? We have $$B^{-1}$$ : c -> a, so $$B^{-1}$$ ; A : c -> b. I see a and b should be equal repos (file names) for the commutation below to make sense. Let A_1 : c -> c be the commutation of $$B^{-1}$$ and A, so the following are extensionally equal: $$B^{-1}$$ ; A and A_1 ; $$B^{-1}$$. The patch B ; A_1 : a -> c is the merge of the parallel patches.
 * 22) Hmm, I see I've not used the morphism o for anything, so perhaps merge is independent of the context. I'll have to verify this vs. section "Performing the merge" and later sections. Unless a is equal to c, the typing is not symmetric, so merging A with B may be doable, while merging B with A may be not... The merge M of A and B has the property that M ; $$B^{-1}$$ = A, but I can't find anything else to say about M and I bet this is not enough for the user (e.g., probably M ; $$A^{-1}$$ = B would be needed, but perhaps some ugly kinds of patches are really not symmetric wrt merging?).
 * 23) I've verified my definition of merge against the example in section "Merging is symmetric" and it's OK and, by accident, symmetric in this case. However, there is a subtle point here: if file rename is not a shallow operation on a directory (certain inode gets another name, but patch A still writes to the same inode) but if it's an operation that wipes the contents of one file and then writes it to another file, then the merge is no longer symmetric. The result then depends on whether adding the "beer" line happens before the wiping out or after --- I guess this is called a conflict...
 * 24) the "commutation with inverse property" is quite trivial. To obtain one equality from the other just multiply both sides by one of the 8 patches from the left and by another from the right.
 * 25) that would be it --- I've read and understood the entire 3 chapters about patch theory --- so the categorical reformulation works for me :).  Now it's time to look up some other articles to try and find answers to my questions and verify my guesses I've incorporated into the reformulation. Thanks a lot for the wikibook!
 * 26) Oops. While trying to compute some simple examples with my formalism I've noticed the patches are usually not surjective, so they do not have left inverses (when their domains and codomains are equal). I'll have to limit their codomains to make them surjective, but then I start depending on Set a lot. :( Other approach would be to work with partial functions, but then true inverses are even more scarce.
 * 27) a better way will be to drop the requirement that patches have inverses. Right or left inverses should suffice for most things, anyway. And if true inverses are needed they can always be postulated for some patches. So I drop the two paragraphs:
 * 28) * Every patch f : a -> a must have an inverse. So every endomorphism of Repo is an isomorphism. Obviously other morphisms needn't be isomorphisms or, in the presence of terminal objects, the category would become trivial (all repos unmodifiable)
 * 29) * If the categorical inverse $$f^{-1}$$ of a patch $$f$$ : $$a$$ -> $$b$$ exists, it is unique (categorical inverse is a morphism that is both a right inverse and a left inverse: $$f ; f^{-1} = id_a$$ and $$f^{-1} ; f = id_b$$); $${f^{-1}}^{-1} = f$$).
 * 30) I'm a bit stuck right now. The overall setup is now stable and much simpler than any existing approaches, but the definition of merge should be probably much more complex. I don't like complex things so I guess I will take a break. So much for a page of category theory that ends world hunger. :)
 * 31) The following definition of the Darcs "inverse" is wrong (unless we restrict Repo in strange ways):
 * 32) * A concrete inverse of patch f : a -> b in context o : 1 -> a is a patch cinv(o, f) : b -> a such that o ; f ; cinv(o, f) = o and f = cinv(o ; f, cinv(o, f)).
 * 33) * Let repo a be the set {1, 2}, repo b be {1, 2, ..., 10} and all functions between a and b belong to hom(Repo). Then there are no cinv operation with the states properties. (Let's assume such cinv exists. There are 2 ^ 10 = 1024 functions from a to b and only 10 * (10 ^ 2) = 1000 pairs of elements of b and functions from b to a. Let o : 1 -> a and let F(f : a -> b) = (o ; f, cinv(o, f)). Then there exist two different functions f1, f2 : a -> b such that we have F(f1) = (o ; f1, cinv(o, f1)) = (o ; f2, cinv(o, f2)) = F(f2). It would follow that f1 = cinv(o ; f1, cinv(o, f1)) = cinv(o ; f2, cinv(o, f2)) = f2, which is a contradiction). Another example of strange results of this definition appears if we consider concrete inverses of the hunk patch that removes line 3 with "beer", in contexts with no such line. It seems natural that we would like to take cinv in this case to be the identity, but then the inverse of identity cannot be the identity, which is outright bizarre. OTOH, if we weaken the second equality to o ; f = o ; cinv(o ; f, cinv(o, f)) it follows from the first equality for the two inverses and so it's not needed.
 * 34) Perhaps it would make sense to generalize concrete inverse to:
 * 35) * A right inverse of f : a -> b relative to h : c -> a is such rinv(h, f) : b -> a that h ; f ; rinv(h, f) = h.
 * 36) * This may find some use in (some special?) merging. It also makes it possible to compute concrete inverses taking into account only parts of the patch collection: if there is h such that rinv(h, f) exists then cinv(o ; h, f) is equal to it, but we ignored the, possibly complex, patch o.
 * 37) I see no way of determining a unique concrete inverse for a given patch. The following definition is wrong (not unique, e.g. the inverse of identity is only known to be an isomorphism):
 * 38) * We require that there exists the most general concrete inverse cinv(o, f) : b -> a for any f : a -> b and o : 1 -> a. That is, for every concrete inverse g of f and o, there is exactly one morphism h such that g = cinv(o, f) ; h. Note that the most general concrete inverse depends not only on f and o but also on hom(Repo), as demonstrated in the examples below.
 * 39) * o ; cinv(o ; f, cinv(o, f)) = o ; f for any context o (simple equational reasoning not using the property that cinv is most general). However, the following equation does not hold, e.g., for hunk patches: cinv(o ; f, cinv(o, f)) = f. So it is not true that "the most general inverse of the most general inverse is the original".

Recommend changing "Add to list" to "Insert in list" (Nice article)
Arjan, our protagonist in the narrative, is said to be "adding" items to the list. However, he is in fact, "inserting" them. Additionally, "adding" implies "appending" and in the case of the Pasta, it becomes nuanced when he is said to be adding to the end of the list which is in fact beyond the last position.

It would actually be better if the pasta was not "inserted" at the end of the list at all; perhaps the second last position. Doing so would more eloquently juxtapose the example with real world problems.

More mathematics
Hi,

I think the article has pretty lack of mathematics. All the "mathematical explanation" is about diagrams of files. But I miss something more technical, more "mathematical". Can anyone add a section of really mathematical explanation of darcs theory? In Groups, in Free monoids or in categories.

Thanks,--Xan2 (discuss • contribs) 15:46, 16 September 2014 (UTC)

title: Talk:Understanding Darcs/Patch theory


text:
CDuce/Toplevel

The CDuce toplevel interpreter is launched by the command cduce or better, by ledit cduce

The directive #quit;; permits to exit the interpreter.

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/

title: CDuce/Toplevel


text:
Raising Chickens/Building a Pen/Maintenance

Some people use old fish aquariums to house baby chicks, they are easy to clean and act as a wind breaker so the chicks don't get cold. In order to make cleaning the cage or pen easier, you can put some hardwear screen or window screen on the floor of the pen and newspaper under the screen. The screen will act as a good traction for baby chicks but also all you have to do is lift, rinse off, change newspaper, dry, and put back in for re-using over and over again. You'll want to clean the pen every day or two so that the chicken is comfortable and doesn't have to lay in its own waste.


text:
Muggles' Guide to Harry Potter/Characters/Romilda Vane

Overview
Romilda Vane is a fellow student of Harry Potter. She is in Gryffindor house, but is two years younger than Harry – in Harry Potter and the Half-Blood Prince, when Harry is in sixth year, it is mentioned that she is a fourth-year.

Half-Blood Prince
Romilda is one of a group of fourth-year girls who try to get Harry to sit in their compartment of the Hogwarts Express, instead of with Luna Lovegood and Neville Longbottom. Harry rather disappoints them by saying he'd rather stay where he was.

Romilda has rather set her cap for Harry, to the extent of trying to get him to take her to Professor Slughorn's Christmas party, by slipping him some love potion; Hermione has warned him, however, and he sets the love potion, concealed inside chocolate cauldrons, aside in his dorm. Ron later takes these by mistake, damaging his relationship with Lavender Brown.

When Harry publicly announces the start of his romantic attachment to Ginny by kissing her at the Gryffindor Quidditch victory party, Romilda appears to be very angry.

Strengths
Romilda is assertive and not afraid to approach Harry. She is probably the leader of her clique of fourth year girls.

Weaknesses
Romilda is self-centered, vain and a bit ruthless. Her interest in Harry is strictly about prestige and peer approval rather than any genuine feelings for him.

Analysis
Like so many characters in the Potter series. Romilda's character is echoed by her name. She is vain, trying to hook up with Harry not for anything that Harry has, but for what he can bring her: a measure of fame amongst the girls in the common room. In all of her plotting and scheming to get Harry to notice her and go out with her, notably absent is any idea of what Harry would like. The very first time we see her, we note that she is apparently quite willing to dismiss Harry's friends, in her attempt to be the force that brings Harry to their compartment.


text:
Wikibooks talk:Avoid instruction creep

Simplified
I like this new revision, it is much more simple and to-the-point then the wikipedia version is. Lead by example: it's a good idea. --Whiteknight (talk) (projects) 20:53, 18 October 2006 (UTC)

 * I'm glad! I started writing a little note here to seem less of a rouge, but then my nieces woke up ... --Swift 21:54, 18 October 2006 (UTC)
 * Yeah, looking good so far. It's definitely a good policy to have. Wikipedia policy has grown ridiculously fat trying to keep people from abusing or confusing rules. Oh, and good luck to new admins trying to extract info on how their new tools actually work from amongst all the harsh warnings about what not to do with them! GarrettTalk 01:30, 22 October 2006 (UTC)

As a Guideline
I am in no particular hurry to make this page official, because I'm sure that there are more things that can be said on the issue, and more people who should chime in before we try to make it official. However, I am thinking that this proposal would probably make a better guideline, then a policy. If we specify that distinction early, it will be much easier ( i think) to get the votes to pass it later. --Whiteknight (talk) (projects) 19:53, 23 October 2006 (UTC)

Applying WB:CREEP to itself
In regards to this edit, I appreciate the irony. However, this page is at present only an essay, but pertains to policies and guidelines, and thus does not logically apply to itself. Moreover, the points removed were not making the page harder to understand or manage, but rather were helpful tips. With that said, I do see why it might be problematic to say that each requirement should have "clear consensus", as it's not necessarily good to remove an instruction just because consensus was never explicitly established for it. The last point, "prune instructions regularly", might be problematic for similar reasons. Belteshazzar (talk) 16:32, 9 January 2011 (UTC)

'Requirements which are found to lack community consensus should be removed or modified.'
I changed this sentence to 'Requirements without community consensus should be removed or modified', though this was later changed back. IMO the sentenced should be shortened in the above manner for concision. This is because it requirements are 'found to' lack community consensus, they do lack community consensus; if it is not 'found to' lack community consensus, how does one know that it lacks community consensus? Leaving out 'are found to' also removes a passive voice phrase. As for 'lacks;, if something lacks community consensus, then it doesn't have community consensus. Kayau 14:28, 21 March 2011 (UTC)
 * It seems to me that saying it that way could encourage summary removal of instructions for no reason other than that consensus was never explicitly established for them. Granted, that is not necessarily a bad thing, but in some cases it could cause disruption. "Are found to lack community consensus" seemed like it would encourage discussion. If the grammar is a problem, perhaps there is a better way to say it. Belteshazzar (discuss • contribs) 16:57, 21 March 2011 (UTC)
 * If consensus was never explicitly established for them, surely one cannot tell, at first glance, that there is no consensus? Kayau 12:55, 23 March 2011 (UTC)
 * I agree with Belteshazzar, the sentence should be clear that discussion should happen before lack of consensus is considered to be the case. I also think lack of consensus and no consensus can mean two different things. --dark lama  14:42, 23 March 2011 (UTC)
 * It's pretty much 'common sense' that discussion should happen, IMHO. In any case, I don't think 'found to' implies discussion either. What is the difference between lack of and no consensus? Kayau 14:57, 23 March 2011 (UTC)

 * I think "common sense" can be found in many pages in the Wikibooks namespace. Lack of consensus can mean there was lack of an attempt to find common ground and an agreeable compromise. No consensus can mean that several clear options have been expressed with some people agreeing with each, but overall the options conflict with one another and no common ground could be found as a result despite attempts to find an agreeable compromise. --dark lama  00:37, 24 March 2011 (UTC)
 * Fair enough, I see the difference between lack and no. But then, does 'found to' really imply the need of discussion? Kayau 13:19, 24 March 2011 (UTC)

 * I think "found to" may mean that a person attempted to look into whether there is a consensus or not. I think Decision making might imply the need for discussion. --dark lama  10:36, 30 March 2011 (UTC)

title: Wikibooks talk:Avoid instruction creep


text:
Wikibooks:Be bold

Be bold...
Wikibookians are encouraged and empowered to be bold and to use their best judgment in making changes, adding and removing content, starting discussions when community input is needed or when decisions are not so cut and dry, and helping to make Wikibooks a better place. If you see factual errors in a book or module, an error in spelling, grammar, or formatting, please fix it! If you see ways to improve a book or module, do so! Permission to make improvements isn't required.

...but please don't be reckless
Wikibooks is a place where anybody can edit, and if you think that you can help the project, you are more than welcome to try, but don't be reckless either. If you would like to make drastic changes, sometimes it is better to start a discussion and reach community consensus beforehand. Even the best of intentions, however, may have unintended negative consequences. Be bold in making changes that need to be made, but also be bold in admitting your mistakes and cleaning up after yourself.

This guideline
Wikibookians do not need to be bold, but are encouraged to be bold, and should rest assured that bold actions made with good judgment will likely not be met with undue criticism. Other Wikibookians should assume good faith and avoid calling bold actions reckless, instead calmly pointing out any mistakes that may have been made in the process.

fr:Wikilivres:N'hésitez pas !

title: Wikibooks:Be bold


text:
XForms/Search Amazon

Motivation
Here is an example web service provided by Amazon. It also uses the custom control to bind images from the output to the screen.

Link to XForms Application
Load Form

Discussion
Note: If you get the following error:

XML Parsing Error: not well-formed Line Number 33, Column 23: separator="&"

You will have to remember to escape the ampersand before after you copy and paste this example into your text editor. You can get around this by doing a copy from the edit panel or just putting the following into the separator field:

separator="&amp;"

title: XForms/Search Amazon


text:
Swing Dancing/East Coast Swing

 * Guidelines for Editors: please read this before you add anything.
 * Introduction
 * Prologue: Welcome to Swing
 * How to use this book
 * Take Lessons!
 * A note about move names and political correctness

 * Start out Swing
 * The 6-Count Basic
 * Vocabulary: Essentials
 * Under left arm turn
 * Vocabulary: Part II (footwork)
 * Triple Step
 * Vocabulary: Part III (hand positions)

 * Intermediate moves
 * The Swayze
 * Headroll-dip-hop
 * Minidrag
 * Cuddle-Drop

title: Swing Dancing/East Coast Swing


text:
Swing Dancing/Charleston

Side-by-side 8-count Charleston
8 beats: (for lead, mirrored for follow)

Basic Step
Basic structure: (1)rock; (2)step; (3)kick; (4)step; (5,6,7)double-kick forward-then-back; (8)step

This dance should be performed with the lead and follow close and side-by-side, with the lead's arm around the follow's waist.

1. rock back with left foot (while raising right foot off the ground slightly)

2. step down with right foot

3. kick forward with left foot

4. step down with left foot

5. kick forward with right foot

6. retract right foot (but still keep in air)

7. kick back with right foot

8. step down with right foot

Repeat!

It is often helpful to hop on each beat, as it becomes easier to keep count.

The outside hand for both the lead and follow should be counter to the position of the outside foot.

Kick-back Charleston
This is the same as the Charleston, except there is more distance, the lead's left hand is holding the follow's right hand, and the lead's right hand is on the follow's close hip. It starts on beat 5 of the standard Charleston.

(from POV of lead)

1. kick forward with right foot

2. lead pushes on follow's close hip and both turn (clockwise for lead) towards each other

3. lead continues spinning and kicks forward (what was previously backward) with right foot

4. step down with right foot

5. kick forward (previously backward) with left foot

6. spin counterclockwise and face each other

7. continue spinning and kick forward with left foot, lead puts hand on close waist again

8. put left foot down

Repeat!

Charleston Variations
There are a vast collection of possible variations on side-by-side Charleston. As such, on social dance floors, it is not uncommon to see a lead and a follow performing different variations of footwork, yet still gracefully performing the Charleston. So long as the lead is returning to the same position each eight counts and the movement of the follow by the lead doesn't vary from the style of basic Charleston, any combination of variations can be performed by the lead or the follow.

Lindy Charleston
Basic Idea: Incorporating the look and feel of Lindy Hop into the Charleston structure

Footwork: (1,2)Rock step; (3,4)triple step forward; (5)swivel into your partner; (6)swivel away from your partner; (7,8)triple step backwards

Leg Holds
Basic Idea: Pausing your leg after a kick and holding, then a quick triple step so you can rock step again.

Footwork: (1,2)Rock step; (3,4)kick step; (5)forward kick; (6)hold; (7,8)triple step

Stomps
Basic Idea: Expansion on the Leg Holds but instead of holding, slap your foot against the floor then drag it back in place of the triple step.

Footwork: (1,2)Rock step; (3,4)kick step; (5,6)stomp-and-stomp; (7,8)drag

Turn Kicks
Footwork: (1,2)Rock step; (3,4)kick step; (5,6)forward kick and turn 180°; (7,8)forward kick and turn 180°

Tandem Charleston
Typically performed with the lead behind the follow, with both lead and follow using the basic footwork of the side-by-side Charleston. The lead holds their hands out and slightly forward, palms up, allowing the follow to place their hands on the lead's. The hands make small circles, reaching the forward or back portion of the circle opposite to the leg that is kicking (so on the left rock step back, the left hand is forward.)

Closed Position to Tandem Charleston - 10-count Entry
The beginning is similar to a tuck turn, after which things get interesting quickly.

Starting from closed position, each beat is as follows:

1. Lead rocks back with left foot, opening follow slightly

2. Lead steps with right foot, sending follow forward in front of lead and providing compression with left hand.

3. Lead kicks forward with left foot, turning follow clockwise under lead's left hand.

4. Lead steps with left foot, finishing turn and ending in open position.

5. Lead turns 180 degrees away from follow, kicking forward (now away from follow) with right foot. Let left hand trail behind, leading follow in a rock step.

6. Lead steps with right foot.

7. Lead kicks forward with left foot, bringing follow emphatically forward. A variation at this point would be to provide enough impetus that the follow catches some air.

8. Lead steps forward with left foot.

9. Lead kicks with right foot, turning 180 degrees while moving follow's hand from lead's left hand to right hand. This has the effect of leading the follow in a "J" turn.

10. Lead steps with right foot.

11. From here, you're all set for basic tandem charleston beginning with left rock step. You should be facing the same direction as the closed position at the beginning.

title: Swing Dancing/Charleston


text:
Muggles' Guide to Harry Potter/Characters/Phineas Nigellus Black

Overview
Phineas Nigellus Black (1847-1926) is an ancestor of Sirius Black and a past headmaster of Hogwarts. In the series, he appears as a portrait, primarily in the Headmaster's office.

Order of the Phoenix
Although we have heard him snicker a few times before that, we first meet Phineas Nigellus in Albus Dumbledore's office just before Christmas break; he occupies one of the portraits on the wall. He seems quite snippish and surly, only doing something when forced to by the threats from the occupants of the other portraits. We have gathered by this time that the portraits of the past Headmasters either sleep, or pretend sleep, when they are not actively speaking with the Headmaster. In this instance, Dumbledore wants Phineas to carry a message to Sirius Black at Grimmauld Place. Phineas at first feigns sleep, then, when he cannot pretend any longer, he expresses reluctance. Many of the other portraits in Dumbledore's office threaten him, and he departs, returning shortly to say that Sirius would be delighted to have visitors.

When he appears in a blank canvas in Harry's room at Number 12 Grimmauld Place, the headquarters of the Order of the Phoenix, we suddenly realize who Harry has heard snickering in that canvas. At that time, he is carrying a message from Albus Dumbledore to Harry. The message is "Stay there", and Harry is nettled to find that is the full message. Phineas snidely tries to take him to task for demanding more information, ridicules him for trying to run away from his problems and dismisses him as a "poor puffed-up popinjay". It is during this encounter that he reveals having "loathed" his time as a teacher.

At one point over Christmas, Harry awakens in the middle of the night, and believes that he sees a shadowy figure standing in Phineas' portrait frame, watching him.

We later see Phineas Nigellus again in Dumbledore's office. He is dismissive of Dumbledore, who he feels is not hard enough on the students.

He carries a few messages between Hogwarts and Grimmauld Place, but one gets the impression that Dumbledore does not completely trust him. Important messages are typically carried by other couriers.

In the end, after he hears that Sirius Black has died, he claims to not believe it, and goes off to Grimmauld Place to search for any sign of his descendant.

Half-Blood Prince
We see Phineas Nigellus on Dumbledore's wall a few times, where he makes biting comments. He does not seem to have any other role, however.

Deathly Hallows
While Harry, Ron, and Hermione are planning their visit to the Ministry, Hermione suddenly remembers the portrait of Phineas Nigellus, and that the matching portrait hangs in the Headmaster's office at Hogwarts, where presumably now it serves Severus Snape. She retrieves it from the bedroom and stuffs it into her beaded bag where it can't spy on their activities.

As they travel through the countryside, the Trio overhear another fugitive group doing the same. Listening in on their conversation, the Trio learn that some Hogwarts students, including Neville, Ginny, and Luna, had attempted to break into the Headmaster's office and steal the Sword of Gryffindor, and that they had been "cruelly punished." Knowing that Harry and Ron will be worried about Ginny, Hermione fetches the portrait of Phineas Nigellus from her beaded bag and blindfolds him so he cannot report where the Trio are. Harry asks him what had happened to the students, and Phineas casually reports that they had been sent to the Forbidden Forest to work with the half-breed oaf, Hagrid. Hermione asks if the Sword had been removed from its case, perhaps for cleaning. Phineas scornfully replies that it is Goblin-made; goblin arms will accept into themselves anything that will make them stronger, and reject anything else. Harry asks Phineas if he can bring the portrait of Dumbledore to speak with them, and Phineas, again scornfully, tells Harry that a portrait from the Headmaster's office can visit other portraits in the school, and other portraits of himself, but he cannot visit other people's portraits outside the school. Hermione now asks when the sword had last been out of its case, and Phineas, sounding bored, says that Dumbledore had taken it out of the case to destroy a ring. Harry guesses that this means the Sword had been used to destroy the ring Horcrux, and that it was able to do so because it had absorbed Basilisk venom, one of the few things that can destroy a Horcrux, in the Chamber of Secrets.

Phineas returns a few times, at Hermione's request, despite periodically claiming to be insulted and insisting that he will never return. It is through Phineas that Harry learns of an ongoing low-level revolt at Hogwarts. The Decree against student organizations has apparently been reinstated, and Dumbledore's Army has been revived, with Neville, Luna, and Ginny at its head. Because Ron leaves Harry and Hermione at this point, in a strange kind of way they are glad of his company and soon learn the correct way to approach and talk to him.

In Snape's memories, we see that Phineas Nigellus had reported to Snape that Harry and Hermione had just arrived at the Forest of Dean. Snape, taking the real Sword of Gryffindor from behind the portrait of Dumbledore where it had been hidden (a fake, Wizard-made but easily detected as such by Goblin eyes, had earlier been sent to Gringotts to protect it), had then gone to the Forest of Dean to leave the Sword where Harry could find it. Looking back at the chapter in question, we find that Hermione had had the beaded bag open and was rummaging around in it when she had told Harry where they were. Phineas would have been able to hear what she said, if he was in that portrait at the time, as he evidently was.

Finally, he is seen amidst the general jubilation in the Headmaster's office after the final battle, saying "Let it be noted that Slytherin House played its part!"

Strengths
Being a portrait, Phineas is largely invulnerable to injury; he can flit to other canvases if the one he is currently in is about to be damaged. Additionally, he can sense what is happening around his various canvases; we can hear him snickering in Harry's room at Grimmauld Place, despite the fact that he is probably at the time mostly within his canvas in the Headmaster's office.

Phineas is also obviously an intelligent character, and exhibits signs of Slytherin-like cunning, expressing wry thoughts throughout the books. We note that he is a past Headmaster of Hogwarts which implies a significant level of magical strength and political ability, despite the abrasiveness of his character. It's possible that he has some knowledge of Dark magic like many other members of his family, though this is never confirmed.

Weaknesses
Phineas has difficulty in looking past people's age and blood-status instead of admiring them for their virtues principally. This generally blinds him to their worth and makes him appear somewhat like an on older, latter-day version of Lucius Malfoy.

Relationships with Other Characters
Phineas Nigellus, in life, apparently shared the Black bias towards purebloods, and seems to hold those who spring from, or sympathize with, Muggles in disdain. He displays reluctance to comply with Dumbledore's requests, he seems quite unhappy with his one remaining descendant's views regarding Muggles, and while he does speak with Ron, Harry, and Hermione, he always exhibits distaste at doing so.

Despite his dislike of Sirius' views regarding Muggles, Phineas Nigellus is dismayed to learn of his death because it brings an end to his direct line in the Black family and apparently he must visit the house at Grimmauld Place to confirm the loss for himself. He is similarly disgusted when he learns that Black family heirlooms have been stolen by Mundungus Fletcher- particularly in light of the man's Half-Blood status.

Phineas Nigellus repeatedly chides Dumbledore for what he sees as Dumbledore's lenient attitude towards the students.

First Six Books
For the first six books, Phineas Nigellus Black is basically a non-entity, amusing to the reader, often infuriating to Harry. He resists requests from the Headmaster, making snide comments about Harry and Dumbledore impartially. He does not seem to have much use for Dumbledore's "Headmastering" style, and repeatedly chides him for being too lenient with the students. It is immediately clear to us exactly why he was the most hated headmaster in recent Hogwarts history. It should be noted, however, that it is his great-great-grandson Sirius who is generally detached from his family who says this. The reader may wonder whether there is any reason, apart from Phineas' being a communication channel back to Grimmauld Place, that Dumbledore does not permanently remove or hood his portrait, to avoid the aggravation of his remarks. Dumbledore, however, proves amazingly even-tempered. And given the manner in which Dumbledore's portrait appears at the end of Harry Potter and the Half-Blood Prince, it is possible that, if Phineas' portrait was removed, it would be magically replaced.

Deathly Hallows
While very little about Phineas' character changes, his accompanying the Trio on their journey around England raises other questions. In particular, the question of his loyalty becomes a point of interest. We had seen that his mandated loyalty to Dumbledore was at best reluctant, with, for instance, his continued feigning sleep when Dumbledore needed an errand run. It is likely that his resistance to Dumbledore's instructions is due to the vast difference between Dumbledore's acceptance of students as individuals, and Phineas' espoused belief that the students must be kept in their place, along with Phineas' acceptance of the "blood status" belief structure and Dumbledore's rejection of it. With Severus Snape in the Headmaster's office, Phineas is much more likely to accept requests; Snape's disdain for the students, professed belief in Voldemort's program, and Slytherin origins are much more likely to resonate with Phineas' own beliefs. As readers, we are left to wonder why Phineas is so willing to speak with the Trio about events at the school. One point jars slightly as well: the Trio request that Phineas bring the portrait of Dumbledore to see them, and Phineas explains scornfully that it is impossible. The reader may wonder why he does not take the opportunity to heap disdain on Dumbledore, as he is already ridiculing the Trio's lack of knowledge.

In fact, as it turns out, Snape is allied to Dumbledore; Dumbledore's portrait is still discussing, with Snape, ways of aiding Harry in his quest. Phineas is fully aware of this alliance, and likely approves of it purely because Snape does, or because he has his the usual Slytherin characteristic of being prejudiced against Muggle-borns, but not necessarily wanting them to be slaughtered as Voldemort does. While we do not discover this chain of alliance until late in the book, in the same sequence of events, we see Phineas feeding snippets of information about the Trio's whereabouts back to Snape. This aids Snape in his remote assistance to the Trio's quest, and ultimately leads to their gaining the Sword of Gryffindor.


text:
College Survival Guide/Learning at the College level

Sometimes people who want to learn are impatient. These impatient yet strongly motivated people are the kind of who people who often end up successful in life. In the world of the physical, knowledge is power. Baconites who recognize this might often find themselves asking the question, "How do I obtain the knowledge I want to learn?" Although the definition of knowledge can change from person to person, the idea of knowing what one considers to be knowledge can help him or her quickly access that information. Yet the question still remains, "How do I obtain the knowledge I want to learn?"

Choosing your topic of study
Awesome question with a decent answer: Books.

Books are the things that allow a person to learn information, practice knowledge before taking a college course, and stay ahead of the game. Many college students like reading their course books before the college semester starts. Reading ahead of others puts many college students ahead of the game. It allows college students to readily process the information professors might discuss in class. Also, if a person already knows the information, he or she probably has a better chance of understanding it when discussed with a professor.

Yet most professors choose a certain course book. You need to find out which book that is.

Yet the next question appears:
 * Where do I get these books?
 * Books are expensive!

Answer:

 * 1) Find out which book you're going to be using.
 * 2) Go to the library and find that book.

The College Bookstore is your friend
You want to study something at the college level.

Things you need to know:

 * 1) College course topic
 * 2) What book that college course is using

If there is a topic in college that you want to learn, that probably means you are motivated to learn. If this course is listed in a college catalogue, you may be able to figure out what course book that course is using. A course book is the book the course uses for the semester. Sometimes professors change what books the class is using each semester.

To find out these things do the following:
 * 1) Email a professor and ask him or her which course book he or she is using for a certain course.

OR

 * 1) Grab paper and pencil
 * 2) Go to the college bookstore
 * 3) Look for the course book that you want to read
 * 4) Write down the name of that course book; write down the name of the author(s); and write down the edition of the book and the ISBN if there is one. It will also do you some good to write down what the cover looks like: Does it have people? What color is the cover? Is there a picture of a butterfly or etc.?

Now that you have that information, you can go to the library.

The Library is your friend
You might be thinking, "The library only has so many books. It doesn't have the books I want."

It might not have those book in the shelves, but it might be able to get those books for you.

Why buy books when the library loans them for free or a feasible fee? If you give information to the librarian, he or she can help you find the book. If you go through an database or catalogue to find the book or media, you might be able to track it down and check it out.

The Librarian is your friend
You walk into the library with the information about a book on hand. You walk toward the librarian and say to her, "Hi. I'd like to find this book and read it," as you point to the piece of paper.

The librarian turns to you, looks at the paper, and says, "Alright. Let's see if we can find it."

Librarians, in a general sense, are geniuses who decided to become the gatekeepers of knowledge instead of teachers. Those who earn a two-year or four-year degree in library science often have a general knowledge of history, science, language, math, etc. Many librarians took these topics and college and regular school. When you talk to them, they'll most likely have a good idea of what you're talking about. Also, they'll have a general idea of what you are looking for. If you have a book title and author, they'll know that you are looking for that book and author. Of course, the important thing to note is the edition of the book. There could be different editions of a book. That is why noting which edition you are looking for is important.

Those who are well-versed in library science can understand the cataloguing and direct you to a shelf of books that relate to the topic you are studying. Otherwise, they can look through an online card catalogue; or they can look through an electronic catalogue.

Librarians can be seen as the gatekeepers of knowledge. They keep a cognitive map of where things are located in the library. Many have an idea of where things are located throughout libraries in a nation. A thing a person must remember is that there are different types of people in the library: pages, assistants, and librarians. Librarians are those who have a degree in library science, and they'll probably be more capable of helping you than a page could.

 * 1) The librarian as a researcher
 * 2) The librarian as a physical library catalogue

The Databases are your friend
Many libraries have books. However, not all libraries have all books. Because not all libraries have all books, many libraries have joined together so that they can exchange books with each other. Therefore, if one library doesn't have a book that someone is looking for, then the person could ask his or her library to borrow the book from a different library. This borrowing of books is also known as interlibrary loan.

If someone can't find a certain book at his or her library, he or she could look through a catalogue that lists where that certain book might be. These catalogues, also called databases, often list one or more libraries that offer a book someone is looking for. Databases, such as WorldCat, allow a person to see if a library has a book. If one of these libraries has the book you are looking for, you can fill out a request for your library to obtain that book from a different library. As a last resort, you may be able to request a book from the Library of Congress. However, the Library of Congress will not loan a book to someone through interlibrary loan unless no other library has that book.

If you don't understand the idea of interlibrary loan in this wikibook, go up to a librarian and ask them all about interlibrary loan. Keeping asking the librarians questions about interlibrary loan and the databases.

 * 1) How to use a database.

Email is your friend

 * 1) Why email is good.
 * 2) How it helps you track down books.
 * 3) How it allows you to keep track of books.

Rotating Books is your Friend
Getting a book through interlibrary loan can become a simple task once someone uses it enough. If a person damages a book in a "noticable way," however, that person could encounter severe fines. Also, if the book is not returned in time after the loan period is over, the person could encounter severe fines. These aren't the typical nickel and dime type fines; these are the ones that can go up to $100. These fines are serious business. That's why it's a good idea to return a book on time, keep it at home, and don't drink or eat near the book. SERIOUSLY.

However, sometimes a person still wants to use the same book. Well, that's where the idea of "rotating" comes into play.

Imagine you recently filled out a request for a book. It often takes about two to four weeks to receive a book through interlibrary loan. After the two week period, you could put in another request for that same book, but you'll want to obtain it from a different library. Hence, the main idea is that you're getting the same type of book but from a different library.

 * 1) Put in request for book (book 1).
 * 2) Wait two weeks.
 * 3) Put in request for the same book with the same title but from a different library (book 2).
 * 4) You eventually receive book 1.
 * 5) Two to three weeks later, you have to turn in book 1.
 * 6) However, book 2 arrives shortly before or after the turn in of book 1.

Notice that you are rotating books. Also, if you want to keep up this cycle, you'll get book 3, too. However, each consecutive book must be from a different library. When the book you had recently rented out gets back to its original library, you might be able to check it out again.

You will be able to keep reading the same book title over and over until you're done with that book. It's a nice trick if you're low on cash and want to learn stuff.

Note: It's not that easy to do this same thing with current college books used in college courses. I'm not trying to be pessimistic here. Many universities have college-level books. And you'll probably have 75% chance of getting the book you want. Some people already know this "system," so they'll check out current editions of college books. However, an older edition often works just as well as the newer edition. A college book which was created before 1990 is typically an out-of-date book. I wouldn't recommend getting a book made before 1990 unless it's for research.


text:
Cello Handbook/Vibrato

Vibrato is a technique in which one or all of the fingers on the left hand shakes, or vibrates, to produce a higher quality of sound. To perform this technique correctly requires practice, as most things to when learning to play an instrument. Physically, what is done when vibrato is used is a simple process; however, to understand its mechanics and to perform it effectively are two different things.

Vibrato is performed by, when playing a note, pressing against the neck with the involved finger and the thumb, and then pushing the hand upwards and downwards about the neck.

The thumb and finger should remain pressed firmly against the fingerboard and back of the neck while this is performed. Essentially, as you wobble your finger back and forth, slightly moving it up and down along the string, the sound will als "wobble", becoming slightly higher and lower as your finger moves accordingly. The sound will have a slightly oscillating quality, and resonates better than a flat pitch.

When practicing vibrato, a student should generally try to keep oscillations as even as possible. One way to do this is to try to relax the arm as much as possible, loosening the arm to prevent tightened muscles from "overdoing" any one forward or backward pulse.

The majority of cellists, and string instrumentalists, use this technique. Vibrato can be used on any note, although cellists are constantly disputing over how many notes to use vibrato on. Some think that all notes should have vibrato, while some argue that vibrato should only be used for emphasis on a few notes.

However, regardless of their ideas of how much vibrato to use, almost all cello teachers teach students how to do vibrato, in addition to guidelines on how to use it. Vibrato is, once again, a technique that requires much practice to perfect, and even more to know how to use it appropriately. This guide should be used as a physical reference: your own personalized vibrato technique may vary slightly, as each player's style is different.

title: Cello Handbook/Vibrato


text:
Swing Dancing/Etiquette

Dancing with different partners
Because swing is a social dance, one should seek to dance with as many different partners as possible, rather than focusing on a single partner. Even if a lead and follow came to the dance with each other, it is disfavoured for them to spend the entire night dancing only with each other. In the United States, it is typical to dance one song in a row with a partner, two songs in a row if the experience was particularly enjoyable. In Europe it is often considered rude to dance only once consecutively with a particular partner.

Asking for a dance
Although traditionally a lead asks a follow for a dance, followers are encouraged to do the same. The person may either accept or reject the dance request. If the person rejects the dance, whether they might not feel like dancing or are reserving a dance for someone else, or they might be tired or just shy, thank the person anyway and ask someone else to dance. It is considered rude to decline an offer for a dance and then dance the song with another person -- unless you mention that you had the dance reserved and promise a later dance to the asker. To begin the dance, the lead should escort the follow onto the dance floor, with an arm behind the follow's back (though this is done less and less, and not at all in many scenes).

After the dance
A lead or follow should thank their partner for the dance and, if desired, ask for another. If there is a live band, they should also be applauded for their performance. Traditionally, the lead should then escort the follow back to their seat; however, this tradition is not widely followed for various reasons, to the point that escorting a follow off the dance floor might be seen as unusual in many dance venues.

title: Swing Dancing/Etiquette


text:
Swing Dancing/Musicality

You may have noticed on the dance floor that some dancers are able to perform moves which match changes in the flow of the music. These dancers haven't necessarily memorized the music -- most swing music actually has a regular and predictable structure. The chorus of most swing songs consists of 32 bars which as a whole follow an AABA structure. Each individual letter consists of four 8-count sections and the B letter has a different melody. The fourth 8-count section of each letter is often an ideal time to execute a break.

If you have swing music available, try listening to it now and see if you can notice this structure.

title: Swing Dancing/Musicality


text:
Rhetoric and Composition/Parts of the Sentence

Parts of the Sentence
English Language sentences typically have four parts: subject, predicate, complement, and modifers. The examples which follow are of necessity somewhat oversimplified—there are many gray areas of definition and usage—but they illustrate some basic principles.

Subject
The subject of a sentence is a noun or pronoun. In active-voice sentences it is the noun performing the action in the sentence:

 * The boy crossed the street.
 * My mother works in the city.
 * Mark is really cool.

Predicate
The predicate in the sentence is the verb or verb phrase, linked to the subject, that tells what action is being performed.

Note: Forms of the verb "to be" (am, is, are, was, were, ____ be, _____ been) are sometimes used by themselves as predicates ("The boy was tall") and sometimes used as tense or mood indicators in a verb phrase ("We should be arriving soon.") Forms of the verb to be are tricky because they are often unobtrusive and they don't show action, which is what we normally expect of verbs. They belong to category of verbs known as linking verbs because they serve as the verbal equivalent of an equals sign in math. (The house is green. She seems angry. The burden became excessive.)
 * The boy crossed the street.
 * My mother works in the city.
 * Robbo plays the drums.
 * Mark plays better than Robbo.

Complement
Some subject-predicate combinations make sense all by themselves. (John smiled. My pet fish died.) Some subject-predicate combinations are incomplete until a noun or adjective is supplied which completes the meaning begun by the subject and predicate. The word "complement" is a noun form based on the verb "complete." In essence, the complement is a completer.

 * The student raised his hand.
 * The plants in the lobby are beautiful.

Some verbs in English never take a complement; they are known as intransitive verbs. (Mary smiled. Fred died.)

Some verbs always take a complement; they are known as transitive verbs. (Mary raised... what? The sentence will not make sense until we find out what noun completes the meaning begun by the subject and predicate.)

And some verbs can go either way. In a dictionary, you will see the designations tr. and intr. following a verb definition.

Going one step deeper, there are further subdivisions within the category of complements:

 * Direct Object - a noun complement following an action verb ("George carried the plants to the car.)
 * Predicate Nominative - a noun complement following a linking verb ("George is a marathoner.")
 * Predicate Adjective - an adjective complement following a linking verb ("George is tall.")

Modifiers
Pretty much everything else in a sentence beyond the subject, predicate, and complement, is a modifier of one kind or another. There are three basic kinds of modifying constructions:

 * single-word modifiers (adjectives and adverbs)
 * phrases (e.g. prepositional, participial, infinitive, and appositive)
 * clauses (a clause being defined as any group of words with its own subject and predicate)

Compound Elements
It should be noted that there may be more than one of any of these elements in a sentence. Compound elements can include:

 * Compound Subject: Mary and Tom went to the dance
 * Compound Predicate: He ran to the house and knocked at the door.
 * Compound Complement: I bought pencils and paper at the stationery store.
 * Compound Modifier: He was riding a black and white pony.


text:
Talk:X86 Assembly/X86 Architecture

r0?
Regarding 64 bit register names, I haven't found an x64 assembler that supports r0 instead of rax. I just tried it on GNU as, nasm, and yasm; all accept rax but none accept r0. Does r0 exist only on masm or some other assembler I haven't tried, or is the description here just a bug? It's clear from the machine code encoding that rax *should* be r0, I just don't think that syntax works! (David Christie, co-architect of AMD64, discusses the rax/r0 question in this September 2000 email)

--Olawlor (discuss • contribs) 22:31, 16 December 2017 (UTC)

GPR's
I think the GPR's are only the first four (EAX, EBX, ECX and EDX). Because GPR stands for "General Purpose Registers" which means "store whatever you want (adress/data)". Yes, you can store Data in ESP if you really want, but thats not the idea behind the name "GPR". --To llo (talk) 19:34, 9 December 2010 (UTC)

Segments
Perhaps the section on the segment registers should be removed, for it makes little sense to mention them and then tell people not to use them. I added a short segment on segmented mode to explain their use, but perhaps this should just ommited to keep things simple. --Dr Dnar 23:36, 18 October 2006 (UTC)

 * I don't agree... Segmentation isn't very used in modern Operating Systems. However, one still needs to know about it when programming in Real Mode for DOS... João Jerónimo 03:32, 24 December 2006 (UTC)

 * As someone who is learning assembly, I think the inclusion is important, though I would like to know more about why they shouldn't be touched. BlindWanderer 08:52, 3 January 2007 (UTC)

Introduction of LSB and MSB
LSB and MSB are not introduced before first use. (In an older version that was the case - for instance the PDF version.)

--Mortense (talk) 22:00, 24 May 2010 (UTC)

Use of "used as a vector"
I don't understand what is meant by "used as a vector":

The EFLAGS is a 32 bits register used as a vector

Those bits in EFLAGS are just independent bits that happen to be logically and/or physically in something called EFLAGS.

"Stored in a vector" may make more sense, but why use the word "vector" at all? Why not just:

The EFLAGS is a 32 bits register containing various control and state bits

(or similar)

--Mortense (talk) 22:29, 24 May 2010 (UTC)

To help clarify this, I replaced "used as a vector to store" for "used as a vector of bits representing Boolean values to store".

long mode? 64 bit registers?

title: Talk:X86 Assembly/X86 Architecture


text:
Control Systems/Realizations

Realization
Realization is the process of taking a mathematical model of a system (either in the Laplace domain or the State-Space domain), and creating a physical system. Some systems are not realizable.

An important point to keep in mind is that the Laplace domain representation, and the state-space representations are equivalent, and both representations describe the same physical systems. We want, therefore, a way to convert between the two representations, because each one is well suited for particular methods of analysis.

The state-space representation, for instance, is preferable when it comes time to move the system design from the drawing board to a constructed physical device. For that reason, we call the process of converting a system from the Laplace representation to the state-space representation "realization".

Realization Conditions

 * A transfer function G(s) is realizable if and only if the system can be described by a finite-dimensional state-space equation.
 * (A B C D), an ordered set of the four system matrices, is called a realization of the system G(s). If the system can be expressed as such an ordered quadruple, the system is realizable.
 * A system G is realizable if and only if the transfer matrix G(s) is a proper rational matrix. In other words, every entry in the matrix G(s) (only 1 for SISO systems) is a rational polynomial, and if the degree of the denominator is higher or equal to the degree of the numerator.

We've already covered the method for realizing a SISO system, the remainder of this chapter will talk about the general method of realizing a MIMO system.

Realizing the Transfer Matrix
We can decompose a transfer matrix G(s) into a strictly proper transfer matrix:

 * $$\mathbf{G}(s) = \mathbf{G}(\infty) + \mathbf{G}_{sp}(s)$$

Where Gsp(s) is a strictly proper transfer matrix. Also, we can use this to find the value of our D matrix:

 * $$D = \mathbf{G}(\infty)$$

We can define d(s) to be the lowest common denominator polynomial of all the entries in G(s):

 * $$d(s) = s^r + a_1s^{r-1} + \cdots + a_{r-1}s + a_r$$

Then we can define Gsp as:

 * $$\mathbf{G}_{sp}(s) = \frac{1}{d(s)}N(s)$$

Where

 * $$N(s) = N_1s^{r-1} + \cdots + N_{r-1}s + N_r$$

And the Ni are p × q constant matrices.

If we remember our method for converting a transfer function to a state-space equation, we can follow the same general method, except that the new matrix A will be a block matrix, where each block is the size of the transfer matrix:

 * $$A = \begin{bmatrix}

-a_1I_p & -a_2I_p & \cdots & -a_{r-1}I_p & -a_rI_p \\ I_p    & 0       & \cdots & 0           & 0 \\ 0      & I_p     & \cdots & 0           & 0 \\ \vdots & \vdots  & \ddots & \vdots      & \vdots \\ 0      & 0       & \cdots & I_p         & 0 \end{bmatrix}$$

 * $$B = \begin{bmatrix}I_p \\ 0 \\ 0 \\ \vdots \\ 0 \end{bmatrix}$$

 * $$C = \begin{bmatrix}N_1 & N_2 & N_3 & \cdots & Nr\end{bmatrix}$$

Realizing System by Column
We can divide the G(s) into multiple column, realize them individually and join them back together later, for G(s):

$$G(s) =\begin{bmatrix} G_1 & G_2 & G_3 &\dots & G_n \end{bmatrix}$$

where we realize them and yield:

$$G_i => (A_i,B_i,C_i,D_i)$$

and the realization of the system will be:

$$A = \begin{bmatrix} A_1 & 0 & 0 & \dots &0\\ 0 & A_2 & 0&&\vdots\\ 0 & 0 & A_3\\ \vdots& & & \ddots &0\\ 0&0&0&\dots &A_n \end{bmatrix}$$

$$B = \begin{bmatrix} B_1 & 0 & 0 & \dots &0\\ 0 & B_2 & 0&&\vdots\\ 0 & 0 & B_3\\ \vdots& & & \ddots &0\\ 0&0&0&\dots &B_n \end{bmatrix}$$

$$C = \begin{bmatrix} C_1 & C_2 & C_3 &\dots& C_n \end{bmatrix}$$

$$D = \begin{bmatrix} D_1 & D_2 & D_3 &\dots& D_n \end{bmatrix}$$

title: Control Systems/Realizations


text:
User:SBJohnny/Unused Redirect

This template marks a page as being an archived redirect, which will be maintained for a period of time in case external sites are linked to this page.
 * Always use the form
 * Make sure to blank the page when adding this tag (including the redirect... this template will provide the redirect).
 * Please do not subst.

This adds page to Category:Candidates for speedy deletion after a month

title: User:SBJohnny/Unused Redirect