TWO YEARS AGO, Gene Luen Yang made a particular splash at the National Book Festival. He was asked to give a speech at the event’s Friday-night gala, ahead of such literary luminaries as E.L. Doctorow. But Yang had not come to talk about pure prose. He had come to talk comics.

So Yang rose and he spoke about the late cartoonist/animation creator Dwayne McDuffie. Before dying several years earlier at age 49, McDuffie fought to increase diversity both on the page and behind the pen. And Yang spoke about creators giving themselves permission to create rich, diverse characters in an industry that historically could present obstacles on that front.

Yang talked about the Black Panther comics. He talked about the Static Shock comics. And soon, to much cheering, he won over the esteemed Library of Congress room.

On Saturday evening, Yang — a two-time National Book Award finalist (“American Born Chinese” and “Boxers & Saints”) — will return to the National Book Festival as headliner of the Graphic Novel Night pavilion, at the Washington Convention Center, in conversation with The Post’s Comic Riffs.

Just days ahead of that talk, Yang, a Bay Area-based cartoonist/educator, was named a 2016 MacArthur “genius grant” fellow — one of two visual storytellers to receive that honor this year.

Ahead of the National Book Festival, Comic Riffs caught up with Yang to talk about his new book (a “Secret Decoders” edition), his forthcoming graphic-novel project (“Dragon Hoops”) and his role as an official ambassador for student literature:

MICHAEL CAVNA: Part of what I greatly enjoy about “Secret Coders,” Gene, is the fusion of art and tech — how machines are instruments of art, and how programming makes the pen line possible. Could you talk about your own sense of this marriage — about how the sciences and the arts live at inspired points of co-supportive intersection?

GENE LUEN YANG: Thank you! I first became interested in tech because of art. When I was a fifth-grader, I took a Logo programming class. Logo is an old, old coding language aimed at kids — it’s the same language [co-creator] Mike Holmes and I use in “Secret Coders,” in fact. Using Logo, you can make a little turtle move around the screen, drawing as it goes. I fell in love with programming because I first experienced it as a tool for art.

In educational settings, art and science are sometimes seen as competitors. They compete for resources, for time, for attention. I think it’s a false dichotomy. Science and art ought to reinforce each other. Science can be used to make art, and art to understand science.

MC: You taught computer programming to young students for nearly two decades. Beyond entertainment, do you co-create “Secret Coders” with a sense of educational mission, too — perhaps to demystify computer programming, and spark young minds about writing actual code? In other words: Are you slyly trying to educate through your comics?

GYL: Absolutely — and not even that slyly! “Secret Coders” is my first explicitly educational comic. My primary goal is to teach computer-science fundamentals. When a kid finishes reading the series, I want her to have a good sense of how code works, how code is structured. I’m hoping the story leads her to think like a coder.

MC: Speaking of students, what can you tell us about “Dragon Hoops” [a high school docu-graphic novel] — about how it’s coming along? Is rendering nonfiction especially challenging in its own way?

GYL: “Dragon Hoops” is coming along slowly but surely. I’ve been writing and rewriting chapters. I’ve gotten great feedback from my editor, Mark Siegel, and a few other beta readers. I have complete art for maybe a chapter or so.

Nonfiction has been incredibly challenging for me. I’m used to solving plot problems by just making stuff up. When you’re talking about actual events that happened, you can’t do that.

MC: As the national ambassador for young people’s literature, what’s most challenging — and most stimulating — so far about the role and its duties?

GYL: I love talking with students. I love hearing about what they’re reading. But the travel was pretty intense last spring, and it’s about to get intense again.

We’re still trying to figure out how to use the Internet to promote reading. Some things we’ve tried have been successful, others not so much.

Right now, I’m doing a monthly video podcast where I have awkward conversations about children’s books with people I admire. [You can find that here:]

I’m doing a monthly column about making comics with [].

And we have launched a Reading Without Walls pilot program [].

[Editor’s note: The National Ambassadorship for Young People’s Literature is through the Library of Congress, the Children’s Book Council and ECAR.]

MC: Several years ago, you said that librarians overall understood the power that comics have to encourage reluctant readers. Do you think now, in 2016, that most educators of children understand and appreciate the power of graphic narratives as teaching tool?

GYL: Absolutely. I still meet hold-outs every now and then, but the momentum has definitely shifted. Graphic novels have won Newbery Honors and Caldecott Honors. They’ve made several National Book Awards shortlists. The cultural influence of comic books is undeniable, and so is the literary influence.

Heck, Kate DiCamillo has written comics — her Newbery-winning “Flora and Ulysses” is half graphic novel. Kate DiCamillo. How’re you gonna deny Kate DiCamillo?

Note: The National Book Festival’s Graphic Novel Night programming is scheduled to run 5 to 10 p.m. Saturday at the Washington Convention Center. The Washington Post is a charter sponsor of the event.