Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Food order reminder #163

Open
jdaw1 opened this issue Jul 18, 2022 · 2 comments
Open

Food order reminder #163

jdaw1 opened this issue Jul 18, 2022 · 2 comments

Comments

@jdaw1
Copy link
Owner

jdaw1 commented Jul 18, 2022

In post 126933 on ThePortForum.com AHB wrote:

… can we incorporate onto the tasting mat or the tasting notes sheet each person's food order? Then each person will know what they ordered and I won't need to shout at everyone to remind them.

As an experiment, implemented with:

/FoodData [
	% TNSheetNum   Name   Food
	0   (Alex B.)      [(Potted crab; with AJM medium-rare bone-in ribeye, B) /eacute (arnaise, green beans)]
	0   (Alan G.)      (Smoked salmon; chicken Caesar, fries)
	0   (Tony Cz.)     (Mackerel and beetroot salad; bangers and mash)
	0   (George G.)    (Melon salad; medium sirloin, green salad, fries)
	0   (Charles R.)   ()
	0   (Julian W.)    (Soup of the day; Beyond Meat burger, carrots)
	0   (Harry H.)     (Potted crab; medium-rare sirloin, carrots, fries)
	0   (Mike M.)      (Potted crab; with PW medium-rare bone-in ribeye, green beans, fries)
	0   (Alex M.)      (Smoked salmon; with AHB medium-rare bone-in ribeye, green beans, fries)
	0   (Tom A.)       [(Duck pat) /eacute (; medium-rare sirloin, peppercorn, green beans)]
	0   (Phil W.)      [(Grilled flatbread; with MPM medium-rare bone-in ribeye, B) /eacute (arnaise, fries)]
	0   (Ian J.)       [(T) {-0.12 Kern} (ruffle mac; medium-rare sirloin, green beans)]
] def  % /FoodData

/PaintForegroundCode
{
	/TastingNotes TypeOfPagesBeingRendered eq
	{
		0  3  FoodData length 1 sub
		{
			FoodData exch 3 getinterval aload pop  3 1 roll
			ASCIIfy ThisName ASCIIfy eq exch TNSheetNum eq and
			{
				PageWidth MgnL MgnR sub add 2 div  MgnB  moveto
				NamesFont 9 selectfont
				dup StringPathBBox pop 3 -1 roll add -2 div exch neg rmoveto
				ShowRecursive
			} {pop} ifelse  % ... ThisName ... TNSheetNum ... and
		} for  % FoodData index
	} if  % /TastingNotes
} bind def  % /PaintForegroundCode

Comment welcomed.

The inclusion of an explicit TNSheetNum is to cope with multi-session tastings.

@jdaw1
Copy link
Owner Author

jdaw1 commented Jul 19, 2022

The Previous food-Order Page Type

There was a previous attempt at a food order in the placemat software, that code having been written Sep 2010, and removed May 2011. There seems to be only one example of its use, on 02 Dec 2010, page 33.

From the manual of May 2011:

Food Menus

◊ People don’t pay attention.

The waiter comes to take a food order, and decisions have not yet been made. The foods come, a waiter calls “crab cakes”, and nobody responds. Sigh: stay awake.

To facilitate better organisation this can be done in writing, this feature being activated by /Foods true def. This causes there to be page(s), with rows containing items from the food menu, columns labelled with people’s Names, and the body populated with “✓”s or with the likes of “Bleu”.

What is on the menu(s)? This is contained in the triple-depth array FoodsOnMenus. This has one item for each meal—almost always just one meal. Each meal array contains one item per course. Each course contains strings, being word(s) from the menu, typically somewhat abbreviated. The default value is set to the usual menu for The Crusting Pipe, London WC2E 8RD.

It might be that the paper circulates so that choices are made on the day. Or choices can be made in advance, this being particularly valuable if done by non-punctual attendees. Such advance choices are specified in the array FoodsPreChosen, each item of which is an array of the form Name|NameNum MealNum CourseNum ChoiceNum boolean|integer|CompoundString ]. The first parameter is either an item of Names, or is an integer, ≥0, <the length of Names. The MealNum is an integer, ≥0, and typically =0. The CourseNum is an integer, ≥0, by default having valid values 0=starter, 1=main, 2=pudding, 3=cheese. The ChoiceNum is an integer, ≥0, and smaller than the number of choices in that meal’s course. The last parameter can be a string (or a compound string), in which case it does what it is. Or it can be true, shown as “✓”. Or it can be a positive integer, shown as that many check marks.

There are also obvious parameters FoodsOnMenusFont (in which the contents of FoodsOnMenus are shown), FoodsPreChosenFont (used with FoodsPreChosen), FoodsPaperType, and FoodsOrientation.

2022 comment

I vaguely recall from 11½ years ago that it was difficult to keep the FoodsOnMenus data synchronised with the restaurant’s food menu. So the strings should be what has been chosen, rather than what could have been chosen.

@jdaw1
Copy link
Owner Author

jdaw1 commented Jul 19, 2022

What to do?

There could be a Reminders array, holding arbitrary text per person, much as temporarily implemented (code in opening post of this issue) for the placemats of the tasting of 25 July 2022.

If these strings are put on the tasting-note sheets, as done for 25 July 2022, then there would be a clash with the request in issue 160: TastingNotesSuppressByName. The obvious course is to show them on the TN sheets, and if there is a non-empty reminder for a name whose TN sheets are suppressed, log a warning.

Should the array of Reminders specify a TNSheetNum, or a PageOrdering? Or both, either being /All meaning untested, /First; an integer or /Last having obvious meaning? A warning would be logged if a reminder PageOrdering doesn’t appear in PageOrderingTastingNotePages. What happens if multiple lines of Reminders are simultaneously satisfied? Suggestion: use first; log warning re subsequent?

/Reminders [
	% P.O.,  T.N.S.N., Name, Text
	/All   /First   (Julian W.)   (Soup of the day; steak & kidney pie, carrots; extra cheesy buck rarebit)
] def  % /Reminders

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant