The following program is a quine written in X. All mechanism of X are used in the program.
[ q < < [ q > { q } < ] ( q ) > > ] ( q )
Describe syntax and semantics of programming language X.
Years ago I made a very simple programming language. Despite its lack of mostly all typical programming language features, it is possible to do some interesting stuff with it.
I recently watched a documentary where they talked about messages sent into space and how they imagined aliens figuring out how to understand them. They used math and geometry in clever ways.
I wonder if it may be possible to use programming to send such messages.
The question is then if it is possible to figure out the syntax and semantics of a language by looking at a program. I think a quine would be a natural choice of program since it is its own output regardless of what the symbols may mean. The only hand-waving necessary is to convey that something results in something else, and I think that is an unavoidable problem.
I think a message should have at least length, data and checksum, and could contain in order:
- quine
- definition of numbers and operators relating them to the symbols with some math examples
- definition of lists with some example operations like sums and sorting
- definition of messages and functions for calculating message checksums
Once the basic framework is set it will be possible to build on it like any other computer system.