CppCast - Open Frameworks and Creative Coding

Episode Date: January 7, 2021

Rob and Jason are joined by Zach Lieberman, professor at MIT's Media Lab and co-founder of the School for Poetic Computation. They first talk about Herb Sutter's 2020 wrap up blog post and the ISO mai...ling from December 2020. Then Zach discusses Open Frameworks, a C++ toolkit he co-created 10 years ago for creative coding. Transcript Text Broadcast of CppCast 281 from PVS Studio News Firsts in 2020 Last 2020 ISO Mailing Links Open Frameworks Open Frameworks Book ofxAddons ShaderToy The Book of Shaders Graffiti Research Lab L.A.S.E.R Tag A Visual Journery Through Addiction Connected Worlds Vera Molnar: Pioneer of Computer Art Digital Harmony: The Life of John Whitney, Computer Animation Pioneer Muriel Cooper Sponsors Visual Assist

Transcript
Discussion (0)
Starting point is 00:00:00 Episode 281 of CppCast with guest Zach Lieberman recorded January 6, 2021. This episode of CppCast is sponsored by Visual Assist, the well-known productivity extensions for Visual Studio. Visual Assist speeds up development with features like smart navigation, code inspection and suggestions, powerful refactoring commands, and a whole lot more, even spell checking and comments. Start your free trial at wholetomato.com. In this episode, we discuss a blog post from Herb Sutter
Starting point is 00:00:43 and the last ISO mailing from 2020. Then we talk to Zach Lieberman, professor at MIT's Media Lab. Zach talks to us about OpenFrameworks podcast for C++ developers by C++ developers. I'm your host, Rob Irving, joined by my co-host, Jason Turner. Jason, how are you doing? Happy New Year. Happy New Year, Rob. I am doing well. How are you doing? Doing fine. You know, we're only six days into 2021, but treating me well so far. So, you know, I got to just share this because I think it's kind of hilarious.
Starting point is 00:01:44 But in the last episode, we discussed that I might be trying to make a print version of my book. My book's already been out for six months, right? So it's not like it's news that I have a C++ best cover of the proof copy and shared this on Twitter. And it's like the most popular tweet I've ever done, even more popular than when I actually announced the book was done and people could go buy it. I've got 36 retweets at the moment, which isn't a ton, but like 560 likes. And I just hope that I can get this kind of response when I actually say, oh, by the way, here's the Amazon link. Yeah, I hope so. I guess people are just eager to get their hands on a physical copy. I mean, I know I prefer reading books that way. I guess I didn't expect that big of a difference. And I agree for technical books. I prefer physical copies for for for novels. I prefer ebooks at this point because it's so much easier
Starting point is 00:02:45 to just like open it up and be immediately where you last were sure and then you know a kindle or whatever using e-reader is kind of similar to the size of a you know soft paperback paperback book compared to and if i don't feel like wearing my glasses i can just make the font bigger yeah and you might want to like highlight or mark certain things in the technical book you're reading things like that yeah yeah okay well at the top of every episode like through a piece of feedback uh we got this tweet from matt fernandez commenting on our recent episode with patricia os patricia's rant on this episode is all too relatable so common to check out an industry supported project and find multiple wheels unnecessarily reinvented and yeah we got a lot of articles of of people um kind of sharing
Starting point is 00:03:33 her grief over her problems with trying to build um chromium chromium yeah glad it's not something i've had to deal with but uh yeah i feel her pain yeah that's ridiculous i'm not going to use it i'm just going to write my own web engine from script no wait a minute that's just kidding okay well we'd love to hear your thoughts about the show you can always reach out to us on facebook twitter or emails at feedback at cppcast.com and don't forget to leave us a review on itunes or subscribe on youtube joining us today is zachary lieberman zach is an artist researcher and educator with a simple goal he wants you surprised in his work he creates performances and installations that take human
Starting point is 00:04:15 gestures as input and amplifies them in different ways making drawings come to life imagining what the voice might look like if we could see it transforming people's silhouettes into music he's been listed as one of fast company's most creative people, and his projects have won the Golden Nika from Ars Electronica, Interactive Design of the Year from Design Museum London, as well as listed in Time Magazine's Best Inventions of the Year. He creates artwork through writing software and is a co-creator of Open Frameworks, an open-source C++ toolkit for creative coding, and helped co-found and teaches at the School for Poetic Computation, a school examining the lyrical possibilities of code.
Starting point is 00:04:49 He's also a professor at MIT's Media Lab, where he runs the Future Sketches group. Zach, welcome to the show. Thanks. Super happy to be here. Happy New Year to you both. Happy New Year. There is so much to unpack in your bio. And I want to dig into some things that I had not even planned to talk about in the interview at all. MIT's Media Lab, that's the same place where, you know, what's his name? The cyborg worked, right?
Starting point is 00:05:16 Mm-hmm. What is his name? I cannot remember his name. Stephen Hawking? No, no, no, no, no. Stephen Hawking is a man who classified himself. You do know who I'm talking about? Yeah.
Starting point is 00:05:29 I'm going to I'm going to look it up. But yeah, I'm since the for about the last two years, I've been adjunct associate professor there and and have started a group there called Future Sketches. And this year I'm accepting my first students. So it's a master's program. Media Lab is has masters and phd students so i'm accepting my first master's students i'm reviewing applications right now actually so uh just as an aside for people listening is there anyone i mean is there still time to apply if they really love this podcast uh not for not for this year the deadline was in in December, but certainly for future years. And so these interactive art displays, is this like the kind of thing where I go into like Epcot Center or something and I'm walking on a platform and it's changing the tiles that are around me and waving my arms and generating music like that kind of thing sometimes i mean oftentimes it's responding to to movement to your body to you know your position in space and so that those sorts of things are like what i do
Starting point is 00:06:33 although there's different um situations so that might be more of like an entertainment situation where you're doing something at you know an epcotcot center versus how you might create something for a museum or a gallery or, you know, an art festival, you know, there might be using similar technologies, but, but maybe the context is different. But for example, when I go to, you know, Disney World, I'm like, I'm constantly like, oh, they're doing that. I get really excited about the technology and all of the, you know, the things that sort of behind the scenes, you know, because that's the sort of stuff that I do in my own work. OK. Yeah. And so just as we dig into this, do these interactive displays that you've worked on this kind of thing, do they use open frameworks, the tool that we'll be talking about? Mm hmm. Yeah, they're there. You know, they could be projection, building projection.
Starting point is 00:07:29 There could be screens that you're interacting with, public art type projects. But yeah, pretty much, I would say the majority of the work that I do, I do using open frameworks. Awesome. Looking forward to talking about it. Yeah, absolutely. We'll be digging into it in just a minute. But first, we just have a couple news articles to discuss. So Zach, feel free to comment on any of these and the first one is uh from herb stutter's blog and this was his 2020 wrap-up uh which was titled first in 2020 or a little dose of good news and uh yeah i wish we had this uh to talk about last week actually when we were doing our own kind of yearly wrap-up but he highlighted a couple of really nice things uh that did go well in 2020 you know the virtual meetings for the iso committee
Starting point is 00:08:11 have been going very well the all the virtual conferences uh i think have been really good i know we attended cpp con jason and i think overall it was a great uh virtual event and also uh one other thing he highlighted here is that C++20 is the first release that added a feature that made the standard smaller, which was the spaceship operator actually wound up taking 20 pages out of the standard. I thought that was pretty significant.
Starting point is 00:08:41 If you, like me, sit here and just browse cpp reference and looking to see what changed in the recent standards and whatever if you go to any standard container you will see added in c++ 20 the spaceship operator removed in c++ 20 all of the comparison operators so that's where it all came from they were able to remove all of the comparison operators and just replace them with the spaceship operator. That's awesome. Anything else you wanted to highlight in here, Zach or Jason? You know, I just got lost with the spaceship operator.
Starting point is 00:09:15 I clicked that link and got excited about it. And I would say anything that makes things shorter, you know, I'm a really big fan of. So that was one of these things where, you know, I saw the news and, yeah, I'm always happy when things get shorter oh yeah totally agree um i i want to comment here that uh that herb points out that this is the first version of c++ that has all of the features that bjarne outlined in his design and evolution of c++ in 1994. Although, he does say, except for one minor feature. Unified call syntax, which we'll probably never get.
Starting point is 00:09:51 Unified function call syntax, we'll never get. We've talked about it on the show. But for some people, it's a big deal. Some people wouldn't say, oh, that's just one minor feature that's missing. Right, right. Okay, and then the next thing we have is that the ISO mailings have continued with these monthly drops of new papers. And we have this collection from December 2020. I thought there were a couple interesting kind of changing the way that they're going to operate papers here. They have one about having electronics drop holes to keep things moving forward virtually. And then there was another one that they're going to try to have an officially WG21 managed
Starting point is 00:10:35 chat service because I guess no one wants to use the C++ language slack anymore. Wow, I didn't notice those at all. Was there anything you want to point out then, Jason? Sorry, it looked like Zach had something to say. Go for it. Oh, I was going to say those were the ones that I immediately went to because I'm really interested in how, you know, how do organizations work in the age of COVID? You know, how do you make decisions? How do you communicate? And those were the ones where I was like, oh, you know, these are real problems. Like, how do you get consensus? How do was like, oh, you know, these are real problems.
Starting point is 00:11:09 Like, how do you get consensus? How do you chat? How do you announce when things are happening? And those were in the mailing list, the ones that I, yeah, gravitated to. There's a few things that stood out to me. The first one, which I just noticed, is removing garbage collection support. That is a fascinating one, because that was added in C++11, and no compiler ever actually implemented it, I believe. I didn't even know that was something that got added in C++11. It was added as an optional thing that compilers were allowed to provide, and no one ever did.
Starting point is 00:11:40 I think there's maybe one reference implementation of it. So that one just stood out to me. Stood file system path view. That looks interesting. I forget what the other one was. Those were the main two that just stood out to me. Miss it. Oh, well. Well, we'll have to talk to someone from the committee about some of these in more detail. I think we'll have an interview along those lines somewhat soon. Right, Jason? Yeah. Oh, and as an aside, Ben Craig is continuing his work on the freestanding stuff and that has continued to grow. So it might be worth talking to Ben again
Starting point is 00:12:16 and see what the current status is. Freestanding is always interesting to me. Yeah. Yeah. Okay. So Zach, we kind of highlighted a lot of things in your bio. Um, to start off, maybe you could tell us a little bit more about what creative coding is. Sure. So I would say creative coding is using software and, um, and electronics for making art. And so maybe, maybe your audiences are familiar with things like the demo scene, where people are writing code to make small executable files, and when you launch them, do something kind of really interesting and bizarre and crazy graphically. It's the same sort of spirit where you're saying, I'm going to use software in some way to make an art form.
Starting point is 00:13:03 And a lot of times, it's a play with algorithms, where you may take something like, I'm going to use software in some way to make an art form. And a lot of times it's a play with algorithms where you may take something like, I don't know, Voronoi algorithm, which is a spatial division algorithm, and get excited about it and see kind of how can you use this in an art making context? How can you make design from this? So it's working with software, but in order to create artistic expression that's it's interesting definition uh to me because i i don't do painting that kind of you know creative art uh to me i've always felt like programming itself is a creative outlet for me yeah yeah yeah i mean i actually really dislike the term creative coding because it's almost it's almost implying in a way that other forms of coding are not creative.
Starting point is 00:13:48 But I think it's a strange term. So I've oftentimes felt like we needed a better term to describe what we do. But it is definitely a popular term. So if you ask people, like, what field are you in or what do you do, you could say creative coding. People won't understand it, but I think it, it suffers because it implies that other forms of programming are not creative.
Starting point is 00:14:10 Oh no, but I get it though at the same time. Cause like, I mean, I follow enough people on Twitter to see people that are like, Hey, look at the latest thing I created was shader toy. And that's like completely different. Yeah. And it's, I think that the beauty, because code is so expressive and it's malleable, it's soft and it's adjustable, then I think it's a really interesting vehicle for making things.
Starting point is 00:14:31 And when you see, especially with ShaderToy, one of the things that I love is seeing how people will take code and modify it and modify it and modify it. And they're having a conversation through software, but then the output are these, just these really rich and different visual forms. You know, often when as a topic like this comes up, I'll say, Hey, can you explain this for the sake of our, our listeners?
Starting point is 00:14:53 What is shader toy? But if you, I honestly don't really know what shader toy is. And if you do, could you explain it for me also? Sure. Are you familiar with shader programming? Do you understand kind of what?
Starting point is 00:15:06 It's an aspect of GPU programming, right? That's about as much as I know. Yeah. I mean, So are you familiar with shader programming? Do you understand kind of what it's like a GPU program? Yeah, that's about it. Yeah. Yeah. I mean, you have essentially your your GPU is a machine that turns triangles into pixels. Right. You give it geometry. It's like his job in life is to turn triangles and draw them on the screen. And and it they're all of these steps.
Starting point is 00:15:24 They're called the pipeline. They're the steps between like you want to draw something to using a pixel on the screen and you can program you can add software at different moments of those steps and so oftentimes there's um there's a vertex shader step where you can alter the geometry and then there's a fragment shader step where you can alter the pixels and And so what ShaderToy is, is really focusing on that fragment shader where you're saying, I want to write code at the pixel level. And it's a really interesting way of coding because you are you're sort of saying, like, for this given pixel, this is how this software will color it. Or, you know, this is how I'm going to um you know yeah set the color of the pixel in the end but then there are all of these ways of thinking that are just different you know from how you would normally draw something because you you're all of these programs are running
Starting point is 00:16:15 parallel in the gpu is this you know giant giant parallel machine so you're you're you have to think in a different way um and i would if anybody's interested, I would recommend one of my former students, Patricio Gonzalez-Vivo, wrote a book called The Book of Shaders. It's an online book, and you can go and learn about shaders, and it's especially like a really beautiful website because you can click on any example,
Starting point is 00:16:39 and all of the code is really interactive. Like if there's a number in the code, you can click on it and it becomes a slider. If it's a position, it becomes a grid and you can rearrange it and you can get a feeling for what the code does just by interacting with it. So awesome. Yeah, very cool. We can try to put a link to that book in the show notes, Rob. Yeah, absolutely. So I guess maybe we can segue into you telling us a little bit about Open Frameworks. Sure. So Open Frameworks is an open source C++ toolkit for artists and designers.
Starting point is 00:17:14 It's been around for over 10 years. It's essentially a library that wraps a bunch of libraries. So it makes it easy for you to work with things like as if you're doing you know creative coding oftentimes you want to do things like load an audio file or load a font or you know work with different assets video webcam etc and so the whole idea is that this wraps libraries and make them makes it easier for you to get started so if you want to just load an image i think we're using free image if you want to just load an image, I think we're using Free Image. If you want to load typography, we're using FreeType.
Starting point is 00:17:49 Like, we have wrapped libraries, and then we've come up with a kind of simple API for you to interact with them. So the whole idea is to kind of make your life easy if you just want to load a file, draw it, get access to the pixel data, et cetera. We're a kind of a wrapper in a way for other libraries. So is it like if I wanted to just load an image and put it to the screen,
Starting point is 00:18:14 you have very high-level APIs for doing that kind of thing? Yeah, and it's written in a certain way. So it's kind of modeled on, there's different ways of thinking about it. It's kind of modeled on, there's different ways of thinking about it. It's kind of modeled on like a game loop where you're just trying to draw as fast as possible. So we use OpenGL and we have like a setup function, an update function and a draw function. And, you know, your job, you would like load an asset and set up. And then, you know, if it's a video file, maybe you'd tell it to update and update and draw.
Starting point is 00:18:44 You tell it to draw. But the whole idea is that it's it, once you launch the app, it's just trying to draw as fast as possible and run your software, you know, call update and draw repeatedly. There's other models, but that's the model that we chose. So it sounds like it's pretty open ended. And you can kind of do a lot with open frameworks. Could you maybe give us a couple examples of, you know, some types of programs that are easy to make and kind of really demonstrate, you know, creative coding type projects? Yeah.
Starting point is 00:19:14 I mean, I always think back to one of, like, a really early project with open frameworks is a project called LaserTag. There's a group in New York. I mean, they're disbanded now but they were around for a while in new york called graffiti research lab looking at the intersection of graffiti and technology and they built a tool called laser tag which is how do i describe this it's using um like a really bright projector projecting on a building and then you have a very bright potentially illegal laser so it's a bright green laser and then there have a very bright, potentially illegal laser.
Starting point is 00:19:47 So it's a bright green laser. And then there's a camera that's looking at the building. And as you draw with the laser, you can see the software is tracking the movement of the laser. Updating the image. And updating the image. So it allows you to actually draw on the building. So that's one of these projects which I really love. And there's also there's an artist in London named Seb Lee who does a lot of laser work. He uses open frameworks. I'll give you examples from my own work.
Starting point is 00:20:16 I do think of what's a good example. So here's a project that I really love. I did with New York Times, and it was an article where they were trying to describe what your body feels like when you go through different phases of addiction. So it's about opioid addiction. And for this article, the author interviewed hundreds of addicts to figure out what what what is what do you feel like when you start know start taking a drug when you stop taking a drug when you go through withdrawal and then we commissioned a dancer to dance these quotes and then i wrote software to analyze her movement and then we made a um visuals that accompanied the article so as you're reading this article which is describing all these things that happen there are these kind of visual interludes in the article that come from the movement of the dancer. So I wrote software to process her movement and create graphics that express what these people were telling us. What did those graphics ultimately look like?
Starting point is 00:21:19 I can share a link. I mean, yeah, I'll share a link so you can add it to your show notes. But for example, with addiction, which is when you keep having to take the drug in order to maintain a kind of baseline. You know, I drew the figure very small, but with these outlines around her. So you really feel like you're kind of more isolated or more of an island um there is a section called treatment and i had designed these particles that are bouncing along your contour on the inside and so you see a body but the body's kind of made out of these bouncing objects almost like what happens when you take a medicine when you take medicine trying to imagine visually what that would look like okay all right um and yeah i do all kinds of things i make i on the
Starting point is 00:22:07 instagram i post daily sketches so these are sort of short animations short poems and they're all made with c++ open frameworks so it's it's uh and if we didn't already say this it sounds like it has an aspect also of computer vision to it yeah i, I would say that's probably the strongest point. Open Frameworks is a creative coding toolkit. There's a bunch of these. So, for example, processing that was originally written in Java. Now there's P5.js. That's a JavaScript version of that. There's other ones. Now Touch Designer is a very popular one. There's a lot of different tools. Open Frameworks, I think, in particular, made it a whole lot easier to work with computer vision. So we have wrappers for OpenCV, and we make it, you know, if you just want to, like, load in an image and say, you know, let me threshold it and let me get the contours and get the kind of data from this image in some way that I can use, it makes it a lot easier. Awesome. Yeah, I was going to ask how it related, if at all, to OpenCV, but that
Starting point is 00:23:09 you wrap it to make it easier to use. That sounds nice. Yeah, yeah, yeah. Yeah, I mean, and it's the ideas, you know, we have one of the things that I think is really powerful about OpenFirm is we have all of these add-ons that are basically, you know, there's a website called OFX Add-ons and there's hundreds of, you know, people, let's say you're working on a project and you get some sort of sensor to work or you get some sort of library to work. There are people who have wrapped it in some form. Then you can add those to your project. So in your bio, you mentioned that you were the co-creator of Open Frameworks. I think you said it's been around for about 10 years. Don't tell us a little bit about what
Starting point is 00:23:49 kind of initially inspired you to create the toolkit? Sure. So we have to go way back in time. I was a so I studied art. I didn't have any a ton experience with computers, programming. I did, when I was really young, I did Logo. My mom signed me up for after school. I learned about Logo with the turtle and these sorts of things. But when I graduated from undergraduate, I fell in love with Flash. So I don't know, like Flash and ActionScript, this is a way that a lot of creative coders got started, is this sort of tool. And I went to Parsons for graduate school, like flash and action script this is a way that a lot of creative coders got started is you know
Starting point is 00:24:25 this sort of tool um and i went to parsons for graduate school i went to a design program and there people were doing things with there was a program called macro media director so there it had this beautiful language called lingo um which i still really love it's very poetic language so i learned lingo, I learned Java. And when I graduated from Parsons, one of my professors there invited me to come and work with him. And that first summer, he gave me a giant C++ book. And he's like, you're going to learn C++, you know, because we're going to use it for this project. And the first summer after I graduated, we were doing projects at this place called Ars Electronica, which is a large electronic art festival in Linz. And I was doing just really gnarly networking code.
Starting point is 00:25:14 I was learning about UDP packets, like very low level, you know, gnarly coding stuff, and sort of cut my teeth with that. And at that time, we were using a library called ACU. This is not an open source library. This was developed at MIT. So this professor, Golan Levin, he was a student at MIT. He studied in the Aesthetics and Computation group. This is a group that was run by John Maida. And they had developed internally a library called ACU. And so we were using this library. But so every summer we would go to Ars Electronica, we would make these projects. And I would come back.
Starting point is 00:25:49 I was teaching at that time. This is after I graduated. And I would want to share with my students what we learned. So as artists, we're going out, we're making projects. And I want to come back into the classroom and share code with them and show them, talk about computer vision, talk about audio analysis. And we were using these closed source tools. So Open Frameworks really started as a way to publish those things that we were learning and bring it into the classroom. So it really started as a kind of classroom tool.
Starting point is 00:26:21 And then one of my students, Theo Watson. So at that time, I was like a heavy windows user and he was like i'm gonna make a mac port and theo got involved and then um arturo castro is was like i'm gonna get linux to work and different people have jumped in at different times and really said like okay i want to get this to work on raspberry pi i want to get this to work on ios want to get this to work on android And it sort of has grown as people have tried to push it in different directions. Are those platforms actively maintained that you just mentioned? Yeah, they are. I mean, there's always, we always have to, like right now, for example, Apple released Silicon Max. And so we're, now we have to recompile a bunch of libraries and there's a lot
Starting point is 00:27:06 of work. It's like a constant battle with compilers, IDEs updating and trying to make everything work. I think they're all pretty active and oftentimes I find that really helpful
Starting point is 00:27:22 when I'm working where I can prototype something on my Mac and then test it on my – make something work on iOS or Android or maybe have some Windows machine. And to be able to have the same code work across different platforms is really powerful. Cool. Yeah, very cool. I was curious what direction Open Frameworks is moving in? Like, I know you just said that there, whenever people find new sensors or whatever to add,
Starting point is 00:27:50 that you've got a pathway for that. But is there any particular, like, driving goal that Open Frameworks is working towards? Yeah, I mean, I think one of the things that we've been talking about recently is trying to make the core of OpenFrameworks, when we started, was really small. And then, obviously, when you have a library,
Starting point is 00:28:10 people want you to add things to it because there's no sense duplicating code, right? If you can put something in the core of a library that add-ons can use, then that makes sense. But then when the core gets larger and larger and larger, it almost becomes much harder to maintain and, you know, less manageable. So now there's a real push to try to how can we make the core smaller and how could we have more subsystems or more modules pull them out of the core? And then I think one of the big things that Open Frameworks is going to have to grapple with and a lot of creative coding toolkits will have to grapple with, is we have sort of coasted with OpenGL. And OpenGL is really in decline.
Starting point is 00:28:52 You know, Apple is saying they're not supporting it. I mean, their new machines still run it. And I think it's going to be around for a while. But I do think that probably the next big push is to figure out how do you respond to more modern graphics API. So whether that's using metal or, you know, writing things specific to specific platforms or just thinking about a kind of design. And that's a real challenge because a lot of these tools, like we sort of grew up in the world of OpenGL and has been really great. And now we have to figure out kind of how do we respond to these changes. I mean, I've never done OpenGL programming, but my understanding is it has this very specific model. You set up the things that you wanted to execute.
Starting point is 00:29:39 You execute the things. You get the results back whatever uh so if you designed your library with opengl around opengl it seems like yeah i mean you have you've made architectural decisions that kind of rely on that yeah and also there's like different fit there's different you know versions of opengl so the old school opengl was very state-based but then they removed a lot from opengl so that you had to you had to maintain your own state. And we've done that. So we've done that sort of work.
Starting point is 00:30:09 There are different renderers. There's programmable renderers. And that's how we can support devices like iOS and Android. But it's going to take some work to figure out how do we work with things like Metal. And there's a lot of things to figure out for sure we work with things like metal and there's a lot of it yeah things to figure out for sure but everything still works so yeah we're right now we're really excited and seeing really great performance from the silicon max which is always exciting because i teach
Starting point is 00:30:37 especially the students that i teach often will be using max so it's important for us to support that right are you still actively involved in the development of Open Frameworks as the co-creator? I'm less so now. So I was really active in the past. Less so now. I've been involved in some sort of sub-projects. So for example, we have a project generator tool, which is an app that builds. Like one of the things that students especially struggle with is adding, like creating new projects or adding add ons, it can be really tricky, right to figure out, you know, how do I deal with a with an IDE? And how do I add, you know, complex paths, and you know, you might have a library that has a lot of files, OpenCV, for example, has, you know, a ton of header paths and things know you might have a library that has a lot of files open cv for example has you know a ton of um header paths and things that you have to figure out in order to get it to work
Starting point is 00:31:29 and compile and so we built a tool that essentially allows you to create a new project and choose add ons and basic kind of sets up a project for you where you don't have to deal with any of the specifics um you know you don't have to kind of poke around in the in the project file and you know and fix those sorts of errors and so that's something that i was really um kind of deeply involved with creating that and um and then we had a community written book that i've helped with but i haven't been involved like in the day-to-day like you know developing of open firmware so i still am you, when we have meetups and we sort of talk about strategy,
Starting point is 00:32:06 I'm still really active. And on the topic of books, since that's come up several times, is that a book that is people wanting to learn more about Open Frameworks should go check out? Yeah, it's on the website. So it's called OF Book. And there are different chapters.
Starting point is 00:32:21 I'm, of course, partial to the chapter. I wrote a chapter about animation. and of course, I love it. It's the best chapter. For me, it's the best chapter. But there's all kinds of chapters that are really varied. And so, for example, I'm really passionate about animation, and so I wrote a chapter about that. And somebody wrote a chapter about threads
Starting point is 00:32:40 and how do you work with threads, and that's a really difficult thing for students to figure out. And so talks about where you might want to use them, how to think about them, et cetera. That build tool you mentioned sounds really interesting. Using that, how easy is it to get started in open frameworks? You know, if you're just starting going to the website, downloading the toolkit, how long does it take to actually get a project up and running? I mean, we ship with a bunch of projects. So you should already like when you download open frameworks, you should have like there's an examples folder.
Starting point is 00:33:13 There's over 100 examples in there. So that's the first thing like getting, you know, running one of the examples, taking a look at it. And then the project generator tool, you know, should be pretty straightforward to get up and running. You basically, you know, you tell it where the, it either auto detects where the root of OpenFrameworks is, or you tell it, and then you choose the add-ons. And it has one cool feature, which is that you can also update recursively a bunch of projects.
Starting point is 00:33:43 So this happens a lot where I might have projects from an older version of OpenFrameworks. I might have a folder of code or code examples for a class, and then there's a recursive update function where you can, I mean, you have to be really safe about this, but it will just go through every folder recursively and say, does this look like an OpenFrameworks project? Let me update it and generate a new project file.
Starting point is 00:34:04 And it's pretty powerful um it is really um crazy like the code that we wrote especially modifying xcode project files because they're so gnarly you know it's it's like not a pleasant um i felt like i was like climbing around a jungle gym with the blindfold on. It's all this crazy... It's like a plist file, but then you can convert it to XML. But the XML is not pleasant. You can use XPath expressions. But I just remember that you would find something, and then you have to find something else. It works, but it's definitely not a pleasant code to write
Starting point is 00:34:46 it's been a while since i've looked at xcode internals but everything you're saying is jogging my memory yeah it is not a pleasant time yeah so um but part of that is just to make i mean the biggest problem that students have is you know when when you're just getting started and something doesn't work, it can be really frustrating, right? Just the just the act of like, you want to just be able to press play, you know, and see something on the screen. And I think that a tool like the project generator is designed to just make it easier for you to be able to press play and see something. Just to go a little bit more into the types of projects that someone could use to get started with open frameworks you know you mentioned this really cool example with
Starting point is 00:35:28 the projector and the laser but what are some other ones that you could kind of do on your own if you don't have any kind of special hardware yeah i mean there are um there are a lot of um examples in in open firm maybe i don't exactly i don't don't totally understand the question but you can yeah just just wonder what kind of arty people we just want to know what kinds of things people do yeah i mean people a lot of times people play with um uh kind of you know different sort of generative drawing techniques um there are um add-ons for working with physics. Things like Box2D is like a really popular physics engine. So you might, you know, start experimenting with, you know, different approaches to moving objects and seeing how they could kind of bounce and collide. People make
Starting point is 00:36:20 games with it. You can do all sorts of things. it's a little bit hard to answer that question but um i would always say to to beginners the best thing is to um to look at um projects that are made with open firmware so it's you know there's a hashtag you can find it on instagram or twitter youtube facebook vimeo and see you know see what people are making with it. And then ask people who make things that you like, how did you do this? What tools did you use? What add-ons? And the thing about the community is people are really, really friendly. There's a lot of people who share source code and share ideas and definitely just kind of jump on the forum. I thought of also a really nice project as a kind of reference for an open firm works project. And it's called Connected Worlds. It's at the New York Hall of Science.
Starting point is 00:37:13 So this is a really beautiful exhibit. It's created by Theo Watson and his partner, Emily. And they let me say her last name, Emily. Sorry, I'm looking up her last name, Emily. Sorry, I'm looking up her last name. You know, I'm probably going to butcher her last name, but Emily go go BL. And they have this project called Connected Worlds at the New York Hall of Science, which is this beautiful interaction. It's a really large interactive piece. And it's all about showing, you know, visitors to this museum how different elements in the world are connected. So, for example, there's a large waterfall. And when you there, from the waterfall and comes on the floor. And you can put down these logs on the floor and shape where the water goes. And if you stand up next to the projector and you hold your arms out, it'll grow a tree that matches your body.
Starting point is 00:38:16 And if you push the water towards the tree, the tree gets healthier. And the whole idea is to show all of these different connections in nature. And it's just such a beautiful project. But what I would say, you know, for people who are looking for inspiration is just find projects that, you know, whether it's open frameworks or any other creative coding tool kit, find people who are making interesting things and ask them, you know, oftentimes I'll get questions like, how did you make that? Or what algorithm did you use? And everybody's really friendly. People share ideas and resources. And that's a kind of beautiful thing. I think these tools, they're powerful, but more than anything, they're magnets for interesting people to come together and share ideas. I want to interrupt the discussion for just
Starting point is 00:39:01 a moment to bring a word from our sponsor, Visual Assist. Visual Assist is used by serious C++ developers across the world. It's got great code generation. Do you need to implement methods from an interface? What about changing a pointer to a smart pointer, even an Unreal Engine smart pointer? Adding a symbol you've typed but haven't declared? Visual Assist will do these and much more. Plus refactorings, more powerful than the ones included in Visual C++. Or detecting errors in code and suggesting useful corrections.
Starting point is 00:39:27 Or navigation, helping you move anywhere in your code and open or locate what you need. Or even the debug extensions. Visual Assist is written by C++ developers for C++ developers. It includes everything you need and nothing you don't. It has a low UI philosophy. It won't take over your IDE, but will show up when useful. It's there to help, not to advertise itself. Visual Assist is relied on
Starting point is 00:39:48 by the developers building software you've used. Whether that's office suites, operating systems, or games, software you use was built with Visual Assist. Get the same tooling for your own development. Visual Assist supports Unreal Engine 4 and many versions of Visual Studio, including VS 2019 and Community.
Starting point is 00:40:04 Get it at wholetomato.com. The other thing I wanted to ask, just to bring it back to normal C++ stuff for a moment, you've been working on this project for about 10 years. What kind of version of C++ is it targeting? Have you kept up to date with new standards coming out? I think you can target C++ 17. of targeting have you kept up to date with uh you know new standards coming out um i think what you can target c++ 17 it's um it is uh i think it is not as um we're not on the cutting edge um but you know we're um we definitely have gone through many sort of iterations where um so for example
Starting point is 00:40:43 like we used to lean really heavily on a library called poco um which was just gave us a lot of like internal tools for dealing with threads and file system and all this sort of stuff and we've been able to like move our way off of these libraries because of changes in c++ so um yeah it's not the most modern C++, but there are people who are pushing it and there's a lot of discussion about supporting different features and so on. Very cool. Do you want to tell us a little bit more about your work with teaching artists and designers and how that relates to open frameworks? So I teach, I taught for like over a decade at Parsons, which is a design school. And then I got tired of university world and with some friends started a school called the School for Poetic Computation, which is an experimental school based in New York. And we've been around since 2013. And then, as I mentioned earlier, about two years ago, I started I became a professor at MIT.
Starting point is 00:41:47 So it's teaching is really important to me. I always say when I try to describe what I do, I do sort of one third artwork, one third teaching, one third commercial work. And this these are almost like three legs of a stool. And I think it's really I like these three things because there's always something I can take. I take something that I learned from commercial practice and I bring it into the classroom. I take the energy from the students and I bring it to my art practice. I take the things from the art practice and bring it to my commercial practice. And that for me, those three things are really important.
Starting point is 00:42:16 And in terms of teaching, I really love working with students who who are new to code, who have never coded before, just excited about it or just learning. And oftentimes I have artists and designers who are excited about the medium. And that, for me, I feel almost like a vampire. Like I get so much energy when I see it work for them. I get so much energy. And I kind of take that back to my own practice. But in particular, I try to teach,
Starting point is 00:42:46 well, I'll describe a class that I teach. So I have a class which is called Recreating the Past. And every week I talk about a different artist and designer. So, for example, Vera Molnar, she's a Hungarian artist. And since the 1970s, she's been doing pen plotter drawings. So she writes code and making drawings with the pen plotter. And then my students learn about her. I'm too young to remember what a pen plotter drawings so she writes code um and making drawings with the pen plotter and then my students learn about home to remember what a pen plotter is yeah that's something i've worked with yeah you know you actually don't know what it is rob i don't think i do i've done my head
Starting point is 00:43:16 old school like if you wanted to print like a cad drawing it would typically be the way to do it it was x and y axes and it would actually go and pick up a marker pen and draw it. And then put that pen back and go grab the next pen and draw the next thing. And so she would do these amazing drawings through code. And so my students will learn about her work. And then their homework assignment is to recreate one of her works using modern tools. And I will do, I give code examples in Open Frameworks, but they can use whatever tool they want so some students excuse me are more familiar with processing so they might
Starting point is 00:43:51 use processing they might use unity some will use open frameworks but all the code examples i give them are in c++ and um and they have to recreate a work so it's almost an act of reverse engineering where you're looking at an artwork that's created with code or has an algorithmic basis. And then they have to almost reverse engineer it, take it apart and then recreate it. And then the conversation that you have, you're almost comparing two things, the original and the recreation. And there are these little differences. It's like that childhood game of spot the difference. You know, if you see two images that are almost the same, but not exactly the same.
Starting point is 00:44:27 And those conversations that we have about those differences are really powerful. I think they're an aspect of craft. If you can really look very closely at something, if you can kind of see these minute differences, then you can have a kind of deeper conversation about craft and so we'll do vera mulner is an artist we'll talk about kind of chaos and order and we'll talk about randomness and noise we'll do john whitney who's an animator that gives us a chance to talk about trigonometry using sine and cosine to animate we'll talk about Miro Cooper and her group at the Media Lab doing some really interesting work with typography and computation, kind of early days of using type on a computer.
Starting point is 00:45:13 And it goes on like that for about 10 weeks, just every week talking about a different artist and then recreating their work. Very cool. What is it like, you know, teaching these artists who sounds like they don't necessarily have that much knowledge of programming? Is it easy to get them into C++ using open frameworks? I mean, for students who have no background at all, we typically do like a three or four day boot camp, because I think vocabulary is really important. So I always want the students who have no background to be able to know like what is a variable, what is a control structure? I want them to know the words and I want them to feel like comfortable writing just very basic code and just even pressing play and seeing something on the
Starting point is 00:46:01 screen and feeling the success of that and changing something and seeing a problem you know i want them to go through those those sorts of steps so um that's always like a precursor to have some you know i want them to have some background a lot of students will have some background but maybe in another language so they might have done some javascript they may have done you know some processing or or some other environment and you know python etc so then it other environment and, you know, Python, etc. So then it's just translating what they know from that language. And, you know, we'll oftentimes have conversations about scope and, you know, things that because they're coming from another language, they may not understand, you know, what is passed by copy or what passed by reference. They may not understand things because they've learned it in one language.
Starting point is 00:46:43 So I sort of help them translate and translation is a really important part because sometimes you'll have students who feel really comfortable in in a tool and then um they might not want to take what they're learning and translate it to open frameworks or take something from open frameworks and translate it to their tool and that's something that i try to help a lot with. But in general, I find the best thing is oftentimes with students, they just need to see examples. And for me, the thing that I always worry about is can I get the students to the point where they can ask questions? And if you really don't feel comfortable, if you're really lost, then you don't even know how to formulate the question. But if you get to the point where you're like, I want to do this, and I don't know how to, and I did this, and this happened. And then, oh, it's really easy for me to kind of, like, write a short code snippet and send it back to them. And, but when you're a
Starting point is 00:47:38 beginner, I think it's, it can be feel really frustrating if you don't even know how to ask the question. I was curious if you get what the mix is like between, say, a computer science or engineering students or whatever who are interested in doing this kind of artistic expression kind of class versus artists who are coming and taking the class. It sounds like I'm guessing you get a mix of these. Yeah, we get a mix. So we get students who have like a ton of industry experience, especially at SFPC. We'll get students coming from, you know, want to get out of Silicon Valley and have had some experience doing back-end work or product work, etc. And so they have a ton. Some students have a ton of code experience.
Starting point is 00:48:22 And one of the things that we try to do, it's a 10-week program that we do and the first week we don't do anything on a computer the first week we are completely analog and we're doing drawing exercises and we're doing on the whole idea is to try to get students you know we're they'll do a lot of coding they'll do a lot of you know electronics and theory you know work throughout the 10 weeks but that first week i always think about if you have a class which is mixed skill set how do you fold the class in on itself so that you get everybody thinking about teaching and learning and not just about personal like you have a lot of people they're all it's not a boot camp where everybody's starting in the same place and ending in the same place but it's more everybody's on these kind of like different journey.
Starting point is 00:49:06 And how do you make how you fold the class in on itself? So everybody starts, you know, feels like they're more oriented towards teaching and learning. So one of the things that we do, I give in the first week, I give a lecture about binary numbers. And I'll talk about kind of binary and how do you count in binary, but also kind of the aesthetic implications of binary and some artworks that I think are, are, you know, interesting for thinking about kind of binary numbers. And then I asked the students to build a teaching tool. They work in groups and to build a tool to teach, teach somebody else how to count in binary. And it's all analog.
Starting point is 00:49:46 They're building games. They're doing dances. They're working with... But the nice thing is you get these groups, and you'll have groups with students who have never thought about binary numbers or didn't know how to count in binary until that day, and students who have a CS background and know this stuff sort of backwards and forwards. And once you start
Starting point is 00:50:05 focusing on teaching tools and learning then it's then those are the sorts of activities that get you know people really talking to each other and um you know it's i i like this idea of sort of without um computers at all very cool uh since you just mentioned there, you like being able to do this without computers. Uh, is the school still running classes currently with the COVID pandemic? Yeah. So we ran, um,
Starting point is 00:50:34 we had a really big problem in the springtime. Um, like a lot of schools where we had a spring term planned. We had, you know, 18 students from coming from around the world we had to postpone and then we um we pivoted to doing online classes so we canceled the 10-week program like the in-person version and we've pivoted to doing online classes and we had a really busy
Starting point is 00:50:57 summer um where i taught um i taught for example like three sections of the recreating the past class you know where um you know i taught like a whole day like 9 30 to 11 30 and then 1 to 3 and 5 to 7 because you had students from different time zones and i had 55 students and it was like it was amazing it was like cacophonous and and amazing to have so many students you know studying the same thing at the same time um and then in the fall we've decided to um kind of postpone and and we've put the programming on hold for now just because we there are some sort of internal things i think we were not really designed well to handle this many students and there are a lot of issues um in terms of how like teachers and staff and
Starting point is 00:51:43 administration all work together so we're in a process of kind of re-engineering how the school is run and we should have classes in the springtime, but we're, our programming is on pause right now, but we did like have a really successful summer with a lot of classes. Very cool. Okay. Jason, anything else you want to ask about? I don't believe so. All right. Well, Zach, it's been great having you on the show. I think this is a really fun topic to talk about to begin the new year.
Starting point is 00:52:11 Obviously, we've mentioned a lot of things. We've mentioned Open Frameworks and the school. Is there anything you want to plug before we let you go? Where can people find you online? That sort of thing. Yeah. So I would say if you're curious about Open Frameworks, for sure, jump in the forum, say hi, ask questions there. Um, I'm really active on social media. So I, on Instagram, I'm Zach dot Lieberman and on Twitter, um, without the dot and, um, and on
Starting point is 00:52:37 Instagram, you can see my daily sketches and those are, you know, I do these, I've been sketching every day for about five years. Um, I guess I'm entering the sixth year now, uh, where I just work through different ideas and, um, there's a bunch of people like myself doing this sort of thing. So if you're curious about it, I think it's following people who work in a daily way with creative coding can give you a lot of, um, that, that can be really inspiring to see what people do with this. And besides that, yeah, I don't know where else, I mean, I guess the school for
Starting point is 00:53:09 poetic computation, so sfbc.io. Alright, very cool. Thank you, Zach. Yeah, thank you. Thanks for having me. Thanks so much for listening in as we chat about C++. We'd love to hear what you think of the podcast. Please let us know if we're discussing the stuff you're interested in, or if you have a suggestion for a topic, we'd love to hear about that too.
Starting point is 00:53:28 You can email all your thoughts to feedback at cppcast.com. We'd also appreciate if you can like CppCast on Facebook and follow CppCast on Twitter. You can also follow me at Rob W. Irving and Jason at Lefticus on Twitter. We'd also like to thank all our patrons who help support the show through Patreon. If you'd like to support all our patrons who help support the show through Patreon. If you'd like to support us on Patreon, you can do so at patreon.com slash cppcast. And of course, you can find all that info and the show notes on the podcast website
Starting point is 00:53:54 at cppcast.com. Theme music for this episode is provided by podcastthemes.com.

There aren't comments yet for this episode. Click on any sentence in the transcript to leave a comment.