Mutant Language

From University
Revision as of 16:47, 10 January 2016 by WikiSysop (talk | contribs) (1 revision imported)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Mutant Language

Holding name for the new programming language that will be needed for Mutant OS.

Base it on Erlang.[1]

What to name it?

Names taken

Algae
Amoeboid
Crucible
Ioco
Monads

Names not taken

Bacteria
Elugnorn
Harec
Lichen
Phykos
Pondscum
Ruvator


Features

  1. Think beyond the Querty keyboard and Latin-1 set for reserved words and symbols. Exploit the UNICODE set to represent more complex mathematical ideas. See "Sir, Please Step Away from the ASR-33!" by Poul-Henning Kamp ACM 2010 11 p. 56.
  2. Able to re-write it's own code from main() to end(). (LISP can re-write a line, but not a whole program.)
  3. Event driven
  4. Encapsulation. View this as a cell or skin wall. Separating the atoms.
  5. Not object oriented.
  6. No primitives are accessable to the programmer.
  7. Inherent message passing between programs.
  8. String has a pointer+length representation. Add \0 at the end for compatibility. See "The Most Expensive One-Byte Mistake" by Poul-Henning Kamep ACM 2011 09 p 42
  9. No ";" ending a line as in c/c++. CR will do fine.
  10. Loops:
    1. Identifier for each loop in a method.
    2. Auto-number the loops by default.
    3. Loops end with a comment line containing the loop's number or name using the form. // <name> :
  11. Methods with a comment line containing the method's number or name using the form. // <name> :
  12. Classes end with a comment line containing the class's number or name using the form. // <name> :
  13. Each class name is unique within the program.
  14. Each loop name is unique within the method.
  15. Memory protection to the method level.
  16. No global variables.
  17. No GOTO.
  18. Global constants are allowed.
  19. PERL: Steal all the string handling commands.
  20. Nibble: A four bit datatype useful for representing numbers as strings to solve the Big Number Problem.
  21. Every method is in a generic try{}catch() block invisible to the programmer. This requires a default returned error atom, logfile and dialog box.
  22. No interfaces
  23. Typing varies from Weak <-> Strong as the programmer and mutation needs.
  24. Libraries
    1. System - information about the OS and hardware
    2. System.OS -
    3. Program - information about the Program, PID, Name, Memory used, system memory and disk space, Origin, who spawned me? Where am I?
  25. Life Points
    1. Needed for existence
    2. Needed for carrying out functions. How many Life Points does a while-loop cost?
  26. How do I write a language that has objects, encapsulation, inheritance, but isn't object oriented?


Mutant OS and Language must be Event Driven, not Object Oriented. In the real world an event happens, starting an event chain, then the chain ends, waiting for the next event.

Data Types

Main Article Datatypes
Discusses Datatypes.

Issues

  1. Concurancy in parallelism. Erlang solved this so apply it.
  2. Joe Armstrong - Erlang, "Bringing the Gorilla and Jungle along when you just want a banana." Many objects and classes are needed to do simple things. Bury the complexity under the hood. You don't have to know how a car works to drive one. One banana brings along billions of cells aswell. Call this the Banana Problem.
  3. How do you bounds check a recursive function? Iterator limit does not work because it can be added to.
  4. Typing. When reproducing the code can select a type level on the Weak <-> Strong range. ACM Oct 2014 p.17
  5. Dynamic vs. Static. I'm thinking massively dynamic.
  6. Iterative - Allow. Though I don't use it myself much every option must be offered.
  7. Recursive - Of course.

Problems

  1. DNA - How to represent code in such a way that it can be randomly modified, spawned into a new process, and mostly work.

What would the code look like?

tiki - visual programming language

Open vs. Closed Universe Model

"An open-universe probability model (OUPM) defines a probability distribution over possible worlds that vary in the objects they contain and in the mapping from symbols to objects. Thus, OUPMs can handle data from sources (text, video, radar, intelligence reports, among others) that violate the closed-universe assumption. Given evidence, OUPMs learn about the objects the world contains." From Communications of the ACM July 2105 p. 92.

Since we do not know what may enter the environment, the Mutant Language must be open-universe.


Languages

Other Languages to reference.

  • Erlang[2] For Spawning and inter-process communications and process mail-box.

Calculus and Object Oriented Languages

The idea came to me as I reviewed Object Oriented Programming (OOP). That OOP was like pre-calculus geometry in that it took a single object, here the Object Class vs. the Point, and attempted to create the world from it. This creates a sequential and hierarchical world. In Newton's time this was used to justify a hierarchical society with all the wealth and privilege at the top. It assumes that all reality is based on one fundamental object and that we poor humans can imagine all the higher-level structures.

Newton and his Calculus reversed this to decomposing existing objects into infinitely small and infinitely numerous rectangles. Study reality as it is. Not how it fits an ideology.

How to apply this to software development?

Newton could cut a wood block and immerse it in water to find the volume before applying calculus to it. But there are no concrete programming objects to test against. Hmmm...

Internal Links

Parent Article: Main_Page
Mutant_OS