this post was submitted on 26 Jun 2023
1 points (100.0% liked)

Lua

331 readers
1 users here now

Lemmy community dedicated to the Lua programming language.

About Lua

Lua is a powerful and lightweight dynamically typed programming language, often embedded into applications to extend their API.

Resources

lua.org - official website
lua.org/pil - book
lua.org/manual - documentation
luarocks.org - package manager

Rules

You may read full set of rules here.
Too long; didn't read:

  1. Posts must relate to Lua
  2. Use descriptive titles
  3. Provide reproduction code
  4. Information about environment

founded 1 year ago
MODERATORS
 

Hi everyone!

I just wanted to share a small template library and supporting program I wrote using Lua (specifically wrote against LuaJIT and Lua5.1).

I haven't found any existing template engine that really fit my needs. The main one I saw was Jinja2, but it required pulling in Python, which on a lot of environments was a bit more of an ask than I really wanted to deal with (especially in enterprise environments). Many others I've tried over the years seem not to throw errors when a variable is referenced, but not defined, or at least the ones I could get testing with in about 15 minutes.

Can't promise it's perfect, but it replaced my need to create a templated text document for my RPG character that I had written in M4, and I have had a lot of instances where I wanted an easy-to-use templating engine for configurations.

no comments (yet)
sorted by: hot top controversial new old
there doesn't seem to be anything here