When Jim Carrey was an up-and-coming comedian, he used to hang around The Comedy Store in Los Angeles, soaking up advice - and free tokes - from standup legend Richard Pryor. Carrey opened up about smoking marijuana with Pryor on last night's episode of Jimmy Kimmel Live!

"I was standing some nights by myself with Richard Pryor in the parking lot," Carrey told Kimmel. "He would tell me inside stuff, you know."

And he would also share his stash.

"We were passing a joint one night, and he said, 'Careful with that: I don't remember 40 years of my life'."

Carrey has been drawing on those memories to shape his new Showtime series 'I'm Dying Up Here', which looks at a troupe of young comics struggling to make it on the wild comedy scene in 1970s Los Angeles. Carrey won't take the stage, though. He's executive producing the show starring RJ Cyler, Ari Graynor, Clark Duke and Melissa Leo as the uncompromising owner of the comedy club where the aspiring standups pay their dues.

Here's a sneak peek at the show premiering on June 4. And if you want to see more, Showtime has uploaded the first episode to watch for free on YouTube. Check it out here.

http://youtu.be/pR0PUkGbuto