119 points · by hasenj · 16y ago · 69 comments
If we don't keep trying to make AI, we're never gonna get there. I'm not saying data mining is AI. I'm saying human brains do data mining too, but differently, and figuring out how is what might come of all this.
Wolfram-Alpha-style natural language programming actually isn't that bad because it's a dialogue. The thing tells you its assumptions, so you're back to formal representations you can deal with. Natural language is mostly statistics, also known as guesswork. A machine can guess better than humans. Google proves that by suggesting "torrent" every time you search for a movie title.
Dijkstra fears a world where the lack of formalisms prevents progress. That's why he likes formalisms. I do too, maybe not for these exact reasons. Anyway, I take formalisms as a given because they've always been there my whole life.
Formalisms can be impractically formal. The level of precision required by machines is beyond even what most mathematicians are used to casually (i.e., pen and paper, or at a blackboard). If you had to do math like you write code, mathematicians would go bonkers. Include this, type-cast that, ... nah, everyone knows what this and that is supposed to mean, right?
A little NLP could make it easier to command computers. A little more NLP could turn machines into really useful slaves. AI would be opening a can of worms few in this world are prepared to deal with.
Mathematics only looks formal: compared to software it is really another natural language -- because its purpose is to communicate between humans, whereas software is ultimately not about communication but design of artifacts.
The point about practicality still holds though, but since the purposes are different it must be something of a different kind of practicality to aim at.
Wisdom is certainly something to take from, but embodying the limits imposed by someone as a roadblock to onself isn't the way to innovation.
Please name some examples. How often is sometimes? What is their probability of success compared to that of domain experts?
Why the hell would anyone want to program in a natural language?
Suppose you could write a kernel in such a language, and one of the instructions was:
"Load the first 5 bits at address 0x323abc into the last 5 bits after address 0x89bbca"
Now, wouldn't it be easier to say 'shuffle_bits(5, 0x232abc, 0x89bbca);' where you control precisely what 'shuffle_bits' does?
This is interesting, I think - this is really one of the core parts of the argument between static and dynamic typing. I prefer bondage and discipline to free love when it comes to types - I find programming in dynamic languages mushy, ill defined and error prone. And yet, lots of people love them and manage to do amazing things with them. Although in general I agree with Dijkstra's essay, maybe there is more wiggle room for a "more natural" language than I'd thought.
It was a significant improvement that now many a silly mistake did result in an error message instead of in an erroneous answer. (And even this improvement wasn't universally appreciated: some people found error messages they couldn't ignore more annoying than wrong results, and, when judging the relative merits of programming languages, some still seem to equate "the ease of programming" with the ease of making undetected mistakes.)
In many dynamically but strongly typed languages (like Ruby), you would still get a type mismatch when you try to add a string to a number at runtime. It's just that with static typing, you would have realized your error much earlier at compile time.
Ultimately they lie on a scale. With a dynamic, strongly typed language, you still leave plenty of opportunity to make undetected mistakes. The obvious example is changing the expected type of a method argument, while only updating a subset of the call sites.
http://www.cs.utexas.edu/users/EWD/transcriptions/EWD12xx/EW...
"Another thing we can learn from the past is the failure of characterizations like "Computing Science is really nothing but X", where for X you may substitute your favourite discipline, such as numerical analysis, electrical engineering, automata theory, queuing theory, lambda calculus, discrete mathematics or proof theory. I mention this because of the current trend to equate computing science with constructive type theory or with category theory."
But if you take the stance that we as humans are Natural Language Programmers, the concept becomes easier to understand.
You can think of your boss at your software development firm as your programmer. He wants some job done and you program some approximation of what he wants done, then you modify based on his inputs. It is a similar thing with Natural Language Programming, your boss didn't use complex symbols to get what he wants done and didn't have to sit with you all the way through to get something done.
For me, it is not a question of whether this makes programming simply but whether we can build a machine with the same capacity as a human.
This is what Dijkstra was talking about. That without a formal system we end up wasting a lot of time tightening up what we mean.
It may be an interesting field to see if we can make a computer do this dance but it isn't useful.
Of course you are going to still have to specify what you want with both NLP and a human. So this time is constant and it is not relevant when comparing the two system.
What I'm saying is that the NLP would be like a human but faster and less error prone.
A "boss" with years of experience instructing programmers will get better results than an amateur. Experience with the particular programmer also improves results. An important part of this is knowing what to specify and what to leave to the programmer.
Like you started off saying, looking at this as a way of making programming easier for people who can't currently program is probably wrong. It's possibly useful as something to paddle towards, but I suspect it isn't a genuine raison d'etre.
If you want a machine with the same capacity as a human you had better have something that can learn at the same rate as a human, and then add 20 years of "life experiences" and education. Then.. _maybe_ you might have a good programmer.
Sorry to rain on your parade, but us meat sacks are better at doing that, evolution has stumbled upon some pretty cool hacks that make it cheap enough (think of a 20 year computer maintenance and energy bill!) to have a "sentient" being.
And that is why software must be different. Software must always be an 'un-natural language' because its (ultimate, essential) purpose is different: it is not communication but design. It works the way it does because it is for constructing an artifact.
If you want to build complex things, that is equivalent to saying you will have complex requirements. The complexity cannot be squeezed out, substantially, by changing language -- as Brooks said in 'No Silver Bullet', there is a hard core of essential complexity.
That purpose of design seems to mean an essential dichotomy of simplicity vs. control. If you want more simplicity you have to give up some control, and if you want more control you have to give up some simplicity.
One opportunity is that it seems likely true that we over-specify much of our software: we are using more control -- hence complexity -- than really needed. But the solution is not in changing language -- that would be the result. It is in figuring out what to do behind that -- AI figuring out what you want without you saying so. Maybe one day, in particular limited areas . . .
Dykstra is brilliant, but he's also a curmudgeon who never likes anything.
— Arthur C. Clarke's First Law
E.W. Dijkstra: Actual computer scientist.
NLP 2 : Natural Language Processing : modeling and processing of the natural language phenomenon
NLP 1 requires advancement in NLP 2 to a significant level of accuracy which in turn requires the accuracy and care of the formal symbolism of lower level programming automaton. Having said that, the progress has been slow which often times leads to denouncement of pursuit of research in the NLP field.
The article is 6 years old and a lot has happened in terms of both processing power capabilities that an individual has access to now (cloud computing) and amount of data available (online information explosion, particularly social media streams) which used to be a bottleneck earlier. This opens up a huge opportunity for breakthrough in NLPs by mathematicians as mentioned by Yuri yesterday at Web 2.0 Summit. AT&T's voice activated remote ( http://www.research.att.com/projects/WATSONASR/index.html ) is an example of natural language programming that is achievable today.
Or when dealing with each other, for that matter. In Lojban, it is grammatically incorrect for someone to give me vague directions like "we are at the pub to the left of the central plaza". They would instead have to say something like "we-not-you are now at the only pub to the left (when seen from the cinema) of the only plaza".
Imagine political debates where imprecise language and double meaning are much harder to express. Mmm...
.i mi batci le mlatu
Which plaza? Just because you said "the only plaza" doesn't make it unambiguous. There certainly exist more than one plaza in any given city.
That was just me compressing it to fit somewhat into English. What it really would say is "the only plaza which fits the current context", as opposed to e.g. "the specific place called The Plaza" or "the only plaza in the universe".
The specific Plaza change wasn't the intended point, though. The "to the left of X while standing at Y" as opposed to "to the left of X" is the biggest clarity gain.
It is obviously possible to express ambiguity in any language, even Lojban, but you have to work harder for it.
The Lobby is a room. The oak table is in the lobby. The cake is on the table. The cake is edible. Instead of taking the cake say, "Best wait until the party starts before digging in."
But even though it's "natural language," it still _feels like_ I'm writing is_room(the_lobby).
contains(the_lobby, the_table).
is_on(the_cake, the_table).
on_taking(the_cake, { print "You can't get ye cake!"; }).
That said, Inform _does_ manage to make programming non-scary to non-programmers, which is a very good thing. It's probably the fact that I expect programming languages to be unlike natural languages that I felt it was awkward. (I personally ended up rewriting the game in Scheme. Never finished it. Maybe I should go back and work on it at some point.)This seems like an eloquent diatribe against AppleScript, but Applescript is not what I imagine native-tongue programming to be.