فهرست منبع

Moonscript guide (#95)

* Moonscript/Yuescript Guide

* Add support for lovr.filesystem in yue's setup

This is a simple solution for not requiring a patched Yuescript.
Also remove the mentioning of the pull request which is closed already.

* Fix some spelling errors

* lua package loader for moonscript using lovr.filesystem

* Spell fixing and a small bug fix in the loader

* Restructured to feature more than moonscript dialects only

* Renamed the Moonscirpt guide 'Scripting_Languages'

* Add link to Minimal Fennel Setup repository

* More Links and Logos

* corrected a list indentation

* Fix a formating issue

* adjust the height of Yuescript's logo

* Another try to geht the yuescript logo right.

Sadly I don't know a better way to test them than commiting and viewing
via github.

* Add Lua loga and enforce the same size for all logos

* Replace Lua's logo with a transparent one.

* New attempt for a propper Lua logo

* Size adjustments for the logos

* Haxe logo was still a bit bulky...

* Fix indentation of code blocks and a toc

* New attempt for the toc

* A small formating issue

* Fix a problem with a codeblock

* Added more points to the *feature* items

* Linked bindings for Haxe and Fennel

* Make the logos links to their projects

* Final cleanups

* Fix name of a link

* Make the Haxe logo a bit bigger again

* attempt to support syntax highlighting better

* Add a section for CSharp.lua

* adjust size of the csharp.lua logo

* Add a CSharp.lua related TODO

* Make the Moonscript logo much bigger

* I left some trash in there.

* Lua is spelled with a capital L

* More proper capitals

* Remove links to moon and yuescript again

I know I should be handling this by reverting the commit partially.
But I am not that firm with git.

Maybe you can cherry pick files if adding and deleting is too much
noise.

* Simplified the setup scripts

Removed all clibs mangeling from the guide

* Use the docs method to link between documents

* Fix the image urls to work after processed to html

and some spelling fixes...

* Lift all level 4 headlines to level 3 ones

* Remove unrecognized markdown syntax

* Repair a broken list structure

* Remind the coder to give copyright credit and some more interlinking

* Changed the order of the guides.

I guess the FAQ was the last entry in the list for a reason.

* Removed a duplicate
fendrin 2 سال پیش
والد
کامیت
983a9e8164
2فایلهای تغییر یافته به همراه30 افزوده شده و 43 حذف شده
  1. 28 41
      guides/Scripting_Languages.md
  2. 2 2
      guides/init.lua

+ 28 - 41
guides/Scripting_Languages.md

@@ -1,8 +1,7 @@
 Scripting Languages
 Scripting Languages
 ===================
 ===================
 
 
-<a href="https://www.lua.org"><img align="right" width="300" height="300"
-    src="http://lua-users.org/files/wiki_insecure/lua-full.ico" alt="Lua Logo"></a>
+<a href="https://www.lua.org"><img align="right" width="300" height="300" src="http://lua-users.org/files/wiki_insecure/lua-full.ico" alt="Lua Logo"></a>
 
 
 Currently [Lua](https://www.lua.org) is the only supported language for coding LÖVR projects.  
 Currently [Lua](https://www.lua.org) is the only supported language for coding LÖVR projects.  
 But there are several [languages](https://github.com/hengestone/lua-languages) available that
 But there are several [languages](https://github.com/hengestone/lua-languages) available that
@@ -40,10 +39,12 @@ In general there are two ways of using one of them in a LÖVR project:
         This solution needs more additional coding inside the project. 
         This solution needs more additional coding inside the project. 
     * additional dependencies required  
     * additional dependencies required  
         In this case the project must ship with the compiler library and its dependencies.
         In this case the project must ship with the compiler library and its dependencies.
-        > * Lua C libraries
-        >   * Usage: <a data-key="Plugins">Plugins Guide</a>
-        >   * Shipping: <a data-key="Distribution">Distribution Guide</a>
-        > * Pure Lua
+        Don't forget to give copyright credit and take care about software license documentation.
+        * Lua C libraries
+            * Usage: <a data-key="Plugins">Plugins Guide</a>
+            * Shipping: <a data-key="Distribution">Distribution Guide</a>
+        * Pure Lua
+            * Usage: <a data-key="Libraries">Libraries Guide</a>
     * runtime error line translation  
     * runtime error line translation  
         is usually done by the compiler without extra care.
         is usually done by the compiler without extra care.
     * virtual file-system
     * virtual file-system
@@ -68,8 +69,7 @@ In general there are two ways of using one of them in a LÖVR project:
 CSharp.lua (C# dialect)
 CSharp.lua (C# dialect)
 ---
 ---
 
 
-<a href="https://github.com/yanghuan/CSharp.lua"><img align="right" width="250" height="250"
-    src="https://about.codecov.io/wp-content/uploads/2020/08/c-sharp-logo.svg" alt="C# Logo"></a>
+<a href="https://github.com/yanghuan/CSharp.lua"><img align="right" width="250" height="250" src="https://about.codecov.io/wp-content/uploads/2020/08/c-sharp-logo.svg" alt="C# Logo"></a>
 
 
 * Home: [CSharp.lua Readme](https://github.com/yanghuan/CSharp.lua/blob/master/README.md) 
 * Home: [CSharp.lua Readme](https://github.com/yanghuan/CSharp.lua/blob/master/README.md) 
 * Source: [GitHub](https://github.com/yanghuan/CSharp.lua)
 * Source: [GitHub](https://github.com/yanghuan/CSharp.lua)
@@ -84,19 +84,18 @@ CSharp.lua (C# dialect)
 
 
 (TODO: Is CSharp.lua really a dialect? It feels more like a full implementation.)
 (TODO: Is CSharp.lua really a dialect? It feels more like a full implementation.)
 
 
-#### ahead-of-time
+### ahead-of-time
 
 
 (TODO)
 (TODO)
 
 
-#### just-in-time
+### just-in-time
 
 
 (TODO)
 (TODO)
 
 
 Fennel (Lisp/Clojure dialect)
 Fennel (Lisp/Clojure dialect)
 ---
 ---
 
 
-<a href="https://fennel-lang.org"><img align="right" width="300" height="300"
-    src="https://fennel-lang.org/logo.svg" alt="Fennel Logo"></a>
+<a href="https://fennel-lang.org"><img align="right" width="300" height="300" src="https://fennel-lang.org/logo.svg" alt="Fennel Logo"></a>
 
 
 * Home: [Fennel](https://fennel-lang.org)
 * Home: [Fennel](https://fennel-lang.org)
 * Source: [GitHub](https://github.com/bakpakin/Fennel)
 * Source: [GitHub](https://github.com/bakpakin/Fennel)
@@ -110,13 +109,13 @@ Fennel (Lisp/Clojure dialect)
     * Fully parenthesized prefix notation
     * Fully parenthesized prefix notation
     * Functional language
     * Functional language
 
 
-#### ahead-of-time
+### ahead-of-time
 
 
     $ fennel --compile yourProject
     $ fennel --compile yourProject
 
 
 (TODO: error line translation)
 (TODO: error line translation)
 
 
-#### just-in-time
+### just-in-time
 
 
 * [Embedding Fennel](https://fennel-lang.org/setup#embedding-fennel)
 * [Embedding Fennel](https://fennel-lang.org/setup#embedding-fennel)
 * [Minimal LÖVR Setup](https://github.com/MattRoelle/min-lovr-fennel)
 * [Minimal LÖVR Setup](https://github.com/MattRoelle/min-lovr-fennel)
@@ -124,8 +123,7 @@ Fennel (Lisp/Clojure dialect)
 Haxe (ECMAScript dialect)
 Haxe (ECMAScript dialect)
 ---
 ---
 
 
-<a href="https://haxe.org"><img align="right" width="225" height="225"
-    src="https://haxe.org/img/haxe-logo.svg" alt="Haxe Logo"></a>
+<a href="https://haxe.org"><img align="right" width="225" height="225" src="https://haxe.org/img/haxe-logo.svg" alt="Haxe Logo"></a>
 
 
 * Home: [Haxe](https://haxe.org/)
 * Home: [Haxe](https://haxe.org/)
 * Source: [GitHub](https://github.com/HaxeFoundation/haxe)
 * Source: [GitHub](https://github.com/HaxeFoundation/haxe)
@@ -141,22 +139,21 @@ Haxe (ECMAScript dialect)
     * Properties
     * Properties
     * Type Parameters
     * Type Parameters
 
 
-#### ahead-of-time
+### ahead-of-time
 
 
 * [Haxe Lua](https://haxe.org/manual/target-lua.html)
 * [Haxe Lua](https://haxe.org/manual/target-lua.html)
 * [LÖVR bindings](https://github.com/excessive/lovr-haxe-wrappergen)
 * [LÖVR bindings](https://github.com/excessive/lovr-haxe-wrappergen)
 
 
 (TODO: Line Translation?)
 (TODO: Line Translation?)
 
 
-#### just-in-time
+### just-in-time
 
 
 Haxe does not offer runtime compilation.
 Haxe does not offer runtime compilation.
 
 
 MoonScript (CoffeeScript dialect)
 MoonScript (CoffeeScript dialect)
 ---
 ---
 
 
-<a href="https://moonscript.org"><img align="right" width="450" height="225"
-    src="http://moonscript.org/images/logo.png" alt="MoonScript Logo"></a>
+<a href="https://moonscript.org"><img align="right" width="450" height="225" src="http://moonscript.org/images/logo.png" alt="MoonScript Logo"></a>
 
 
 * Home: [MoonScript](https://www.moonscript.org)
 * Home: [MoonScript](https://www.moonscript.org)
 * Source: [GitHub](https://github.com/leafo/moonscript)
 * Source: [GitHub](https://github.com/leafo/moonscript)
@@ -171,7 +168,7 @@ MoonScript (CoffeeScript dialect)
     * Clean syntax avoiding keyword noise
     * Clean syntax avoiding keyword noise
     * List and table comprehensions
     * List and table comprehensions
 
 
-#### ahead-of-time
+### ahead-of-time
 
 
 Compiles the whole project:
 Compiles the whole project:
 
 
@@ -179,11 +176,10 @@ Compiles the whole project:
 
 
 (TODO: Write more about error line rewriting.)
 (TODO: Write more about error line rewriting.)
 
 
-#### just-in-time
+### just-in-time
 
 
 Setup in conf.lua:
 Setup in conf.lua:
 
 
-``` lua
     -- Check for moonscript/moonscript/init.lua.
     -- Check for moonscript/moonscript/init.lua.
     -- The operating specific LPeg library must be at the right location as well.
     -- The operating specific LPeg library must be at the right location as well.
     local lua_path = '?.lua;?/init.lua;moonscript/?/init.lua;'
     local lua_path = '?.lua;?/init.lua;moonscript/?/init.lua;'
@@ -216,23 +212,19 @@ Setup in conf.lua:
     -- This will require the first .lua or .moon file matching the require paths.
     -- This will require the first .lua or .moon file matching the require paths.
     -- If both are present the Lua file is required.
     -- If both are present the Lua file is required.
     require'myConf'
     require'myConf'
-```
 
 
 The main.lua file:
 The main.lua file:
 
 
-``` lua
     -- Requires either .moon or .lua module files.
     -- Requires either .moon or .lua module files.
     -- If both are present the Lua one is required.
     -- If both are present the Lua one is required.
     require'myMain'
     require'myMain'
-```
 
 
 (TODO: Write about error line translation.)
 (TODO: Write about error line translation.)
 
 
 Wu (Rust dialect)
 Wu (Rust dialect)
 ---
 ---
 
 
-<a href="https://wu-lang.gitbook.io/guide"><img align="right" width="300" height="300"
-    src="https://preview.ibb.co/ePa1eH/wu_dragon.png" alt="Wu Logo"></a>
+<a href="https://wu-lang.gitbook.io/guide"><img align="right" width="300" height="300" src="https://preview.ibb.co/ePa1eH/wu_dragon.png" alt="Wu Logo"></a>
 
 
 * Home: [Wu Guide](https://wu-lang.gitbook.io/guide)
 * Home: [Wu Guide](https://wu-lang.gitbook.io/guide)
 * Source: [GitHub](https://github.com/wu-lang/wu)
 * Source: [GitHub](https://github.com/wu-lang/wu)
@@ -247,36 +239,35 @@ Wu (Rust dialect)
     * Pattern matching
     * Pattern matching
     * Cool logo
     * Cool logo
 
 
-#### ahead-of-time
+### ahead-of-time
 
 
 [LÖVR bindings](https://github.com/darltrash/lowr)
 [LÖVR bindings](https://github.com/darltrash/lowr)
 
 
-#### just-in-time
+### just-in-time
 
 
 There is no jit-compiler available for Wu.
 There is no jit-compiler available for Wu.
 
 
-Yuescript (Moonscript dialect)
+Yuescript (MoonScript dialect)
 ---
 ---
 
 
-<a href="https://yuescript.org"><img align="right" width="300" height="300"
-    src="https://yuescript.org/image/yuescript.svg" alt="Yuescript logo"></a>
+<a href="https://yuescript.org"><img align="right" width="300" height="300" src="https://yuescript.org/image/yuescript.svg" alt="Yuescript logo"></a>
 
 
 * Home: [Yuescript](https://yuescript.org)
 * Home: [Yuescript](https://yuescript.org)
 * Source: [GitHub](https://github.com/pigpigyyy/Yuescript)
 * Source: [GitHub](https://github.com/pigpigyyy/Yuescript)
-* Syntax: [Moonscript](https://moonscript.org) inspired 
+* Syntax: [MoonScript](https://moonscript.org) inspired 
 [(white space sensitive)](https://en.wikipedia.org/wiki/Off-side_rule)
 [(white space sensitive)](https://en.wikipedia.org/wiki/Off-side_rule)
 * Semantic: Lua
 * Semantic: Lua
 * jit-compiler: Lua C library
 * jit-compiler: Lua C library
 * Dependencies: None
 * Dependencies: None
 * Features:
 * Features:
-    * Everything Moonscript features
+    * Everything MoonScript features
     * Improved table literal syntax (storing game content data)
     * Improved table literal syntax (storing game content data)
     * Expressive and extremely concise
     * Expressive and extremely concise
     * Build-in macro support
     * Build-in macro support
     * Table matching
     * Table matching
     * Under active development
     * Under active development
 
 
-#### ahead-of-time
+### ahead-of-time
 
 
 Use the `-l` flag which enables commenting each line of the Lua file with the corresponding
 Use the `-l` flag which enables commenting each line of the Lua file with the corresponding
 line-number in the source file:
 line-number in the source file:
@@ -288,7 +279,7 @@ and point to the correct line in the source file when an error is thrown.
 
 
 (TODO: Write more about this error handler function. I guess some Yuescript function can be reused.)
 (TODO: Write more about this error handler function. I guess some Yuescript function can be reused.)
 
 
-#### just-in-time
+### just-in-time
 
 
 Yuescript comes also (beside the standalone executable) in form of a Lua c library.
 Yuescript comes also (beside the standalone executable) in form of a Lua c library.
 You need to ship a different one for each operating system you want to support.
 You need to ship a different one for each operating system you want to support.
@@ -301,7 +292,6 @@ in the usual way.
 
 
 Setup in conf.lua:
 Setup in conf.lua:
 
 
-``` lua
     require('yue')
     require('yue')
 
 
     -- Yuescript's uses of io.open need to be replaced with lovr.filesystem ones.
     -- Yuescript's uses of io.open need to be replaced with lovr.filesystem ones.
@@ -322,13 +312,10 @@ Setup in conf.lua:
     -- Use yue() instead of require() to enable error line translation.
     -- Use yue() instead of require() to enable error line translation.
     -- In yueConf require() works like expected.
     -- In yueConf require() works like expected.
     yue('yueConf')
     yue('yueConf')
-```
 
 
 The main.lua file:
 The main.lua file:
 
 
-``` lua
     -- Requires file yueMain.yue or yueMain/init.yue.
     -- Requires file yueMain.yue or yueMain/init.yue.
     -- Use yue() instead of require() to enable error line translation.
     -- Use yue() instead of require() to enable error line translation.
     -- In yueMain require() works like expected.
     -- In yueMain require() works like expected.
     yue'yueMain'
     yue'yueMain'
-```    

+ 2 - 2
guides/init.lua

@@ -9,6 +9,6 @@ return {
   'Distribution',
   'Distribution',
   'Contributing',
   'Contributing',
   'Compiling',
   'Compiling',
-  'FAQ',
-  'Scripting_Languages'
+  'Scripting_Languages',
+  'FAQ'
 }
 }