From: fennecdjay Date: Wed, 24 Jul 2019 14:41:18 +0000 (+0200) Subject: :book: Update docs X-Git-Tag: nightly~2300 X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=2078cfb4a341dc5b0b3018a7fef4eba586bd920b;p=gwion.git :book: Update docs --- diff --git a/docs/08_Contributing/03_ContributingTranslation.mdr b/docs/08_Contributing/03_ContributingTranslation.mdr index 7a9c35b8..2cd13df4 100644 --- a/docs/08_Contributing/03_ContributingTranslation.mdr +++ b/docs/08_Contributing/03_ContributingTranslation.mdr @@ -5,6 +5,10 @@ First off, thank you for considering translating gwion. Thanks to the build system, you're gonna get on tracks fast. +> You might want to export TRANSLATION_TARGET, +so you don't have to set it on the command line for commands requiring it +`export TRANSLATION_TARGET="xxx"` + ## 1) Init the translation language You have to make sure there is a directory for your target language (e.g.: fr, en, es_ES ...). @@ -16,9 +20,6 @@ make translation-init TRANSLATION_TARGET= Where `` is your language of choice. It will fail if your language already exists, but this is not a problem. -> You might want to export TRANSLATION_TARGET, -so you don't have to set it on the command line - ## 2) Edit Next, you should adjust the translations. diff --git a/docs/09_Benchmarks.md b/docs/09_Benchmarks.md deleted file mode 100644 index bc87638f..00000000 --- a/docs/09_Benchmarks.md +++ /dev/null @@ -1,238 +0,0 @@ -# Benchmarks - -We'll need a bash script - - - -### and a gnuplot script - - - -## Show the results -Then just run it -binary-trees -### binary-trees - -![](assets/benchmark/binary-trees.png) -fib -### fib - -![](assets/benchmark/fib.png) -fib-recurs -### fib-recurs - -![](assets/benchmark/fib-recurs.png) -method-call -### method-call - -![](assets/benchmark/method-call.png) diff --git a/docs/09_Benchmarks.mdr b/docs/09_Benchmarks.mdr index 92ad35c8..34a60725 100644 --- a/docs/09_Benchmarks.mdr +++ b/docs/09_Benchmarks.mdr @@ -24,7 +24,10 @@ get_list() { get_test() { for (( i=0; i<=$(( ${#language[@]} -1 )); i++ )) - do echo "${language[$i]} $(run "${language[$i]}" "${extension[$i]}" "$1")" + do + if [ -f "$test_dir/$1.${extension[$i]}" ] + then echo "${language[$i]} $(run "${language[$i]}" "${extension[$i]}" "$1")" + fi done > "docs/assets/benchmark/$1.dat" } diff --git a/docs/assets/benchmark/binary-trees.dat b/docs/assets/benchmark/binary-trees.dat index b1e8e6f5..5fbff080 100644 --- a/docs/assets/benchmark/binary-trees.dat +++ b/docs/assets/benchmark/binary-trees.dat @@ -1,3 +1,3 @@ -gwion 0.18819 0.63 -wren 0.24076 2.13 -lua 0.32172 0.82 +gwion 0.19427 0.91 +wren 0.234493 0.25 +lua 0.3426 6.66 diff --git a/docs/assets/benchmark/binary-trees.png b/docs/assets/benchmark/binary-trees.png index 26a47422..56d241a5 100644 Binary files a/docs/assets/benchmark/binary-trees.png and b/docs/assets/benchmark/binary-trees.png differ diff --git a/docs/assets/benchmark/fib-recurs.dat b/docs/assets/benchmark/fib-recurs.dat index 0d9504d6..772f9241 100644 --- a/docs/assets/benchmark/fib-recurs.dat +++ b/docs/assets/benchmark/fib-recurs.dat @@ -1,3 +1,4 @@ -gwion 5.4137 0.34 -wren 13.5268 0.22 -lua 7.2720 0.33 +gwion 5.5088 0.55 +wren 13.830 0.81 +lua 7.4549 0.33 + diff --git a/docs/assets/benchmark/fib-recurs.png b/docs/assets/benchmark/fib-recurs.png index 7b7cc503..3c054621 100644 Binary files a/docs/assets/benchmark/fib-recurs.png and b/docs/assets/benchmark/fib-recurs.png differ diff --git a/docs/assets/benchmark/fib.dat b/docs/assets/benchmark/fib.dat index 92e1c1ff..29fb524b 100644 --- a/docs/assets/benchmark/fib.dat +++ b/docs/assets/benchmark/fib.dat @@ -1,3 +1,3 @@ -gwion 0.086401 0.30 -wren 0.220461 0.23 -lua 0.22028 0.93 +gwion 0.08750 1.21 +wren 0.22008 1.21 +lua 0.22026 0.70 diff --git a/docs/assets/benchmark/fib.png b/docs/assets/benchmark/fib.png index 4cafb8af..c9c3ad06 100644 Binary files a/docs/assets/benchmark/fib.png and b/docs/assets/benchmark/fib.png differ diff --git a/docs/assets/benchmark/for.dat b/docs/assets/benchmark/for.dat new file mode 100644 index 00000000..d4c00eac --- /dev/null +++ b/docs/assets/benchmark/for.dat @@ -0,0 +1,3 @@ +gwion 0.037861 1.04 +wren 0.085946 0.68 +lua 0.055855 0.75 diff --git a/docs/assets/benchmark/for.png b/docs/assets/benchmark/for.png new file mode 100644 index 00000000..88f41905 Binary files /dev/null and b/docs/assets/benchmark/for.png differ diff --git a/docs/assets/benchmark/method-call.dat b/docs/assets/benchmark/method-call.dat index efe2c151..1c40e01e 100644 --- a/docs/assets/benchmark/method-call.dat +++ b/docs/assets/benchmark/method-call.dat @@ -1,3 +1,3 @@ -gwion 0.091115 0.35 -wren 0.107178 0.46 -lua 0.25818 1.72 +gwion 0.098407 0.66 +wren 0.114304 0.58 +lua 0.26571 1.24 diff --git a/docs/assets/benchmark/method-call.png b/docs/assets/benchmark/method-call.png index e95476e5..ee3cdc41 100644 Binary files a/docs/assets/benchmark/method-call.png and b/docs/assets/benchmark/method-call.png differ diff --git a/docs/assets/benchmark/string-equals.dat b/docs/assets/benchmark/string-equals.dat new file mode 100644 index 00000000..6f6fbc59 --- /dev/null +++ b/docs/assets/benchmark/string-equals.dat @@ -0,0 +1,2 @@ +gwion 0.165975 0.47 +wren 0.184180 0.38 diff --git a/docs/assets/benchmark/string-equals.png b/docs/assets/benchmark/string-equals.png new file mode 100644 index 00000000..9782d6dd Binary files /dev/null and b/docs/assets/benchmark/string-equals.png differ diff --git a/help/struct_check.sh b/help/struct_check.sh index 0b74aec1..1dc9877c 100755 --- a/help/struct_check.sh +++ b/help/struct_check.sh @@ -4,4 +4,4 @@ pahole -s ${PRG} | while read -r name size gap do [ "$size" -gt 64 ] && echo "$name $size" [ "$gap" -gt 0 ] && echo "$name has a gap" -done | grep -v IO_FILE | grep -v __jmp_buf_tag | grep -v yyguts_t +done #| grep -v IO_FILE | grep -v __jmp_buf_tag | grep -v yyguts_t diff --git a/tests/benchmark/string_equals.gw b/tests/benchmark/string_equals.gw deleted file mode 100644 index 6dfa7e62..00000000 --- a/tests/benchmark/string_equals.gw +++ /dev/null @@ -1,21 +0,0 @@ -int count; -for (int i; i < 1000000; ++i) { - if ("abc" == "abc") ++count; - if ("a slightly longer string" == - "a slightly longer string") ++count; - if ("a significantly longer string but still not overwhelmingly long string" == - "a significantly longer string but still not overwhelmingly long string") ++count; - - if ("" == "abc") ++count; - if ("abc" == "abcd") ++count; - if ("changed one character" == "changed !ne character") ++count; -#! if ("123" == 123) ++count - if ("a slightly longer string" == - "a slightly longer string!") ++count; - if ("a slightly longer string" == - "a slightly longer strinh") ++count; - if ("a significantly longer string but still not overwhelmingly long string" == - "another") ++count; -} - -<<< count >>>; diff --git a/tests/benchmark/string_equals.py b/tests/benchmark/string_equals.py deleted file mode 100644 index 8829b5c2..00000000 --- a/tests/benchmark/string_equals.py +++ /dev/null @@ -1,35 +0,0 @@ -from __future__ import print_function - -import time -start = time.clock() - -count = 0 -for i in range(0, 1000000): - if "abc" == "abc": - count = count + 1 - if "a slightly longer string" == \ - "a slightly longer string": - count = count + 1 - if "a significantly longer string but still not overwhelmingly long string" == \ - "a significantly longer string but still not overwhelmingly long string": - count = count + 1 - - if "" == "abc": - count = count + 1 - if "abc" == "abcd": - count = count + 1 - if "changed one character" == "changed !ne character": - count = count + 1 - if "123" == 123: count = count + 1 - if "a slightly longer string" == \ - "a slightly longer string!": - count = count + 1 - if "a slightly longer string" == \ - "a slightly longer strinh": - count = count + 1 - if "a significantly longer string but still not overwhelmingly long string" == \ - "another": - count = count + 1 - -print(count) -print("elapsed: " + str(time.clock() - start)) diff --git a/tests/benchmark/string_equals.wren b/tests/benchmark/string_equals.wren deleted file mode 100644 index 0c87bcc2..00000000 --- a/tests/benchmark/string_equals.wren +++ /dev/null @@ -1,24 +0,0 @@ -var start = System.clock - -var count = 0 -for (i in 1..1000000) { - if ("abc" == "abc") count = count + 1 - if ("a slightly longer string" == - "a slightly longer string") count = count + 1 - if ("a significantly longer string but still not overwhelmingly long string" == - "a significantly longer string but still not overwhelmingly long string") count = count + 1 - - if ("" == "abc") count = count + 1 - if ("abc" == "abcd") count = count + 1 - if ("changed one character" == "changed !ne character") count = count + 1 - if ("123" == 123) count = count + 1 - if ("a slightly longer string" == - "a slightly longer string!") count = count + 1 - if ("a slightly longer string" == - "a slightly longer strinh") count = count + 1 - if ("a significantly longer string but still not overwhelmingly long string" == - "another") count = count + 1 -} - -System.print(count) -System.print("elapsed: %(System.clock - start)")