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.
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 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:
? (question) travelTypeBizTrip
[
Business trip
]
? (question) internationalTravel
[
International travel
]
Preparation
[
Business trip
]
? (question) internationalTravel
[
International travel
]
@(global) examples/travel/prep/days_before
{
Days before{
}
@(global) examples/travel/prep/one_day_before
{
One day before@(global) examples/travel/prep/one_day_before
{
}
Packing
@() examples/travel/pack/luggage
{
Luggage{
}
@() examples/travel/pack/shoulder_bag
{
Shoulder bag@() examples/travel/pack/shoulder_bag
{
}
& (question) methodTransportDriving
{
{
@() examples/travel/pack/driving/supplies
{
Pack supplies for the drive{
}
}
@() examples/travel/prep/out_the_door
{
Day of leaving{
}
@() examples/travel/post/common
{
Post-trip tasks@() examples/travel/post/common
{
}
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
Spare USB drive for file transfers
? (question) businessUse
[
Using laptop for a business trip or offsite work visit?
]
[
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?
]
[
Is the laptop currently fully charged?
]
& (question) isLaptopFullyCharged
{
{
? (number 1:100) laptopRuntimeHours
[
How many hours does the laptop need to run?
]
[
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}
} else {
}
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
= igFlourCups = igFlourCups * nBatches
in order to multiply the number of cups by the number of batches. Another way to do this is to define the ingredient as text:
= igSugar = "1 tsp"
and then calling a python script, for which clir has built-in support, to scale this ingredient by the number of batches
and convert the unit appropriately (such as converting tsp → tbsp → cups depending on the quantity). The particular ingredients
can then be added to the list using the $ operator to insert the resulting text.
$igFlourCups cups all-purpose flour
$igSugar sugar
$igSugar sugar
wifi_troubleshooting
Clir was originally written to support a linear workflow where the user answers prompts to generate a checklist, and then works through that list afterward.
Another type of workflow allows a user perform one or more tasks during the list generation process. The outcome of these task(s) will then influence the prompts that follow. This process of back & forth can occur as many times as required, as in a survey or intervew.
The TROUBLESHOOT list defines a procedure for troubleshooting a wireless network connection. The workflow in this list is designed to be incremental, where the list generation process requires the user to perform tasks at each step. The result of these tasks will determine the input for subsequent steps. In this example, the intended result is not a generated checklist to follow at the end, but rather a series of incremental checklists to perform at various stages until the issue is resolved.
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