AoC-2022
minimicro-sysdisk
AoC-2022 | minimicro-sysdisk | |
---|---|---|
8 | 11 | |
0 | 21 | |
- | - | |
10.0 | 6.7 | |
almost 2 years ago | 9 days ago | |
MAXScript | MAXScript | |
The Unlicense | - |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
AoC-2022
-
Advent of Code (in MiniScript), Day 25
The challenge did inspire some ideas for new libraries and library functions. Over the course of the month, I created an aoc module with a variety of general utility functions that may make their way into the standard Mini Micro library; as well as a search module, which will probably end up as its own repo.
-
Advent of Code Day 18 Follow-Up
I've now created such a library, and redid last night's challenge using it.
-
Advent of Code (in MiniScript), Day 16
I'm using the list.combinations method (in my AoC module) to find all the different ways we can form setA (my valves) by taking n of the goodValves. Then, we find setB (the elephant's set) by simply removing each of mine from a copy of the full set.
-
Advent of Code (in MiniScript), Day 9
Oh, but I promised some pretty graphics, didn't I? Since I'm doing all this in Mini Micro, those are easy to add (you can see the code here). The GIF at the top of this post shows the movement of the rope for the Part B example. And here's the start of its motion for my real input file... though the full input makes it wander much longer, and much further from the origin. Enjoy!
-
Advent of Code (in MiniScript), Day 8
Once again, my starter program did me no good; nor did I need any of the stuff I've been gathering in my custom aoc module, or even the standard /sys/lib modules. The solution was plain, unadorned MiniScript. ❤️
-
Advent of Code (in MiniScript), Day 6
By this point I have a starter program which reads an input file line by line, has a place to calculate a result for each line, and then does some kind of summary of the results. I didn't need all that for this program, so I cut some stuff out, and (under time pressure) ignored other bits. But with a little more cleaning up, my solution boils down to this:
-
Advent of Code (in MiniScript), Day 5
Given the libraries I had, I don't see how. However, I may add some new tricks to my aoc module. Maybe I should have a "select" method that grabs a subset of a sequence (string or list) given a list of indexes. I could use this on each line to convert the raw input, like [Z] [M] [P], into just the letters, like ZMP (by doing line = line.select(range(1, line.len, 4))). Then I'd have a list of strings like:
-
Advent of Code (in MiniScript), Day 4
If you want to join me, please do! I'm posting all the code on GitHub, including my little lib/aoc module. I encourage you to join us on Discord too, where we can strategize and commiserate. See you there!
minimicro-sysdisk
-
The Making of Solitaire for Mini Micro
Mini Micro comes with a bunch of built-in playing card images which come from Kenney's Boardgame Pack. I love these card images, and when I started the project my goal was to demonstrate a game made using only these built-in assets.
-
Make a digital clock in Mini Micro
Among the built-in images in Mini Micro is /sys/pics/digits.png. It looks like this:
-
Shell Scripting with MiniScript
Here we're using shellArgs[1:] to get the list of files passed to the script, and then file.info to get some details about each one. This script skips directories (of course it could be expanded to handle those too), and then collects all the other files more than 30 days old, with the help of the dateTime module.
-
Version Checking in MiniScript
You can use this to make your code do different things depending on where it's running. For example, the Acey-Deucey game included with Mini Micro at /sys/lib/acey-deucey.ms is designed to work on command-line MiniScript, too. But the latter doesn't have the Sound class, so we "mock" that class at the start of the program, so the rest of the code doesn't need to worry about it.
-
MiniScript Ports
He's currently divided his work into two projects on GitHub: MiniScript.TS is the language core, while MiniScript-NodeJS adds Node.js support and a script-runner. The latter includes support for print and input, the import command, and a subset of the Mini Micro /sys disk.
-
Announcing MiniBASIC
This might be of interest if you already know BASIC, and want to quickly bang out a game or utility. MiniBASIC provides a good set of high-resolution drawing commands, suitable for making plots, graphs, and diagrams. It also has access to all the data on the built-in /sys disk, including stock images, sounds, and a complete English word list! And, being completely cross-platform, Mini Micro (and so MiniBASIC) runs identically on any desktop computer (and soon mobile devices, too). So if BASIC is already in your wheelhouse, MiniBASIC offers a great way to take advantage of these Mini Micro features.
-
Make a `rerun` command for Mini Micro
This uses a couple of tricks which you could glean from the startup.ms file on the system disk (/sys/startup.ms):
-
Advent of Code (in MiniScript), Day 13
So as usual, I come away with a realization for something that really ought to exist in MiniScript: an efficient sort algorithm that takes a comparison function as an argument. I'll code this up soon, and who knows, it might even find its way into a future version of /sys/lib/listUtil.
-
Advent of Code (in MiniScript), Day 12
One lesson learned is that I should always validate my function inputs. Had my findPath function simply checked that it was being passed two 2-element lists, I would have caught my error right away and fared much better. Grabbing code from somewhere else is no excuse; the first thing I should have done is examined the parameters, and added a quick qa.assert to me sure I call it correctly.
-
Advent of Code (in MiniScript), Day 8
Once again, my starter program did me no good; nor did I need any of the stuff I've been gathering in my custom aoc module, or even the standard /sys/lib modules. The solution was plain, unadorned MiniScript. ❤️
What are some alternatives?
adventofcode - Advent of Code solutions of 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023 and 2024 in Scala
minimicro-editor-themes - Custom colors (themes) for the built-in code editor in Mini Micro
advent-of-code-jq - Solving Advent of Code with jq
minibasic - BASIC interpreter for Mini Micro
Farmtronics - Stardew Valley mod that adds a Home Computer and Bots to the game
Starfarer
miniscript.org
miniscript-kt - Kotlin version of MiniScript (http://miniscript.org)
MCreator - MCreator is software used to make Minecraft Java Edition mods, Bedrock Edition Add-Ons, and data packs using visual graphical programming or integrated IDE. It is used worldwide by Minecraft players, aspiring mod developers, for education, online classes, and STEM workshops.