So I've temporarily ditched the Persona Compendium project, mainly because I can't seem to get the boost::regex library set right. There's supposedly some experimental setting that lets you keep ALL of the matches captured from a capture group using regex_search. Normally if the regex object has a capture group set and finds multiple matches during regex_search, it will only keep the last one. However, there's something you can define in the library code that will change the match_results<T> class so that instead of returning a container with all of the captures from the last match, it returns a container of containers that contains all of the captures from all of the matches.
Unfortunately, I just can't seem to get my library to re-compile to include this change, and until I do my search algorithm for the Compendium is worth beans.
I also had another minor project that was more of an exercise in trigonometry than it was an actual coding challenge. Basically you put in the geographical coordinates for any two points on Earth, and it would calculate the distance from point A to point B moving along the surface at sea level, as the crow flies. It involved a lot of angles and circles and nonsense, but it's hit a snag; I don't know if there's a function in the standard C++ library to calculate trigometric functions like sine, cosine, etc., and I can't seem to find a library for it in Boost.
Finally, I've been writing a small program for parsing text files. Well, what it does is it reads from a file and then writes to a new file, while passing the fstream objects to separate parsing algorithms. The driver is designed to work with pretty much any mutator method that takes references to the input ifstream object and the output ofstream object as parameters - in other words, you write what you want the parsing method to do, paste the declaration into the x.h file and the function code into the x.cpp file, then go to the main.cpp file and call the function in between the comments so that it calls the function after initializing and checking the file streams but before it closes them down.
As for the function, for now it's supposed to split the input streams using tab and newline characters as delimiters, then re-arrange them. This is because the text file I'm trying to parse is text ripped from a .pdf version of a guide book for a table-top RPG that my friends and I are playing. The text from the .pdf file is displayed exactly as it was on the .pdf, which had at least 2-3 columns per page. In other words, the paragraphs in each column are out of order, and my first parsing algorithm will go line-by-line and re-arrange the sentences so that they read properly.
_________________
"Yeah, so this one time, I tried playing poker with tarot cards... got a full house, and about four people died." ~ Unknown comedian
Happy New Year from WP's resident fortune-teller! May the cards be ever in your favor.