]> Nishi Git Mirror - gwion.git/commitdiff
:book: Update docs [skip ci]
authorfennecdjay <astor.jeremie@wanadoo.fr>
Fri, 5 Jul 2019 01:01:49 +0000 (03:01 +0200)
committerfennecdjay <astor.jeremie@wanadoo.fr>
Fri, 5 Jul 2019 01:01:49 +0000 (03:01 +0200)
18 files changed:
docs/ControlFlow/ControlFlow.mdr [deleted file]
docs/ControlFlow/Loops.mdr [deleted file]
docs/ControlFlow/Repeat.mdr [deleted file]
docs/ControlFlow/forloop.mdr [deleted file]
docs/ControlFlow/whileuntil.mdr [deleted file]
docs/Extending/WIP_Driver.mdr [deleted file]
docs/Extending/WIP_Plugins.mdr [deleted file]
docs/Functions/Lambdas.mdr [deleted file]
docs/Functions/Variadic.mdr [deleted file]
docs/Functions/function.mdr [deleted file]
docs/assets/benchmark/binary-trees.dat
docs/assets/benchmark/binary-trees.png
docs/assets/benchmark/fib-recurs.dat
docs/assets/benchmark/fib-recurs.png
docs/assets/benchmark/fib.dat
docs/assets/benchmark/fib.png
docs/assets/benchmark/method-call.dat
docs/assets/benchmark/method-call.png

diff --git a/docs/ControlFlow/ControlFlow.mdr b/docs/ControlFlow/ControlFlow.mdr
deleted file mode 100644 (file)
index 2e9c185..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-# Control Flow
-
-## Repeats
-let start simple ;-)  
diff --git a/docs/ControlFlow/Loops.mdr b/docs/ControlFlow/Loops.mdr
deleted file mode 100644 (file)
index 4b787b4..0000000
+++ /dev/null
@@ -1 +0,0 @@
-# Loops
diff --git a/docs/ControlFlow/Repeat.mdr b/docs/ControlFlow/Repeat.mdr
deleted file mode 100644 (file)
index bbfea85..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-# the Repeat keyword
-let start simple ;-)  
-The easiest way to do an action repeatidly in Gwion is, ... the **repeat** keyword!
-
-## Very basic example
-@``` repeat.gw
-repeat(3)
-   <<<"Hello, world!">>>;
-@```  
-@exec make -s CONTAINS="Hello" repeat.test
-
-## Block example
-of course this also works with a block code.
-
-@``` repeat2.gw
-repeat(3) {
-   maybe ? "You" : "Me" => string s;
-   <<<"Hello, ", s, "!">>>;
-}
-@```  
-@exec make -s CONTAINS="Hello" repeat2.test
diff --git a/docs/ControlFlow/forloop.mdr b/docs/ControlFlow/forloop.mdr
deleted file mode 100644 (file)
index 5d01609..0000000
+++ /dev/null
@@ -1,63 +0,0 @@
-# For Loops
-**For** loops in Gwion is pretty similar to classic **C** syntax
-
-## basic loops
-@``` forloop0.gw
-for(int i; i < 3; ++i)
-   <<<i>>>;
-@```  
-@exec make -s forloop0.test
-
-Of course, it also works with a block of code.
-
-@``` forloop2.gw
-for(int i; i < 3; ++i) {
-   i/2 => float f1;
-   i/2. => float f2;
-   <<<i, " " , f1, " ", f2>>>;
-}
-@```  
-@exec make -s forloop2.test
-
-## Nested Loops
-@``` forloop3.gw
-int array[3][4];
-
-for(int i; i < 3; ++i) {
-  for(int j; j < 4; ++j) {
-    <<<array[i][j]>>>;
-  }
-}
-@```  
-@exec make -s forloop3.test
-
-### Auto Loops
-
-#### Simple auto loop
-@``` forloop4.gw
-int array[2][3];
-for(auto a: array) {
-  <<<a>>>;
-  for(auto b: a)
-    <<<b>>>;
-}
-@```  
-@exec make -s forloop4.test
-
-### Auto Pointer loop
-With the simple auto loop, you only get the value in the array.  
-If you want to change it, you need a pointer 
-
-@``` forloop5.gw
-int array[2][3];
-int i;
-for(auto a: array) {
-  for(auto @b: a)
-    <<<++i => *b>>>;
-}
-for(auto a: array) {
-  for(auto @b: a)
-    <<<*b>>>;
-}
-@```  
-@exec make -s forloop5.test
diff --git a/docs/ControlFlow/whileuntil.mdr b/docs/ControlFlow/whileuntil.mdr
deleted file mode 100644 (file)
index 798b033..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-# Loops
-
-@``` while0.gw
-while(true) {
-  if(maybe)
-    break;
-  <<<"running...">>>;
-}
-@```  
-@exec make -s while0.test
-
-well this may output nothing...
-lets try
-
-@``` while1.gw
-<<<maybe>>>;
-do{
-  if(maybe)
-    break;
-  <<<"running...">>>;
-} while(true);
-@```  
-@exec make -s while1.test
diff --git a/docs/Extending/WIP_Driver.mdr b/docs/Extending/WIP_Driver.mdr
deleted file mode 100644 (file)
index 2047863..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-# Giving gwion a new driver
-
-## basics
-
-> in order to use GWION_CTL ...
-
-# concept
-
-# upd driver
diff --git a/docs/Extending/WIP_Plugins.mdr b/docs/Extending/WIP_Plugins.mdr
deleted file mode 100644 (file)
index cd1822f..0000000
+++ /dev/null
@@ -1,68 +0,0 @@
-# Writing a Gwion plugin
-
-> THIS IS OUTDATED. please look at the source code in src/lib/ instead
-
-  * [getting started]
-
-## Getting started
-use the script
-
-### headers
-```
-#include "vm.h"
-#include "instr.h"
-#include "import.h
-```
-<!-- TODO: verify this -->
-
-### Class
-Define the type:
-```
-struct Type_ t_mytype = { "MyType", SZ_INT, &t_object};
-```
-> every type extending t_object should have SZ_INT
-
-### Handling Constructors and Destructors
-#### CTOR
-```
-CTOR(mytype_ctor) {
-  /* constructor code here */
-}
-```
-#### DTOR
-```
-DTOR(mytype_dtor) {
-  /* destructor code here */
-}
-```
-
-those macros provide two variables:
-  * `o`:     the *M_Object* for the (con/des)tructor
-  * `shred`: the *VM_Shred* for the (con/des)tructor
-
-```
-CHECK_BB(import_class_begin(env, &t_mytpe, env->global_nspc, mytype_ctor, mytype_dtor))
-```
-#### variable
-declare a `m_int`. coding convention require
-  * a leading *_o*
-  * a following *_type_*
-```c
-m_int o_mytype_myvaroffset;
-```
-#### function
-```c
-/* declare a member function */
-MFUN(mytype_memberfunction) {
-  /* code here */
-}
-
-SFUN(mtype_staticfunction) {
-  /* code here */
-}
-```
-
-#### operator
-
-### Import function
-
diff --git a/docs/Functions/Lambdas.mdr b/docs/Functions/Lambdas.mdr
deleted file mode 100644 (file)
index 132fbf3..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-# Lambda
-
-## Overview
-
-Simply put, *lambda*s are anonymous functions.  
-
-The syntax to create them is simple:
-```
-\ variable0 variable1 ... {  your code here }
-```
-You can even use it to
-### Call a function just once
-@``` lambda_call0.gw
-\ i { <<<"passed '", i, "'">>>; }(3);
-@```  
-@exec make -s CONTAINS="passed '3'" lambda_call0.test
-
-
-## Use case
-
-### Passing to a function pointer
-@``` lambda_fptr0.gw
-typedef void fptr_t(int);
-\ i { <<<"passed '", i, "'">>>; } @=> fptr_t fptr;
-fptr(4);
-@```  
-@exec make -s CONTAINS="passed '4'" lambda_fptr0.test
-
-### As Argument to Functions
-@``` lambda_args0.gw
-typedef void fptr_t(int);
-fun void test(fptr_t fptr) {
-   fptr(5);
-}
-test(\ i { <<<"passed '", i, "'">>>; });
-@```  
-@exec make -s CONTAINS="passed '5'" lambda_args0.test
diff --git a/docs/Functions/Variadic.mdr b/docs/Functions/Variadic.mdr
deleted file mode 100644 (file)
index 23a7519..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-# Variadic functions
-
-> A function whoses arity is not fixed.
-
-Well, a function that takes a fixed number of arguments, and additionnal ones.
-
-## a simple example
-@``` variadic.gw
-fun void variadic_test(int i, ...) {
-  <<< "first argument is ", i >>>;
-  vararg.start;
-  <<< "\tadditionnal argument", vararg.i >>>;
-  vararg.end;
-}
-variadic_test(1);
-variadic_test(1, 2);
-variadic_test(1, 2, 3);
-@```
diff --git a/docs/Functions/function.mdr b/docs/Functions/function.mdr
deleted file mode 100644 (file)
index f92a174..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-# Functions
-
-## a simple (commented example)
-
-@``` function0.gw
-// declare function 'test_function'
-// with return type int
-// taking an int as argument
-fun int test_function(int arg) {
-  // return the argument + 2
-  return arg + 2;
-}
-
-// now call the function (and debug print the result)
-<<<test_function(0)>>>;
-// or use alternate syntax
-<<<1 => test_function>>>;
-@```
-@exec make -s function0.test
index ce3d7278c283fe602b8ddc2a38aafb6e54b45158..bc78c85447f54771492b8d0e4a61e598e3e9cf76 100644 (file)
@@ -1,3 +1,3 @@
-gwion 0.18500 0.63
-wren 0.228810 0.24
-lua 0.31364 1.10
+gwion 0.18650 0.58
+wren 0.23149 1.00
+lua 0.30273 1.31
index bafec9353609a3403260f15a9319c182cef8305c..a69a778d3b089e5364d61afa79819d55c3fc8c10 100644 (file)
Binary files a/docs/assets/benchmark/binary-trees.png and b/docs/assets/benchmark/binary-trees.png differ
index 7ea4095668ad5764cab818b37133c5bdc9347c3f..68f31f1120be0cecc215e7835c7f8fb854fe53d6 100644 (file)
@@ -1,3 +1,3 @@
-gwion 5.2990 0.37
-wren 13.4991 0.34
-lua 7.3146 0.29
+gwion 5.2823 0.38
+wren 13.4943 0.44
+lua 7.3512 0.89
index d3d56bec6ad3fed6cf4fada996cbdc7011429905..12e95df920af6015b7d3841afaf04b869b9f9d28 100644 (file)
Binary files a/docs/assets/benchmark/fib-recurs.png and b/docs/assets/benchmark/fib-recurs.png differ
index 693519bd0ddf29afffd751e8de52e2cd050cb5cb..5ca617ec0fe018c2fde1262b9f05eee090f06da2 100644 (file)
@@ -1,3 +1,3 @@
-gwion 0.085201 0.50
-wren 0.210157 0.14
-lua 0.207941 0.43
+gwion 0.084083 0.72
+wren 0.210827 0.32
+lua 0.209405 0.47
index 63a8cd6a6b229809615326c9a433fb43cec8b024..039ee7d7302fd53f936bf6bf1545931029bc3363 100644 (file)
Binary files a/docs/assets/benchmark/fib.png and b/docs/assets/benchmark/fib.png differ
index 22636cce373980c901299aba03f5744a9d9ff20a..21a3b32381c7320e6c996ac30eff4f8c1a208336 100644 (file)
@@ -1,3 +1,3 @@
-gwion 0.091161 0.26
-wren 0.107611 0.38
-lua 0.25866 1.21
+gwion 0.09491 1.85
+wren 0.11345 5.40
+lua 0.25868 1.48
index ed8d5acc4deeb07b0bc27fc6c0d5320ac2fd4731..da5d03be122aa735c1660093e9ce49de8b6fe5c5 100644 (file)
Binary files a/docs/assets/benchmark/method-call.png and b/docs/assets/benchmark/method-call.png differ