From e64b6d0114c26a455e19a416b5f02a4d19dd711f Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Mon, 26 Jul 2021 01:45:57 -0400 Subject: Re-named Promise to Async. --- .../book/the_lux_programming_language/chapter_1.md | 101 +++++++++++++++++++++ .../the_lux_programming_language/introduction.md | 4 + documentation/bookmark/Memory Management.md | 44 --------- documentation/bookmark/floating_point.md | 1 + documentation/bookmark/math.md | 8 -- documentation/bookmark/math/number/dual.md | 12 +++ documentation/bookmark/math/number/real.md | 5 + documentation/bookmark/math/real numbers.md | 5 - documentation/bookmark/memory_management.md | 45 +++++++++ 9 files changed, 168 insertions(+), 57 deletions(-) create mode 100644 documentation/book/the_lux_programming_language/chapter_1.md delete mode 100644 documentation/bookmark/Memory Management.md create mode 100644 documentation/bookmark/math/number/dual.md create mode 100644 documentation/bookmark/math/number/real.md delete mode 100644 documentation/bookmark/math/real numbers.md create mode 100644 documentation/bookmark/memory_management.md (limited to 'documentation') diff --git a/documentation/book/the_lux_programming_language/chapter_1.md b/documentation/book/the_lux_programming_language/chapter_1.md new file mode 100644 index 000000000..3b3f024f4 --- /dev/null +++ b/documentation/book/the_lux_programming_language/chapter_1.md @@ -0,0 +1,101 @@ +# Chapter 1: Getting Started + +_Where you will learn how to set up a development environment for Lux._ + +--- + +Before any coding can happen, it is necessary to set-up everything you need to become a productive Lux programmer. + +## Question #1: How do I write Lux code? + +Text editor support is a fundamental thing for any language, and Lux already covers some of that. +The catch is that there's only support for Emacs at the moment. + +The plugin is called [lux-mode](https://github.com/LuxLang/lux/tree/master/lux-mode). + +The instructions for how to install it are at the link and it won't take much time. + +**Note**: If you've already installed _lux-mode_ before while using a previous version of Lux, you should install it again, as the language has changed a lot between previous versions and v0.6. + +## Question #2: How do I build Lux programs? + +Lux uses a custom-made build tool named Aedifex which is configured using a declarative Lux-based syntax. +To install Aedifex, go to https://github.com/LuxLang/lux/tree/master/shell and download either `lux.bat` or `lux.sh` depending on whether you're on Windows or Linux/Mac. +Also download the `aedifex.jar` file, and place it (along with either of the scripts you downloaded) somewhere in your `PATH`. +Now, you'll have access to the `lux` command, which allows you to run Aedifex to build and test Lux projects. + +## Question #3: How do I use Aedifex? + +To find out, let's create a sample project that will have everything we need. + +These are the steps: + +1. Create a directory called `my_project`. +1. Create a new project file at `my_project/project.lux`. +1. Add this to the project file: + +``` +{#identity ["my.group" "my_project" "0.1.0-SNAPSHOT"] + #repositories ["https://oss.sonatype.org/content/repositories/snapshots/" + "https://oss.sonatype.org/service/local/staging/deploy/maven2/"] + + #dependencies [["com.github.luxlang" "stdlib" "0.6.0" "tar"]] + #compiler ["com.github.luxlang" "lux-jvm" "0.6.0" "jar"] + + #program "main"} + +## By default, Aedifex uses the "source" directory for finding your source-code. +## The file containing our program will be my_project/source/main.lux. + +``` + +1. Create `my_project/source/main.lux` and add this code to it: + +``` +(.module: + {#.doc "This will be our program's main module."} + [library + [lux #* + [program (#+ program:)] + ["." debug] + [control + ["." io]]]]) + +(program: args + (io.io (debug.log! "Hello, world!"))) + +## As you can see, this is nothing more than a very simple "Hello, world!" program to test things out. +## Everything will be explained later in the rest of the book. +``` + +1. In your terminal, go to `my_project`, and execute `lux build`. + +When it's done, you should see a message like this: + +``` +... +Compilation complete! +Duration: +15s26ms +[BUILD ENDED] +``` + +A directory named `target` will have been created, containing everything that was compiled, alongside an executable JAR file. + +1. Run the program with this command: `java -jar target/jvm/program.jar` +1. Smile :) + +## Question #4: Where can I find documentation for Lux? + +A specially useful source of information is [the documentation for the standard library](https://luxlang.github.io/lux/). +You can also explore [the Lux repository on GitHub](https://github.com/LuxLang/lux) for more information. + +## Question #5: Where do I talk about Lux? + +The place to talk about Lux is at [the Lux forum](http://luxlang.freeforums.net/). + +--- + +Now, we can proceed to the actual teaching of the language! + +See you in the next chapter! + diff --git a/documentation/book/the_lux_programming_language/introduction.md b/documentation/book/the_lux_programming_language/introduction.md index 11ee6b52a..1f904df2b 100644 --- a/documentation/book/the_lux_programming_language/introduction.md +++ b/documentation/book/the_lux_programming_language/introduction.md @@ -29,3 +29,7 @@ It is my hope that within these pages the reader will find both a host of new id I wish you, my dear reader, good luck on this journey, and much fun! +--- + +Click here to [read](../chapter_1.md) the 1st chapter. + diff --git a/documentation/bookmark/Memory Management.md b/documentation/bookmark/Memory Management.md deleted file mode 100644 index 8905c6b20..000000000 --- a/documentation/bookmark/Memory Management.md +++ /dev/null @@ -1,44 +0,0 @@ -# Static - -1. [ASAP: As Static As Possible memory management](https://www.cl.cam.ac.uk/techreports/UCAM-CL-TR-908.pdf) - -# Allocation - -1. [Always Bump Downwards](https://fitzgeraldnick.com/2019/11/01/always-bump-downwards.html) - -# Compaction - -1. ["Compacting the Uncompactable" by Bobby Powers](https://www.youtube.com/watch?v=c1UBJbfR-H0) - -# Reference counting - -1. [Introducing --gc:arc](https://forum.nim-lang.org/t/5734) -1. [Counting Immutable Beans: Reference Counting Optimized for Purely Functional Programming](https://arxiv.org/abs/1908.05647) - -# Layout - -1. [Floorplan: Spatial Layout in Memory Management Systems](https://conf.researchr.org/details/gpce-2019/gpce-2019-papers/6/Floorplan-Spatial-Layout-in-Memory-Management-Systems) - -# Garbage collection - -1. [The Garbage Collection Handbook](http://gchandbook.org/) -1. [Baby's First Garbage Collector](http://journal.stuffwithstuff.com/2013/12/08/babys-first-garbage-collector/) - -# Reference - -1. [Relative Pointers](https://www.gingerbill.org/article/2020/05/17/relative-pointers/) -1. [Scopes Describe Frames: A Uniform Model for Memory Layout in Dynamic Semantics](http://drops.dagstuhl.de/opus/volltexte/2016/6114/) -1. https://uridiumauthor.blogspot.com/2018/06/memory-management.html -1. https://github.com/mtrebi/memory-allocators -1. http://www.newlisp.org/MemoryManagement.html -1. http://gee.cs.oswego.edu/dl/html/malloc.html -1. https://shipilev.net/blog/2014/jmm-pragmatics/ -1. https://floooh.github.io/2018/06/17/handles-vs-pointers.html -1. https://www.codemag.com/Article/1807051/Introducing-.NET-Core-2.1-Flagship-Types-Span-T-and-Memory-T -1. https://stefansf.de/post/pointers-are-more-abstract-than-you-might-expect/ -1. [Memory Management Reference](https://www.memorymanagement.org/) -1. [Pseudomonarchia jemallocum: The false kingdom of jemalloc, or On exploiting the jemalloc memory manager](http://phrack.com/issues/68/10.html#article) -1. https://gankro.github.io/blah/rust-layouts-and-abis/ -1. https://paul.bone.id.au/2018/10/19/gc-falsehoods/ -1. [Safe Programming with Pointers through Stateful Views](https://www.cs.bu.edu/~hwxi/academic/papers/padl05.pdf) - diff --git a/documentation/bookmark/floating_point.md b/documentation/bookmark/floating_point.md index 56cbc3eb9..5e212c08f 100644 --- a/documentation/bookmark/floating_point.md +++ b/documentation/bookmark/floating_point.md @@ -8,6 +8,7 @@ # Correctness +1. [Floating point expression inspector](https://github.com/graphitemaster/fpinspect) 1. [Herbie: Find and fix floating-point problems.](https://herbie.uwplse.org/) # Format diff --git a/documentation/bookmark/math.md b/documentation/bookmark/math.md index 333fd6591..e7e3deec0 100644 --- a/documentation/bookmark/math.md +++ b/documentation/bookmark/math.md @@ -58,7 +58,6 @@ # Number Theory 1. https://twitter.com/johncarlosbaez/status/1184492139897507840 -1. https://en.wikipedia.org/wiki/Dual_number 1. https://en.wikipedia.org/wiki/Division_algebra 1. [Division algebras](https://www.youtube.com/watch?v=3BZyds_KFWM&list=PLNxhIPHaOTRZMO1VjJcs7_3dgyJ2qU1yZ) 1. https://www.quantamagazine.org/the-octonion-math-that-could-underpin-physics-20180720 @@ -72,10 +71,8 @@ # Quaternions 1. [Maths - Quaternions](http://www.euclideanspace.com/maths/algebra/realNormedAlgebra/quaternions/index.htm) -1. [Dual Quaternions for Mere Mortals](https://www.jeremyong.com/math/2019/08/05/dual-quaternions-for-mere-mortals/) 1. [Stepping into a New Dimension: Using Quaternions to See the Invisible](https://medium.com/@vieyrasoftware/stepping-into-a-new-dimension-using-quaternions-to-see-the-invisible-478087c9ebbf) 1. [How Quaternions Produce 3D Rotation](https://penguinmaths.blogspot.com/2019/06/how-quaternions-produce-3d-rotation.html) -1. [APPLICATION OF DUAL QUATERNIONS ON SELECTED PROBLEMS](https://otik.uk.zcu.cz/bitstream/11025/28563/1/phd_Application%20of%20dual%20quaternions%20on%20selected%20problems.pdf) 1. https://www.3dgep.com/understanding-quaternions/ 1. https://probablydance.com/2017/08/05/intuitive-quaternions/ 1. [Quaternion algebras](https://math.dartmouth.edu/~jvoight/quat.html) @@ -182,7 +179,6 @@ 1. [Siggraph2019 Geometric Algebra](https://www.youtube.com/watch?v=tX4H_ctggYo) 1. [Dr Leo Dorst' Keynote talk at CGI2020](https://www.youtube.com/watch?v=T7xVTBpHMjA) -1. [GAME2020 0. Steven De Keninck. Dual Quaternions Demystified](https://www.youtube.com/watch?v=ichOiuBoBoQ) 1. [GAME2020 - 1. Dr. Leo Dorst. Get Real!](https://www.youtube.com/watch?v=0fF2xToQmgs) 1. [GAME2020 3. Professor Anthony Lasenby. A new language for physics.](https://www.youtube.com/watch?v=x7eLEtmq6PY) 1. [HestenesJMM2019](https://www.youtube.com/watch?v=zsQQ7djCg_Y) @@ -366,10 +362,6 @@ 1. [Intuitive Guide to Hyperbolic Functions](https://betterexplained.com/articles/hyperbolic-functions/) 1. [Hyperbolic Functions and Non-Hyperbolic Claims](https://elliptigon.com/hyperbolic-functions-explained/) -# Dual numbers - -1. [The Dual Numbers](https://www.youtube.com/watch?v=4nU-09e3iP8) - # **Temp Cache** 1. https://mathlets.org/mathlets/ diff --git a/documentation/bookmark/math/number/dual.md b/documentation/bookmark/math/number/dual.md new file mode 100644 index 000000000..508adae9a --- /dev/null +++ b/documentation/bookmark/math/number/dual.md @@ -0,0 +1,12 @@ +# Reference + +1. [Ditching Backpropagation: Automatic Differentiation and Dual Numbers](https://matiasmorant.wordpress.com/2017/12/29/dual-numbers/) +1. [The Dual Numbers](https://www.youtube.com/watch?v=4nU-09e3iP8) +1. [Dual number](https://en.wikipedia.org/wiki/Dual_number) + +# Dual Quaternions + +1. [Dual Quaternions for Mere Mortals](https://www.jeremyong.com/math/2019/08/05/dual-quaternions-for-mere-mortals/) +1. [APPLICATION OF DUAL QUATERNIONS ON SELECTED PROBLEMS](https://otik.uk.zcu.cz/bitstream/11025/28563/1/phd_Application%20of%20dual%20quaternions%20on%20selected%20problems.pdf) +1. [GAME2020 0. Steven De Keninck. Dual Quaternions Demystified](https://www.youtube.com/watch?v=ichOiuBoBoQ) + diff --git a/documentation/bookmark/math/number/real.md b/documentation/bookmark/math/number/real.md new file mode 100644 index 000000000..2daa1873b --- /dev/null +++ b/documentation/bookmark/math/number/real.md @@ -0,0 +1,5 @@ +# Reference + +1. https://blog.acolyer.org/2020/10/02/toward-an-api-for-the-real-numbers/ +1. [Towards an API for the real numbers](https://dl.acm.org/doi/abs/10.1145/3385412.3386037) + diff --git a/documentation/bookmark/math/real numbers.md b/documentation/bookmark/math/real numbers.md deleted file mode 100644 index 2daa1873b..000000000 --- a/documentation/bookmark/math/real numbers.md +++ /dev/null @@ -1,5 +0,0 @@ -# Reference - -1. https://blog.acolyer.org/2020/10/02/toward-an-api-for-the-real-numbers/ -1. [Towards an API for the real numbers](https://dl.acm.org/doi/abs/10.1145/3385412.3386037) - diff --git a/documentation/bookmark/memory_management.md b/documentation/bookmark/memory_management.md new file mode 100644 index 000000000..8a5a1c0a9 --- /dev/null +++ b/documentation/bookmark/memory_management.md @@ -0,0 +1,45 @@ +# Static + +1. [ASAP: As Static As Possible memory management](https://www.cl.cam.ac.uk/techreports/UCAM-CL-TR-908.pdf) + +# Allocation + +1. [Always Bump Downwards](https://fitzgeraldnick.com/2019/11/01/always-bump-downwards.html) + +# Compaction + +1. ["Compacting the Uncompactable" by Bobby Powers](https://www.youtube.com/watch?v=c1UBJbfR-H0) + +# Reference counting + +1. [Perceus: Garbage Free Reference Counting with Reuse (Extended version)](https://www.microsoft.com/en-us/research/publication/perceus-garbage-free-reference-counting-with-reuse/) +1. [Introducing --gc:arc](https://forum.nim-lang.org/t/5734) +1. [Counting Immutable Beans: Reference Counting Optimized for Purely Functional Programming](https://arxiv.org/abs/1908.05647) + +# Layout + +1. [Floorplan: Spatial Layout in Memory Management Systems](https://conf.researchr.org/details/gpce-2019/gpce-2019-papers/6/Floorplan-Spatial-Layout-in-Memory-Management-Systems) + +# Garbage collection + +1. [The Garbage Collection Handbook](http://gchandbook.org/) +1. [Baby's First Garbage Collector](http://journal.stuffwithstuff.com/2013/12/08/babys-first-garbage-collector/) + +# Reference + +1. [Relative Pointers](https://www.gingerbill.org/article/2020/05/17/relative-pointers/) +1. [Scopes Describe Frames: A Uniform Model for Memory Layout in Dynamic Semantics](http://drops.dagstuhl.de/opus/volltexte/2016/6114/) +1. https://uridiumauthor.blogspot.com/2018/06/memory-management.html +1. https://github.com/mtrebi/memory-allocators +1. http://www.newlisp.org/MemoryManagement.html +1. http://gee.cs.oswego.edu/dl/html/malloc.html +1. https://shipilev.net/blog/2014/jmm-pragmatics/ +1. https://floooh.github.io/2018/06/17/handles-vs-pointers.html +1. https://www.codemag.com/Article/1807051/Introducing-.NET-Core-2.1-Flagship-Types-Span-T-and-Memory-T +1. https://stefansf.de/post/pointers-are-more-abstract-than-you-might-expect/ +1. [Memory Management Reference](https://www.memorymanagement.org/) +1. [Pseudomonarchia jemallocum: The false kingdom of jemalloc, or On exploiting the jemalloc memory manager](http://phrack.com/issues/68/10.html#article) +1. https://gankro.github.io/blah/rust-layouts-and-abis/ +1. https://paul.bone.id.au/2018/10/19/gc-falsehoods/ +1. [Safe Programming with Pointers through Stateful Views](https://www.cs.bu.edu/~hwxi/academic/papers/padl05.pdf) + -- cgit v1.2.3