Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can you create a programming language with just one symbol?

Can you create a programming language with just one symbol like brainfuck.

like image 657
Kaustubh Kendurkar Avatar asked Mar 21 '18 05:03

Kaustubh Kendurkar


People also ask

Can I create my own programming language?

You can just take a subset of an existing language or come up with a simple variation of it and get started. However, if you have plans for creating your very own programming language, you will have to give it some thought. I think of designing a programming language as divided two phases: The big-picture phase.

Are symbols used to make program?

A Symbol in Computer Programming is Primitive Data type whose instances have a unique human-readable form. Symbols can be used as identifiers. In Some of the Programming Language , Symbol is called as ATOMS. Uniqueness is enforces by holding them in symbol table.

How do one create a coding language?

Just write down some instructions and some rules for what they do, and voila, you've created a programming language. If you write down these rules using slightly fancy language, you would call that the specification of your language and have a very good claim to have created a programming language.

Why can't we just have one programming language?

The reason there are many language is simply because there are many programmers and some of them like to create new languages. The reason there's no single universal language that everyone agrees on is that programming as a craft is not dictated by some institution that makes all the decision.


2 Answers

Yes, it has been done before - see Unary.

Basically it's a strange encoding of brainfuck. Treat each BF command as a number. The whole program is then also a number, created by concatenating the commands together (with an extra 1 at front, for unambiguous decoding). Convert the number to unary numeric system (aka the number of digits is your number) and you're done.

Note however the programs in this tend to be very large - a cat implemented in Unary is (according to the information on page) 56623 characters long.

MGIFOS, Lenguage and Ellipsis follow the same principle. Note that e.g. a hello world in MGIFOS

has more characters than particles in the observable universe

Then Len(language,encoding) extends this principle to any language.

like image 80
Torinthiel Avatar answered Oct 06 '22 21:10

Torinthiel


They are called OISC One Instruction Set Compiler. The first one know of is Melzak's Arithmetic Machine (1961), with the instruction:

z = x-y or jump if y>x

You also have Zero Instruction Set Computer, which are more like neural nets.

Not forgetting the amazing FRACTRAN of Conway & Guy (1996), with no instruction but interprets a series of fractions (the program) in a Tuning complete way.

like image 44
AlainD Avatar answered Oct 06 '22 20:10

AlainD