Thursday, February 6, 2025

My own programming language was too ambitious...

So now I am coding TinyLang, a wrapper around JavaScript. A bit hard to describe how it works. It borrows from other languages. This keeps my promise to deliver a language and it's another thing I always wanted to do.

There is and ask ? and tell ! syntax which operates on a soup of data and relationships []. For example, a tell statement may add to the soup something like:

! ham > eggs
! ham + eggs > ham 
! ham  + eggs > eggs
! ham - eggs = 1

An ask statement will do,

? ham < eggs
>false
? ham - eggs
>1

Finally the soup statement does,

ham [1] eggs
>ham - eggs
ham [<] eggs
>false
! [ eggs [ ham ] ]
>ok

The last command, nested soup means that eggs statements can be iterated by ham statements. If otherwise,

! [ eggs ham ]
>ok

Then this would associate eggs and ham statements.

! [ eggs - ham ]
>ok

This will remove the relationship by deleting all associations.

More later...

Made a lot of progress on TinyLang. Wrote in all the parsing functions and am now working on the operators and how they link up the data or expressions in the soup. Apparently it's a good language for AI training.

Almost midnight. The rain cooled the air a lot and I may sleep in an hour or so. Want to finish the associative code first then tie everything together when I wake up at 5am tomorrow.

...

I'm working hard at TinyLang this evening after some work at the old house, and helping prepare dinner earlier. Trying to keep the JS kludge-free so it might be translated into other languages more easily. The reason JS is used is so users can try it out online and have some fun coding in a unique way.

No comments:

Post a Comment