Lua 5.5.0 now available
https://groups.google.com/g/lua-l/c/jW6vCnhVy_s
Changes since Lua 5.4
https://www.lua.org/manual/5.5/readme.html#changes
#adventOfCode day 12 in #LuaLang
https://gitlab.cs.washington.edu/fidelp/advent-of-code-2025/-/blob/main/12.lua
I wasn't expecting that to work!
And as usual, AoC is a good source of stressing cases to expose crashes/bugs in the #ticalc Lua port :p
Merry Christmas!
This is the first Advent of Code I've ever completed!
#adventOfCode day 10 in #LuaLang and #Mathematica
https://gitlab.cs.washington.edu/fidelp/advent-of-code-2025/-/blob/main/10.lua
Ok, finally all caught up and looking forward to some sleep and Day 12!
After a night and day in math land confusing myself with row echelon matrices and intersecting N-spaces, I remembered that I have a Raspberry Pi that for some reason has free preinstalled Mathematica.
So my Lua program code-gens a Mathematica program, which then runs on the Pi to solve Part B!
This generated code is checked in if you want to look at it - it's several thousand lines of simultaneous equations being solved with constraints applied: https://gitlab.cs.washington.edu/fidelp/advent-of-code-2025/-/blob/main/10.m
Given all that, it's pleasantly fast. Mathematica over VNC on wifi is pretty laggy but the actual execution couldn't have taken more than a second or two!
(Yes, I did attempt to solve the equations on the TI-92+ #ticalc, as it has a very capable computer algebra system, but I couldn't figure out how to apply all the necessary constraints -- maybe later.)
#adventOfCode day 11 in #LuaLang
https://gitlab.cs.washington.edu/fidelp/advent-of-code-2025/-/blob/main/11.lua
EDIT: wow I added 3 lines and now this is one of my fastest programs
Yeah, I don't have day 10 part B results to share yet. However, I took a break from that to do day 11!
It's brute force with a small twist to make it finish before the heat death of the universe. And it's based on intimate knowledge of my input file, so I don't know if it generalizes to others. At least the program itself is short....
Bonus: puzzle input visualized in graphviz!
#adventOfCode day 9 in #LuaLang
https://gitlab.cs.washington.edu/fidelp/advent-of-code-2025/-/blob/main/09.lua
I'm very pleased with the speed here, although I'm sure looking at other peoples' solutions will deflate some of that pride.
The feasibility of the whole solution relied on a big insight I got while staring at the grid far too long. To avoid spoilers, I won't elaborate here.
My original version took about 4 seconds on PC: I owe some of the later ~20x optimizations to studying a friend's Rust solution after we both got ours working.
#adventOfCode day 8 in #LuaLang
https://gitlab.cs.washington.edu/fidelp/advent-of-code-2025/-/blob/main/08.lua
Eric is sadistic putting the first big problem on a work night, huh?
I'm lucky that breaking Part A into steps, then stringing together well-intentioned but non-optimal solutions to each step, was good enough to return an answer before the heat death of the universe.
I'm not sure how to make my Part A more efficient - it is O(N2 ) and takes a good 500ms by itself on my PC. It'll be really interesting to learn faster ways from other peoples' solutions.
My Part B is doing obvious repeated work. I left some performance on the table to solve the problem sooner using building blocks I already had from Part A.
Getting this working on a TI-92+ or other retro platform seems like a daunting task!
#adventOfCode day 7 in #LuaLang
https://gitlab.cs.washington.edu/fidelp/advent-of-code-2025/-/blob/main/07.lua
After a couple of days where the TI-92+ has been disagreeable, it was refreshing to get a puzzle where the Lua solution Just Works without memory exhaustion. Though, speedy it ain't. And when I got my camera out to photograph the real calc, I found it had crashed, so you get a boring emulator screenshot of it working instead.... ;)
I'm a little confused why it's this slow on the #ticalc: something about it seems difficult compared to the other working examples. I think it's because my approach generates lots of garbage so Lua's gc is working hard.
I just completed "Laboratories" - Day 7 - Advent of Code 2025 #AdventOfCode https://adventofcode.com/2025/day/7 in #lua #lualang
I just completed "Trash Compactor" - Day 6 - Advent of Code 2025 #AdventOfCode https://adventofcode.com/2025/day/6 in #lua #lualang
Another fun example on how requirements can change from one instant to the next 😀
For anyone interested in the port of #LuaLang I'm using for #AdventOfCode on the #Ti92 Plus graphing calculator, I've uploaded the patched Lua sources and prebuilt binaries for TI-89 and TI-92+ to https://gitlab.cs.washington.edu/fidelp/lua92
Please let me know if you try it out!
#adventOfCode day 6 in #LuaLang
https://gitlab.cs.washington.edu/fidelp/advent-of-code-2025/-/blob/main/06.lua
I'm steadily accumulating a backlog that I need to rewrite into C for the #ticalc. I'm really jonesing to switch back to the DOS-based HP 200LX palmtop... 640K RAM feels mighty spacious in comparison to the calculator. Maybe in my copious spare time I need to track down the memory corruption problem that's stopping the 16-bit MS-DOS Lua from working.
#adventOfCode day 5 in #LuaLang
https://gitlab.cs.washington.edu/fidelp/advent-of-code-2025/-/blob/main/05.lua
The #ticalc doesn't make it through input parsing before exhausting memory. It will be necessary to rewrite in C again.
I just completed "Cafeteria" - Day 5 - Advent of Code 2025 #AdventOfCode https://adventofcode.com/2025/day/5 #lua #lualang
Again, a nice one today.
Forces you to think about your approach and find a performant solution, as usual.
https://codeberg.org/slang75/AdventOfCode/src/branch/main/2025/05
My port of #LuaLang to TI-92+ had a bug where math.huge was accidentally NaN instead of +∞. This is now fixed, so we can infinitely loop the fun way.
I like that the screen's slow update speed is clearly visible in the photo....
Doing Advent of Code for the first time. Didn't expect to have that much fun! Just finished Day 4 and cant wait for the new puzzle to come up. Using Lua is fun and easy. Maybe later I will port my solutions to C.
I just completed "Printing Department" - Day 4 - Advent of Code 2025 #AdventOfCode https://adventofcode.com/2025/day/4 #lua #lualang
#adventOfCode day 4 in #LuaLang
https://gitlab.cs.washington.edu/fidelp/advent-of-code-2025/-/blob/main/04.lua
Unfortunately, it will not fit in the TI-92's RAM due to how I'm representing the grid. Unless it can be optimized more....
#adventOfCode day 3 in #LuaLang, update: Execution time on my real #ti92 was 17m12s.
The TI-92+ appears to run Lua programs at 1/10,000 the speed of my Raspberry Pi 2B: that is, take the RPi execution time, shift to the next SI size category (like milliseconds to seconds) then multiply by ten, and you'll be in the ballpark.
Meanwhile, the Raspberry Pi is about 1/50 the speed of my desktop.
#adventOfCode day 3 in #LuaLang
https://gitlab.cs.washington.edu/fidelp/advent-of-code-2025/-/blob/main/03.lua
The program runs successfully in TiEmu with the emulation speed multiplier unlocked. It has yet to be seen how long it'll take on the real calc...