I enjoyed attending and presenting computational food and nutrition at the recent Wolfram Virtual Technology Conference. The one-liner competition is always one of my favorite sessions of the conference. This year I submitted my first entry to the competition. I was excited to receive Honorable Mention among such a broad and creative collection of Wolfram Language one-liners.
My one-liner code creates a vivid collage of images from a randomly selected food type group. The food type group changes each time you evaluate the code.
There are 67 food type groups available in the Wolfram Knowledgebase:
In[]:=
EntityValue["FoodTypeGroup","Entities"]
Out[]=
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
All entries to the competition were required to be linear strings of 140 characters or fewer. My submission was 132 characters:
In[]:=
f=RandomEntity[EntityList["FoodTypeGroup"]];Column[{f,ImageCollage[DeleteMissing[EntityValue[EntityValue[f,"FoodTypes"],"Image"]]]}]
The competition judges were able to optimize my code to 108 characters:
In[]:=
f=RandomEntity["FoodTypeGroup"]ImageCollage[DeleteMissing[EntityValue[EntityValue[f,"FoodTypes"],"Image"]]]
Out[]=
Some of the food type groups have only a few images available for the collage; others have a large collection of colorful images.
Here are a few of my favorites:
In[]:=
f=RandomEntity["FoodTypeGroup"]ImageCollage[DeleteMissing[EntityValue[EntityValue[f,"FoodTypes"],"Image"]]]
Out[]=
In[]:=
f=RandomEntity["FoodTypeGroup"]ImageCollage[DeleteMissing[EntityValue[EntityValue[f,"FoodTypes"],"Image"]]]
Out[]=
In[]:=
f=RandomEntity["FoodTypeGroup"]ImageCollage[DeleteMissing[EntityValue[EntityValue[f,"FoodTypes"],"Image"]]]
Out[]=
CITE THIS NOTEBOOK
CITE THIS NOTEBOOK
Instant food collages in 108 characters
by Gay Wilson
Wolfram Community, STAFF PICKS, November 10, 2025
https://community.wolfram.com/groups/-/m/t/3573049
by Gay Wilson
Wolfram Community, STAFF PICKS, November 10, 2025
https://community.wolfram.com/groups/-/m/t/3573049