A large part of the software I write in my spare time I write in bash. Why bash? Because I can write it on my tablet without the need for a compiler app and the terminal emulator app I use I already use(d) for other tasks. Apart from that it is a fun challenge to use the language for things it wasn't meant for. Similar to cycling with crossed arms. Not quite as one should, but when you manage it, it is pretty cool.
I ave a few scripts I want to share. For Windows users I can recommend WSL, but Cygwin or MinGW probably work fine too.
Patience is a cardgame. When I saw the playing card characters in the utf-8 character list I immediately thought "I need to use these in some way" and started creating patience.
I release the code for patience under the GNU agpl license.
The code for patience can be viewed here or downloaded directly.
The Monty Hall problem is an example of how probability can go against intuition. I wrote this script on a flight from The Netherlands to Sweden and added the finishing touches later.
I release the code for patience under the GNU agpl license.
The code for Monty Hall can be viewed here or downloaded directly.
This is one of my first bash scripts and it has been extended under the years to improve usage. The main application is usage for debugging of software. For example make can be called each time main is updated. The script runs a command each time a given file is updated.
I release the code for run on save under the GNU agpl license.
The code for run on save can be viewed here or downloaded directly.
I decided to challenge myself and set out to "abuse" Bash to create a game using machine learning. I had the idea for some time but never found a reason to create it myself. There are still some issues to iron out, but the game can be played and it learns from previous games. But something is wrong and I haven't been able to find out where the issues are yet. Still I want to put it out there already as I will probably shift to some of my other hobby projects for a while.
This version of the game tic-tac-toe may not seem very good when you start out playing, but that is because it only knows the rules of the game, not the strategies involved. Neither does it calculate the best move by going through all the moves of the game. Well, that last part is not entirely true. It does kinda go through all the options. But it does this by playing. Each time you play the, program will learn if moves were good or bad. After a while it will stop using the bad ones and prefer the good ones, thus becoming a stronger player.
I release the code for run on save under the GNU agpl license.
The code for run on save can be viewed here or downloaded directly.
When I write code I usually use doxygen to document the code. Doxygen does not support Bash. Other available scripts did not match my whishes. To remedy that I have written my own. This does mean it mainly supports my code style. I hope to improve this in the future.
Please see the How to use section in the generated Doxygen documentation :p.
The resulting documenation can be found here. This includes the documentation for all scripts on this page.
I release the code for Doxygen filter for Bash under the GNU agpl license.
The code for Doxygen filter for Bash can be viewed here or downloaded directly.