AiDL language draft

  • 29 Replies
  • 9135 Views
*

Zero

  • Eve
  • ***********
  • 1287
AiDL language draft
« on: January 16, 2018, 02:26:03 pm »


AiDL


primitive data type
    number                  | a Javascript number
    text                    | a Javascript string
    boolean                 | true or false
    verb                    | an anonymous procedure in Tcl-like code
    function                | an anonymous functional expression
    instant                 | a specific moment in time
    evolution               | a list of instant/value couples
    duration                | length of time
    parser                  | based on parsing expression grammar
    knowledge               | a coherent set of interrelated meanings
        meaning                 | a knowledge item
            relation                | a relation between items
            meta-data               | a semi-structured data chunk
            behavior                | a behavior tree
    schema                  | a data pattern
composite data type
    object                  | an Io-like object
    list                    | a plain old list


number syntax example
    23
    -56.9
    2e5


text syntax example
    bluesky
    "blue sky"
    'blue sky'
    {blue sky}


boolean syntax example
    true
    false


verb syntax example
    set increment [
        verb {
            set [argument] [sum [[argument]] 1];
        }
    ];


function syntax example
    set factorial [
        function {
            (argument<0) ? undefined : (
                (argument==0) ?
                    1 :
                    argument*factorial(argument-1)
            )
        }
    ];


object syntax example
    object {
        <tag1>key1: expr1,
        <tag2>key2: expr2
    }


list syntax example
    list {
        <tag1>expr1,
        <tag2>expr2
    }


knowledge syntax example
    meaning {

        item1 -> ownership {
            owner: Janis;
            owned: Mercedes;
        }

        item2 -> [email|
            [from|john@doe.com]
            [to|jane@tarzan.net]
            [title|meta/data test]
            [body|
                Hi, this is John sending
                semi-structured data.
            ]
        ]

        item3 ->
        (select,
            open the door,
            (sequence,
                get the key,
                unlock the door,
                open the door))
    }



There's also the pub/sub thing from Birdy, and lessons learned from Semantic JSON, which don't appear here, but are meant to be included. Also, there is no loop.

This could be my idea of an "AiDream" language...  :)
« Last Edit: January 25, 2018, 09:32:11 am by Zero »

*

ranch vermin

  • Not much time left.
  • Terminator
  • *********
  • 947
  • Its nearly time!
Re: All-in language draft
« Reply #1 on: January 17, 2018, 09:51:51 am »
these things are so hard to test,   u cant hardcode them because there is too much to hardcode.
And an automatic extraction off sensor is tricky to get your head around, just as much as a working symbolic database for an ai is. (this is one of those?)

*

Zero

  • Eve
  • ***********
  • 1287
Re: All-in language draft
« Reply #2 on: January 17, 2018, 12:19:23 pm »
You're right, you can't hardcode everything because there's too much. But I think it's possible to reach some kind of top-down "critical mass", and BOOM. Like the Terminator.

Sensing can be tricky, yes: we need specific perception/interpretation devices or subsystems whatever you wanna call them. It can't be high-level. When your eyes meet a face, you just see a face. The mechanism that makes the "face construct" pop in your mind isn't conscious at all.

What do you think?

*

ranch vermin

  • Not much time left.
  • Terminator
  • *********
  • 947
  • Its nearly time!
Re: All-in language draft
« Reply #3 on: January 17, 2018, 12:52:33 pm »
about an automatic sensor to fill it up->  if your putting tonnes of english with some kind of natural language processor that goes into the symbolic system, they tend to be parrotlike and take it in no matter how nonsensical it is,  a machine has no judgement of good reading matter unless u give it to it, and it would be tricky.

even people dont know what to believe,  its actually a fundamental problem with intelligence in general,  let alone parrotlike data collecting.

I guess it must take in the information,  but maybe you put a scope difference between "different opinions", and it takes them all in...  then a machine has a bit of a personality problem, doesnt know who to be. :)

Im not saying these symbolic structures dont work tho,  I think they do just as much as pattern recognition stuff does.  (see Yann Lecun's amazing works) its all assignment after all. (=) in both techniques.

*

Zero

  • Eve
  • ***********
  • 1287
Re: All-in language draft
« Reply #4 on: January 17, 2018, 02:35:40 pm »
I agree: if you just stuff it with analysed english sentences, or even structured definitions or ontologies, it never works. Because it doesn't experience it.

But if you sit down calmly and have a nice little chat with it about simple things it does experience, like "hey Ai, did you notice how that variable has been modified when you called this function? interesting isn't it"

Then maybe you can start sharing true knowledge, and expand from there.

*

ivan.moony

  • Trusty Member
  • ************
  • Bishop
  • *
  • 1729
    • mind-child
Re: All-in language draft
« Reply #5 on: January 17, 2018, 03:55:32 pm »
See: reflection, or more interestingly: metaprogramming.

*

Zero

  • Eve
  • ***********
  • 1287
Re: All-in language draft
« Reply #6 on: January 17, 2018, 03:59:33 pm »
Yes, Wikipedia articles are always well structured and interesting.
:)

*

Zero

  • Eve
  • ***********
  • 1287
Re: All-in language draft
« Reply #7 on: January 18, 2018, 08:57:41 am »
I think I'll name this language AiDL, in honor of our amazing community. If Freddy greenlights me!
:)

Quote
Im not saying these symbolic structures dont work tho,  I think they do just as much as pattern recognition stuff does.  (see Yann Lecun's amazing works) its all assignment after all. (=) in both techniques.

Actually, what I'd like to do is create a top-down knowledge structure that describes the AiDL programming language features: the data types, the syntax and semantic of source code, the control structures, the execution model, how things connect and work together, what happens when foo and bar happen (cause-consequences chains), ...etc. This knowledge would be described using the "meaning" datatype, with relations, semi-structured data chunks, and behaviors. It would be able to describe the results and effects of code snippets. This knowledge would also contain information about what happens when you modify the code, and more importantly, about how to modify the code. All this would be built-in, it comes in the box.

Then, we apply the idea of internal sensors to this (see Semantic JSON), connecting every little aspect of the user's program execution to these symbolic structures. The internal sensors collect data about everything, and the collected data is sent through the symbolic structures for interpretation. This way, the program knows what it is doing: not only sensing events and evolution of its states, but also interpreting them in a meaningful way.

Then, a simplified controlled version of natural language (like Attempto) should be made available to communicate with the program, in order to talk with it about itself. And this is where we start to teach it how to develop software, how to develop itself.

Thanks for the pointer to Yann Lecun: you made me discover the Lush programming language.
« Last Edit: January 18, 2018, 02:14:38 pm by Zero »

*

Freddy

  • Administrator
  • **********************
  • Colossus
  • *
  • 6860
  • Mostly Harmless
Re: All-in language draft
« Reply #8 on: January 18, 2018, 03:11:06 pm »
Quote
I think I'll name this language AiDL, in honor of our amazing community. If Freddy greenlights me!

Consider the green light on, I think we would all be honoured  :)

I must set down a proper definition for ElfScript but I tend to be making it up as I go along.  ;D

*

Zero

  • Eve
  • ***********
  • 1287
Re: All-in language draft
« Reply #9 on: January 18, 2018, 08:35:26 pm »
 O0  Wow, thanks a lot Freddy!

Elfscript is cool. I like the project, and I like the name! :)
It's evolving fast, isn't it?

*

Freddy

  • Administrator
  • **********************
  • Colossus
  • *
  • 6860
  • Mostly Harmless
Re: AiDL language draft
« Reply #10 on: January 18, 2018, 09:31:46 pm »
It evolves fast when I work on it, as I get addicted to the problem solving. But I have to take breaks from it if I can pull myself away long enough - otherwise I am up till dawn tapping away on the keys.

I'm having a break from it at the moment actually, but there's an itch to scratch developing again lately   ;D

*

ranch vermin

  • Not much time left.
  • Terminator
  • *********
  • 947
  • Its nearly time!
Re: AiDL language draft
« Reply #11 on: January 19, 2018, 08:50:02 am »
the good thing about this is you could read what its doing not like hidden layers in neural networks where its all unlabelled gibberish.

*

Zero

  • Eve
  • ***********
  • 1287
Re: AiDL language draft
« Reply #12 on: January 19, 2018, 09:27:45 am »
It evolves fast when I work on it, as I get addicted to the problem solving. But I have to take breaks from it if I can pull myself away long enough - otherwise I am up till dawn tapping away on the keys.

I'm having a break from it at the moment actually, but there's an itch to scratch developing again lately   ;D

Yeah, I know what it feels like ;)

In fact, if my wife wasn't here to kick my ass on a daily basis, I think I would just stick to my computer day&night  ;D

the good thing about this is you could read what its doing not like hidden layers in neural networks where its all unlabelled gibberish.

Exactly. I'm targeting the browser. I made a simple UI made of a lot of draggable frames, like a dashboard. You'd use those frames to set up spies and follow what's happening. You can see a demo page here. I like the "dev on the fly" approach!  :D

*

Zero

  • Eve
  • ***********
  • 1287
Re: AiDL language draft
« Reply #13 on: January 22, 2018, 11:18:52 am »
I added 3 new data types: parser, instant, and duration. Also, I moved meaning and schema from composite data types to primitive data types: indeed, they're not meant to contain values of other types. I'm considering adding a code type, to manipulate the AST with a DOM-like interface. Please share your pros&cons!

Parentheses don't mean text constant anymore. In Tcl, math expressions can be evaluated with the expr command. In AiDL, we use = instead of expr. But since complex formulae are still cumbersome with this syntax, I introduce the parenthese syntax as a fallback to classical notation. See the "factorial" math expression syntax example.

I'm dropping the "goal-directed execution" concept from Icon programming language. I really appreciate it as a great tool, very clever. But on this one, I'm going to walk the Python path: "To describe something as 'clever' is not considered a compliment in the Python culture." In fact, goal-directed execution is a little tough to wrap your head around, and if we're gonna teach a program how to develop itself, we'd better stick to more conventional programming patterns. It hasn't been widely adopted for a reason.

WIP!

ED:

PUB/SUB

Objects can subscribe to channels, publish on channels, and receive from channels.

A channel is a list of texts.

For example, when a value published on channel list { abc def ghi }

Channel subscribed to      Reception
=====================      =========
abc def ghi                yes
abc def                    yes
abc def ghi jkl            yes
abc xyz                    no
def ghi                    no
abc ghi                    no


PARSER

Parsers have a specific syntax that looks like this:

    parser {
        rule1 = parsingExpression
        rule2 = parsingExpression
        rule3 = parsingExpression
        ...
    }


Where parsingExpression is one of:

    "literal"
    . (dot character)
    [characters]
    rule
    ( expression )
    parsingExpression *
    parsingExpression +
    parsingExpression ?
    & parsingExpression
    ! parsingExpression
    & { predicate }
    ! { predicate }
    $ parsingExpression
    label : parsingExpression
    parsingExpression1 parsingExpression2 ... parsingExpressionN
    parsingExpression { action source code }
    parsingExpression1 / parsingExpression2 / ... / parsingExpressionN

« Last Edit: January 22, 2018, 03:50:48 pm by Zero »

*

ivan.moony

  • Trusty Member
  • ************
  • Bishop
  • *
  • 1729
    • mind-child
Re: AiDL language draft
« Reply #14 on: January 22, 2018, 09:48:59 pm »
Something surprised me recently on web: railroad-diagrams. The project is also great because it has very pro-liberal license.



This would look great for documenting code parts. Extraction of diagrams for EBNF is relatively easy, and there are a lot of tools doing it, but unfortunately, ordinary BNF is not supported anywhere near. There is no even a converter from BNF to EBNF. I was a bit disappointed because I wanted to have something like this for /**... */ sections of my language like in javadoc, but as the language is based on ordinary BNF, I can't have it. Maybe I'll think of something, but materia gets extremely complicated with introduction of dependent types, even if I figure out what to do with ordinary BNF.

Anyway, `parsingExpression` part of AiDL looks somewhat similar to EBNF, so I thought you might be interested in automatic railroads extraction.

 


Will LLMs ever learn what is ... is?
by HS (Future of AI)
November 10, 2024, 06:28:10 pm
Who's the AI?
by frankinstien (Future of AI)
November 04, 2024, 05:45:05 am
Project Acuitas
by WriterOfMinds (General Project Discussion)
October 27, 2024, 09:17:10 pm
Ai improving AI
by infurl (AI Programming)
October 19, 2024, 03:43:29 am
Atronach's Eye
by WriterOfMinds (Home Made Robots)
October 13, 2024, 09:52:42 pm
Running local AI models
by spydaz (AI Programming)
October 07, 2024, 09:00:53 am
Hi IM BAA---AAACK!!
by MagnusWootton (Home Made Robots)
September 16, 2024, 09:49:10 pm
Attempting Hydraulics
by MagnusWootton (Home Made Robots)
August 19, 2024, 04:03:23 am
LLaMA2 Meta's chatbot released
by spydaz (AI News )
August 24, 2024, 02:58:36 pm
ollama and llama3
by spydaz (AI News )
August 24, 2024, 02:55:13 pm
AI controlled F-16, for real!
by frankinstien (AI News )
June 15, 2024, 05:40:28 am
Open AI GPT-4o - audio, vision, text combined reasoning
by MikeB (AI News )
May 14, 2024, 05:46:48 am
OpenAI Speech-to-Speech Reasoning Demo
by MikeB (AI News )
March 31, 2024, 01:00:53 pm
Say good-bye to GPUs...
by MikeB (AI News )
March 23, 2024, 09:23:52 am
Google Bard report
by ivan.moony (AI News )
February 14, 2024, 04:42:23 pm
Elon Musk's xAI Grok Chatbot
by MikeB (AI News )
December 11, 2023, 06:26:33 am

Users Online

477 Guests, 0 Users

Most Online Today: 479. Most Online Ever: 2369 (November 21, 2020, 04:08:13 pm)

Articles