July 20242:44:495.9k views

Building a Life OS (Part 2)

About

The stream picks back up after OBS died. I sort out which models own a transcript, pull in the Transistor API, and build workflows that download new Mostly Technical and Database School episodes, strip the audio, store it, and transcribe it.

Transcript

Everything I said

00:06

Why is OBS-- is it me or is it OBS? Because it feels like it's OBS. Great, I'm live again. What a freaking mess. So now I'm just spamming everybody with tweets, which is lame.

00:37

What's the deal? Like, why does this... why is OBS not better? Um, see, this is the wrong, this is the wrong monitor now. Thanks, OBS. Okay. All right.

01:02

Hello. Okay. What a mess. What a mess. We were doing something. Back on track. It would be nice if Restream, uh, kept the stream going when, when it died.

01:28

That would be really helpful. Um, what I was gonna do before everything's went so, so wrong is I was gonna see if I defined this correctly. So let's do AR tinker video first.

01:56

Video not found. Am I not in the right one? App, models, video first. Psh, stupid. Transcript. Null. Did Chris lead me astray? Videos, transcript ID one.

02:26

Transcript. Did Chris lie to me? Um, that's aaronfrancis.com. This is channel. I'm doing-- Let's revert that. I'm doing video. Oh, I didn't do it yet.

02:46

That's why. Sorry, Chris. Channels don't have chan- transcripts. Videos have transcripts. Nice ad break. Seriously, though, what is the deal with OBS? Why does it crap out on me like that?

03:07

Is it me? Am I doing something wrong? Oh, there you go. It is has, it is has one. Okay, Chris, good job. Good job, Chris. No, it is belongs to. What? "Use StreamYard." Is StreamYard better?

03:33

That's my question. I feel like all of these things kinda suck. Why am I on different windows here? This should be over here. Glass Animals is there. Yep, yep, yep, yep. All right, so if I change this to has one, I feel like that's wrong. Has one transcript.

03:59

If I were a smart boy, I would be able to remember this. Yeah, it's belongs to. But I'm not a very smart boy. I just am willing to try a lot harder than most people. Cool. Yeah, I just don't know if it's a Restream problem or if it's a OBS problem, Steve.

04:29

That's, that's my question. All right, so what has transcripts? Um, a video has a transcript and an episode. I think I implemented this stuff on the wrong model. Has many episodes. It doesn't have many transcripts. A transcript has an episode.

04:56

Okay, that feels better. "Has one to a transcript model." Yeah, it is a morph, isn't it? So I can't get from the transcript, I can't-- Yeah, you're right. I can't get from the transcript back to the right model. I do need a morph on that. Um, let's go ahead and I'll do that later.

05:17

I don't really care about it right now. But, mm, mm, mm. I do want to always enforce a morph map. Oh, Laravel enforce morph map. Did I write this article?

05:45

Yeah, you sure did. That's really funny. Mm, mm, mm. I never know if I'm supposed to put something in register or boot.

06:12

That's what I'm looking for. Boot. I don't think you're really supposed to do anything in register except register stuff. Um, so if we go back to the migration, create whatever it is. Um, so that will do that.

06:40

Um, what's the other one? Resource... Is it JSON resource without wrapping? I use the web as my first brain a lot. I barely remember anything ever. Um, okay.

07:05

I feel like that's good. I will need to fill those out, but now enforcing it with nothing there means I can't, I can't mess it up. So I do like to enforce it regardless of if I'm ready to do it or not. Um, what are the safety modes that I wanna turn on?

07:25

Do I wanna turn on any safety modes? I don't know if I want to. Hello, Assemble. Hello, Jason. Um, do I wanna-- I don't know if I care about preventing N plus ones or anything. Um, sure, I'll turn it on.

07:48

Steve, Steve, you're crazy with your, with your enforce everything all the time. Um, ch-ch-ch-ch, that's what it is. Prevent lazy loading. No, Jason, OBS just quit on me. I just had to restart. Um, I'm building a life OS, which is going to be, uh, hey, Matthias, which is going to cover all sorts of things.

08:18

Right now, we're just trying to get it to aggregate. So what I wanna do is I wanna aggregate the content, I wanna automatically transcribe it, and I wanna automatically, um, character- characterize speakers. So that's called diarization, um, and I wanna do that automatically too. The problem is it's always going to require asking me who the speaker is, because I can't think of a way to automatically recognize voices

08:49

or anything. All right, so I think we have the models. That's fine. The-- Some of-- This is all gonna change. Um, that's not my table. Now, let us do this. Da, da, da. Mm, mm, mm.

09:12

Hm, hm, hm. Oh, you know what? I bet podcasts need a, um... No, let's just start. No more thinking. Too much thinking. Far too much thinking. Fetch what? Let's do fetch podcast episodes.

09:39

That feels wordy, doesn't it? Oh, boy, that's so wordy. I hate that. Um, App fetch pod- That's disgusting. Podcast.

10:03

Podcast fetch, podcasts fetch. Um, download and transcribe new podcast episodes. All right, so here's what this is gonna look like.

10:25

Um, pod fetch. Um, so what do I wanna do? Hmm. I think I need, like, a state on the podcast, 'cause what I wanna do is, um, look at the RSS/YouTube channel for new episodes.

10:53

Then, um, download the audio. Well, download the video or audio. Strip out audio if it's video. Upload audio to S3 bucket. So I do that for safekeeping, um, in case these podcasts ever disappear, or rather, additionally, I do that so that we can send it off to Deepgram.

11:27

Um, this is where I do my transcription. So let's see. Am I still live? Is everything still going okay? That's good. Upload S3 to bucket. Kick off transcription. Um, once transcription is done, publish on my site.

11:56

So this tells me I need a draft. I need a status column. I need a status column on- I always think it's gonna be a Boolean, and then it's never a Boolean.

12:20

Um, so we're just gonna make this a string of status. And we can make that an enum on the back end. I need a super small state machine. I know, state machines are so cool. Um, enums.

12:46

Status. Let's say, let's call it publish, publish status, published status, publish status, published status, published status. Um, what should it be?

13:07

String is probably fine, doesn't matter. Is it case? Is that what it is? Published. Is that right? Yep. I am sure we will have more in the future. Uh, I bet we'll have something like archived or hidden or something like that.

13:36

So we need to say that in episode... Guys, I have not-- This is so great. I have not just, like, greenfield coded on a low-stakes project in a long time. Casts, published. No, status. Should I call that publish status? I don't think so.

14:00

Processing, transcribing. Yeah, probably. This is where, this is where, uh, Chris and Daniel are gonna come in and say, "You should use event sourcing." I guarantee it, if they were here, they would be screaming at me. Do we have any other casts while we're here? We have publish date, we have is pinned.

14:23

Uh, uh, uh, aw, frigging Robin. Uh, we are building, we're building a web/CLI app to manage my life. Publish date is date. Is pinned is Boolean.

14:46

That feels good enough. I should probably add... Yeah, I think I should add this status to not only podcasts, but also videos. I don't know why, but it seems right to me.

15:16

See, but this, this remix I don't like. This one's no good. That one's no good. This one's better. Oh, no, I'm not very good at UI. That'll be the interesting part. Um, so it's gonna start as just, like, a Telegram bot.

15:39

Um, Telegram/CLI. And if I can knock out the CLI part, then we can add a UI on top of it. Okay, that feels better. So look at the RSS. So here's the question.

16:01

Um, if we say... So here's, here's the question. Um, each podcast could have its, apostrophe S? No, its own, um, workflow for grabbing episodes.

16:27

So what I mean by that is, um, Mostly Technical is just a YouTube channel. Um, Database School is a YouTube playlist that then has to publish, uh, to Transistor, which we've already done, so we've, we already have all that code.

16:51

Um, am I on any other podcasts? I think the other ones are dead. Hammerstone, that one's dead. So do I even need to fetch it? Probably not. Probably not. I can just hard code it, just, like, create the episodes.

17:14

Framework Friends is dead, but it was very good. It was a good podcast. Look at that, remix with Kent C. Dodds from way back when. Oh, thank you. The Business of Laravel episode. Is that on here? The Business of Laravel, yeah. That one right there.

17:36

See, I've gotta give this... This is embarrassing. There we go. It's a good jacket. I love that jacket. Okay, so I don't think we have, um, I don't think we have RSS. I know, they were good podcasts, man. They were good podcasts. Music Makers, that's a good podcast.

18:00

Look at that, 2015, Top Five Regrets of Dying People. Sheesh. Open curly bracket on a new line. Oh, like that? I love it. Love it. It looks awesome So the question is, given...

18:24

We can't just do this. We can't just do podcast each, uh, podcast, podcast fetch. We can't do that because each one is kind of going to define its own way to fetch.

18:48

So let's just do it the dumb way. Um, public function fetch. Do I wanna do this? Here's what I really wanna do. Um, yeah, I wanna do this. Fetch.

19:13

Why are you sorry for me? My twins are amazing. It's a lot of work, that's true. Uh, fetch Mostly Technical and fetch Database School. So here, I actually

19:43

need to delegate to the correct fetcher. But how? Um, so fetch Mostly Technical is going to be, uh, check YouTube API, download new episodes, strip audio, store audio, transcribe, create

20:14

podcast model. Nope, don't call it that. Create episode model. Mm, mm, yep, yep, yep. Set to published. Uh, as draft. Oh, see, I also need to, uh, label speakers.

20:42

That's gonna be, that's gonna be the interesting part. Fetch Database School, we've already done. Hey, Benjamin. Um, one set of boy/girl and then another set of boy/girl. So they're, they're both boy/girl sets.

21:04

Um, I don't know. Can you see? Can you see? Where would that be? Nope, it's off camera. Uh, so fetch Database School, what we can do here is get out of, uh, I think I just called it Database School.

21:28

Oh, F, are you kidding me? Why would you open on that? Why? Ah. Jeez. All right. Well, you've seen it now, so, uh, let me, uh, let me go roll those keys.

21:51

Son of a... Why would you open on that? Why would you do that? All right, so let's go to... God, how do we freaking... Transistor. I gotta go reset my Transistor key. So frustrating that it did that. I wanna say that it's my fault, but it's, it's definitely my fault, but I don't, I don't like that.

22:16

It's somebody else's fault. All right. There's a new key for you. Boy, that one really sneaked up on me, huh? All right, so you guys saw Transistor, so Transistor is toast. Then I need, what's some sort of like freaking Google API console or something?

22:40

It's the dumbest thing in the world. Um, you goofus. How do I continue to, to mess up like that? Thank you, Florian. We'll call it your fault. Um, yeah, do I have to freaking...

23:05

Not only one key, two keys. I wanna duplicate this key. Regenerate, that's what I want. I have a second monitor. Just don't use it very well, apparently. Okay.

23:35

Deal, Florian. Florian linked my keys, now. We're just gonna blame him. All right, so those have been updated. You doofus. Is Cloak a thing? Fabric development?

24:03

What does that even mean? I don't know what any of this means. Okay. So what can we take? Um, oh, you know what I super want is composer require, is it Saloon?

24:28

Yeah, yeah, yeah, yeah Both. What's up, Kitsy? I just showed people Benji. Um, don't worry, this is not for other people. This is for Aaron only. Live love Saloon.

24:52

Hey, SQLite course. Thank you. Do you guys like it? Is it any good? Here's the thing. Whenever I make a course or a video and then I finally release it, I'm pretty confident it's terrible, so I'm really waiting on the, the feedback to roll in that it's not terrible because I feel like it might be terrible.

25:15

Whoa, whoa, whoa, whoa, whoa, whoa, whoa. This is not a soda. This is a sparkling water. Don't, don't be besmirching my good name here. All right, so we can pull. Love being able to just copy my own work. Uh, where would that even be? Oh, we didn't-- We just used freaking...

25:38

Uh, uh, uh. Um, your definition of big project is probably different than everyone else's definition, so we have to figure out what do you mean by big project. Um, the new modules, I'm gonna record those next week.

26:02

Yeah, I am, uh, taking a little break from, uh, taking a little break from recording. "SQLite is worth it for all project." I probably agree, unless it is Google size. Um, yeah, different, different videos. The course does have different videos for light and dark mode, which is, uh, kinda silly.

26:28

I love it so much. I think it's a great, great idea. Mm, mm, mm. Oh, good. I'm so glad you're enjoying it. So you know the other thing I'm gonna do here, is I'm gonna use this package called Laravel Workflows. Um, I think I'm gonna just use Composer.

26:57

Let's grab Alloy YouTube. Composer require Alloy. Cool, cool, cool. So the goal here is to download them and store them in my...

27:25

Yep, we're gonna create, uh... What is it? Grep Saloon. AR Saloon. What am I doing? I'm doing a Saloon, not connection, connector for Transistor. Uh, I'm building a system. I'm building... In fact, I'm building this system.

27:49

This is what I'm building. You can't see any of this, but that's okay. I'm building a system that's going to automate as much of my life as is possible, um, because I don't like doing things. Um, I just told you what it should be named.

28:09

I told you it should be named Transistor. What is happening? Um, no, the Pulse Widgets project is dead. I got-- That was a bad time in life. Uh, Saloon connector, Transistor, Transistor. What? Why? What? What? What? Where did you say that is?

28:33

HTTP. Oh, this is the wrong project. This is in... I think you said HTTP integrations Transistor, Transistor. Ugh, that's fine. That's fine. That's fine. That's fine. All right, look alive. I am going to copy some ENV keys.

28:58

So you dummies don't try to decode this because that's gonna be really frustrating. Um, okay. Saloon is maybe the best. I think Saloon is one of the best packages in the ecosystem. So I have my Transistor key in here.

29:22

Now, close the ENV. Flip back over here. Close this ENV. Go to the recent files. Delete it out of the quick switcher. Okay. Uh, Ryan, you have, you have a Life OS?

29:44

Tell me, uh, tell me, tell me what it does. I want to know. Okay, so I need to come to-- Let's just make sure that there's nothing in here. Okay, there's nothing secret in here, so you can see that.

30:11

Oh, guys, you know, sometimes, sometimes, sometimes, uh, life is quite hard sometimes. I'm quite tired. Transistor key. Okay, so now I can come back to Transistor and what is the base URL for Transistor?

30:35

Fetch episodes. It's gonna be over here. Sync? Yep. Transistor V1, so that's the base URL. And then where can I put X API key? I'm sure that they have...

31:00

Oh, I'm sure that they have... Houston is cool. God, that's a good name. Dang. That's a good name. Don't they have an auth thing? Steve, what's the auth thing? I mean, I could do this, but I feel like that's not the way I'm supposed to do it in Saloon.

31:27

Like, that-- I feel like that would work, but that's wrong. Ryan, you've got, like, a million things to do. You're supposed to, you're supposed to-- I need you to blog about your life OS, but you're also supposed to, like, do some sort of, uh, LSP or something and create a social network and other stuff. So you gotta get busy, man.

31:50

Hey, George. Default auth. See, this is nice. What do you do, default auth? Header auth, that seems good. Ha. Boom. Cool. Saloon, thought of it all. Header authenticator.

32:18

I bet we can drop this. I bet X API key's gotta be the default, right? Header name authorization. Ugh. Okay, so that feels like it will work. Dude, house reno- yeah, PXP, that was what I was thinking of. Um, house renovations are the living worst.

32:39

I'm sure digging a swimming pool by hand is easy, but house renovations freaking suck. So I'm gonna pull the transistor key, plop it in there. Yep, yep, yep. Default config. I don't-- Do I need this? Can I just... Yoink, you're gone. Is it implemented in the parent, is the question.

33:01

Yeah. Yeah, see, I never, I never watched, um, I never watched Knight Rider. X API key is rarely used. Being deprecated by whom? Who? Who's deprecating it? Transistor? Or are you saying, like, um, API people?

33:26

I don't know why I put it in quotes. I too just want to be Tony Stark. That's all I've ever wanted. Um, so transistor, now I need, um... Where's the upload to transistor?

33:51

Yeah, upload URL, authorize upload. So if I said AR Saloon, what would I say? Request. What is the related integration? It's transistor. Um, it should be named authorize upload, and it is a GET request.

34:15

And then I have an actual upload and then a create episode. So if I do this again, um, the funny thing is this one is not actually related to... Steve is the only H- uh, the only API person I know.

34:37

He's, he is the strict final guy. He's the API guy. Um, here's the problem. This upload is not actually part of the transistor. It goes to its, uh, completely, uh, separate URL, so that's not gonna work. Um, so we can just do create episode. Ah, F.

35:00

I messed that up. So this is called transistor create episode. And it is a post DDD guy. Um, so I've got requests here, authorize upload.

35:22

Boy, this is so clean. I love this so much. Um, because, I think because the base URL is a V1, I can't start with a leading slash, so I will do episodes. Um, create authorize upload.

35:44

Authorize upload, and then create episodes is a post to just episodes, is a post to not slash episodes. Um, the influencer guy. I sure hope not. Hopefully, hopefully Aaron is the guy that likes to make things, not the guy that's an influencer.

36:13

Um, see, that is just straight upload. So here's my question. Do I want to start this? If you guys haven't seen this, it is very good.

36:35

It is incredibly good. Um- Hmm. Influencer guy is a byproduct. That's fine. That's fine. But if I ever get to be, if I ever get to be pure influencer and not, like, Aaron actually works and does cool things, then that's a bad thing.

37:02

You think I look like Aaron Collins? Is that Aaron Collins? I don't look like that guy. Do I look like that guy? Or that guy? I don't look like that guy either. I don't look like either of these guys. Wrong. Um, Phil Collins, yes.

37:25

Phil Collins I understand. Aaron Collins, creator of High Performance SQLite. Um, I don't know what's happening. I don't know what you're saying. Um, episodes. Yep, yep, yep. I think I kind of wanna pull the workflow thing in now. Um, what

37:56

I haven't sorted out yet is delegate gal- delegate to the correct fetcher. Adrian, I super do need that. Um, I'll be honest, here's the thing. I do not know how to do that.

38:21

I don't know how to do that. Um, man, the chained and batched jobs is fine. The workflows are so much better. Let's just do it for giggles. Let's just do this. This is going to drive-- Workflows are going to drive everything.

38:43

Uh, I do stream with OBS, so if you can figure out how to make a, if you can figure out how to make a sticky or whatever you're talking about, that'd be awesome. All right, we're installing Laravel Workflow. It is very good. S- s- s- s- sh, do I need to publish?

39:09

Ch- ch- ch- ch- ch- ch- ch- cool. Thank you, Christopher. Have you watched any of it yet/do you like it? I wish I could make you somebody else. I don't think I need to publish the migrations. Sort of looks like block or that one FP pattern.

39:32

I don't know what those things mean. Where's the mic? Uh, right here. You can't see it. Postgres is next. That'll come out in October. We already have timeline and everything set, so yeah, Postgres is next. I don't think I need the migrations.

39:53

I don't wanna muck about with the migrations. All right, so here's the deal. Um, OBS sources plus add text. Oh, you're talking about just, like, a straight up text overlay. I could do that. Um, AR make. Why did that not do anything?

40:23

Make workflow. So the thing about these workflows, and nobody uses this package, and I don't understand why. Um, oh, this is funky. What is this? Do I like this? No, it's too funky. I also don't like the home movie ones.

40:45

Um, ah, thank you, Michael or Mikhail. Um, I'm so glad that you like it. The launch has been good. Do you guys wanna see launch numbers? Do you wanna see actual numbers, like dollars? Do you wanna see them? Well, it's pretty easy to tell.

41:07

Boy, big, big text sure doesn't get blurred very easily, does it? Can you see? Can you read through that? What do you think it is? What do you think it is? Give me the guesses. How much, how much money have we made? All right, give me your guesses.

41:35

I gotta go to the bathroom, so give me your guesses. All

42:52

right, what's everybody guessing? What did everybody guess? 50K, 285. Ah, Fabio already knows. The suspense, $5, negative 108. Oh, thank goodness, no. Here we go. Ready? You heard toilet noises. Uh-oh. Here we go.

43:13

Boom. $85,000. When you're selling it for, when you're selling it for average order of $138, that's pretty good. It's pretty good. So that's a huge, just a massive amount of money.

43:38

Um, context is two people, so me and Steve, are full-time, and that took us maybe three months. So it starts to get whittled down, it starts to get whittled down somewhat quickly. Um, but the model can work.

44:02

The model can absolutely work. Yeah, taxes and, yeah, fees. I think this might even be top-line revenue. Um, this might be top-line revenue, and so, you know, s- uh, Lemon Squeezy takes their fees out of it. Turso did give us an undisclosed amount as well.

44:27

Um, yeah, I will have to figure out what all the fees are. Honestly, um, Lemon Squeezy is great. I wish I could turn off tax collection. I don't really care about collecting taxes in the UK or anything.

44:49

Um, is my audio still okay? Okay. Um, I don't really care about collecting taxes, but they make, they make everything else so easy, um, whereas Stripe has become a little bit more complicated. So primarily, the thing that they make so easy that I super care about is, um, refunds, affiliates, managing products, that sort of stuff.

45:24

I bet 10% is about right. All right. I need to explain why workflows rule so much. Is Lemon Squeeze support job platform app? I don't fully understand the question. I'm sorry. Make workflow.

45:47

Um, so we're gonna make a workflow. A workflow is composed of activities, and the activities are... can run in parallel. They can be retried. Um, they're incredibly cool. So let's make a workflow of, um, handle mostly technical.

46:16

Do I like that? Do I like that, or is that a stupid... Hey, Patricia. Pa- Patricio. Is that a stupid name? That feels like a stupid name. We will power forward with the stupid name.

46:38

Just do it stupid, and then do it interesting or correct. Handle mostly technical. All right, so we have this workflow. Um, so now we need, I think we need an activity. AR make activity. And we're gonna make one called Check Transistor.

47:12

AR make activity transcribe. Um, transcribe audio. Make activity upload, upload podcast.

47:42

That seems fine. Doesn't seem fine. See, I don't know about these remixes, man. This, on the other hand... What is this?

48:07

This is a good one. That's a good song. All right. So here's the story on these workflows. Activities. Unit of work can perform a specific task. W- brace yourselves. I'm gonna change this from dark mode, 'cause I don't like flip-flopping, so cover your eyes. There we go. An activity...

48:35

Yep. So activities can be retried within a workflow. So here's what this workflow is gonna look like. So if we go to handle mostly technical, um, so let's do, how do you pass data? Uh, uh, uh, start.

48:58

Anything that is passed to start will end up in the execute method. You can pass it to make. Um, so let's do from over here, fetch podcast episodes. So it's gonna be, what is, what did we name it?

49:24

Uh, handle mostly technical. Oh, workflow stub. So workflow equals workflow stub. Stub, make. That's too many colons.

49:45

Make, and then we'll have handle mostly technical class. And in fact, I don't think we need, um, to pass any data. I do love light mode.

50:11

I really do. Am I still live? Still live. What's a good, what's a good podcast? What is this?

50:36

Pixelating a specific app. No, I don't. That would be awesome, but I don't have that. So workflows start. Then in here, this is where we, um, I think we've already written this down somewhere.

51:13

Not sure if that hat works for Ian. Ian actually agrees. That was a topic of discussion. We discussed whether this hat works on Ian or not. His problem, the thing he doesn't like, is, are these two humps right here. It's, he said it made it look like he has horns. All right.

51:35

If anybody has mod privileges, can you boot that person? Uh, no, I have not enabled the PHP Storm AI thing. So this right here, that's gonna be, how do I do, uh, activities? Return yield.

51:56

So the reason this is so cool, um, workflow yield, activity stub, make, and then, so then we can say transcribe audio, and then I probably need to pass through a URL here.

52:32

So this is super great for, like, very async kind of stuff. Um, so transcribing audio could take forever. Um, thank you, Robin. Could take forever, and I need it to be, like, each individual step to be retriable, resumable, changeable, trackable, and I wanna be able to compose workflows out of, um, oh,

53:03

this song is so good, out of discrete activities. And so I want an activity that's like, transcribe audio. And in here, all it takes is a URL, and then it transcribes it and gives it back. And then the person who, um, created the workflow gets to decide, all right, what do I do with that information? So, like, so I could do this.

53:25

Um, return, so I could do transcript, create, um, basically, like, call out to DeepGram, transcribe, wait a bunch of time. Then when it's done, create a transcript that's just some JSON blob.

53:51

Uh, transcript. Boy, transcript equals. Oh, you guys. It is nice to, like, have completed something and get a chance to catch up on the rest of my life. Um, the goal here is that I don't have to catch up on the rest of my life every time. I can't continue to, like, go 110% on a course and then put everything else aside, and then, like,

54:22

then I come back and, like, my life is in shambles. So, ugh, the goal here is to, one, do the next course differently, more slowly, and two, um, build this robot to help me. As far as PPP discounts, um, uh, uh, uh.

54:46

Do you offer discounts? Yes. You just have to email us. It's just right there. If it's too high or you are a student, don't hesitate to email us. So- There you go. Um, so then I can return transcript ID, and then over here, I can say, uh, transcript ID, get this out of here, equals that.

55:14

And then I can associate, associate transcript with, uh, with episode. Mm, mm, mm, mm. Let's just freaking do it.

55:34

I don't know what we're standing around here for looking like a bunch of dummies. Oh, I'm afraid you've, um, given me far too much credit for creating an OS. This is just like a system, an operating system for my life, not an actual operating system. What's a Life OS?

55:58

It's gonna track everything I need to do in my life, and it's gonna do much of it for me. Starting workflows, um, get out of here with that. I need to start a worker. I forget what the worker... Um, running workers.

56:23

Oh, it's all run through Laravel's queues. That's cool. AR queue work. Isn't there a watch to, like, reset itself? Uh, I'll add some tests. Not right now. We're having too much fun right now. Uh, is there not like a, a self-reloading thing

56:53

for dev mode? One of the things about streaming is you just really have to be okay not knowing everything. Um, watch reload. Queue listen.

57:21

Queue listen. Thank you. Listen it is. Good job. See? People know. AR queue listen. Uh, what do I have my queue worker set to? Hopefully database. Queue connection is database.

57:46

Okay. Sh, sh, sh. Um, some people have asked, uh, Rox codes OBS. Maybe it's this one. Yep, there you go. This is how I do the... This is how I do the blurring.

58:08

Can I chat? Am I allowed to chat? I think so. I guess not. You think as, uh, the king of the stream, I would be allowed to chat. I guess I can't paste a URL in. That seems silly, doesn't it? Oh, there we go.

58:36

Shows my name is Restream. Very helpful. Very good job. Good decision. Um, all right, so we're gonna run queue listen. I don't think I ever ran the migrations for... Maybe I do need to publish those migrations.

58:58

Vendor publish workflow. Yeah, that's silly to me. I feel like they should run regardless of if they're published or not. Okay. Clear. Queue listen, default queue.

59:20

Sh, sh, sh, sh, sh, sh. All right, so that is working. Let's watch. So I'm just starting this. So this command doesn't do anything except start, uh...

59:45

God, what is going on over here? Like, what am I supposed to do? Just stick straight out of my head. Um, you know what? I don't think I need to do this whole podcast each nonsense. Um. Uh, like bank transfer money.

1:00:13

Maybe. Sounds kind of interesting. Oh, I had a good one today. Um, uh, how to join the Discord server. I don't know, because I don't have a Discord server, so if you figure that out, tell me. Um, I had a great problem today that I solved with, uh, SQL, and it was awesome.

1:00:36

So the problem was I had like a, I had a missing order. So let's say that my store ID is eight nine two one, and then what Lemon Squeezy does, which is kind of, um, whatever, interesting, is the order numbers become eight nine two one two three like that. But then when they get to 10, they, uh, they just go like that.

1:00:59

So it kind of, it ends up looking kind of silly, but I was missing an order number, and so I wrote a recursive CTE to figure out which order was missing, and I figured it out So I'm gonna make a YouTube video on that. 'Cause I feel like real world SQL stuff is kind of hard to come by. I don't think I need this. I think I could just make this. Handle, um, what's the name of the other podcast?

1:01:24

Database School. I don't think I need, like, a generic handler. I think that's in the middle of June. Make, what did we call it? Workflow. Will it ask me? God, I love Laravel so much. Look at that. Can just ask things.

1:01:47

It's awesome. Uh, let's do handle database school. And see, the neat part here, so this is legit now, so this exists, although I need to import it. Handle database school. I don't like handle. That feels, that feels stupid to me.

1:02:08

Um, that feels very stupid. Uh, how did I learn advanced features of SQL? Um, one would be these. These would be, uh, SQLite documentation. The other would be all of those books. Also, my dad was a DBA, so I was exposed to databases quite early.

1:02:31

Um, I just have been using, I've been using MySQL for more than twenty years now. If I'm thirty-five, I've been using MySQL for maybe twenty-two years, something like that. XYZ workflow. Yeah. Do I wanna, do I wanna suffix them all with workflow?

1:02:58

Mostly technical workflow. That does feel a little bit better, doesn't it? But they're all in this workflows directory, you know what I mean? But I do name, like, profile controller, controller, controller, controller. Boy. But yeah, look, uh, check transistor is an activity, but it's totally, it's totally unclear if it's an activity or not.

1:03:24

Hmm, much to consider. What I was going to say is, um, so if we do split right, and we close one, and we open... The neat part here... What's DDIA? Oh, Designing Data Intensive Applications.

1:03:48

I have that one right there. I need to read that one. Hey, guys, you want a terrible soda? Zevia. Oh, good job, camera. Way to stay on my face. Oh, wow. Good job, camera. Wow. Amazing work, camera.

1:04:09

Zevia. Zevia is terrible. Hmm. Screen is wide. Screen, screen wide. Screen very wide. That's because the screen part of my screen is sixteen by nine, and then I add some stuff to the right side. Water's the worst.

1:04:33

So here's the neat part. Um, handle database school. I can similarly check the YouTube API, download new episodes, create a new model, strip audio, store audio, and transcribe, which means I get to use many of these, many of these, uh, things again. Transcribe goes away.

1:04:56

Store audio. I need a, um, AR make activity. Strip audio from... Boy, that's long. I don't like that. Guys, why am I so bad at naming stuff? Have you tried considering moving to other domains of software development?

1:05:20

Mm, no, I haven't. What other domains would you recommend? Strip audio from video. Thank you, Lewis. Ooh, a past-- or INGs. Um, activity yield. So the way that this works, yield activity stub make strip audio from video.

1:05:49

Audio. The reason I do yield, I don't need both of these at once, is because, um, this execute method is going to be run over and over and over, and if it sees, like...

1:06:11

The first time it runs, it's gonna get to this part, and it's gonna create this, uh, it's gonna create this activity and go run it, and it's gonna wait for that activity to finish, and then when it's done, it's gonna run that activity. Embedded software? No. I did, uh, I did-- Oh, until the game starts.

1:06:35

I did mobile development when I was younger, and I really enjoyed it. It was fun. Um, yes, detach audio is better. So let's get going here. This is database school. I actually don't wanna start with database school. I wanna start with mostly technical.

1:06:58

Check YouTube API. Um, I think I have that somewhere. Where might I have that? Let me blur, 'cause who knows what this repo's gonna open up on. This freaking environment variables are killing me, man. All right, so if we go to aaronfrancis.com, open in PhpStorm.

1:07:26

All right, no, let's get that out, and sync podcasts. Oh, F. See, this is a bad way to do it. This is such a mess.

1:07:52

This is such a mess. Somebody give him the link. Give him the link. Somebody hit him. I think the tall stack is very good.

1:08:20

So let's do this. Uh, no, blur is via OBS 'cause it just does the screen. It's, like, down-scaled and up-scaled. There's a video I put in chat earlier. Somebody can find it for you. Live wire is not good.

1:08:43

What do you mean live wire is not good? Live wire is good. Oh, background blur. Yeah, that's by the camera. Get playlist by ID. So I think this is the playlist ID. So let's do-- Let's actually just take this out of the workflow for now.

1:09:11

So the idea is that with these workflows, I can have, I can have, like, you know, basically dozens and dozens of random workflows, and these-- the, the interesting thing about these workflows is these workflows can run for six months. Like, you can have a workflow that's like, um... So one good example of one that I will do is, um, just get it together, man.

1:09:39

Um, so let's say I was on a guest or I was on a podcast as a guest. So what happens is, um, what happens is I'm on a podcast as a guest, and then I immediately forget about everything. A hundred percent, I finish the podcast, and I'm like, "Great, purge that from your brain.

1:10:01

You'll never remember that again." The problem is, I wanna add those to my website, right? And so there, I can start a workflow and ask, "What podcast were you on?" Then Aaron says, let's say, what was Arvid's, what's the name of Arvid's podcast? The Bootstrapped Founder.

1:10:22

I was on The Bootstrap Founder. Then every five days, ask Aaron via Telegram, "Has the episode come out yet?" Um, if I respond yes, um, then ask for the URL

1:10:53

of the show. And so then after I get the URL for the show, then kick off the, um, kick off the, let's say, guest podcast workflow. And the thing is, this, this part, like, could last, uh, could go on thirty days

1:11:24

sometimes. So, like, you know, you're on a podcast, and they're like, "Great, we're gonna release it in the next, you know, whenever we have a gap." And the gap is, like, three months from now. I have forgotten it all by then. I don't remember a freaking thing. Um, so that's gonna be great. It's also, here's the other thing. What podcast were you on? Aaron says, "Bootstrap Founder." System says, "Were there any takeaways, um,

1:11:55

that you should expand into articles?" And then Aaron says, "Yes, no," and gives topics if appropriate. Um, and then those, those topics, if any were given, those topics go into a queue to write about.

1:12:22

This is what a workflow is gonna be. Um, and so I wanna be able to, I wanna be able to, like, do things immediately when they're on my mind, and then forget about it and, like, move on. And then have the system, which needs a name, uh, have the system handle that.

1:12:48

Workflows are, uh, it's a custom thing. It's from this package, Laravel Workflow. It's very, very good. Complex asynchronous processes, which you can also do, um, you can also do crazy stuff like you can send signals to workflows,

1:13:19

um- You can wait for five seconds. So you could do, like... This is so freaking cool. Hello? Oh, shoot, PhpStorm. Come on, PhpStorm, don't crap out on me. Oh, there we go.

1:13:45

So if we're in mostly technical or whatever, we can say yield a workflow stub. Um, so we could do, let's say, 60 seconds times, uh, 60 seconds times 60 minutes times eight hours.

1:14:12

So we could hang out for eight hours, and, um, uh, what could we do? We could say, um, I think we can do, like, if, I don't know, we'll say, like, a transcript.

1:14:38

You know, if transcript, we'll say not is, mm, hmm, hmm, hmm. Can't think of a good example. But you can throw a eight-hour, uh, you can throw an eight-hour timeout in there, and you can just keep doing it until something is ready.

1:15:03

That's also what these signals are about. You can signal from the outside of a workflow that something is ready. So you can, uh, pull the workflow out and set ready. It's so freaking crazy. Yeah, that's so freaking crazy.

1:15:25

So you could say, so you can set a timer, but you could also say, what is that one? Workflow stub await this ready. It's kinda crazy. Private ready equals false, and then you have to do, like, public function set ready, this ready, and you have to mark it, I think, as a, you

1:15:58

have to mark it as a signal method. Attributes are the, just the craziest thing in the world. Um, what did I do wrong here? Mm, freaking PHP. Oh, goodness.

1:16:22

Number one thing I gotta do is get a, uh, what are we working on today? Life OS. This is gonna manage my life for me. Bookkeeping, to-dos, reminders, um, invoices, podcasts, articles, the whole deal. So we're gonna... Anyway, workflows are cool, aren't they?

1:16:43

So we're gonna, yoink, yoink, yoink. Uh, we're gonna come back over here. Um, actually, AR make workflow guest podcast workflow. We're gonna try naming it workflow, see how that feels. Mm, wrong repo. Dum-dum.

1:17:09

And we're gonna make the guest workflow, 'cause we went through and did all of this nice work. Guest podcast workflow. Oh, shoot, do I really? Get outta here with that.

1:17:33

I'm not gonna reveal anything, am I? Ah. Hmm. See ya.

1:17:57

Thank you. You know another workflow that I want? AR make workflow invoice sent workflow. Uh, 'cause I totally forget to, like, follow up on invoices. Um, hmm, hmm, hmm.

1:18:23

I think that's it. Is that it? All right, back to fetch episodes. Does this work? What's it called? Podcasts. Uh, yeah, good chance.

1:18:45

Prime's coming to Dallas for Laracon. I live in Dallas, and I'm hosting Laracon. I'm the emcee, so yes, I'll definitely do something with Prime. Great, great, great. Hmm, hmm, hmm. Yeah, Kitzy's done.

1:19:08

Kitzy's only works for... Well, I'm sorry. Mine only works for me. Kitzy's is like a, is for everybody. I, I struggle with this as an idea. Um, yeah, that, that's really hard to see Um, I struggle with this as an idea for a business because it feels so personal, and

1:19:38

I don't know how you get around that. Like, I look at this and I think, "I want something like that, but I don't want that at all." Um, and I just don't know, I don't know how you get around that. So he'll figure it out. He's a smart guy. So we get all the videos.

1:20:03

Download new episodes. I wanna do this, um, strip audio thing. So strip audio needs a... Now, what did we call it? We changed the name of it. Uh, detach audio. Detach audio. I think this comes from detach audio.

1:20:34

YouTube DLP. I do like building stuff, man. Building stuff is the freaking best. So this is nice because watch this.

1:21:01

Uh, uh, uh, uh, uh, uh, uh, uh, uh. So what do I need to give detach audio? I need a, I need a path to the video file. Um, hello, Blessdara.

1:21:27

What time is it in Cameroon? Ah, nice. So in the detach audio, um, I also need... This is great. I'm gonna be able to use this stuff everywhere. AR make activity.

1:21:52

Um, download YouTube. It's capital T. Uh, URL. So that's where I'm gonna put the download.

1:22:21

Um, it's not a URL, it's a video ID. Video ID. I need to take that path and make up a file name. Uh, download YouTube video.

1:22:49

All right. So we're gonna give it a random file name, and then we're gonna put it in the, we're gonna put it in the storage directory. 1:35 AM, you gotta go to bed. Unless you're a young person, in which case you can stay up. Yep, that's fine.

1:23:12

So I'm gonna give this activity a video ID, and what should it give me back? Um, it should give me back a path where this is being stored, and this is not the right path. It's not an MP3. Oh, wait. I am downloading it. Ah, I'm downloading and stripping the audio at the same time.

1:23:35

Um, is that what I wanna do? Why would I ever need a, why would I ever need a YouTube video? I only ever need the YouTube audio for transcription and for uploading to Transistor.

1:24:01

I don't ever need the video. Hmm, download YouTube as audio. So this becomes correct. This becomes correct. I don't think I can just... Yoink, that's gone. I don't need that. Okay.

1:24:26

Process wait throw. So I'm going to append wait on here and throw on here. I think that just returns the response, returns this. So let's just take a look at this over in... Ten

1:24:57

to the fifth children. Boy, we're really seeing how the sausage is made here, huh? I think this should work. I just need a, a video ID.

1:25:29

Show me a video ID. That's not right. That's too big Video ID. So, video ID equals this random ID here.

1:25:55

Hmm. Oh, that's cool. Extract audio. Forbidden.

1:26:44

Forbidden. Was it blocked? So

1:27:18

if this works, um, this is a great argument, this is a great argument in favor of activities, because individual activities can be retried. Yeah, there you go. Individual activities will be retried, uh, without failing the entire workflow. And so, like, when you get something flaky like YouTube DLP, uh, it's nice to wrap that up in a workflow.

1:27:46

How do we do retries? That's the question. Um, failure and recovery. When an activity throws an exception, the workflow won't be informed.

1:28:09

Instead, it waits until the number of tries has been exhausted. The default means it will retry forever, which I probably, I probably don't wanna do that. Backs off with a exponential... That's cool.

1:28:30

Gives you time to fix the error. That's cool. This is funky. That's a good one. Um, cool. Good job. Um, so I want download YouTube as audio.

1:28:53

I don't want it to retry forever, but it can try three times. I'm fine with that. So then, okay. Don't you use test? Uh, yeah, I, I write tests.

1:29:15

I'm not writing any right now, 'cause I don't want to. Yeah, tests on stream would be boring. So now if I run this again, um, what am I trying to get out of this?

1:29:36

Process, process. Does it give me, like, a result, output? Uh, does it give me an exit code? I think it gives me, like, successful. So if I run this now, presumably it's gonna take a minute, but it should work.

1:29:57

If we check the storage directory, yeah, there's the second one. So that's the one that's downloading right now. Bingo. Len got it. Yeah, because I don't want to.

1:30:24

I've realized, um... Nice. Success, true. Nice. I've realized a lot of what I do, especially when it comes to development, I just, I just do it 'cause I wanna do it. Seems fine to me, honestly.

1:30:46

Um, so that will give me... I probably need to clean those audio files up at some point. So, this is interesting. So that I can clean them up later, let's do this. Now, do I wanna put it in the...

1:31:12

No. I'll just check the created timestamp. Um, but we're gonna add this to, uh, audio. Cool? Cool. So we can come in here, download YouTube as audio.

1:31:37

Audio, yeah, yeah, yeah, yeah, yeah. Video ID, yeah, yeah, yeah, yeah. Path shouldn't leak out. If not- Process successful. Throw new exception. Throw new exception, uh, podcast YouTube download failed.

1:32:06

Oh, no. If not, I wanna return the path, just the path to the MP3. So then we can come back to the... Oh, throw unless, that's kinda cool.

1:32:29

Do I like that? I don't like throw unless. I do like throw if. Is this how you do it? It's kinda cool. Oh, you have to give a...

1:32:55

Is string exception in class exists? So what is it, except... Can I give it a fully new-- can I give it a instance, or do I have to do... Yeah, I don't like unless.

1:33:18

It's confusing. Do I have to do it this way, or can I give it a fully... Instance works, good. Where went that million-dollar smile? Just a message. Runtime exception? I mean, I guess that's right.

1:33:41

I don't know what a runtime exception is. Sure. It's fine with me. Yeah, let's go with the default. Runtime exception it is. So throw if process wasn't except successful, then throw that.

1:34:05

Sure. It's fine with me. Um, I don't know. Do you hear a beeping sound? Might be trucks outside. So far, I am unclear if I need this file name.

1:34:30

Ah, failed. There you go. I don't think I need that file name. Throw if process failed. Huh, duh. Obviously. Cool. Oh, PhpStorm, I simply do not care.

1:34:52

The amount I care is so little. Okay. So what I need is... These two kinda got munged together, didn't they? So I'm gonna say path equals...

1:35:16

Yeah, it's probably trucks outside. Path equals yield activity stub make, uh, download YouTube as audio. Uh... Oh yeah, I hear it. It's, it's trucks outside. Video ID. Okay. So working backwards, we need to get some video IDs.

1:35:39

Um, vi- video yield. What activities do I have? All right. Good luck to your team, Florian. Godspeed to, uh, Godspeed to, I think you said Austria.

1:36:04

Good luck to Austria, unless someone in here is from Turkey, then good luck to Turkey. I do like Ronaldo. He's kind of-- seems like kind of a bad guy, but I do like him. Ooh, that's gonna be a good game, Spain, Germany.

1:36:28

Portugal, France. I know what I'm gonna do on Friday. I'm just gonna watch soccer. I'm not gonna do anything. Ooh, this is funky. That's a good one. Yeah, this is cool. These are good games. Ronaldo hates Coca-Cola.

1:36:51

Messi, for sure. Between, between Cristiano Ronaldo and Messi, Messi, Messi times 10. No, I've never watched cricket. Um, I... The scoring in cricket, I'm sure makes a lot of sense. I've never sat down to make sense of it.

1:37:12

It makes zero sense to me. I don't need detach audio. I don't need that at all. Um, we are in the bowels of the process to download videos off of YouTube. Um, but the, the Life OS is going to make my life easier.

1:37:34

It's gonna take, like, many months to build, but it's gonna be awesome. So I think I first need to... These should all be I think these should all be in an activities directory. Activities.

1:37:59

I don't know what check transistor's supposed to be. Um, that's an activity. That's an activity. Those need to be renamed to workflows. That's an activity. Oh, Steve's calling. Let me text him. Hopefully nothing has died.

1:38:25

Steve is, Steve is, uh, the other half of TryHrd Studios. So if we move these into activities, did they refactor? They sure did. Great. Uh, Course Launch is going great. I'm taking a break today on recording. Work flu, that's not how you spell it.

1:38:57

I can hear the audio in or the... Uh, Steve says, "I didn't mean to call you." Sad. Nobody ever means to call me. Mostly technical workflow. Invoice sent, upload podcast episode. It's relatively unclear, but we'll move that to activities.

1:39:19

Activities and actions. Activities go in workflows, um, and workflows are a specific primitive from, uh, from a package that I'm using. Ac- and activities can be retried. They're async. You can do groups. Like, how do you do groups?

1:39:42

Um, the problem with cricket is they're like, "Oh, it's 168 not out." And I'm like, "What are you talking about? I have no idea what you're talking about." Um, how do you do concurrency? Yeah, Jason did call me on purpose, which was good. Parallel.

1:40:05

This is cool. Look at this. Um, hey, thanks, Zuma. Yeah, your audio didn't work on the call. One cool thing you can do in these, uh, workflows is you can, like, run things.

1:40:27

You can say, like, "Uh, all of these things can run at the same time," but, you know, let's have, you know, whatever. Let's make this detach audio. So this one will run, and then these three can run at the same time, but when this one is done, then we can run, you know, another one. Um, and so you can, like, you can do complex workflow processes, um, which is gonna be great for, you know, keeping a workflow open for six months or whatever it ends up

1:40:58

being. So Database School is not what we're working on. We're working on Mostly Technical. So I need to check the YouTube API. Do I have... I just don't have that yet, do I? All right. Make activity. Um, it allows these workflows to run async.

1:41:24

The use case of yield allows it to run part of the process and then come back later and run the next part of the process. Make activity, um, fetch YouTube. Oh, this is a bummer. They're gonna continually put them there, aren't they? S- s- s- s- s- um, I can say playlist ID.

1:41:54

We're, we'll just start with playlist ID. Nope, we're gonna start with channel ID. Um, do the thing that is right in front of your face and fix it later. So what I need to do here is YouTube. Um, what do I need to do here? What are we working on?

1:42:15

Database School? Database School is a playlist. I actually forgot which one we're working on. I think we're actually working on Mostly Technical. So Mostly Technical is a full-on channel. Roach is cool.

1:42:36

Kai did a good job on Roach. So I wanna fetch YouTube. Mostly Technical is just a channel. Yep. And I think I have that. No, I don't freaking have that anywhere. We'll do it live. Uh, let's come back to...

1:43:06

S- s- s- s- s- so I need to close aaronfrancis.com. Let's come back to the command. Can get rid of you. This is, uh, that's the Database School one. S- s- s- s- so what I need to do is I need to fetch a channel, not a playlist.

1:43:36

Get... Okay, come on. Where-- This is, this is where I need Laravel Idea, 'cause then I gotta go down here, and I gotta come up here and be like, "Where's the real thing?" Right here. Channel. Um. List channel videos. That's what I want.

1:43:56

Channel ID. So get ch- list channel videos. What channel is it? This is actually my default PHP Storm mode. I've just removed everything, and it just, it's so much better.

1:44:35

Okay, that's database school. I need to figure out what channel. Um, YouTube mostly technical. Yes, but what is the actual... Did somebody comment on this yet? "I too wish my paychecks would avoid tax compliance." I don't know if that's mean or he's being funny, so I'm not gonna respond.

1:45:01

Um, I need the channel ID. More about this channel. Copy channel ID. Oh, suck it, nerds. What's up?

1:45:30

There are some videos. We're listening to the Glass Animals playlist. Um, here, let's try this. Let's see if this will come through. So if I turn this super down and then unmute it, do you have--

1:46:02

Are y'all getting any audio? Or I mean rather, are y'all getting any music? She

1:47:43

gone. So long, Joseph. Thank you for coming. He doesn't give audio to YouTube. That's interesting. That's pretty clever. All right, so if we have all the videos, God, I feel like I have done this 100 times, this whole YouTube thing.

1:48:15

Um, here we go. All right, so fetch podcast episodes. We're gonna collect the video results, and then we'll dd those and see what we are looking at. Undefined key.

1:48:43

Oh, do I need to... Hmm? Oh, it seems like that should've worked. So here's what we do. When we get in this situation, we dd videos again, and we clear this out, and we get ready to scroll, and you scroll up just a little bit. There you go. Caught it. There we go. So it's just a pure array, huh?

1:49:12

I can handle that. It's only 10, though. I'm gonna need more. I'm gonna need more. Um, so c- how do I do pagination with this guy? Max results.

1:49:33

Huh, there you go. I wonder what the, uh... 50. I don't think we've done 50 videos yet, or 50 episodes yet, so we should be fine So do I future-proof it or do I just make it work?

1:50:03

I think it'll be fine as long as they list them in... Yeah, that's a pretty old one, or rather a new one. See, but they're all out of order. F. Lists channel videos, channel ID, max results, order.

1:50:29

There you go. There you go. You just have to look at stuff. Channel, is that what it is? I'm not gonna get freaking auto-complete because it's this facade thing. Channel ID, max results order. Channel ID max results should be 50.

1:50:51

Order, what are my options for order? To the docs. Order. Order, order, order. Videos list.

1:51:13

It's probably actually not videos list. It's probably videos... Well, maybe it is. Go back to the source. Um, search advanced. So what does search advanced do? Search.list. So it's hitting a different one. Search.list. Get out of here.

1:51:38

Search list, give me order. Order, string, date. I'm gonna be honest, I don't know what reverse chronological means. Let's see if this is what I want.

1:52:08

So this, if I did this right, then this, the very first video that dumps out here should be the most recent podcast. See? You gotta scroll. You always gotta scroll a little bit. There we go. Boom, 42. Bro is coding in medieval language.

1:52:31

Yes, but bro is happy. Isn't that, isn't that all that matters? Okay, so this will put it in the correct order. This is the Mostly Technical channel ID. Techs- Technisol.

1:52:53

Oh, come on, get out of here with that. Okay. So will this compress it to what I want? Content details. Oh, I bet it's not JSON. It's very silly that these endpoints, or rather this library, returns different things.

1:53:23

Content details. Oh, it's 'cause it's mother freaking searching. Gosh dang it. Ah. I think it does support pagination. I need to, um, I probably need to include in the API request what parts I want. Part.

1:53:55

Yep. There you go. If you just read the docs, you can win. Search advanced. I need, um, list channel videos. Part. God, it's just like, it's just so nice when you can figure something out.

1:54:18

Part, ID, snippet. What's the content? Is it con- Is it literally just content details? Why, why won't you tell me what the available parts are? See you, Lynn. Yeah, it's gonna be regular. I'm having, I, I feel like this is a good use of my time.

1:54:42

Um, I guess we'll find out. Who knows? Maybe it's called content details, maybe it's not. Clear that out. Yeah, unknown part. Okay, so what are the parts? Um, what if we searched for, like, snippet?

1:55:10

The snippet object, yeah. No, why don't... That seems silly. Um, content details. Content details.

1:55:31

Yeah, but how do I include that in the part? Surely that's in this library somewhere. Content. See, look, right there. I wonder if it's not available on that API.

1:56:03

It might not be available on that search API, which would be very silly. Do I need it? What am I even doing? I don't know if I need it. Oh, goodness. I do need the video ID.

1:56:26

How am I supposed to get that? Just give me the, um, first. I don't need all of them. Hmm. It's only gonna give me one, 'cause I need to DD it, so there we go. I can just get it out of here.

1:56:51

ID, video ID. Snippet title, snippet description are both available, so I don't need to worry about that part. So, what if I... Yeah, let's just DD all of that.

1:57:13

There we go. There's all the videos. Holy moly. All right, I wanna finish this workflow all the way through and then log off, 'cause it's 2:00. It's late. See, the good news is, this is ac- this is working.

1:57:36

This counts. This totally counts. Oh, isn't it great to do stuff? Isn't doing stuff the best? When given an option between doing stuff and not doing stuff, always choose doing stuff.

1:57:59

So, those are all the videos mapped down to probably the only thing I care about. And then I need, um... Oh, ho, ho, ho.

1:58:22

Hello, Aziz. We are, uh, we are working on building a system to run my life, and the first thing we're doing is automating content onto my personal website. And then we've got a lot more. At some point, we're gonna get into bookkeeping, which is gonna be just rip-roaring good fun. So, if I have all these videos, um, I probably, I

1:58:54

probably just wanna do the latest. I can backfill. Um, so if we were to change this to... Let's change this to fetch latest YouTube. That's gonna make my life easier, I think.

1:59:27

Um, okay, so the next question is, let's check these docs here. I want passing data. Models get serialized.

1:59:48

That's good. Dependency injection goes through the execute. That's good. So, dependency injection and arguments go through execute, and because we're passing in a fully qualified class name and not an instance, I don't think I can set data from the outside.

2:00:11

I have to pass it through. Oh, thanks. I love my editor too. I should do a video on that, huh? Um, why don't we just do this?

2:00:32

'Cause then we can do... Oh, I can't do-- I probably can't do named arguments either, huh?

2:00:56

Workflow stub. No, it's not a workflow, it's an activity stub, make, and the activity is that one. Can I do named arguments here? I very much doubt it. I very much doubt it. So, how do I do this? Are...

2:01:21

Is it clear what's a channel ID and what's a... Hmm, 'cause I wanna be able to pass a channel or a playlist and get the latest YouTube video from it. So long.

2:01:45

We're almost done here. Running out of steam. Yeah, that might work. See, this is insane. 2,000 on Twitter? There's no way that's true. But it's way more than YouTube and LinkedIn.

2:02:07

Is anybody watching on LinkedIn? One thumbs up. Sad. It's embarrassing. Boy, I just don't wanna make, like, a DTO or something. That feels really dumb. Should I just do...

2:02:35

Let's... Okay, here's the problem. You're trying to solve future problems. Solve current problems. Channel. Channel, channel, channel. Channel. Technically, that is channel ID. I feel like channel ID was better. Solve current problems, not future problems.

2:02:59

So video ID is gonna yield that. Um, max results. Actually, we only need one here because we've ordered it correctly now. Um, I hate that it moves that back. That's fine. I should probably put that ID somewhere else.

2:03:26

Maybe? Oh, guys, I don't know. Um, does that mean Adam One Light? I don't know. I think I am in the new UI, so I'm in the new UI. Um, theme, appearance, Adam One Light, and I've done a bunch of customizing of stuff to get rid of...

2:03:56

PHP Storm loves to put stuff in your face. Um, so if there are no more videos, we can just bail. So this is gonna fetch the latest YouTube for Mostly Technical if there are no more videos. So from here, we need to return videos.

2:04:28

Nah. Um, so now that we've got two, we gotta drop those down. Return video. That should be called video now, and maybe it's null.

2:04:51

Nah, don't be silly. So here's a question. Why am I mapping over this? I don't know.

2:05:15

Doesn't matter. Keep going. No, you don't need to do this. Whoa, there's a new Perkins video that you're watching, you're not watching. Can't say I would do the same. So at this point, I

2:05:47

think we can just kill all of that and say videos. Can we do zero.id.videoid? Can we just do that? The Perkins are, the Perkins might be the best channel on YouTube.

2:06:11

So can we, can we do this? This might be the best way to do it. Null. Did I do it wrong?

2:06:34

Array key. Hey, Craig from LinkedIn. Um, now I'm trying to build a system that, like, makes my life easier. Oh, you're right. It's not an array. I do have to do data get.

2:06:57

You are correct. Ta-da. Thanks, Adrian. Craig, you might be the only person watching on LinkedIn. Boy, that sure got a lot cleaner.

2:07:24

So now the Mostly Technical workflow becomes video ID is that. If no video, return. And then we can probably just go straight into this. We'll save up, uh, we'll save activity stub, download YouTube as audio.

2:07:45

Have I renamed that? Probably. Oh, I moved it. That's the problem. Only good content on LinkedIn. Yes, that's what LinkedIn is known for, their exceptionally good content. Um, okay, so now we can pass this video ID.

2:08:09

If there's no video ID, no new video. Sad. Then we can download as audio- All right, should we test this workflow thing for real now? Could take up to 10 minutes for that to run, which is fine. Process throw.

2:08:31

If process fail, otherwise return path. So the one thing I don't know how to do, um... Mm.

2:08:53

There's a way to do logs in this workflow package, but I don't wanna figure it out right now. Saga. What is a saga? Gosh, this is so freaking cool. It's

2:09:25

so-- It's just, that's very cool. Hm. Where are the logs? Monitoring. They have their own dashboard, which is cool. See, this is... I love dashboards.

2:09:45

I just want more stuff. I just love stuff. Whatever. We're just gonna log info path, and we'll be done. So here, let's do it. Let's see if it works, and then we'll pick it up tomorrow. I think I may, I may not-- I may just only work on this on stream.

2:10:07

How's that sound? Um. All right, so this is all gonzo. This we gotta bail before. What we're doing is the mostly technical workflow. All right. So now the only thing that should happen, um, it's, uh, I don't, it's not really a queue

2:10:37

wrapper. It does, it-- The driver is queue-based, but it handles orchestration between many asynchronous activities. Um, but the driver, it, like, sits on top of Laravel's queues. Um, all right. So in theory, I can start this workflow, um, without, if we aren't listening, uh, we, we bombed something over here.

2:11:03

So we're not running the queue worker right now. Uh, this is the wrong repo, so we're not running any queue worker. So if I was to run podcast fetch, in theory, we should now see a workflow here. There we go. Okay. So we see a workflow. Don't love that it's a fully qualified class name.

2:11:24

I wonder if there's a way to fix that. Um, the status is pending, and there are the arguments. Serializable closure, which are super cool. Um, okay. Cool. So now, um, there are some workflow logs, signals, timers, yada, yada, yada. Great. Now, in reality, what I would do is run ar queue listen, but instead, um, I just wanna do it a step at a time.

2:11:54

So I'm just gonna run one step at a time so that we can watch to see if it works. So if I do ar queue queue work once. Okay. Processing jobs. Mostly technical workflow. Mostly technical workflow. Now what do we see here? We see the workflow is now waiting, so it's no longer pending.

2:12:17

It's now waiting, and we should see there's a job there. And, uh, so look, it put in a fetch latest YouTube job. So now if I run, uh, ar queue work once again. I don't know if relation morph map works on, um, this workflow package.

2:12:42

I don't think it does. Okay, so it processed fetch latest YouTube. Did it work? That's the question. So here's a log. Um, who knows what that means?

2:13:11

So now the interesting thing is, like, this is maybe why this is mo- most interesting. Um, so nothing is running right now, right? We're not running anything. Uh, some jobs have been completed. We're not running a single thing. However, this video ID is still going to work, but this is not going to run again.

2:13:39

So, like, when this, uh, workflow comes back alive, it's gonna look at this and say, "I've actually already run this, and I have a value for video ID. So instead of running this again, I'm just gonna set the value for video ID and move on." Which is very cool. Um, the, the trick is you have to be careful in here.

2:14:05

You can't do something like transcript create because this, this could potentially run many dozens of times, if not hundreds of times. So in here, you have to be careful that you're just yielding out activity stubs, um- I feel like I gotta make a video on this. This is so interesting.

2:14:27

All right, so in theory, uh, we should run this again. We should run the queue worker again, and the next job or the next activity that it's gonna run is this download YouTube as audio because I think it already put that in there. Yes, you do.

2:14:54

Yes, you do what? Yes, who do? Who do what? All right, here we go. Let's try this again. AR queue work once. Did it work? I wonder if it's failing. Download YouTube as audio.

2:15:20

Oh, so w- once, the next once that it ran, it put the download YouTube as audio into the... I see. That makes sense. Um, so after it finished the first... Oh, yes, you do. Um, that makes sense. After it finished the first run, so it processed this job, and it put a job back on the queue, but it wasn't this job.

2:15:48

It was basically this job of like, "Hey, run again. Keep going." And when I ran it again, it skipped over this one and said, "Great, this is the next one. We'll go ahead and run that." So that's what's running right now. This is great. This-- Uh, the reason I'm doing this is 'cause I think this is going to be fundamental to, um, the entire system.

2:16:14

The ability to keep long-running state, um, and complex orchestration over many, many months or many, many days or weeks is pretty important, and this allows me to use their primitives instead of writing a new table or set of data or whatever every time I'm trying to run, every time I'm trying to create a new process.

2:16:44

All right, download YouTube as audio is done. So if we look at the jobs, there's a new job on there, and I bet that's just the workflow job again. Call queued handler on the workflow. Yep. Ah, hello, Dennis. Uh, congratulations on, uh, Portugal Euro.

2:17:10

I think I saw this. Yes. Congratulations on your win against Slovenia. In case, like, a workflow times out, hmm, I don't know. I'll be honest, I don't know. So let's check the state of the workflow.

2:17:32

State of the workflow is still pending. Did we get a path in our log? We didn't. So it's possible that that failed. Mostly technical again.

2:17:58

Oh, now it says it's completed, so I wonder if it captured this log. Oh, no, there it is. Hey. It worked. Our workflow worked.

2:18:21

Status is completed. Let's, um, let's do one last thing before we log off. We never log off, let's be honest. Let's do one last thing before I s- stop the stream. Waterline. We're gonna install a little, just a little guy.

2:18:43

We're just gonna install a little guy. He's just a little guy. Man, we love it when it works. Okay, now what?

2:19:15

Is there a Waterline service provider? Waterline, kind of a cool name. So I should be able to just access this locally. Hmm. All right, let's see what the Waterline UI looks like.

2:19:38

Um, I don't have a name for this, do I? Herd open. I feel like this is heavily based on, um, this is identical to, uh, what's it called? Horizon. Completed. Mostly technical workflow. It took seven minutes to complete.

2:20:01

Here's the timeline. God, this rules. This is very cool. I don't know if those times are accurate because I was running the queue manually, so I imagine, um, that added some time to it. But look how boss this is. And you can view...

2:20:29

Ha, look at that. That is cool. That shows me-- So what this is, so that's, uh, XGO. So if we come back here, and we look at our mostly technical workflow, that's the video ID. So from this, uh, from this fetch latest YouTube, that's this fetch latest YouTube, we assigned it to video ID, and they're telling us, yeah, yeah, yeah, that was the video ID.

2:20:59

That's how they keep track of state in between, uh, long-running processes. Um, they write it down somewhere. I mean, that's how anybody keeps track of anything. You just write it down somewhere. But they wrote it down somewhere. Um, so this one should be a path, and if we click on view, ho.

2:21:22

How freaking cool is this? This is the, uh, this is the fundamental model that the whole system is going to rely upon. Hell yeah. We love it.

2:21:45

We love it. We love it. Cool. Okay, we got some infrastructure in place. I need to do a cleanup. Yeah, yeah, yeah, yeah, yeah. These two are dead, 'cause I won't be putting stuff there anymore. Um, does it need to be a workflow? Hmm, probably not.

2:22:07

AR make command clean audio, but that's confusing. Mm-mm. 'Cause I'm not actually cleaning audio. I am, um, prune audio. Ah, that's better. Prune... This is the last thing I'm gonna do, I swear.

2:22:32

Although, this is my job. What else do I have to do? What else-- You know what else I have to do? I've gotta freaking respond to emails. I'm so... And DMs. I'm so... It's embarrassing. Audio prune. I don't feel like audio prune is right. Um, that's one thing.

2:22:55

Prune storage. Storage prune, that feels better. Prune po- Yeah, too many words. Clean temp audios, I know. I just... I wanted it to be shorter. Prune old... It's the middle of the day, Jason.

2:23:16

What, what, what... Kids are, kids are doing stuff. Prune old files from storage. All right, so here's the question. How do we... File system, local. What's the storage path? Storage path app. Um, so I'm gonna put a root in here.

2:23:43

Uh, that's not actually root. That's a lie. That's root. But do I... Who am I lying to? Just me? I lie to myself constantly, so why is this different?

2:24:07

Um, let's just go for it. Just do the, do the thing, make it better later. Um, okay, so our disk is... What do you mean, you can't believe it's still going? Of course it's still going. I got stuff I gotta do, man. Disk equals storage disk, root disk files.

2:24:35

All files? Sure. What does this give me? Ah. What did I call this? Storage prune. Uh, storage prune might actually already be a command. I think it...

2:25:02

Okay, uh, cache prune, model prune, queue prune, queue prune, sanctum prune, storage. Okay. Yep, yep, yep. Storage prune is fine. Unable to list contents.

2:25:33

All files in storage returns nothing. Oh, I think I know what I'm doing. I think I'm being a silly boy. There we go. Do I like that? Let's just start where we're starting. Um, all right, so let's say...

2:26:02

Just gonna call it a public function, 'cause I don't care. Prune audio. One of the things about streaming is it's a little bit, uh- Kinda makes you feel a little bit like, am

2:26:33

I really a good developer? Because I sure am making a lot of mistakes/don't know a lot of things. That's okay. I don't think I want to use the storage facade here. I think I-- I don't think I wanna use this.

2:26:57

I don't like how this is shaping up. Isn't there, like, just, um... What's the file system one?

2:27:27

What's the file system? 'Cause what I want is I want SplFileInfo. I'm just getting names, and I want SplFileInfos. Isn't it like... I mean, file system's a thing. What do you do, file system? What do you do? Yeah, see, look.

2:27:56

file system all files. Yeah, find me the docs for that 'cause I feel like I'm, I'm, I'm being a little bit of a doofus here. All files cannot be called statically.

2:28:21

Oh, God, what is the, um... Is this a facade? What is the other file system that's not the storage? You know what I'm talking about? Am I just doing this totally wrong?

2:28:52

We could ask ChatGPT. Files, is that what it is? Yeah, yeah, yeah, yeah, yeah, yeah, yeah. File. That's what I want.

2:29:17

Goodness, see, that's what I'm talking about. I was just saying sometimes I feel like a very silly boy. Oh, I hate it when this renders. All files directory. Um, I don't know if it wants an absolute or a relative directory, so we're about to find out.

2:29:43

Looks like we're good. See, SplFileInfo, that's what I want. That's what I want. Thank you, all. Yep, yep, yep. Yep, yep, yep. I don't wanna hear people talking.

2:30:05

If I'm listening to music, I don't wanna hear you doing some sort of audio track. Um, okay, so what does this give me? This gives me an array. So let's do this. Um, files equals that. Then we can collect files and map, and now we get SplFileInfos file.

2:30:29

That's what I wanted. I didn't wanna go check again. So if we dd this file, okay. "You should try herd dumps." Um, here's a question, Nick. What makes you think I haven't tried them?

2:30:54

Um, I've tried them. They're good. Get ctime. Yeah, let's do get ctime. I think that's created time. Herd dumps are great. I, I just don't, I don't need them. Um, okay, so created a Carbon make k-k-k from times, create from timestamp.

2:31:24

Created. Does that look right? "Because they're good and you don't use them." Fair enough. Um, ba-da-ba-da. Today's seven oh two. Oh.

2:31:55

Yep, that's right. Cool. So, um, what have I done? I have gone into the audio directory, grabbed all of the files, and created a Carbon instance.

2:32:27

Um, in fact Let's, let's just get collecty with it. Um, I want to only include... Boy, those trucks are loud. I want to only include... Yeah, yeah, yeah, yeah, yeah.

2:32:49

So I'm going to filter down to Created At is after, is after, is before, um, now sub days seven. Do we like inlining it all?

2:33:20

No, that looks crazy. That's better. Okay, so we're gonna filter down to only the ones that were created at more than seven days ago, which in this case, um, how do you really feel about it, Martin? It's trucks outside.

2:33:44

Um, yep, there should be none, and if we were to change this to a reject anything that's old, we have our one guy. So we're gonna just fiddle with that, but we need to make sure that we change to filter. Um, then we can say, can you just, like, call file delete? No. Um, file delete, file get path.

2:34:13

Let's see if that's right. Help the poor truck driver park. Um, unexpected token. Yep, storage audio. That's not what I wanted. Get relat- get real path, maybe. Um, I just don't know if the file delete wants a real path or if it wants...

2:34:50

So let's see if that goes away now. And it did. Cool. There's our prune function. So now, um, we can prune more stuff in the future. That's not how you spell disk, you big doofus.

2:35:18

What is disk? What is it an instance of? For all you type heads out there, what do we want? It is a file system adapter. Cool.

2:35:42

Well, gang, I think we did it. What is, what, what are you complaining about? What do you want? What do you want me to do? It gives back a file system adapter. Oh, this freaking thing. Why is it complaining?

2:36:05

I don't care. I tried to d- I tried to do the right thing, PhpStorm. I tried to set a type. You al- you always cared about types. There's freaking types everywhere, and you tell me I'm doing it wrong. Well, make it right. Do it right. Yeah, I know.

2:36:27

I just... What is the right type? Oh, it's a file system. That's hideous. It's so stupid, so freaking stupid. It's so dumb. File system. There you go, PhpStorm.

2:36:51

Deal with it. Ha, I think you're right. We don't need disk anymore. Okay, it's definitely time to log off. File system contract. Okay, that's it.

2:37:20

I think we're done. Did we leave anything that we don't need? I don't think we need file system, do we? We don't need it. We don't need storage either, do we? I do need to set up a pint. Pint or pent? I actually call it pent, 'cause that's what Nuno called it.

2:37:43

Oh, going back to SQLite. Yeah, yeah, yeah, yeah, yeah, yeah, yeah, yeah, yeah. I'm g- put- putting that off until next week. Um, one reason is I need to recover. Um, the other reason is, um, it's a good excuse to send more emails of like, "Hey, the new modules have been updated, um, or added," and I wanna add that, or I wanna send that a little bit after the launch so that people that didn't buy don't feel like they're getting spammed from me or

2:38:14

by me rather. Cool. Guys, this is great. Workflows are great. I'm excited about workflows. I do need to figure out, do I wanna name all these activities? 'Cause that feels a little wordy, doesn't it? But I do like these workflows.

2:38:34

I think this is gonna be awesome. All right, cool. Do you guys like the stream? Do we, do we like streaming? I think we're gonna stream every day. Replace map to each. Ah, ah, you're probably right. Here's the thing, sometimes I just don't care about stuff. This, like, this could actually be a short closure, but I'm not gonna do that.

2:39:09

You guys like it? I'm waiting for the, the chat to catch up. I think it's fun. I got a lot I gotta do, and I think streaming is a fun way to do it. Um, as long as I can, uh... Yeah, it's this one. I just closed it. Laravel workflow. Um, as long as I can get stuff done, like, it's a great use of time.

2:39:32

Why would I not do it? So I'm gonna keep doing it. Um, okay, and tomorrow, what's tomorrow? Tomorrow's not the 4th, is it? No, tomorrow's the 3rd. Uh, tomorrow we'll just keep working on it. I'm just gonna build out this Live OS to be, let's see. This is what we're after.

2:39:53

I don't know if it'll focus, but this is, this is the goal. The goal is to just not have to do anything I don't wanna do ever again. Fingers crossed, right? Um, okay. That's it. Thanks for hanging. Uh, if you have any questions or anything, I don't know what to tell you.

2:40:17

Don't know. Ask on Twitter, I guess. That's a pretty good thing to do. Um, sorry about the trucks. Good call on not playing music. Um, yeah, that's it. Hey, Ben. All right.

2:40:40

I'm gonna log off, but I'm gonna wait here for a few minutes just to see the chat die out. So if you have anything to say, if you have anything to say, say it now, or forever hold your peace. Nothing, nothing, nothing. Okay.

2:41:03

This is the last chance. Oh, we got one question from Martin. Oh, make me a snippet for OBS. That would be awesome. Dark theme.

2:41:25

Sorry. No, not gonna happen. Good night, Steen. Oh, that's who Aaron Collins is. That is hysterical. I wondered what you were talking about. That makes sense.

2:41:46

Uh. Oh, fantastic. Fantastic. Fantastic, Christopher. Nick, I swear, if you steal my API keys, it's over for you. I will find you. I don't know your last name, but there can't be that many people named Nick.

2:42:10

Uh, Laravel course. Yeah, I think so. I think so. What would you wanna see that Laracast doesn't already cover, though? Um, Tommy, that's an interesting idea, actually. Don't ever apologize for a dupe message. It's totally fine. Thank you, Dean.

2:42:35

People keep asking, um... Oh, thanks, Dean. People keep asking for a Laravel course, which I would love to do, but I just, um, s- part of me wonders, like, what... Uh, this is a silly thing to wonder. I'll, I'll just tell you my whole thought process. Part of me wonders what I would do that's different than Laracasts, and I think that that is a silly thought process because some people learn differently.

2:43:04

There are SQL courses out there. I still made one. What's, what's stopping me? That's a great question. It's a great question. Great question. All right. Can y'all see the time on my desktop? No. When it's 3:00, I'm leaving, so three more minutes, and then I'm leaving. Until then, I'm gonna listen to Glass Animals.

2:43:30

Thank you, Nick. All right. Okay, we're getting down to the wire. Two minutes. I am really happy with how this turned out.

2:43:54

How to Be a Human Being is, it's freaking the best. So long. So long, Prashank. So long, Martin.

2:44:24

All right. We're gonna call it. Thanks, y'all. Sweet, sweet hanging. We'll do it again tomorrow.

Laravel & PHP

More videos on Laravel & PHP

All videos

Get the next one by email

I’ll send you some more. Not too many.

Join 7,500+ other readers.

Read past issues