Projects & Scripts

Blog & Random Stuff

Congrats on finding my website!

Anyway hi, I'm a linux hackerman in his early 20s who likes to code too many things at once.



Kovarust is my attempt at a free Minecraft clone. I'm aiming for it to be a viable replacement for Java Edition eventually. It's written in Rust, and will hopefully be faster and more versatile than the original Minecraft, with as many features actually implemented as plugins as I could manage.

I've redesigned every aspect of this thing about 5 times before it's even compiling, so it'll taking me a while to get it right, but it is progressing.

Tetris

Back in the good 'ol days before I started learning Rust (and subsequently rendered my PinePhone useless by desoldering its SIM card reader using rustc), I just felt like playing Tetris.

So in between pretending I was learning how to do loops in java for uni, I ended up making this in a day in C. It's under 400 lines long, so it could be used to dissect and learn programming, I guess.

Random scripts

Just a collection of utilities/games I wrote in zsh for one reason or another. Note you'll probably have to chmod +x to run these. Also I haven't tested them in bash becuase it's gay and you should be using zsh.

bytecalc is a byte unit converter, that is, working in multiples of 1024. Sometimes you just want to dd exactly 3.14GB, but couldn't be bothered calculating that yourself, and then second-doubting whether it actually takes size in MB or KB - with bytecalc 3.14gb mb it spits out exactly the size you want in the unit you want.

list is a list iterator - basically, loop over each line in a list and run a command on it. If the command works, remove the line, otherwise keep it to maybe retry later. I use it for mass curling memes and ignoring the URLs with duplicate filenames until after I categorize the previous batch.
NO MEME LEFT BEHIND

sc's just my screenshot command, using shotgun to select a window/area and crud to actually get the picture. Then it either copies it to the clipboard or saves it to a file, if one is specified.

pong.sh is Pong in shell. W/S & J/K to move the paddles. Good luck with the collision system.

1248.sh is a minimal shell implementation of the classic 2048, but in a terminal and with Vim controls (also featuring saving/loading games). To save on space, tiles are incremented linearly instead of doubling (2048 = 2 ^ 11). If you have any other questions, consult the sauce.

readme lib.rs : docs.rs

arg-kit

If you're here from crates.io and wondering where GitHub is, it's gay and I refuse to use it. The sauce is available by clicking the title for the .crate, or link Cargo directly here

arg-kit is a featherweight toolkit that helps parse arguments using one of Rust's most versatile and powerful syntaxes: match {}
Do you really need bloated proc macros when collecting arguments can be simplified to a .next()? You have zero indication of what's going on under the hood, so you can't implement your own behaviour.

That is why I don't call it an "argument parser" on its own. Your program parses the arguments, this just helps iterate over it, like so:

let mut argv = std::env::args();
for_args!(argv; {

arg!(-h | --help) => eprintln!("{HELP_TEXT}"),
arg!(-v | --value) => do_something(argv.next()?),
unknown => panic!("Unknown argument {unknown}"),

});

readme

ronpage

ronpage is a very simple HTTP router in Rust, born out of a need of a secure replacement to my shell and later Lua servers (don't even ask).

This thing doesn't take commandline arguments; routes, listening port, and all the other options are all defined in a .ron file in the working directory (hence the name), and can serve either file content or hardcoded data.

I debated with myself whether to add some sort of scripting - on one hand it would massively increase the possibilities of what you could do with it, but on the other there's too many ways to accomplish it.
What language should it be in? Lua? I don't want to bloat the binary and runtime, and I surely won't be able to write a nearly as good interface for it as all the other similar projects already have.

So, I've settled on the most universal interface when it comes to passing around HTML: that is, HTML itself. In less cryptic terms, it's a reverse proxy.
You can plug whatever you want on the other side, you can run an actual server, opaquely forward to another website, or make a horrible PHP knock-off with Perl... which would completely invalidate the whole reason for this project, but whatever.


Side-note: Look up bashtml, there's a joke AI article floating around but the underlying concept is actually fine, as long as you can statically compile everything and don't handle any user input - which fits my workflow perfectly well.

It lets you do fancy stuff you can do with almost any other framework, like write content in Markdown, convert it to HTML with pandoc, combine templates generated with in-line loops, and even statically cache all of the above, all pre-compressed instead of processing every identical response.
⑨/10 literally use for every project.

Cargo Repository

This website doubles as a Cargo repository for some of the above projects, if crates.io ever goes down (though I'm not hosting the dependencies... might be a good idea even if they'd massively bloat everything).
Another caveat is I'm not gonna host each individual version of my projects, only the latest, so you might need to update your .lock file occasionally.

To use this, append this file (click title) to your .cargo/config.toml, and when adding dependencies with Cargo, use:

cargo add --repository tesseract ...