Llama
Luau Library for Immutable Data
Install / Use
/learn @freddylist/LlamaREADME
⚠️ No longer maintained ⚠️
Alternatives:
Hello all! Since I do not do much Roblox game development these days (among other reasons), I will no longer be maintaining Llama.
Thank you to all of Llama's contributors, and I am verry sorry for any inconveniences I have caused.
If you have a good alternative to Llama, email me at llama@freddylist.xyz so I can link to it in this readme and archive Llama.
I recommend you do not fork Llama for these reasons:
- Runtime typechecking (present in Llama) is not really needed anymore with the advent of Luau type analysis.
- The tests are a bit of a mess.
- I'm sure Llama could've been designed better.
- Many other minor reasons...
If I do return to Roblox development in the future and no alternatives have been created yet, I may create a new immutable collections library. I will then hopefully have more experience with open-source projects and software development in general.
Thank you all again!
<h1 align="center">📚 Llama 🦙</h1> <div align="center"> <a href="https://github.com/freddylist/llama/actions"><img src="https://github.com/freddylist/llama/workflows/CI/badge.svg" alt="GitHub Actions Build Status" /></a> <a href="https://freddylist.github.io/llama"><img src="https://img.shields.io/badge/docs-website-green.svg" alt="Documentation" /></a> </div> <div align="center"> Lua Library for Immutable Data </div> <div align="center"> <img src="docs/img/favicon.ico" width=256 height=256 alt="Llama"></img> </div>Installation
There are a few ways to get started with Llama.
Method 1: Import model file
- Download the
.rbxmxmodel file from the latest release on the Llama releases page. - Insert the model anywhere in a Roblox place!
Method 2: Good ol' copy + paste
- Copy the
srcdirectory of Llama into your project. - Rename it to
Llama. - Make sure you put
tunder the Llama directory. (this step will hopefully be resolved in the future by package managers or Luau type-checking) - Use something like Rojo to sync your project to Roblox Studio!
Method 3: Git submodule
- Navigate to where you want to keep your submodules in Git bash.
- Run
git submodule add https://github.com/F-RDY/llama.git. - Using something like Rojo, set up your project to sync
Llama/srcinto Roblox Studio!
Method 4: Package manager
Coming Soon™
Usage
Basic usage
To use Llama, simply require it as a module from where you installed it! It is also recommended that you set Llama.Dictionary, Llama.List, and Llama.Set to their own variables; otherwise, you'll be typing a lot!
-- Other modules...
local Llama = require(LlamaPath)
local Dictionary = Llama.Dictionary
local List = Llama.List
local Set = Llama.Set
Usage with Roact and Rodux
Rodux requires your state to be immutable, so Llama is a great choice for manipulating it!
local function reducer(state, action)
if action.type == "Add" then
return Dictionary.merge(state, {
counter = counter + 1
})
elseif action.type == "Subtract" then
return Dictionary.merge(state, {
counter = counter - 1
})
end
end
Visit the docs for examples and API reference.
Special Thanks
- Mathilde for the Llama icon
- Llama's contributors
What's in a name?
Llamas are members of the Camelid group of mammals along with alpacas, camels, and dromedaries, which are known for being very stubborn but reliable animals.
Related Skills
node-connect
347.2kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
108.0kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
347.2kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
347.2kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
