Religious Epics, both Modern and Classical

I am back to working on my father’s French epic manuscript index. I use “Epic” in the literal sense; stories about Charlemagne and his cast of characters.
I’ve gotten frustrated at getting my father to do some of the work, so I’ve decided to make an end-run around him and just try and do it myself. Which I probably should have done in the first place. In the past, I’ve gotten some of the data into a website, but that is mostly the actual libraries and the manuscripts. I still have to get the contents of those manuscripts.
I have all the files that he wrote thirty years ago. The first problem is that these files are written in something called “Waterloo Script”. There is nothing I’ve been able to find that reads those files or converts them to anything modern. I have not even been able to find documentation of it. So I will have to write a converter myself.
The files are basically text with a lot of codes to do different things. I have to extract the data out of it and eventually put it into SQL. However, I’m going to put it into XML as a middleman first and then use XSLT to convert as appropriate. That way I can convert to HTML easily to see how things are going. (I know that’s a lot of acronyms, but they make sense.) I am tempted to try and write something that will be generic and handle any Waterloo Script file, but that may be too ambitious.
My first task was to pick a language to do the parsing in. This was important.
I have most of my experience in C# or Swift these days, but those are full featured languages tied to Microsoft and Apple respectively. And I don’t know how long they will last, as they are specific to an operating system. I need to use an interpreted language that can be used on any machine. I was looking at this as a learning opportunity to get better with a language I don’t use much.
My first thought was Perl. It is an old language but still used and is well known for being good at text parsing. Sounds ideal. I even have the Camel book that is considered its bible. I haven’t looked at it in 15 years, but an old language doesn’t change much.
The other thought was PHP. It is a language more devoted to web servers and is what I will be using to serve the website eventually, but it can be used for parsing as well. It just isn’t known for it.
I could do it in Ruby which I’m learning, but that is VERY tied to web servers and will come with too much baggage that I don’t want.
I wasn’t sure which to use. I looked online for advice. But most articles seemed to be more religious than secular. People are very devoted to a language they have spent time learning.
For Christmas I wanted to start work on this project. But I didn’t want to take a laptop around with me during my vacation. I have a new iPad Pro with a keyboard; can I do work on that? I even have an app, Coda that should allow me to edit files. Unfortunately, the iPad doesn’t have a lot of compilers on it.
So, I loaded a whole bunch of files on to my web server. The plan was that I could use the iPad to edit the files remotely and then run them off my server. I wouldn’t be able to do development on an airplane, but who am I kidding? There is no way I would be THAT motivated.
I did some experiments to prove it could work. And I had a magnificent failure. The concept worked in practice and I was able to do exactly what I had theorized. However, I learned something else that changed everything.
In this day and age, being a programmer is fairly language agnostic. Languages have evolved a lot, but mostly in parallel. Many are derived from C/C++ and if you know the basics, it is easy to move from one to the other. (The valuable software development skills are more along the lines of being able to think properly.) That was the thought process I had going in. Although Perl was based off of C, it was nearly 30 years old. It did a lot of things in a way that no longer felt natural. It would not be easy to do development in it.
PHP was much closer to C/C++. That would be the better way to continue.
But then I realized, there is an even better option. If I wanted to use something not too foreign, why don’t I use Javascript? I’ve developed other things in it. I hadn’t thought of it before because it is a language for running off a client machine, not a server. But, it is powerful, and it will also run in any web browser. And my iPad has a web browser.
Using Coda, I was able to get the data on to the iPad and run it from there. Then I could actually use it on a plane if I wanted. The biggest issue was accessing the files wasn’t natural. Every other language had ways to open a read files from a file hierarchy. Because Javascript assumed it would be running on a client machine it could only access them from a URL, but I could work around that.
It has so far been working quite well.

Living epics

I got back to the work on the manuscript index. I finally finished the logic on the web pages. They all work and show what they need to. The links between them all are operating as expected.
So, let’s make this live!
I did some experimenting, and actually got it up on my website. There were a number of issues that I had to get through first.

  1. You need to actually put data in the database for the website to access. Simple enough, but it is an important step not to miss.
  2. The code for checking that parameters aren’t being made evil, actually requires a connection to the database first. It worked locally without it, but on the website, not so much. That was confusing, but a good lesson to learn.

I probably should place a link to it here, but I don’t feel THAT confident about it. The biggest reason I even did this, is so that my father, who is the author of all the data, can look it over. And that leads to the chief reason not to let people know about it: it doesn’t look right.
My father is preparing the data from ancient databases and word processing documents from twenty five years ago. (And that is prehistoric in computer terms, not just ancient) that lived on a mainframe computer. Since the programs and computer don’t exist anymore, a certain amount of translation has to happen. It hasn’t all been completed. And some of the data is oddly missing. I know there is a manuscript in Innsbruck, with a call number of “Codex 1342”, but I have no idea where in town to find it. There is a library “Oesterr. Nationalbibliothek (anc. d’un couvent d’Autriche)” in Vienna, with a single manuscript. (Did I mention that the site is supposed to be in French?) It does not have a call number, and I have no other information about it.
Hopefully, things will start to make more sense when we start getting the information about contents of each manuscript in. Plus we will get to list all the epics/legends that have been written.
Hint: Roland figures heavily.

Working on libraries

It wasn’t the authors page I was supposed to make, it was the Libraries page. Every manuscript is located somewhere and it seems the easiest part of the process to tackle, because it is simple. The other parts look like a headache, because each manuscript can have several parts that can each refer to a different epic, and they might be in poetry or prose.

It would be very convenient if every library in the world had a unique identifier associated with it. I could use that as the key to the database. Because it doesn’t, I have to make up my own that will only be true for this site. I’d rather use something an international body agreed on.

When my father wrote this, he wasn’t thinking in terms of database, so it is difficult to organize. It is also written in French, because it was dealing with Medieval French Epics. I don’t read French, so I can’t just look at what he wrote and figure out what is going on. It looks like a lot of the data uploading will need to be done by hand. Thankfully my father is onboard and looking through it.

I’m making progress on the PHP side. The hardest part is getting used to using a non-compiled language. If this was C++, it would happily inform me that I haven’t declared a variable, or I forgot a bracket. PHP is only processed when it is opened in a webpage. So if my code has an error, I won’t find out about it until after I run it. And then there seems to be a dearth of error messages. And if I accidentally misspell the name of a variable, the page will assume it is a different one.

Blech!

I should look into getting an IDE for this. That might make life easier.

Testing, testing…

Alright, first actual post.

The project I’ve decided to work on is for my father. He, long ago, wrote an index to Medieval French Manuscripts. He never finished it, and then went on to other things. I think that is a shame and something needs to be done about it. So, I’m going to see if I can.

At the very least, this looks like a good way to learn PHP and MySQL. I’ve already started the process by downloading MAMP. So I’ll be playing around with that and seeing what trouble I can get into.

First goal I think is to make an Authors page.