Let's destroy everything! (alt: configuring pt. 2)

Now that you know it works, it's time to exit Apollogeese (hereafter 'Geese') for now. Open up that apollogeese.conf and just clear it out. Make sure you've set your IDE or text editor to C-syntax; CLON stays true to the heritage.

We're going to get familiar with both the design philosophy and the language at the same time. The first steps of this process will be made by reproducing the simple test situation we had just now, except all over again.

Some boiler-plating

Place an opening and matching closing curly bracket in the file, like so: {}.

Geese will probably bark at this minimalist artwork. This is expected behavior, given it requires some information to be present to 'boot' properly.

{}

Internally, {} will translate to a map. For those who are anxious to read the Wikipedia-article on this: it's a list where items are assigned to names. If there's nothing between the curly brackets, there's nothing in the map.

Names denoting similar concepts are: Dictionary, dict, HashMap, lookup, KeyValueStore

Plug-ins

First, the 'bootloader' needs to know what components (hereafter 'Services') should be put available for use. Plug-ins come in DLL-files. We may configure what DLL-files we require, in the empty map you just made. Start of by assigning an empty array "[]" to plug-ins:

[]

[] will translate to an array. It's not entirely unlike a map, except it doesn't have named items. Just items in some particular order. Once again, if there's nothing between the brackets, it's empty.

Names denoting similar concepts are: List, Enumerable, Collection or Concatenation.

This loads precisely zero plug-ins and thus zero Services. We however need 'Template' from 'OutputComposing.dll' and 'HttpService' from 'BasicHttpServer.dll' for our experiment. Add these DLL-names to the plug-ins-array like so:

Aside from the 'Template' and 'HttpService' we require, Geese will also load any other Services available in these DLL's. We're not going to worry about this too much.

What the f?

The parser turns f-prefixed string literals into absolute paths by concatenating the parent directory of the configuration file and the remaining string literal.

For example: f"pie.txt" in the file /home/rob/test.conf will be stored in memory as /home/rob/pie.txt.

The 'f' is simply short for 'file'. This might upset you. We urge you to make tea if this happens to be the case. If it doesn't, still make tea.

For Instances pt. 1

It's time to use the available services, now! Under the plug-ins-line you just added, add another line assigning an empty map to instances, like so:

You may now run Geese.exe. It will execute and sit happily, but it will not do anything because we haven't actually added any services to this instances-map. Close Geese again.