When I visited Los Angeles in February, I was at a comedy show a few hours after landing. Jet-lagged and groggy, I sat on stage at the Upright Citizens Brigade Theatre, struggling to stay awake.

Then Moshe Kasher came out to do 10 minutes of stand-up. He talked about how both his parents were deaf, and he told a particularly hilarious story about blowing all his bar mitzvah money — $1,500 — on a phone sex bill. Even though I was reaching the point of visual hallucination, his set stuck with me. Two nights later, I saw him again, and he said he had a memoir coming out.

“Kasher in the Rye,” about how he became a drug addict, criminal and mental patient before turning 16, is a humorous account of a miserable childhood. (Kasher, 32, is sober now.)

Seventy pages in, he tells the phone sex story, which made me wonder if he took his act and turned it into the book.

“Quite the opposite,” Kasher told me last month. “What you saw that night is the beginning of my reverse engineering of this book into my stand-up act.” It’s a fascinating concept, and considering the subject matter, he likely won’t be running out of new material anytime soon.