S-Expression Query Language

  • 41 Replies
  • 13094 Views
*

infurl

  • Administrator
  • ***********
  • Eve
  • *
  • 1372
  • Humans will disappoint you.
    • Home Page
Re: S-Expression Query Language
« Reply #15 on: April 12, 2018, 09:52:10 pm »
If we put data entanglements right, then all the calculations could be done by simply querying data structures.

This has already been done too. It's called RDF and the language that is used for querying such structures is called SPARQL. It allows you to treat different data repositories that are distributed around the internet as a single entity and issue queries across them all. An important aspect of RDF (and of the databases that I am assembling in my own project) is alignment. You have to match equivalent terms from different sources or it is all just a meaningless blob.

*

ivan.moony

  • Trusty Member
  • ************
  • Bishop
  • *
  • 1729
    • mind-child
Re: S-Expression Query Language
« Reply #16 on: April 12, 2018, 10:22:25 pm »
I'm aware of RDF, but I didn't like it much. It's too complicated, it has a million keywords for a million different stuff, as far as I remember. It was created as a W3C response to semantic web requirement, and they try to promote it on their site. But anyway, I'll do my own version for the task I'm trying to achieve (sharing knowledge), based on s-expressions.

S-expressions are underrated these days. More complex formats took a place that could be filled by simpler s-expressions.

For example, I'd also like to see s-expression version of HTML with some macro support.

*

infurl

  • Administrator
  • ***********
  • Eve
  • *
  • 1372
  • Humans will disappoint you.
    • Home Page
Re: S-Expression Query Language
« Reply #17 on: April 12, 2018, 11:02:56 pm »
Your efforts to improve on the current technology are certainly to be applauded. While I'm trying to learn as much as I can from the principles of resource description framework (RDF) I'm not actually using it either. Like you I am very much favouring symbolic expressions over the rather awkward universal resource identifier (URI) syntax of RDF.

The next level up from RDF triples is first order logic (FOL) which can also be used to simulate higher order logic (HOL) to avoid the intractability of the latter, making it capable of expressing any kind of knowledge. Practical applications of this include knowledge interchange format (KIF) and even better, SUO-KIF which comes with a fairly comprehensive ontology in the form of the suggested upper merged ontology (SUMO) which is mature and in active development.

Have you devoted much thought to the use of S-expressions for building ontologies or do you have something else in mind for them? (If you want HTML with macro support then you should be looking at XHTML and XSLT which is how the web should be implemented. Also W3C standards.)

*

ivan.moony

  • Trusty Member
  • ************
  • Bishop
  • *
  • 1729
    • mind-child
Re: S-Expression Query Language
« Reply #18 on: April 12, 2018, 11:33:46 pm »
Quote
Have you devoted much thought to the use of S-expressions for building ontologies or do you have something else in mind for them?

Actually, I'm building a language in which any other language (programming, DSL, scientific, natural) could be syntactically and semantically described. It is a knowledge base theory language. For a reference, throw a look to the left of this post, to click on the blue-green globe. That is a link to my year-and-a-half old specification of such a language. Basically, it is a lambda calculus packaged in a structured manner, capable of what I stated. It caught a nice critics on lambda-the-ultimate blogging site, but people there know much about computational theory, so I didn't have to explain much to them. Probably, on some other site I wouldn't get away with a material from the link because it is not thoroughly shaken over examples.

However, I didn't implement the language back then, and I sustained to search further (god knows why), so I ended up in a s-expression query system a few months ago, as a better version of knowledge representation theory. After it got over the child diseases, now I'm eager to explain it in a paper before stepping into coding, just to be sure I didn't leave something out.

Who knows, maybe after this I'll sustain to seek further, but honestly, I hope to code in this version because my investigation already took a sick amount of time. It is time for me to actually do something, instead of just thinking about it.

*

infurl

  • Administrator
  • ***********
  • Eve
  • *
  • 1372
  • Humans will disappoint you.
    • Home Page
Re: S-Expression Query Language
« Reply #19 on: April 13, 2018, 07:47:03 am »
Actually, I'm building a language in which any other language (programming, DSL, scientific, natural) could be syntactically and semantically described. It is a knowledge base theory language. For a reference, throw a look to the left of this post, to click on the blue-green globe. That is a link to my year-and-a-half old specification of such a language.

Wow. So I spent a fair portion of the day reading and rereading your paper and I can absolutely assure you that you are on the right track. You still have a way to go though, so I hope you persevere and continue.

I know this because I followed the same path that you are taking and four years ago I completed a system which does everything that you describe and more. I was able to refine my language considerably compared to yours and it has a much cleaner and easier to use syntax, but it does everything that you describe and more. My system scales up to handle millions of rules which I think is essential for natural language processing. It compiles the rules in sections which are saved and then linked together to save time. I've spent the time since I paused development of it collecting and preparing knowledge bases for it to use.

Once you start implementing your language you will start to have insights which will help you improve it too.

Reading about Typed Feature Structures might help you get there sooner.

https://en.wikipedia.org/wiki/Feature_structure

https://www.amazon.com/Logic-Typed-Feature-Structures-Applications/dp/0521022541

You're doing brilliant work Ivan, please keep it up.

*

Zero

  • Eve
  • ***********
  • 1287
Re: S-Expression Query Language
« Reply #20 on: June 06, 2018, 10:33:22 am »
Hi,

Are you still working on this ivan?

Looking for the simplest way to organize discrete data, I thought yesterday that cons cells are really the lowest level one could reach: conceptually, a memory cell holding two pointers, so it's like a digraph where vertices have always 2 edges. What I'd like to make is an algorithm that finds the best way to compress a network of cons cells, so that it is expressed by another (smaller) network of cons cells. Is it related to your work?

S-expressions are underrated these days. More complex formats took a place that could be filled by simpler s-expressions.

For example, I'd also like to see s-expression version of HTML with some macro support.
I agree. About HTML in S-expression, there's SEML (appending classes and ids to the tag names feels a bit like cheating to me though).

*

ivan.moony

  • Trusty Member
  • ************
  • Bishop
  • *
  • 1729
    • mind-child
Re: S-Expression Query Language
« Reply #21 on: June 06, 2018, 10:54:13 am »
Hi,

Are you still working on this ivan?

Looking for the simplest way to organize discrete data, I thought yesterday that cons cells are really the lowest level one could reach: conceptually, a memory cell holding two pointers, so it's like a digraph where vertices have always 2 edges. What I'd like to make is an algorithm that finds the best way to compress a network of cons cells, so that it is expressed by another (smaller) network of cons cells. Is it related to your work?

Hi, it's been a long time... Hope everything is ok.  :-\

Yes, I'm on it these days. I still have to finish and document the specification.

I don't understand what compression is there to make. Do you mean something like reusing duplicate elements?

However, I'm counting I'll get to a level where I would be able to make inferences by induction, like:
Code
(
    (1 . 2 . 3) &
    (2 . 2 . 4) &
    (1 . 4 . 5) &
    (3 . 4 . 7) &
    ...
) => (a . b . (a + b))

*

LOCKSUIT

  • Emerged from nothing
  • Trusty Member
  • *******************
  • Prometheus
  • *
  • 4659
  • First it wiggles, then it is rewarded.
    • Main Project Thread
Re: S-Expression Query Language
« Reply #22 on: June 06, 2018, 11:32:09 am »
Wait a minute here lol :) ... Is this project of yours ivan all about:

x does b
g does z
....therefore h is w !

"discovery forming" ? And, what else is it all about? If you can list a 2nd thing, that'd be big, besides discovery forming being 1st.
Emergent          https://openai.com/blog/

*

ivan.moony

  • Trusty Member
  • ************
  • Bishop
  • *
  • 1729
    • mind-child
Re: S-Expression Query Language
« Reply #23 on: June 06, 2018, 12:01:10 pm »
Wait a minute here lol :) ... Is this project of yours ivan all about:

x does b
g does z
....therefore h is w !

"discovery forming" ? And, what else is it all about? If you can list a 2nd thing, that'd be big, besides discovery forming being 1st.

Lock, I'm building a functional programming language. Functional programming languages have a nice property of representing term rewriting systems. Term rewriting systems, in turn can describe conclusions in a form of deduction, abduction and induction (as thinking processes). Intention of this programming language is mainly supporting automated thinking processes.

A field I'm particularly interested to support is science. I hope to connect all the sciences by unified theory description (programming) language. I would need to build a crowdsourced site for this intention because I need scientists to enter their theories into my language. I hope for providing new automated conclusions when enough science fields are connected by the language.

I know it is a long shot, but I'll try. I have an idea of helping scholars and students solving their everyday school tasks. When they grow up, some of them would become scientists that I need to populate all the wonderful data on my (or even third party distributed) site.

*

spydaz

  • Trusty Member
  • *******
  • Starship Trooper
  • *
  • 325
  • Developing Conversational AI (Natural Language/ML)
    • Spydaz_Web
Re: S-Expression Query Language
« Reply #24 on: June 06, 2018, 12:20:34 pm »
Wait a minute here lol :) ... Is this project of yours ivan all about:

x does b
g does z
....therefore h is w !

"discovery forming" ? And, what else is it all about? If you can list a 2nd thing, that'd be big, besides discovery forming being 1st.

Lock, I'm building a functional programming language. Functional programming languages have a nice property of representing term rewriting systems. Term rewriting systems, in turn can describe conclusions in a form of deduction, abduction and induction (as thinking processes). Intention of this programming language is mainly supporting automated thinking processes.

A field I'm particularly interested to support is science. I hope to connect all the sciences by unified theory description (programming) language. I would need to build a crowdsourced site for this intention because I need scientists to enter their theories into my language. I hope for providing new automated conclusions when enough science fields are connected by the language.

I know it is a long shot, but I'll try. I have an idea of helping scholars and students solving their everyday school tasks. When they grow up, some of them would become scientists that I need to populate all the wonderful data on my (or even third party distributed) site.

To me it seems as though the programming technology is going backwards... (maybe people are just catching up).... IT seems like the repel Environment is the way to go!

*

ivan.moony

  • Trusty Member
  • ************
  • Bishop
  • *
  • 1729
    • mind-child
Re: S-Expression Query Language
« Reply #25 on: June 06, 2018, 12:41:35 pm »
To me it seems as though the programming technology is going backwards... (maybe people are just catching up).... IT seems like the repel Environment is the way to go!

I think that object oriented design gave a boost to imperative programming style, so everyone are using it nowdays. But I think that the future lays in declarative programming, such is functional paradigm. It is just that not much people invested their time in declarative paradigm improvement, so it is not as developed as imperative paradigm.

*

Zero

  • Eve
  • ***********
  • 1287
Re: S-Expression Query Language
« Reply #26 on: June 06, 2018, 01:17:52 pm »
Hi, it's been a long time... Hope everything is ok.  :-\

Yes, I'm on it these days. I still have to finish and document the specification.

I don't understand what compression is there to make. Do you mean something like reusing duplicate elements?

However, I'm counting I'll get to a level where I would be able to make inferences by induction, like:
Code
(
    (1 . 2 . 3) &
    (2 . 2 . 4) &
    (1 . 4 . 5) &
    (3 . 4 . 7) &
    ...
) => (a . b . (a + b))


Yes everything's ok :) I hope you're fine.

Induction is nice. One expensive way to do it is calculate anything you could (any combination of operands and operators), and see where there's a match, but I bet you have a better idea in mind?

"Compression", so to speak, would encompass several things. I'll use the following syntax:
Code
address = car, cdr

Say you have:
Code
objectA =   null,    null
propA1 =    objectA, has
whatA1 =    propA1,  wheels
howmanyA1 = whatA1,  4
propA2 =    objectA, has
whatA2 =    propA2,  engine

objectB =   null,    null
propB1 =    objectB, has
whatB1 =    propB1,  wheels
howmanyB1 = whatB1,  4
propB2 =    objectB, has
whatB2 =    propB2,  engine
What it means is "objectA has 4 wheels and an engine". Well obviously, it can be compressed by introducing a new vocabulary "car", like this:
Code
objectA = null,    null
whatisA = objectA, car

objectB = null,    null
whatisB = objectB, car
This one was easy because there's no variant part in the original message. Using "car" is enough to represent the whole network, with the 4 wheels and the engine.

Things get more interesting when we want to compress messages with variant parts.
Code
objectA =   null,    null
propA1 =    objectA, has
whatA1 =    propA1,  wheels
howmanyA1 = whatA1,  4
propA2 =    objectA, has
whatA2 =    propA2,  engine

objectC =   null,    null
propC1 =    objectC, has
whatC1 =    propC1,  wheels
howmanyC1 = whatC1,  2
propC2 =    objectC, has
whatC2 =    propC2,  engine
Almost the same, objectC just have 2 wheels instead of 4. The global structure remains similar, so here we have two objects with a lot of things in common, and a little difference. It can be (lossless) compressed like this:
Code
objectA  = null,    null
whatisA  = objectA, vehicle
nwheelsA = objectA, 4

objectC  = null,    null
whatisC  = objectC, vehicle
nwheelsC = objectC, 2

I think it's related to induction indeed.
I'd like not to bruteforce it.


*

ivan.moony

  • Trusty Member
  • ************
  • Bishop
  • *
  • 1729
    • mind-child
Re: S-Expression Query Language
« Reply #27 on: June 06, 2018, 01:38:32 pm »
Quote
I'd like not to bruteforce it.

maybe https://en.wikipedia.org/wiki/Genetic_algorithm?
« Last Edit: June 06, 2018, 02:21:10 pm by ivan.moony »

*

Zero

  • Eve
  • ***********
  • 1287
Re: S-Expression Query Language
« Reply #28 on: June 06, 2018, 02:41:05 pm »
Interesting spark, thanks!

So it would be like... I take a few vertices and edges away (randomly chosen), replace them by a few new ones, temporarily declaring "this means that", then I try to compress data with my brand new mutant compressor, and my fit-function is whether or not... mmm it's not clear yet in my head, I have to think more. Nice idea.

Ed: Something tells me there's a more direct approach to this.

Ed: Maybe seeing this as a binary tree rather than as a digraph would be more productive, I don't know.
« Last Edit: June 06, 2018, 03:28:13 pm by Zero »

*

LOCKSUIT

  • Emerged from nothing
  • Trusty Member
  • *******************
  • Prometheus
  • *
  • 4659
  • First it wiggles, then it is rewarded.
    • Main Project Thread
Re: S-Expression Query Language
« Reply #29 on: June 06, 2018, 05:11:03 pm »
You need to do heuristics. Tweak your BEST objects. And the way you tweak them is your BEST guess/tweak.
Emergent          https://openai.com/blog/

 


Requirements for functional equivalence to conscious processing?
by DaltonG (General AI Discussion)
November 19, 2024, 11:56:05 am
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
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

387 Guests, 0 Users

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

Articles