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[]=

additives
,
alcoholic beverages
,
algae
,
aperitifs
,
baked goods
,
beers
,
berries
,
botanical berries
,
botanical fruits
,
brans
,
breads
,
breakfast cereals
,
cakes
,
candies
,
carbonated beverages
,
cereal germs
,
cereal meals
,
cereals
,
cheeses
,
coffee beverages
,
condiments
,
cookies
,
crackers
,
creams
,
crustaceans
,
dishes
,
drinks
,
fats
,
fishes
,
flours
,
frozen novelties
,
frostings
,
fruits
,
fungi
,
greens
,
herbs
,
juices
,
legumes
,
liqueurs
,
meats
,
milks
,
milk substitutes
,
nuts
,
oils
,
pastas
,
pastries
,
peppers
,
plants
,
poultry
,
preserves
,
pseudo cereals
,
pure starches
,
roes
,
sandwiches
,
sauces
,
seafood
,
seeds
,
soups
,
soy
,
spices
,
squashes
,
snacks
,
substitutes
,
sweeteners
,
sweets
,
whiskeys
,
wines

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

Instant food collages in 108 characters​
by Gay Wilson​
Wolfram Community, STAFF PICKS, November 10, 2025
​https://community.wolfram.com/groups/-/m/t/3573049