Live data from Hacker News

The English-Likeness Monster Stalks a New Generation of Programmers

raganwald.posterous.com

41–50 of 78 posts

Re: The English-Likeness Monster Stalks a New Generation of Programmers

#41
post #33

I actually disagree to some extent with Raganwald here. I am both a software engineer and an amateur linguist. Let me try to go into where my disagreement is. I figure that someone, probably me, will have to set the record straight about how poorly our expectations of English grammar match the realities and utilities of this language.[1] Natural languages and computer languages are very different both in how they are…

Another amateur linguist + software dev here (loosely involved in NLP-related work and studied linguistics at university). I invite you to try to convince me that there might possibly be a natural-language-esque version of the (in)famous inverse square root function that is more comprehensible than the original. float Q_rsqrt( float number ) { long i; float x2, y; const float threehalfs = 1.5F; x2 = number * 0.5F; y…

I think you're missing the practical use cases of natural language programming, at least those in the next decade or so.

"Hello Computer! I need an inverse square root function. It should take a float as a parameter and..." - Not practical

"Hello Computer! I need this image to pan across the screen. It should take one second. When it gets there, I want it to stop and become clickable. When you click it..." - Very practical

The practical solution here could even be iterative...

"No computer, no! The image should ease into position, not just go straight there!"

The point is you wouldn't rely on it for precise logic, just "good enough" behavior. You can definitely argue that this isn't programming though.

Re: The English-Likeness Monster Stalks a New Generation of Programmers

#42
post #9

There is nothing wrong with code that looks like english. The problem is that you can take that too far, or just sometimes not learn the actual syntax and try to use English instead. That isnt a problem for many languages. I really havent seen a lot of code where an attempt to make it read more like english was.making it less readable or causing other problems. Also, there is a system for logical rules called Attempt…

Applescript has junk like extra meaningless words added to programs just to make them resemble English. And things that are easy to express usually, like a function with four arguments, become a mess because of a fear of punctuation.

Re: The English-Likeness Monster Stalks a New Generation of Programmers

#43
post #36
post #34

I'm totally in agreement as far as the current state of NLP and AI goes, but all bets may be off as these fields mature. For example, I have a client that gives me a very detailed specification for a simple iPhone app in a few English paragraphs, along with storyboards, wireframes, and similar apps. I bang out an alpha in a week or two that's mostly faithful to her conception. She writes up some minor changes she'd l…

I think you're dramatically underestimating the amount of work your brain did in that process.

I'm obviously oversimplifying, and an AI-driven English->asm compiler comparable to my godlike programming abilities is at the far, far end of the technology gradient from now to Lieutenant Data, but it doesn't seem far fetched to have such compilers be "good enough" for designers to create certain MVPs and such without programmer intervention, in the next decade or so.

Re: The English-Likeness Monster Stalks a New Generation of Programmers

#44
post #33

Earlier quoted context omitted.

Another amateur linguist + software dev here (loosely involved in NLP-related work and studied linguistics at university). I invite you to try to convince me that there might possibly be a natural-language-esque version of the (in)famous inverse square root function that is more comprehensible than the original. float Q_rsqrt( float number ) { long i; float x2, y; const float threehalfs = 1.5F; x2 = number * 0.5F; y…

My point is that one doesn't use a natural language to get the job done, one uses a computer language in the likeness of a natural language to get the job done. The similarity speeds learning process. As for an example, you just gave one. But if we wanted to make it more natural-language-like it would be a slightly different syntax: DECLARE FUNCTION q_rsqrt (float number) THAT RETURNS float AS ( .... ); Now if you th…

DECLARE FUNCTION q_rsqrt (float number) THAT RETURNS float AS ( .... );

And no programmer will want to write in such a language because it's so verbose.

I don't mind making programming languages look more like natural languages; I would offer Python as an example of a language that takes advantage of this where it makes sense.

But I draw the line at having to type boilerplate; if it's absolutely necessary, at least keep it to an absolute minimum.

Re: The English-Likeness Monster Stalks a New Generation of Programmers

#45
post #41
post #33

Earlier quoted context omitted.

Another amateur linguist + software dev here (loosely involved in NLP-related work and studied linguistics at university). I invite you to try to convince me that there might possibly be a natural-language-esque version of the (in)famous inverse square root function that is more comprehensible than the original. float Q_rsqrt( float number ) { long i; float x2, y; const float threehalfs = 1.5F; x2 = number * 0.5F; y…

I think you're missing the practical use cases of natural language programming, at least those in the next decade or so. "Hello Computer! I need an inverse square root function. It should take a float as a parameter and..." - Not practical "Hello Computer! I need this image to pan across the screen. It should take one second. When it gets there, I want it to stop and become clickable. When you click it..." - Very pra…

What you want isn't "natural language programming"; what you want is an AI. I think that's more than a decade away.

Re: The English-Likeness Monster Stalks a New Generation of Programmers

#46
post #6

I'm not sure DSLs qualify as "the English-Likeness monster". A good DSL isn't about being like english, it's about being concise and expressive in the given domain. A good DSL has no need to "look like English".

People often think of DSLs as a way of making a concise, expressive view of the domain look like English. See, for example, RSpec. (I guess what I'm really saying is that you're right, but you're saying something else, raganwald is right too.)

I don't think raganwald is right here, or rather he's only right about a subset of DSLs -- the subset of DSLs which attempt to map a specific domain to english. I think most good DSLs eschew mapping domains to english in favour of mapping those domains to some new language designed to express information about that domain.

Re: The English-Likeness Monster Stalks a New Generation of Programmers

#47
post #41
post #33

Earlier quoted context omitted.

Another amateur linguist + software dev here (loosely involved in NLP-related work and studied linguistics at university). I invite you to try to convince me that there might possibly be a natural-language-esque version of the (in)famous inverse square root function that is more comprehensible than the original. float Q_rsqrt( float number ) { long i; float x2, y; const float threehalfs = 1.5F; x2 = number * 0.5F; y…

I think you're missing the practical use cases of natural language programming, at least those in the next decade or so. "Hello Computer! I need an inverse square root function. It should take a float as a parameter and..." - Not practical "Hello Computer! I need this image to pan across the screen. It should take one second. When it gets there, I want it to stop and become clickable. When you click it..." - Very pra…

but you still require a hyperdefined subset of English to make that work, and such a parser cannot take into account dialectal and language drift issues.

Re: The English-Likeness Monster Stalks a New Generation of Programmers

#48
post #44

Earlier quoted context omitted.

My point is that one doesn't use a natural language to get the job done, one uses a computer language in the likeness of a natural language to get the job done. The similarity speeds learning process. As for an example, you just gave one. But if we wanted to make it more natural-language-like it would be a slightly different syntax: DECLARE FUNCTION q_rsqrt (float number) THAT RETURNS float AS ( .... ); Now if you th…

DECLARE FUNCTION q_rsqrt (float number) THAT RETURNS float AS ( .... ); And no programmer will want to write in such a language because it's so verbose. I don't mind making programming languages look more like natural languages; I would offer Python as an example of a language that takes advantage of this where it makes sense. But I draw the line at having to type boilerplate; if it's absolutely necessary, at least k…

It's not that far from PL/SQL and PL/PGSQL

    CREATE OR REPLACE FUNCTION foo (int bar0) RETURNS int language plpgsql security definer volatile as $$

    begin

    return $1 + 1;

    end;

    $$;

Re: The English-Likeness Monster Stalks a New Generation of Programmers

#49
post #45
post #41

Earlier quoted context omitted.

I think you're missing the practical use cases of natural language programming, at least those in the next decade or so. "Hello Computer! I need an inverse square root function. It should take a float as a parameter and..." - Not practical "Hello Computer! I need this image to pan across the screen. It should take one second. When it gets there, I want it to stop and become clickable. When you click it..." - Very pra…

What you want isn't "natural language programming"; what you want is an AI. I think that's more than a decade away.

Well, we start to split hairs here, although my over the top "Hello computer!" skewed what I was getting at. If NLProgramming gains ground, there will likely be some level of AI behind it, but not necessarily a "true" AI. And it's not what I want...it will put me out of work ;)

Re: The English-Likeness Monster Stalks a New Generation of Programmers

#50
post #41

Earlier quoted context omitted.

I think you're missing the practical use cases of natural language programming, at least those in the next decade or so. "Hello Computer! I need an inverse square root function. It should take a float as a parameter and..." - Not practical "Hello Computer! I need this image to pan across the screen. It should take one second. When it gets there, I want it to stop and become clickable. When you click it..." - Very pra…

but you still require a hyperdefined subset of English to make that work, and such a parser cannot take into account dialectal and language drift issues.

It could if there were some level of AI behind it.
Post reply on HN