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 |
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
? (number 1:6) nBatches
[
Enter number of batches (8 biscuits per batch)
]
[
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 = 2 * nBatches
= igBakingPowderTbsp = nBatches
= igSugarTbsp = nBatches
= igSaltTsp = nBatches
= igButterTbsp = 6 * nBatches
= igMilkTbsp = 12 * nBatches
$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 biscuitsBISCUITS 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