Re: Ruby & Artificial Intelligence



Arlen Cuss wrote:
Hi,

On Fri, Apr 25, 2008 at 2:53 PM, Pranjal Jain <pranjal.jain123@xxxxxxxxx>
wrote:

Hi

Suppose I am having a sentence like this

"Navigate to the application page. Enter the user field with
credentials"
When I give this sentence to the computer, it should be able to
understand the key words like "Enter", "User field", "Credentials".
It should be able to make a priority on "Enter & Navigation",

then it should write the user name & password in desired field.



I have a good feeling that what you're asking for is nearly impossible - and
at the least, not Ruby specific. You'll need to research this in a community
more geared towards language analysis/AI/etc... but while I was stumbling on
the 'net, I found this:

http://web.media.mit.edu/~dustin/rubyai.html

Hope it helps you in some way.

Cheers,
Arlen


Well ... programming in "natural" languages has been a dream for
decades. Heck, that was one of the things that was supposedly attractive
about COBOL (and its predecessor, COMTRAN). You can probably still find
code like

SUBTRACT TAXES FROM GROSS_INCOME GIVING NET_INCOME

in the COBOL code base.

Mabye that's why it irks me so when I see Rails code like

class Order < ActiveRecord::Base
has_many :line_items
end

Now, if it were "An order has many line items," that would be natural.
But it's the mix of Ruby code and English (class <Class-name starting
with a *capital* letter>, <two English words separated by an underscore>
<two English words separated by an underscore *and* preceded by a
colon>), etc. It's un-natural. I'd rather have straight code.

Rake is another example ... file tasks are named with strings and other
tasks are named with symbols. The whole "when do I use a symbol and when
do I use an ordinary identifier" conundrum is difficult for me.

The point is that if you're writing code for other programmers to read,
you can assume that they know both the programming language and "the"
natural language. And an IDE for teams of these programmers should
introduce another common language -- coding standards, project
structure, version control, lexical and syntactic help, testing
frameworks, debugging, etc.

I think it's a mistake to try to design languages and programs in a way
that *in theory* attempts to make the code readable to non-programmers.
First of all, non-programmers rarely, if ever, read code. They care
about what the software *does*, not what's under the hood. And second,
it makes the job of the programmer more difficult.

.



Relevant Pages

  • Re: Thoughts on Design
    ... the design of programming languages is concerned. ... "A programmer who fully understands his language can tackle more complex ... we navigate as software engineers is fractal in nature. ...
    (borland.public.delphi.non-technical)
  • Re: object system...
    ... for that you need machine language. ... isn't even as fast as other systems programming languages. ... Stroustrup's stated design goal was to enable ... all manner of elegance or abstraction can be sacrificed for speed, ...
    (comp.object)
  • Re: DirectX in HLA
    ... I guess that you have a great knowledge of DirectX ... > understanding by looking at them in assembly language... ... > actually represents, really, is a means to "undo" the OOP so ... > is NOT an "OOPL" (object-orientated programming language), ...
    (alt.lang.asm)
  • Re: LSP and subtype
    ... What is the class of problems solvable using UML? ... the language of physics cannot describe. ... whatever paradigm equivalent to 2GL/3GL ... there is still a great need for reuse and generic programming. ...
    (comp.object)
  • Re: DirectX in HLA
    ... I guess that you have a great knowledge of DirectX ... > understanding by looking at them in assembly language... ... > actually represents, really, is a means to "undo" the OOP so ... > is NOT an "OOPL" (object-orientated programming language), ...
    (comp.lang.asm.x86)