229 points · by jdale27 · 14y ago · 53 comments
sentence --> noun_phrase(Num), verb_phrase(Num).
You could create the CFG equivalent: sentence --> noun_phrase_sg, verb_phrase_sg.
sentence --> noun_phrase_pl, verb_phrase_pl.
It sure is a drag, but this is how many CFG grammars/parsers work. Of course, it's generally agreed upon that DCGs generalize better even when used with grammars that can be described with a CFG.Most natural languages are not context-free, but he gives the wrong example. To provide a more convincing example - in Dutch you can construct phrases like:
dat ik Marie Jan de dozen zie helpen inpakken (lit: that I Marie Jan the boxes see helping packing)
The NPs and the verbs correspond in the following manner: ik - zie, Marie - helpen, Jan - Inpakken. Or, more formally, the structure is: np_a np_b np_c np_x v_a v_b v_c. Of course, this highly resembles a COPY language, which cannot be expressed using a CFG, but (obviously!) can be expressed using a DCG:
s(L) --> w(L), w(L)
w([a|Rst]) --> [a], w(Rst).
w([b|Rst]) --> [b], w(Rst).
w([]) --> []
(This grammar parses/generates a string of zero or more a's and b's, followed by exactly the same string.)--Henry Spencer
Which can then be turned into:
"Programmers who do not understand history are doomed to reimplement it - poorly" - http://enfranchisedmind.com/blog/posts/what-good-is-a-cs-deg...
I thought both of them were good sayings to keep in mind, while reading the above post.
At least the ACTUAL developers of UNIX created Plan 9, they didn't put their hands up and said "this is how you do things, no improvements can be made".
For example, when I see the lame "it's how it was always done", arguments against a sane FS hierarchy like the one gobolinux attempts at, I want to tear my hair off.
Programmers, by virtue of being a little bit understanding and forgiving of computers' nature, can enjoy software that frustrates the hell out of normal people.
It gets pounded into us over and over again that normal people are the right standard to build software to, but once in a while we should allow ourselves to enjoy something like the blocks program, even if it would never pass an A/B test against a blank screen.
Lisp has this. It has probably invented this.
1. There's a very stringent one-to-one mapping between RDBMS & relational logic. To put it another way, BCNF is not a matter of taste. Its a matter of adhering to the rules. If two dozen data architects are given the same many to many relation, and asked to take it through 1NF to 2NF to 3NF to BCNF and then stop, every single one of them will have the exact same answer. And this is because normalization is an extremely formal process => formal in the mathematical sense of the word. Two sets that have a given many-many relation will decompose to the exact same subsets because the mathematics of BCNF is unambiguous. This is incredibly powerful => Because there's a wrong answer! So if you hire a data architect & the guy gives you a BCNF & you crosscheck that BCNF with a more reliable architect, you are checking if the answers agree objectively. Its just straight math, not a matter of subjective taste as to which should be the primary key & which should be the foreign key & how the transtive dependence works out. 2. With objects in the mix, the relationship is already on creaky foundation. ORMs have an impedance mismatch because the relationships captured by notions of inheritance, polymorphisms, mixin traits - these don't have an exact mapping onto the set-theoretic notions captured by BCNF. Morover, there is a matter of subjective taste. You might design your UML differently from me & you might have valid reasons to do so. So while your BCNF exactly matches mine , your object model won't. 3. With kv stores, your relations are even more mathematically fuzzy. You are storing entire multi-valued objects and your rows have variable number of columns & at times you are dealing with completely denormalized structure. The math simply doesn't apply at these levels, and people tasked with populating a NOSQL structure will come up with wildly differing solutions that are completely unsound from a mathematical standpoint, but will nevertheless perform ( upto a certain threshold ) simply because machines have gotten faster & network latency issues aren't holding them back.
I see more & more firms pick #3 because of trends( latest & greatest), lack of expertise to do #1 properly, or because of some false sense that scalability will bite them in the ass if they do #1 instead of #3, but primarily because #3 is EASY and #1 is hard. Its nice to not worry about normal forms & just have a multi-column row which grows & shrinks...but is it sound ? Am not sure.
In general, you'll have a bunch of concerns. 1. BCNF 2. ACID 3. Performance 4. Scalability 5. Ease of implementation
Before noSQL, you'd prioritize in that exact order. Post noSQL, the order has precisely reversed. There used to be pricey Oracle consultants ( and Sybase consultants & DB2 consultants & so on....data architects of all stripes). They'd come in, study your data in some depth & figure out which attributes were single-valued, which ones were multivalued, which bunch went into which tables, who the primary keys & foreign keys were, what the typical views would look like, what joins would that involve & could you do away with some of those joins....hell, even the typical interview questions for a fresh grad having absolutely nothing to do with databases would still involve Outer Join, Inner Join, difference between the two, here take the Employee spreadsheet and the Company spreadsheet and decompose into tables upto 3.5NF, list all the keys & tell me how many joins you'd need for a view that lists all employees in Accounts making over 70k between the age of 35 and 45 in Illinois. All of the above is pure relational logic. Its completely tech-agnostic. You don't even need an actual database to answer any of that. Nowadays, the questions are more along the lines of - How do you deploy MongoDB ? Great, you're hired, cause Mongo will handle the scalability & performance & if it doesn't we'll just add another node....imo, this is a vacuous line of thought.
NoSQL databases (and not all of them are hierarchical) solve problems Codd wouldn't dream of having, but that doesn't mean they solve every current problem. I've seen people abusing them in horrible ways.
1. Informal . a person who is notably stupid or lacking in good judgment.
And the entire passage in which he uses the term to give us some context: An even bigger letdown for me is the whole NoSQL situation. The proponents of NoSQL aren't even aware of how they are repeating history by recreating the hierarchical databases of yore. E.F. Codd was explicitly trying to rectify these mistakes when he formulated relational database theory 40 years ago, and now we've come so far along that we've wrapped around and apparently must re-learn these mistakes a second time. The morons promoting this technology have no clue, they see themselves as the new sheriffs in town, putting their scalability law above all else.
His argument is strong and he provides his reason so I don't think it's for a lack of understanding.If you have issue with his argument address it! Don't use passive ad-hominem attacks. Are the creators of data stores that identify as "NoSQL" repeating mistakes made in history? Are they a different class of technology than those that were invented 30, 40 years ago?
Let's examine his claims:
"The proponents of NoSQL aren't even aware of how they are repeating history by recreating the hierarchical databases of yore."
Says who? The author doesn't bother justifying this statement, he just throws it out there. It's completely baseless, and likely a straw-man argument (as I have a hard time believing that everyone at Google, Facebook, Twitter and all the other large cloud companies are completely clueless about database history).
"E.F. Codd was explicitly trying to rectify these mistakes when he formulated relational database theory 40 years ago"
This sounds a little more plausible, but which mistakes is he talking about? And when did Codd say this? Citation, please!
"and now we've come so far along that we've wrapped around and apparently must re-learn these mistakes a second time"
Which mistakes exactly? Don't make me guess!
"The morons promoting this technology have no clue"
Ad-hominem attack. Let's move on.
"they see themselves as the new sheriffs in town, putting their scalability law above all else."
Finally we learn his beef with NoSQL databases, but he fails to justify his argument any more than this.
There are strong reasons for putting scalability above other concerns. The scalability of S3 matters far more to me than whether updates are atomic, for instance.
Frankly, I'm confused why you think "his argument is strong". His argument consists of unjustified statements, straw men, and ad-hominem attacks. There's utterly no substance to it.
I want this.
This is what our good old friend the core dump is for. Load the core dump in GDB and there you are.
I'd argue that on windows it's even easier. You can create a symbol server to store all the debugging info (the PDB files) and the debugger can download the correct symbols for that particular compiled version.
The PDB format supports having an arbitrary commands added to procure each source file. You can connect this up to your version control system so that not only do you have the stack and symbols, you can actually browse around the source code of whatever version of the code actually crashed just as if it had crashed locally.
On linux you have to work out a system for archiving your symbols and getting them for the correct version of your software yourself, but the effort is certainly worth it.
We have a system to generate HTML reports each day by grouping crash dumps by the functions near the top of the stack (if the top 5 functions are the same, it's considered the same crash), so each day we can see what the most important crash is.
Whereas, generally with Common Lisp, I can trap the condition, fix the problem, and keep running.
I know what languages I'd consider starting grounds for 100% uptime systems (not 5 9s), and languages that segfault and die as part of their usual crash hangling are not among them.
(Erlang, Lisp, and Smalltalk would be my shortlist)
On linux the situation is a little harder. I am not aware of edit and continue on that platform.
Any kind of crash is catchable. For example, we get minidumps of our windows software uploaded by the crashing process by catching any kind of crash that is possible, and handling it.
However, I would argue that you want to crash and dump a core as fast as possible when something unanticipated is happening. Process death should not be a problem in a well designed system!
3. You enter some code and hit proceed
4. The app continues like nothing happened
A short (<3min) video demoing the same: http://vimeo.com/27850933Winograd talks about three different metaphors for HCI: conversation, manipulation and locomotion. In the 70's he gave up on conversation for manipulation, and was right do to so, but with modern computing power and databases, conversation is coming back as a relevant model.
I found it especially relevant how he illustrated thinking in terms of imprinting and erosion. I've been thinking about my personality, and how I think about things, in different, but oddly similar terms.
I also agree that personal computing is, to a large extent, re-inventing the past. The best quote I heard on that, as best I can recall, is "The PC recapitulates the mainframe", which is borrowed from Biology's "Ontogeny Recapitulates Phylogeny".
Except of processes.
And sockets.
And XWindows.
http://tldp.org/LDP/Linux-Filesystem-Hierarchy/html/proc.htm...
http://www.linuxjournal.com/content/more-using-bashs-built-d...
X is just a protocol, you can happily think about X apps in terms of processes and sockets.
https://github.com/Mon-Ouie/pry-remote
Now, if I only had the same thing for Cocoa Touch - after all, both languages are supposed to inherit from Smalltalk.
The scrollbar seems due to the conversation with the computer about the blocks--barring that, nothing else is offpage.
Really?