Jane's Language Extensions

Take ANY compiler and remove ALL functions, what is left is the compiler...  My objective is to remove the need for functions.  When functions are no longer required then, and only then, will we have a complete compiler. Or to put it another way, we will have a language we can use to communicate with the computer to perform actions.

One Language for all development.  As of July 25, 2017 we must use 3 or 4 different development systems to write any application of any size. I am using 6 (HTML, JavaScript, c++, assembler, VS, and batch files) just for the compiler, and this would increase to over 10 environments by the time I finish, if I had not planned to bootstrap my own compiler, this will reduce all future development of Jane to one environment, one language with no limitations and a single syntax.

These extensions are to the syntax and to the logic of the language...

  1. emulated and compiled JavaScript
  2. A hybrid compiler, performs both emulation and compiled instructions simultaneously
  3. IPhone, Android, ARM, Windows, and console executables, (8,16,32 , and 64 bit machines)
  4. Windows forms (dialogs, components and subsystems)  a= new Form();  a.re = new Richedit();  a.open()
  5. browser statements
  6. assembler CPU instruction set statements R0 = a; R0 <<= 3;  if (overflow) alert('overflow');
  7. binary memory value access  a = c:/temp/test.obj; b = a~address;  alert(b.N2[0:7]);
  8. goto statement  goto 10
  9. no database, I/O, network, O/S, forms requires (all handled by Jane)
  10. block comment as a string a = /* hello */;
  11. block comment with a unique tag a =  /*+any+ .... +any+*/;
  12. dynamic language extensions a = b cross c;
  13. natural language extensions height is fifteen feet
  14. units a = 10 feet * 14.3 inches;
  15. expressions a = a + 2;  a~expression = [10 feet, * 14.3 inches, + 2 constant]
  16. dynamic properties a = 10 feet; a~units = inches dynamic converts units feet to inches 
  17. remove the need to declare local variables  a = 10;  alert(a) (local)
  18. force explicit .vs. implicit global declarations  window.a = 10;  alert(a);  (global)
  19. SQL   a = select name from employees where...
  20. variable length binary values ***
  21. mutable strings A ="clif";  A[0] = 'C';
  22. Matrix object m = new Matrix(2,4,4);
  23. Matrix math m *= 15
  24. String Templates evaluations   a = "Hello from {{name}}".eval;  b = "Hello {{name}}"; alert(b.eval);
  25. URL and file type alert(c:/temp/test.csv);  show file's content
  26. loop statement loop m(a,b,c,value) { ... }
  27. Bits object b = new Bits(1:6,12,20:50)
  28. sub-range object b = a[3:7] or b = a[9:-7]
  29. assembler functions (direct hardware access) 
  30. binary functions (to work on binary structures)
  31. remove closure, use bind
  32. A in ( list ) a in (12,13,15,19)
  33. A like ( wildcard-list ) a like ('a*','b*');
  34. A contains ( wildcard-list ) 
  35. all values are objects  a = "clif";  a.type='person';
  36. a "world" object (all machines)  alert(world.Collins Software.employees)
  37. blanks in variable names  my database = world.Mircrosoft Access.db1.mdb;
  38. a "local" object (local machine)
  39. a "user" object (user specific)
  40. undeclared variable event
  41. expanded alert output: values, objects, arrays, matrix, files, and URLs  alert(a,b,c);
  42. locals of functions as an array a = 12; return locals
  43. call stack access,  a = parentLocals
  44. function name locals.functionName;
  45. "this" propagates to sub-functions of parent
  46. library card (all known knowledge, is it sorted, what is the height/width, does it exist )
  47. delayed fetch of value until actually needed
  48. IC technology (Infinite Continuous) segmented data fetch
  49. tokens / compile / link functions
  50. qualified function names function car.print()  function prototype linkage
  51. integer, counting numbers, and real numbers  a = 12; b = 12.0   a is integer,  b is  real, propagates thru math operations
  52. create / change / delete events, (triggers)
  53. index constants, (enumerated variables) constants a = [apple,pear,banana]  apple = 0, pear=1, banana=2 (a is an array of names)
  54. bit mask constants  masks b = [apple:4,pear,banana]  apple = 0x0F, pear=0x10,banana=0x20 (b is an array of integers )
  55. Math expressions (trace, log and evaluation)
  56. Access to call stack, and calling routines
  57. JavaScript compiler / parser a = compile('b = 1; c = 4; alert(b*c)');  a.run();
  58. Time units kept, GMT,  UTC (GMT +/- seconds),  Time zones (GMT +/- hours)
  59. Time units to femtoseconds 10-15
  60. Time and Date duration infinite (as GMT or UTC (GMT +/- seconds))
  61. Calendar Date infinite, independent of time (no fuzzy dates)
  62. prompt specific dialogs (file, files, save-as, find-replace, color, font, folder)
  63. prompt similar to MessageBox
  64. confirm qualifiers,  confirm.yesno('continue ?')  yes-no, abort-retry, ok, yes-no-cancel, abort-retry, help, abort-retry-ignore
  65. search parent objects,  a = b.(up).companyName; search all parent paths for company name, also includes search criteria
    (by default search child objects, this includes parent objects into the search path)
  66. hybrid compiler, emulator for JavaScript logic when required, assembler CPU instructions used otherwise
  67. Access to ALL CPU instructions using JavaScript syntax R0 = 12;  R0 << 2;  if (! overflow)  a = R0;
  68. Math Expressions and Equations
  69. Chemical Expressions and Equations
  70. System Objects:  World, Global, Local,User,Array,Date,String,Number,Math,Devices,Network,File,Folder,Matrix,Font,Form,Graphic (vector, surface),Image,Person, Place,Thing,Idea,classified objects,  employee=person{}; contractor = employee{contractor:true}, Units,Chemical,Art,Music,Equations (math, chemical),Expressions (math, chemical)
  71. Aggregate functions (sum, average, minimum, maximum, count, frequency,...)  a = average(employees.(children).payrate)
  72. Hierarchical search  (term based: (mother, father, brother, sister, aunt,...) (company, division, department,...)  a = this.(brother.oldest)
  73. Network Objects (node based: Interstate-10 entrance ramps)  I10.wirt road.entrance.east bound.flow = 1605 average cars per hour;
  74. Connectivity Objects (junction based: transformer to transformer)  a = houston.(transformer=134529).amperage load per day;
  75. Segmented Objects (by value: i.e. year, month, age, company, ...)  a = Invoices.2017.July;
  76. In-line data types (a = b~integer) (a = b~real) (a = b~wholenumber) (a = b~text)  (used for assembler coding - run-time and compile-time resolved)
  77. asynchronous function calls (performs result assignment and re-continues to next statement when function finishes)
    1. Wait Until Done b = a.wait();   (blocked execution)
    2. Return When Done  b = a.return(); (unblocked execution)
  78. Music orchestras and scores programming
  79. Compile-able objects  a = {*  ... *}  (a cg2 formatted string that attaches to a known or unknown term)
  80. include JavaScript (browser's) <script> ... </script>
  81. optional "then" in an if statement  if (A) then ...  else ...
  82. inline include statements,  include "./apple.js";
  83. conditional compile  #if  #define  #end  #else  #then
  84. "alert" displays objects in a tree view
  85. function trace events  compiler~onfunctionenter = myOnFunctionEnter;  compiler~onfunctionexit = myOnFunctionExit
  86. trace logging log('enter function', functionName);
  87. Jane emulation with complete access to DOM model
  88. sub-functions in prototype of constructor
  89. sub-object for events and n-dimensional objects
  90. actionable objects   a = count:{ files:{*.js}, type='function' }
  91. "switch" statement with mini-function case evaluation,   case 1,2,3:  case in A:...  case >=0 && <=10 && ! (5,7) :...  case like "A*" && ! like ("Apple*") :
  92. "search" statement,  search (file:{"test.htm"}) { case "<" ...">": alert(result);  continue; }
  93. "exit" statement,  bypass call stack and clear all memory usage
  94. "process" statement,  exit executable code to update DOM model, then return
  95. "thread" create alternate process threads (simulated) run during "process" a statement ( really an event "onprocess")
  96. cascade assignments,  A~units = feet;   A.B = 10;  (A.B = 10 feet)    A~units=meters;  (A.B = 3.048 meters)
  97. singular / plurals  count = 5;  a = "{{count}} {{row^s^count}} were affected".eval;   5 rows were affected
  98. integrated system commands  delete files:{jc://*.jpg}
  99. nested Logicals  define jc = "user$current://projects/compiler/"
  100. compare operators A ==? B (ignore case with trim) A ==?? B (without trim) <?, <=?, >?, >=?, ==?, ===?    A ==# B (numeric compare) <# <=#, >#, >=#, ==#, ===#
  101. other compare operator in? like? in# like# also as function call A.sort#();
  102. switch numeric range case 1-100:
  103. replace ternary with a "condition" statement,  a = condition (A) a,b,c; (neg, 0, pos)  or a = condition (A) then a else b;  or b = condition (A) 1,5; (true / false) (optional then and else)
  104. compiler directives #A = 123;  #language='JavaScript';  instructions to the compiler and are also available at run-time
  105. #if and #end statements, conditional compilation (global) #A = 1; #if A;  alert(#A);  #end; not case sensitive and used by the compiler #language='JavaScript' and at runtime alert(#language);
  106. macro statement @a alert("%p1%"); a@;  a('clif');  may not be needed;  the assembler and other subsystems might require it for speed at the hardware level or for development speed
  107. language dependent statement for the management of "JavaScript" and "JC"  //~jane~ #language=JavaScript  treats source code as JavaScript until changed
  108. allow try finally without a catch, permit any order of catch finally
  109. visualization of program structure for determination of nesting relationships during debugger, performance analysis and program layout. Might be useful for error reporting
  110. 8 byte integers (12, 16, 24, 32,.. byte integers). 4 byte value (signed) followed by 1 or more low order 4 byte integers (unsigned)  value = 132`0xFFFFFFFF  or x = 132; y = 4562; z=9005; value = x`y`z
  111. assembler registers A-M, a-m (skip L)  Uppercase = Signed integer, Lowercase = Unsigned integers, Suffixed with byte length 1-8, or H as in AH, BH, CH, DH, def length = 8  A = 132`0xFFFFF
  112. assembler bits register subrange A[61:63] bit 61 to 63 of register "A" a 64 bit register
  113. assembler keywords StackPointer, BasePointer, StackIndex, DataIndex, Flags, Carry, Zero, Parity, Overflow, Adjust, Direction, Identification, AllRegisters , CPUID, CR0, DB0,  X0 - X15 (xmm0 to xmm15)
  114. CPUID types: Processor, Vendor, Cache, SerialNumber, Thread, Features, Brand, L1, L2, Power, Address, AMD
  115. Externalize hardware registers CR, MS, DR, TR, DTR,...:  Registers.cpu[0], Registers.controls[0].protected,... Registers.debugs.breakpoints[0],... , Registers.feature.longModeEnabled,...
  116. extended math, 80bit floating point, 128 bit integers, infinite byte integers, BCD
  117. assembler register and JavaScript values in same expression, (values are automatically mapped to byte storage)  myValue = 167;  B4 = 4;  A4 = myValue * B4; alert(A2);
  118. machine independent numbering systems, 8 bit to 512 bit machine instructions same result, whole number, float, and fixed decimal numbers, variable length numbers (characters)
  119. #12,000.00 or $5,400.00 CR number format, also 24 currency symbols, dollars, yen, pound sterling,...  allows commas, variable sensitive place holder; thousands (comma)  A=45;   B=19;  C = #A,B.00;     C = 45,019.00
  120. distinction between INTEGERS and WHOLE NUMBERS  (A = -34 Integer, B = 56 whole number C = A + B (integer), independent of value, can it go negative?: Yes in this case, so integer
  121. number representation are now variable length, 0 to infinity digits, as well as strings, dates and floating points
  122. track constants A = 34 (constant whole number) , A = -34 (constant integer)
  123. dual access Objects, provide name and numeric access to Object properties  A = { name.3: "clif' }    alert(A[3] + ' = ' + A.name);  default = sort order dependent, (maybe get rid of "Array")
  124. numeric bits access  J = 127;  A = J[7:8] ;  J[9:12] = 3;  alert,hex(A); 0x7F   alert.hex(J);  0xE7F  (see also: constants and masks, items 53 & 54)
  125. logical assembler coding.  overcomes all hardware implementation limitations and logic  mov al, xmm0  forces a 64 bit register into an 8 bit register or any other not implemented hardware task, use a logical task
  126. optimation reporting, stupid human reporting of alternate / optimized solutions
  127. Object externalized name modification tagging.  A method to determine run-time name resolution as being static or dynamic (99.99% is static, the 0.01% forcing 100% run-time name resolution)
  128. infinite fixed bit size number array,  a = number~64bits:[ 1,2,3,4 ];  a[5] = 34; b = integer~1byte:[ -45, 56 ]; b[1] = 65;
  129. infinite size bit character array, a = text~32bit:[ 'Clif' ];  alert(a[0]);  C   alert.number(a[0])  68
  130. logical numbers not physical (i.e. 64bits), by default "Jane" numbers have infinite length, infinite precision but can also be defined as any fixed bit size  a = number~19bits;  b = number~7bytes
  131. "having the ability"  the concept of including actions that are both known and unknown to the compiler
  132. file and url units  a = "c:/temp/HelloWorld.tmp" file;  alert(a);  displays the content of the file.
Suggestions for future enhancements
  1. extending the programming character set  ∑√∫∡∠⎾⏌⦅⦆⦃⦄∞⇦⇧⇨⇩∓℄∈∃≅⌆⌁⌱⍾♪♫
  2. case insensitive
  3. no reserved keywords
  4. Intelligent search / replace / extract  A = B next line;  A = B[0:"A"]; C = B[*:next line,...];
  5. natural language Assembler,  if (carry)  jump to A
  6. multiple function entry points   A.apples(a,b,c);
  7. function having an object constructor A.new(d);  A();  (global bind)
  8. N dimensional object values  (currently one name, one value) (I want one name, multiple values / multiple names)
  9. singulars and plurals