- Feature Articles
- CodeSOD
- Error'd
- Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Admin
[quote user="QJo"][quote user="trtwtf"][quote user="CrushU"][quote user=OldProgrammer]What is really needed here are two assembly language instructions from the early IBM 360 series: DWIM = Do What I Mean and, if you can't DWP = Do What's Possible[/quote]
Just remember that the DWP instruction can cause unexpected failure.[/quote]
Also remember: HCF is always possible. [/quote]
Highest Common Factor? Not when both arguments are zero.[/quote]
Halt and Catch Fire.
Admin
Actually, what's interesting about quines is not that they output their own source code, but that they construct it from first principles somehow. What this means is harder to formalize (hence the usual output-centric definition), but explains why a) a program that reads its own source from the disk b) any of several scripting language where the empty string is a valid program that does nothing c) special-purpose quine-programming languages that have a primitive command to produce a program's own source code are all considered to be "cheating" (which is a technical term meaning "uninteresting corner cases").
From a theoretical standpoint, the point of the exercise is that if you take any Turing-strong language and add a primitive operator that returns the text of the currently running program, this operator does not strictly increase the expressive strength of the language. Therefore, it is fair game to pretend that such an operator exists when constructing diagonalisation arguments.
Admin
Looks like the concept behind BPEL.
Admin
Sorry but you might be over-thinking here: "Computer, give me a list of all the cities between here and Dhahran that I'd fly over on a BA 229 flight." See, it's not too far off what we can do nowadays with a bit of judicious googling. In fact I believe this is the direction Wolfram is working in at the moment.
As for the "program to write programs", I believe there is mileage in this general approach, it's just that attempts to put one together hasn't worked too well yet. In fact I might even stick my neck out and suggest this is a direction that is well worth investing in.
Admin
[quote user="Matt Westwood"] [/quote]
Sorry but you might be over-thinking here: "Computer, give me a list of all the cities between here and Dhahran that I'd fly over on a BA 229 flight." See, it's not too far off what we can do nowadays with a bit of judicious googling. In fact I believe this is the direction Wolfram is working in at the moment. [/quote]
It's possible you're under-thinking as well. Consider how many variables have to be essentially hard-coded in order to make something like this work - what qualifies as "flying over"? what qualifies as "between here and Dharan"? what qualifies, for that matter, as Dharan and BA 229?
What you're describing is a query language, and one which might be quite useful, but not by any means a programming language.
Programming is difficult precisely because it's a matter of specifying what you actually mean. If I want a list of the primes upt to some number, I can either look them up or I can work them out. For a lookup, your query language might work well, but I have a harder time seeing how you could write a program to work them out, unless you restrict the domain of the language to something like "mathematical computations".
"Computer, define 'relatively prime' to mean having no common factors other than one and zero." "Okay, boss. What does a common factor mean, and how do you go about having one?" "Computer, define 'common factor' for two numbers a and b to mean an integer n that divides both a and b evenly" "Okay, sure thing. But what does "divides evenly" mean?" "Computer, define "divides evenly" for two numbers a and b to be true iff the remainder from division of b by a is zero". "Okay, I think I can get that, I've got a mod operator in here somewhere. So two numbers are relatively prime if there is no number that divides them evenly? How do I know if no number divides them evenly?" "Oh, forget it, I'll just do it in Python...".
[quote] As for the "program to write programs", I believe there is mileage in this general approach, it's just that attempts to put one together hasn't worked too well yet. In fact I might even stick my neck out and suggest this is a direction that is well worth investing in.[/quote]
Well, I wish you luck and prosperity. And if you have anything left over to invest, let's talk about this bridge I've got on offer... I can let you have it on easy terms...
Admin
[quote user="trtwtf"][quote user="Matt Westwood"] [/quote]
Sorry but you might be over-thinking here: "Computer, give me a list of all the cities between here and Dhahran that I'd fly over on a BA 229 flight." See, it's not too far off what we can do nowadays with a bit of judicious googling. In fact I believe this is the direction Wolfram is working in at the moment. [/quote]
It's possible you're under-thinking as well. Consider how many variables have to be essentially hard-coded in order to make something like this work - what qualifies as "flying over"? what qualifies as "between here and Dharan"? what qualifies, for that matter, as Dharan and BA 229?
What you're describing is a query language, and one which might be quite useful, but not by any means a programming language.
Programming is difficult precisely because it's a matter of specifying what you actually mean. If I want a list of the primes upt to some number, I can either look them up or I can work them out. For a lookup, your query language might work well, but I have a harder time seeing how you could write a program to work them out, unless you restrict the domain of the language to something like "mathematical computations".
"Computer, define 'relatively prime' to mean having no common factors other than one and zero." "Okay, boss. What does a common factor mean, and how do you go about having one?" "Computer, define 'common factor' for two numbers a and b to mean an integer n that divides both a and b evenly" "Okay, sure thing. But what does "divides evenly" mean?" "Computer, define "divides evenly" for two numbers a and b to be true iff the remainder from division of b by a is zero". "Okay, I think I can get that, I've got a mod operator in here somewhere. So two numbers are relatively prime if there is no number that divides them evenly? How do I know if no number divides them evenly?" "Oh, forget it, I'll just do it in Python...".
[quote] As for the "program to write programs", I believe there is mileage in this general approach, it's just that attempts to put one together hasn't worked too well yet. In fact I might even stick my neck out and suggest this is a direction that is well worth investing in.[/quote]
Well, I wish you luck and prosperity. And if you have anything left over to invest, let's talk about this bridge I've got on offer... I can let you have it on easy terms...[/quote]
From your analysis of "mathematical computations" I would guess you may not have actually studied computability theory?
Admin
No, I haven't. Please enlighten us as to how you'd go about building a language for the sort of natural-language interface proposed - remember, we're looking for something that a non-programmer can instruct successfully - so as to express "computer, generate a list of the prime numbers between one and one thousand" as a program and not as a query? I trust this is all explained in computability theory, right?
Admin
See "Mizar system" on Wikipedia. I also recommend you might want to look at "Definition:Unlimited Register Machine" and all the pages linking to it in ProofWiki.
I had responded exensively but (thank your lucky stars) I accidentally closed the browser window before sending and couldn't retrieve what I'd entered.
Admin
Forgot to escape the spaces (unless "you please explain?" is an argument, rather than a request).
sudo Can\ you\ please\ explain?
Admin
Here is an idea.
Oh look; here is that idea badly implemented.
Ergo, it must be a bad idea.
Admin
FTFY
Admin
Captcha Nulla -- NULL for Latinos and other Hispanics (or was that Nullos?)
Admin
Admin
After "The Next One", there's Frontpage, Dreamweaver and a whole range of other software that produces nightmare-inducing "code". Yes, I know. HTML isn't code, and the Javascript it spews can be called "interesting" at best, although "incomprehensive mouthfoam" would be a more precise description.
Captcha: Letatio -- A Rorschach test in words.
Admin
Dude, if it's in Star Trek, then it IS theoretically possible ... duh !
Admin
Admin
sudo Can it ! !
(Gotta love exclamation marks as arguments)
Captcha: Ideo -- Hey, let's make our system fully configurable by the use... oh
Admin
Stick all that stuff in the Advanced tab under a config dialog.
Help file / user manual explanation: "leave this alone. If you were advanced enough you would know what to do with it."
Oh, and to cut your support calls by 90%, put a button at the bottom of the advanced tab marked "unfuck this" that resets all the advanced options to default.
Admin
Do you not see all the ambiguities in that query?
What is a "city"? Does that mean any place listed as a city in some official government file? Like, places that have a city charter, or that are incorporated as cities? If so, what file is that and where do I find it? Or is it any population center with more than some minimum number of people? If so, how many people? Does a town of 5000 people count as a "city"? How about one person living in a cabin in the woods?
What do you mean by "here"? The place where the person asking the question is currently standing? The place where the computer is located? The last place mentioned in a previous query?
What is "Dhahran"? I'd guess you mean the city in Saudi Arabia, but there could be other places in the world with the same name. (There are a number of cities in the United States named "Springfield", for example.)
Is "BA 229" an airline flight number? (British Airways, perhaps?) An aircraft model? A course number of a sophomore-level class in Business Accounting at your local college?
What do you mean by "fly over"? Assuming we have defined what "city" means, by "fly over" do you mean that the flight path passes directly over the point identified as the city center on my GPS? Do you mean the flight path goes over any point within the official city limits? Does it count if we pass over suburbs that are not legally part of the city?
When you say "on such-and-such a flight", do you mean the planned route of the flight, or the route that the plane actually took on one particular occasion? How much do actual routes differ from planned routes? Do you know? Does the computer?
And that's just off the top of my head.
A human being who knows why you are asking the question might well be able to make intelligent assumptions about answers to those and dozens of other questions. But to get to the point where a computer can do that, well, I'd like to see how you're going to do that.
I'm very cautious about speculating on what may or may not be possible in the future. History is littered with "proofs" that something was impossible that later someone who didn't know it was impossible managed to do. History is also full of people vainly attempting to do things that probably are literally impossible, like building a perpetual motion machine or turning lead into gold by chemical reactions.
I'm sure that one of those people working on a perpetual motion machine today would freely admit that past "attempts to put one together [haven't] worked too well yet", but that his idea will surely work given just a little more time and effort. I'd be happy to get you the addresses of a few such promising inventors if you're looking for investment opportunities.
Admin
I admit I hadn't heard the term "quine" before reading this article and I didn't bother to look it up. It seems to me that there's a disconnect in this article. Yes, it defines a quine as a program that outputs itself, but then it goes on to discuss what sounds like a meta-program to generate business applications, not to generate itself.
Anyway, now I've looked up the definition of "quine". It seems to me that one could easily write a trivial program to solve the problem where the source code is embedded in the program as a literal. Sure, you could eliminate that as "cheating". But at that point, the problem seems boring to me. There's an obvious easy solution. If you rule that out, I can say fine, how about, I store a look-up table for a bunch of the keywords mapping a token to the keyword, and then I create a literal using these tokens instead of the actual keywords, etc. I presume you'll rule that out, too.
So, hmm, what's the point? Is this just an exercise in constructing a problem that is trivially easy to solve, and then putting arbitrary limits on the solution to make it harder? Why would anyone care? I don't get it.
Admin
You define such things in the computer's database.
The computer understands what a "city" is because all the conurbations between here and Dhahran are defined in the database as being: this is a "city", this is a "town" (and in the UK at least, "city status" is a specific attribute held by a specified, well-defined set of such conurbations) as appropriate. One is allowed to posit the fact that the computer has all the details of the geography of the world held in a database.
"Here" means where the questioner is, and the assumption would be that for the question to make sense, the questioner would be at Heathrow. Otherwise the computer would be allowed to ask for clarification.
and 4) read in conjunction are interpreted by the computer to mean "the regular British Airways flight between London Heathrow and Dhahran International in Saudi Arabia". In the database, the computer will encounter BA 229 (except it's not 229, I think it's 129 or 128, long time since I made that flight) in its disambiguation page and find that one of its meanings is exactly that British Airways flight. But the fact that it says "BA 229 fligh would be a significant clue.
"Over" means "vertically above". For want of a further definition (which will be understood by the computer by way of a previously-programmed definition in this precise context so as to answer exactly this sort of question) it would be interpreted to mean vertically above the region encompassed by the border of the city. How difficult is that to understand?
The planned flight of course, although if the computer has been provided information that the flight plan will be different from the usual because of adverse meteorological effects, then that would be what would be.
"How is the computer going to do that?" By a monster database, of course. "How are you going to do that?" We're well on the way to achieving all that already. In fact, which is where the argument started in the first place, what is achievable by surfing the net right now is not far from the question which (off the top of my head) I asked in the above. It's all just a matter of detail.
You may want to check out what Wolfram is doing. If you need help being taught how to use a search engine, then I'm prepared to offer my services to teach you, at a price.
Admin
It's bothersome that you don't seem to understand the difference between a query and a program. What you're describing is a query, not a program. Likewise, what is available right now that allows you to ask for "The current time in Buenos Aires" and get a set of possibly related pages is a query language, and each of those queries is either a set of associations ("curious perversions technology" might bring up this site, or some that I don't want to think about) or a specialized query programmed by some human being somewhere. The "set of associations", of course, had to be programmed at some point, but today it seems so basic that you can be forgiven for forgetting that. Asking these questions, though, is nothing like programming.
The assumptions you've spelled out in your non-answer all had to be programmed into the computer at some point - how are you going to deal with non-standard queries? "Computer, how high is a stack of marshmallows weighing forty-seven pounds?" I assume that the weight of a standard marshmallow could be programmed into google's search engine. I assume also that it hasn't. I assume also that one could program in the equations governing the behavior of marshmallows when heaped up on top of one another, but I assume that those rules - including the compressibility of marshmallows, coefficients of friction, and so forth - are not currently available.
This is an answer that you could presumably get by calculation, once you gather the data. That is, you could write a program to answer it. It's not an answer that you get by simply asking for it - until someone writes the program, that is. Neither is the list of cities in the flight path of BA229 - someone had to program that as well. That is, someone, somewhere had to do some programming so that you could simply query.
Are you starting to grasp the distinction? If so, perhaps you're starting to see the difficulties in your proposal.
Admin
Can it probe a nuclear reactor?
Admin
The usual solution is to include a literal that's almost the source code except for where the literal itself goes, and then do some string processing to splice in a correctly quoted and escaped literal (which must be constructed at run-time from the original literal) at the right place.
Of course, this is not even hard once one has the right idea, and the concept has somehow captured imaginations far beyond what its modest theoretical utility warrants.
There is some theoretical utility, however. For example, the usual argument that the halting problem is unsolvable even for programs that never read their input depends on piggy-backing a purported halt-solver as extra payload in a quine.
Hofstadter fans tend to appreciate quines in particular because the crowning trick in Gödel's incompleteness theorem amounts exactly to constructing a quine in the "programming" language of primitive recursive functions where Gödel has already described a "program" to recognize valid proofs.
Admin
I remember the ads for "The Last One". Did they sell any?
Admin
Admin
Right, I think that is a screenshot from the workflow graph in Calpyso. The same information can also be displayed in a table view, and that is what most people actually use. And I've seen several workflow configurations that don't look much less complicated that this one.
I don't even see how text and image go together, though...