Glasshouse is a 2006 science fiction novel by Charles Stross.
There are cultural references I liked. For example: 1) there is a vorpal blade; 2) They say, "Be seeing you," several times, and there's a sign that says, "Welcome to the Village"; 3) The Hitler quote, rendered "Who now remembers the Armenians?" and "Who still talks nowadays about the Armenians?" appears. There are several more.
from the dust jacket:
When Robin wakes up in a clinic with most of his memories missing, it doesn't take him long to discover that someone's trying to kill him. It's the twenty-seventh century, when interstellar travel is by teleport gate and conflicts are fought by network worms that censor refugees' personalities and target historians.
On the run from a ruthless pursuer and searching for a place to hide, he volunteers to participate in a unique experimental polity, the Glasshouse, constructed to simulate a preaccelerated culture. Participants are assigned anonymized identities: it looks like the ideal hiding place for a posthuman on the run. But in this escape-proof environment, Robin will undergo an even more radical change, placing him at the mercy of the experimenters - and at the mercy of his own unbalanced psyche.
SFSignal calls it "a very fine science fiction novel" and says it "is one of the best books I've read this year." SFReviews describes it as "a cracking thriller with a fine satirical edge that slices into the concept of paranoid surveillance societies". The late Emerald City has points to make about the way gender issues are handled. Strange Horizons, where spoilers abound, has a mixed review and much to say on the gender issues, closing with this:
The novel's physical world-building is fun, and for those looking for that kind of fun, Glasshouse will be a pleasure to read. But for those who want a narrative with a well thought-out world exploring interesting questions about gender-socialization, identity, and memory, Glasshouse will be a frustrating read occasionally relieved by the momentary play of ingenious SFnal devices.
I have also read his Accelerando, which takes place in the same universe.
The picture at the top of the post is from Amazon.