Please read the disclaimer at the bottom, since I don’t have the money or power to get a grant for ANYTHING.
** If you’re going to use this for any reason, like building a compiler (difficult for most of people), or something else of more value than personal use, then at least give me credit.
Similar to C++, this self-programmable language contains scripting elements that can compile or create other languages.
It might (and who wouldn’t emphasize “might”) be the most advanced, most constructive (and really powerful) programming language available.
It might also be the fastest to learn, since it’s closer to spoken language,
though it is still flexible at a low level.
Programming can make you a nerd, so let the compiler do the work, instead;
so you don’t need to put in the same stuff, over, and over.......
-- putting a compiler with this self-programmable language on idle, and you could generate
an A.I.
(artificial intelligence)
Some symbols on this page may not show up correctly due to the limitation on the number of mathematical symbols HTML has.
Names with an asterisk (*) mean that they are not optional or existent in C.
There may be more names that aren’t applicable to other languages.
“Bare” structures are the results of leaving out the brackets, and in simplifying the whole equation, it bends the rules.
This language is heavily object-oriented, so everything has no non-specific order.
Putting an identifier before a structure or an identifier that holds the type of a structure
would force the compiled program to translate every entry within the structure to fit.
-- excellent for converting endian formats between platforms
Functions, Macros, and Commands, all are parsed in a run-on fashion,
using identifiers to form, what is called, “glue,” taking every word,
as it comes, and acting differently only on the defined concepts.
Every symbol has it’s own mathematical significance.
Brackets are not needed in commands, just as long as the “end” identifier is found on the
ending line. The name of the label is also allowed.
Sample- Example code: (whatever)
int initialize() { if (something) { loop { -- code whatever(something); } until something; -[ the brackets are not needed for routines that have only one line ]- loop until something } -- code } function int main() -- the term “function” is needed for Bare functions -- (the English term for routines or functions that end with the English term “end”) if (this) then -- “then” is required loop until something for -- again, specific commands, like, -- loops and conditionals require the English terms that set up -- where the brackets left off are required for Bare functions end loop; -- “loop” is not needed, but it helps the user know what’s end ing end if; -- “if” is also not needed whatever(); end main; -- the label “main” isn’t needed, but allowed if it matches a relative name -- another relative name, that can be used in main’s place, is “function” -- neither brackets nor “end” is needed for routines that have only one line function int whatever(done.b) -[ more code ]-;
See the resemblance to HyperTalk? Well, HyperTalk can be compiled by replacing and ignoring certain identifiers, like, telling the compiler that the semi-colon (;) is now the “end of line”, and ignoring “loop”.
struct the_sound (global FLAGS.stereo) ? {left.channel, right.channel} : {mono.channel};
Putting a number in parenthesis directly after a structure name within the definition
sets the size of the structure, in bytes. If the structure definition is not byte
aligned, then the packed contents is shifted to the right to force alignment. Size
definitions are required if the definition of the structure, itself, is not available.
This can be done using the import command:
import name(size)
Here’s the list of all of ’em:
(text) | |
c, char, character u, unicode |
acts as a compiler defined character, but understood as a part of text |
(integer) | |
b, byte | 8 bits, self aligned |
i, int, integer | compiler defined size |
h, halfword, short | at least 16 bits (compiler defined) |
w, word, long | at least 32 bits (compiler defined) |
d, doubleword | at least 64 bits |
q, quadword | at least 128 bits |
o, octaword | at least 256 bits |
(floating point) | |
f, float | at least 32 bits |
x, double, extended | usually either 64 or 80 bits |
l, long float | at least 96 |
bs, ps, pstring | 1-byte length string -- local size.b = sizeof(string), string.b[] |
cs, cstring | null termination length -- terminator '\0' text.b[] |
ws, wstring | 2-byte length -- local size.h, string.b[size] |
String Concatenation
Like in Java, the plus character (+) concatenates strings -- but in a low-level approach.
The default numeric type can be set using the “numeric” directive
prefixed | |
# or d | Decimal (default) |
$ or 0x or h | Hexadecimal |
0 (zero) or o | Octal |
% or b | *Binary |
'..' | Literal |
post fixed | |
d | *Decimal |
h | *Hexadecimal |
o | *Octal |
(preferenced) | |
f | Floating Point |
l | Long Extended |
u | Unsigned |
(high level - case sensitive) | |
K | Kilo (*1e+3) or (<<10) depending on type |
M | Mega (*1e+6) or (<<20) " " |
G | Giga (*1e+9) or (<<30) " " |
T | Terra (*1e+12) or (<<40) " " |
Q | Quadr (*1e+15) or (<<50) " " |
m | milli- (/1e-3) |
µ | micro- (/1e-6) -- this is a “token” |
n | nano- (/1e-9) |
p | pico- (/1e-12) |
Examples:
32456ULmeans a unsigned 32 bit integer “32456” but if the “L” wouldn’t be there then the value may be recognized as a 16 bit integer (because it is within the range of -32768 and 32767).
(scale methodizing)
byte store[5M]is five megabytes for “store” -- whew.
farads[5p]if the size does not refer to a byte size, then it’s toward a three zero magnitude
88 = d88 = 88d = #88 = 0x58 = 58h = $58 = h58 = b1011000 = 1011000b = %0101 1000 = 0130 = o130 = 130o
A symbol before an identifier changes it’s value within the expression,
but if the symbol comes after it, then the value of the identifier gets affected afterward.
Trailing single
arithmetic self modifiers
- | Negate | |
+ | *Absolute Value | Takes the negative sign off if existing
(does nothing on unsigned values) |
NOTE: unlike C, self expressions change themselves in post modifying mode
Examples:
~x; the bits in “x” are inverted
...1+(y-) ... Negates ‘y’ after the rest of the expression is evaluated
...x+(y+) ... ‘y’ becomes it’s absolute value after it’s current value is evaluated in the expression
Leading single
boolean | ||
! | Not | sets to non zero if zero and vice versa |
binary | ||
~ | Not | inverts all bits in the expression |
# | *Count | retrieves a fundamental count -- can use plural names! |
addressing | ||
& | Effective address | |
@ | *At Index | a temporary index of an array |
Temporary indexing eliminates the tiresome method of having to recreate a pointer for an array, time, after time. While a variable pointer only uses the stack or one of the few registers available, “At” indices try to use all they can, since they’re temporary
WARNING: “At” temporary pointers get destroyed once they’ve become irrelevant.
Example:periodic_element mixture[5] -- five maximum @mixture = 1; -- sets the temporary index pointer to 1 -- this destroys “@mixture” periodic_element *index = &mixture;
arithmetic | ||
- | Subtract | |
+ | Add | |
* or n(...) or 2π | Multiply | Only tokens can be used in the third method. |
** | Power | (available in other languages) |
/ | Divide | |
// | Section | |
% | Division Remainder or Modulus | |
:: | *Base magnitude | Returns the magnitude (or number of digits) of a value according to the base given. The equivalent of a truncated logarithm. |
boolean | ||
&& | And | non zero only if both |
|| | Or | non zero if either |
^^ | non zero if only one of either | |
(comparison) | ||
< | Less than | |
> | Greater than than | |
<= or ≤ | Less than or equal | |
>= or ≥ | Greater than or equal | |
!= or <> or ≠ | Unequal or Not equal | |
binary | ||
| | Or | Each bit set to whether any is set at the index |
& | And | Each set to whether both at the index are set |
^ | Exclusive Or | Each set to whether only one out of both at the index are set |
~ | Exchange | Exchanges two containers |
~+ | Add and Clip | Adds a mask (the second operand), then clips the value by setting the bits of that value, given the mask, to zero |
&^ | *Bit Mask | each bit specified by the gate bits (one affects that bit but zero doesn’t) |
x &^ y : 0x1D -- Only ones in 0x1D (11101 in binary) get set to the value of the -- according bits in “y” for the value within the expression
<< | Shift Left/Up | The bits within storage are shifted away from the “low” end and clipped, clearing the void |
>> | Shift Right/Down | The bits within the container are shifted toward the low end and clipped leaving the most significant bit value filling the void (clears void if unsigned) |
<~ | *Rotate Left/Up | The bits within the container are shifted through the most significant bit and regained at the opposite end |
~> | *Rotate Right/Down | Same as “Rotate Left” but in the opposite direction |
+= | Add to |
-= | Subtract from |
~= | Inverse AND - same as “... &= ~(...)” |
.... |
NOTE: incrementing, decrementing, squaring are really a self modifier without an expression, filling in the gap with either one or two (depending on whether it would do anything).
Examples:
x+=; -- adds 1 to “x” by 1 y*=; -- Squares “y” y = =+x; -- adds 1 to “x” after setting “y” to “x” (notice the symbol’s in reverse)
indirection variable Pointer with address increment (similar to assembly)
-- Must have the pointer variable in parenthesis
Post increment
NOTE: different sizes can be used by attaching a type record, such as “*(aptr.h)+” The Effective address symbol can also be used with it (&*(aptr)+)
*aptr+= adds 1 to the value at address aptr
Pointers or arrays modify the index of it:
@color- negates the index, which results in the index subtracting from the opposite end
currency bills[1...4]; -- four bills of different value @bills = 1; -- sets the index to the first @bills-; -- flips it around to wind up at 4 *index+; -- will correct the pointer if it is out of bounds
NOTE: “overflow +aptr” will return a boolean on whether it is bad pointer
Old fashioned Structure
struct(bare)
{
...
size object:width, object:width....
...
}
struct structurename .... object:width, object:width....
NOTE: a “U” or an “S” before the number represents the sign
(the default is usually unsigned)
Expressional
object{offset:width}
Examples:
struct hex hi:u4, lo:u4; -- Splits whatever container that is defined as a “hex” into two unsigned four bit parts (or nybbles) z = y+x{1:3}; -- Takes the bits after the first within the “x” container. -- An error will occur if the specified field is too large, has a negative field width, or does not exist.
Structured
[count] a count (indexed at 0)
[a..b] from a to b (from Pascal)
if ‘a’ is zero, then the array will act as a single count
[xxx][xxx] matrix
Definition
{a,b,c...,z} entries to make up the storage
NOTE: unlike C, arrays can be put on bit fields and register variables
Numbered Record
For multiple names within a structure
Sample (from the HyperCard stack format):
stackFormat.h = enum { invalid, preRelease.1 .. version.1 = 8, preRelease.2, version.2 = 10 .. newer }; myFormat.h = strict -- `strict' inhibits the usage of the following terms in other means enum { who_knows, whocares, get_away };
-- or // | to the end of the line (!!) |
-[ ... ]- or -] | extended comment |
Sample macro code for square root:The “with” parameter (1<<(s::)/2) means the result starts with a bit magnitude of half the scale of the input. The “ratio 2” means that the result is only affected by the code by one half. And the “until +delta≤1” means that the positive (absolute value) difference calculated of each result must be at most one fraction.loop with (1<<(s::)/2) ratio 2 (s/result) until +delta≤1;
Putting objects within brackets after an identifier (with the exception of structure and union definitions) means that whatever objects that are in the space between the brackets are of property of the identifier.
For example:stuff_in_my_pocket { copper coin; plastic button; }“copper coin” and “plastic button” are now properties of “stuff_in_my_pocket”.
Because “coin” is set up only with “stuff_in_my_pocket copper”, “coin” is not defined by itself. Because of this, “coin” by itself is yet unrecognized, and not a property of “stuff_in_my_pocket”; neither is “button”, for the same reason.
Putting a colon after an ‘enum’ instead of brackets means that the names that follow represent a structure field as an unlimited sized integer, only going from bottom to top. In other words, it’s enumeration that represent values of a power of two.
For example:ThingFlags enum: something, another;‘something’ points to the least significant bit of ‘ThingFlags’ (bit zero), and ‘another’ to bit one.
Using only symbol that represents comparison (a.k.a inequality) act in the condition for which that symbol would act toward the previous expression.
For example:if (3<4) doThat(); if (>) doThis(); return (a==b) ? 0 : ((>) ? 1 : -1); b = a, positive = (>); -- comparison with zero
Putting a type after a variable creates a keyword, and the parameter setup becomes more flexible.
For example:-- (somewhere along the text, maybe in a header) typedef tablespoon Fixed32; -- ‘Fixed32’ is already defined as 32:32 bits for highaccuracyprecision fixed point values int water(amount tablespoons); -- plural names are acceptable void fill_it_up() { water(amount 3); water(amount 3 tablespoons); -- the same as (tablespoons)3 or tablespoons(3) }
command routines
if or do..if
(high level - can be used in structures and macros)loop or repeat or do..[condition]
These are predefined in the language, and are temporarily removeable.
structure elements
ignore or unused or unknown
align
full | to specify that all bits in the container must be set |
half | to specify that a boolean must have at least half of the bits set -- for the possibility of data corruption |
head or header | to declare that it is a header |
tail | to declare that it goes at the end of a structure |
trail | to specify that the symbol goes after the object |
group | putting multiple objects into one |
stacked | everything is on the stack |
auto | certain objects, especially the stack, get automatically reset |
reverse | orders stack parameters in reverse direction
the C modifier “pascal” would be the equivalent of “stacked auto reverse” |
macro | Sets up parameters for an op code, or series of op codes, that require more than parameters getting pushed onto the stack. Uses reusable temporary stack space |
label | Names a macro with a string (can have spaces) for reference. Text after the first semi-colon within the text (;) is interpreted as a comment |
dim or dimension | as in, co-ordinates |
size | is the size of the near individual - can be pointed elsewhere |
offset | sets the amount of an element until a point
Can also set a point within a structure |
magnitude | for both scale and floating point architecture |
frac or fraction | for both integer and floating point architecture -- either [-1.0,1.0] or [0,1.0) |
angle | keeps the value within the modulus |
token | privileged symbol, like ‘µ’ for micro- |
signature | a literal can define a structure! |
univ or universal | from Pascal |
alt or alternative | instead of having to use typedefs all of the time |
pack | to force certain commands like switch to use a bitfield lookup table |
Can go on to make.... | |
terminator | sized identifying termination |
coherency | how much is understood or not broken up |
failsafe | in case of error or unwanted hackers |
compressor | compression format or high level technology |
protector | protection format or high level technology |
lut | look up table format - so you don’t have to manually calculate each one |
parser | exactly that |
randomizer | (ditto) |
(etc.) |
-- you can keep adding more, and more until your hard drive and memory space fills
and no more having to build functions for simple operations; let the compiler do it.
Format definitions can be inlined for debugging or compression
(maybe be done automatically by the compiler)
elem or element or fundamental | class warfare!! -- no, identifier |
none | no element -- must be defined to be used |
all, each | glue |
for, with or using or given | “loop” and “macro” glue |
error, delta or δ | math |
index | |
first | index to an array -- DUH |
last | (ditto) |
next | index to array and/or loop iteration |
ptr, pointer, handle, handler | also accessible by using the “class”
function
(so you don’t have to look at the header files to know what the- |
ratio, from, to, while, until | for the “loop” command - one liner? Easy!
an “element” defined loop depends on the size of the element |
leading | (identifies from “lead”) |
trailing | (identifies from “trail”) |
heading | (identifies from a header) |
failure | in response of a function |
overflow or clipped | |
protected | goes beyond a “const” at protecting data |
scanned | |
endian | endian byte order |
BCD | Binary Coded Decimal (case sensitive) |
cherished | okay... maybe I’m going too far |
NOTE: Relative Attributes that aren’t defined to the compiler can’t
be acted upon, but can still
be used as identifiers.
Example:
float width x, height y; -- ‘width’ and ‘height’ are not recognized, but they are still parsed without error -- assuming they are to seperate their types from other variables float x; x = thing.x; -- this will generate a warning, due to the fact that -- x is defined to be only a ‘float’, and not a ‘width float’
high level single array functions
(using the “loop” command)
largest() or max() | |
smallest() or min() | Identifiers: lowest, highest |
pin() | to keep the middle value within boundaries |
arithmetic standard | |
product() | |
sum() | |
mean() or average() | (sum/count) |
median() | middle number (or average of the remaining middle numbers) |
mode() | most occurring (or average of the same most occurring) |
lcd() | lowest common denominator |
factors() | builds an array of the prime factors of a number or returns an index in ascending specific order |
find() | |
restore() | |
random() | aren’t “randomizers” fun? |
(already existing) | |
---|---|
define or substitute: | to name a label to that gets replaced with a certain text |
undef or rid: | to delete a define’d label, if it exists |
insert file, import, or include: | to add text of another file to the file in memory |
pragma: | compiler specific settings |
if, else, endif, elif, elseif: | conditionals |
ifdef, ifndef: | “define” conditionals |
(errors and warnings, usually used with conditional macros) | |
error: | gives an error at compilation time |
obsolete, warning: | gives a warning at compilation time for whatever reason |
(new) | |
concept: | the fundamental magic of this whole language
uses compiler-native op-codes to generate new format defined attributes and is really hectic if you don’t have much patience |
plural: | defines the only plural name or a list of names for an identifier |
Example: #plural mouse mice
-- “mouses” no longer works since it’s not in the list of new plural names | |
ignore or disable: |
disable a term or directive |
revive or enable: | enable a previously disabled term or directive |
numeric: | parameters for either a base number or a concept |
preprocessed functions and constants
defined() exists() sizeof() offset() class() __option() __FILE__ __LINE__ __TIME__ __DATE__ __RESULT__ file
Expressions
singular
dual
indirection
temporary pointer
Previous Expression Comparison
Special
command routines
format defined attributes
relative attributes
high level single array functions
preprocessed directives
DISCLAIMER
This programming language is based on C, and contains elements of other languages,
such as Java, Pascal, HyperTalk, and Visual Basic.
I have no known connection to anybody that developed any programming languages,
which includes the ones previously mentioned.
This text and any software generated for it is made out of will and convenience
in the public domain.
This comes without a warranty, copyright or patent, and is non-profit. Neither
I nor mentioned companies or entities are responsible for any actions, opinions,
damage this file or related software may cause.
THE USER IS SOLELY RESPONSIBLE FOR DAMAGE CREATED BY USE OR MISUSE OF THIS FILE
OR RELATED SOFTWARE. USE AT YOUR OWN RISK.
HyperTalk is the language of HyperCard, a registered product and trademark
of Apple Computer, Inc. ©1987-1998.
All other names may or may not be trademarks and/or registered
trademarks of their respected owners.
All Rights Reserved.
Any legitimately offensive material may be taken out on request.
I’m trying not to go out of my league.
Created: | Dec 22, 2003 |
Last Revised: | March 31, 2010 |