Shortly before 10am, 40 people are waiting at the steps that lead to the Central Library in the Ilac Centre, Dublin. “Some mornings you’d think there’s a sale on,” says moustachioed library attendant Vincent Thomas a little later.

Elsewhere in the world libraries are under threat. In the UK, local libraries are closing. Recently a Forbes article, since removed, suggested that libraries could be replaced by Amazon stores. In Ireland, in refreshing contrast, there are plans to extend opening hours from 8 to 10 and to remove library fines.

The Government also announced this week that it is going to spend €8 million to deliver iPads, workstations, podcasting equipment, interactive whiteboards and other forms of technology for hundreds of public libraries.

Irish people love their libraries. They use them to access books, DVDs, music, free courses, book and film clubs and performances. According to figures from 2017, the Central Library gets an average of 1563 visitors a day and has 24,682 active borrowers.

John is an engineer but he has been homeless since his career collapsed over twelve years ago. Now, he says, the library is “a lifeline” So by five-past-10, three quarters of the seats are full with people of all ages and nationalities. At one end of the library, in the music section, a middle-aged man in a baggy white t-shirt is playing keyboards hooked up to headphones. He plays me a strange, beautiful little melody with a simple bass part on the left hand. “That’s my own composition,” he says.

John is an engineer but he has been homeless since his career collapsed over 12 years ago. “I couldn’t recover myself to be honest with you,” he says. Now, the library is “a lifeline”.

He had never played an instrument until a year ago when he spotted this keyboard and gave it a try. Since then he has taught himself to read music and he plays here every morning. “I am actually autistic and ordinarily engaging autistic people is difficult enough... but music really engages this…” He touches his chest.

In the afternoon, he says, he goes back to the hostel where he lives and he practises. Does he have a piano there? He laughs. “I have a cardboard piano I made out of shoeboxes to practise technique… I love jazz. I love blues… I even like hip hop. It’s more the sound I’m into, you know? Every time I hear a sound I’m very attentive to it. I was a good engineer and I’m good at music because it’s about patterns.”

When he’s not practising he spends his time solving mathematical puzzles. He draws an equation in my notebook. “x – 1/x = o” “That is a statement of reality,” he says. Then he talks about Schrödinger’s light equation and Einstein’s theory of relativity jotting each down as he goes. I’m not good at physics and he sees my confusion. “That’s just me solving my problems,” he says and laughs.

At the other end of the library, one table is already filled with older people reading newspapers. Neatly-dressed retiree Des Halligan comes up from Waterford a few days a week. “I stay in the library for around an hour-and-a-half and I have a read of the Independent, or the Examiner or the Mirror,” he says. “Then I might get a bit of stuff in Tesco and I go down on the boardwalk and have a bite to eat... I walk up O’Connell Street and listen to a bit of music if there’s someone singing there, and give them a few bob. After that I head back to the train station.”

Isn’t the Central Library a bit far from Waterford? “It’s just to get out of the house,” he says. “My partner died some years ago through cancer and I’m on my own since. When you have the free travel you might as well use it ... Time can be very boring when you’re stuck in a house all day.”

Photograph: Tom Honan/The Irish Times “Some of those people who would be waiting [outside] would be people who would spend the whole day here,” says library assistant James Barry. “This is a traditional library and then it’s a social space and a safe space for people to be.”

Does he think libraries could ever disappear? “Not because of a decreasing need or desire for libraries, but because the world is going in that way and if something doesn’t turn a buck it’s endangered.”

There are also plenty of younger people here. Many seem to be studying but Sunny, a young woman in a striking black hooded dress, is showing her fiancé, Jay, around the fiction section. Jay has just moved from France to live with her. They met on a chat app for gamers called Discord. “He was saying love doesn’t exist and I got mad and spammed him with a National Geographical article called Love, The Chemical Reaction.”

So she proved him wrong? They laugh. “Yeah,” says Sunny as Jay looks endearingly sheepish. They met in person for the first time at a festival called Gothic Species shortly afterwards. Why does she come here? “I like to read Philip K Dick and there’s a better selection of science fiction here than in other places,” she says. She shows me how many Philip K Dick books are on the shelves. “So I come here to find books I wouldn’t find in smaller libraries and I like to just sit here and read. I was also hoping to play the piano here because there’s no space for a piano in my apartment. Now we’re just looking for a place to sit down together but it’s very busy.”

Later I spot Sunny poring over an illustrated copy of The Portrait of Dorian Grey with Jay at her side.

Music and lyrics A mystery poet comes here. “She leaves poems all over the library,” says Ríona Sally Hartman, as we sit in a meeting room.

She shows me a white piece of paper with “Important” written at the top in red marker and a number of lines beneath in shaky black biro all about climate change and birds. “I usually have 200 plums from my two plum trees now I see seven” is written on the back in blue biro. The letter is signed “a friend of mother earth.”

“We have a fair idea who she is,” says Alan, a tattooed library attendant who is helping to put out chairs for a ukulele class. “She’s a regular.”

For Ríona, it’s potential raw material. Since June she’s been Dublin City Public Libraries’ first musician in residence (there are also readers, historians and writers in residence). Ríona runs classes and workshops but she also writes music inspired by the people she meets here. One of the new songs was inspired by a library user telling her about seeing Judy Garland in the Theatre Royal.

Ríona Sally Hartman, Musician in Residence with Dublin City Public Libraries. Photograph: Tom Honan/The Irish Times Does she use the library much herself? “I think anyone who’s freelance ends up going to the library to work… or to use the wifi. And I know the feeling of being unemployed and not having anywhere you can go. The computers are often taken up by people working on their CVs.”

People don’t realise it how much is offered here, she says. “Recently Ikea said they were going to have a room where people could read books and everyone was retweeting it. I felt like going, ‘That exists in every town!’”

And then 12 people with ukuleles are sitting in a circle around Ríona and the faint sounds of ukuleles strumming ‘With or Without You’ can be heard outside in the library proper.

“They say it’s the easiest instrument to learn,” says retired Aer Lingus employee, Ronnie Myles. “I’m not finding it too easy, I can tell you.”

Esme is here for the ukulele class but she came in early to read 'The Irish Times' and to chat to the staff with whom she’s friendly Esme Lewis is the woman who told Ríona about seeing Judy Garland. She’s from leafy Dublin 4 (“You have to get the ‘leafy’ bit in”) and is in her 80s “and enjoying every second of it.” Over the decades she has worked at the Theatre Royal, run a ballet school, worked for a stockbroking firm and taught countless Dubliners to swim from “the womb to the tomb.”

She is currently collaborating on a “dance portrait” with the dancer Emma O’Kane. “I’m waiting to hear what she’s going to do with me, if it’s very slow or sad, happy or joyful or leaping about like a flea. I don’t care what it is … I’m very flattered to be asked.”

She is here for the ukulele class but she came in early to read The Irish Times and to chat to the staff with whom she’s friendly. In the afternoon she’s going blackberry picking with a friend. She has survived cancer, lost a partner and some of her children. But she has a new relationship (“which is lovely”), five children (including a foster child) and nine grandchildren. “Life teaches you a lot,” she says. “I’ve had loads of things but I’ve knocked them all off. I’m still here.”

Godswill Umeh arrives a little late. He’s a “music-teacher and missionary” who soaks up everything the library has to offer. “The books I borrowed in previous years from the library, they helped me to improve my music career,” he says. “Especially children’s books, because I teach children ... Later I started buying books for myself and stopped borrowing lots of books ... But where I started was in this library, so I can’t forget this library.”

Umeh is a driven man. He left Italy, where he worked in a factory, because he couldn’t pursue a teaching career in a non-English speaking country. Despite already possessing a Nigerian music diploma, he then retook a number of music exams “as though I never had a certificate” and now “I eat through music. I feed my children through music … I wanted to go where I belong and I belong here.”

Early learners At half two there’s a craft session in the children’s section, overseen by library assistant Ann Kearns. She is seated at a small table with several small children who are making birds out of cupcake cases. “Can I cut it up?” asks one little boy of his newly created cup-cake bird, reaching eagerly for the child scissors. Ann encourages him to sign it instead. “K.E.V.I.N.” he says, spelling it out.

A tiny girl shows Ann her finished work. “That’s a very special bird,” says Ann. “What’s its name?”

“Little Bird,” says the little girl very seriously.

Seven-year-old Juno Gallagher is here with her sister Ruthie and her childminder Annette Cole. “I only come to see Ann,” says Juno, confidentially.

“She likes Ann,” says Annette. “Juno has been coming here since she was 10 weeks old. They had a music thing for babies”

What books does Juno like? “I read the ones that are about monsters and stuff like that. I like the scary ones.”

I tell her that I’m too scared to read about monsters. “Come on!” says Juno looking at me askance. “How can you be too scared? You’re older than me.”

Sisters Juno Gallagher (6) and Ruth Gallagher (4), and family members Yan Lee (4), Leah Lee (8) and Kevin Lee (5) take part in craft workshop at library. Photograph: Tom Honan/The Irish Times I meet many people over the course of the day. A carpenter named Peter Doyle discovered this library two years ago but never borrows books. “As a kid I remember hanging on to them too long and my parents having to pay the fines on them.”

Why does he come here then? “If I’m working around town I call in here and read the paper. It’s a good way to relax. I often go to churches as well.”

Is he religious? “Anything but. It’s just a quiet place to sit.”

It’s warm in winter. You can charge your phone. The staff are very nice as long as you don’t fall asleep, because it embarrasses them more than anything else Pia Dunne is studying Global Music in Denmark and is looking for ethnomusicology books before going to Haiti. “I’m researching the role music has in Haitian voodoo ritual.”

That’s very specific. She laughs. “They have a decent music section here.”

Marcia Fernanda, who plans to study teaching, is helping her friend Verusca Villioti to learn English. They’re both from Brazil but Marcia lives in Finglas and Verusca lives in Dun Laoghaire. “So this is halfway,” says Marcia. “A coffee shop would be really noisy and we need to be in a quiet area to talk and there’s no need to spend money.”

How’s it going so far? “She’s very good but she has a lack of confidence,” says Marcia, as Verusca protests. Marcia is very encouraging. When I introduce The Irish Times photographer, Verusca says, “I didn’t do my hair!” but Marcia says. “You look beautiful.”

In the afternoon I meet someone I knew years ago. He tells me that he now lives in a tent and that the Central Library is one of the first things people tell you about when you become homeless. “It’s one of those bases you touch, like the Capuchins,” he says. “It’s warm in winter. You can charge your phone. The staff are very nice as long as you don’t fall asleep, because it embarrasses them more than anything else.”

He says that it’s a particular kind of homeless person that comes in here. “There’s a Polish guy who’s a computational linguist who basically works from here. He’s homeless now, working trying to get his life back. The atmosphere is good and the location is good. It’s the north inner city, close to all the services.”

If you know when the charity food runs are, he says, you can tell who the homeless people are, because they all get up and go at those times. We change the subject and talk about people we used to know.

I return to the meeting room where Ríona is now mentoring 14-year-old musician Joseph McLoughlin. She was hoping to have more teenagers in today because she plans to put a programme together in which a band is formed but teenagers are elusive in hot weather.

Joseph came to a workshop a few weeks before where they tried out David Bowie’s cut-up technique for lyric writing. “In the middle of the line I had the words ‘dog bark’,” he says and laughs.

Photograph: Tom Honan/The Irish Times Doesn’t he want to be in a band? “I’m in some ensembles with my music school but I kind of want to do something outside my music school as well,” he says.

“He was saying last time he wants to do Sing Street,” says Ríona.

Joseph sings a line of a song that was presumably in that film. Then Ríona suggests they “have a bit of a jam”.

“And some marmalade,” says Joseph, who likes his puns.

At one point, Vincent Thomas, the attendant, escorts four grinning teenagers from the building. They seem harmless enough but Vincent darkly mutters about them being “tried as adults.” What did they do? “They were messing with the chairs and annoying people,” he says.

The bane of his life, he says, is people eating at the desks. “A guy had curried chips one day. They’re like children taking food out of the bag. They think you can’t see them. They’re opening the sweets and the paper is crackling.” He sighs. “You’ve some right ones.”

‘It’s easy to be helpful’ In one section of the library there’s a bank of computers where people can book time on the internet. Ali Doll (“Ali, like Muhammad Ali”) is showing David how to use Facebook. David is well-spoken but he looks like he has been sleeping rough. “I haven’t used a computer in 10 years,” he says.

Ali gets him to write down the steps she showed him. She doesn’t work here. She’s a waitress and she’s helping David purely because “it was an easy thing I could fix”.

“Just like that she helped me,” says David, smiling.

What does Ali use the library for? “Researching hobbies online, because I don’t have internet at home.”

What hobbies? “I work as an artist liaison once a year for a festival called Another Love Story, and it’s in Killyon Manor which is a bee sanctuary and bees have become an obsession”

“They’re very important, the bees, says David. “If we lose the colonies of bees its bad for (a) the economy and (b) agriculture.”

We discuss bees for a moment. “How do I make a message then?” asks David.

Ali shows him. “I’m trying to touch base again with my daughter,” he explains. “I’ve been away for 12 years. She lives in Dublin. I have a telephone number, but somebody stole my phone.”

“Get typing because that will open up a door for you,” says Ali.

“It will open a door for me,” agrees David. “I’ve been all over the world … I spent two years in Greece. I’m an architect so I had an awful lot to see. I was looking at the buildings, the landscape, everything, but I was living rough because I don’t have a house anymore.”

“This bubble will light up if she answers,” says Ali pointing at the Facebook page. “I have to go. I hope you find your daughter.”

“Will you be here tomorrow?” asks David.

“I’m working tomorrow,” says Ali and David looks a bit sad.

“You’re so helpful,” says David.

“It’s easy to be helpful,” says Ali.” People have just forgotten how.”

Photograph: Tom Honan/The Irish Times Every evening in the library there’s a low hum from the meeting room where people gather for free conversation exchanges. This evening it’s an English-Spanish exchange and a friendly electronic engineer named Bodbar breaks off from chatting in order to explain what’s happening. He is by far the most qualified to do so, as he also attends the Italian, French, German and Russian exchanges.

As I’m leaving, I meet 64-year-old Marian Bowen from Dorset Street. She spent 10 years caring for her mother, she says, and after she died she found she had “too much time on my hands”. So she started coming to the library to take out DVDs and thrillers. She sometimes goes to Easons to see what’s new and then comes in and gets the book here. “Now I’m part of the furniture,” she says, waving at Vincent Thomas.

Her mother had dementia, she explains. “She was only a small little woman but she could do a round with Mike Tyson. Before the end she lost her speech, lost everything. It was like minding an adult baby and then before God took her she opened her eyes and said ‘Marian’ and I nearly died because she hadn’t said my name in nearly 10 years. And my sister said, ‘That was her way of saying good bye.’”