From 7f31e86eec2aa7c2771414f04371510823578730 Mon Sep 17 00:00:00 2001 From: zongor Date: Sat, 20 Jul 2024 14:27:59 -0400 Subject: [PATCH] Update SPECIFICATION.MD --- SPECIFICATION.MD | 83 +++++++++++++++++++----------------------------- 1 file changed, 33 insertions(+), 50 deletions(-) diff --git a/SPECIFICATION.MD b/SPECIFICATION.MD index 27fdf1b..897a831 100644 --- a/SPECIFICATION.MD +++ b/SPECIFICATION.MD @@ -1,8 +1,22 @@ -# *zwl* (zongors world language) Design parameters, for *zwm* (zongors world machine) +# *zwl* (zongors world language) Design parameters -## Modern programming languages in the 21st century usually have need for the following requirements +## What is *zwl*? -### Data +*zwl* is an esoteric programming language that is trying way too hard to be a serious programming language. + +It is inspired by both [esoteric programming languages](https://esolangs.org/wiki/Esoteric_programming_language), like [var'aq](https://web.archive.org/web/20091026213516/http://geocities.com/connorbd/varaq/), [uiua](https://www.uiua.org/), and [ZOMBIE](https://web.archive.org/web/20201125123312/https://www.dangermouse.net/esoteric/zombie.html) and serious programming languages like C, Perl, Common Lisp, Lua, Rust, Go, Odin, Zig, Elixir, and Haskell. + +## What are the features in *zwl*? + +In general the paradigms are designed to be: var'aq-like, Interpreted, Distributed, Concurrent, and have an option to be JIT. + +## What is the purpose of this language? + +*zwl* acts as the assembly language for *zwm*. it allows for a user to manipulate the world machine. + +# Modern programming languages in the 21st century usually have need for the following requirements + +## Data - describing data - numeric @@ -19,7 +33,7 @@ - measurements - tons of these... -### Inputing data +## Inputing data - stdio - program args @@ -30,7 +44,7 @@ - forms - many others -### Storing descriptions of data +## Storing descriptions of data - internal - graph @@ -50,7 +64,7 @@ - tape - socket -### Manipulating data +## Manipulating data - algorithms - sort @@ -65,7 +79,7 @@ - constraints - formulas -### Displaying data +## Displaying data - objects - 3d models @@ -76,7 +90,7 @@ - written output - ai generated text -### System/World Objects +## System/World Objects - Viewing objects in nth dimensional space - Animations @@ -85,7 +99,7 @@ - Interaction from user input on objects in space - Creating -### Communication +## Communication - Sending and receiving data - protocols @@ -100,13 +114,13 @@ - keys - more ... -### Meta +## Meta - documentation - tutorials - generating objects automatically like -### Data Description +## Data Description - windowing system - window @@ -130,12 +144,6 @@ - read - update - delete - - -# *zwl* at a high level. - -zwl should be thought of as more of a scripting language for virtual machine more than a programming language that is compiled. - # *zwl* Grammar and Specification @@ -147,40 +155,15 @@ zwl should be thought of as more of a scripting language for virtual machine mor - there are also a list of "substantial forms" which come with the language which are the building blocks for more complex forms. If you are coming from object oriented languages you can think of this as "primitive types" - all forms derive from the root form or the "parent of all forms" -All substantial forms are "fat pointers" like in [Cello](https://www.libcello.org/). and have the following structure (here I will use a psudo C as an example): - -```c -typedef enum error_e { - none, // no error - bound, // array out of bounds error - … -} error; - -typedef enum type_e { - u8, - u16, - … -} type; - - -typedef struct type_s { - size_t sz; // size/length of the pointer - error err; // the error on the form (default is none) - void *ptr; -} frm; ``` - -So as you can see each type includes some extra information, its type, if it has an error, the length, and the 'real' pointer to the value. - -``` -frm «form_token» impls «this_form», «that_form» { - version; ! version number for auto saving to a database or whatnot - migrate; ! this is to migrate from the previous version to new, in case of interface changes, or None - dimensions; ! this returns how many dimensions it can exist in, 0th means non drawable, 2 means 2D GUI usually, 3 means 3D object, and >3 is somthing you will have to implement yourself, e.g. miegakure - unit; ! this is for the unit/measures system - display; ! some kind of UI form or None - position; ! a position in space or None -} +~ «form_token» { + «version» ! version number for auto saving to a database or whatnot + «migrate» ! this is to migrate from the previous version to new, in case of interface changes, or None + «dimensions» ! this returns how many dimensions it can exist in, 0th means non drawable, 2 means 2D GUI usually, 3 means 3D object, and >3 is somthing you will have to implement yourself, e.g. miegakure + «unit» ! this is for the unit/measures system + «display» ! some kind of UI form or None + «position» ! a position in space or None +} frmdef ``` # Substantial Forms