Name: Anonymous 2007-12-20 22:59
Programming language design.
Temporary name: Æ
0: Comments
1: Real Variable
Can only be integer pointers.
Starts with a character or underline, can continue with everything among [a-zA-Z0-9_æøåäöüëâôûêáóúéàòùèçþ®ßðЪºetc.], generally no line-noise except _.
Are defined as this:
global_variable = 3905671;
2: Variables
Starts with $. Creates a real variable with the variable name specified prefixed with v_.
The name can contain everything a real variable can continue with.
Data types are per default whatever you use them as.
3: Keywords:
Starts with a %.
Is not a real variable.
Generally the same with %do, %while, %goto, %foreach, %static, etc. as with other languages.
%private for a variable or label that should be inaccessible to the outside.
4: Functions
Starts with !. Creates a real variable with the function name prefixed by f_. The name can contain the same as variable. f_functionName is a pointer to where the function is defined in memory. If you give it an argument a variable local to that function named v_1 will point to the location in memory where the argument existed. You can rename the variables by defining the function as !func($var_1, $var_2, $_etc).
5: Labels
Generally just the same as functions.
6: Variable searching order.
When attempting to access the variables it first searches local real variables, local variables, global real variables, and global variables in that order. Same with functions.
You can also execute !label directly with !func.!label, but this would have resulted in an error because $i wouldn't have existed.
Etc.
7: Self-modifying code.
$f_func[0] could refer either to the first line, or if the first line is a code block
(as delimited by { and } when not using code layout to controll them), the whole first block
(from which you can select individual lines from again with $f_func[0][0])
Example:
Replace the !main function in the example in section 5 with this:
Should print:
8: Misc.
9: And so?
A) Expand with objects, quajects, inline-assembly, superoptimizing compilers, a ton of libraries, etc.
B) Write kernel that uses live code synthesis for lightspeed performance.
C) Be hailed as the person who freed computers from their prevoius speed limits.
D) Watch as a self-modifying AI takes over and destroys the world.
E) ???
Æ) Profit!
10:
Influences: C, Assembly, Perl, Haskell
Explaination for potential suckage: I'm 18 years old and have absolutely no education.
11:
Discuss.
Temporary name: Æ
0: Comments
# Comment
// Comment
/* Comment */
#include <stdio.Æh> // Preprocessor, include normal function such as print, etc.
// Code layout is similar to haskell. Code here includes {, }, and ; for no reason.1: Real Variable
Can only be integer pointers.
Starts with a character or underline, can continue with everything among [a-zA-Z0-9_æøåäöüëâôûêáóúéàòùèçþ®ßðЪºetc.], generally no line-noise except _.
Are defined as this:
global_variable = 3905671;
2: Variables
Starts with $. Creates a real variable with the variable name specified prefixed with v_.
The name can contain everything a real variable can continue with.
Data types are per default whatever you use them as.
$var = "Hello there."; // v_var == <location to 'db "Hello there.", 00h' in memory>
$var = 19; // v_var == <Location to where 19 is stored in memory>;
$var = (19, "Hullo"); // A linked list, v_var is a pointer to the first element, or something like that.
$var = [19, 2 => 20]; // An associative array.
$var = { ++$i; } // Compiled machine code.
// and so on.
v_var2 = v_var;
$var2 = "sadf"; // $var == "sadf";
$var1 = "lulz";
$var2 = $var1;
$var2 = "Hey"; // $var1 == "lulz"3: Keywords:
Starts with a %.
Is not a real variable.
%if ($i == u) {
// Code
} %elseif (%isset $whatever) {
// code
} %else {
// Code
};Generally the same with %do, %while, %goto, %foreach, %static, etc. as with other languages.
%private for a variable or label that should be inaccessible to the outside.
4: Functions
Starts with !. Creates a real variable with the function name prefixed by f_. The name can contain the same as variable. f_functionName is a pointer to where the function is defined in memory. If you give it an argument a variable local to that function named v_1 will point to the location in memory where the argument existed. You can rename the variables by defining the function as !func($var_1, $var_2, $_etc).
!function = {
!print $1;
%return;
}
%void !func($string) = {
!print $string;
!print "The second variable is contains: " ++ $2 ++ " and is located at " ++ !i2s v_2 ++ "\n"
%return;
}
%string !i2s(%int $int) {
// Code for converting an integer into a character array
%return $string;
}
%int !main = {
!function "Hello, world!\n";
!func "Hello again, world!\n", "lulz";
%return 0;
}5: Labels
Generally just the same as functions.
!func(%int $i) = {
!label = {
!print i2s($i) ++ "\n"
}
--$i;
%if ($i != 0) {
%goto f_label;
}
%return;
}
!main = { !func 10; %return; }6: Variable searching order.
When attempting to access the variables it first searches local real variables, local variables, global real variables, and global variables in that order. Same with functions.
//You can access the above function as a string of bytecode thusly:
!print !escape $f_func;
//The first line of it:
!print !escape $f_func[0];
//The contents of the label !label:
!print !escape $f_func[label];
//First line of !label:
!print !escape $f_func[label][0];You can also execute !label directly with !func.!label, but this would have resulted in an error because $i wouldn't have existed.
Etc.
7: Self-modifying code.
$f_func[0] could refer either to the first line, or if the first line is a code block
(as delimited by { and } when not using code layout to controll them), the whole first block
(from which you can select individual lines from again with $f_func[0][0])
Example:
Replace the !main function in the example in section 5 with this:
!main = {
!func 2;
$f_func[1] = { ++$i; }
!func -2;
}Should print:
2
1
-2
-18: Misc.
!main = {
!multithread f_func1 f_func2;
// Inline functions:
$result = !{$1 = "<b>" ++ $1 ++ "</b>"; return $1; } "Useless...";
}9: And so?
A) Expand with objects, quajects, inline-assembly, superoptimizing compilers, a ton of libraries, etc.
B) Write kernel that uses live code synthesis for lightspeed performance.
C) Be hailed as the person who freed computers from their prevoius speed limits.
D) Watch as a self-modifying AI takes over and destroys the world.
E) ???
Æ) Profit!
10:
Influences: C, Assembly, Perl, Haskell
Explaination for potential suckage: I'm 18 years old and have absolutely no education.
11:
Discuss.