BOSTON — An old joke about libraries goes like this: A boy walks into a library and asks for a burger and fries. “Young man!” the startled librarian reprimands. “You are in a library.” So the boy repeats his order, only this time, he whispers.

So much has changed in libraries in recent years that such a scene may not be so far-fetched. Many libraries have become bustling community centers where talking out loud and even eating are perfectly acceptable.

The Boston Public Library, which was founded in 1848 and is the oldest public urban library in the country, is moving rapidly in that direction. With a major renovation underway, this Copley Square institution is breaking out of its granite shell to show an airier, more welcoming side to the passing multitudes. Interior plans include new retail space, a souped-up section for teenagers, and a high-stool bar where patrons can bring their laptops and look out over Boylston Street.

“You’ll be able to sit here and work and see the world go by,” said Amy Ryan, president of the library, on a recent tour. “We’re turning ourselves outward.”