From 6411bc31d00efda1fb22a2b3ec23eaed5b7f22e4 Mon Sep 17 00:00:00 2001 From: Alexander M Pickering Date: Sat, 21 Dec 2024 23:17:52 -0600 Subject: Make site look better on mobile --- html/index.html | 59 ++++++++++++++++++++++++++++----------------------------- 1 file changed, 29 insertions(+), 30 deletions(-) (limited to 'html') diff --git a/html/index.html b/html/index.html index 48c86bf..494ce50 100644 --- a/html/index.html +++ b/html/index.html @@ -1,15 +1,22 @@ - + + + + + + + Lua4Win +
-
+ -

Install

You can install it by using the .msi file here.

@@ -39,51 +46,48 @@ JIT: ON CMOV SSE2 SSE3 SSE4.1 AMD fold cse dce fwd dse narrow loop abc sink fuse Hello, world! >

You can use CTRL+C to escape the read-evaluate-print-loop. You can also write Lua programs with your favorite text editor and run them with $ lua filename.lua +

note.lua -
-
-
-
-- Create a note file with today's date in %APPDATA%
 local args = {...} -- extra arguments passed to the program
 -- Generate a filename
-local notes_folder = os.getenv("APPDATA")
+local note_f = os.getenv("APPDATA")
 local today = os.date("%Y-%m-%d")
 local note_name = table.concat(args,"-"):gsub("[%W]","-")
-local note_filename = string.format("%s\note-%s-%s.txt",notes_folder,today,note_name)
+local filename = ("%s\note-%s-%s.txt"):format(note_f,today,note_name)
 -- Create the file
-local fd = assert(io.open(note_filename,"w"))
+local fd = assert(io.open(filename,"w"))
 assert(fd:close())
 -- Open it in notepad
-os.execute("notepad.exe " .. note_filename)
+os.execute("notepad.exe " .. filename)
+  
$ lua note.lua my first note
+

Run lua --help for more options for the command line tool, and see the Lua Manual for extensive documentation of the Lua programming language and standard libraries. Also note LuaJIT's extensions

Installing Superpowers

You can use modules that implement more than the standard lua libraries by running the $ luarocks install >module name< command to download and install modules.

-
-
- color.lua -
-
+  
$ luarocks install easni
+ color.lua
local ansi = require("eansi")
 ansi.enable = true
 local green = ansi.toansi("green")
 print(green .. "> implying you need modules")
+  
$ lua color.lua
@@ -93,16 +97,13 @@ print(green .. "> implying you need modules")

Sister languages

Lua4Win makes it easy to download other programming languages that are distributed through the luarocks package manager. Simply luarocks install them like you would any other package.

Moonscript

-
-
- example.moon -
-
+  
$ luarocks install moonscript
+ example.moon
class Person
 	name: "Alex"
 	greet: => print("Hello, " .. @name)
@@ -115,22 +116,20 @@ with World!
 
+  
$ moon example.moon
 Hello, World!

Teal

-
-
- keys.tl -
-
+  
$ luarocks install tl
+ keys.tl
local function keys<K,V>(xs: {K:V}):{K}
   local ks = {}
   for k, _ in pairs(xs) do
@@ -144,6 +143,7 @@ print(table.concat(s))
 
+  
$ tl run keys.tl
 ab
@@ -155,7 +155,6 @@ ab

Lua4Win's luarocks configuration lives at [INSTALLDIR]/config/config-5.1.lua, and is a regular Lua file you can modify.

All of Lua4Win's binary packages are built using mingw64. If you intend to build your own modules they must be built with mingw64 if you want them to interoperate with Lua4Win-distributed Lua.

Some of Lua4Win's packages needed patching or modification, source code is generally mirrored at git.lua4.win, and packaging code is kept separate- usually in a *-packaging repo.

- - +
+
- -- cgit v1.2.3-55-g6feb