Far better than a day at school
Being inside a tent packed with 520 cackling children is a little surreal. A sea of open-jawed faces show that their collective funny button is being seriously tickled.
Author Simon James is at the Edinburgh International Book Festival entertaining the audience of P1-P3s. Ten Edinburgh primaries are present and the laughter crescendos as he adopts a silly voice and randomly approaches some of the seated youngsters.
He reads from The Day Jake Vacuumed, which he wrote and illustrated.
Pictures projected on to a screen of Jake's family being sucked, one by one, into the vacuum cleaner, has the whole room erupting with mirth.
Outside, a lengthy queue of adults - mostly middle-class ladies of a certain age, plus a few gents - is waiting patiently to see Joan Bakewell.
Over in the children's theatre, 173 P4-P6 pupils and teachers are listening to Karen McCombie share her top 10 tips for where she seeks inspiration.
The author of the Ally's World, Stella Etc and Indie Kidd series talks about incorporating her hobbies - cats, eating crisps and bellydancing - into her books, as well as shamelessly stealing real-life tales from her niece and nephew. Watching daytime television is another of her idea-generating pastimes.
A group of S2 girls from Perth High are enjoying a spot of sunshine between shows. They all agree it is preferable to a day at school.
In the workshop tent, eight pupils from St Margaret's High in Airdrie are learning about freedom of expression. Robin Lloyd-Jones from Scottish PEN, part of an international writers' association which defends and promotes freedom of expression, is leading the workshop. Mr Lloyd-Jones, a writer and former education adviser, has designed a board-game about the fictional state of Zoravia. The S2-S5 pupils divide into two teams: the Zoravian state, which attempts to censor writers and journalists who criticise the government; and a group of writers and journalists awaiting trial for insulting the state.
"This is the first year we've had a workshop in the book festival," says Mr Lloyd-Jones. "This is part of a bigger project involving going into schools and organising workshops around the importance of freedom of expression.
"Without freedom of expression, who is going to expose injustice and corruption? It is the cornerstone of a just and equal society."
In the main theatre, Catherine MacPhail is entertaining, and being entertained by, 280 S1-S3s, from as far afield as Invergordon, Dundee, Dunoon, Carnoustie and Perth, as well as Edinburgh. She is talking about thrillers and how to keep the reader hooked. Action, pace and cliffhangers are her three staples. It is a huge brainstorming session as the whole room creates a thriller. Pupils shout out suggestions for what happens next, as Brendan investigates the reappearance of his dead teacher.
"In a thriller, you need lots of surprises and suspense. You've got to keep the story moving all the time. If you need to tell your readers that the hero had cornflakes for breakfast, have him vomit them up when he's punched in the stomach.
"Brendan's been kidnapped. His parents are in danger. What's happened to the teacher? What about Brendan? You've got all these mysteries. Make sure it's the young people who drive the action and save the day at the end."
The very tall and very bushy-bearded Philip Ardagh, meanwhile, is sweating rather a lot in the studio theatre. But the 215 P4-P6 pupils present don't seem to mind. They think he is hilarious.
Ardagh is talking about discoveries and inventions that changed the world.
Volunteers stand in a timeline. There is a dinosaur from 65 million years ago, a hunter-gatherer from 100,000 years ago, and various other characters. The hunter-gatherer is armed with a club, but she doesn't hit the dinosaur since that would be "prehistorically impossible", as the dinosaur was long dead by her time.
He tells the children that the terms cavemen and cavewomen are misnomers, since there were far too few caves to house the number of Homo sapiens.
"They didn't go, 'Hmm, I want to trade my two-bed cave for a three-bed cave with a garden.' There just weren't enough caves."
A magnificent hour is filled with Ardagh's wisdom and wit. His fervour for facts is infectious, his comic talent colossal.
The children's programme director, Karen Mountney, says this year's is the biggest yet. "We've got a mixture of well-known names, such as Michael Morpurgo and Malorie Blackman, as well as newer authors. I'm really pleased."
There has been laughter, imagination, solemnity, fascination and perspiration, all adding up to a typical day at the book festival.