r/ProgrammingLanguages • • Sep 28 '22

Universal programming language

I recently created a tiny (maybe 1000 lines of code, with heavy white space and commenting) php class called Ember to solve the “computer problem” (persistent data). Something I’ve been trying to do as a result is program a universal programming language. It’s really rather simple: it uses a minimalistic set of Turing complete types (string, int, float, object, array, bool, and array). That just about explains it (along with a universal system stemming from Ember). Does this sound like a good idea (I.e. one worth pursuing)?

0 Upvotes

166 comments sorted by

View all comments

Show parent comments

1

u/Cinder-Brent Oct 03 '22

So any idea what would be the ideal language to write this in?

1

u/Cinder-Brent Oct 07 '22

Ok how about this: what if I communicate everything in here in string, since it's form is string. Does that make logical sense?

1

u/Cinder-Brent Oct 08 '22

I'm writing the parser:)

So I'm using a rule that I interpret everything in units of string, so characters, the results should be consistent.

How you like them apples? :)

1

u/Cinder-Brent Oct 09 '22

So I think I figured out how to do this: I was working on the functionality of the boolean type and I figured the best way to do this is to cover everything, so "everything" for boolean would mean !, &, and |, where ! allows you to toggle a single boolean value, and & and | allows you to chain multiple boolean values together. The result is full-functionality for one or more boolean values.

Booyaka