To FULLY explain the portable command (since someone asked) so that ANYONE may understand this:
sed 's/.\(.\)$/\1/' file.txt
Firstly, the "obvious": This line consists of a command name (sed) and two separate arguments which are passed to that command by the shell. The single quotes are strip...
I'm thinking whether I should try to keep a consistent format for my replies. Something like: pre-comments ("this is what you're doing wrong"), solution, verification ("it works!"), explanation (short), comments and thoughts.
I had a few lectures at uni in the 90s about presentation techniques, especially in regards to giving lectures (I was a PhD student, and PhD students in Sweden are usually employed by the university to do teaching. I did 20% teaching (C and C++) and 80% research). I was told that giving the students the result first was good, and then work backwards from there. That way they were motivated to pay attention.
So this relates (at least in my head) to @Wildcard's answer.
Start off with "this is what this does, in plain english"
@FaheemMitha "In physics and philosophy, a relational theory is a framework to understand reality or a physical system in such a way that the positions and other properties of objects are only meaningful relative to other objects."
Imagine a calculator (analogous to a DBMS) being designed and implemented which actually implemented multiplication as repeated addition, so that multiplying 230 x 570 would take ten times longer than multiplying 23 x 57.
Now imagine that a language is written for giving instructions to this calculator (analogous to SQL) in which there is no notation whatsoever for expressing fractional numbers.
So 53.27 + 93.4 has to be written as:
(53 + (27 / 100)) + (934 / 10)
or something similar.
And let's say that the language designers arbitrarily decided that division by zero is going to be equivalent to multiplying by -(1/2).
Oh, and also the language designers decided that the exponentiation operator should only accept positive integer expressions, because "it's just too complex and performance impacting to allow arbitrary expressions, and besides, we're not convinced fractional exponents really exist."
So there would be no way at all to express the square root of 25.
Now imagine that people talk about "moving away from the arithmetical model in our calculator designs" because it's "outdated" and "riddled with performance problems" and "is too clunky to deal with fractional numbers because of the performance hit involved (in the arithmetical model) with having to express all fractions through division."
But no one even mentions the problems with division by zero.
So they make a new, fancy "non-arithmetical" calculator, that "avoids the performance problems of the arithmetical model" and you can divide by zero and the answer is fish. And they have a button for units but you're allowed to add yards and gallons. And they're convinced that "non-arithmetical" calculators are the future of calculation.
Then you have a correct picture of the state of the database industry today.
@FaheemMitha I'm a sysadmin, not a DBA, but yes. And I also deliver training.
@Kusalananda Eh, politics doesn't have an underlying mathematically rigorous model, nor should it have. Mine is a pretty pointed analogy. But, yeah.... Ever read much Heinlein? He had a point in his "future history" timeline marked, "The Crazy Years."
@Wildcard <Shrug.> No particular reason. I've used DBs a bit myself. And it's always seemed to me it should be possible to do better than SQL. And I've visited dba SE occasionally. They're helpful folks.
And PG might be the best (free) alternative out there, but it clearly has lots of problems, particularly when it comes to query optimization. But that might come back to SQL again.
@FaheemMitha Yeah. Perversely, I get happier with SQL the more I know about Relational Theory—not because it follows the model, but because I can work around its faults better, predict outcomes better (including faulty outcomes), and in general get work done better.
D is a set of prescriptions for what Christopher J. Date and Hugh Darwen believe a relational database management system ought to be like. It is proposed in their paper The Third Manifesto, first published in 1994 and elaborated on in several books since then.
== Overview ==
D by itself is an abstract language specification. It does not specify language syntax. Instead, it specifies desirable and undesirable language characteristics in terms of prescriptions and proscriptions. Thus, D is not a language but a family of both implemented and future languages. A "valid D" must have a certain set of...
"D" isn't a specific language; it's a class of (currently hypothetical) languages. Any language which followed the prescriptions (and thus followed relational theory) would be a "D."
But there's a specific example of D called "Tutorial D" which is used in Chris Date's books on Relational Theory.
RelDB is apparently a relatively complete implementation of Tutorial D. I haven't played with it yet.
It's a very rare case of a site being a subset of another. In this case, part of the justification is that there is a wide community of people who self-identify much more as Ubuntu users than as Linux users. Furthermore, even if the questions asked on AU can be asked on U&L, they would tend to ga...
> Historically, the Ubuntu site was born a few weeks before the Unix site.