There's lots of variation between the kind of incarceration you might be in. Minimum security, maximum security, supermax, solitary confinement or not, federal, state, county, death row, etc. Mixed in with the general prison population or not, among murderers or among white-collar criminals?

Some types of incarceration will give you more opportunities for meditation than others.

If someone has the leisure to write a book in prison, or to work on some software project, work on a game (like the author of the article this HN thread is about), read, exercise, make license plates or belt buckles or perform other minimal-skilled work (like many prisoners do), get vocational training, or even simply do chores like cleanup or kitchen duty, they have great opportunities to meditate.

Also, you can actually meditate while doing other things. I do it all the time -- especially when something annoying or boring is going on (like when I'm talking to my boss). Helps keep the blood pressure down.

Still sounds perfect for prison to me.

I'm also reminded of the Forest Monk tradition[1], where monks deliberately lived and meditated in the forest, among wild beasts, with very little to eat, and in very primitive (if any) shelters, etc.

"Fear accompanied many wilderness newcomers, due in part to the insecurity of daily life and survival but especially fear of wild animals, sickness and injury, and -- given the accretions of cultural lore -- ghosts.

"Many forest monks record their encounters with wild animals, namely tigers, elephants, and snakes. Tigers often lurked around hermits in their open air klots at night, and the monks learned to face fear directly...

"In such settings the training of the mind was invaluable...

"A second fear that masters bade their disciples overcome was fear of corpses and spirits. The Visuddhimagga teaches the corpse meditation as a way of inculcating a spirit of impermanence but also as a practical way of conquering sexual temptation, and fear of illness and disease. But spending the night in a cemetery, whether in the open air or in a klot, could be the source of great fear.

"The cemeteries of southeast Asia were not the tombstones and spacious lawns of the Western world. Corpses were brought and deposited in shrouds on the ground, make-shift cremations incomplete or left unfinished with nightfall. One monk records being in a cemetery at dusk when villagers brought a shrouded body and left the smoldering corpse on the ground where the monk could see it from his klot. As in any such case, the odor was overwhelming and the monk's imagination stirred. The monk was taught to recognize and observe fear, to control it with mindfulness, and ultimately to transcend it. But that seldom happened without considerable experience.

"The third fear was fear of bodily suffering. The widespread contraction of malaria by forest-dwellers called for perseverance, especially when palliative drugs were unavalable in isolated locales. Despite suffering malarial fever, some monks did not deviate from their discipline, walking in pain or sitting stolidly in the open air during rain storms. The conviction that pain is rooted in the mind was a strong motivation to discipline.

"In terms of physical hardship, the forest-dwelling monks contrasted their wilderness context to the cozy, rarified atmosphere of the monastery. To the forest-dwelling monks and hermits, book learning could not overcome bodily suffering. A strong intellect might mask emotional weakness, undermining mindfulness. Ajan Man, who passed a rains retreat while suffering severe stomach pains, would sometimes enter towns and villages in order to test himself against temptations of food and sensual desire. Mastering sense stimuli would guard against viewing the forest as an escape."

Of course, some prison experiences can be even worse than this, with people actively trying to harm you, but I still think there are a lot of parallels and meditation can help in both types of situations.

[1] - http://www.hermitary.com/articles/thudong.html