Clir List Examples


The default user account contains an examples folder which includes lists that were written to show ways that clir can be used to manage routines. Non-business examples were chosen in order to provide content that is easily understandable.

Travel

The examples/travel folder contains a MAIN list along with many other lists that it directory or indirectly links to. This is a list that covers all of the tasks involved with travel, organized roughly chronologically. The act of packing is only one of set of tasks, taking place after a number of preparation tasks. There is a section at the end that covers the things that need to be done when returning home.
? (question) travelTypeBizTrip
[
  Business trip
]
? (question) internationalTravel
[
  International travel
]
Preparation     Days before
    One day before
Packing
    Luggage
    Shoulder bag
  & (question) methodTransportDriving
  {
      Pack supplies for the drive
  }
  Day of leaving
  Post-trip tasks

MAIN travel list. List links are in blue with contained header text for each. User prompt questions are in green.

It is apparent that MAIN contains mostly links to other lists. This linking allows the list to be short, and to be grouped in a way that makes sense. When it is necessary to add or update a part of the traveling routine, it is easy to see which linked list will apply.

For example, the method of transportation for a trip has a big effect on travel preparations. But many parts that are the same regardless of whether you are flying or driving. With the feature of separate linked lists, those things (e.g. the clothing you pack) can be individually defined.

Another advantage of linking is re-use. Let’s continue the example of packing travel clothing, and say that the purpose of your travel is to attend a wedding. The collection of links can contain a list for formal clothing to pack. But this same list could also be used when preparing for a local wedding which doesn’t involve travel.

Having a single subject written in its own list also makes it easy to keep things up-to-date when something changes. For example, you might have a list for your laptop computer that contains the power adapter, specific cables, an additional battery pack, or thumb drive. Such a list could be used not only for travel packing, but also for putting in your work bag before a remote meeting. Eventually that laptop will be replaced with a new model that has different cable types or other components. At that time, only the laptop list will need to be updated with the new model. Every other list that links to it will be automatically updated.
Laptop
? (question) businessUse
[
  Using laptop for a business trip or offsite work visit?
]
& (question) businessUse
{
  Wireless mouse
  Spare USB drive for file transfers
}
? (question) isLaptopFullyCharged
[
  Is the laptop currently fully charged?
]
& (question) isLaptopFullyCharged
{
  ? (number 1:100) laptopRuntimeHours
  [
    How many hours does the laptop need to run?
  ]
  = needLaptopCharger = laptopRuntimeHours > 10
  & (question) needLaptopCharger
  {
    Laptop power supply
  } else {
    = needLaptopBatteryPack = laptopRuntimeHours > 5
    & (question) needLaptopBatteryPack
    {
      Battery pack
    }
  }
} else {
  Laptop power supply
}

laptop packing list. True/false conditionals are in orange. Red lines are expressions that test the number laptopRuntimeHours input against fixed values for a True/False result.

There are many conditionals within the different travel lists. Some of these include the type of travel (e.g. business or vacation), whether it is international travel, the type of transportation (e.g. flying or driving), the type of accommodations (e.g. hotel, vacation rental, staying with family), whether a bag is checked if airline travel, and the type of clothing to pack.
Conditionals make the lists very customizable, allowing all of the “little details” to be captured. A conditional prompts the user with a single question, freeing them from having to think about all of the different places in the routine that are affected by it. Without this ability, the traditional solution is to lump-together all of the affected tasks, and this ruins the chronological order of the list.
For example, consider the conditional for whether the trip is international. The example travel lists contain these tasks in various places:
Task Where in the Routine
Check passport expiration date Preparation days before
Setup international phone access Preparation days before
Pack an electrical outlet adapter Day before
Bring exchange currency Day before
Bring passport When leaving

If the user answers yes to the international travel prompt, then all of the above tasks are automatically inserted into the various places in the resulting travel checklist.

Recipes

Recipes are traditionally written as static lists, but with any food preparation there are many possible conditionals, such as:
  • • How many servings to prepare
  • • Possible food substitutes (sugar, gluten, food allergies)
  • • Cooking time adjusted for high altitude
  • • Optional garnishes
Clir software can be used to write a recipe that can account for any conditional, and do so right when it’s time to make the dish.
The examples/recipe folder contains a few sample lists that contain both the ingredients needed and the steps required. There are three separate pie recipes, but each one links to a single list for a pie crust. If you want to adjust the crust recipe based on an improvement or for personal taste, then changing that one list is all that’s required. The recipes for apple and peach pie are very similar because both use a top and bottom pie crust with fruit filling. The quiche recipe uses only a bottom crust, and sets the value of bottomCrustOnly to true. This automatically halves the ingredients and adjusts the baking steps, while still linking to the same pie crust recipe list.
There is also a BISCUIT recipe, which illustrates the use of varying quantities based on the desired number of servings.
? (number 1:6) nBatches
[
  Enter number of batches (8 biscuits per batch)
]
= nBiscuits = 8 * nBatches
= igFlourCups = 2 * nBatches
= igBakingPowderTbsp = nBatches
= igSugarTbsp = nBatches
= igSaltTsp = nBatches
= igButterTbsp = 6 * nBatches
= igMilkTbsp = 12 * nBatches
Ingredients
  $igFlourCups cups all-purpose flour
  $igBakingPowderTbsp tbsp baking powder
  $igSugarTbsp tbsp sugar
  $igSaltTsp tsp salt
  $igButterTbsp tbsp butter
  $igMilkTbsp tbsp whole milk
Directions
  Pre-chill butter or take directly from freezer
  #Skip some steps for brevity...
  Serve $nBiscuits biscuits

BISCUITS recipe list. Numerical expressions are in red. Comment line in gray.

Here, ingredients are multiplied by the number of batches to bake. These values are then inserted in normal text lines using the $ operator. This feature is also useful for labels and custom text.
These and many more example lists are provided with a base user account.


For more about how the clir language works, visit the markup language wiki page