No description
| pika | ||
| .gitignore | ||
| lua-lib-scm-1.rockspec | ||
| makefile | ||
| README.md | ||
pika - lib.lua
This is my first lua library. It will primarily be used for advent-of-code and was started in late 2025.
installation
-
Clone this repo.
-
cdinto the repo folder. -
Run
sudo luarocks make -
Use the lib.
Currently there is not much you can do.
examples
Just giving the answer..
local aoc = require("pika.aoc")
local int = 5
aoc.answer(int)
OUTPUT:
$ lua init.lua The anwser should be: 5
Store all lines inside a file as separate entries in a table
local aoc = require("pika.aoc")
local file = arg[1]
tbl = aoc.file_to_tbl(file)
usage:
$ lua init.lua ./path/to/file.txt